diff --git a/cdmm/app/assets/images/cloud-saved.svg b/cdmm/app/assets/images/cloud-saved.svg
new file mode 100644
index 0000000..e005c3f
--- /dev/null
+++ b/cdmm/app/assets/images/cloud-saved.svg
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/cdmm/app/assets/images/cloud.svg b/cdmm/app/assets/images/cloud.svg
new file mode 100644
index 0000000..d9a76e5
--- /dev/null
+++ b/cdmm/app/assets/images/cloud.svg
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/cdmm/app/controllers/cdmm_controller.rb b/cdmm/app/controllers/cdmm_controller.rb
index b0d3892..2ae2236 100644
--- a/cdmm/app/controllers/cdmm_controller.rb
+++ b/cdmm/app/controllers/cdmm_controller.rb
@@ -1,12 +1,35 @@
class CdmmController < ApplicationController
+ # Viewing
+ # if form_key is empty, it will create a draft version and show the default data
+ # if form_key is in the database, it will populate data and show them
+ # if form_key is not in the database, show not_found
+
+ # Saving with form_key will always success too
+ # if form_key is not in the database, it will show not found
+ # if form_key is in the database, it will update the data and change draft to published.
+ # once form data is published, it will never be changed back to draft
+
+ # Purging
+ # draft form will be purged regularly
+
def index
- @table = evaluation_table
+ form_key = generate_unique_form_key
+ # Auto create a draft
+ ev = Evaluation.new(evaluation_params.merge(form_key: form_key))
+ ev.form_status = :draft
+ if ev.save
+ redirect_to evaluation_show_path(ev.form_key), notice: 'Draft evaluation was successfully created.'
+ else
+ # Handle errors (e.g., re-render the form with errors)
+ render_internal_server_error
+ end
end
def show()
@form = Evaluation.find_by(form_key: params[:form_key])
if @form
- @table = evaluation_table(@form)
+ form_key = params[:form_key]
+ @table = evaluation_table(@form, form_key)
else
render_not_found
end
@@ -26,9 +49,21 @@ def save()
return # Prevent further execution
end
end
-
+ ev.form_status = :published
if ev.save
- redirect_to evaluation_show_path(ev.form_key), notice: 'Evaluation was successfully created.'
+ @table = evaluation_table(ev, form_key)
+ respond_to do |format|
+ format.turbo_stream {
+ render turbo_stream:
+ turbo_stream
+ .replace("evaluation_form",
+ partial: "form_table",
+ locals: { table: @table })
+ }
+ format.html {
+ redirect_to evaluation_show_path(ev.form_key), notice: 'Evaluation was successfully created.'
+ }
+ end
else
# Handle errors (e.g., re-render the form with errors)
render_internal_server_error
@@ -41,8 +76,12 @@ def load_form_value(cell, form_data)
cell[:value] = form_data[cell[:key]]
end
- def evaluation_table(form_data = nil)
+ def evaluation_table(form_data = nil, form_key = nil)
+ default_table_title = Date.today.strftime("%B %d, %Y")
table = {
+ :form_key => form_key ? form_key : "",
+ :form_status => :draft,
+ :title => "Untitled - #{default_table_title}",
:col_headers => [ "Initial", "Managed", "Defined", "Qualitatively Managed", "Optimizing" ],
:row_headers => [ "Culture & Organization", "Build & Deploy", "Release", "Data Management", "Test & Verification", "Information & Reporting" ],
:rows => [
@@ -550,7 +589,7 @@ def evaluation_table(form_data = nil)
end
end
end
-
+
table
end
@@ -630,8 +669,10 @@ def evaluation_form
end
def evaluation_params
+ # Do not put form_status here to prevent status injection.
params.permit(
:form_key, # Make sure to permit form_key
+ :title,
*evaluation_form
)
end
diff --git a/cdmm/app/javascript/controllers/auto_submit_controller.js b/cdmm/app/javascript/controllers/auto_submit_controller.js
new file mode 100644
index 0000000..9e67416
--- /dev/null
+++ b/cdmm/app/javascript/controllers/auto_submit_controller.js
@@ -0,0 +1,29 @@
+import { Controller } from "@hotwired/stimulus"
+import { useDebounce } from 'stimulus-use'
+
+// Connects to data-controller="auto-submit"
+export default class extends Controller {
+ static targets = [ 'savingIcon', 'savedIcon' ];
+ static debounces = [ 'submit' ];
+
+ connect() {
+ useDebounce(this, { wait: 2500 });
+ this.savedIconTarget.classList.add('hidden');
+ this.savingIconTarget.classList.add('hidden');
+ }
+
+ dirty(event) {
+ event.preventDefault()
+ this.savingIconTarget.classList.add('hidden');
+ this.savedIconTarget.classList.add('hidden');
+ }
+
+ submit(event) {
+ event.preventDefault()
+ this.savingIconTarget.classList.remove('hidden');
+ this.savedIconTarget.classList.add('hidden');
+ this.element.requestSubmit();
+ this.savingIconTarget.classList.add('hidden');
+ this.savedIconTarget.classList.remove('hidden');
+ }
+}
diff --git a/cdmm/app/javascript/controllers/page_capture_controller.js b/cdmm/app/javascript/controllers/page_capture_controller.js
deleted file mode 100644
index 54161e8..0000000
--- a/cdmm/app/javascript/controllers/page_capture_controller.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Controller } from "@hotwired/stimulus"
-import html2canvas from "html2canvas";
-
-// Connects to data-controller="page-capture"
-export default class extends Controller {
- static targets = [ 'table' ];
-
- connect() {
- }
-
- capture() {
- window.scrollTo(0, 0);
- html2canvas(this.tableTarget).then(function (canvas) {
- const screenshot = canvas.toDataURL("image/png");
- const downloadLink = document.createElement('a');
- downloadLink.download = 'canvas_image.png';
- downloadLink.href = screenshot;
- downloadLink.click();
- });
- }
-}
diff --git a/cdmm/app/javascript/controllers/tristate_checkbox_controller.js b/cdmm/app/javascript/controllers/tristate_checkbox_controller.js
index 1e02675..82ddfa4 100644
--- a/cdmm/app/javascript/controllers/tristate_checkbox_controller.js
+++ b/cdmm/app/javascript/controllers/tristate_checkbox_controller.js
@@ -3,7 +3,7 @@ import { Controller } from "@hotwired/stimulus"
// Connects to data-controller="tristate-checkbox"
export default class extends Controller {
static targets = [ "unchecked", "checked", "inapplicable", "value" ];
- static values = { state: String };
+ static values = { state: String, identifier: String };
connect() {
this.state = this.stateValue || "unchecked";
@@ -21,6 +21,7 @@ export default class extends Controller {
}
}
this.updateView();
+ this.dispatch('toggled', { prefix: this.identifierValue });
}
updateView() {
diff --git a/cdmm/app/views/cdmm/_capability_item.html.erb b/cdmm/app/views/cdmm/_capability_item.html.erb
index d04f212..fbeda01 100644
--- a/cdmm/app/views/cdmm/_capability_item.html.erb
+++ b/cdmm/app/views/cdmm/_capability_item.html.erb
@@ -1,6 +1,6 @@
- <%= render "shared/tristate_checkbox", state: value, identifier: key, event_sensor: "#{key}:triggered" %>
+ <%= render "shared/tristate_checkbox", state: value, input_name: key, event_sensor: "#{key}:triggered", identifier: "capability" %>
<%= label %>
diff --git a/cdmm/app/views/cdmm/_cdmm_form.html.erb b/cdmm/app/views/cdmm/_cdmm_form.html.erb
new file mode 100644
index 0000000..fee8ebd
--- /dev/null
+++ b/cdmm/app/views/cdmm/_cdmm_form.html.erb
@@ -0,0 +1,35 @@
+<%= form_with url: evaluation_save_path, method: :post, data: { controller: "auto-submit", action: "capability:toggled@window->auto-submit#dirty capability:toggled@window->auto-submit#submit", turbo_stream: true } do |form| %>
+ <% if table[:form_key] %>
+
+ <% end %>
+
+
+
+
<%= table[:title] %>
+
+
+
+
+
+
+
+
+
+
+
+
+
Saved
+
+
+
Continuous Delivery Maturity Model
+
+
+ <%= render "form_table", table: table %>
+<% end %>
\ No newline at end of file
diff --git a/cdmm/app/views/cdmm/_form_table.html.erb b/cdmm/app/views/cdmm/_form_table.html.erb
index 726d9a4..b40c506 100644
--- a/cdmm/app/views/cdmm/_form_table.html.erb
+++ b/cdmm/app/views/cdmm/_form_table.html.erb
@@ -1,26 +1,28 @@
-
-
-
-
- <% table[:col_headers].each_with_index do |col_header, col_index| %>
- <%= col_header %>
+<%= turbo_frame_tag "evaluation_form", data: { turbo_cache_control: "no-cache" } do %>
+
+
+
+
+ <% table[:col_headers].each_with_index do |col_header, col_index| %>
+ <%= col_header %>
+ <% end %>
+
+
+
+ <% table[:row_headers].each_with_index do |row_header, row_index| %>
+
+ <%= row_header %>
+ <% table[:col_headers].each_with_index do |col_header, col_index| %>
+
+
+ <% get_data_at(table, row_index, col_index).each_with_index do |data, data_index| %>
+ <%= render :partial => "capability_item", :locals => { key: data[:key], label: data[:label], description: data[:description], value: data[:value] } %>
+ <% end %>
+
+
+ <% end %>
+
<% end %>
-
-
-
- <% table[:row_headers].each_with_index do |row_header, row_index| %>
-
- <%= row_header %>
- <% table[:col_headers].each_with_index do |col_header, col_index| %>
-
-
- <% get_data_at(table, row_index, col_index).each_with_index do |data, data_index| %>
- <%= render :partial => "capability_item", :locals => { key: data[:key], label: data[:label], description: data[:description], value: data[:value] } %>
- <% end %>
-
-
- <% end %>
-
- <% end %>
-
-
\ No newline at end of file
+
+
+<% end %>
\ No newline at end of file
diff --git a/cdmm/app/views/cdmm/index.html.erb b/cdmm/app/views/cdmm/index.html.erb
deleted file mode 100644
index 4d1e647..0000000
--- a/cdmm/app/views/cdmm/index.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-
- <%= form_with url: evaluation_save_path, method: :post, data: { turbo: false } do |form| %>
-
-
Continuous Delivery Maturity Model
-
-
-
-
-
-
-
- <%= render "form_table", table: @table %>
- <% end %>
-
\ No newline at end of file
diff --git a/cdmm/app/views/cdmm/show.html.erb b/cdmm/app/views/cdmm/show.html.erb
index fa38db9..430addf 100644
--- a/cdmm/app/views/cdmm/show.html.erb
+++ b/cdmm/app/views/cdmm/show.html.erb
@@ -1,15 +1,3 @@
- <%= form_with url: evaluation_save_path, method: :post, data: { turbo: false } do |form| %>
-
-
-
Continuous Delivery Maturity Model
-
-
-
-
-
-
-
- <%= render "form_table", table: @table %>
- <% end %>
+ <%= render "cdmm_form", table: @table %>
\ No newline at end of file
diff --git a/cdmm/app/views/shared/_tristate_checkbox.html.erb b/cdmm/app/views/shared/_tristate_checkbox.html.erb
index 0fd856c..ff87a65 100644
--- a/cdmm/app/views/shared/_tristate_checkbox.html.erb
+++ b/cdmm/app/views/shared/_tristate_checkbox.html.erb
@@ -1,5 +1,5 @@
tristate-checkbox#toggle" if defined?(event_sensor) %>" data-tristate-checkbox-state-value="<%= state %>" data-tristate-checkbox-identifier-value="<%= identifier %>">
-
+
diff --git a/cdmm/config/importmap.rb b/cdmm/config/importmap.rb
index 909dfc5..f98081f 100644
--- a/cdmm/config/importmap.rb
+++ b/cdmm/config/importmap.rb
@@ -2,6 +2,7 @@
pin "application"
pin "@hotwired/turbo-rails", to: "turbo.min.js"
-pin "@hotwired/stimulus", to: "stimulus.min.js"
+pin "@hotwired/stimulus", to: "@hotwired--stimulus.js" # @3.2.2
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
pin_all_from "app/javascript/controllers", under: "controllers"
+pin "stimulus-use" # @0.52.2
diff --git a/cdmm/db/migrate/20241022091416_add_form_status.rb b/cdmm/db/migrate/20241022091416_add_form_status.rb
new file mode 100644
index 0000000..9a64bf5
--- /dev/null
+++ b/cdmm/db/migrate/20241022091416_add_form_status.rb
@@ -0,0 +1,6 @@
+class AddFormStatus < ActiveRecord::Migration[7.2]
+ def change
+ add_column :evaluations, :form_status, :string
+ add_index :evaluations, :form_status, unique: false
+ end
+end
diff --git a/cdmm/db/schema.rb b/cdmm/db/schema.rb
index d112a9f..eba9564 100644
--- a/cdmm/db/schema.rb
+++ b/cdmm/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.2].define(version: 2024_10_19_170318) do
+ActiveRecord::Schema[7.2].define(version: 2024_10_22_091416) do
create_table "evaluations", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
@@ -85,6 +85,8 @@
t.string "dynamic_self_service_of_information", default: "unchecked", null: false
t.string "customizable_dashboards", default: "unchecked", null: false
t.string "cross_reference_across_organizational_boundaries", default: "unchecked", null: false
+ t.string "form_status"
t.index ["form_key"], name: "index_evaluation_form_key"
+ t.index ["form_status"], name: "index_evaluations_on_form_status"
end
end
diff --git a/cdmm/vendor/javascript/@hotwired--stimulus.js b/cdmm/vendor/javascript/@hotwired--stimulus.js
new file mode 100644
index 0000000..07dd4a6
--- /dev/null
+++ b/cdmm/vendor/javascript/@hotwired--stimulus.js
@@ -0,0 +1,4 @@
+// @hotwired/stimulus@3.2.2 downloaded from https://ga.jspm.io/npm:@hotwired/stimulus@3.2.2/dist/stimulus.js
+
+class EventListener{constructor(e,t,r){this.eventTarget=e;this.eventName=t;this.eventOptions=r;this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=extendEvent(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort(((e,t)=>{const r=e.index,s=t.index;return rs?1:0}))}}function extendEvent(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:false,stopImmediatePropagation(){this.immediatePropagationStopped=true;t.call(this)}})}}class Dispatcher{constructor(e){this.application=e;this.eventListenerMaps=new Map;this.started=false}start(){if(!this.started){this.started=true;this.eventListeners.forEach((e=>e.connect()))}}stop(){if(this.started){this.started=false;this.eventListeners.forEach((e=>e.disconnect()))}}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((e,t)=>e.concat(Array.from(t.values()))),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=false){this.fetchEventListenerForBinding(e).bindingDisconnected(e);t&&this.clearEventListenersForBinding(e)}handleError(e,t,r={}){this.application.handleError(e,`Error ${t}`,r)}clearEventListenersForBinding(e){const t=this.fetchEventListenerForBinding(e);if(!t.hasBindings()){t.disconnect();this.removeMappedEventListenerFor(e)}}removeMappedEventListenerFor(e){const{eventTarget:t,eventName:r,eventOptions:s}=e;const n=this.fetchEventListenerMapForEventTarget(t);const i=this.cacheKey(r,s);n.delete(i);0==n.size&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:r,eventOptions:s}=e;return this.fetchEventListener(t,r,s)}fetchEventListener(e,t,r){const s=this.fetchEventListenerMapForEventTarget(e);const n=this.cacheKey(t,r);let i=s.get(n);if(!i){i=this.createEventListener(e,t,r);s.set(n,i)}return i}createEventListener(e,t,r){const s=new EventListener(e,t,r);this.started&&s.connect();return s}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);if(!t){t=new Map;this.eventListenerMaps.set(e,t)}return t}cacheKey(e,t){const r=[e];Object.keys(t).sort().forEach((e=>{r.push(`${t[e]?"":"!"}${e}`)}));return r.join(":")}}const e={stop({event:e,value:t}){t&&e.stopPropagation();return true},prevent({event:e,value:t}){t&&e.preventDefault();return true},self({event:e,value:t,element:r}){return!t||r===e.target}};const t=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function parseActionDescriptorString(e){const r=e.trim();const s=r.match(t)||[];let n=s[2];let i=s[3];if(i&&!["keydown","keyup","keypress"].includes(n)){n+=`.${i}`;i=""}return{eventTarget:parseEventTarget(s[4]),eventName:n,eventOptions:s[7]?parseEventOptions(s[7]):{},identifier:s[5],methodName:s[6],keyFilter:s[1]||i}}function parseEventTarget(e){return"window"==e?window:"document"==e?document:void 0}function parseEventOptions(e){return e.split(":").reduce(((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)})),{})}function stringifyEventTarget(e){return e==window?"window":e==document?"document":void 0}function camelize(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}function namespaceCamelize(e){return camelize(e.replace(/--/g,"-").replace(/__/g,"_"))}function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function dasherize(e){return e.replace(/([A-Z])/g,((e,t)=>`-${t.toLowerCase()}`))}function tokenize(e){return e.match(/[^\s]+/g)||[]}function isSomething(e){return null!==e&&void 0!==e}function hasProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const r=["meta","ctrl","alt","shift"];class Action{constructor(e,t,r,s){this.element=e;this.index=t;this.eventTarget=r.eventTarget||e;this.eventName=r.eventName||getDefaultEventNameForElement(e)||error("missing event name");this.eventOptions=r.eventOptions||{};this.identifier=r.identifier||error("missing identifier");this.methodName=r.methodName||error("missing method name");this.keyFilter=r.keyFilter||"";this.schema=s}static forToken(e,t){return new this(e.element,e.index,parseActionDescriptorString(e.content),t)}toString(){const e=this.keyFilter?`.${this.keyFilter}`:"";const t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return false;const t=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,t))return true;const s=t.filter((e=>!r.includes(e)))[0];if(!s)return false;hasProperty(this.keyMappings,s)||error(`contains unknown key filter: ${this.keyFilter}`);return this.keyMappings[s].toLowerCase()!==e.key.toLowerCase()}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return false;const t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){const e={};const t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:r,value:s}of Array.from(this.element.attributes)){const n=r.match(t);const i=n&&n[1];i&&(e[camelize(i)]=typecast(s))}return e}get eventTargetName(){return stringifyEventTarget(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){const[s,n,i,o]=r.map((e=>t.includes(e)));return e.metaKey!==s||e.ctrlKey!==n||e.altKey!==i||e.shiftKey!==o}}const s={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function getDefaultEventNameForElement(e){const t=e.tagName.toLowerCase();if(t in s)return s[t](e)}function error(e){throw new Error(e)}function typecast(e){try{return JSON.parse(e)}catch(t){return e}}class Binding{constructor(e,t){this.context=e;this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){const t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){const{element:t}=this.action;const{actionDescriptorFilters:r}=this.context.application;const{controller:s}=this.context;let n=true;for(const[i,o]of Object.entries(this.eventOptions))if(i in r){const c=r[i];n=n&&c({name:i,value:o,event:e,element:t,controller:s})}return n}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){const{target:t,currentTarget:r}=e;try{this.method.call(this.controller,e);this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:r,action:this.methodName})}catch(t){const{identifier:r,controller:s,element:n,index:i}=this;const o={identifier:r,controller:s,element:n,index:i,event:e};this.context.handleError(t,`invoking action "${this.action}"`,o)}}willBeInvokedByEvent(e){const t=e.target;return!(e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e))&&(!(e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e))&&(this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class ElementObserver{constructor(e,t){this.mutationObserverInit={attributes:true,childList:true,subtree:true};this.element=e;this.started=false;this.delegate=t;this.elements=new Set;this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){if(!this.started){this.started=true;this.mutationObserver.observe(this.element,this.mutationObserverInit);this.refresh()}}pause(e){if(this.started){this.mutationObserver.disconnect();this.started=false}e();if(!this.started){this.mutationObserver.observe(this.element,this.mutationObserverInit);this.started=true}}stop(){if(this.started){this.mutationObserver.takeRecords();this.mutationObserver.disconnect();this.started=false}}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){if("attributes"==e.type)this.processAttributeChange(e.target,e.attributeName);else if("childList"==e.type){this.processRemovedNodes(e.removedNodes);this.processAddedNodes(e.addedNodes)}}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const r of this.matchElementsInTree(e))t.call(this,r)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){if(!this.elements.has(e)&&this.elementIsActive(e)){this.elements.add(e);this.delegate.elementMatched&&this.delegate.elementMatched(e)}}removeElement(e){if(this.elements.has(e)){this.elements.delete(e);this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e)}}}class AttributeObserver{constructor(e,t,r){this.attributeName=t;this.delegate=r;this.elementObserver=new ElementObserver(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[];const r=Array.from(e.querySelectorAll(this.selector));return t.concat(r)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}function add(e,t,r){fetch(e,t).add(r)}function del(e,t,r){fetch(e,t).delete(r);prune(e,t)}function fetch(e,t){let r=e.get(t);if(!r){r=new Set;e.set(t,r)}return r}function prune(e,t){const r=e.get(t);null!=r&&0==r.size&&e.delete(t)}class Multimap{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){const e=Array.from(this.valuesByKey.values());return e.reduce(((e,t)=>e.concat(Array.from(t))),[])}get size(){const e=Array.from(this.valuesByKey.values());return e.reduce(((e,t)=>e+t.size),0)}add(e,t){add(this.valuesByKey,e,t)}delete(e,t){del(this.valuesByKey,e,t)}has(e,t){const r=this.valuesByKey.get(e);return null!=r&&r.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){const t=Array.from(this.valuesByKey.values());return t.some((t=>t.has(e)))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter((([t,r])=>r.has(e))).map((([e,t])=>e))}}class IndexedMultimap extends Multimap{constructor(){super();this.keysByValue=new Map}get values(){return Array.from(this.keysByValue.keys())}add(e,t){super.add(e,t);add(this.keysByValue,t,e)}delete(e,t){super.delete(e,t);del(this.keysByValue,t,e)}hasValue(e){return this.keysByValue.has(e)}getKeysForValue(e){const t=this.keysByValue.get(e);return t?Array.from(t):[]}}class SelectorObserver{constructor(e,t,r,s){this._selector=t;this.details=s;this.elementObserver=new ElementObserver(e,this);this.delegate=r;this.matchesByElement=new Multimap}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e;this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){const{selector:t}=this;if(t){const r=e.matches(t);return this.delegate.selectorMatchElement?r&&this.delegate.selectorMatchElement(e,this.details):r}return false}matchElementsInTree(e){const{selector:t}=this;if(t){const r=this.matchElement(e)?[e]:[];const s=Array.from(e.querySelectorAll(t)).filter((e=>this.matchElement(e)));return r.concat(s)}return[]}elementMatched(e){const{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){const t=this.matchesByElement.getKeysForValue(e);for(const r of t)this.selectorUnmatched(e,r)}elementAttributeChanged(e,t){const{selector:r}=this;if(r){const t=this.matchElement(e);const s=this.matchesByElement.has(r,e);t&&!s?this.selectorMatched(e,r):!t&&s&&this.selectorUnmatched(e,r)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details);this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details);this.matchesByElement.delete(t,e)}}class StringMapObserver{constructor(e,t){this.element=e;this.delegate=t;this.started=false;this.stringMap=new Map;this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){if(!this.started){this.started=true;this.mutationObserver.observe(this.element,{attributes:true,attributeOldValue:true});this.refresh()}}stop(){if(this.started){this.mutationObserver.takeRecords();this.mutationObserver.disconnect();this.started=false}}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const r=this.delegate.getStringMapKeyForAttribute(e);if(null!=r){this.stringMap.has(e)||this.stringMapKeyAdded(r,e);const s=this.element.getAttribute(e);this.stringMap.get(e)!=s&&this.stringMapValueChanged(s,r,t);if(null==s){const t=this.stringMap.get(e);this.stringMap.delete(e);t&&this.stringMapKeyRemoved(r,e,t)}else this.stringMap.set(e,s)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,r){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,r)}stringMapKeyRemoved(e,t,r){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,r)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((e=>e.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class TokenListObserver{constructor(e,t,r){this.attributeObserver=new AttributeObserver(e,t,this);this.delegate=r;this.tokensByElement=new Multimap}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,r]=this.refreshTokensForElement(e);this.tokensUnmatched(t);this.tokensMatched(r)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach((e=>this.tokenMatched(e)))}tokensUnmatched(e){e.forEach((e=>this.tokenUnmatched(e)))}tokenMatched(e){this.delegate.tokenMatched(e);this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e);this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e);const r=this.readTokensForElement(e);const s=zip(t,r).findIndex((([e,t])=>!tokensAreEqual(e,t)));return-1==s?[[],[]]:[t.slice(s),r.slice(s)]}readTokensForElement(e){const t=this.attributeName;const r=e.getAttribute(t)||"";return parseTokenString(r,e,t)}}function parseTokenString(e,t,r){return e.trim().split(/\s+/).filter((e=>e.length)).map(((e,s)=>({element:t,attributeName:r,content:e,index:s})))}function zip(e,t){const r=Math.max(e.length,t.length);return Array.from({length:r},((r,s)=>[e[s],t[s]]))}function tokensAreEqual(e,t){return e&&t&&e.index==t.index&&e.content==t.content}class ValueListObserver{constructor(e,t,r){this.tokenListObserver=new TokenListObserver(e,t,this);this.delegate=r;this.parseResultsByToken=new WeakMap;this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e;const{value:r}=this.fetchParseResultForToken(e);if(r){this.fetchValuesByTokenForElement(t).set(e,r);this.delegate.elementMatchedValue(t,r)}}tokenUnmatched(e){const{element:t}=e;const{value:r}=this.fetchParseResultForToken(e);if(r){this.fetchValuesByTokenForElement(t).delete(e);this.delegate.elementUnmatchedValue(t,r)}}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);if(!t){t=this.parseToken(e);this.parseResultsByToken.set(e,t)}return t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);if(!t){t=new Map;this.valuesByTokenByElement.set(e,t)}return t}parseToken(e){try{const t=this.delegate.parseValueForToken(e);return{value:t}}catch(e){return{error:e}}}}class BindingObserver{constructor(e,t){this.context=e;this.delegate=t;this.bindingsByAction=new Map}start(){if(!this.valueListObserver){this.valueListObserver=new ValueListObserver(this.element,this.actionAttribute,this);this.valueListObserver.start()}}stop(){if(this.valueListObserver){this.valueListObserver.stop();delete this.valueListObserver;this.disconnectAllActions()}}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new Binding(this.context,e);this.bindingsByAction.set(e,t);this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);if(t){this.bindingsByAction.delete(e);this.delegate.bindingDisconnected(t)}}disconnectAllActions(){this.bindings.forEach((e=>this.delegate.bindingDisconnected(e,true)));this.bindingsByAction.clear()}parseValueForToken(e){const t=Action.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class ValueObserver{constructor(e,t){this.context=e;this.receiver=t;this.stringMapObserver=new StringMapObserver(this.element,this);this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start();this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const r=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,r.writer(this.receiver[e]),r.writer(r.defaultValue))}stringMapValueChanged(e,t,r){const s=this.valueDescriptorNameMap[t];if(null!==e){null===r&&(r=s.writer(s.defaultValue));this.invokeChangedCallback(t,e,r)}}stringMapKeyRemoved(e,t,r){const s=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,s.writer(this.receiver[e]),r):this.invokeChangedCallback(e,s.writer(s.defaultValue),r)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:r,writer:s}of this.valueDescriptors)void 0==r||this.controller.data.has(e)||this.invokeChangedCallback(t,s(r),void 0)}invokeChangedCallback(e,t,r){const s=`${e}Changed`;const n=this.receiver[s];if("function"==typeof n){const s=this.valueDescriptorNameMap[e];try{const e=s.reader(t);let i=r;r&&(i=s.reader(r));n.call(this.receiver,e,i)}catch(e){e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${s.name}" - ${e.message}`);throw e}}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map((t=>e[t]))}get valueDescriptorNameMap(){const e={};Object.keys(this.valueDescriptorMap).forEach((t=>{const r=this.valueDescriptorMap[t];e[r.name]=r}));return e}hasValue(e){const t=this.valueDescriptorNameMap[e];const r=`has${capitalize(t.name)}`;return this.receiver[r]}}class TargetObserver{constructor(e,t){this.context=e;this.delegate=t;this.targetsByName=new Multimap}start(){if(!this.tokenListObserver){this.tokenListObserver=new TokenListObserver(this.element,this.attributeName,this);this.tokenListObserver.start()}}stop(){if(this.tokenListObserver){this.disconnectAllTargets();this.tokenListObserver.stop();delete this.tokenListObserver}}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var r;if(!this.targetsByName.has(t,e)){this.targetsByName.add(t,e);null===(r=this.tokenListObserver)||void 0===r?void 0:r.pause((()=>this.delegate.targetConnected(e,t)))}}disconnectTarget(e,t){var r;if(this.targetsByName.has(t,e)){this.targetsByName.delete(t,e);null===(r=this.tokenListObserver)||void 0===r?void 0:r.pause((()=>this.delegate.targetDisconnected(e,t)))}}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function readInheritableStaticArrayValues(e,t){const r=getAncestorsForConstructor(e);return Array.from(r.reduce(((e,r)=>{getOwnStaticArrayValues(r,t).forEach((t=>e.add(t)));return e}),new Set))}function readInheritableStaticObjectPairs(e,t){const r=getAncestorsForConstructor(e);return r.reduce(((e,r)=>{e.push(...getOwnStaticObjectPairs(r,t));return e}),[])}function getAncestorsForConstructor(e){const t=[];while(e){t.push(e);e=Object.getPrototypeOf(e)}return t.reverse()}function getOwnStaticArrayValues(e,t){const r=e[t];return Array.isArray(r)?r:[]}function getOwnStaticObjectPairs(e,t){const r=e[t];return r?Object.keys(r).map((e=>[e,r[e]])):[]}class OutletObserver{constructor(e,t){this.started=false;this.context=e;this.delegate=t;this.outletsByName=new Multimap;this.outletElementsByName=new Multimap;this.selectorObserverMap=new Map;this.attributeObserverMap=new Map}start(){if(!this.started){this.outletDefinitions.forEach((e=>{this.setupSelectorObserverForOutlet(e);this.setupAttributeObserverForOutlet(e)}));this.started=true;this.dependentContexts.forEach((e=>e.refresh()))}}refresh(){this.selectorObserverMap.forEach((e=>e.refresh()));this.attributeObserverMap.forEach((e=>e.refresh()))}stop(){if(this.started){this.started=false;this.disconnectAllOutlets();this.stopSelectorObservers();this.stopAttributeObservers()}}stopSelectorObservers(){if(this.selectorObserverMap.size>0){this.selectorObserverMap.forEach((e=>e.stop()));this.selectorObserverMap.clear()}}stopAttributeObservers(){if(this.attributeObserverMap.size>0){this.attributeObserverMap.forEach((e=>e.stop()));this.attributeObserverMap.clear()}}selectorMatched(e,t,{outletName:r}){const s=this.getOutlet(e,r);s&&this.connectOutlet(s,e,r)}selectorUnmatched(e,t,{outletName:r}){const s=this.getOutletFromMap(e,r);s&&this.disconnectOutlet(s,e,r)}selectorMatchElement(e,{outletName:t}){const r=this.selector(t);const s=this.hasOutlet(e,t);const n=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return!!r&&(s&&n&&e.matches(r))}elementMatchedAttribute(e,t){const r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}elementAttributeValueChanged(e,t){const r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}elementUnmatchedAttribute(e,t){const r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}connectOutlet(e,t,r){var s;if(!this.outletElementsByName.has(r,t)){this.outletsByName.add(r,e);this.outletElementsByName.add(r,t);null===(s=this.selectorObserverMap.get(r))||void 0===s?void 0:s.pause((()=>this.delegate.outletConnected(e,t,r)))}}disconnectOutlet(e,t,r){var s;if(this.outletElementsByName.has(r,t)){this.outletsByName.delete(r,e);this.outletElementsByName.delete(r,t);null===(s=this.selectorObserverMap.get(r))||void 0===s?void 0:s.pause((()=>this.delegate.outletDisconnected(e,t,r)))}}disconnectAllOutlets(){for(const e of this.outletElementsByName.keys)for(const t of this.outletElementsByName.getValuesForKey(e))for(const r of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(r,t,e)}updateSelectorObserverForOutlet(e){const t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){const t=this.selector(e);const r=new SelectorObserver(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,r);r.start()}setupAttributeObserverForOutlet(e){const t=this.attributeNameForOutletName(e);const r=new AttributeObserver(this.scope.element,t,this);this.attributeObserverMap.set(e,r);r.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find((t=>this.attributeNameForOutletName(t)===e))}get outletDependencies(){const e=new Multimap;this.router.modules.forEach((t=>{const r=t.definition.controllerConstructor;const s=readInheritableStaticArrayValues(r,"outlets");s.forEach((r=>e.add(r,t.identifier)))}));return e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const e=this.dependentControllerIdentifiers;return this.router.contexts.filter((t=>e.includes(t.identifier)))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find((t=>t.element===e))}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class Context{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:r,controller:s,element:n}=this;t=Object.assign({identifier:r,controller:s,element:n},t);this.application.logDebugActivity(this.identifier,e,t)};this.module=e;this.scope=t;this.controller=new e.controllerConstructor(this);this.bindingObserver=new BindingObserver(this,this.dispatcher);this.valueObserver=new ValueObserver(this,this.controller);this.targetObserver=new TargetObserver(this,this);this.outletObserver=new OutletObserver(this,this);try{this.controller.initialize();this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start();this.valueObserver.start();this.targetObserver.start();this.outletObserver.start();try{this.controller.connect();this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect();this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop();this.targetObserver.stop();this.valueObserver.stop();this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,r={}){const{identifier:s,controller:n,element:i}=this;r=Object.assign({identifier:s,controller:n,element:i},r);this.application.handleError(e,`Error ${t}`,r)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,r){this.invokeControllerMethod(`${namespaceCamelize(r)}OutletConnected`,e,t)}outletDisconnected(e,t,r){this.invokeControllerMethod(`${namespaceCamelize(r)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){const r=this.controller;"function"==typeof r[e]&&r[e](...t)}}function bless(e){return shadow(e,getBlessedProperties(e))}function shadow(e,t){const r=i(e);const s=getShadowProperties(e.prototype,t);Object.defineProperties(r.prototype,s);return r}function getBlessedProperties(e){const t=readInheritableStaticArrayValues(e,"blessings");return t.reduce(((t,r)=>{const s=r(e);for(const e in s){const r=t[e]||{};t[e]=Object.assign(r,s[e])}return t}),{})}function getShadowProperties(e,t){return n(t).reduce(((r,s)=>{const n=getShadowedDescriptor(e,t,s);n&&Object.assign(r,{[s]:n});return r}),{})}function getShadowedDescriptor(e,t,r){const s=Object.getOwnPropertyDescriptor(e,r);const n=s&&"value"in s;if(!n){const e=Object.getOwnPropertyDescriptor(t,r).value;if(s){e.get=s.get||e.get;e.set=s.set||e.set}return e}}const n=(()=>"function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames)();const i=(()=>{function extendWithReflect(e){function extended(){return Reflect.construct(e,arguments,new.target)}extended.prototype=Object.create(e.prototype,{constructor:{value:extended}});Reflect.setPrototypeOf(extended,e);return extended}function testReflectExtension(){const a=function(){this.a.call(this)};const e=extendWithReflect(a);e.prototype.a=function(){};return new e}try{testReflectExtension();return extendWithReflect}catch(e){return e=>class extended extends e{}}})();function blessDefinition(e){return{identifier:e.identifier,controllerConstructor:bless(e.controllerConstructor)}}class Module{constructor(e,t){this.application=e;this.definition=blessDefinition(t);this.contextsByScope=new WeakMap;this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t);t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);if(t){this.connectedContexts.delete(t);t.disconnect()}}fetchContextForScope(e){let t=this.contextsByScope.get(e);if(!t){t=new Context(this,e);this.contextsByScope.set(e,t)}return t}}class ClassMap{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return tokenize(t)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class DataMap{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const r=this.getAttributeNameForKey(e);this.element.setAttribute(r,t);return this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);this.element.removeAttribute(t);return true}return false}getAttributeNameForKey(e){return`data-${this.identifier}-${dasherize(e)}`}}class Guide{constructor(e){this.warnedKeysByObject=new WeakMap;this.logger=e}warn(e,t,r){let s=this.warnedKeysByObject.get(e);if(!s){s=new Set;this.warnedKeysByObject.set(e,s)}if(!s.has(t)){s.add(t);this.logger.warn(r,e)}}}function attributeValueContainsToken(e,t){return`[${e}~="${t}"]`}class TargetSet{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)]),[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){const t=this.schema.targetAttributeForScope(this.identifier);return attributeValueContainsToken(t,e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map((t=>this.deprecate(t,e)))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return attributeValueContainsToken(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:r}=this;const s=this.schema.targetAttribute;const n=this.schema.targetAttributeForScope(r);this.guide.warn(e,`target:${t}`,`Please replace ${s}="${r}.${t}" with ${n}="${t}". The ${s} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class OutletSet{constructor(e,t){this.scope=e;this.controllerElement=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findOutlet(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllOutlets(t)]),[])}getSelectorForOutletName(e){const t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){const t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){const t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){const r=this.scope.queryElements(e);return r.filter((r=>this.matchesElement(r,e,t)))[0]}findAllElements(e,t){const r=this.scope.queryElements(e);return r.filter((r=>this.matchesElement(r,e,t)))}matchesElement(e,t,r){const s=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&s.split(" ").includes(r)}}class Scope{constructor(e,t,r,s){this.targets=new TargetSet(this);this.classes=new ClassMap(this);this.data=new DataMap(this);this.containsElement=e=>e.closest(this.controllerSelector)===this.element;this.schema=e;this.element=t;this.identifier=r;this.guide=new Guide(s);this.outlets=new OutletSet(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return attributeValueContainsToken(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new Scope(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class ScopeObserver{constructor(e,t,r){this.element=e;this.schema=t;this.delegate=r;this.valueListObserver=new ValueListObserver(this.element,this.controllerAttribute,this);this.scopesByIdentifierByElement=new WeakMap;this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:r}=e;return this.parseValueForElementAndIdentifier(t,r)}parseValueForElementAndIdentifier(e,t){const r=this.fetchScopesByIdentifierForElement(e);let s=r.get(t);if(!s){s=this.delegate.createScopeForElementAndIdentifier(e,t);r.set(t,s)}return s}elementMatchedValue(e,t){const r=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,r);1==r&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const r=this.scopeReferenceCounts.get(t);if(r){this.scopeReferenceCounts.set(t,r-1);1==r&&this.delegate.scopeDisconnected(t)}}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);if(!t){t=new Map;this.scopesByIdentifierByElement.set(e,t)}return t}}class Router{constructor(e){this.application=e;this.scopeObserver=new ScopeObserver(this.element,this.schema,this);this.scopesByIdentifier=new Multimap;this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((e,t)=>e.concat(t.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new Module(this.application,e);this.connectModule(t);const r=e.controllerConstructor.afterLoad;r&&r.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const r=this.modulesByIdentifier.get(t);if(r)return r.contexts.find((t=>t.element==e))}proposeToConnectScopeForElementAndIdentifier(e,t){const r=this.scopeObserver.parseValueForElementAndIdentifier(e,t);r?this.scopeObserver.elementMatchedValue(r.element,r):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,r){this.application.handleError(e,t,r)}createScopeForElementAndIdentifier(e,t){return new Scope(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);const t=this.scopesByIdentifier.getValuesForKey(e.identifier);t.forEach((t=>e.connectContextForScope(t)))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);const t=this.scopesByIdentifier.getValuesForKey(e.identifier);t.forEach((t=>e.disconnectContextForScope(t)))}}const o={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},objectFromEntries("abcdefghijklmnopqrstuvwxyz".split("").map((e=>[e,e])))),objectFromEntries("0123456789".split("").map((e=>[e,e]))))};function objectFromEntries(e){return e.reduce(((e,[t,r])=>Object.assign(Object.assign({},e),{[t]:r})),{})}class Application{constructor(t=document.documentElement,r=o){this.logger=console;this.debug=false;this.logDebugActivity=(e,t,r={})=>{this.debug&&this.logFormattedMessage(e,t,r)};this.element=t;this.schema=r;this.dispatcher=new Dispatcher(this);this.router=new Router(this);this.actionDescriptorFilters=Object.assign({},e)}static start(e,t){const r=new this(e,t);r.start();return r}async start(){await domReady();this.logDebugActivity("application","starting");this.dispatcher.start();this.router.start();this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping");this.dispatcher.stop();this.router.stop();this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){const r=Array.isArray(e)?e:[e,...t];r.forEach((e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)}))}unload(e,...t){const r=Array.isArray(e)?e:[e,...t];r.forEach((e=>this.router.unloadIdentifier(e)))}get controllers(){return this.router.contexts.map((e=>e.controller))}getControllerForElementAndIdentifier(e,t){const r=this.router.getContextForElementAndIdentifier(e,t);return r?r.controller:null}handleError(e,t,r){var s;this.logger.error("%s\n\n%o\n\n%o",t,e,r);null===(s=window.onerror)||void 0===s?void 0:s.call(window,t,"",0,0,e)}logFormattedMessage(e,t,r={}){r=Object.assign({application:this},r);this.logger.groupCollapsed(`${e} #${t}`);this.logger.log("details:",Object.assign({},r));this.logger.groupEnd()}}function domReady(){return new Promise((e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>e())):e()}))}function ClassPropertiesBlessing(e){const t=readInheritableStaticArrayValues(e,"classes");return t.reduce(((e,t)=>Object.assign(e,propertiesForClassDefinition(t))),{})}function propertiesForClassDefinition(e){return{[`${e}Class`]:{get(){const{classes:t}=this;if(t.has(e))return t.get(e);{const r=t.getAttributeName(e);throw new Error(`Missing attribute "${r}"`)}}},[`${e}Classes`]:{get(){return this.classes.getAll(e)}},[`has${capitalize(e)}Class`]:{get(){return this.classes.has(e)}}}}function OutletPropertiesBlessing(e){const t=readInheritableStaticArrayValues(e,"outlets");return t.reduce(((e,t)=>Object.assign(e,propertiesForOutletDefinition(t))),{})}function getOutletController(e,t,r){return e.application.getControllerForElementAndIdentifier(t,r)}function getControllerAndEnsureConnectedScope(e,t,r){let s=getOutletController(e,t,r);if(s)return s;e.application.router.proposeToConnectScopeForElementAndIdentifier(t,r);s=getOutletController(e,t,r);return s||void 0}function propertiesForOutletDefinition(e){const t=namespaceCamelize(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e);const r=this.outlets.getSelectorForOutletName(e);if(t){const r=getControllerAndEnsureConnectedScope(this,t,e);if(r)return r;throw new Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${r}".`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map((t=>{const r=getControllerAndEnsureConnectedScope(this,t,e);if(r)return r;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)})).filter((e=>e)):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e);const r=this.outlets.getSelectorForOutletName(e);if(t)return t;throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${r}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${capitalize(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}function TargetPropertiesBlessing(e){const t=readInheritableStaticArrayValues(e,"targets");return t.reduce(((e,t)=>Object.assign(e,propertiesForTargetDefinition(t))),{})}function propertiesForTargetDefinition(e){return{[`${e}Target`]:{get(){const t=this.targets.find(e);if(t)return t;throw new Error(`Missing target element "${e}" for "${this.identifier}" controller`)}},[`${e}Targets`]:{get(){return this.targets.findAll(e)}},[`has${capitalize(e)}Target`]:{get(){return this.targets.has(e)}}}}function ValuePropertiesBlessing(e){const t=readInheritableStaticObjectPairs(e,"values");const r={valueDescriptorMap:{get(){return t.reduce(((e,t)=>{const r=parseValueDefinitionPair(t,this.identifier);const s=this.data.getAttributeNameForKey(r.key);return Object.assign(e,{[s]:r})}),{})}}};return t.reduce(((e,t)=>Object.assign(e,propertiesForValueDefinitionPair(t))),r)}function propertiesForValueDefinitionPair(e,t){const r=parseValueDefinitionPair(e,t);const{key:s,name:n,reader:i,writer:o}=r;return{[n]:{get(){const e=this.data.get(s);return null!==e?i(e):r.defaultValue},set(e){void 0===e?this.data.delete(s):this.data.set(s,o(e))}},[`has${capitalize(n)}`]:{get(){return this.data.has(s)||r.hasCustomDefaultValue}}}}function parseValueDefinitionPair([e,t],r){return valueDescriptorForTokenAndTypeDefinition({controller:r,token:e,typeDefinition:t})}function parseValueTypeConstant(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function parseValueTypeDefault(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}function parseValueTypeObject(e){const{controller:t,token:r,typeObject:s}=e;const n=isSomething(s.type);const i=isSomething(s.default);const o=n&&i;const c=n&&!i;const l=!n&&i;const h=parseValueTypeConstant(s.type);const u=parseValueTypeDefault(e.typeObject.default);if(c)return h;if(l)return u;if(h!==u){const e=t?`${t}.${r}`:r;throw new Error(`The specified default value for the Stimulus Value "${e}" must match the defined type "${h}". The provided default value of "${s.default}" is of type "${u}".`)}return o?h:void 0}function parseValueTypeDefinition(e){const{controller:t,token:r,typeDefinition:s}=e;const n={controller:t,token:r,typeObject:s};const i=parseValueTypeObject(n);const o=parseValueTypeDefault(s);const c=parseValueTypeConstant(s);const l=i||o||c;if(l)return l;const h=t?`${t}.${s}`:r;throw new Error(`Unknown value type "${h}" for "${r}" value`)}function defaultValueForDefinition(e){const t=parseValueTypeConstant(e);if(t)return c[t];const r=hasProperty(e,"default");const s=hasProperty(e,"type");const n=e;if(r)return n.default;if(s){const{type:e}=n;const t=parseValueTypeConstant(e);if(t)return c[t]}return e}function valueDescriptorForTokenAndTypeDefinition(e){const{token:t,typeDefinition:r}=e;const s=`${dasherize(t)}-value`;const n=parseValueTypeDefinition(e);return{type:n,key:s,name:camelize(s),get defaultValue(){return defaultValueForDefinition(r)},get hasCustomDefaultValue(){return void 0!==parseValueTypeDefault(r)},reader:l[n],writer:h[n]||h.default}}const c={get array(){return[]},boolean:false,number:0,get object(){return{}},string:""};const l={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${parseValueTypeDefault(t)}"`);return t},boolean(e){return!("0"==e||"false"==String(e).toLowerCase())},number(e){return Number(e.replace(/_/g,""))},object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${parseValueTypeDefault(t)}"`);return t},string(e){return e}};const h={default:writeString,array:writeJSON,object:writeJSON};function writeJSON(e){return JSON.stringify(e)}function writeString(e){return`${e}`}class Controller{constructor(e){this.context=e}static get shouldLoad(){return true}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:r={},prefix:s=this.identifier,bubbles:n=true,cancelable:i=true}={}){const o=s?`${s}:${e}`:e;const c=new CustomEvent(o,{detail:r,bubbles:n,cancelable:i});t.dispatchEvent(c);return c}}Controller.blessings=[ClassPropertiesBlessing,TargetPropertiesBlessing,ValuePropertiesBlessing,OutletPropertiesBlessing];Controller.targets=[];Controller.outlets=[];Controller.values={};export{Application,AttributeObserver,Context,Controller,ElementObserver,IndexedMultimap,Multimap,SelectorObserver,StringMapObserver,TokenListObserver,ValueListObserver,add,o as defaultSchema,del,fetch,prune};
+
diff --git a/cdmm/vendor/javascript/html2canvas.js b/cdmm/vendor/javascript/html2canvas.js
deleted file mode 100644
index ef64668..0000000
--- a/cdmm/vendor/javascript/html2canvas.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// html2canvas@1.4.1 downloaded from https://ga.jspm.io/npm:html2canvas@1.4.1/dist/html2canvas.js
-
-var A="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var e={};(function(A,t){e=t()})(0,(function(){var extendStatics=function(A,e){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])};return extendStatics(A,e)};function __extends(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){(this||A).constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var __assign=function(){__assign=Object.assign||function __assign(A){for(var e,t=1,r=arguments.length;t0&&n[n.length-1])&&(6===A[0]||2===A[0])){a=0;continue}if(3===A[0]&&(!n||A[1]>n[0]&&A[1]=55296&&B<=56319&&t>10),s%1024+56320)}if(B+1===t||r.length>16384){n+=String.fromCharCode.apply(String,r);r.length=0}}return n};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var r="undefined"===typeof Uint8Array?[]:new Uint8Array(256);for(var B=0;B>4;Q[i++]=(15&r)<<4|B>>2;Q[i++]=(3&B)<<6|63&n}return c};var polyUint16Array$1=function(A){var e=A.length;var t=[];for(var r=0;r>o;var w=1<>o;var C=g+l;var U=C;var F=32;var h=U+F;var d=65536>>i;var f=1<=0){if(e<55296||e>56319&&e<=65535){t=(this||A).index[e>>o];t=(t<>o)];t=(t<>i);t=(this||A).index[t];t+=e>>o&p;t=(this||A).index[t];t=(t<K){B.push(true);s-=K}else B.push(false);if(-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A)){r.push(n);return t.push(N)}if(s===D||s===O){if(0===n){r.push(n);return t.push(rA)}var a=t[n-1];if(-1===IA.indexOf(a)){r.push(r[n-1]);return t.push(a)}r.push(n);return t.push(rA)}r.push(n);if(s===BA)return t.push("strict"===e?_:cA);if(s===lA)return t.push(rA);if(s===tA)return t.push(rA);if(s===CA)return A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(cA):t.push(rA);t.push(s)}));return[r,t,B]};var isAdjacentWithSpaceIgnored=function(A,e,t,r){var B=r[t];if(Array.isArray(A)?-1!==A.indexOf(B):A===B){var n=t;while(n<=r.length){n++;var s=r[n];if(s===e)return true;if(s!==G)break}}if(B===G){n=t;while(n>0){n--;var a=r[n];if(Array.isArray(A)?-1!==A.indexOf(a):A===a){var o=t;while(o<=r.length){o++;s=r[o];if(s===e)return true;if(s!==G)break}}if(a!==G)break}}return false};var previousNonSpaceClassType=function(A,e){var t=A;while(t>=0){var r=e[t];if(r!==G)return r;t--}return 0};var _lineBreakAtIndex=function(A,e,t,r,B){if(0===t[r])return hA;var n=r-1;if(Array.isArray(B)&&true===B[n])return hA;var s=n-1;var a=n+1;var o=e[n];var i=s>=0?e[s]:0;var c=e[a];if(o===L&&c===b)return hA;if(-1!==vA.indexOf(o))return FA;if(-1!==vA.indexOf(c))return hA;if(-1!==HA.indexOf(c))return hA;if(previousNonSpaceClassType(n,e)===T)return dA;if(fA.get(A[n])===O)return hA;if((o===nA||o===sA)&&fA.get(A[a])===O)return hA;if(o===x||c===x)return hA;if(o===M)return hA;if(-1===[G,k,P].indexOf(o)&&c===M)return hA;if(-1!==[X,J,Y,q,eA].indexOf(c))return hA;if(previousNonSpaceClassType(n,e)===Z)return hA;if(isAdjacentWithSpaceIgnored(z,Z,n,e))return hA;if(isAdjacentWithSpaceIgnored([X,J],_,n,e))return hA;if(isAdjacentWithSpaceIgnored(V,V,n,e))return hA;if(o===G)return dA;if(o===z||c===z)return hA;if(c===N||o===N)return dA;if(-1!==[k,P,_].indexOf(c)||o===R)return hA;if(i===iA&&-1!==KA.indexOf(o))return hA;if(o===eA&&c===iA)return hA;if(c===W)return hA;if(-1!==pA.indexOf(c)&&o===j||-1!==pA.indexOf(o)&&c===j)return hA;if(o===AA&&-1!==[cA,nA,sA].indexOf(c)||-1!==[cA,nA,sA].indexOf(o)&&c===$)return hA;if(-1!==pA.indexOf(o)&&-1!==EA.indexOf(c)||-1!==EA.indexOf(o)&&-1!==pA.indexOf(c))return hA;if(-1!==[AA,$].indexOf(o)&&(c===j||-1!==[Z,P].indexOf(c)&&e[a+1]===j)||-1!==[Z,P].indexOf(o)&&c===j||o===j&&-1!==[j,eA,q].indexOf(c))return hA;if(-1!==[j,eA,q,X,J].indexOf(c)){var Q=n;while(Q>=0){var g=e[Q];if(g===j)return hA;if(-1===[eA,q].indexOf(g))break;Q--}}if(-1!==[AA,$].indexOf(c)){Q=-1!==[X,J].indexOf(o)?s:n;while(Q>=0){g=e[Q];if(g===j)return hA;if(-1===[eA,q].indexOf(g))break;Q--}}if(QA===o&&-1!==[QA,gA,aA,oA].indexOf(c)||-1!==[gA,aA].indexOf(o)&&-1!==[gA,wA].indexOf(c)||-1!==[wA,oA].indexOf(o)&&c===wA)return hA;if(-1!==yA.indexOf(o)&&-1!==[W,$].indexOf(c)||-1!==yA.indexOf(c)&&o===AA)return hA;if(-1!==pA.indexOf(o)&&-1!==pA.indexOf(c))return hA;if(o===q&&-1!==pA.indexOf(c))return hA;if(-1!==pA.concat(j).indexOf(o)&&c===Z&&-1===UA.indexOf(A[a])||-1!==pA.concat(j).indexOf(c)&&o===J)return hA;if(o===uA&&c===uA){var w=t[n];var u=1;while(w>0){w--;if(e[w]!==uA)break;u++}if(u%2!==0)return hA}return o===nA&&c===sA?hA:dA};var cssFormattedClasses=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=codePointsToCharacterClasses(A,e.lineBreak),r=t[0],B=t[1],n=t[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(B=B.map((function(A){return-1!==[j,rA,lA].indexOf(A)?cA:A})));var s="keep-all"===e.wordBreak?n.map((function(e,t){return e&&A[t]>=19968&&A[t]<=40959})):void 0;return[r,B,s]};var mA=function(){function Break(e,t,r,B){(this||A).codePoints=e;(this||A).required=t===FA;(this||A).start=r;(this||A).end=B}Break.prototype.slice=function(){return fromCodePoint$1.apply(void 0,(this||A).codePoints.slice((this||A).start,(this||A).end))};return Break}();var LineBreaker=function(A,e){var t=toCodePoints$1(A);var r=cssFormattedClasses(t,e),B=r[0],n=r[1],s=r[2];var a=t.length;var o=0;var i=0;return{next:function(){if(i>=a)return{done:true,value:null};var A=hA;while(i=pe&&A<=57};var isSurrogateCodePoint=function(A){return A>=55296&&A<=57343};var isHex=function(A){return isDigit(A)||A>=Ke&&A<=Le||A>=ve&&A<=Ee};var isLowerCaseLetter=function(A){return A>=ve&&A<=ye};var isUpperCaseLetter=function(A){return A>=Ke&&A<=De};var isLetter=function(A){return isLowerCaseLetter(A)||isUpperCaseLetter(A)};var isNonASCIICodePoint=function(A){return A>=ae};var isWhiteSpace=function(A){return A===xA||A===GA||A===OA};var isNameStartCodePoint=function(A){return isLetter(A)||isNonASCIICodePoint(A)||A===WA};var isNameCodePoint=function(A){return isNameStartCodePoint(A)||isDigit(A)||A===_A};var isNonPrintableCodePoint=function(A){return A>=le&&A<=Ce||A===Ue||A>=Fe&&A<=he||A===de};var isValidEscape=function(A,e){return A===MA&&e!==xA};var isIdentifierStart=function(A,e,t){return A===_A?isNameStartCodePoint(e)||isValidEscape(e,t):!!isNameStartCodePoint(A)||!(A!==MA||!isValidEscape(A,e))};var isNumberStart=function(A,e,t){return A===ce||A===_A?!!isDigit(e)||e===ue&&isDigit(t):isDigit(A===ue?e:A)};var stringToNumber=function(A){var e=0;var t=1;if(A[e]===ce||A[e]===_A){A[e]===_A&&(t=-1);e++}var r=[];while(isDigit(A[e]))r.push(A[e++]);var B=r.length?parseInt(fromCodePoint$1.apply(void 0,r),10):0;A[e]===ue&&e++;var n=[];while(isDigit(A[e]))n.push(A[e++]);var s=n.length;var a=s?parseInt(fromCodePoint$1.apply(void 0,n),10):0;A[e]!==me&&A[e]!==He||e++;var o=1;if(A[e]===ce||A[e]===_A){A[e]===_A&&(o=-1);e++}var i=[];while(isDigit(A[e]))i.push(A[e++]);var c=i.length?parseInt(fromCodePoint$1.apply(void 0,i),10):0;return t*(B+a*Math.pow(10,-s))*Math.pow(10,o*c)};var Se={type:2};var xe={type:3};var Te={type:4};var Me={type:13};var Ge={type:8};var Oe={type:21};var Ve={type:9};var ke={type:10};var Re={type:11};var Pe={type:12};var Ne={type:14};var Xe={type:23};var Je={type:1};var Ye={type:25};var We={type:24};var _e={type:26};var Ze={type:27};var ze={type:28};var qe={type:29};var je={type:31};var $e={type:32};var At=function(){function Tokenizer(){(this||A)._value=[]}Tokenizer.prototype.write=function(e){(this||A)._value=(this||A)._value.concat(toCodePoints$1(e))};Tokenizer.prototype.read=function(){var A=[];var e=this.consumeToken();while(e!==$e){A.push(e);e=this.consumeToken()}return A};Tokenizer.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case VA:return this.consumeStringToken(VA);case RA:var e=this.peekCodePoint(0);var t=this.peekCodePoint(1);var r=this.peekCodePoint(2);if(isNameCodePoint(e)||isValidEscape(t,r)){var B=isIdentifierStart(e,t,r)?bA:LA;var n=this.consumeName();return{type:5,value:n,flags:B}}break;case PA:if(this.peekCodePoint(0)===kA){this.consumeCodePoint();return Me}break;case XA:return this.consumeStringToken(XA);case JA:return Se;case YA:return xe;case ie:if(this.peekCodePoint(0)===kA){this.consumeCodePoint();return Ne}break;case ce:if(isNumberStart(A,this.peekCodePoint(0),this.peekCodePoint(1))){this.reconsumeCodePoint(A);return this.consumeNumericToken()}break;case Qe:return Te;case _A:var s=A;var a=this.peekCodePoint(0);var o=this.peekCodePoint(1);if(isNumberStart(s,a,o)){this.reconsumeCodePoint(A);return this.consumeNumericToken()}if(isIdentifierStart(s,a,o)){this.reconsumeCodePoint(A);return this.consumeIdentLikeToken()}if(a===_A&&o===qA){this.consumeCodePoint();this.consumeCodePoint();return We}break;case ue:if(isNumberStart(A,this.peekCodePoint(0),this.peekCodePoint(1))){this.reconsumeCodePoint(A);return this.consumeNumericToken()}break;case TA:if(this.peekCodePoint(0)===ie){this.consumeCodePoint();while(true){var i=this.consumeCodePoint();if(i===ie){i=this.consumeCodePoint();if(i===TA)return this.consumeToken()}if(i===fe)return this.consumeToken()}}break;case ge:return _e;case we:return Ze;case zA:if(this.peekCodePoint(0)===ZA&&this.peekCodePoint(1)===_A&&this.peekCodePoint(2)===_A){this.consumeCodePoint();this.consumeCodePoint();return Ye}break;case jA:var c=this.peekCodePoint(0);var Q=this.peekCodePoint(1);var g=this.peekCodePoint(2);if(isIdentifierStart(c,Q,g)){n=this.consumeName();return{type:7,value:n}}break;case $A:return ze;case MA:if(isValidEscape(A,this.peekCodePoint(0))){this.reconsumeCodePoint(A);return this.consumeIdentLikeToken()}break;case Ae:return qe;case ee:if(this.peekCodePoint(0)===kA){this.consumeCodePoint();return Ge}break;case te:return Re;case Be:return Pe;case Ie:case be:var w=this.peekCodePoint(0);var u=this.peekCodePoint(1);if(w===ce&&(isHex(u)||u===re)){this.consumeCodePoint();this.consumeUnicodeRangeToken()}this.reconsumeCodePoint(A);return this.consumeIdentLikeToken();case ne:if(this.peekCodePoint(0)===kA){this.consumeCodePoint();return Ve}if(this.peekCodePoint(0)===ne){this.consumeCodePoint();return Oe}break;case se:if(this.peekCodePoint(0)===kA){this.consumeCodePoint();return ke}break;case fe:return $e}if(isWhiteSpace(A)){this.consumeWhiteSpace();return je}if(isDigit(A)){this.reconsumeCodePoint(A);return this.consumeNumericToken()}if(isNameStartCodePoint(A)){this.reconsumeCodePoint(A);return this.consumeIdentLikeToken()}return{type:6,value:fromCodePoint$1(A)}};Tokenizer.prototype.consumeCodePoint=function(){var e=(this||A)._value.shift();return"undefined"===typeof e?-1:e};Tokenizer.prototype.reconsumeCodePoint=function(e){(this||A)._value.unshift(e)};Tokenizer.prototype.peekCodePoint=function(e){return e>=(this||A)._value.length?-1:(this||A)._value[e]};Tokenizer.prototype.consumeUnicodeRangeToken=function(){var A=[];var e=this.consumeCodePoint();while(isHex(e)&&A.length<6){A.push(e);e=this.consumeCodePoint()}var t=false;while(e===re&&A.length<6){A.push(e);e=this.consumeCodePoint();t=true}if(t){var r=parseInt(fromCodePoint$1.apply(void 0,A.map((function(A){return A===re?pe:A}))),16);var B=parseInt(fromCodePoint$1.apply(void 0,A.map((function(A){return A===re?Le:A}))),16);return{type:30,start:r,end:B}}var n=parseInt(fromCodePoint$1.apply(void 0,A),16);if(this.peekCodePoint(0)===_A&&isHex(this.peekCodePoint(1))){this.consumeCodePoint();e=this.consumeCodePoint();var s=[];while(isHex(e)&&s.length<6){s.push(e);e=this.consumeCodePoint()}B=parseInt(fromCodePoint$1.apply(void 0,s),16);return{type:30,start:n,end:B}}return{type:30,start:n,end:n}};Tokenizer.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();if("url"===A.toLowerCase()&&this.peekCodePoint(0)===JA){this.consumeCodePoint();return this.consumeUrlToken()}if(this.peekCodePoint(0)===JA){this.consumeCodePoint();return{type:19,value:A}}return{type:20,value:A}};Tokenizer.prototype.consumeUrlToken=function(){var A=[];this.consumeWhiteSpace();if(this.peekCodePoint(0)===fe)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===XA||e===VA){var t=this.consumeStringToken(this.consumeCodePoint());if(0===t.type){this.consumeWhiteSpace();if(this.peekCodePoint(0)===fe||this.peekCodePoint(0)===YA){this.consumeCodePoint();return{type:22,value:t.value}}}this.consumeBadUrlRemnants();return Xe}while(true){var r=this.consumeCodePoint();if(r===fe||r===YA)return{type:22,value:fromCodePoint$1.apply(void 0,A)};if(isWhiteSpace(r)){this.consumeWhiteSpace();if(this.peekCodePoint(0)===fe||this.peekCodePoint(0)===YA){this.consumeCodePoint();return{type:22,value:fromCodePoint$1.apply(void 0,A)}}this.consumeBadUrlRemnants();return Xe}if(r===VA||r===XA||r===JA||isNonPrintableCodePoint(r)){this.consumeBadUrlRemnants();return Xe}if(r===MA){if(!isValidEscape(r,this.peekCodePoint(0))){this.consumeBadUrlRemnants();return Xe}A.push(this.consumeEscapedCodePoint())}else A.push(r)}};Tokenizer.prototype.consumeWhiteSpace=function(){while(isWhiteSpace(this.peekCodePoint(0)))this.consumeCodePoint()};Tokenizer.prototype.consumeBadUrlRemnants=function(){while(true){var A=this.consumeCodePoint();if(A===YA||A===fe)return;isValidEscape(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}};Tokenizer.prototype.consumeStringSlice=function(e){var t=5e4;var r="";while(e>0){var B=Math.min(t,e);r+=fromCodePoint$1.apply(void 0,(this||A)._value.splice(0,B));e-=B}(this||A)._value.shift();return r};Tokenizer.prototype.consumeStringToken=function(e){var t="";var r=0;do{var B=(this||A)._value[r];if(B===fe||void 0===B||B===e){t+=this.consumeStringSlice(r);return{type:0,value:t}}if(B===xA){(this||A)._value.splice(0,r);return Je}if(B===MA){var n=(this||A)._value[r+1];if(n!==fe&&void 0!==n)if(n===xA){t+=this.consumeStringSlice(r);r=-1;(this||A)._value.shift()}else if(isValidEscape(B,n)){t+=this.consumeStringSlice(r);t+=fromCodePoint$1(this.consumeEscapedCodePoint());r=-1}}r++}while(true)};Tokenizer.prototype.consumeNumber=function(){var A=[];var e=DA;var t=this.peekCodePoint(0);t!==ce&&t!==_A||A.push(this.consumeCodePoint());while(isDigit(this.peekCodePoint(0)))A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(t===ue&&isDigit(r)){A.push(this.consumeCodePoint(),this.consumeCodePoint());e=SA;while(isDigit(this.peekCodePoint(0)))A.push(this.consumeCodePoint())}t=this.peekCodePoint(0);r=this.peekCodePoint(1);var B=this.peekCodePoint(2);if((t===me||t===He)&&((r===ce||r===_A)&&isDigit(B)||isDigit(r))){A.push(this.consumeCodePoint(),this.consumeCodePoint());e=SA;while(isDigit(this.peekCodePoint(0)))A.push(this.consumeCodePoint())}return[stringToNumber(A),e]};Tokenizer.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1];var r=this.peekCodePoint(0);var B=this.peekCodePoint(1);var n=this.peekCodePoint(2);if(isIdentifierStart(r,B,n)){var s=this.consumeName();return{type:15,number:e,flags:t,unit:s}}if(r===NA){this.consumeCodePoint();return{type:16,number:e,flags:t}}return{type:17,number:e,flags:t}};Tokenizer.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(isHex(A)){var e=fromCodePoint$1(A);while(isHex(this.peekCodePoint(0))&&e.length<6)e+=fromCodePoint$1(this.consumeCodePoint());isWhiteSpace(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||isSurrogateCodePoint(t)||t>1114111?oe:t}return A===fe?oe:A};Tokenizer.prototype.consumeName=function(){var A="";while(true){var e=this.consumeCodePoint();if(isNameCodePoint(e))A+=fromCodePoint$1(e);else{if(!isValidEscape(e,this.peekCodePoint(0))){this.reconsumeCodePoint(e);return A}A+=fromCodePoint$1(this.consumeEscapedCodePoint())}}};return Tokenizer}();var et=function(){function Parser(e){(this||A)._tokens=e}Parser.create=function(A){var e=new At;e.write(A);return new Parser(e.read())};Parser.parseValue=function(A){return Parser.create(A).parseComponentValue()};Parser.parseValues=function(A){return Parser.create(A).parseComponentValues()};Parser.prototype.parseComponentValue=function(){var A=this.consumeToken();while(31===A.type)A=this.consumeToken();if(32===A.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(31===A.type);if(32===A.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")};Parser.prototype.parseComponentValues=function(){var A=[];while(true){var e=this.consumeComponentValue();if(32===e.type)return A;A.push(e);A.push()}};Parser.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A};Parser.prototype.consumeSimpleBlock=function(A){var e={type:A,values:[]};var t=this.consumeToken();while(true){if(32===t.type||isEndingTokenFor(t,A))return e;this.reconsumeToken(t);e.values.push(this.consumeComponentValue());t=this.consumeToken()}};Parser.prototype.consumeFunction=function(A){var e={name:A.value,values:[],type:18};while(true){var t=this.consumeToken();if(32===t.type||3===t.type)return e;this.reconsumeToken(t);e.values.push(this.consumeComponentValue())}};Parser.prototype.consumeToken=function(){var e=(this||A)._tokens.shift();return"undefined"===typeof e?$e:e};Parser.prototype.reconsumeToken=function(e){(this||A)._tokens.unshift(e)};return Parser}();var isDimensionToken=function(A){return 15===A.type};var isNumberToken=function(A){return 17===A.type};var isIdentToken=function(A){return 20===A.type};var isStringToken=function(A){return 0===A.type};var isIdentWithValue=function(A,e){return isIdentToken(A)&&A.value===e};var nonWhiteSpace=function(A){return 31!==A.type};var nonFunctionArgSeparator=function(A){return 31!==A.type&&4!==A.type};var parseFunctionArgs=function(A){var e=[];var t=[];A.forEach((function(A){if(4!==A.type)31!==A.type&&t.push(A);else{if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");e.push(t);t=[]}}));t.length&&e.push(t);return e};var isEndingTokenFor=function(A,e){return 11===e&&12===A.type||(28===e&&29===A.type||2===e&&3===A.type)};var isLength=function(A){return 17===A.type||15===A.type};var isLengthPercentage=function(A){return 16===A.type||isLength(A)};var parseLengthPercentageTuple=function(A){return A.length>1?[A[0],A[1]]:[A[0]]};var tt={type:17,number:0,flags:DA};var rt={type:16,number:50,flags:DA};var Bt={type:16,number:100,flags:DA};var getAbsoluteValueForTuple=function(A,e,t){var r=A[0],B=A[1];return[getAbsoluteValue(r,e),getAbsoluteValue("undefined"!==typeof B?B:r,t)]};var getAbsoluteValue=function(A,e){if(16===A.type)return A.number/100*e;if(isDimensionToken(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number};var nt="deg";var st="grad";var at="rad";var ot="turn";var it={name:"angle",parse:function(A,e){if(15===e.type)switch(e.unit){case nt:return Math.PI*e.number/180;case st:return Math.PI/200*e.number;case at:return e.number;case ot:return 2*Math.PI*e.number}throw new Error("Unsupported angle type")}};var isAngle=function(A){return 15===A.type&&(A.unit===nt||A.unit===st||A.unit===at||A.unit===ot)};var parseNamedSide=function(A){var e=A.filter(isIdentToken).map((function(A){return A.value})).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[tt,tt];case"to top":case"bottom":return deg(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[tt,Bt];case"to right":case"left":return deg(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Bt,Bt];case"to bottom":case"top":return deg(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Bt,tt];case"to left":case"right":return deg(270)}return 0};var deg=function(A){return Math.PI*A/180};var ct={name:"color",parse:function(A,e){if(18===e.type){var t=Qt[e.name];if("undefined"===typeof t)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(A,e.values)}if(5===e.type){if(3===e.value.length){var r=e.value.substring(0,1);var B=e.value.substring(1,2);var n=e.value.substring(2,3);return pack(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),1)}if(4===e.value.length){r=e.value.substring(0,1);B=e.value.substring(1,2);n=e.value.substring(2,3);var s=e.value.substring(3,4);return pack(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(6===e.value.length){r=e.value.substring(0,2);B=e.value.substring(2,4);n=e.value.substring(4,6);return pack(parseInt(r,16),parseInt(B,16),parseInt(n,16),1)}if(8===e.value.length){r=e.value.substring(0,2);B=e.value.substring(2,4);n=e.value.substring(4,6);s=e.value.substring(6,8);return pack(parseInt(r,16),parseInt(B,16),parseInt(n,16),parseInt(s,16)/255)}}if(20===e.type){var a=gt[e.value.toUpperCase()];if("undefined"!==typeof a)return a}return gt.TRANSPARENT}};var isTransparent=function(A){return 0===(255&A)};var asString=function(A){var e=255&A;var t=255&A>>8;var r=255&A>>16;var B=255&A>>24;return e<255?"rgba("+B+","+r+","+t+","+e/255+")":"rgb("+B+","+r+","+t+")"};var pack=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0};var getTokenColorValue=function(A,e){if(17===A.type)return A.number;if(16===A.type){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0};var rgb=function(A,e){var t=e.filter(nonFunctionArgSeparator);if(3===t.length){var r=t.map(getTokenColorValue),B=r[0],n=r[1],s=r[2];return pack(B,n,s,1)}if(4===t.length){var a=t.map(getTokenColorValue),o=(B=a[0],n=a[1],s=a[2],a[3]);return pack(B,n,s,o)}return 0};function hue2rgb(A,e,t){t<0&&(t+=1);t>=1&&(t-=1);return t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}var hsl=function(A,e){var t=e.filter(nonFunctionArgSeparator);var r=t[0],B=t[1],n=t[2],s=t[3];var a=(17===r.type?deg(r.number):it.parse(A,r))/(2*Math.PI);var o=isLengthPercentage(B)?B.number/100:0;var i=isLengthPercentage(n)?n.number/100:0;var c="undefined"!==typeof s&&isLengthPercentage(s)?getAbsoluteValue(s,1):1;if(0===o)return pack(255*i,255*i,255*i,1);var Q=i<=.5?i*(o+1):i+o-i*o;var g=2*i-Q;var w=hue2rgb(g,Q,a+1/3);var u=hue2rgb(g,Q,a);var l=hue2rgb(g,Q,a-1/3);return pack(255*w,255*u,255*l,c)};var Qt={hsl:hsl,hsla:hsl,rgb:rgb,rgba:rgb};var parseColor=function(A,e){return ct.parse(A,et.create(e).parseComponentValue())};var gt={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};var wt={name:"background-clip",initialValue:"border-box",prefix:false,type:1,parse:function(A,e){return e.map((function(A){if(isIdentToken(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}};var ut={name:"background-color",initialValue:"transparent",prefix:false,type:3,format:"color"};var parseColorStop=function(A,e){var t=ct.parse(A,e[0]);var r=e[1];return r&&isLengthPercentage(r)?{color:t,stop:r}:{color:t,stop:null}};var processColorStops=function(A,e){var t=A[0];var r=A[A.length-1];null===t.stop&&(t.stop=tt);null===r.stop&&(r.stop=Bt);var B=[];var n=0;for(var s=0;s n?B.push(o):B.push(n);n=o}else B.push(null)}var i=null;for(s=0;sA.optimumDistance)?{optimumCorner:e,optimumDistance:a}:A}),{optimumDistance:B?Infinity:-Infinity,optimumCorner:null}).optimumCorner};var calculateRadius=function(A,e,t,r,B){var n=0;var s=0;switch(A.size){case 0:if(0===A.shape)n=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B));else if(1===A.shape){n=Math.min(Math.abs(e),Math.abs(e-r));s=Math.min(Math.abs(t),Math.abs(t-B))}break;case 2:if(0===A.shape)n=s=Math.min(distance(e,t),distance(e,t-B),distance(e-r,t),distance(e-r,t-B));else if(1===A.shape){var a=Math.min(Math.abs(t),Math.abs(t-B))/Math.min(Math.abs(e),Math.abs(e-r));var o=findCorner(r,B,e,t,true),i=o[0],c=o[1];n=distance(i-e,(c-t)/a);s=a*n}break;case 1:if(0===A.shape)n=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B));else if(1===A.shape){n=Math.max(Math.abs(e),Math.abs(e-r));s=Math.max(Math.abs(t),Math.abs(t-B))}break;case 3:if(0===A.shape)n=s=Math.max(distance(e,t),distance(e,t-B),distance(e-r,t),distance(e-r,t-B));else if(1===A.shape){a=Math.max(Math.abs(t),Math.abs(t-B))/Math.max(Math.abs(e),Math.abs(e-r));var Q=findCorner(r,B,e,t,false);i=Q[0],c=Q[1];n=distance(i-e,(c-t)/a);s=a*n}break}if(Array.isArray(A.size)){n=getAbsoluteValue(A.size[0],r);s=2===A.size.length?getAbsoluteValue(A.size[1],B):n}return[n,s]};var linearGradient=function(A,e){var t=deg(180);var r=[];parseFunctionArgs(e).forEach((function(e,B){if(0===B){var n=e[0];if(20===n.type&&"to"===n.value){t=parseNamedSide(e);return}if(isAngle(n)){t=it.parse(A,n);return}}var s=parseColorStop(A,e);r.push(s)}));return{angle:t,stops:r,type:1}};var prefixLinearGradient=function(A,e){var t=deg(180);var r=[];parseFunctionArgs(e).forEach((function(e,B){if(0===B){var n=e[0];if(20===n.type&&-1!==["top","left","right","bottom"].indexOf(n.value)){t=parseNamedSide(e);return}if(isAngle(n)){t=(it.parse(A,n)+deg(270))%deg(360);return}}var s=parseColorStop(A,e);r.push(s)}));return{angle:t,stops:r,type:1}};var webkitGradient=function(A,e){var t=deg(180);var r=[];var B=1;var n=0;var s=3;var a=[];parseFunctionArgs(e).forEach((function(e,t){var n=e[0];if(0===t){if(isIdentToken(n)&&"linear"===n.value){B=1;return}if(isIdentToken(n)&&"radial"===n.value){B=2;return}}if(18===n.type)if("from"===n.name){var s=ct.parse(A,n.values[0]);r.push({stop:tt,color:s})}else if("to"===n.name){s=ct.parse(A,n.values[0]);r.push({stop:Bt,color:s})}else if("color-stop"===n.name){var a=n.values.filter(nonFunctionArgSeparator);if(2===a.length){s=ct.parse(A,a[1]);var o=a[0];isNumberToken(o)&&r.push({stop:{type:16,number:100*o.number,flags:o.flags},color:s})}}}));return 1===B?{angle:(t+deg(180))%deg(360),stops:r,type:B}:{size:s,shape:n,stops:r,position:a,type:B}};var lt="closest-side";var Ct="farthest-side";var Ut="closest-corner";var Ft="farthest-corner";var ht="circle";var dt="ellipse";var ft="cover";var pt="contain";var radialGradient=function(A,e){var t=0;var r=3;var B=[];var n=[];parseFunctionArgs(e).forEach((function(e,s){var a=true;if(0===s){var o=false;a=e.reduce((function(A,e){if(o)if(isIdentToken(e))switch(e.value){case"center":n.push(rt);return A;case"top":case"left":n.push(tt);return A;case"right":case"bottom":n.push(Bt);return A}else(isLengthPercentage(e)||isLength(e))&&n.push(e);else if(isIdentToken(e))switch(e.value){case ht:t=0;return false;case dt:t=1;return false;case"at":o=true;return false;case lt:r=0;return false;case ft:case Ct:r=1;return false;case pt:case Ut:r=2;return false;case Ft:r=3;return false}else if(isLength(e)||isLengthPercentage(e)){Array.isArray(r)||(r=[]);r.push(e);return false}return A}),a)}if(a){var i=parseColorStop(A,e);B.push(i)}}));return{size:r,shape:t,stops:B,position:n,type:2}};var prefixRadialGradient=function(A,e){var t=0;var r=3;var B=[];var n=[];parseFunctionArgs(e).forEach((function(e,s){var a=true;0===s?a=e.reduce((function(A,e){if(isIdentToken(e))switch(e.value){case"center":n.push(rt);return false;case"top":case"left":n.push(tt);return false;case"right":case"bottom":n.push(Bt);return false}else if(isLengthPercentage(e)||isLength(e)){n.push(e);return false}return A}),a):1===s&&(a=e.reduce((function(A,e){if(isIdentToken(e))switch(e.value){case ht:t=0;return false;case dt:t=1;return false;case pt:case lt:r=0;return false;case Ct:r=1;return false;case Ut:r=2;return false;case ft:case Ft:r=3;return false}else if(isLength(e)||isLengthPercentage(e)){Array.isArray(r)||(r=[]);r.push(e);return false}return A}),a));if(a){var o=parseColorStop(A,e);B.push(o)}}));return{size:r,shape:t,stops:B,position:n,type:2}};var isLinearGradient=function(A){return 1===A.type};var isRadialGradient=function(A){return 2===A.type};var vt={name:"image",parse:function(A,e){if(22===e.type){var t={url:e.value,type:0};A.cache.addImage(e.value);return t}if(18===e.type){var r=Ht[e.name];if("undefined"===typeof r)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return r(A,e.values)}throw new Error("Unsupported image type "+e.type)}};function isSupportedImage(A){return!(20===A.type&&"none"===A.value)&&(18!==A.type||!!Ht[A.name])}var Ht={"linear-gradient":linearGradient,"-moz-linear-gradient":prefixLinearGradient,"-ms-linear-gradient":prefixLinearGradient,"-o-linear-gradient":prefixLinearGradient,"-webkit-linear-gradient":prefixLinearGradient,"radial-gradient":radialGradient,"-moz-radial-gradient":prefixRadialGradient,"-ms-radial-gradient":prefixRadialGradient,"-o-radial-gradient":prefixRadialGradient,"-webkit-radial-gradient":prefixRadialGradient,"-webkit-gradient":webkitGradient};var Et={name:"background-image",initialValue:"none",type:1,prefix:false,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e.filter((function(A){return nonFunctionArgSeparator(A)&&isSupportedImage(A)})).map((function(e){return vt.parse(A,e)}))}};var It={name:"background-origin",initialValue:"border-box",prefix:false,type:1,parse:function(A,e){return e.map((function(A){if(isIdentToken(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}};var yt={name:"background-position",initialValue:"0% 0%",type:1,prefix:false,parse:function(A,e){return parseFunctionArgs(e).map((function(A){return A.filter(isLengthPercentage)})).map(parseLengthPercentageTuple)}};var Kt={name:"background-repeat",initialValue:"repeat",prefix:false,type:1,parse:function(A,e){return parseFunctionArgs(e).map((function(A){return A.filter(isIdentToken).map((function(A){return A.value})).join(" ")})).map(parseBackgroundRepeat)}};var parseBackgroundRepeat=function(A){switch(A){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}};var mt;(function(A){A.AUTO="auto";A.CONTAIN="contain";A.COVER="cover"})(mt||(mt={}));var Lt={name:"background-size",initialValue:"0",prefix:false,type:1,parse:function(A,e){return parseFunctionArgs(e).map((function(A){return A.filter(isBackgroundSizeInfoToken)}))}};var isBackgroundSizeInfoToken=function(A){return isIdentToken(A)||isLengthPercentage(A)};var borderColorForSide=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:false,type:3,format:"color"}};var bt=borderColorForSide("top");var Dt=borderColorForSide("right");var St=borderColorForSide("bottom");var xt=borderColorForSide("left");var borderRadiusForSide=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:false,type:1,parse:function(A,e){return parseLengthPercentageTuple(e.filter(isLengthPercentage))}}};var Tt=borderRadiusForSide("top-left");var Mt=borderRadiusForSide("top-right");var Gt=borderRadiusForSide("bottom-right");var Ot=borderRadiusForSide("bottom-left");var borderStyleForSide=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:false,type:2,parse:function(A,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}};var Vt=borderStyleForSide("top");var kt=borderStyleForSide("right");var Rt=borderStyleForSide("bottom");var Pt=borderStyleForSide("left");var borderWidthForSide=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:false,parse:function(A,e){return isDimensionToken(e)?e.number:0}}};var Nt=borderWidthForSide("top");var Xt=borderWidthForSide("right");var Jt=borderWidthForSide("bottom");var Yt=borderWidthForSide("left");var Wt={name:"color",initialValue:"transparent",prefix:false,type:3,format:"color"};var _t={name:"direction",initialValue:"ltr",prefix:false,type:2,parse:function(A,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}};var Zt={name:"display",initialValue:"inline-block",prefix:false,type:1,parse:function(A,e){return e.filter(isIdentToken).reduce((function(A,e){return A|parseDisplayValue(e.value)}),0)}};var parseDisplayValue=function(A){switch(A){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};var zt={name:"float",initialValue:"none",prefix:false,type:2,parse:function(A,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}};var qt={name:"letter-spacing",initialValue:"0",prefix:false,type:0,parse:function(A,e){return 20===e.type&&"normal"===e.value?0:17===e.type||15===e.type?e.number:0}};var jt;(function(A){A.NORMAL="normal";A.STRICT="strict"})(jt||(jt={}));var $t={name:"line-break",initialValue:"normal",prefix:false,type:2,parse:function(A,e){switch(e){case"strict":return jt.STRICT;case"normal":default:return jt.NORMAL}}};var Ar={name:"line-height",initialValue:"normal",prefix:false,type:4};var computeLineHeight=function(A,e){return isIdentToken(A)&&"normal"===A.value?1.2*e:17===A.type?e*A.number:isLengthPercentage(A)?getAbsoluteValue(A,e):e};var er={name:"list-style-image",initialValue:"none",type:0,prefix:false,parse:function(A,e){return 20===e.type&&"none"===e.value?null:vt.parse(A,e)}};var tr={name:"list-style-position",initialValue:"outside",prefix:false,type:2,parse:function(A,e){switch(e){case"inside":return 0;case"outside":default:return 1}}};var rr={name:"list-style-type",initialValue:"none",prefix:false,type:2,parse:function(A,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}};var marginForSide=function(A){return{name:"margin-"+A,initialValue:"0",prefix:false,type:4}};var Br=marginForSide("top");var nr=marginForSide("right");var sr=marginForSide("bottom");var ar=marginForSide("left");var or={name:"overflow",initialValue:"visible",prefix:false,type:1,parse:function(A,e){return e.filter(isIdentToken).map((function(A){switch(A.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}}))}};var ir={name:"overflow-wrap",initialValue:"normal",prefix:false,type:2,parse:function(A,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}};var paddingForSide=function(A){return{name:"padding-"+A,initialValue:"0",prefix:false,type:3,format:"length-percentage"}};var cr=paddingForSide("top");var Qr=paddingForSide("right");var gr=paddingForSide("bottom");var wr=paddingForSide("left");var ur={name:"text-align",initialValue:"left",prefix:false,type:2,parse:function(A,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}};var lr={name:"position",initialValue:"static",prefix:false,type:2,parse:function(A,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}};var Cr={name:"text-shadow",initialValue:"none",type:1,prefix:false,parse:function(A,e){return 1===e.length&&isIdentWithValue(e[0],"none")?[]:parseFunctionArgs(e).map((function(e){var t={color:gt.TRANSPARENT,offsetX:tt,offsetY:tt,blur:tt};var r=0;for(var B=0;B1?1:0];(this||A).overflowWrap=parse(e,ir,t.overflowWrap);(this||A).paddingTop=parse(e,cr,t.paddingTop);(this||A).paddingRight=parse(e,Qr,t.paddingRight);(this||A).paddingBottom=parse(e,gr,t.paddingBottom);(this||A).paddingLeft=parse(e,wr,t.paddingLeft);(this||A).paintOrder=parse(e,Pr,t.paintOrder);(this||A).position=parse(e,lr,t.position);(this||A).textAlign=parse(e,ur,t.textAlign);(this||A).textDecorationColor=parse(e,mr,null!==(r=t.textDecorationColor)&&void 0!==r?r:t.color);(this||A).textDecorationLine=parse(e,Lr,null!==(B=t.textDecorationLine)&&void 0!==B?B:t.textDecoration);(this||A).textShadow=parse(e,Cr,t.textShadow);(this||A).textTransform=parse(e,Ur,t.textTransform);(this||A).transform=parse(e,Fr,t.transform);(this||A).transformOrigin=parse(e,pr,t.transformOrigin);(this||A).visibility=parse(e,vr,t.visibility);(this||A).webkitTextStrokeColor=parse(e,Nr,t.webkitTextStrokeColor);(this||A).webkitTextStrokeWidth=parse(e,Xr,t.webkitTextStrokeWidth);(this||A).wordBreak=parse(e,Er,t.wordBreak);(this||A).zIndex=parse(e,Ir,t.zIndex)}CSSParsedDeclaration.prototype.isVisible=function(){return(this||A).display>0&&(this||A).opacity>0&&0===(this||A).visibility};CSSParsedDeclaration.prototype.isTransparent=function(){return isTransparent((this||A).backgroundColor)};CSSParsedDeclaration.prototype.isTransformed=function(){return null!==(this||A).transform};CSSParsedDeclaration.prototype.isPositioned=function(){return 0!==(this||A).position};CSSParsedDeclaration.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!(this||A).zIndex.auto};CSSParsedDeclaration.prototype.isFloating=function(){return 0!==(this||A).float};CSSParsedDeclaration.prototype.isInlineLevel=function(){return contains((this||A).display,4)||contains((this||A).display,33554432)||contains((this||A).display,268435456)||contains((this||A).display,536870912)||contains((this||A).display,67108864)||contains((this||A).display,134217728)};return CSSParsedDeclaration}();var Yr=function(){function CSSParsedPseudoDeclaration(e,t){(this||A).content=parse(e,Mr,t.content);(this||A).quotes=parse(e,kr,t.quotes)}return CSSParsedPseudoDeclaration}();var Wr=function(){function CSSParsedCounterDeclaration(e,t){(this||A).counterIncrement=parse(e,Gr,t.counterIncrement);(this||A).counterReset=parse(e,Or,t.counterReset)}return CSSParsedCounterDeclaration}();var parse=function(A,e,t){var r=new At;var B=null!==t&&"undefined"!==typeof t?t.toString():e.initialValue;r.write(B);var n=new et(r.read());switch(e.type){case 2:var s=n.parseComponentValue();return e.parse(A,isIdentToken(s)?s.value:e.initialValue);case 0:return e.parse(A,n.parseComponentValue());case 1:return e.parse(A,n.parseComponentValues());case 4:return n.parseComponentValue();case 3:switch(e.format){case"angle":return it.parse(A,n.parseComponentValue());case"color":return ct.parse(A,n.parseComponentValue());case"image":return vt.parse(A,n.parseComponentValue());case"length":var a=n.parseComponentValue();return isLength(a)?a:tt;case"length-percentage":var o=n.parseComponentValue();return isLengthPercentage(o)?o:tt;case"time":return yr.parse(A,n.parseComponentValue())}break}};var _r="data-html2canvas-debug";var getElementDebugType=function(A){var e=A.getAttribute(_r);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}};var isDebugging=function(A,e){var t=getElementDebugType(A);return 1===t||e===t};var Zr=function(){function ElementContainer(e,t){(this||A).context=e;(this||A).textNodes=[];(this||A).elements=[];(this||A).flags=0;if(isDebugging(t,3))debugger;(this||A).styles=new Jr(e,window.getComputedStyle(t,null));if(isHTMLElementNode(t)){(this||A).styles.animationDuration.some((function(A){return A>0}))&&(t.style.animationDuration="0s");null!==(this||A).styles.transform&&(t.style.transform="none")}(this||A).bounds=parseBounds((this||A).context,t);isDebugging(t,4)&&((this||A).flags|=16)}return ElementContainer}();var zr="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BT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IAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMI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AAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=";var qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var jr="undefined"===typeof Uint8Array?[]:new Uint8Array(256);for(var $r=0;$r>4;c[o++]=(15&r)<<4|B>>2;c[o++]=(3&B)<<6|63&n}return i};var polyUint16Array=function(A){var e=A.length;var t=[];for(var r=0;r>AB;var nB=1<>AB;var oB=BB+aB;var iB=oB;var cB=32;var QB=iB+cB;var gB=65536>>eB;var wB=1<=0){if(e<55296||e>56319&&e<=65535){t=(this||A).index[e>>AB];t=(t<>AB)];t=(t<>eB);t=(this||A).index[t];t+=e>>AB&uB;t=(this||A).index[t];t=(t<=55296&&B<=56319&&t>10),s%1024+56320)}if(B+1===t||r.length>16384){n+=String.fromCharCode.apply(String,r);r.length=0}}return n};var SB=createTrieFromBase64(zr);var xB="×";var TB="÷";var codePointToClass=function(A){return SB.get(A)};var _graphemeBreakAtIndex=function(A,e,t){var r=t-2;var B=e[r];var n=e[t-1];var s=e[t];if(n===dB&&s===fB)return xB;if(n===dB||n===fB||n===pB)return TB;if(s===dB||s===fB||s===pB)return TB;if(n===EB&&-1!==[EB,IB,KB,mB].indexOf(s))return xB;if((n===KB||n===IB)&&(s===IB||s===yB))return xB;if((n===mB||n===yB)&&s===yB)return xB;if(s===LB||s===vB)return xB;if(s===HB)return xB;if(n===hB)return xB;if(n===LB&&s===bB){while(B===vB)B=e[--r];if(B===bB)return xB}if(n===DB&&s===DB){var a=0;while(B===DB){a++;B=e[--r]}if(a%2===0)return xB}return TB};var GraphemeBreaker=function(A){var e=toCodePoints(A);var t=e.length;var r=0;var B=0;var n=e.map(codePointToClass);return{next:function(){if(r>=t)return{done:true,value:null};var A=xB;while(rs.x||B.y>s.y;s=B;return 0===e||a}));A.body.removeChild(e);return a};var testCORS=function(){return"undefined"!==typeof(new Image).crossOrigin};var testResponseType=function(){return"string"===typeof(new XMLHttpRequest).responseType};var testSVG=function(A){var e=new Image;var t=A.createElement("canvas");var r=t.getContext("2d");if(!r)return false;e.src="data:image/svg+xml, ";try{r.drawImage(e,0,0);t.toDataURL()}catch(A){return false}return true};var isGreenPixel=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]};var testForeignObject=function(A){var e=A.createElement("canvas");var t=100;e.width=t;e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(false);r.fillStyle="rgb(0, 255, 0)";r.fillRect(0,0,t,t);var B=new Image;var n=e.toDataURL();B.src=n;var s=createForeignObjectSVG(t,t,0,0,B);r.fillStyle="red";r.fillRect(0,0,t,t);return loadSerializedSVG$1(s).then((function(e){r.drawImage(e,0,0);var B=r.getImageData(0,0,t,t).data;r.fillStyle="red";r.fillRect(0,0,t,t);var s=A.createElement("div");s.style.backgroundImage="url("+n+")";s.style.height=t+"px";return isGreenPixel(B)?loadSerializedSVG$1(createForeignObjectSVG(t,t,0,0,s)):Promise.reject(false)})).then((function(A){r.drawImage(A,0,0);return isGreenPixel(r.getImageData(0,0,t,t).data)})).catch((function(){return false}))};var createForeignObjectSVG=function(A,e,t,r,B){var n="http://www.w3.org/2000/svg";var s=document.createElementNS(n,"svg");var a=document.createElementNS(n,"foreignObject");s.setAttributeNS(null,"width",A.toString());s.setAttributeNS(null,"height",e.toString());a.setAttributeNS(null,"width","100%");a.setAttributeNS(null,"height","100%");a.setAttributeNS(null,"x",t.toString());a.setAttributeNS(null,"y",r.toString());a.setAttributeNS(null,"externalResourcesRequired","true");s.appendChild(a);a.appendChild(B);return s};var loadSerializedSVG$1=function(A){return new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)};r.onerror=t;r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))}))};var MB={get SUPPORT_RANGE_BOUNDS(){var A=testRangeBounds(document);Object.defineProperty(MB,"SUPPORT_RANGE_BOUNDS",{value:A});return A},get SUPPORT_WORD_BREAKING(){var A=MB.SUPPORT_RANGE_BOUNDS&&testIOSLineBreak(document);Object.defineProperty(MB,"SUPPORT_WORD_BREAKING",{value:A});return A},get SUPPORT_SVG_DRAWING(){var A=testSVG(document);Object.defineProperty(MB,"SUPPORT_SVG_DRAWING",{value:A});return A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"===typeof Array.from&&"function"===typeof window.fetch?testForeignObject(document):Promise.resolve(false);Object.defineProperty(MB,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A});return A},get SUPPORT_CORS_IMAGES(){var A=testCORS();Object.defineProperty(MB,"SUPPORT_CORS_IMAGES",{value:A});return A},get SUPPORT_RESPONSE_TYPE(){var A=testResponseType();Object.defineProperty(MB,"SUPPORT_RESPONSE_TYPE",{value:A});return A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;Object.defineProperty(MB,"SUPPORT_CORS_XHR",{value:A});return A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!!("undefined"!==typeof Intl&&Intl.Segmenter);Object.defineProperty(MB,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A});return A}};var GB=function(){function TextBounds(e,t){(this||A).text=e;(this||A).bounds=t}return TextBounds}();var parseTextBounds=function(A,t,r,B){var n=breakText(t,r);var s=[];var a=0;n.forEach((function(t){if(r.textDecorationLine.length||t.trim().length>0)if(MB.SUPPORT_RANGE_BOUNDS){var n=createRange(B,a,t.length).getClientRects();if(n.length>1){var o=segmentGraphemes(t);var i=0;o.forEach((function(t){s.push(new GB(t,e.fromDOMRectList(A,createRange(B,i+a,t.length).getClientRects())));i+=t.length}))}else s.push(new GB(t,e.fromDOMRectList(A,n)))}else{var c=B.splitText(t.length);s.push(new GB(t,getWrapperBounds(A,B)));B=c}else MB.SUPPORT_RANGE_BOUNDS||(B=B.splitText(t.length));a+=t.length}));return s};var getWrapperBounds=function(A,t){var r=t.ownerDocument;if(r){var B=r.createElement("html2canvaswrapper");B.appendChild(t.cloneNode(true));var n=t.parentNode;if(n){n.replaceChild(B,t);var s=parseBounds(A,B);B.firstChild&&n.replaceChild(B.firstChild,B);return s}}return e.EMPTY};var createRange=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var B=r.createRange();B.setStart(A,e);B.setEnd(A,e+t);return B};var segmentGraphemes=function(A){if(MB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(A)).map((function(A){return A.segment}))}return splitGraphemes(A)};var segmentWords=function(A,e){if(MB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(A)).map((function(A){return A.segment}))}return breakWords(A,e)};var breakText=function(A,e){return 0!==e.letterSpacing?segmentGraphemes(A):segmentWords(A,e)};var OB=[32,160,4961,65792,65793,4153,4241];var breakWords=function(A,e){var t=LineBreaker(A,{lineBreak:e.lineBreak,wordBreak:"break-word"===e.overflowWrap?"break-word":e.wordBreak});var r=[];var B;var _loop_1=function(){if(B.value){var A=B.value.slice();var e=toCodePoints$1(A);var t="";e.forEach((function(A){if(-1===OB.indexOf(A))t+=fromCodePoint$1(A);else{t.length&&r.push(t);r.push(fromCodePoint$1(A));t=""}}));t.length&&r.push(t)}};while(!(B=t.next()).done)_loop_1();return r};var VB=function(){function TextContainer(e,t,r){(this||A).text=transform(t.data,r.textTransform);(this||A).textBounds=parseTextBounds(e,(this||A).text,r,t)}return TextContainer}();var transform=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(kB,capitalize);case 2:return A.toUpperCase();default:return A}};var kB=/(^|\s|:|-|\(|\))([a-z])/g;var capitalize=function(A,e,t){return A.length>0?e+t.toUpperCase():A};var RB=function(e){__extends(ImageElementContainer,e);function ImageElementContainer(t,r){var B=e.call(this||A,t,r)||this||A;B.src=r.currentSrc||r.src;B.intrinsicWidth=r.naturalWidth;B.intrinsicHeight=r.naturalHeight;B.context.cache.addImage(B.src);return B}return ImageElementContainer}(Zr);var PB=function(e){__extends(CanvasElementContainer,e);function CanvasElementContainer(t,r){var B=e.call(this||A,t,r)||this||A;B.canvas=r;B.intrinsicWidth=r.width;B.intrinsicHeight=r.height;return B}return CanvasElementContainer}(Zr);var NB=function(e){__extends(SVGElementContainer,e);function SVGElementContainer(t,r){var B=e.call(this||A,t,r)||this||A;var n=new XMLSerializer;var s=parseBounds(t,r);r.setAttribute("width",s.width+"px");r.setAttribute("height",s.height+"px");B.svg="data:image/svg+xml,"+encodeURIComponent(n.serializeToString(r));B.intrinsicWidth=r.width.baseVal.value;B.intrinsicHeight=r.height.baseVal.value;B.context.cache.addImage(B.svg);return B}return SVGElementContainer}(Zr);var XB=function(e){__extends(LIElementContainer,e);function LIElementContainer(t,r){var B=e.call(this||A,t,r)||this||A;B.value=r.value;return B}return LIElementContainer}(Zr);var JB=function(e){__extends(OLElementContainer,e);function OLElementContainer(t,r){var B=e.call(this||A,t,r)||this||A;B.start=r.start;B.reversed="boolean"===typeof r.reversed&&true===r.reversed;return B}return OLElementContainer}(Zr);var YB=[{type:15,flags:0,unit:"px",number:3}];var WB=[{type:16,flags:0,number:50}];var reformatInputBounds=function(A){return A.width>A.height?new e(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width0)t.textNodes.push(new VB(A,B,t.styles));else if(isElementNode(B))if(isSlotElement(B)&&B.assignedNodes)B.assignedNodes().forEach((function(e){return parseNodeTree(A,e,t,r)}));else{var s=createContainer(A,B);if(s.styles.isVisible()){createsRealStackingContext(B,s,r)?s.flags|=4:createsStackingContext(s.styles)&&(s.flags|=2);-1!==tn.indexOf(B.tagName)&&(s.flags|=8);t.elements.push(s);B.slot;B.shadowRoot?parseNodeTree(A,B.shadowRoot,s,r):isTextareaElement(B)||isSVGElement(B)||isSelectElement(B)||parseNodeTree(A,B,s,r)}}}};var createContainer=function(A,e){return isImageElement(e)?new RB(A,e):isCanvasElement(e)?new PB(A,e):isSVGElement(e)?new NB(A,e):isLIElement(e)?new XB(A,e):isOLElement(e)?new JB(A,e):isInputElement(e)?new jB(A,e):isSelectElement(e)?new $B(A,e):isTextareaElement(e)?new An(A,e):isIFrameElement(e)?new en(A,e):new Zr(A,e)};var parseTree=function(A,e){var t=createContainer(A,e);t.flags|=4;parseNodeTree(A,e,t,t);return t};var createsRealStackingContext=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||isBodyElement(A)&&t.styles.isTransparent()};var createsStackingContext=function(A){return A.isPositioned()||A.isFloating()};var isTextNode=function(A){return A.nodeType===Node.TEXT_NODE};var isElementNode=function(A){return A.nodeType===Node.ELEMENT_NODE};var isHTMLElementNode=function(A){return isElementNode(A)&&"undefined"!==typeof A.style&&!isSVGElementNode(A)};var isSVGElementNode=function(A){return"object"===typeof A.className};var isLIElement=function(A){return"LI"===A.tagName};var isOLElement=function(A){return"OL"===A.tagName};var isInputElement=function(A){return"INPUT"===A.tagName};var isHTMLElement=function(A){return"HTML"===A.tagName};var isSVGElement=function(A){return"svg"===A.tagName};var isBodyElement=function(A){return"BODY"===A.tagName};var isCanvasElement=function(A){return"CANVAS"===A.tagName};var isVideoElement=function(A){return"VIDEO"===A.tagName};var isImageElement=function(A){return"IMG"===A.tagName};var isIFrameElement=function(A){return"IFRAME"===A.tagName};var isStyleElement=function(A){return"STYLE"===A.tagName};var isScriptElement=function(A){return"SCRIPT"===A.tagName};var isTextareaElement=function(A){return"TEXTAREA"===A.tagName};var isSelectElement=function(A){return"SELECT"===A.tagName};var isSlotElement=function(A){return"SLOT"===A.tagName};var isCustomElement=function(A){return A.tagName.indexOf("-")>0};var rn=function(){function CounterState(){(this||A).counters={}}CounterState.prototype.getCounterValue=function(e){var t=(this||A).counters[e];return t&&t.length?t[t.length-1]:1};CounterState.prototype.getCounterValues=function(e){var t=(this||A).counters[e];return t||[]};CounterState.prototype.pop=function(e){var t=this||A;e.forEach((function(A){return t.counters[A].pop()}))};CounterState.prototype.parse=function(e){var t=this||A;var r=e.counterIncrement;var B=e.counterReset;var n=true;null!==r&&r.forEach((function(A){var e=t.counters[A.counter];if(e&&0!==A.increment){n=false;e.length||e.push(1);e[Math.max(0,e.length-1)]+=A.increment}}));var s=[];n&&B.forEach((function(A){var e=t.counters[A.counter];s.push(A.counter);e||(e=t.counters[A.counter]=[]);e.push(A.reset)}));return s};return CounterState}();var Bn={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]};var nn={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]};var sn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]};var an={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]};var createAdditiveCounter=function(A,e,t,r,B,n){return At?createCounterText(A,B,n.length>0):r.integers.reduce((function(e,t,B){while(A>=t){A-=t;e+=r.values[B]}return e}),"")+n};var createCounterStyleWithSymbolResolver=function(A,e,t,r){var B="";do{t||A--;B=r(A)+B;A/=e}while(A*e>=e);return B};var createCounterStyleFromRange=function(A,e,t,r,B){var n=t-e+1;return(A<0?"-":"")+(createCounterStyleWithSymbolResolver(Math.abs(A),n,r,(function(A){return fromCodePoint$1(Math.floor(A%n)+e)}))+B)};var createCounterStyleFromSymbols=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return createCounterStyleWithSymbolResolver(Math.abs(A),r,false,(function(A){return e[Math.floor(A%r)]}))+t};var on=1;var cn=2;var Qn=4;var gn=8;var createCJKCounter=function(A,e,t,r,B,n){if(A<-9999||A>9999)return createCounterText(A,4,B.length>0);var s=Math.abs(A);var a=B;if(0===s)return e[0]+a;for(var o=0;s>0&&o<=4;o++){var i=s%10;0===i&&contains(n,on)&&""!==a?a=e[i]+a:i>1||1===i&&0===o||1===i&&1===o&&contains(n,cn)||1===i&&1===o&&contains(n,Qn)&&A>100||1===i&&o>1&&contains(n,gn)?a=e[i]+(o>0?t[o-1]:"")+a:1===i&&o>0&&(a=t[o-1]+a);s=Math.floor(s/10)}return(A<0?r:"")+a};var wn="十百千萬";var un="拾佰仟萬";var ln="マイナス";var Cn="마이너스";var createCounterText=function(A,e,t){var r=t?". ":"";var B=t?"、":"";var n=t?", ":"";var s=t?" ":"";switch(e){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var a=createCounterStyleFromRange(A,48,57,true,r);return a.length<4?"0"+a:a;case 4:return createCounterStyleFromSymbols(A,"〇一二三四五六七八九",B);case 6:return createAdditiveCounter(A,1,3999,Bn,3,r).toLowerCase();case 7:return createAdditiveCounter(A,1,3999,Bn,3,r);case 8:return createCounterStyleFromRange(A,945,969,false,r);case 9:return createCounterStyleFromRange(A,97,122,false,r);case 10:return createCounterStyleFromRange(A,65,90,false,r);case 11:return createCounterStyleFromRange(A,1632,1641,true,r);case 12:case 49:return createAdditiveCounter(A,1,9999,nn,3,r);case 35:return createAdditiveCounter(A,1,9999,nn,3,r).toLowerCase();case 13:return createCounterStyleFromRange(A,2534,2543,true,r);case 14:case 30:return createCounterStyleFromRange(A,6112,6121,true,r);case 15:return createCounterStyleFromSymbols(A,"子丑寅卯辰巳午未申酉戌亥",B);case 16:return createCounterStyleFromSymbols(A,"甲乙丙丁戊己庚辛壬癸",B);case 17:case 48:return createCJKCounter(A,"零一二三四五六七八九",wn,"負",B,cn|Qn|gn);case 47:return createCJKCounter(A,"零壹貳參肆伍陸柒捌玖",un,"負",B,on|cn|Qn|gn);case 42:return createCJKCounter(A,"零一二三四五六七八九",wn,"负",B,cn|Qn|gn);case 41:return createCJKCounter(A,"零壹贰叁肆伍陆柒捌玖",un,"负",B,on|cn|Qn|gn);case 26:return createCJKCounter(A,"〇一二三四五六七八九","十百千万",ln,B,0);case 25:return createCJKCounter(A,"零壱弐参四伍六七八九","拾百千万",ln,B,on|cn|Qn);case 31:return createCJKCounter(A,"영일이삼사오육칠팔구","십백천만",Cn,n,on|cn|Qn);case 33:return createCJKCounter(A,"零一二三四五六七八九","十百千萬",Cn,n,0);case 32:return createCJKCounter(A,"零壹貳參四五六七八九","拾百千",Cn,n,on|cn|Qn);case 18:return createCounterStyleFromRange(A,2406,2415,true,r);case 20:return createAdditiveCounter(A,1,19999,an,3,r);case 21:return createCounterStyleFromRange(A,2790,2799,true,r);case 22:return createCounterStyleFromRange(A,2662,2671,true,r);case 22:return createAdditiveCounter(A,1,10999,sn,3,r);case 23:return createCounterStyleFromSymbols(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return createCounterStyleFromSymbols(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return createCounterStyleFromRange(A,3302,3311,true,r);case 28:return createCounterStyleFromSymbols(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",B);case 29:return createCounterStyleFromSymbols(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",B);case 34:return createCounterStyleFromRange(A,3792,3801,true,r);case 37:return createCounterStyleFromRange(A,6160,6169,true,r);case 38:return createCounterStyleFromRange(A,4160,4169,true,r);case 39:return createCounterStyleFromRange(A,2918,2927,true,r);case 40:return createCounterStyleFromRange(A,1776,1785,true,r);case 43:return createCounterStyleFromRange(A,3046,3055,true,r);case 44:return createCounterStyleFromRange(A,3174,3183,true,r);case 45:return createCounterStyleFromRange(A,3664,3673,true,r);case 46:return createCounterStyleFromRange(A,3872,3881,true,r);case 3:default:return createCounterStyleFromRange(A,48,57,true,r)}};var Un="data-html2canvas-ignore";var Fn=function(){function DocumentCloner(e,t,r){(this||A).context=e;(this||A).options=r;(this||A).scrolledElements=[];(this||A).referenceElement=t;(this||A).counters=new rn;(this||A).quoteDepth=0;if(!t.ownerDocument)throw new Error("Cloned element does not have an owner document");(this||A).documentElement=this.cloneNode(t.ownerDocument.documentElement,false)}DocumentCloner.prototype.toIFrame=function(e,t){var r=this||A;var B=createIFrameContainer(e,t);if(!B.contentWindow)return Promise.reject("Unable to find iframe window");var n=e.defaultView.pageXOffset;var s=e.defaultView.pageYOffset;var a=B.contentWindow;var o=a.document;var i=iframeLoader(B).then((function(){return __awaiter(r,void 0,void 0,(function(){var e,r;return __generator(this||A,(function(n){switch(n.label){case 0:(this||A).scrolledElements.forEach(restoreNodeScroll);if(a){a.scrollTo(t.left,t.top);if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==t.top||a.scrollX!==t.left)){(this||A).context.logger.warn("Unable to restore scroll position for cloned document");(this||A).context.windowBounds=(this||A).context.windowBounds.add(a.scrollX-t.left,a.scrollY-t.top,0,0)}}e=(this||A).options.onclone;r=(this||A).clonedReferenceElement;return"undefined"===typeof r?[2,Promise.reject("Error finding the "+(this||A).referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:n.sent();n.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,imagesReady(o)]:[3,4];case 3:n.sent();n.label=4;case 4:return"function"===typeof e?[2,Promise.resolve().then((function(){return e(o,r)})).then((function(){return B}))]:[2,B]}}))}))}));o.open();o.write(serializeDoctype(document.doctype)+"");restoreOwnerScroll((this||A).referenceElement.ownerDocument,n,s);o.replaceChild(o.adoptNode((this||A).documentElement),o.documentElement);o.close();return i};DocumentCloner.prototype.createElementClone=function(A){if(isDebugging(A,2))debugger;if(isCanvasElement(A))return this.createCanvasClone(A);if(isVideoElement(A))return this.createVideoClone(A);if(isStyleElement(A))return this.createStyleClone(A);var e=A.cloneNode(false);if(isImageElement(e)){if(isImageElement(A)&&A.currentSrc&&A.currentSrc!==A.src){e.src=A.currentSrc;e.srcset=""}"lazy"===e.loading&&(e.loading="eager")}return isCustomElement(e)?this.createCustomElementClone(e):e};DocumentCloner.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");copyCSSStyles(A.style,e);return e};DocumentCloner.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var r=[].slice.call(t.cssRules,0).reduce((function(A,e){return e&&"string"===typeof e.cssText?A+e.cssText:A}),"");var B=e.cloneNode(false);B.textContent=r;return B}}catch(e){(this||A).context.logger.error("Unable to access cssRules property",e);if("SecurityError"!==e.name)throw e}return e.cloneNode(false)};DocumentCloner.prototype.createCanvasClone=function(e){var t;if((this||A).options.inlineImages&&e.ownerDocument){var r=e.ownerDocument.createElement("img");try{r.src=e.toDataURL();return r}catch(t){(this||A).context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var B=e.cloneNode(false);try{B.width=e.width;B.height=e.height;var n=e.getContext("2d");var s=B.getContext("2d");if(s)if(!(this||A).options.allowTaint&&n)s.putImageData(n.getImageData(0,0,e.width,e.height),0,0);else{var a=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(a){var o=a.getContextAttributes();false===(null===o||void 0===o?void 0:o.preserveDrawingBuffer)&&(this||A).context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}s.drawImage(e,0,0)}return B}catch(t){(this||A).context.logger.info("Unable to clone canvas as it is tainted",e)}return B};DocumentCloner.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth;t.height=e.offsetHeight;var r=t.getContext("2d");try{if(r){r.drawImage(e,0,0,t.width,t.height);(this||A).options.allowTaint||r.getImageData(0,0,t.width,t.height)}return t}catch(t){(this||A).context.logger.info("Unable to clone video as it is tainted",e)}var B=e.ownerDocument.createElement("canvas");B.width=e.offsetWidth;B.height=e.offsetHeight;return B};DocumentCloner.prototype.appendChildNode=function(e,t,r){isElementNode(t)&&(isScriptElement(t)||t.hasAttribute(Un)||"function"===typeof(this||A).options.ignoreElements&&(this||A).options.ignoreElements(t))||(this||A).options.copyStyles&&isElementNode(t)&&isStyleElement(t)||e.appendChild(this.cloneNode(t,r))};DocumentCloner.prototype.cloneChildNodes=function(e,t,r){var B=this||A;for(var n=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;n;n=n.nextSibling)if(isElementNode(n)&&isSlotElement(n)&&"function"===typeof n.assignedNodes){var s=n.assignedNodes();s.length&&s.forEach((function(A){return B.appendChildNode(t,A,r)}))}else this.appendChildNode(t,n,r)};DocumentCloner.prototype.cloneNode=function(e,t){if(isTextNode(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(false);var r=e.ownerDocument.defaultView;if(r&&isElementNode(e)&&(isHTMLElementNode(e)||isSVGElementNode(e))){var B=this.createElementClone(e);B.style.transitionProperty="none";var n=r.getComputedStyle(e);var s=r.getComputedStyle(e,":before");var a=r.getComputedStyle(e,":after");(this||A).referenceElement===e&&isHTMLElementNode(B)&&((this||A).clonedReferenceElement=B);isBodyElement(B)&&createPseudoHideStyles(B);var o=(this||A).counters.parse(new Wr((this||A).context,n));var i=this.resolvePseudoContent(e,B,s,hn.BEFORE);isCustomElement(e)&&(t=true);isVideoElement(e)||this.cloneChildNodes(e,B,t);i&&B.insertBefore(i,B.firstChild);var c=this.resolvePseudoContent(e,B,a,hn.AFTER);c&&B.appendChild(c);(this||A).counters.pop(o);(n&&((this||A).options.copyStyles||isSVGElementNode(e))&&!isIFrameElement(e)||t)&©CSSStyles(n,B);0===e.scrollTop&&0===e.scrollLeft||(this||A).scrolledElements.push([B,e.scrollLeft,e.scrollTop]);(isTextareaElement(e)||isSelectElement(e))&&(isTextareaElement(B)||isSelectElement(B))&&(B.value=e.value);return B}return e.cloneNode(false)};DocumentCloner.prototype.resolvePseudoContent=function(e,t,r,B){var n=this||A;if(r){var s=r.content;var a=t.ownerDocument;if(a&&s&&"none"!==s&&"-moz-alt-content"!==s&&"none"!==r.display){(this||A).counters.parse(new Wr((this||A).context,r));var o=new Yr((this||A).context,r);var i=a.createElement("html2canvaspseudoelement");copyCSSStyles(r,i);o.content.forEach((function(A){if(0===A.type)i.appendChild(a.createTextNode(A.value));else if(22===A.type){var t=a.createElement("img");t.src=A.value;t.style.opacity="1";i.appendChild(t)}else if(18===A.type){if("attr"===A.name){var r=A.values.filter(isIdentToken);r.length&&i.appendChild(a.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===A.name){var B=A.values.filter(nonFunctionArgSeparator),s=B[0],c=B[1];if(s&&isIdentToken(s)){var Q=n.counters.getCounterValue(s.value);var g=c&&isIdentToken(c)?rr.parse(n.context,c.value):3;i.appendChild(a.createTextNode(createCounterText(Q,g,false)))}}else if("counters"===A.name){var w=A.values.filter(nonFunctionArgSeparator),u=(s=w[0],w[1]);c=w[2];if(s&&isIdentToken(s)){var l=n.counters.getCounterValues(s.value);var C=c&&isIdentToken(c)?rr.parse(n.context,c.value):3;var U=u&&0===u.type?u.value:"";var F=l.map((function(A){return createCounterText(A,C,false)})).join(U);i.appendChild(a.createTextNode(F))}}}else if(20===A.type)switch(A.value){case"open-quote":i.appendChild(a.createTextNode(getQuote(o.quotes,n.quoteDepth++,true)));break;case"close-quote":i.appendChild(a.createTextNode(getQuote(o.quotes,--n.quoteDepth,false)));break;default:i.appendChild(a.createTextNode(A.value))}}));i.className=vn+" "+Hn;var c=B===hn.BEFORE?" "+vn:" "+Hn;isSVGElementNode(t)?t.className.baseValue+=c:t.className+=c;return i}}};DocumentCloner.destroy=function(A){if(A.parentNode){A.parentNode.removeChild(A);return true}return false};return DocumentCloner}();var hn;(function(A){A[A.BEFORE=0]="BEFORE";A[A.AFTER=1]="AFTER"})(hn||(hn={}));var createIFrameContainer=function(A,e){var t=A.createElement("iframe");t.className="html2canvas-container";t.style.visibility="hidden";t.style.position="fixed";t.style.left="-10000px";t.style.top="0px";t.style.border="0";t.width=e.width.toString();t.height=e.height.toString();t.scrolling="no";t.setAttribute(Un,"true");A.body.appendChild(t);return t};var imageReady=function(A){return new Promise((function(e){if(A.complete)e();else if(A.src){A.onload=e;A.onerror=e}else e()}))};var imagesReady=function(A){return Promise.all([].slice.call(A.images,0).map(imageReady))};var iframeLoader=function(A){return new Promise((function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var B=r.document;r.onload=A.onload=function(){r.onload=A.onload=null;var t=setInterval((function(){if(B.body.childNodes.length>0&&"complete"===B.readyState){clearInterval(t);e(A)}}),50)}}))};var dn=["all","d","content"];var copyCSSStyles=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);-1===dn.indexOf(r)&&e.style.setProperty(r,A.getPropertyValue(r))}return e};var serializeDoctype=function(A){var e="";if(A){e+=""}return e};var restoreOwnerScroll=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)};var restoreNodeScroll=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t;e.scrollTop=r};var fn=":before";var pn=":after";var vn="___html2canvas___pseudoelement_before";var Hn="___html2canvas___pseudoelement_after";var En='{\n content: "" !important;\n display: none !important;\n}';var createPseudoHideStyles=function(A){createStyles(A,"."+vn+fn+En+"\n ."+Hn+pn+En)};var createStyles=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e;A.appendChild(r)}};var In=function(){function CacheStorage(){}CacheStorage.getOrigin=function(A){var e=CacheStorage._link;if(!e)return"about:blank";e.href=A;e.href=e.href;return e.protocol+e.hostname+e.port};CacheStorage.isSameOrigin=function(A){return CacheStorage.getOrigin(A)===CacheStorage._origin};CacheStorage.setContext=function(A){CacheStorage._link=A.document.createElement("a");CacheStorage._origin=CacheStorage.getOrigin(A.location.href)};CacheStorage._origin="about:blank";return CacheStorage}();var yn=function(){function Cache(e,t){(this||A).context=e;(this||A)._options=t;(this||A)._cache={}}Cache.prototype.addImage=function(e){var t=Promise.resolve();if(this.has(e))return t;if(isBlobImage(e)||isRenderable(e)){((this||A)._cache[e]=this.loadImage(e)).catch((function(){}));return t}return t};Cache.prototype.match=function(e){return(this||A)._cache[e]};Cache.prototype.loadImage=function(e){return __awaiter(this||A,void 0,void 0,(function(){var t,r,B,n;var s=this||A;return __generator(this||A,(function(a){switch(a.label){case 0:t=In.isSameOrigin(e);r=!isInlineImage(e)&&true===(this||A)._options.useCORS&&MB.SUPPORT_CORS_IMAGES&&!t;B=!isInlineImage(e)&&!t&&!isBlobImage(e)&&"string"===typeof(this||A)._options.proxy&&MB.SUPPORT_CORS_XHR&&!r;if(!t&&false===(this||A)._options.allowTaint&&!isInlineImage(e)&&!isBlobImage(e)&&!B&&!r)return[2];n=e;return B?[4,this.proxy(n)]:[3,2];case 1:n=a.sent();a.label=2;case 2:(this||A).context.logger.debug("Added image "+e.substring(0,256));return[4,new Promise((function(A,e){var t=new Image;t.onload=function(){return A(t)};t.onerror=e;(isInlineBase64Image(n)||r)&&(t.crossOrigin="anonymous");t.src=n;true===t.complete&&setTimeout((function(){return A(t)}),500);s._options.imageTimeout>0&&setTimeout((function(){return e("Timed out ("+s._options.imageTimeout+"ms) loading image")}),s._options.imageTimeout)}))];case 3:return[2,a.sent()]}}))}))};Cache.prototype.has=function(e){return"undefined"!==typeof(this||A)._cache[e]};Cache.prototype.keys=function(){return Promise.resolve(Object.keys((this||A)._cache))};Cache.prototype.proxy=function(e){var t=this||A;var r=(this||A)._options.proxy;if(!r)throw new Error("No proxy defined");var B=e.substring(0,256);return new Promise((function(A,n){var s=MB.SUPPORT_RESPONSE_TYPE?"blob":"text";var a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===s)A(a.response);else{var e=new FileReader;e.addEventListener("load",(function(){return A(e.result)}),false);e.addEventListener("error",(function(A){return n(A)}),false);e.readAsDataURL(a.response)}else n("Failed to proxy resource "+B+" with status code "+a.status)};a.onerror=n;var o=r.indexOf("?")>-1?"&":"?";a.open("GET",""+r+o+"url="+encodeURIComponent(e)+"&responseType="+s);"text"!==s&&a instanceof XMLHttpRequest&&(a.responseType=s);if(t._options.imageTimeout){var i=t._options.imageTimeout;a.timeout=i;a.ontimeout=function(){return n("Timed out ("+i+"ms) proxying "+B)}}a.send()}))};return Cache}();var Kn=/^data:image\/svg\+xml/i;var mn=/^data:image\/.*;base64,/i;var Ln=/^data:image\/.*/i;var isRenderable=function(A){return MB.SUPPORT_SVG_DRAWING||!isSVG(A)};var isInlineImage=function(A){return Ln.test(A)};var isInlineBase64Image=function(A){return mn.test(A)};var isBlobImage=function(A){return"blob"===A.substr(0,4)};var isSVG=function(A){return"svg"===A.substr(-3).toLowerCase()||Kn.test(A)};var bn=function(){function Vector(e,t){(this||A).type=0;(this||A).x=e;(this||A).y=t}Vector.prototype.add=function(e,t){return new Vector((this||A).x+e,(this||A).y+t)};return Vector}();var lerp=function(A,e,t){return new bn(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)};var Dn=function(){function BezierCurve(e,t,r,B){(this||A).type=1;(this||A).start=e;(this||A).startControl=t;(this||A).endControl=r;(this||A).end=B}BezierCurve.prototype.subdivide=function(e,t){var r=lerp((this||A).start,(this||A).startControl,e);var B=lerp((this||A).startControl,(this||A).endControl,e);var n=lerp((this||A).endControl,(this||A).end,e);var s=lerp(r,B,e);var a=lerp(B,n,e);var o=lerp(s,a,e);return t?new BezierCurve((this||A).start,r,s,o):new BezierCurve(o,a,n,(this||A).end)};BezierCurve.prototype.add=function(e,t){return new BezierCurve((this||A).start.add(e,t),(this||A).startControl.add(e,t),(this||A).endControl.add(e,t),(this||A).end.add(e,t))};BezierCurve.prototype.reverse=function(){return new BezierCurve((this||A).end,(this||A).endControl,(this||A).startControl,(this||A).start)};return BezierCurve}();var isBezierCurve=function(A){return 1===A.type};var Sn=function(){function BoundCurves(e){var t=e.styles;var r=e.bounds;var B=getAbsoluteValueForTuple(t.borderTopLeftRadius,r.width,r.height),n=B[0],s=B[1];var a=getAbsoluteValueForTuple(t.borderTopRightRadius,r.width,r.height),o=a[0],i=a[1];var c=getAbsoluteValueForTuple(t.borderBottomRightRadius,r.width,r.height),Q=c[0],g=c[1];var w=getAbsoluteValueForTuple(t.borderBottomLeftRadius,r.width,r.height),u=w[0],l=w[1];var C=[];C.push((n+o)/r.width);C.push((u+Q)/r.width);C.push((s+l)/r.height);C.push((i+g)/r.height);var U=Math.max.apply(Math,C);if(U>1){n/=U;s/=U;o/=U;i/=U;Q/=U;g/=U;u/=U;l/=U}var F=r.width-o;var h=r.height-g;var d=r.width-Q;var f=r.height-l;var p=t.borderTopWidth;var v=t.borderRightWidth;var H=t.borderBottomWidth;var E=t.borderLeftWidth;var I=getAbsoluteValue(t.paddingTop,e.bounds.width);var y=getAbsoluteValue(t.paddingRight,e.bounds.width);var K=getAbsoluteValue(t.paddingBottom,e.bounds.width);var m=getAbsoluteValue(t.paddingLeft,e.bounds.width);(this||A).topLeftBorderDoubleOuterBox=n>0||s>0?getCurvePoints(r.left+E/3,r.top+p/3,n-E/3,s-p/3,xn.TOP_LEFT):new bn(r.left+E/3,r.top+p/3);(this||A).topRightBorderDoubleOuterBox=n>0||s>0?getCurvePoints(r.left+F,r.top+p/3,o-v/3,i-p/3,xn.TOP_RIGHT):new bn(r.left+r.width-v/3,r.top+p/3);(this||A).bottomRightBorderDoubleOuterBox=Q>0||g>0?getCurvePoints(r.left+d,r.top+h,Q-v/3,g-H/3,xn.BOTTOM_RIGHT):new bn(r.left+r.width-v/3,r.top+r.height-H/3);(this||A).bottomLeftBorderDoubleOuterBox=u>0||l>0?getCurvePoints(r.left+E/3,r.top+f,u-E/3,l-H/3,xn.BOTTOM_LEFT):new bn(r.left+E/3,r.top+r.height-H/3);(this||A).topLeftBorderDoubleInnerBox=n>0||s>0?getCurvePoints(r.left+2*E/3,r.top+2*p/3,n-2*E/3,s-2*p/3,xn.TOP_LEFT):new bn(r.left+2*E/3,r.top+2*p/3);(this||A).topRightBorderDoubleInnerBox=n>0||s>0?getCurvePoints(r.left+F,r.top+2*p/3,o-2*v/3,i-2*p/3,xn.TOP_RIGHT):new bn(r.left+r.width-2*v/3,r.top+2*p/3);(this||A).bottomRightBorderDoubleInnerBox=Q>0||g>0?getCurvePoints(r.left+d,r.top+h,Q-2*v/3,g-2*H/3,xn.BOTTOM_RIGHT):new bn(r.left+r.width-2*v/3,r.top+r.height-2*H/3);(this||A).bottomLeftBorderDoubleInnerBox=u>0||l>0?getCurvePoints(r.left+2*E/3,r.top+f,u-2*E/3,l-2*H/3,xn.BOTTOM_LEFT):new bn(r.left+2*E/3,r.top+r.height-2*H/3);(this||A).topLeftBorderStroke=n>0||s>0?getCurvePoints(r.left+E/2,r.top+p/2,n-E/2,s-p/2,xn.TOP_LEFT):new bn(r.left+E/2,r.top+p/2);(this||A).topRightBorderStroke=n>0||s>0?getCurvePoints(r.left+F,r.top+p/2,o-v/2,i-p/2,xn.TOP_RIGHT):new bn(r.left+r.width-v/2,r.top+p/2);(this||A).bottomRightBorderStroke=Q>0||g>0?getCurvePoints(r.left+d,r.top+h,Q-v/2,g-H/2,xn.BOTTOM_RIGHT):new bn(r.left+r.width-v/2,r.top+r.height-H/2);(this||A).bottomLeftBorderStroke=u>0||l>0?getCurvePoints(r.left+E/2,r.top+f,u-E/2,l-H/2,xn.BOTTOM_LEFT):new bn(r.left+E/2,r.top+r.height-H/2);(this||A).topLeftBorderBox=n>0||s>0?getCurvePoints(r.left,r.top,n,s,xn.TOP_LEFT):new bn(r.left,r.top);(this||A).topRightBorderBox=o>0||i>0?getCurvePoints(r.left+F,r.top,o,i,xn.TOP_RIGHT):new bn(r.left+r.width,r.top);(this||A).bottomRightBorderBox=Q>0||g>0?getCurvePoints(r.left+d,r.top+h,Q,g,xn.BOTTOM_RIGHT):new bn(r.left+r.width,r.top+r.height);(this||A).bottomLeftBorderBox=u>0||l>0?getCurvePoints(r.left,r.top+f,u,l,xn.BOTTOM_LEFT):new bn(r.left,r.top+r.height);(this||A).topLeftPaddingBox=n>0||s>0?getCurvePoints(r.left+E,r.top+p,Math.max(0,n-E),Math.max(0,s-p),xn.TOP_LEFT):new bn(r.left+E,r.top+p);(this||A).topRightPaddingBox=o>0||i>0?getCurvePoints(r.left+Math.min(F,r.width-v),r.top+p,F>r.width+v?0:Math.max(0,o-v),Math.max(0,i-p),xn.TOP_RIGHT):new bn(r.left+r.width-v,r.top+p);(this||A).bottomRightPaddingBox=Q>0||g>0?getCurvePoints(r.left+Math.min(d,r.width-E),r.top+Math.min(h,r.height-H),Math.max(0,Q-v),Math.max(0,g-H),xn.BOTTOM_RIGHT):new bn(r.left+r.width-v,r.top+r.height-H);(this||A).bottomLeftPaddingBox=u>0||l>0?getCurvePoints(r.left+E,r.top+Math.min(f,r.height-H),Math.max(0,u-E),Math.max(0,l-H),xn.BOTTOM_LEFT):new bn(r.left+E,r.top+r.height-H);(this||A).topLeftContentBox=n>0||s>0?getCurvePoints(r.left+E+m,r.top+p+I,Math.max(0,n-(E+m)),Math.max(0,s-(p+I)),xn.TOP_LEFT):new bn(r.left+E+m,r.top+p+I);(this||A).topRightContentBox=o>0||i>0?getCurvePoints(r.left+Math.min(F,r.width+E+m),r.top+p+I,F>r.width+E+m?0:o-E+m,i-(p+I),xn.TOP_RIGHT):new bn(r.left+r.width-(v+y),r.top+p+I);(this||A).bottomRightContentBox=Q>0||g>0?getCurvePoints(r.left+Math.min(d,r.width-(E+m)),r.top+Math.min(h,r.height+p+I),Math.max(0,Q-(v+y)),g-(H+K),xn.BOTTOM_RIGHT):new bn(r.left+r.width-(v+y),r.top+r.height-(H+K));(this||A).bottomLeftContentBox=u>0||l>0?getCurvePoints(r.left+E+m,r.top+f,Math.max(0,u-(E+m)),l-(H+K),xn.BOTTOM_LEFT):new bn(r.left+E+m,r.top+r.height-(H+K))}return BoundCurves}();var xn;(function(A){A[A.TOP_LEFT=0]="TOP_LEFT";A[A.TOP_RIGHT=1]="TOP_RIGHT";A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT";A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(xn||(xn={}));var getCurvePoints=function(A,e,t,r,B){var n=(Math.sqrt(2)-1)/3*4;var s=t*n;var a=r*n;var o=A+t;var i=e+r;switch(B){case xn.TOP_LEFT:return new Dn(new bn(A,i),new bn(A,i-a),new bn(o-s,e),new bn(o,e));case xn.TOP_RIGHT:return new Dn(new bn(A,e),new bn(A+s,e),new bn(o,i-a),new bn(o,i));case xn.BOTTOM_RIGHT:return new Dn(new bn(o,e),new bn(o,e+a),new bn(A+s,i),new bn(A,i));case xn.BOTTOM_LEFT:default:return new Dn(new bn(o,i),new bn(o-s,i),new bn(A,e+a),new bn(A,e))}};var calculateBorderBoxPath=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]};var calculateContentBoxPath=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]};var calculatePaddingBoxPath=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]};var Tn=function(){function TransformEffect(e,t,r){(this||A).offsetX=e;(this||A).offsetY=t;(this||A).matrix=r;(this||A).type=0;(this||A).target=6}return TransformEffect}();var Mn=function(){function ClipEffect(e,t){(this||A).path=e;(this||A).target=t;(this||A).type=1}return ClipEffect}();var Gn=function(){function OpacityEffect(e){(this||A).opacity=e;(this||A).type=2;(this||A).target=6}return OpacityEffect}();var isTransformEffect=function(A){return 0===A.type};var isClipEffect=function(A){return 1===A.type};var isOpacityEffect=function(A){return 2===A.type};var equalPath=function(A,e){return A.length===e.length&&A.some((function(A,t){return A===e[t]}))};var transformPath=function(A,e,t,r,B){return A.map((function(A,n){switch(n){case 0:return A.add(e,t);case 1:return A.add(e+r,t);case 2:return A.add(e+r,t+B);case 3:return A.add(e,t+B)}return A}))};var On=function(){function StackingContext(e){(this||A).element=e;(this||A).inlineLevel=[];(this||A).nonInlineLevel=[];(this||A).negativeZIndex=[];(this||A).zeroOrAutoZIndexOrTransformedOrOpacity=[];(this||A).positiveZIndex=[];(this||A).nonPositionedFloats=[];(this||A).nonPositionedInlineLevel=[]}return StackingContext}();var Vn=function(){function ElementPaint(e,t){(this||A).container=e;(this||A).parent=t;(this||A).effects=[];(this||A).curves=new Sn((this||A).container);(this||A).container.styles.opacity<1&&(this||A).effects.push(new Gn((this||A).container.styles.opacity));if(null!==(this||A).container.styles.transform){var r=(this||A).container.bounds.left+(this||A).container.styles.transformOrigin[0].number;var B=(this||A).container.bounds.top+(this||A).container.styles.transformOrigin[1].number;var n=(this||A).container.styles.transform;(this||A).effects.push(new Tn(r,B,n))}if(0!==(this||A).container.styles.overflowX){var s=calculateBorderBoxPath((this||A).curves);var a=calculatePaddingBoxPath((this||A).curves);if(equalPath(s,a))(this||A).effects.push(new Mn(s,6));else{(this||A).effects.push(new Mn(s,2));(this||A).effects.push(new Mn(a,4))}}}ElementPaint.prototype.getEffects=function(e){var t=-1===[2,3].indexOf((this||A).container.styles.position);var r=(this||A).parent;var B=(this||A).effects.slice(0);while(r){var n=r.effects.filter((function(A){return!isClipEffect(A)}));if(t||0!==r.container.styles.position||!r.parent){B.unshift.apply(B,n);t=-1===[2,3].indexOf(r.container.styles.position);if(0!==r.container.styles.overflowX){var s=calculateBorderBoxPath(r.curves);var a=calculatePaddingBoxPath(r.curves);equalPath(s,a)||B.unshift(new Mn(a,6))}}else B.unshift.apply(B,n);r=r.parent}return B.filter((function(A){return contains(A.target,e)}))};return ElementPaint}();var parseStackTree=function(A,e,t,r){A.container.elements.forEach((function(B){var n=contains(B.flags,4);var s=contains(B.flags,2);var a=new Vn(B,A);contains(B.styles.display,2048)&&r.push(a);var o=contains(B.flags,8)?[]:r;if(n||s){var i=n||B.styles.isPositioned()?t:e;var c=new On(a);if(B.styles.isPositioned()||B.styles.opacity<1||B.styles.isTransformed()){var Q=B.styles.zIndex.order;if(Q<0){var g=0;i.negativeZIndex.some((function(A,e){if(Q>A.element.container.styles.zIndex.order){g=e;return false}return g>0}));i.negativeZIndex.splice(g,0,c)}else if(Q>0){var w=0;i.positiveZIndex.some((function(A,e){if(Q>=A.element.container.styles.zIndex.order){w=e+1;return false}return w>0}));i.positiveZIndex.splice(w,0,c)}else i.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else B.styles.isFloating()?i.nonPositionedFloats.push(c):i.nonPositionedInlineLevel.push(c);parseStackTree(a,c,n?c:t,o)}else{B.styles.isInlineLevel()?e.inlineLevel.push(a):e.nonInlineLevel.push(a);parseStackTree(a,e,t,o)}contains(B.flags,8)&&processListItems(B,o)}))};var processListItems=function(A,e){var t=A instanceof JB?A.start:1;var r=A instanceof JB&&A.reversed;for(var B=0;B0&&e.intrinsicHeight>0){var B=contentBox(e);var n=calculatePaddingBoxPath(t);this.path(n);(this||A).ctx.save();(this||A).ctx.clip();(this||A).ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,B.left,B.top,B.width,B.height);(this||A).ctx.restore()}};CanvasRenderer.prototype.renderNodeContent=function(t){return __awaiter(this||A,void 0,void 0,(function(){var r,B,n,s,a,o,i,c,Q,g,w,u,l,C,U,F,h,d,f;return __generator(this||A,(function(p){switch(p.label){case 0:this.applyEffects(t.getEffects(4));r=t.container;B=t.curves;n=r.styles;s=0,a=r.textNodes;p.label=1;case 1:if(!(s0&&H>0){F=B.ctx.createPattern(l,"repeat");B.renderRepeat(d,F,I,y)}}else if(isRadialGradient(r)){h=calculateBackgroundRendering(e,t,[null,null,null]),d=h[0],f=h[1],p=h[2],v=h[3],H=h[4];E=0===r.position.length?[rt]:r.position;I=getAbsoluteValue(E[0],v);y=getAbsoluteValue(E[E.length-1],H);K=calculateRadius(r,I,y,v,H),m=K[0],L=K[1];if(m>0&&L>0){b=B.ctx.createRadialGradient(f+I,p+y,0,f+I,p+y,m);processColorStops(r.stops,2*m).forEach((function(A){return b.addColorStop(A.stop,asString(A.color))}));B.path(d);B.ctx.fillStyle=b;if(m!==L){D=e.bounds.left+.5*e.bounds.width;S=e.bounds.top+.5*e.bounds.height;x=L/m;T=1/x;B.ctx.save();B.ctx.translate(D,S);B.ctx.transform(1,0,0,x,0,0);B.ctx.translate(-D,-S);B.ctx.fillRect(f,T*(p-S)+S,v,H*T);B.ctx.restore()}else B.ctx.fill()}}A.label=6;case 6:t--;return[2]}}))};B=this||A;n=0,s=e.styles.backgroundImage.slice(0).reverse();o.label=1;case 1:if(!(n0?2===i.style?[4,this.renderDashedDottedBorder(i.color,i.width,s,e.curves,2)]:[3,5]:[3,11];case 4:Q.sent();return[3,11];case 5:return 3===i.style?[4,this.renderDashedDottedBorder(i.color,i.width,s,e.curves,3)]:[3,7];case 6:Q.sent();return[3,11];case 7:return 4===i.style?[4,this.renderDoubleBorder(i.color,i.width,s,e.curves)]:[3,9];case 8:Q.sent();return[3,11];case 9:return[4,this.renderSolidBorder(i.color,s,e.curves)];case 10:Q.sent();Q.label=11;case 11:s++;Q.label=12;case 12:a++;return[3,3];case 13:return[2]}}))}))};CanvasRenderer.prototype.renderDashedDottedBorder=function(e,t,r,B,n){return __awaiter(this||A,void 0,void 0,(function(){var s,a,o,i,c,Q,g,w,u,l,C,U,F,h,d,f;return __generator(this||A,(function(p){(this||A).ctx.save();s=parsePathForBorderStroke(B,r);a=parsePathForBorder(B,r);if(2===n){this.path(a);(this||A).ctx.clip()}if(isBezierCurve(a[0])){o=a[0].start.x;i=a[0].start.y}else{o=a[0].x;i=a[0].y}if(isBezierCurve(a[1])){c=a[1].end.x;Q=a[1].end.y}else{c=a[1].x;Q=a[1].y}g=0===r||2===r?Math.abs(o-c):Math.abs(i-Q);(this||A).ctx.beginPath();3===n?this.formatPath(s):this.formatPath(a.slice(0,2));w=t<3?3*t:2*t;u=t<3?2*t:t;if(3===n){w=t;u=t}l=true;if(g<=2*w)l=false;else if(g<=2*w+u){C=g/(2*w+u);w*=C;u*=C}else{U=Math.floor((g+u)/(w+u));F=(g-U*w)/(U-1);h=(g-(U+1)*w)/U;u=h<=0||Math.abs(u-F){const s=e[t];return typeof s=="function"?s:(...e)=>{}};const composeEventName=(e,t,s)=>{let n=e;s===true?n=`${t.identifier}:${e}`:typeof s==="string"&&(n=`${s}:${e}`);return n};const extendedEvent=(e,t,s)=>{const{bubbles:n,cancelable:o,composed:i}=t||{bubbles:true,cancelable:true,composed:true};t&&Object.assign(s,{originalEvent:t});const r=new CustomEvent(e,{bubbles:n,cancelable:o,composed:i,detail:s});return r};function isElementInViewport(e){const t=e.getBoundingClientRect();const s=window.innerHeight||document.documentElement.clientHeight;const n=window.innerWidth||document.documentElement.clientWidth;const o=t.top<=s&&t.top+t.height>0;const i=t.left<=n&&t.left+t.width>0;return o&&i}function camelize(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}function __rest(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols==="function"){var o=0;for(n=Object.getOwnPropertySymbols(e);o{if(this.debug){this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${e}`,"color: #3B82F6","color: unset");this.logger.log(Object.assign({controllerId:this.controllerId},t));this.logger.groupEnd()}};this.warn=e=>{this.logger.warn(`%c${this.controller.identifier} %c${e}`,"color: #3B82F6; font-weight: bold","color: unset")};this.dispatch=(e,t={})=>{if(this.dispatchEvent){const{event:s}=t,n=__rest(t,["event"]);const o=this.extendedEvent(e,s||null,n);this.targetElement.dispatchEvent(o);this.log("dispatchEvent",Object.assign({eventName:o.type},n))}};this.call=(e,t={})=>{const s=this.controller[e];if(typeof s=="function")return s.call(this.controller,t)};this.extendedEvent=(e,t,s)=>{const{bubbles:n,cancelable:o,composed:i}=t||{bubbles:true,cancelable:true,composed:true};t&&Object.assign(s,{originalEvent:t});const r=new CustomEvent(this.composeEventName(e),{bubbles:n,cancelable:o,composed:i,detail:s});return r};this.composeEventName=e=>{let t=e;this.eventPrefix===true?t=`${this.controller.identifier}:${e}`:typeof this.eventPrefix==="string"&&(t=`${this.eventPrefix}:${e}`);return t};this.debug=(o=(n=s===null||s===void 0?void 0:s.debug)!==null&&n!==void 0?n:e.application.stimulusUseDebug)!==null&&o!==void 0?o:t.debug;this.logger=(i=s===null||s===void 0?void 0:s.logger)!==null&&i!==void 0?i:t.logger;this.controller=e;this.controllerId=e.element.id||e.element.dataset.id;this.targetElement=(s===null||s===void 0?void 0:s.element)||e.element;const{dispatchEvent:r,eventPrefix:l}=Object.assign({},t,s);Object.assign(this,{dispatchEvent:r,eventPrefix:l});this.controllerInitialize=e.initialize.bind(e);this.controllerConnect=e.connect.bind(e);this.controllerDisconnect=e.disconnect.bind(e)}}const s={eventPrefix:true,bubbles:true,cancelable:true};class UseDispatch extends StimulusUse{constructor(e,t={}){var n,o,i,r;super(e,t);this.dispatch=(e,t={})=>{const{controller:s,targetElement:n,eventPrefix:o,bubbles:i,cancelable:r,log:l,warn:c}=this;Object.assign(t,{controller:s});const a=composeEventName(e,this.controller,o);const u=new CustomEvent(a,{detail:t,bubbles:i,cancelable:r});n.dispatchEvent(u);c("`useDispatch()` is deprecated. Please use the built-in `this.dispatch()` function from Stimulus. You can find more information on how to upgrade at: https://stimulus-use.github.io/stimulus-use/#/use-dispatch");l("dispatch",{eventName:a,detail:t,bubbles:i,cancelable:r});return u};this.targetElement=(n=t.element)!==null&&n!==void 0?n:e.element;this.eventPrefix=(o=t.eventPrefix)!==null&&o!==void 0?o:s.eventPrefix;this.bubbles=(i=t.bubbles)!==null&&i!==void 0?i:s.bubbles;this.cancelable=(r=t.cancelable)!==null&&r!==void 0?r:s.cancelable;this.enhanceController()}enhanceController(){Object.assign(this.controller,{dispatch:this.dispatch})}}const useDispatch=(e,t={})=>new UseDispatch(e,t);const n={overwriteDispatch:true};const useApplication=(e,t={})=>{const{overwriteDispatch:s}=Object.assign({},n,t);Object.defineProperty(e,"isPreview",{get(){return document.documentElement.hasAttribute("data-turbolinks-preview")||document.documentElement.hasAttribute("data-turbo-preview")}});Object.defineProperty(e,"isConnected",{get(){return!!Array.from(this.context.module.connectedContexts).find((e=>e===this.context))}});Object.defineProperty(e,"csrfToken",{get(){return this.metaValue("csrf-token")}});s&&useDispatch(e,t);Object.assign(e,{metaValue(e){const t=document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")}})};class ApplicationController extends e{constructor(e){super(e);this.isPreview=false;this.isConnected=false;this.csrfToken="";useApplication(this,this.options)}}const o={events:["click","touchend"],onlyVisible:true,dispatchEvent:true,eventPrefix:true};const useClickOutside=(e,t={})=>{const s=e;const{onlyVisible:n,dispatchEvent:i,events:r,eventPrefix:l}=Object.assign({},o,t);const onEvent=e=>{const o=(t===null||t===void 0?void 0:t.element)||s.element;if(!(o.contains(e.target)||!isElementInViewport(o)&&n)){s.clickOutside&&s.clickOutside(e);if(i){const t=composeEventName("click:outside",s,l);const n=extendedEvent(t,e,{controller:s});o.dispatchEvent(n)}}};const observe=()=>{r===null||r===void 0?void 0:r.forEach((e=>{window.addEventListener(e,onEvent,true)}))};const unobserve=()=>{r===null||r===void 0?void 0:r.forEach((e=>{window.removeEventListener(e,onEvent,true)}))};const c=s.disconnect.bind(s);Object.assign(s,{disconnect(){unobserve();c()}});observe();return[observe,unobserve]};class ClickOutsideComposableController extends e{}class ClickOutsideController extends ClickOutsideComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useClickOutside(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class DebounceController extends e{}DebounceController.debounces=[];const i=200;const debounce=(e,t=i)=>{let s=null;return function(){const n=Array.from(arguments);const o=this;const i=n.map((e=>e.params));const callback=()=>{n.forEach(((e,t)=>e.params=i[t]));return e.apply(o,n)};s&&clearTimeout(s);s=setTimeout(callback,t)}};const useDebounce=(e,t)=>{const s=e;const n=s.constructor;n.debounces.forEach((e=>{typeof e==="string"&&(s[e]=debounce(s[e],t===null||t===void 0?void 0:t.wait));if(typeof e==="object"){const{name:n,wait:o}=e;if(!n)return;s[n]=debounce(s[n],o||(t===null||t===void 0?void 0:t.wait))}}))};class UseHover extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{this.targetElement.addEventListener("mouseenter",this.onEnter);this.targetElement.addEventListener("mouseleave",this.onLeave)};this.unobserve=()=>{this.targetElement.removeEventListener("mouseenter",this.onEnter);this.targetElement.removeEventListener("mouseleave",this.onLeave)};this.onEnter=e=>{this.call("mouseEnter",e);this.log("mouseEnter",{hover:true});this.dispatch("mouseEnter",{hover:false})};this.onLeave=e=>{this.call("mouseLeave",e);this.log("mouseLeave",{hover:false});this.dispatch("mouseLeave",{hover:false})};this.controller=e;this.enhanceController();this.observe()}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useHover=(e,t={})=>{const s=e;const n=new UseHover(s,t);return[n.observe,n.unobserve]};class HoverComposableController extends e{}class HoverController extends HoverComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useHover(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const r=["mousemove","mousedown","resize","keydown","touchstart","wheel"];const l=6e4;const c={ms:l,initialState:false,events:r,dispatchEvent:true,eventPrefix:true};const useIdle=(e,t={})=>{const s=e;const{ms:n,initialState:o,events:i,dispatchEvent:r,eventPrefix:l}=Object.assign({},c,t);let a=o;let u=setTimeout((()=>{a=true;dispatchAway()}),n);const dispatchAway=e=>{const t=composeEventName("away",s,l);s.isIdle=true;method(s,"away").call(s,e);if(r){const n=extendedEvent(t,e||null,{controller:s});s.element.dispatchEvent(n)}};const dispatchBack=e=>{const t=composeEventName("back",s,l);s.isIdle=false;method(s,"back").call(s,e);if(r){const n=extendedEvent(t,e||null,{controller:s});s.element.dispatchEvent(n)}};const onEvent=e=>{a&&dispatchBack(e);a=false;clearTimeout(u);u=setTimeout((()=>{a=true;dispatchAway(e)}),n)};const onVisibility=e=>{document.hidden||onEvent(e)};a?dispatchAway():dispatchBack();const h=s.disconnect.bind(s);const observe=()=>{i.forEach((e=>{window.addEventListener(e,onEvent)}));document.addEventListener("visibilitychange",onVisibility)};const unobserve=()=>{clearTimeout(u);i.forEach((e=>{window.removeEventListener(e,onEvent)}));document.removeEventListener("visibilitychange",onVisibility)};Object.assign(s,{disconnect(){unobserve();h()}});observe();return[observe,unobserve]};class IdleComposableController extends e{constructor(){super(...arguments);this.isIdle=false}}class IdleController extends IdleComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useIdle(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const a={dispatchEvent:true,eventPrefix:true,visibleAttribute:"isVisible"};const useIntersection=(e,t={})=>{const s=e;const{dispatchEvent:n,eventPrefix:o,visibleAttribute:i}=Object.assign({},a,t);const r=(t===null||t===void 0?void 0:t.element)||s.element;s.intersectionElements||(s.intersectionElements=[]);s.intersectionElements.push(r);const callback=e=>{const[t]=e;t.isIntersecting?dispatchAppear(t):r.hasAttribute(i)&&dispatchDisappear(t)};const l=new IntersectionObserver(callback,t);const dispatchAppear=e=>{r.setAttribute(i,"true");method(s,"appear").call(s,e,l);if(n){const t=composeEventName("appear",s,o);const n=extendedEvent(t,null,{controller:s,entry:e,observer:l});r.dispatchEvent(n)}};const dispatchDisappear=e=>{r.removeAttribute(i);method(s,"disappear").call(s,e,l);if(n){const t=composeEventName("disappear",s,o);const n=extendedEvent(t,null,{controller:s,entry:e,observer:l});r.dispatchEvent(n)}};const c=s.disconnect.bind(s);const disconnect=()=>{unobserve();c()};const observe=()=>{l.observe(r)};const unobserve=()=>{l.unobserve(r)};const noneVisible=()=>s.intersectionElements.filter((e=>e.hasAttribute(i))).length===0;const oneVisible=()=>s.intersectionElements.filter((e=>e.hasAttribute(i))).length===1;const atLeastOneVisible=()=>s.intersectionElements.some((e=>e.hasAttribute(i)));const allVisible=()=>s.intersectionElements.every((e=>e.hasAttribute(i)));const u=allVisible;Object.assign(s,{isVisible:u,noneVisible:noneVisible,oneVisible:oneVisible,atLeastOneVisible:atLeastOneVisible,allVisible:allVisible,disconnect:disconnect});observe();return[observe,unobserve]};class IntersectionComposableController extends e{}class IntersectionController extends IntersectionComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useIntersection(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const useLazyLoad=(e,t)=>{const callback=t=>{const[s]=t;s.isIntersecting&&!e.isLoaded&&handleAppear()};const handleAppear=t=>{const s=e.data.get("src");if(!s)return;const n=e.element;e.isLoading=true;method(e,"loading").call(e,s);n.onload=()=>{handleLoaded(s)};n.src=s};const handleLoaded=t=>{e.isLoading=false;e.isLoaded=true;method(e,"loaded").call(e,t)};const s=e.disconnect.bind(e);const n=new IntersectionObserver(callback,t);const observe=()=>{n.observe(e.element)};const unobserve=()=>{n.unobserve(e.element)};Object.assign(e,{isVisible:false,disconnect(){unobserve();s()}});observe();return[observe,unobserve]};class LazyLoadComposableController extends e{constructor(){super(...arguments);this.isLoading=false;this.isLoaded=false}}class LazyLoadController extends LazyLoadComposableController{constructor(e){super(e);this.options={rootMargin:"10%"};requestAnimationFrame((()=>{const[e,t]=useLazyLoad(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const u={mediaQueries:{},dispatchEvent:true,eventPrefix:true,debug:false};class UseMatchMedia extends StimulusUse{constructor(e,t={}){var s,n,o,i;super(e,t);this.matches=[];this.callback=e=>{const t=Object.keys(this.mediaQueries).find((t=>this.mediaQueries[t]===e.media));if(!t)return;const{media:s,matches:n}=e;this.changed({name:t,media:s,matches:n,event:e})};this.changed=e=>{const{name:t}=e;if(e.event){this.call(camelize(`${t}_changed`),e);this.dispatch(`${t}:changed`,e);this.log(`media query "${t}" changed`,e)}if(e.matches){this.call(camelize(`is_${t}`),e);this.dispatch(`is:${t}`,e)}else{this.call(camelize(`not_${t}`),e);this.dispatch(`not:${t}`,e)}};this.observe=()=>{Object.keys(this.mediaQueries).forEach((e=>{const t=this.mediaQueries[e];const s=window.matchMedia(t);s.addListener(this.callback);this.matches.push(s);this.changed({name:e,media:t,matches:s.matches})}))};this.unobserve=()=>{this.matches.forEach((e=>e.removeListener(this.callback)))};this.controller=e;this.mediaQueries=(s=t.mediaQueries)!==null&&s!==void 0?s:u.mediaQueries;this.dispatchEvent=(n=t.dispatchEvent)!==null&&n!==void 0?n:u.dispatchEvent;this.eventPrefix=(o=t.eventPrefix)!==null&&o!==void 0?o:u.eventPrefix;this.debug=(i=t.debug)!==null&&i!==void 0?i:u.debug;if(window.matchMedia){this.enhanceController();this.observe()}else console.error("window.matchMedia() is not available")}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useMatchMedia=(e,t={})=>{const s=new UseMatchMedia(e,t);return[s.observe,s.unobserve]};const memoize=(e,t,s)=>{Object.defineProperty(e,t,{value:s});return s};const useMemo=e=>{var t;(t=e.constructor.memos)===null||t===void 0?void 0:t.forEach((t=>{memoize(e,t,e[t])}))};const defineMetaGetter=(e,t,s)=>{const n=s?`${camelize(t)}Meta`:camelize(t);Object.defineProperty(e,n,{get(){return typeCast(metaValue(t))}})};function metaValue(e){const t=document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")}function typeCast(e){try{return JSON.parse(e)}catch(t){return e}}const useMeta=(e,t={suffix:true})=>{const s=e.constructor.metaNames;const n=t.suffix;s===null||s===void 0?void 0:s.forEach((t=>{defineMetaGetter(e,t,n)}));Object.defineProperty(e,"metas",{get(){const e={};s===null||s===void 0?void 0:s.forEach((t=>{const s=typeCast(metaValue(t));s!==void 0&&s!==null&&(e[camelize(t)]=s)}));return e}})};class UseMutation extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{try{this.observer.observe(this.targetElement,this.options)}catch(e){this.controller.application.handleError(e,"At a minimum, one of childList, attributes, and/or characterData must be true",{})}};this.unobserve=()=>{this.observer.disconnect()};this.mutation=e=>{this.call("mutate",e);this.log("mutate",{entries:e});this.dispatch("mutate",{entries:e})};this.targetElement=(t===null||t===void 0?void 0:t.element)||e.element;this.controller=e;this.options=t;this.observer=new MutationObserver(this.mutation);this.enhanceController();this.observe()}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useMutation=(e,t={})=>{const s=new UseMutation(e,t);return[s.observe,s.unobserve]};class MutationComposableController extends e{}class MutationController extends MutationComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useMutation(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const h={dispatchEvent:true,eventPrefix:true};const useResize=(e,t={})=>{const s=e;const{dispatchEvent:n,eventPrefix:o}=Object.assign({},h,t);const i=(t===null||t===void 0?void 0:t.element)||s.element;const callback=e=>{const[t]=e;method(s,"resize").call(s,t.contentRect);if(n){const e=composeEventName("resize",s,o);const n=extendedEvent(e,null,{controller:s,entry:t});i.dispatchEvent(n)}};const r=s.disconnect.bind(s);const l=new ResizeObserver(callback);const observe=()=>{l.observe(i)};const unobserve=()=>{l.unobserve(i)};Object.assign(s,{disconnect(){unobserve();r()}});observe();return[observe,unobserve]};class ResizeComposableController extends e{}class ResizeController extends ResizeComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useResize(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class UseTargetMutation extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{this.observer.observe(this.targetElement,{subtree:true,characterData:true,childList:true,attributes:true,attributeOldValue:true,attributeFilter:[this.targetSelector,this.scopedTargetSelector]})};this.unobserve=()=>{this.observer.disconnect()};this.mutation=e=>{for(const t of e)switch(t.type){case"attributes":let e=t.target.getAttribute(t.attributeName);let s=t.oldValue;if(t.attributeName===this.targetSelector||t.attributeName===this.scopedTargetSelector){let n=this.targetsUsedByThisController(s);let o=this.targetsUsedByThisController(e);let i=n.filter((e=>!o.includes(e)));let r=o.filter((e=>!n.includes(e)));i.forEach((e=>this.targetRemoved(this.stripIdentifierPrefix(e),t.target,"attributeChange")));r.forEach((e=>this.targetAdded(this.stripIdentifierPrefix(e),t.target,"attributeChange")))}break;case"characterData":let n=this.findTargetInAncestry(t.target);if(n==null)return;{let e=this.targetsUsedByThisControllerFromNode(n);e.forEach((e=>{this.targetChanged(this.stripIdentifierPrefix(e),n,"domMutation")}))}break;case"childList":let{addedNodes:o,removedNodes:i}=t;o.forEach((e=>this.processNodeDOMMutation(e,this.targetAdded)));i.forEach((e=>this.processNodeDOMMutation(e,this.targetRemoved)));break}};this.controller=e;this.options=t;this.targetElement=e.element;this.identifier=e.scope.identifier;this.identifierPrefix=`${this.identifier}.`;this.targetSelector=e.scope.schema.targetAttribute;this.scopedTargetSelector=`data-${this.identifier}-target`;this.targets=t.targets||e.constructor.targets;this.prefixedTargets=this.targets.map((e=>`${this.identifierPrefix}${e}`));this.observer=new MutationObserver(this.mutation);this.enhanceController();this.observe()}processNodeDOMMutation(e,t){let s=e;let n=t;let o=[];if(s.nodeName=="#text"||this.targetsUsedByThisControllerFromNode(s).length==0){n=this.targetChanged;s=this.findTargetInAncestry(e)}else o=this.targetsUsedByThisControllerFromNode(s);if(s!=null){o.length==0&&(o=this.targetsUsedByThisControllerFromNode(s));o.forEach((e=>{n.call(this,this.stripIdentifierPrefix(e),s,"domMutation")}))}}findTargetInAncestry(e){let t=e;let s=[];t.nodeName!="#text"&&(s=this.targetsUsedByThisControllerFromNode(t));while(t.parentNode!==null&&t.parentNode!=this.targetElement&&s.length==0){t=t.parentNode;if(t.nodeName!=="#text"){let e=this.targetsUsedByThisControllerFromNode(t);if(e.length>0)return t}}return t.nodeName=="#text"||t.parentNode==null?null:t.parentNode==this.targetElement&&this.targetsUsedByThisControllerFromNode(t).length>0?t:null}targetAdded(e,t,s){let n=`${e}TargetAdded`;this.controller[n]&&method(this.controller,n).call(this.controller,t);this.log("targetAdded",{target:e,node:t,trigger:s})}targetRemoved(e,t,s){let n=`${e}TargetRemoved`;this.controller[n]&&method(this.controller,n).call(this.controller,t);this.log("targetRemoved",{target:e,node:t,trigger:s})}targetChanged(e,t,s){let n=`${e}TargetChanged`;this.controller[n]&&method(this.controller,n).call(this.controller,t);this.log("targetChanged",{target:e,node:t,trigger:s})}targetsUsedByThisControllerFromNode(e){if(e.nodeName=="#text"||e.nodeName=="#comment")return[];let t=e;return this.targetsUsedByThisController(t.getAttribute(this.scopedTargetSelector)||t.getAttribute(this.targetSelector))}targetsUsedByThisController(e){e=e||"";let t=this.stripIdentifierPrefix(e).split(" ");return this.targets.filter((e=>t.indexOf(e)!==-1))}stripIdentifierPrefix(e){return e.replace(new RegExp(this.identifierPrefix,"g"),"")}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useTargetMutation=(e,t={})=>{const s=e;const n=new UseTargetMutation(s,t);return[n.observe,n.unobserve]};class TargetMutationComposableController extends e{}class TargetMutationController extends TargetMutationComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useTargetMutation(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class ThrottleController extends e{}ThrottleController.throttles=[];const d=200;function throttle(e,t=d){let s;return function(){const n=arguments;const o=this;if(!s){s=true;e.apply(o,n);setTimeout((()=>s=false),t)}}}const useThrottle=(e,t={})=>{var s;const n=e;const o=n.constructor;(s=o.throttles)===null||s===void 0?void 0:s.forEach((e=>{typeof e==="string"&&(n[e]=throttle(n[e],t===null||t===void 0?void 0:t.wait));if(typeof e==="object"){const{name:s,wait:o}=e;if(!s)return;n[s]=throttle(n[s],o||(t===null||t===void 0?void 0:t.wait))}}))};const b={enterFromClass:"enter",enterActiveClass:"enterStart",enterToClass:"enterEnd",leaveFromClass:"leave",leaveActiveClass:"leaveStart",leaveToClass:"leaveEnd"};const m={transitioned:false,hiddenClass:"hidden",preserveOriginalClass:true,removeToClasses:true};const useTransition=(e,t={})=>{var s,n,o;const i=e;const r=i.element.dataset.transitionTarget;let l;r&&(l=i[`${r}Target`]);const c=(t===null||t===void 0?void 0:t.element)||l||i.element;if(!(c instanceof HTMLElement||c instanceof SVGElement))return;const a=c.dataset;const u=parseInt(a.leaveAfter||"")||t.leaveAfter||0;const{transitioned:h,hiddenClass:d,preserveOriginalClass:b,removeToClasses:v}=Object.assign({},m,t);const g=(s=i.enter)===null||s===void 0?void 0:s.bind(i);const p=(n=i.leave)===null||n===void 0?void 0:n.bind(i);const f=(o=i.toggleTransition)===null||o===void 0?void 0:o.bind(i);async function enter(e){if(i.transitioned)return;i.transitioned=true;g&&g(e);const s=getAttribute("enterFrom",t,a);const n=getAttribute("enterActive",t,a);const o=getAttribute("enterTo",t,a);const r=getAttribute("leaveTo",t,a);!d||c.classList.remove(d);v||removeClasses(c,r);await transition(c,s,n,o,d,b,v);u>0&&setTimeout((()=>{leave(e)}),u)}async function leave(e){if(!i.transitioned)return;i.transitioned=false;p&&p(e);const s=getAttribute("leaveFrom",t,a);const n=getAttribute("leaveActive",t,a);const o=getAttribute("leaveTo",t,a);const r=getAttribute("enterTo",t,a);v||removeClasses(c,r);await transition(c,s,n,o,d,b,v);!d||c.classList.add(d)}function toggleTransition(e){f&&f(e);i.transitioned?leave():enter()}async function transition(e,t,s,n,o,i,r){const l=[];if(i){t.forEach((t=>e.classList.contains(t)&&t!==o&&l.push(t)));s.forEach((t=>e.classList.contains(t)&&t!==o&&l.push(t)));n.forEach((t=>e.classList.contains(t)&&t!==o&&l.push(t)))}addClasses(e,t);removeClasses(e,l);addClasses(e,s);await nextAnimationFrame();removeClasses(e,t);addClasses(e,n);await afterTransition(e);removeClasses(e,s);r&&removeClasses(e,n);addClasses(e,l)}function initialState(){i.transitioned=h;if(h){!d||c.classList.remove(d);enter()}else{!d||c.classList.add(d);leave()}}function addClasses(e,t){t.length>0&&e.classList.add(...t)}function removeClasses(e,t){t.length>0&&e.classList.remove(...t)}initialState();Object.assign(i,{enter:enter,leave:leave,toggleTransition:toggleTransition});return[enter,leave,toggleTransition]};function getAttribute(e,t,s){const n=`transition${e[0].toUpperCase()}${e.substr(1)}`;const o=b[e];const i=t[e]||s[n]||s[o]||" ";return isEmpty(i)?[]:i.split(" ")}async function afterTransition(e){return new Promise((t=>{const s=Number(getComputedStyle(e).transitionDuration.split(",")[0].replace("s",""))*1e3;setTimeout((()=>{t(s)}),s)}))}async function nextAnimationFrame(){return new Promise((e=>{requestAnimationFrame((()=>{requestAnimationFrame(e)}))}))}function isEmpty(e){return e.length===0||!e.trim()}class TransitionComposableController extends e{constructor(){super(...arguments);this.transitioned=false}}class TransitionController extends TransitionComposableController{constructor(e){super(e);requestAnimationFrame((()=>{useTransition(this,this.options)}))}}class UseVisibility extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{this.controller.isVisible=!document.hidden;document.addEventListener("visibilitychange",this.handleVisibilityChange);this.handleVisibilityChange()};this.unobserve=()=>{document.removeEventListener("visibilitychange",this.handleVisibilityChange)};this.becomesInvisible=e=>{this.controller.isVisible=false;this.call("invisible",e);this.log("invisible",{isVisible:false});this.dispatch("invisible",{event:e,isVisible:false})};this.becomesVisible=e=>{this.controller.isVisible=true;this.call("visible",e);this.log("visible",{isVisible:true});this.dispatch("visible",{event:e,isVisible:true})};this.handleVisibilityChange=e=>{document.hidden?this.becomesInvisible(e):this.becomesVisible(e)};this.controller=e;this.enhanceController();this.observe()}enhanceController(){const e=this.controllerDisconnect;const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useVisibility=(e,t={})=>{const s=e;const n=new UseVisibility(s,t);return[n.observe,n.unobserve]};class VisibilityComposableController extends e{constructor(){super(...arguments);this.isVisible=false}}class VisibilityController extends VisibilityComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useVisibility(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class UseWindowFocus extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{document.hasFocus()?this.becomesFocused():this.becomesUnfocused();this.interval=setInterval((()=>{this.handleWindowFocusChange()}),this.intervalDuration)};this.unobserve=()=>{clearInterval(this.interval)};this.becomesUnfocused=e=>{this.controller.hasFocus=false;this.call("unfocus",e);this.log("unfocus",{hasFocus:false});this.dispatch("unfocus",{event:e,hasFocus:false})};this.becomesFocused=e=>{this.controller.hasFocus=true;this.call("focus",e);this.log("focus",{hasFocus:true});this.dispatch("focus",{event:e,hasFocus:true})};this.handleWindowFocusChange=e=>{document.hasFocus()&&!this.controller.hasFocus?this.becomesFocused(e):!document.hasFocus()&&this.controller.hasFocus&&this.becomesUnfocused(e)};this.controller=e;this.intervalDuration=t.interval||200;this.enhanceController();this.observe()}enhanceController(){const e=this.controllerDisconnect;const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useWindowFocus=(e,t={})=>{const s=e;const n=new UseWindowFocus(s,t);return[n.observe,n.unobserve]};class WindowFocusComposableController extends e{constructor(){super(...arguments);this.hasFocus=false}}class WindowFocusController extends WindowFocusComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useWindowFocus(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const useWindowResize=e=>{const t=e;const callback=e=>{const{innerWidth:s,innerHeight:n}=window;const o={height:n||Infinity,width:s||Infinity,event:e};method(t,"windowResize").call(t,o)};const s=t.disconnect.bind(t);const observe=()=>{window.addEventListener("resize",callback);callback()};const unobserve=()=>{window.removeEventListener("resize",callback)};Object.assign(t,{disconnect(){unobserve();s()}});observe();return[observe,unobserve]};class WindowResizeComposableController extends e{}class WindowResizeController extends WindowResizeComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useWindowResize(this);Object.assign(this,{observe:e,unobserve:t})}))}}function useHotkeys(){throw"[stimulus-use] Notice: The import for `useHotkeys()` has been moved from `stimulus-use` to `stimulus-use/hotkeys`. \nPlease change the import accordingly and add `hotkey-js` as a dependency to your project. \n\nFor more information see: https://stimulus-use.github.io/stimulus-use/#/use-hotkeys?id=importing-the-behavior"}export{ApplicationController,ClickOutsideController,HoverController,IdleController,IntersectionController,LazyLoadController,MutationController,ResizeController,TargetMutationController,TransitionController,UseHover,UseMutation,UseTargetMutation,UseVisibility,UseWindowFocus,VisibilityController,WindowFocusController,WindowResizeController,debounce,useApplication,useClickOutside,useDebounce,useDispatch,useHotkeys,useHover,useIdle,useIntersection,useLazyLoad,useMatchMedia,useMemo,useMeta,useMutation,useResize,useTargetMutation,useThrottle,useTransition,useVisibility,useWindowFocus,useWindowResize};
+