apprun 4.0.0 → 6.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +235 -12
- package/LICENSE +1 -1
- package/README.md +225 -110
- package/apprun.d.ts +240 -34
- package/cli/app.js +29 -0
- package/cli/colors.js +69 -0
- package/cli/index.html +13 -0
- package/cli/index.js +96 -0
- package/dist/apprun-code.js +2 -0
- package/dist/apprun-code.js.map +1 -0
- package/dist/apprun-dev-tools.js +1 -1
- package/dist/apprun-dev-tools.js.map +1 -1
- package/dist/apprun-html.esm.js +34 -0
- package/dist/apprun-html.esm.js.map +1 -0
- package/dist/apprun-html.js +2 -1
- package/dist/apprun-html.js.LICENSE.txt +11 -0
- package/dist/apprun-html.js.map +1 -1
- package/dist/apprun-play.js +2 -0
- package/dist/apprun-play.js.map +1 -0
- package/dist/apprun.esm.js +2 -0
- package/dist/apprun.esm.js.map +1 -0
- package/dist/apprun.js +1 -1
- package/dist/apprun.js.map +1 -1
- package/dist/createState.js +2 -0
- package/dist/createState.js.map +1 -0
- package/esm/add-components.js +90 -0
- package/esm/add-components.js.map +1 -0
- package/esm/app.js +209 -0
- package/esm/app.js.map +1 -0
- package/esm/apprun-code.js +170 -0
- package/esm/apprun-code.js.map +1 -0
- package/esm/apprun-dev-tools-tests.js +95 -0
- package/esm/apprun-dev-tools-tests.js.map +1 -0
- package/esm/apprun-dev-tools.js +281 -0
- package/esm/apprun-dev-tools.js.map +1 -0
- package/esm/apprun-html.js +24 -0
- package/esm/apprun-html.js.map +1 -0
- package/esm/apprun-play.js +248 -0
- package/esm/apprun-play.js.map +1 -0
- package/esm/apprun.js +220 -0
- package/esm/apprun.js.map +1 -0
- package/esm/component.js +413 -0
- package/esm/component.js.map +1 -0
- package/esm/createState.js +9 -0
- package/esm/createState.js.map +1 -0
- package/esm/decorator.js +88 -0
- package/esm/decorator.js.map +1 -0
- package/esm/directive.js +306 -0
- package/esm/directive.js.map +1 -0
- package/esm/router.js +345 -0
- package/esm/router.js.map +1 -0
- package/esm/type-utils.js +90 -0
- package/esm/type-utils.js.map +1 -0
- package/esm/types.js +58 -0
- package/esm/types.js.map +1 -0
- package/esm/vdom-lit-html.js +65 -0
- package/esm/vdom-lit-html.js.map +1 -0
- package/esm/vdom-my-prop-attr.js +227 -0
- package/esm/vdom-my-prop-attr.js.map +1 -0
- package/esm/vdom-my.js +293 -0
- package/esm/vdom-my.js.map +1 -0
- package/esm/vdom-to-html.js +54 -0
- package/esm/vdom-to-html.js.map +1 -0
- package/esm/vdom.js +28 -0
- package/esm/vdom.js.map +1 -0
- package/esm/version.js +15 -0
- package/esm/version.js.map +1 -0
- package/esm/web-component.js +155 -0
- package/esm/web-component.js.map +1 -0
- package/jsx-runtime.js +2 -0
- package/jsx-runtime.js.map +1 -0
- package/package.json +90 -41
- package/.travis.yml +0 -10
- package/.vscode/launch.json +0 -19
- package/BACKERS.md +0 -3
- package/apprun-cli.js +0 -177
- package/cli-templates/_gitignore +0 -6
- package/cli-templates/component.ts_ +0 -16
- package/cli-templates/index.html +0 -11
- package/cli-templates/karma.conf.js +0 -24
- package/cli-templates/main.ts_ +0 -13
- package/cli-templates/readme.md +0 -7
- package/cli-templates/spa_index.html +0 -14
- package/cli-templates/spa_main.ts_ +0 -47
- package/cli-templates/spec.ts_ +0 -11
- package/cli-templates/tsconfig.json +0 -12
- package/cli-templates/webpack.config.js +0 -23
- package/demo-html/app.js +0 -2
- package/demo-html/app.js.map +0 -1
- package/demo-html/counter-c.html +0 -29
- package/demo-html/counter-wc-event.html +0 -29
- package/demo-html/counter-wc.html +0 -29
- package/demo-html/counter.html +0 -26
- package/demo-html/index.html +0 -14
- package/demo-html/main.tsx +0 -31
- package/docs/README.md +0 -326
- package/docs/index.html +0 -23
- package/index.html +0 -85
- package/logo.png +0 -0
- package/src/app.ts +0 -69
- package/src/apprun-dev-tools.tsx +0 -67
- package/src/apprun-html.ts +0 -13
- package/src/apprun.ts +0 -53
- package/src/component.ts +0 -189
- package/src/createComponent.tsx +0 -38
- package/src/decorator.ts +0 -36
- package/src/router.ts +0 -19
- package/src/types.ts +0 -9
- package/src/vdom-html.ts +0 -17
- package/src/vdom-my.ts +0 -191
- package/src/vdom-to-html.tsx +0 -45
- package/src/vdom.ts +0 -7
- package/src/web-component.ts +0 -29
- package/tests/app-rx.spec_ +0 -41
- package/tests/app.spec.ts +0 -122
- package/tests/application.spec.tsx +0 -23
- package/tests/component.spec.tsx +0 -296
- package/tests/custom-element.spec.tsx +0 -19
- package/tests/data-attr.spec.tsx +0 -42
- package/tests/decorator.spec.tsx +0 -104
- package/tests/fragment.spec.tsx +0 -79
- package/tests/hyperscript.spec.ts +0 -43
- package/tests/node-test.js +0 -7
- package/tests/router.spec.ts +0 -69
- package/tests/stateful-component.spec.tsx +0 -248
- package/tests/typed.spec.tsx +0 -63
- package/tests/vdom-html.spec.ts +0 -35
- package/tests/vdom-jsx.spec.tsx +0 -131
- package/tests/vdom-my.spec.tsx +0 -195
- package/tests/view-engine.spec.js +0 -59
- package/tsconfig.json +0 -11
- package/tslint.json +0 -124
- package/typescriptreact.json +0 -87
- package/viewEngine.js +0 -54
- package/webpack.config.js +0 -30
package/dist/apprun-html.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apprun=t():e.apprun=t()}(this,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(){this._events={}}on(e,t,n={}){this._events[e]=this._events[e]||[],this._events[e].push({fn:t,options:n})}off(e,t){let n=this._events[e];n&&((n=n.filter(e=>e.fn!==t)).length?this._events[e]=n:delete this._events[e])}run(e,...t){let n=this._events[e];console.assert(!!n,"No subscriber for event: "+e),n&&((n=n.filter(n=>{const{fn:o,options:i}=n;return i.delay?this.delay(e,o,t,i):o.apply(this,t),!n.options.once})).length?this._events[e]=n:delete this._events[e])}once(e,t,n={}){this.on(e,t,Object.assign({},n,{once:!0}))}delay(e,t,n,o){o._t&&clearTimeout(o._t),o._t=setTimeout(()=>{clearTimeout(o._t),t.apply(this,n)},o.delay)}}let o;t.App=n;const i=e||window;i.app&&i.app.start?o=i.app:(o=new n,i.app=o),t.default=o}).call(this,n(3))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(9),r=n(7);t.Component=r.Component;const s=n(2);t.on=s.on,t.update=s.update,t.event=s.update;const a=n(6),d=n(5);o.default.createElement=i.createElement,o.default.render=i.render,o.default.Fragment=i.Fragment,o.default.webComponent=d.default,o.default.start=((e,t,n,o,i)=>{const s=Object.assign(i||{},{render:!0,global_event:!0}),a=new r.Component(t,n,o);return i&&i.rendered&&(a.rendered=i.rendered),a.mount(e,s),a}),o.default.route||(o.default.route=a.default,o.default.on("//",e=>{}),o.default.on("#",e=>{}),o.default.on("route",e=>a.default(e)),"object"==typeof document&&document.addEventListener("DOMContentLoaded",()=>{window.onpopstate=(()=>a.default(location.hash)),a.default(location.hash)})),t.default=o.default,o.default.on("debug",e=>0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reflect={meta:new WeakMap,defineMetadata(e,t,n){this.meta.has(n)||this.meta.set(n,{}),this.meta.get(n)[e]=t},getMetadataKeys(e){return e=Object.getPrototypeOf(e),this.meta.get(e)?Object.keys(this.meta.get(e)):[]},getMetadata(e,t){return t=Object.getPrototypeOf(t),this.meta.get(t)?this.meta.get(t)[e]:null}},t.update=function(e,n={}){return(o,i,r)=>(e=e||i,t.Reflect.defineMetadata(`apprun-update:${e}`,{name:e,key:i,options:n},o),r)},t.on=function(e,n={}){return function(o,i){e=e||i,t.Reflect.defineMetadata(`apprun-update:${e}`,{name:e,key:i,options:n},o)}}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(8),i="_props";function r(e){const t=[],n=e=>{null!==e&&void 0!==e&&""!==e&&!1!==e&&t.push("function"==typeof e||"object"==typeof e?e:`${e}`)};return e&&e.forEach(e=>{Array.isArray(e)?e.forEach(e=>n(e)):n(e)}),t}t.createElement=function(e,t,...n){const o=r(n);return"string"==typeof e?{tag:e,props:t,children:o}:void 0===e&&n?o:Object.getPrototypeOf(e).__isAppRunComponent?{tag:e,props:t,children:o}:e(t,o)};const s={};function a(e,t,n={}){if(null!=t&&(t=o.default(t,n),e))if(Array.isArray(t))l(e,t);else{const n=t;e.firstChild?d(e.firstChild,n):e.appendChild(c(n))}}function d(e,t){console.assert(!!e),function(e,t){return e.nodeName===`${t.tag||""}`.toUpperCase()}(e,t)?(l(e,t.children),f(e,t.props)):e.parentNode.replaceChild(c(t),e)}function l(e,t){const n=Math.min(e.childNodes.length,t.length);for(let o=0;o<n;o++){const n=t[o],i=e.childNodes[o];if("string"==typeof n)i.textContent!==n&&(3===i.nodeType?i.textContent=n:e.replaceChild(u(n),i));else{const t=n.props&&n.props.key;if(t)if(i.key===t)d(e.childNodes[o],n);else{const r=t&&s[t];r?(e.replaceChild(r,i),e.appendChild(i),d(e.childNodes[o],n)):(e.appendChild(c(n),i),d(e.childNodes[o],n))}else d(e.childNodes[o],n)}}let o=e.childNodes.length;for(;o>n;)e.removeChild(e.lastChild),o--;if(t.length>n){const o=document.createDocumentFragment();for(let e=n;e<t.length;e++)o.appendChild(c(t[e]));e.appendChild(o)}}function u(e){if(0===e.indexOf("_html:")){const t=document.createElement("div");return t.insertAdjacentHTML("afterbegin",e.substring(6)),t}return document.createTextNode(e)}function c(e){if(console.assert(null!==e&&void 0!==e),"string"==typeof e)return u(e);if(!e.tag||"function"==typeof e.tag)return u(JSON.stringify(e));const t="svg"===e.tag?document.createElementNS("http://www.w3.org/2000/svg",e.tag):document.createElement(e.tag);return f(t,e.props),e.children&&e.children.forEach(e=>t.appendChild(c(e))),t}function f(e,t){console.assert(!!e),t=function(e,t){const n={};return e&&Object.keys(e).forEach(e=>n[e]=""),t&&Object.keys(t).forEach(e=>n[e]=t[e]),n}(e[i]||{},t),e[i]=t;for(let n in t){const o=t[n];if("style"===n){e.style.cssText&&(e.style.cssText="");for(let t in o)e.style[t]!==o[t]&&(e.style[t]=o[t])}else if(n.startsWith("data-")){const t=n.substring(5);e.dataset[t]!==o&&(e.dataset[t]=o)}else n.startsWith("role")||n.startsWith("aria-")?e.getAttribute(n)!==o&&e.setAttribute(n,o):(e[n]!==o&&(e[n]=o),"key"===n&&o&&(s[o]=e))}}t.updateElement=a,t.render=a,t.Fragment=function(e,...t){return r(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customElement=((e,t={})=>(class extends HTMLElement{constructor(){super();const n=Object.assign({render:!0,shadow:!1},t);this._shadowRoot=n.shadow?this.attachShadow({mode:"open"}):this;const o={};Array.from(this.attributes).forEach(e=>o[e.name]=e.value),this.children&&(o.children=Array.from(this.children),o.children.forEach(e=>e.parentElement.removeChild(e))),this._component=new e(o).mount(this._shadowRoot,n),this.on=this._component.on.bind(this._component),this.run=this._component.run.bind(this._component)}get state(){return this._component.state}})),t.default=((e,n,o)=>{customElements&&customElements.define(e,t.customElement(n,o))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i="//";t.default=function(e){if(e||(e="#"),e.startsWith("#")){const[t,...n]=e.split("/");o.default.run(t,...n),o.default.run(i,t,...n)}else if(e.startsWith("/")){const[t,n,...r]=e.split("/");o.default.run("/"+n,...r),o.default.run(i,"/"+n,...r)}else o.default.run(e),o.default.run(i,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(2),r={};o.default.on("get-components",e=>e.components=r);class s{constructor(e,t,n,i){this.state=e,this.view=t,this.update=n,this.options=i,this._app=new o.App,this._actions=[],this._history=[],this._history_idx=-1,this.start=((e=null,t={render:!0})=>this.mount(e,Object.assign({},t,{render:!0})))}renderState(e){if(!this.view)return;const t=this.view(e);if(o.default.run("debug",{component:this,state:e,vdom:t||"[vdom is null - no render]"}),"object"!=typeof document)return;const n="string"==typeof this.element?document.getElementById(this.element):this.element;n&&(n._component=this),o.default.render(n,t,this),this.rendered&&this.rendered(this.state)}setState(e,t={render:!0,history:!1}){if(e instanceof Promise)e.then(e=>{this.setState(e,t)}).catch(e=>{throw console.error(e),e}),this.state=e;else{if(null==e)return;this.state=e,!1!==t.render&&this.renderState(e),!1!==t.history&&this.enable_history&&(this._history=[...this._history,e],this._history_idx=this._history.length-1),"function"==typeof t.callback&&t.callback(this.state)}}mount(e=null,t){if(console.assert(!this.element,"Component already mounted."),this.options=t=Object.assign(this.options||{},t),this.element=e,this.global_event=t.global_event,this.enable_history=!!t.history,this.enable_history){const e=()=>{this._history_idx--,this._history_idx>=0?this.setState(this._history[this._history_idx],{render:!0,history:!1}):this._history_idx=0},n=()=>{this._history_idx++,this._history_idx<this._history.length?this.setState(this._history[this._history_idx],{render:!0,history:!1}):this._history_idx=this._history.length-1};this.on(t.history.prev||"history-prev",e),this.on(t.history.next||"history-next",n)}return this.add_actions(),void 0===this.state&&(this.state=this.model||{}),t.render?this.setState(this.state,{render:!0,history:!0}):this.setState(this.state,{render:!1,history:!0}),r[e]=r[e]||[],r[e].push(this),this}is_global_event(e){return e&&(e.startsWith("#")||e.startsWith("/"))}add_action(e,t,n={}){t&&"function"==typeof t&&this.on(e,(...i)=>{const r=t(this.state,...i);o.default.run("debug",{component:this,event:e,e:i,state:this.state,newState:r,options:n}),this.setState(r,n)},n)}add_actions(){const e=this.update||{};i.Reflect.getMetadataKeys(this).forEach(t=>{if(t.startsWith("apprun-update:")){const n=i.Reflect.getMetadata(t,this);e[n.name]=[this[n.key].bind(this),n.options]}});const t={};Object.keys(e).forEach(n=>{const o=e[n];("function"==typeof o||Array.isArray(o))&&n.split(",").forEach(e=>t[e.trim()]=o)}),Object.keys(t).forEach(e=>{const n=t[e];"function"==typeof n?this.add_action(e,n):Array.isArray(n)&&this.add_action(e,n[0],n[1])})}run(e,...t){return this.global_event||this.is_global_event(e)?o.default.run(e,...t):this._app.run(e,...t)}on(e,t,n){return this._actions.push({name:e,fn:t}),this.global_event||this.is_global_event(e)?o.default.on(e,t,n):this._app.on(e,t,n)}unmount(){this._actions.forEach(e=>{const{name:t,fn:n}=e;this.global_event||this.is_global_event(t)?o.default.off(t,n):this._app.off(t,n)})}}s.__isAppRunComponent=!0,t.Component=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0);t.default=function e(t,n,i=0){if("string"==typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t,n,i++));let r=t;return t&&t.tag&&Object.getPrototypeOf(t.tag).__isAppRunComponent&&(r=function(e,t,n){const{tag:i,props:r,children:s}=e;let a=r&&r.id,d=`_${i.name}_${n}`;a?d=`_${i.name}_${a}`:a=`_${i.name}_${n}`,t.__componentCache||(t.__componentCache={});let l=t.__componentCache[d];l||(l=t.__componentCache[d]=new i(Object.assign({},r,{children:s})).mount(a)),l.mounted&&l.mounted(r,s);const u=l.state;let c="";return u instanceof Promise||!l.view||(c=l.view(u),l.rendered&&l.rendered(u)),o.default.createElement("div",{id:a},c)}(t,n,i++)),r&&r.children&&(r.children=r.children.map(t=>e(t,n,i++))),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4);t.createElement=o.createElement,t.Fragment=o.Fragment,t.render=function(e,t,n){o.updateElement(e,t,n)}},,,,,,,,,,,,,,,function(e,t,n){"use strict";var o,i="http://www.w3.org/1999/xhtml",r="undefined"==typeof document?void 0:document,s=r?r.body||r.createElement("div"):{},a=s.hasAttributeNS?function(e,t,n){return e.hasAttributeNS(t,n)}:s.hasAttribute?function(e,t,n){return e.hasAttribute(n)}:function(e,t,n){return null!=e.getAttributeNode(t,n)};function d(e,t){var n=e.nodeName,o=t.nodeName;return n===o||!!(t.actualize&&n.charCodeAt(0)<91&&o.charCodeAt(0)>90)&&n===o.toUpperCase()}function l(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}var u={OPTION:function(e,t){l(e,t,"selected")},INPUT:function(e,t){l(e,t,"checked"),l(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),a(t,null,"value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var o=e.firstChild;if(o){var i=o.nodeValue;if(i==n||!n&&i==e.placeholder)return;o.nodeValue=n}},SELECT:function(e,t){if(!a(t,null,"multiple")){for(var n=0,o=t.firstChild;o;){var i=o.nodeName;if(i&&"OPTION"===i.toUpperCase()){if(a(o,null,"selected")){n;break}n++}o=o.nextSibling}e.selectedIndex=n}}},c=1,f=3,h=8;function p(){}function m(e){return e.id}var y=function(e){return function(t,n,s){if(s||(s={}),"string"==typeof n)if("#document"===t.nodeName||"HTML"===t.nodeName){var a=n;(n=r.createElement("html")).innerHTML=a}else n=function(e){var t;return!o&&r.createRange&&(o=r.createRange()).selectNode(r.body),o&&o.createContextualFragment?t=o.createContextualFragment(e):(t=r.createElement("body")).innerHTML=e,t.childNodes[0]}(n);var l,y=s.getNodeKey||m,_=s.onBeforeNodeAdded||p,v=s.onNodeAdded||p,g=s.onBeforeElUpdated||p,b=s.onElUpdated||p,C=s.onBeforeNodeDiscarded||p,E=s.onNodeDiscarded||p,N=s.onBeforeElChildrenUpdated||p,O=!0===s.childrenOnly,x={};function j(e){l?l.push(e):l=[e]}function w(e,t,n){!1!==C(e)&&(t&&t.removeChild(e),E(e),function e(t,n){if(t.nodeType===c)for(var o=t.firstChild;o;){var i=void 0;n&&(i=y(o))?j(i):(E(o),o.firstChild&&e(o,n)),o=o.nextSibling}}(e,n))}function A(e){v(e);for(var t=e.firstChild;t;){var n=t.nextSibling,o=y(t);if(o){var i=x[o];i&&d(t,i)&&(t.parentNode.replaceChild(i,t),S(i,t))}A(t),t=n}}function S(o,i,s){var a,l=y(i);if(l&&delete x[l],!n.isSameNode||!n.isSameNode(t)){if(!s){if(!1===g(o,i))return;if(e(o,i),b(o),!1===N(o,i))return}if("TEXTAREA"!==o.nodeName){var p,m,v,C,E=i.firstChild,O=o.firstChild;e:for(;E;){for(v=E.nextSibling,p=y(E);O;){if(m=O.nextSibling,E.isSameNode&&E.isSameNode(O)){E=v,O=m;continue e}a=y(O);var M=O.nodeType,T=void 0;if(M===E.nodeType&&(M===c?(p?p!==a&&((C=x[p])?O.nextSibling===C?T=!1:(o.insertBefore(C,O),m=O.nextSibling,a?j(a):w(O,o,!0),O=C):T=!1):a&&(T=!1),(T=!1!==T&&d(O,E))&&S(O,E)):M!==f&&M!=h||(T=!0,O.nodeValue!==E.nodeValue&&(O.nodeValue=E.nodeValue))),T){E=v,O=m;continue e}a?j(a):w(O,o,!0),O=m}if(p&&(C=x[p])&&d(C,E))o.appendChild(C),S(C,E);else{var P=_(E);!1!==P&&(P&&(E=P),E.actualize&&(E=E.actualize(o.ownerDocument||r)),o.appendChild(E),A(E))}E=v,O=m}for(;O;)m=O.nextSibling,(a=y(O))?j(a):w(O,o,!0),O=m}var R=u[o.nodeName];R&&R(o,i)}}!function e(t){if(t.nodeType===c)for(var n=t.firstChild;n;){var o=y(n);o&&(x[o]=n),e(n),n=n.nextSibling}}(t);var M=t,T=M.nodeType,P=n.nodeType;if(!O)if(T===c)P===c?d(t,n)||(E(t),M=function(e,t){for(var n=e.firstChild;n;){var o=n.nextSibling;t.appendChild(n),n=o}return t}(t,function(e,t){return t&&t!==i?r.createElementNS(t,e):r.createElement(e)}(n.nodeName,n.namespaceURI))):M=n;else if(T===f||T===h){if(P===T)return M.nodeValue!==n.nodeValue&&(M.nodeValue=n.nodeValue),M;M=n}if(M===n)E(t);else if(S(M,n,O),l)for(var R=0,k=l.length;R<k;R++){var F=x[l[R]];F&&w(F,F.parentNode,!1)}return!O&&M!==t&&t.parentNode&&(M.actualize&&(M=M.actualize(t.ownerDocument||r)),t.parentNode.replaceChild(M,t)),M}}(function(e,t){var n,o,i,r,s,d=t.attributes;for(n=d.length-1;n>=0;--n)i=(o=d[n]).name,r=o.namespaceURI,s=o.value,r?(i=o.localName||i,e.getAttributeNS(r,i)!==s&&e.setAttributeNS(r,i,s)):e.getAttribute(i)!==s&&e.setAttribute(i,s);for(n=(d=e.attributes).length-1;n>=0;--n)!1!==(o=d[n]).specified&&(i=o.name,(r=o.namespaceURI)?(i=o.localName||i,a(t,r,i)||e.removeAttributeNS(r,i)):a(t,null,i)||e.removeAttribute(i))});e.exports=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4);t.createElement=o.createElement,t.Fragment=o.Fragment;const i=n(24);t.render=function(e,t,n){"string"==typeof t?(t=t.trim(),e.firstChild?i(e.firstChild,t):e.innerHTML=t):o.updateElement(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(1);t.Component=o.Component,t.on=o.on,t.update=o.update;const i=n(25);o.default.createElement=i.createElement,o.default.render=i.render,o.default.Fragment=i.Fragment,t.default=o.default,"object"==typeof window&&(window.Component=o.Component)}])});
|
|
1
|
+
/*! For license information please see apprun-html.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apprun=t():e.apprun=t()}(this,(()=>(()=>{"use strict";var e={9:(e,t,n)=>{n.d(t,{EM:()=>s,W9:()=>r,on:()=>i,yo:()=>l});var o=n(436);const r={meta:new WeakMap,defineMetadata(e,t,n){this.meta.has(n)||this.meta.set(n,{}),this.meta.get(n)[e]=t},getMetadataKeys(e){return e=Object.getPrototypeOf(e),this.meta.get(e)?Object.keys(this.meta.get(e)):[]},getMetadata(e,t){return t=Object.getPrototypeOf(t),this.meta.get(t)?this.meta.get(t)[e]:null}};function l(e,t={}){return(n,o,l)=>{const i=e?e.toString():o;return r.defineMetadata(`apprun-update:${i}`,{name:i,key:o,options:t},n),l}}function i(e,t={}){return function(n,o){const l=e?e.toString():o;r.defineMetadata(`apprun-update:${l}`,{name:l,key:o,options:t},n)}}function s(e,t){return function(n){return(0,o.A)(e,n,t),n}}},18:(e,t,n)=>{n.r(t),n.d(t,{boolean:()=>r,booleanish:()=>l,commaOrSpaceSeparated:()=>c,commaSeparated:()=>u,number:()=>s,overloadedBoolean:()=>i,spaceSeparated:()=>a});let o=0;const r=h(),l=h(),i=h(),s=h(),a=h(),u=h(),c=h();function h(){return 2**++o}},72:(e,t,n)=>{n.d(t,{z:()=>l});var o=n(259),r=n(530);const l=(0,o.v)({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:r._})},91:(e,t,n)=>{n.d(t,{u:()=>g});var o=n(859),r=n(9),l=n(741),i=n(634);const s=e=>e,a=o.A;let u=0;const c="_c",h=new Map;let d=null;function p(){0===h.size&&d&&(d.disconnect(),d=null)}function m(e){const t=h.get(e);t&&(h.delete(e),t.component.unload?.(t.component.state),p())}function f(e){e&&(h.delete(e),p())}class g{renderState(e,t=null){if(!this.view)return;let n=t||this.view(e);if(a.debug&&a.run("debug",{component:this,_:n?".":"-",state:e,vdom:n,el:this.element}),"object"!=typeof document)return;const o="string"==typeof this.element&&this.element?(0,i.oP)(this.element)||(0,i.bV)(this.element):this.element;o?(this.unload?o._component===this&&o.getAttribute(c)===this.tracking_id||(this.tracking_element&&this.tracking_element!==o&&f(this.tracking_element),this.tracking_id=(++u).toString(36),o.setAttribute(c,this.tracking_id),this.tracking_element=o,function(e,t,n){const o=h.get(t);o&&o.component!==e&&m(t),h.set(t,{component:e,tracking_id:n}),!d&&"undefined"!=typeof MutationObserver&&"object"==typeof document&&document.body&&(d=new MutationObserver((e=>{e.forEach((e=>{if("attributes"===e.type){const t=e.target,n=h.get(t);n&&e.oldValue===n.tracking_id&&m(t)}else"childList"===e.type&&Array.from(h.keys()).forEach((e=>{document.body.contains(e)||m(e)}))}))})),d.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:[c]}))}(this,o,this.tracking_id)):(f(this.tracking_element),this.tracking_element=null,o.removeAttribute&&o.removeAttribute(c)),o._component=this,!t&&n&&(n=(0,l.A)(n,this),this.options.transition&&document&&document.startViewTransition?document.startViewTransition((()=>a.render(o,n,this))):a.render(o,n,this)),this.rendered&&this.rendered(this.state)):console.warn(`Component element not found: ${this.element}`)}setState(e,t={render:!0,history:!1}){const n=e;if(n?.[Symbol.asyncIterator])this.setState((async e=>{try{for(;;){const{value:n,done:o}=await e.next();if(o)break;this.setState(n,t)}}catch(e){console.error("Error in async iterator:",e)}})(n[Symbol.asyncIterator]()),t);else if(n?.[Symbol.iterator]&&"function"==typeof n.next)for(const e of n)this.setState(e,t);else if(e&&e instanceof Promise){const n=e;this._pending_state=n,Promise.resolve(n).then((e=>{this._pending_state===n&&(this._pending_state=null,this.setState(e,t))}))}else{if(this._state=e,null==e)return;this._pending_state=null,this.state=e,!1!==t.render&&(t.transition&&document&&document.startViewTransition?document.startViewTransition((()=>this.renderState(e))):this.renderState(e)),!1!==t.history&&this.enable_history&&(this._history=[...this._history,e],this._history_idx=this._history.length-1),"function"==typeof t.callback&&t.callback(this.state)}}constructor(e,t,n,r={}){this.state=e,this.view=t,this.update=n,this.options=r,this._app=new o.q,this._actions=[],this._global_events=[],this._history=[],this._history_idx=-1,this.enable_history=!1,this.global_event=!1,this.tracking_element=null,this._history_prev=()=>{this._history_idx--,this._history_idx>=0?this.setState(this._history[this._history_idx],{render:!0,history:!1}):this._history_idx=0},this._history_next=()=>{this._history_idx++,this._history_idx<this._history.length?this.setState(this._history[this._history_idx],{render:!0,history:!1}):this._history_idx=this._history.length-1},this.start=(e=null,t)=>{if(this.mount(e,{render:!0,...t}),this.mounted&&"function"==typeof this.mounted){const e=this.mounted({},[],this.state);void 0!==e&&this.setState(e)}return this}}mount(e=null,t){if(console.assert(!this.element,"Component already mounted."),this.options=t={...this.options,...t},this.element=e,this.global_event=t.global_event,this.enable_history=!!t.history,this.enable_history){const e=function(e){return"object"==typeof e&&null!==e?e:{}}(t.history);this.on(e.prev||"history-prev",this._history_prev),this.on(e.next||"history-next",this._history_next)}return t.route&&(this.update=this.update||{},this.update[t.route]||(this.update[t.route]=s)),this.add_actions(),this.state=this.state??this.model??{},"function"==typeof this.state&&(this.state=this.state()),this.setState(this.state,{render:!!t.render,history:!0}),a.debug&&a.find("debug-create-component")?.length&&a.run("debug-create-component",this),this}is_global_event(e){return e&&(this.global_event||this._global_events.indexOf(e)>=0||e.startsWith("#")||e.startsWith("/")||e.startsWith("@"))}add_action(e,t,n={}){t&&"function"==typeof t?(n.global&&this._global_events.push(e),this.on(e,((...o)=>{a.debug&&a.run("debug",{component:this,_:">",event:e,p:o,current_state:this.state,options:n});try{const r=t(this.state,...o);a.debug&&a.run("debug",{component:this,_:"<",event:e,p:o,newState:r,state:this.state,options:n}),this.setState(r,n)}catch(t){const r={event:e,error:t,component:this,state:this.state,args:o,phase:"component"};a.find("error")?.length?a.run("error",r):console.error(`Error in component action '${e}':`,t),a.debug&&a.run("debug",{component:this,_:"!",event:e,p:o,error:t,state:this.state,options:n})}}),n)):console.warn(`Component action for '${e}' is not a valid function:`,t)}add_actions(){const e=this.update||{};r.W9.getMetadataKeys(this).forEach((t=>{if(t.startsWith("apprun-update:")){const n=r.W9.getMetadata(t,this);e[n.name]=[this[n.key].bind(this),n.options]}}));const t={};Array.isArray(e)?e.forEach((e=>{const[n,o,r]=e;n.toString().split(",").forEach((e=>t[e.trim()]=[o,r]))})):Object.keys(e).forEach((n=>{const o=e[n];("function"==typeof o||Array.isArray(o))&&n.split(",").forEach((e=>t[e.trim()]=o))})),t["."]||(t["."]=s),Object.keys(t).forEach((e=>{const n=t[e];"function"==typeof n?this.add_action(e,n):Array.isArray(n)&&this.add_action(e,n[0],n[1])}))}run(e,...t){if(this.state instanceof Promise)return Promise.resolve(this.state).then((n=>{this.state=n,this.run(e,...t)}));{const n=e.toString();return this.is_global_event(n)?a.run(n,...t):this._app.run(n,...t)}}on(e,t,n){const o=e.toString();return this._actions.push({name:o,fn:t}),this.is_global_event(o)?a.on(o,t,n):this._app.on(o,t,n)}runAsync(e,...t){const n=e.toString();return this.is_global_event(n)?a.runAsync(n,...t):this._app.runAsync(n,...t)}unmount(){f(this.tracking_element),this.tracking_element=null,this._actions.forEach((e=>{const{name:t,fn:n}=e;this.is_global_event(t)?a.off(t,n):this._app.off(t,n)}))}}g.__isAppRunComponent=!0},147:(e,t,n)=>{n.d(t,{E:()=>i});var o=n(627),r=n(18);const l=Object.keys(r);class i extends o.R{constructor(e,t,n,o){let i=-1;if(super(e,t),s(this,"space",o),"number"==typeof n)for(;++i<l.length;){const e=l[i];s(this,l[i],(n&r[e])===r[e])}}}function s(e,t,n){n&&(e[t]=n)}i.prototype.defined=!0},176:(e,t,n)=>{n.d(t,{S:()=>o});class o{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}o.prototype.normal={},o.prototype.property={},o.prototype.space=void 0},259:(e,t,n)=>{n.d(t,{v:()=>i});var o=n(457),r=n(147),l=n(176);function i(e){const t={},n={};for(const[l,i]of Object.entries(e.properties)){const s=new r.E(l,e.transform(e.attributes||{},l),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(s.mustUseProperty=!0),t[l]=s,n[(0,o.S)(l)]=l,n[(0,o.S)(s.attribute)]=l}return new l.S(t,n,e.space)}},277:(e,t,n)=>{n.d(t,{a:()=>l});var o=n(259),r=n(18);const l=(0,o.v)({properties:{ariaActiveDescendant:null,ariaAtomic:r.booleanish,ariaAutoComplete:null,ariaBusy:r.booleanish,ariaChecked:r.booleanish,ariaColCount:r.number,ariaColIndex:r.number,ariaColSpan:r.number,ariaControls:r.spaceSeparated,ariaCurrent:null,ariaDescribedBy:r.spaceSeparated,ariaDetails:null,ariaDisabled:r.booleanish,ariaDropEffect:r.spaceSeparated,ariaErrorMessage:null,ariaExpanded:r.booleanish,ariaFlowTo:r.spaceSeparated,ariaGrabbed:r.booleanish,ariaHasPopup:null,ariaHidden:r.booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:r.spaceSeparated,ariaLevel:r.number,ariaLive:null,ariaModal:r.booleanish,ariaMultiLine:r.booleanish,ariaMultiSelectable:r.booleanish,ariaOrientation:null,ariaOwns:r.spaceSeparated,ariaPlaceholder:null,ariaPosInSet:r.number,ariaPressed:r.booleanish,ariaReadOnly:r.booleanish,ariaRelevant:null,ariaRequired:r.booleanish,ariaRoleDescription:r.spaceSeparated,ariaRowCount:r.number,ariaRowIndex:r.number,ariaRowSpan:r.number,ariaSelected:r.booleanish,ariaSetSize:r.number,ariaSort:null,ariaValueMax:r.number,ariaValueMin:r.number,ariaValueNow:r.number,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()})},292:(e,t,n)=>{n.d(t,{app:()=>f,default:()=>g});var o=n(859),r=n(791),l=n(91),i=n(9),s=n(475),a=n(436);function u(e){return e&&"object"==typeof e&&"function"==typeof e.mount}function c(e){return"function"==typeof e&&e.prototype&&e.prototype.constructor===e&&(void 0!==e.prototype.mount||void 0!==e.prototype.state||void 0!==e.prototype.view)}function h(e){return"function"==typeof e&&!c(e)}async function d(e,t=3){let n=e,o=0;for(;h(n)&&o<t;)try{const e=await n();if(e===n)break;n=e,o++}catch(e){console.error(`Error executing component function: ${e}`);break}return n}const p=async(e,t)=>{for(const[n,r]of Object.entries(t))if(r&&n)if(u(r)){const t={route:n};r.mount(e,t)}else if(c(r)){const t={route:n};(new r).mount(e,t)}else if(h(r)){let t=await d(r);if(u(t)){const o={route:n};t.mount(e,o);continue}if(c(t)){const o={route:n};(new t).mount(e,o);continue}o.A.on(n,((...t)=>{const n=r(...t),l="string"==typeof e?document.querySelector(e):e;if(l)return o.A.render(l,n);console.error(`Element not found: ${e}`)}))}else console.error("Invalid component: component must be a class, instance, or function that returns a class/instance");else console.error(`Invalid component configuration: component=${r}, route=${n}`)};var m=n(672);const f=o.A,g=f;if(!f.start){f.version=m.a,f.h=f.createElement=r.n,f.render=r.cJ,f.Fragment=r.FK,f.webComponent=a.A,f.trustedHTML=r.Fs,f.safeHTML=r.t_,f.start=(e,t,n,o,r)=>{const i={render:!0,global_event:!0,...r},s=new l.u(t,n,o);return r&&r.rendered&&(s.rendered=r.rendered),r&&r.mounted&&(s.mounted=r.mounted),s.start(e,i),s};const e=e=>{};if(f.on("/",e),f.on("debug",(t=>e)),f.on(s.z0,e),f.on(s.a6,e),f.route=s.wE,f.on("route",(e=>f.route&&f.route(e))),"object"==typeof document&&document.addEventListener("DOMContentLoaded",(()=>{const e=document.body.hasAttribute("apprun-no-init")||f["no-init-route"]||!1,t=f.find("#")||f.find("#/")||!1;window.addEventListener("hashchange",(()=>(0,s.wE)(location.hash))),window.addEventListener("popstate",(()=>(0,s.wE)(location.pathname))),t?!e&&(0,s.wE)(location.hash):(!e&&(()=>{const e=f.basePath||"";let t=location.pathname;e&&t.startsWith(e)&&(t=t.substring(e.length),t.startsWith("/")||(t="/"+t)),(0,s.wE)(t)})(),document.body.addEventListener("click",(e=>{const t=e.target,n=t instanceof Element?t:t?.parentElement;if(!n)return;((e,t)=>{if(!((e,t)=>!(!t||e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||t.target&&"_self"!==t.target.toLowerCase()||t.hasAttribute("download")||(t.getAttribute("rel")||"").toLowerCase().split(/\s+/).includes("external")||t.origin!==location.origin||!t.pathname))(e,t))return!1;e.preventDefault();const n=(f.basePath||"")+t.pathname;history.pushState(null,"",n),(0,s.wE)(t.pathname)})(e,"A"===n.tagName?n:n.closest("a"))})))})),"object"==typeof window){const e=window;e.Component=l.u,e.on=i.on,e.customElement=i.EM,e.trustedHTML=r.Fs,e.safeHTML=r.t_}f.use_render=(e,t=0)=>{f.render=0===t?(t,n)=>e(n,t):(t,n)=>e(t,n)},f.use_react=(e,t)=>{if(e&&t)if("function"==typeof e.createElement)if(e.Fragment)if(f.h=f.createElement=e.createElement,f.Fragment=e.Fragment,e.version&&e.version.startsWith("18")){if(!t.createRoot||"function"!=typeof t.createRoot)return void console.error("AppRun use_react: ReactDOM.createRoot not found in React 18+");f.render=(e,n)=>{e&&void 0!==n&&(e._root||(e._root=t.createRoot(e)),e._root.render(n))}}else{if(!t.render||"function"!=typeof t.render)return void console.error("AppRun use_react: ReactDOM.render not found in legacy React");f.render=(e,n)=>t.render(n,e)}else console.error("AppRun use_react: Invalid React object - Fragment not found");else console.error("AppRun use_react: Invalid React object - createElement method not found");else console.error("AppRun use_react: React and ReactDOM parameters are required")},f.addComponents=p}},436:(e,t,n)=>{n.d(t,{A:()=>r});const o=(e,t={})=>class extends HTMLElement{constructor(){super(),this._pendingAttributes=[]}get component(){return this._component}get state(){return this._component.state}static get observedAttributes(){return(t.observedAttributes||[]).map((e=>e.toLowerCase()))}connectedCallback(){if(this.isConnected&&!this._component&&null==this._mountFrame){const n=t||{};this._shadowRoot=n.shadow?this.attachShadow({mode:"open"}):this;const o=n.observedAttributes||[],r=o.reduce(((e,t)=>{const n=t.toLowerCase();return n!==t&&(e[n]=t),e}),{});this._attrMap=e=>r[e]||e;const l={};Array.from(this.attributes).forEach((e=>l[this._attrMap(e.name)]=e.value)),o.forEach((e=>{void 0!==this[e]&&(l[e]=this[e]),Object.defineProperty(this,e,{get:()=>l[e],set(t){this.attributeChangedCallback(e,l[e],t)},configurable:!0,enumerable:!0})})),this._mountFrame=requestAnimationFrame((()=>{if(this._mountFrame=null,!this.isConnected)return;const t=this.children?Array.from(this.children):[];if(this._component=new e({...l,children:t}).mount(this._shadowRoot,n),this._component._props=l,this._component.dispatchEvent=this.dispatchEvent.bind(this),this._component.mounted){const e=this._component.mounted(l,t,this._component.state);void 0!==e&&(this._component.state=e)}this.on=this._component.on.bind(this._component),this.run=this._component.run.bind(this._component);const o=this._pendingAttributes;this._pendingAttributes=[],o.forEach((({name:e,oldValue:t,value:n})=>{this.attributeChangedCallback(e,t,n)})),!1!==n.render&&this._component.run(".")}))}}disconnectedCallback(){null!=this._mountFrame&&(cancelAnimationFrame(this._mountFrame),this._mountFrame=null),this._pendingAttributes=[],this._component?.unload?.(this._component.state),this._component?.unmount?.(),this._component=null}attributeChangedCallback(e,n,o){if(this._component){const r=this._attrMap?this._attrMap(e):e;this._component._props[r]=o,this._component.run("attributeChanged",r,n,o),o!==n&&!1!==t.render&&window.requestAnimationFrame((()=>{this._component?.run(".")}))}else this._pendingAttributes.push({name:e,oldValue:n,value:o})}},r=(e,t,n)=>{"undefined"!=typeof customElements&&customElements.define(e,o(t,n))}},457:(e,t,n)=>{function o(e){return e.toLowerCase()}n.d(t,{S:()=>o})},475:(e,t,n)=>{n.d(t,{a6:()=>c,wE:()=>h,z0:()=>u});var o=n(859);function r(e){return e?e.startsWith("#/")?e.substring(2).split("/"):e.startsWith("#")||e.startsWith("/")?e.substring(1).split("/"):e.split("/"):[]}function l(e){return e.startsWith("#/")?"hash-slash":e.startsWith("#")?"hash":e.startsWith("/")?"path":"non-prefixed"}function i(){const e=o.A.find("#");if(e&&e.length>0)return o.A.run("#"),void o.A.run(u,"#");const t=o.A.find("/");if(t&&t.length>0)return o.A.run("/"),void o.A.run(u,"/");const n=o.A.find("#/");if(n&&n.length>0)return o.A.run("#/"),void o.A.run(u,"#/");o.A.debug&&console.warn("No subscribers for event: "),o.A.run(c,""),o.A.run(u,"")}function s(e){if(!e)return void i();e=function(e){return e&&"/"!==e&&"#"!==e&&"#/"!==e&&e.endsWith("/")?e.slice(0,-1):e}(e);const t=o.A.basePath;t&&(e=function(e,t){if(!t||"/"===t||""===t)return e;const n=t.startsWith("/")?t:"/"+t;if(e.startsWith(n)){const t=e.substring(n.length);return t.startsWith("/")?t:"/"+t}return e}(e,t));const n=r(e);!function(e){const t=e.filter(Boolean);t.length>11&&console.warn(`Deep route hierarchy detected: ${t.join("/")} (${t.length} levels)`)}(n);const s=l(e),h=function(e,t){const n=[];for(let o=e.length;o>0;o--){const r=e.slice(0,o);let l="";switch(t){case"path":l="/"+r.join("/");break;case"hash":l="#"+r.join("/");break;case"hash-slash":l="#/"+r.join("/");break;case"non-prefixed":l=r.join("/")}n.push(l)}return n}(n,s),d=h[0],p=o.A.find(d),m=p&&p.length>0?{eventName:d,parameters:[]}:function(e,t){const n=Object.keys(o.A._events||{}).map((n=>function(e,t,n){if(l(e)!==t||!r(e).some((e=>"*"===e||e.startsWith(":"))))return null;const o=r(e),i=[];let s=0;for(let t=0;t<o.length;t++){const r=o[t];if("*"===r)return i.push(n.slice(t).join("/")),{eventName:e,parameters:i,score:10*s+o.length};const l=n[t];if(void 0===l)return null;if(r.startsWith(":"))i.push(l);else{if(r!==l)return null;s++}}return o.length!==n.length?null:{eventName:e,parameters:i,score:10*s+o.length}}(n,e,t))).filter(Boolean).sort(((e,t)=>t.score-e.score||t.eventName.length-e.eventName.length));return n.length>0?{eventName:n[0].eventName,parameters:n[0].parameters}:null}(s,n)||function(e,t){for(let n=0;n<e.length;n++){const r=e[n],l=o.A.find(r);if(l&&l.length>0){const o=e.length-n;return{eventName:r,parameters:t.slice(o)}}}return null}(h.slice(1),n);if(m)a(m.eventName,...m.parameters);else if(h.length>0){const t=h[h.length-1];o.A.debug&&console.warn(`No subscribers for event: ${t}`),o.A.run(c,e),o.A.run(u,e)}else i()}const a=(e,...t)=>{if(!e||e===u||e===c)return;const n=o.A.find(e);n&&0!==n.length?o.A.run(e,...t):(o.A.debug&&console.warn(`No subscribers for event: ${e}`),o.A.run(c,e,...t)),o.A.run(u,e,...t)},u="//",c="///",h=e=>{o.A.lastUrl!==e&&(o.A.lastUrl=e,s(e))}},530:(e,t,n)=>{n.d(t,{_:()=>r});var o=n(815);function r(e,t){return(0,o.B)(e,t.toLowerCase())}},559:(e,t,n)=>{n.d(t,{_:()=>o});const o=(0,n(259).v)({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()})},564:(e,t,n)=>{n.d(t,{J:()=>i});var o=n(815),r=n(259),l=n(18);const i=(0,r.v)({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:l.commaOrSpaceSeparated,accentHeight:l.number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:l.number,amplitude:l.number,arabicForm:null,ascent:l.number,attributeName:null,attributeType:null,azimuth:l.number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:l.number,by:null,calcMode:null,capHeight:l.number,className:l.spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:l.number,diffuseConstant:l.number,direction:null,display:null,dur:null,divisor:l.number,dominantBaseline:null,download:l.boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:l.number,enableBackground:null,end:null,event:null,exponent:l.number,externalResourcesRequired:null,fill:null,fillOpacity:l.number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:l.commaSeparated,g2:l.commaSeparated,glyphName:l.commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:l.number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:l.number,horizOriginX:l.number,horizOriginY:l.number,id:null,ideographic:l.number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:l.number,k:l.number,k1:l.number,k2:l.number,k3:l.number,k4:l.number,kernelMatrix:l.commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:l.number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:l.number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:l.number,overlineThickness:l.number,paintOrder:null,panose1:null,path:null,pathLength:l.number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:l.spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:l.number,pointsAtY:l.number,pointsAtZ:l.number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:l.commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:l.commaOrSpaceSeparated,rev:l.commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:l.commaOrSpaceSeparated,requiredFeatures:l.commaOrSpaceSeparated,requiredFonts:l.commaOrSpaceSeparated,requiredFormats:l.commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:l.number,specularExponent:l.number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:l.number,strikethroughThickness:l.number,string:null,stroke:null,strokeDashArray:l.commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:l.number,strokeOpacity:l.number,strokeWidth:null,style:null,surfaceScale:l.number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:l.commaOrSpaceSeparated,tabIndex:l.number,tableValues:null,target:null,targetX:l.number,targetY:l.number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:l.commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:l.number,underlineThickness:l.number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:l.number,values:null,vAlphabetic:l.number,vMathematical:l.number,vectorEffect:null,vHanging:l.number,vIdeographic:l.number,version:null,vertAdvY:l.number,vertOriginX:l.number,vertOriginY:l.number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:l.number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:o.B})},569:(e,t,n)=>{n.d(t,{q:()=>i});var o=n(530),r=n(259),l=n(18);const i=(0,r.v)({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:l.commaSeparated,acceptCharset:l.spaceSeparated,accessKey:l.spaceSeparated,action:null,allow:null,allowFullScreen:l.boolean,allowPaymentRequest:l.boolean,allowUserMedia:l.boolean,alt:null,as:null,async:l.boolean,autoCapitalize:null,autoComplete:l.spaceSeparated,autoFocus:l.boolean,autoPlay:l.boolean,blocking:l.spaceSeparated,capture:null,charSet:null,checked:l.boolean,cite:null,className:l.spaceSeparated,cols:l.number,colSpan:null,content:null,contentEditable:l.booleanish,controls:l.boolean,controlsList:l.spaceSeparated,coords:l.number|l.commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:l.boolean,defer:l.boolean,dir:null,dirName:null,disabled:l.boolean,download:l.overloadedBoolean,draggable:l.booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:l.boolean,formTarget:null,headers:l.spaceSeparated,height:l.number,hidden:l.overloadedBoolean,high:l.number,href:null,hrefLang:null,htmlFor:l.spaceSeparated,httpEquiv:l.spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:l.boolean,inputMode:null,integrity:null,is:null,isMap:l.boolean,itemId:null,itemProp:l.spaceSeparated,itemRef:l.spaceSeparated,itemScope:l.boolean,itemType:l.spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:l.boolean,low:l.number,manifest:null,max:null,maxLength:l.number,media:null,method:null,min:null,minLength:l.number,multiple:l.boolean,muted:l.boolean,name:null,nonce:null,noModule:l.boolean,noValidate:l.boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:l.boolean,optimum:l.number,pattern:null,ping:l.spaceSeparated,placeholder:null,playsInline:l.boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:l.boolean,referrerPolicy:null,rel:l.spaceSeparated,required:l.boolean,reversed:l.boolean,rows:l.number,rowSpan:l.number,sandbox:l.spaceSeparated,scope:null,scoped:l.boolean,seamless:l.boolean,selected:l.boolean,shadowRootClonable:l.boolean,shadowRootDelegatesFocus:l.boolean,shadowRootMode:null,shape:null,size:l.number,sizes:null,slot:null,span:l.number,spellCheck:l.booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:l.number,step:null,style:null,tabIndex:l.number,target:null,title:null,translate:null,type:null,typeMustMatch:l.boolean,useMap:null,value:l.booleanish,width:l.number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:l.spaceSeparated,axis:null,background:null,bgColor:null,border:l.number,borderColor:null,bottomMargin:l.number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:l.boolean,declare:l.boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:l.number,leftMargin:l.number,link:null,longDesc:null,lowSrc:null,marginHeight:l.number,marginWidth:l.number,noResize:l.boolean,noHref:l.boolean,noShade:l.boolean,noWrap:l.boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:l.number,rules:null,scheme:null,scrolling:l.booleanish,standby:null,summary:null,text:null,topMargin:l.number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:l.number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:l.boolean,disableRemotePlayback:l.boolean,prefix:null,property:null,results:l.number,security:null,unselectable:null},space:"html",transform:o._})},597:(e,t,n)=>{n.d(t,{o:()=>d});var o=n(775),r=n(862);const l="_props",i=new Map;function s(e,t,n){!function(e){return null!=e&&!1!==e&&""!==e&&(!0===e||("string"==typeof e?"false"!==e.toLowerCase()&&"0"!==e:Boolean(e)))}(n)?e.removeAttribute(t):e.setAttribute(t,t)}function a(e,t,n){try{e[t]=n}catch(o){u(e,t,n,!1)}}function u(e,t,n,o){if(null==n)return void e.removeAttribute(t);const r=String(n);if(o&&t.includes(":")){const[n]=t.split(":");"xlink"===n?e.setAttributeNS("http://www.w3.org/1999/xlink",t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}function c(e,t,n,l){if(c=e,h=t,document.activeElement===c?["selectionStart","selectionEnd","selectionDirection"].includes(h):"scrollTop"===h||"scrollLeft"===h||c instanceof HTMLMediaElement&&["currentTime","paused","playbackRate","volume"].includes(h))return;var c,h;if("style"===t){if(e.style.cssText&&(e.style.cssText=""),"string"==typeof n)e.style.cssText=n;else if(n&&"object"==typeof n)for(const t in n)e.style[t]!==n[t]&&(e.style[t]=n[t]);return}if("key"===t)return void(null!=n&&(e.key=n));if(t.startsWith("data-"))return void function(e,t,n){const o=(r=t.slice(5)).length<=1?r.toLowerCase():r.split("-").map(((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())).join("");var r;null==n?delete e.dataset[o]:e.dataset[o]=String(n)}(e,t,n);if(t.startsWith("on"))return void function(e,t,n){t.startsWith("on")&&(n&&"function"!=typeof n?"string"==typeof n&&(n?e.setAttribute(t,n):e.removeAttribute(t)):e[t]=n)}(e,t,n);if(!("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"SELECT"!==e.tagName||"value"!==t&&"selected"!==t&&"selectedIndex"!==t))return void a(e,t,n);if("INPUT"===e.tagName&&"checked"===t)return a(e,t,n),void s(e,t,n);const d=function(e,t){const n=`${e}:${t}`;let l=i.get(n);return void 0===l&&(l=(0,o.I)(t?r.JW:r.qy,e)||null,i.set(n,l)),l}(t,l);d?d.boolean||d.overloadedBoolean?s(e,d.attribute,n):d.mustUseProperty&&!l?a(e,d.property,n):u(e,d.attribute,n,l):t.startsWith("aria-")||"role"===t?u(e,t,n,l):t in e||void 0!==e[t]?a(e,t,n):u(e,t,n,l)}function h(e){return/^[a-zA-Z_:][\w\-:.]*$/.test(e)&&!e.includes("<")&&!e.includes(">")&&!e.includes('"')&&!e.includes("'")}function d(e,t,n){const o=function(e,t){if(t&&(t.class=t.class||t.className,delete t.className),!e||0===Object.keys(e).length)return t||{};if(!t||0===Object.keys(t).length){const t={};return Object.keys(e).forEach((e=>t[e]=null)),t}const n={};return Object.keys(e).forEach((e=>{e in t||(n[e]=null)})),Object.keys(t).forEach((e=>n[e]=t[e])),n}(e[l]||{},t);e[l]=t||{},function(e,t,n,o){for(const n in t)h(n)&&c(e,n,t[n],o);t&&"function"==typeof t.ref&&window.requestAnimationFrame((()=>t.ref(e)))}(e,o,0,n)}},627:(e,t,n)=>{n.d(t,{R:()=>o});class o{constructor(e,t){this.attribute=t,this.property=e}}o.prototype.attribute="",o.prototype.booleanish=!1,o.prototype.boolean=!1,o.prototype.commaOrSpaceSeparated=!1,o.prototype.commaSeparated=!1,o.prototype.defined=!1,o.prototype.mustUseProperty=!1,o.prototype.number=!1,o.prototype.overloadedBoolean=!1,o.prototype.property="",o.prototype.spaceSeparated=!1,o.prototype.space=void 0},634:(e,t,n)=>{function o(e){return e?.target instanceof HTMLElement?e.target:null}function r(e,t){"object"==typeof e&&null!==e&&Object.keys(t).forEach((n=>{e[n]=t[n]}))}function l(e,t=document){try{return t.querySelector(e)}catch(t){return console.warn(`Invalid selector: ${e}`,t),null}}function i(e){try{return document.getElementById(e)}catch(t){return console.warn(`Error getting element by id: ${e}`,t),null}}n.d(t,{PB:()=>o,Q0:()=>r,bV:()=>l,oP:()=>i})},670:(e,t,n)=>{n.d(t,{F:()=>o});const o=(0,n(259).v)({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()})},672:(e,t,n)=>{n.d(t,{C:()=>r,a:()=>o});const o="6.0.0",r=`AppRun-${o}`},741:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(859),r=n(634);const l=e=>{if(!e)return[];const t=[];let n="",o=!1,r="";for(let l=0;l<e.length;l++){const i=e[l];"["!==i||o?"]"===i&&o?(r?n=n.slice(1,-1):/^\d+$/.test(n)&&(n=parseInt(n,10)),t.push(n),n="",o=!1,r=""):'"'!==i&&"'"!==i||!o?"."!==i||o?n+=i:n&&(t.push(n),n=""):(r?i===r&&(r=""):r=i,n+=i):(n&&(t.push(n),n=""),o=!0)}return n&&t.push(n),t},i=(e,t)=>{if(!t)return e.state||"";const n=l(t),o=((e,t)=>{let n=e;for(const e of t){if(null==n)return;n=n[e]}return n})(e.state,n);return void 0!==o?o:""},s=(e,t,n)=>{if(!t)return void e.setState(n);const o=l(t),r=((e,t,n)=>{if(0===t.length)return n;const o={...e};let r=o;for(let e=0;e<t.length-1;e++){const n=t[e],o=t[e+1];null==r[n]?r[n]="number"==typeof o?[]:{}:Array.isArray(r[n])?r[n]=[...r[n]]:"object"==typeof r[n]&&(r[n]={...r[n]}),r=r[n]}return r[t[t.length-1]]=n,o})(e.state||{},o,n);e.setState(r)},a=(e,t)=>{if(Array.isArray(e))return e.map((e=>a(e,t)));{let{type:n,tag:l,props:u,children:c}=e;return l=l||n,c=c||u?.children,u&&Object.keys(u).forEach((e=>{e.startsWith("$")&&(((e,t,n,l)=>{if(e.startsWith("$on")){const n=t[e];if(e=e.substring(1),"boolean"==typeof n)t[e]=t=>l.run?l.run(e,t):o.A.run(e,t);else if("string"==typeof n)t[e]=e=>l.run?l.run(n,e):o.A.run(n,e);else if("function"==typeof n)t[e]=e=>l.setState(n(l.state,e));else if(Array.isArray(n)){const[r,...i]=n;"string"==typeof r?t[e]=e=>l.run?l.run(r,...i,e):o.A.run(r,...i,e):"function"==typeof r&&(t[e]=e=>l.setState(r(l.state,...i,e)))}}else if("$bind"===e){const o=t.type||"text",a="string"==typeof t[e]?t[e]:t.name;if("input"===n)switch(o){case"checkbox":t.checked=i(l,a),t.onclick=e=>{const t=(0,r.PB)(e);t&&s(l,a||t.name,t.checked)};break;case"radio":t.checked=i(l,a)===t.value,t.onclick=e=>{const t=(0,r.PB)(e);t&&s(l,a||t.name,t.value)};break;case"number":case"range":t.value=i(l,a),t.oninput=e=>{const t=(0,r.PB)(e);t&&s(l,a||t.name,Number(t.value))};break;default:t.value=i(l,a),t.oninput=e=>{const t=(0,r.PB)(e);t&&s(l,a||t.name,t.value)}}else"select"===n?(t.value=i(l,a),t.onchange=e=>{const t=(0,r.PB)(e);t&&!t.multiple&&s(l,a||t.name,t.value)}):"option"===n?(t.selected=i(l,a),t.onclick=e=>{const t=(0,r.PB)(e);t&&s(l,a||t.name,t.selected)}):"textarea"===n&&(t.value=i(l,a),t.oninput=e=>{const t=(0,r.PB)(e);t&&s(l,a||t.name,t.value)})}else o.A.run("$",{key:e,tag:n,props:t,component:l})})(e,u,l,t),delete u[e])})),c&&a(c,t),e}},u=a},752:(e,t,n)=>{n.d(t,{JW:()=>E,XX:()=>W,c0:()=>w,qy:()=>$,s6:()=>C});const o=globalThis,r=o.trustedTypes,l=r?r.createPolicy("lit-html",{createHTML:e=>e}):void 0,i="$lit$",s=`lit$${Math.random().toFixed(9).slice(2)}$`,a="?"+s,u=`<${a}>`,c=document,h=()=>c.createComment(""),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,p=Array.isArray,m="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,y=/>/g,b=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),_=/'/g,v=/"/g,A=/^(?:script|style|textarea|title)$/i,S=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),$=S(1),E=S(2),w=(S(3),Symbol.for("lit-noChange")),C=Symbol.for("lit-nothing"),k=new WeakMap,P=c.createTreeWalker(c,129);function x(e,t){if(!p(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==l?l.createHTML(t):t}const O=(e,t)=>{const n=e.length-1,o=[];let r,l=2===t?"<svg>":3===t?"<math>":"",a=f;for(let t=0;t<n;t++){const n=e[t];let c,h,d=-1,p=0;for(;p<n.length&&(a.lastIndex=p,h=a.exec(n),null!==h);)p=a.lastIndex,a===f?"!--"===h[1]?a=g:void 0!==h[1]?a=y:void 0!==h[2]?(A.test(h[2])&&(r=RegExp("</"+h[2],"g")),a=b):void 0!==h[3]&&(a=b):a===b?">"===h[0]?(a=r??f,d=-1):void 0===h[1]?d=-2:(d=a.lastIndex-h[2].length,c=h[1],a=void 0===h[3]?b:'"'===h[3]?v:_):a===v||a===_?a=b:a===g||a===y?a=f:(a=b,r=void 0);const m=a===b&&e[t+1].startsWith("/>")?" ":"";l+=a===f?n+u:d>=0?(o.push(c),n.slice(0,d)+i+n.slice(d)+s+m):n+s+(-2===d?t:m)}return[x(e,l+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),o]};class M{constructor({strings:e,_$litType$:t},n){let o;this.parts=[];let l=0,u=0;const c=e.length-1,d=this.parts,[p,m]=O(e,t);if(this.el=M.createElement(p,n),P.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=P.nextNode())&&d.length<c;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(i)){const t=m[u++],n=o.getAttribute(e).split(s),r=/([.?@])?(.*)/.exec(t);d.push({type:1,index:l,name:r[2],strings:n,ctor:"."===r[1]?D:"?"===r[1]?N:"@"===r[1]?j:U}),o.removeAttribute(e)}else e.startsWith(s)&&(d.push({type:6,index:l}),o.removeAttribute(e));if(A.test(o.tagName)){const e=o.textContent.split(s),t=e.length-1;if(t>0){o.textContent=r?r.emptyScript:"";for(let n=0;n<t;n++)o.append(e[n],h()),P.nextNode(),d.push({type:2,index:++l});o.append(e[t],h())}}}else if(8===o.nodeType)if(o.data===a)d.push({type:2,index:l});else{let e=-1;for(;-1!==(e=o.data.indexOf(s,e+1));)d.push({type:7,index:l}),e+=s.length-1}l++}}static createElement(e,t){const n=c.createElement("template");return n.innerHTML=e,n}}function T(e,t,n=e,o){if(t===w)return t;let r=void 0!==o?n._$Co?.[o]:n._$Cl;const l=d(t)?void 0:t._$litDirective$;return r?.constructor!==l&&(r?._$AO?.(!1),void 0===l?r=void 0:(r=new l(e),r._$AT(e,n,o)),void 0!==o?(n._$Co??=[])[o]=r:n._$Cl=r),void 0!==r&&(t=T(e,r._$AS(e,t.values),r,o)),t}class R{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,o=(e?.creationScope??c).importNode(t,!0);P.currentNode=o;let r=P.nextNode(),l=0,i=0,s=n[0];for(;void 0!==s;){if(l===s.index){let t;2===s.type?t=new L(r,r.nextSibling,this,e):1===s.type?t=new s.ctor(r,s.name,s.strings,this,e):6===s.type&&(t=new H(r,this,e)),this._$AV.push(t),s=n[++i]}l!==s?.index&&(r=P.nextNode(),l++)}return P.currentNode=c,o}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class L{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,o){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=T(this,e,t),d(e)?e===C||null==e||""===e?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==w&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>p(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==C&&d(this._$AH)?this._$AA.nextSibling.data=e:this.T(c.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,o="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=M.createElement(x(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new R(o,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=k.get(e.strings);return void 0===t&&k.set(e.strings,t=new M(e)),t}k(e){p(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,o=0;for(const r of e)o===t.length?t.push(n=new L(this.O(h()),this.O(h()),this,this.options)):n=t[o],n._$AI(r),o++;o<t.length&&(this._$AR(n&&n._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class U{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,o,r){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=C}_$AI(e,t=this,n,o){const r=this.strings;let l=!1;if(void 0===r)e=T(this,e,t,0),l=!d(e)||e!==this._$AH&&e!==w,l&&(this._$AH=e);else{const o=e;let i,s;for(e=r[0],i=0;i<r.length-1;i++)s=T(this,o[n+i],t,i),s===w&&(s=this._$AH[i]),l||=!d(s)||s!==this._$AH[i],s===C?e=C:e!==C&&(e+=(s??"")+r[i+1]),this._$AH[i]=s}l&&!o&&this.j(e)}j(e){e===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class D extends U{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===C?void 0:e}}class N extends U{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==C)}}class j extends U{constructor(e,t,n,o,r){super(e,t,n,o,r),this.type=5}_$AI(e,t=this){if((e=T(this,e,t,0)??C)===w)return;const n=this._$AH,o=e===C&&n!==C||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==C&&(n===C||o);o&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class H{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){T(this,e)}}const B=o.litHtmlPolyfillSupport;B?.(M,L),(o.litHtmlVersions??=[]).push("3.3.0");const W=(e,t,n)=>{const o=n?.renderBefore??t;let r=o._$litPart$;if(void 0===r){const e=n?.renderBefore??null;o._$litPart$=r=new L(t.insertBefore(h(),e),e,void 0,n??{})}return r._$AI(e),r}},775:(e,t,n)=>{n.d(t,{I:()=>u});var o=n(147),r=n(627),l=n(457);const i=/[A-Z]/g,s=/-[a-z]/g,a=/^data[-\w.:]+$/i;function u(e,t){const n=(0,l.S)(t);let u=t,d=r.R;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&a.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(s,h);u="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!s.test(e)){let n=e.replace(i,c);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}d=o.E}return new d(u,t)}function c(e){return"-"+e.toLowerCase()}function h(e){return e.charAt(1).toUpperCase()}},791:(e,t,n)=>{n.d(t,{FK:()=>l,Fs:()=>d,cJ:()=>a,n:()=>s,t_:()=>p});var o=n(741),r=n(597);function l(e,...t){return i(t)}function i(e){const t=[],n=e=>{null!=e&&""!==e&&!1!==e&&t.push("function"==typeof e||"object"==typeof e?e:`${e}`)};return e&&e.forEach((e=>{Array.isArray(e)?e.forEach((e=>n(e))):n(e)})),t}function s(e,t,...n){const o=i(n);if("string"==typeof e)return{tag:e,props:t,children:o};if(Array.isArray(e))return e;if(void 0===e&&n)return o;if(Object.getPrototypeOf(e).__isAppRunComponent)return{tag:e,props:t,children:o};if("function"==typeof e)return e(t,o);throw new Error(`Unknown tag in vdom ${e}`)}const a=(e,t,n={})=>{null!=t&&!1!==t&&function(e,t,n={}){if(null==t||!1===t)return;if(function(e){e&&e.__componentCache&&(e.__componentCacheUsed={})}(n),t=g(t,n),function(e){e&&e.__componentCache&&e.__componentCacheUsed&&(Object.keys(e.__componentCache).forEach((t=>{e.__componentCacheUsed[t]||(e.__componentCache[t]?.unmount?.(),delete e.__componentCache[t])})),e.__componentCacheUsed=null)}(n),!e)return;const o="SVG"===e.nodeName;Array.isArray(t)?c(e,t,o):c(e,[t],o)}("string"==typeof e&&e?document.getElementById(e)||document.querySelector(e):e,t=(0,o.A)(t,n),n)};function u(e,t,n){n=n||"svg"===t.tag,function(e,t){const n=e.nodeName,o=`${t.tag||""}`;return n.toUpperCase()===o.toUpperCase()}(e,t)?(c(e,t.children,n),(0,r.o)(e,t.props,n)):e.parentNode.replaceChild(f(t,n),e)}function c(e,t,n){const o={};Array.from(e.childNodes||[]).forEach((e=>{void 0!==e.key&&null!==e.key&&(o[h(e.key)]=e)}));const r=e.childNodes?.length||0,l=t?.length||0,i=Math.min(r,l);for(let r=0;r<i;r++){const l=t[r],i=e.childNodes[r];if("string"==typeof l)i.textContent!==l&&(3===i.nodeType?i.nodeValue=l:e.replaceChild(m(l),i));else if(l instanceof HTMLElement||l instanceof SVGElement)e.insertBefore(l,i);else{const t=l.props?l.props.key:void 0;if(null!=t)if(i.key===t)u(e.childNodes[r],l,n);else{const s=o[h(t)];s?(e.insertBefore(s,i),u(e.childNodes[r],l,n)):e.replaceChild(f(l,n),i)}else u(e.childNodes[r],l,n)}}let s=e.childNodes?.length||0;for(;s>i;)e.removeChild(e.lastChild),s--;if(l>i){const o=document.createDocumentFragment();for(let e=i;e<t.length;e++)o.appendChild(f(t[e],n));e.appendChild(o)}}function h(e){return`${typeof e}:${String(e)}`}const d=e=>{const t=document.createElement("section");return t.insertAdjacentHTML("afterbegin",e),Array.from(t.children)},p=d;function m(e){return document.createTextNode(e??"")}function f(e,t){if(e instanceof HTMLElement||e instanceof SVGElement)return e;if("string"==typeof e)return m(e);if(!e.tag||"function"==typeof e.tag)return m(JSON.stringify(e));const n=(t=t||"svg"===e.tag)?document.createElementNS("http://www.w3.org/2000/svg",e.tag):document.createElement(e.tag);return(0,r.o)(n,e.props,t),e.children&&e.children.forEach((e=>n.appendChild(f(e,t)))),e.props&&void 0!==e.props.key&&null!==e.props.key&&(n.key=e.props.key),n}function g(e,t,n=0){if("string"==typeof e)return e;if(Array.isArray(e))return e.map((e=>g(e,t,n++)));let o=e;if(e&&"function"==typeof e.tag&&Object.getPrototypeOf(e.tag).__isAppRunComponent&&(o=function(e,t,n){const{tag:o,props:l,children:i}=e,s=l&&l.id,a=null!=s?String(s):`_${n}`;let u="section";l&&l.as&&(u=l.as,delete l.as),t.__componentCache||(t.__componentCache={}),function(e,t){e&&(e.__componentCacheUsed=e.__componentCacheUsed||{},e.__componentCacheUsed[t]=!0)}(t,a);let c=t.__componentCache[a];if(c&&c instanceof o&&c.element)c.renderState(c.state);else{const e=document.createElement(u);c=t.__componentCache[a]=new o({...l,children:i}).mount(e,{render:!0})}if(c.mounted){const e=c.mounted(l,i,c.state);void 0!==e&&c.setState(e)}return(0,r.o)(c.element,l,!1),c.element}(e,t,n)),o&&Array.isArray(o.children)){const e=o.props?._component;if(e){let t=0;o.children=o.children.map((n=>g(n,e,t++)))}else o.children=o.children.map((e=>g(e,t,n++)))}return o}},804:(e,t,n)=>{n.d(t,{OA:()=>o,WL:()=>l,u$:()=>r});const o={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},r=e=>(...t)=>({_$litDirective$:e,values:t});class l{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},815:(e,t,n)=>{function o(e,t){return t in e?e[t]:t}n.d(t,{B:()=>o})},859:(e,t,n)=>{n.d(t,{A:()=>a,q:()=>r});var o=n(672);class r{constructor(){this._reporting_error=!1,this._events={},this._wildcard_events=[]}on(e,t,n={}){this._events[e]=this._events[e]||[];const o={fn:t,options:n};this._events[e].push(o),e.endsWith("*")&&(this._wildcard_events.push({name:e,prefix:e.replace("*",""),sub:o}),this._wildcard_events.sort(((e,t)=>t.name.length-e.name.length)))}off(e,t){const n=this._events[e]||[];this._events[e]=n.filter((e=>e.fn!==t)),e.endsWith("*")&&(this._wildcard_events=this._wildcard_events.filter((n=>!(n.name===e&&n.sub.fn===t))))}find(e){return this._events[e]}run(e,...t){const n=this.getSubscribers(e,this._events);return this.debug&&console.assert(n&&n.length>0,"No subscriber for event: "+e),n.forEach((n=>{const{fn:o,options:r}=n;if(!o||"function"!=typeof o)return console.error(`AppRun event handler for '${e}' is not a function:`,o),!1;if(r.delay)this.delay(e,n,t);else try{Object.keys(r).length>0?o.apply(this,[...t,r]):o.apply(this,t)}catch(n){this.reportError(e,n,{phase:"run",args:t})}})),n.length}once(e,t,n={}){this.on(e,t,{...n,once:!0})}delay(e,t,n){const o=t._source||t,{fn:r,options:l}=t;o._t&&clearTimeout(o._t),o._t=setTimeout((()=>{clearTimeout(o._t),o._t=null;try{Object.keys(l).length>0?r.apply(this,[...n,l]):r.apply(this,n)}catch(t){this.reportError(e,t,{phase:"delay",args:n})}}),l.delay)}runAsync(e,...t){const n=this.getSubscribers(e,this._events);this.debug&&console.assert(n&&n.length>0,"No subscriber for event: "+e);const o=n.map((n=>{const{fn:o,options:r}=n;if(!o||"function"!=typeof o)return console.error(`AppRun async event handler for '${e}' is not a function:`,o),Promise.resolve(null);try{const n=Object.keys(r).length>0?o.apply(this,[...t,r]):o.apply(this,t);return Promise.resolve(n).catch((n=>(this.reportError(e,n,{phase:"runAsync",args:t}),Promise.reject(n))))}catch(n){return this.reportError(e,n,{phase:"runAsync",args:t}),Promise.reject(n)}}));return Promise.all(o)}reportError(e,t,n={}){const o={event:e,error:t,app:this,...n},r="error"===e||this._reporting_error?[]:this.getSubscribers("error",this._events);if(r.length>0){this._reporting_error=!0;try{r.forEach((e=>{try{e.fn.call(this,o)}catch(e){console.error("Error in error event handler:",e)}}))}finally{this._reporting_error=!1}}else"delay"===n.phase?console.error(`Error in delayed event handler for '${e}':`,t):"runAsync"===n.phase?console.error(`Error in async event handler for '${e}':`,t):console.error(`Error in event handler for '${e}':`,t)}removeOnceWildcardSubscriber(e,t){this._events[e]=(this._events[e]||[]).filter((e=>e!==t)),this._wildcard_events=this._wildcard_events.filter((e=>e.sub!==t))}getSubscribers(e,t){const n=t[e]||[],o=n.slice();return t[e]=n.filter((e=>!e.options.once)),this._wildcard_events.filter((({name:t,prefix:n})=>t!==e&&e.startsWith(n))).forEach((({name:t,sub:n})=>{n.options.once&&this.removeOnceWildcardSubscriber(t,n),o.push({...n,_source:n,options:{...n.options,event:e}})})),o}}const l=o.C;let i;const s="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};s.app&&s._AppRunVersions?i=s.app:(i=new r,s.app=i,s._AppRunVersions=l);const a=i},862:(e,t,n)=>{n.d(t,{JW:()=>h,qy:()=>c});var o=n(987),r=n(277),l=n(569),i=n(564),s=n(670),a=n(72),u=n(559);const c=(0,o.h)([r.a,l.q,s.F,a.z,u._],"html"),h=(0,o.h)([r.a,i.J,s.F,a.z,u._],"svg")},987:(e,t,n)=>{n.d(t,{h:()=>r});var o=n(176);function r(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new o.S(n,r,t)}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,n),l.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{Component:()=>i.u,ROUTER_404_EVENT:()=>a.a6,ROUTER_EVENT:()=>a.z0,app:()=>r.app,customElement:()=>s.EM,default:()=>I,event:()=>s.yo,html:()=>T.qy,on:()=>s.on,render:()=>H,run:()=>W,safeHTML:()=>u.t_,svg:()=>T.JW,trustedHTML:()=>u.Fs,update:()=>s.yo});var r=n(292),l=n(634),i=n(91),s=n(9),a=n(475),u=n(791);const c=globalThis,h=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),p=new WeakMap;class m{constructor(e,t,n){if(this._$cssResult$=!0,n!==d)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(h&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=p.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&p.set(t,e))}return e}toString(){return this.cssText}}const f=(e,t)=>{if(h)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),o=c.litNonce;void 0!==o&&t.setAttribute("nonce",o),t.textContent=n.cssText,e.appendChild(t)}},g=h?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new m("string"==typeof e?e:e+"",void 0,d))(t)})(e):e,{is:y,defineProperty:b,getOwnPropertyDescriptor:_,getOwnPropertyNames:v,getOwnPropertySymbols:A,getPrototypeOf:S}=Object,$=globalThis,E=$.trustedTypes,w=E?E.emptyScript:"",C=$.reactiveElementPolyfillSupport,k=(e,t)=>e,P={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},x=(e,t)=>!y(e,t),O={attribute:!0,type:String,converter:P,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),$.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=O){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(e,n,t);void 0!==o&&b(this.prototype,e,o)}}static getPropertyDescriptor(e,t,n){const{get:o,set:r}=_(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:o,set(t){const l=o?.call(this);r?.call(this,t),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??O}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;const e=S(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){const e=this.properties,t=[...v(e),...A(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(g(e))}else void 0!==e&&t.push(g(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return f(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,n);if(void 0!==o&&!0===n.reflect){const r=(void 0!==n.converter?.toAttribute?n.converter:P).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,o=n._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=n.getPropertyOptions(o),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:P;this._$Em=o,this[o]=r.fromAttribute(t,e.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const o=this.constructor,r=this[e];if(n??=o.getPropertyOptions(e),!((n.hasChanged??x)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:o,wrapped:r},l){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,l??t??this[e]),!0!==r||void 0!==l)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===o&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,o=this[t];!0!==e||this._$AL.has(t)||void 0===o||this.C(t,void 0,n,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[k("elementProperties")]=new Map,M[k("finalized")]=new Map,C?.({ReactiveElement:M}),($.reactiveElementVersions??=[]).push("2.1.0");var T=n(752);const R=globalThis;class L extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,T.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T.c0}}L._$litElement$=!0,L.finalized=!0,R.litElementHydrateSupport?.({LitElement:L});const U=R.litElementPolyfillSupport;U?.({LitElement:L}),(R.litElementVersions??=[]).push("4.2.0");var D=n(804);class N extends D.WL{constructor(e){if(super(e),this.it=T.s6,e.type!==D.OA.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===T.s6||null==e)return this._t=void 0,this.it=e;if(e===T.c0)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}N.directiveName="unsafeHTML",N.resultType=1;const j=(0,D.u$)(N);function H(e,t,n){t&&("string"==typeof t?(e._$litPart$||e.replaceChildren(),(0,T.XX)(T.qy`${j(t)}`,e)):t._$litType$?(e._$litPart$||e.replaceChildren(),(0,T.XX)(t,e)):((0,u.cJ)(e,t,n),e._$litPart$=void 0))}class B extends D.WL{constructor(e){if(super(e),e.type!==D.OA.EVENT)throw new Error("run() can only be used in event handlers")}update(e,t){const n=e.element,o=e.name,[l,...i]=t,s=()=>{let e=n,t=e._component;for(;!t&&e;)e=e.parentElement,t=e&&e._component;return console.assert(!!t,"Component not found."),t};return"string"==typeof l?n[`on${o}`]=e=>{const t=s();t?t.run(l,...i,e):r.default.run(l,...i,e)}:"function"==typeof l&&(n[`on${o}`]=e=>s().setState(l(s().state,...i,e))),this.render()}render(){return T.c0}}const W=(0,D.u$)(B);r.default.createElement=u.n,r.default.render=H,r.default.Fragment=u.FK;const I=r.default;return(()=>{if("object"!=typeof window)return;const e=window;(0,l.Q0)(e,{html:T.qy,svg:T.JW,run:W})})(),o})()));
|
|
2
3
|
//# sourceMappingURL=apprun-html.js.map
|