sproutjs-core 2.6.0 → 2.7.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/package.json +1 -1
- package/sprout-core.js +39 -24
- package/sprout-core.js.map +1 -1
- package/sprout-core.min.js +1 -1
- package/sprout-core.min.js.map +1 -1
- package/sprout-core.strict.js +17 -38
- package/sprout-core.strict.js.map +1 -1
- package/sprout-core.strict.min.js +1 -1
- package/sprout-core.strict.min.js.map +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,r){return n=l(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,i()?Reflect.construct(n,r||[],l(e).constructor):n.apply(e,r))}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&a(o,n.prototype),o}(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var u=function(t){function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=r(this,n,[t])).add=function(){return n.unavailableMethod("add")},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(n,t),o=n,l=[{key:"unavailableMethod",value:function(t){throw Error("Can't use ".concat(t," in ReadonlySet"))}}],(i=[{key:"delete",value:function(){n.unavailableMethod("delete")}},{key:"clear",value:function(){n.unavailableMethod("clear")}}])&&e(o.prototype,i),l&&e(o,l),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,l}(o(Set)),c=["ref","hidden"],s=new u(["hidden","checked","disabled","required","selected"]),f=new u(["checked","disabled","selected","src"]),p=new u(["value","checked"]),h=new u(["_global","_gettingDependenciesFor","_localStateManager","_stateManager","_binding","_populate","_isActive","_isStateManager","_isStatefulArray","hasOwnProperty"]),d="getGlobalState",y="Global State Not Set Yet",v=(Object.freeze({NO_DEPENDENCIES_ARRAY_IN_SET_HOOK:function(t){return"State set hook, must include a dependencies array! None was found for ".concat(t)}}),Object.freeze([{class:HTMLAnchorElement,element:"a"},{class:HTMLAreaElement,element:"area"},{class:HTMLAudioElement,element:"audio"},{class:HTMLBodyElement,element:"body"},{class:HTMLBRElement,element:"br"},{class:HTMLButtonElement,element:"button"},{class:HTMLCanvasElement,element:"canvas"},{class:HTMLDataElement,element:"data"},{class:HTMLDataListElement,element:"datalist"},{class:HTMLDetailsElement,element:"details"},{class:HTMLDialogElement,element:"dialog"},{class:HTMLDivElement,element:"div"},{class:HTMLDListElement,element:"dl"},{class:HTMLEmbedElement,element:"embed"},{class:HTMLFieldSetElement,element:"fieldset"},{class:HTMLFormElement,element:"form"},{class:HTMLHRElement,element:"hr"},{class:HTMLHtmlElement,element:"html"},{class:HTMLIFrameElement,element:"iframe"},{class:HTMLImageElement,element:"img"},{class:HTMLLabelElement,element:"label"},{class:HTMLLegendElement,element:"legend"},{class:HTMLLIElement,element:"li"},{class:HTMLLinkElement,element:"link"},{class:HTMLMapElement,element:"map"},{class:HTMLMetaElement,element:"meta"},{class:HTMLMeterElement,element:"meter"},{class:HTMLObjectElement,element:"object"},{class:HTMLOListElement,element:"ol"},{class:HTMLOptGroupElement,element:"optgroup"},{class:HTMLOptionElement,element:"option"},{class:HTMLParagraphElement,element:"p"},{class:HTMLPictureElement,element:"picture"},{class:HTMLPreElement,element:"pre"},{class:HTMLProgressElement,element:"progress"},{class:HTMLQuoteElement,element:"blockquote"},{class:HTMLQuoteElement,element:"q"},{class:HTMLSelectElement,element:"select"},{class:HTMLSourceElement,element:"source"},{class:HTMLSpanElement,element:"span"},{class:HTMLTableElement,element:"table"},{class:HTMLTableCellElement,element:"td"},{class:HTMLTableCellElement,element:"th"},{class:HTMLTableRowElement,element:"tr"},{class:HTMLTableSectionElement,element:"thead"},{class:HTMLTableSectionElement,element:"tbody"},{class:HTMLTableSectionElement,element:"tfoot"},{class:HTMLTextAreaElement,element:"textarea"},{class:HTMLTimeElement,element:"time"},{class:HTMLTitleElement,element:"title"},{class:HTMLTrackElement,element:"track"},{class:HTMLUListElement,element:"ul"},{class:HTMLVideoElement,element:"video"},{class:HTMLSlotElement,element:"slot"}])),b=document.createElement("div"),m={nodeActionsMap:new Map,pendingPaintNodeManagers:new Set,eventBindingFunctions:new Map,conditionalRenders:new Map,stateChangeHandlers:new Map,paintRafId:null},g=(new u(["==","===","!=","!==","<","<=",">",">="]),new u(["shift","unshift","pop","push","reverse","sort","splice","copyWithin","fill"])),w=new u(["reverse","sort","copyWithin","fill"]),S=new u(["slice","map","filter","reduce","reduceRight","some","every","forEach","find","findIndex","findLast","findLastIndex","indexOf","lastIndexOf","includes","entries","keys","values","at","join","toString","toLocaleString"]),O=new u(["every","some","filter","forEach","map","reduce","reduceRight","slice"]),E={STATE_NOT_FOUND:"SPROUT_STATE_NOT_FOUND"},A=new u(["checked","value"]),T="sprout-frozen",M="\n .".concat(T," {\n clip-path: inset(100%);\n pointer-events: none;\n opacity: 0;\n }\n"),j=Object.freeze({HIDE_UNHIDE:1,CLONE:2}),P=100,_={ATTRIBUTE_ACTIONS:600,TEXT_ACTIONS:300,ELEMENT_ACTIONS:100,PROPERTY_ACTIONS:50,REATTACH_ACTIONS:10},k=8;function N(t){return"OL"===t.tagName||"UL"===t.tagName}function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||I(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t){return function(t){if(Array.isArray(t))return R(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||I(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(t,e){if(t){if("string"==typeof t)return R(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(t,e):void 0}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var D=m.pendingPaintNodeManagers,x=new Map;function $(t,e,n){var r;if(x.has(e)&&(r=x.get(e),cancelAnimationFrame(r)),t.length<P)r=requestAnimationFrame((function(){x.delete(e),t.forEach((function(t){return t()})),n&&n()})),x.set(e,r);else{x.delete(e);var o=L(t),i=0;requestAnimationFrame((function t(){o.slice(i,i+P).forEach((function(t){return t()})),(i+=P)<o.length&&requestAnimationFrame(t)}))}}var H=m.paintRafId,F=m.conditionalRenders;function U(t,e){F.set(t,e),$(Array.from(F.values()),"CONDITIONAL_RENDER",(function(){return F.clear()}))}function K(){H&&cancelAnimationFrame(H),H=requestAnimationFrame((function(){H=null,q()}))}function G(t){t.forEach((function(t){return t()}))}function q(t){var e,n=performance.now(),r=0,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=I(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(D);try{for(o.s();!(e=o.n()).done;){var i=e.value,a=C(i.resolveToDOMActions(),5),l=a[0],u=a[1],c=a[2],s=a[3],f=a[4];if(G(f.slice(0,_.REATTACH_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(s.slice(0,_.ELEMENT_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(l.slice(0,_.ATTRIBUTE_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(u.slice(0,_.TEXT_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(c.slice(0,_.PROPERTY_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(l.length||u.length||c.length||s.length||f.length)return requestAnimationFrame((function(){return q()}));i.paintStatus=null,D.delete(i)}}catch(t){o.e(t)}finally{o.f()}if(r>k)return requestAnimationFrame((function(){return q()}))}function z(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=V(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||V(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||V(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(t,e){if(t){if("string"==typeof t)return Y(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}"undefined"!=typeof window&&(window.SproutWaitIdle=function(){return new Promise((function(t){requestAnimationFrame((function e(){if(!m.pendingPaintNodeManagers.size)return t();requestAnimationFrame(e)}))}))});function X(t){switch(t){case Node.ATTRIBUTE_NODE:return{setAttribute:void 0};case Node.TEXT_NODE:return{textContent:void 0};case Node.ELEMENT_NODE:return{append:new Set,reattach:!1,setProperty:new Map,get hasPendingActions(){return this.append.size||this.reattach||this.setProperty.size}}}}function Q(t,e,n){var r=this,o=n;"todosFiltered"===e&&performance.mark("todo-generate-node-actions");var i=t.nodeManager.stateNodes[e],a=t.stateArrayMaps[e],l=t.nodeManager.conditionallyRenderingElements[e];if(i&&i.forEach((function(e){!function(t,e,n){e.nodeType===Node.ATTRIBUTE_NODE?t.addNodeAction(e,{actionType:"setAttribute",actionValue:n}):e.nodeType===Node.TEXT_NODE&&t.addNodeAction(e,{actionType:"textContent",actionValue:n})}(t.nodeManager,e,o)})),a){var u=o;a.forEach((function(e,n){!function(t,e,n,r){var o=null,i=!1,a=N(n),l=new Map,u=(n.getAttribute&&n.getAttribute("ref")||n.refName||n.tagName,t.map((function(t){return Object.hasOwn(t,"state")?t.state:t})));if(t.isNewArray){if(t.length){var c;i=!0;var s=dt(t,e,a?"li":void 0,o=n.detach());o.innerHTML="",(c=o).append.apply(c,W(s))}}else if(t.lastOperation){i=!0,o||(o=n.detach());var f=o.children,p=B(t.lastOperation,2),h=p[0],d=p[1];switch(h){case"shift":o.removeChild(o.firstElementChild);break;case"unshift":for(var y=d[0]-1;y>=0;y--){var v,b=t[y],m=null===(v=o.keyMap)||void 0===v?void 0:v.get(b.key);if(m){var g=o.firstElementChild;m!==g&&o.insertBefore(m,g)}else{var w=ht(b,e,a?"li":void 0,o);w.stateKey=b.key,o.prepend(w)}}break;case"pop":o.removeChild(o.lastElementChild);break;case"push":for(var S=f.length,O=t.length;S<O;S++){var E=t[S],A=ht(E,e,a?"li":void 0,o);A.stateKey=E.key,o.appendChild(A)}break;case"splice":var T,M,j=f.length,P=null!==(T=d[0])&&void 0!==T?T:0,_=d[1],k=P<0?Math.max(j+P,0):Math.min(P,j);M=void 0===_||_===1/0?j-k:_<0?0:Math.min(_,j-k);var C=d[2]||[],L=t.length;if(0===C.length&&j===L)break;if(0===k&&M>=j&&C.length===L&&j===L)break;for(var I=0;I<M;I++)o.removeChild(f[k]);var R,D=z(C);try{for(D.s();!(R=D.n()).done;){var x,$=ht(R.value,e,a?"li":void 0,o),H=null!==(x=f[k])&&void 0!==x?x:null;o.insertBefore($,H),k++}}catch(t){D.e(t)}finally{D.f()}}}else{for(var F,U=null==n?void 0:n.keyMap,K=null!==(F=o)&&void 0!==F?F:n,G=0;G<u.length;G++){var q,V,Y=u[G],X=null==Y?void 0:Y.key,Q=K.children[G];if(!Q)break;var J=a?null===(q=Q.firstElementChild)||void 0===q?void 0:q.state:Q.state,Z=J?J.key:Q.stateKey;if(Z!==X){i=!0,o||(o=n.detach());var tt=null!==(V=l.get(X))&&void 0!==V?V:U.get(X);if(tt){var et,nt=o.replaceChildWith(Q,tt);if(l.set(Z,nt),(a?null===(et=tt.firstElementChild)||void 0===et?void 0:et.state:tt.state)!==Y){var rt=ht(Y,e,a?"li":void 0,o);rt.stateKey=X,o.replaceChildWith(tt,rt)}}else{var ot=ht(Y,e,a?"li":void 0,o);ot.stateKey=X,o.replaceChildWith(Q,ot)}}else if(J!==Y){i=!0,o||(o=n.detach());var it=ht(Y,e,a?"li":void 0,o);it.stateKey=X,o.replaceChildWith(Q,it)}}for(;(null!==(at=o)&&void 0!==at?at:n).children.length>u.length;){var at,lt;i=!0,o||(o=n.detach()),o.removeChild((null!==(lt=o)&&void 0!==lt?lt:n).lastElementChild)}}var ut=o?o.children.length:n.children.length;if(t.length>ut){i=!0,o||(o=n.detach());for(var ct=o.children.length;ct<t.length;ct++){var st,ft=t[ct];if(null===(st=o.keyMap)||void 0===st||!st.has(ft.key)){var pt=void 0;(pt=l.has(ft.key)?l.get(ft.key):ht(ft,e,a?"li":void 0,o)).stateKey=ft.key,o.appendChild(pt)}}}i&&r.nodeManager.addNodeAction(o,{actionType:"reattach",actionValue:!0})}(u,e,n,t)}))}l&&l.forEach((function(t){U(r,t.render.bind(r))})),"pending"===t.nodeManager.paintStatus&&t.nodeManager.queuePaint()}function J(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,e,{value:n,configurable:!1,writable:!0,enumerable:r})}function Z(t,e,n){var r=e.substring(1),o=this.getAttributeNode(t);o.nodeValue=n.getAttribute(r),o.isPropAttribute=!0,n.propAttributes.has(r)||n.propAttributes.set(r,new Set),n.propAttributes.get(r).add(o)}function tt(t){return function(t){if(Array.isArray(t))return et(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return et(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?et(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function nt(t){if(0===t.indexOf("!"))return["negation",t.substring(1)];for(var e,n=0,r=t[n];n++<t.length;){if(e=t[n],3==n&&"is_"==r)return["equality"].concat(tt(t.substring(3).split(":")));if("?"===e)return["ternary",r].concat(tt(t.substring(n+1).split(":")));r+=e}return["literal",t]}function rt(t){return""===t||null!==t&&t}function ot(t,e){return ct(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||lt(t,e)||at()}function it(t){return ct(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||lt(t)||at()}function at(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function lt(t,e){if(t){if("string"==typeof t)return ut(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(t,e):void 0}}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ct(t){if(Array.isArray(t))return t}"undefined"==typeof HTMLElement||Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var st=function(t,e){var n;n=t,s.has(n)?"false"===e?this.removeAttribute(t):elementSetAttribute.call(this,t,""):elementSetAttribute.call(this,t,e)},ft=function(t,e){var n=it(nt(e)),r=n[0],o=n.slice(1),i=o[0],a=ot(this.getState(i,!0),2),l=a[0],u=a[1];var c=u._stateManager,s="literal"===r?l:c.bindStatePropExpression(e,r,o);this.removeAttribute(t);var f=document.createAttribute(t);f.nodeValue=s,J(f,"isStateAttribute",!0),J(f,"originalOwnerElement",this),"boolean"==typeof s&&(f.nodeValue=""),c.addStateNode(e,f),!1!==s&&this.setAttributeNode(f),this.addEventListener("disconnected",(function(){u._stateManager.removeStateNode(e,f)}),{once:!0})},pt=function(t){var e=it(nt(t)),n=e[0],r=e.slice(1),o=r[0],i=ot(this.getState(o,!0),2),a=i[0],l=i[1];var u=l._stateManager,c="literal"===n?a:u.bindStatePropExpression(t,n,r),s=document.createTextNode(c);J(s,"isStateAttribute",!0),l._stateManager.addStateNode(t,s),this.appendChild(s),this.addEventListener("disconnected",(function(){l._stateManager.removeStateNode(t,s)}),{once:!0})};function ht(t,e,n,r){var o,i=document.createElement(e);return i.setInitialState(t),i.ownerMapElement=r,n?(o=document.createElement(n)).appendChild(i):o=i,t.hasOwnProperty("key")&&!o.hasOwnProperty("stateKey")&&(o.stateKey=t.key),o}function dt(t,e,n,r){return t.map((function(t,o){Object.hasOwn(t,"state")&&(t=t.state);var i=ht(t,e,n,r);return i.stateKey=t.key,i}))}function yt(t,e,n){var r;if(!vt(e)){var o=null!=n?n:t.state[e],i=Object.getOwnPropertyDescriptor(t.state,e);null==i||null===(r=i.get)||void 0===r||r.isStateGetter;!function(t,e,n){var r=new CustomEvent("stateChange",{bubbles:!1,composed:!1,detail:{property:e,newValue:n}});t.dispatchEvent(r)}(t.state,e,o),Q(t,e,o),e.startsWith("!")||Q(t,"!".concat(e),!o)}}function vt(t){return h.has(t)}function bt(t){return 0===t.indexOf("set_")}function mt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||wt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gt(t){return function(t){if(Array.isArray(t))return St(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wt(t,e){if(t){if("string"==typeof t)return St(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?St(t,e):void 0}}function St(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function Et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Nt(r.key),r)}}function At(t,e){if(e&&("object"==Ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tt(){return Tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_t(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Tt.apply(null,arguments)}function Mt(t){var e="function"==typeof Map?new Map:void 0;return Mt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(jt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&Pt(o,n.prototype),o}(t,arguments,_t(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Pt(n,t)},Mt(t)}function jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jt=function(){return!!t})()}function Pt(t,e){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pt(t,e)}function _t(t){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_t(t)}function kt(t,e,n){return(e=Nt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nt(t){var e=function(t,e){if("object"!=Ot(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ot(e)?e:e+""}var Ct=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);i.SPROUT_CONFIG.stateManagerClass;if(!Array.isArray(t))throw Error("Argument for StateFulArray constructor must be an array!");var l,u,c,s=t,f=s.map((function(t,e){var o=t;return Object.hasOwn(t,"state")||Object.hasOwn(t,"_stateManager")||Array.isArray(t)||"object"===Ot(t)&&(o=Wt(t,r,n._stateManager,yt,!1,i)),o}));return l=this,u=e,c=gt(f),u=_t(u),kt(o=At(l,jt()?Reflect.construct(u,c||[],_t(l).constructor):u.apply(l,c)),"arrayMaps",{}),o.parentStateObject=n,o.arrayStateProp=r,o.appScope=i,o.rawArray=s,a&&o.makeStateMap(),J(f=new Proxy(o,$t(null==n?void 0:n._stateManager,r,i)),"_isStatefulArray",!0),o.statefulArray=f,At(o,f)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pt(t,e)}(e,t),n=e,r=[{key:Symbol.iterator,value:function(){return Tt(_t(e.prototype),Symbol.iterator,this).call(this)}},{key:"runArrayOperation",value:function(t,e,n){switch(t){case"shift":return this.lastOperation=["shift"],[e.apply(this,n),!1];case"unshift":return this.lastOperation=["unshift",[n.length]],[e.apply(this,n),!1];case"pop":return this.lastOperation=["pop"],[e.apply(this),!1];case"push":return this.lastOperation=["push",[n.length]],[e.apply(this,n),!1];case"splice":var r=mt(n,2),o=r[0],i=r[1],a=n.slice(2);return this.lastOperation=["splice",[o,i,a]],[e.apply(this,n),!1];default:this.lastOperation=void 0;var l=e.apply(this,n);return[l,Array.isArray(l)]}}},{key:"doArrayOperation",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.$$operation=t;var o,i=this.length,a=!1;if(O.has(t)){var l=n[0];if(this.length&&Object.hasOwn(this.arrayMaps,t)&&this.arrayMaps[t].has(l)){var u=this.arrayMaps[t].get(l);if(this.lastDirtyTimestamp>u.timestamp){var c=mt(this.runArrayOperation(t,Tt(_t(e.prototype),t,this),n),2);o=c[0],a=c[1],this.arrayMaps[t].set(l,{lastResult:o,timestamp:(new Date).getTime()})}else o=u.lastResult}else{var s=mt(this.runArrayOperation(t,Tt(_t(e.prototype),t,this),n),2);o=s[0],a=s[1],Object.hasOwn(this.arrayMaps,t)||(this.arrayMaps[t]=new Map,this.arrayMaps[t].set(l,{lastResult:o,timestamp:(new Date).getTime()}))}}else{var f=mt(this.runArrayOperation(t,Tt(_t(e.prototype),t,this),n),2);o=f[0],a=f[1]}var p=this.length,h=w.has(t)||"splice"===t&&p===i;return r&&h&&this.parentStateObject._stateManager.setDirtyProp("".concat(this.arrayStateProp,".length"),!0),delete this.$$operation,r&&this.parentStateObject._stateManager.setDirtyProp(this.arrayStateProp),[o,a]}},{key:"mapStateKeys",value:function(){var t=this;this.forEach((function(e){var n=Object.hasOwn(e,"state")?e.state:e;t.keyMap.set(n.key,n)}))}},{key:"makeStateMap",value:function(){this._isStateMap=!0,this.keyMap=new Map,this.mapStateKeys()}}],o=[{key:Symbol.species,get:function(){return Array}}],r&&Et(n.prototype,r),o&&Et(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(Mt(Array));function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function It(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Rt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}kt(Ct,"functions",new u(["constructor","statifyArray","addDirtyIndex","doArrayOperation","runArrayOperation","makeStateMap","mapStateKeys","toArray"]));var Dt=function(){return{get:function(t,e,n){var r;if(vt(e)||0===e.indexOf("$$"))return Reflect.get.apply(Reflect,arguments);var o=Object.getOwnPropertyDescriptor(t,e);return null!=o&&null!==(r=o.get)&&void 0!==r&&r.isStateGetter||(Object.hasOwn(t.$$accessCount,e)?t.$$accessCount[e]++:t.$$accessCount[e]=1),Reflect.get.apply(Reflect,arguments)}}},xt=function(t,e){arguments.length>2&&void 0!==arguments[2]||window,t.state;return{apply:function(n,r,o){t.clearStateDependencies(e);var i=r._global,a=It(Jt(n,r),3),l=a[0],u=a[1],c=a[2];return l.forEach((function(n){t.addStateDependency(n,e)})),null==u||u.forEach((function(n){i._stateManager.addGlobalStateDependency(n,e,t)})),c}}},$t=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,o=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t.setDirtyProp(e,!0),n&&t.setDirtyProp("".concat(e,".length"),!0)},i=function(t){var e;if(t)return Object.hasOwn(t,"state")?null===(e=t.state)||void 0===e?void 0:e.key:t.key};return{set:function(a,l,u){if(0===l.indexOf("$$"))return Reflect.set(a,l,u);if("length"===l)return n=Reflect.set(a,l,u),a.hasDirtyItems=!0,a.hasOwnProperty("$$operation")?o(!0,!1):o(!0,!0),n;if(a[l]===u)return!0;var c;Number(l);if(!isNaN(l)){var s=Number(l),f=a[s],p=i(f);if(u=Vt(u,e,t,r),Object.hasOwn(u,"_stateManager")&&(u=u._stateManager),!a.hasOwnProperty("$$operation")){var h=!1;if(s<a.length&&(h=!0),(n=Reflect.set(a,l,u))&&a._isStateMap){void 0!==p&&a.keyMap.delete(p);var d=i(u);void 0!==d&&a.keyMap.set(d,(c=u,Object.hasOwn(c,"state")?c.state:c))}return h&&o(),n}}return Reflect.set(a,l,u)},get:function(e,n,r){if("symbol"===Lt(n))return Reflect.get.apply(Reflect,arguments);if("length"===n&&Object.hasOwn(e.parentStateObject,"$$accessCount")&&!Object.hasOwn(e,"$$operation")){var o=e.arrayStateProp;Object.hasOwn(e.parentStateObject.$$accessCount,"".concat(o,".length"))?e.parentStateObject.$$accessCount["".concat(o,".length")]++:e.parentStateObject.$$accessCount["".concat(o,".length")]=1}if(n.indexOf&&0===n.indexOf("__")){var i=n.substring(2);return Reflect.get(e,i,r)}if("function"==typeof e[n]&&!Ct.functions.has(n)){var a=e.parentStateObject;if(a&&Object.hasOwn(a,"$$accessCount")){var l=String(n);if(S.has(l)){var u=e.arrayStateProp;a.$$accessCount[u]=(a.$$accessCount[u]||0)+1}}}if(!t.isInitializing&&"function"==typeof e[n]&&!Ct.functions.has(n))return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=It(e.doArrayOperation.call(e.statefulArray,n,r,g.has(n)),2),a=i[0];i[1];return a};var c=Number(n);if(!isNaN(c)){var s=e[c];if(void 0===s)return;return s&&Object.hasOwn(s,"state")?s.state:s}return Reflect.get.apply(Reflect,arguments)},deleteProperty:function(t,e){if(isNaN(Number(e)))return Reflect.deleteProperty(t,e);var n=t[Number(e)],r=i(n),o=Reflect.deleteProperty(t,e);return o&&t._isStateMap&&void 0!==r&&t.keyMap.delete(r),o}}};function Ht(){this.conditionallyRenderingElements={},this.addConditionallyRenderingElements=function(t,e){this.nodeManager.addConditionallyRenderingElements(t,e)}}function Ft(){this.stateArrayMaps={},this.addStateMap=function(t,e,n){this.stateArrayMaps.hasOwnProperty(t)||(this.stateArrayMaps[t]=new Map),this.stateArrayMaps[t].set(n,e)},this.clearStateMapsLastOperation=function(){for(var t=0,e=Object.keys(this.stateArrayMaps);t<e.length;t++){var n=e[t];delete this.state[n].lastOperation}}}function Ut(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Kt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Gt(t){return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(t)}function qt(t,e,n){if(Bt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&zt(o,n.prototype),o}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function Bt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bt=function(){return!!t})()}function Wt(t,e,n){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:window,o=new Le(t,e,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:yt,arguments.length>4&&void 0!==arguments[4]&&arguments[4],r);return o.use(Ht,"conditional-element"),o.use(Ft,"map"),o}function Vt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return vt(e)||(Array.isArray(t)?t=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Object.hasOwn(t,"_isStatefulArray"))return t;var i=qt(Ct,[t,n,e,r,o]);return n.hasOwnProperty("".concat(e,".length"))||Object.defineProperty(n,"".concat(e,".length"),{get:function(){return this[e].length}}),i}(t,e,n.state,r,o):"object"!==Gt(t)||null===t||t.hasOwnProperty("_stateManager")||(t=Wt(t,e,n,yt,!1,r).state)),t}function Yt(t,e,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,i="set_".concat(e),a=Ut(t,2),l=a[0],u=a[1];if("function"!=typeof l)throw Error("Setter hooks must define a function as the first item!");var c,s=n.state;if(u.deps=null!==(r=u.deps)&&void 0!==r?r:"auto",!u.init||!u.once)if("auto"===u.deps)if(u.reevaluate){var f=xt(n,i,o);l=new Proxy(l,f),t[0]=l}else{var p,h,d,y=Ut(Jt(l,s),3);h=y[0],d=y[1],c=y[2],h.forEach((function(t){n.addStateDependency(t,i)})),null===(p=d)||void 0===p||p.forEach((function(t){n.addStateDependency(t,i),s._global._stateManager.addGlobalStateDependency(t,i,n)}))}else u.deps.forEach((function(t){if(0===t.indexOf("global")){var e=t.substring(t.indexOf("global.")+7);s._global.addGlobalStateDependency(i,e,n)}else n.addStateDependency(t,i)}));Object.defineProperty(s,e,{get:function(){return Object.hasOwn(s,"$$accessCount")&&(Object.hasOwn(s.$$accessCount,e)?s.$$accessCount[e]++:s.$$accessCount[e]=1),n.privateState[e]},set:function(){throw Error("Cannot directly set the state value of a result of a setter hook function!")}}),u.init&&(c||(c=l.call(s)),(u.statify||u.stateMap)&&(c=Vt(c,e,n,o,u.stateMap)),n.privateState[e]=c,n.setDirtyProp(e))}function Xt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=n.state,i=n.privateState[e];void 0===i&&Yt(t,e,n,r);var a=Ut(t,2),l=a[0],u=a[1];if("function"!=typeof l)throw Error("Setter hooks must define a function as the first item!");var c=l.call(o),s=!1;if(void 0===c)throw Error("State Set Hook functions MUST return a value");return(u.statify||u.stateMap)&&(c=Vt(c,e,n,r,u.stateMap)),c!==i&&(n.privateState[e]=c,s=!0),u.once&&delete o["set_".concat(e)],s}function Qt(t){var e;for(var n in t)-1!==(e=n.indexOf(".length"))&&t[n.substring(0,e)]--;return new Set(Object.keys(t).filter((function(e){return t[e]>0})))}function Jt(t,e){var n=!1,r=new Proxy(e,Dt());r.$$accessCount={},Object.hasOwn(r,"_global")&&r._global!==y&&(n=!0,r._global=new Proxy(r._global,Dt),r._global.$$accessCount={});var o=t.call(r),i=Qt(r.$$accessCount);delete r.$$accessCount;var a=null;return n&&(a=Qt(r._global.$$accessCount),delete r._global.$$accessCount),[i,a,o]}function Zt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=t.state,o=Object.getOwnPropertyDescriptors(e),i=function(e){var i=o[e];if(vt(e))return Object.defineProperty(r,e,i),1;var a=function(t,e){if(t.get&&"function"==typeof t.get)return{nativeGetter:!0,func:t.get,deps:"auto",reevaluate:!1,init:!1,isSetter:!1};if(t.value){var n=t.value;if(0===e.indexOf("set_")){if(!Array.isArray(n))throw Error("State setter hooks must be arrays!");var r=n[1]||{};return{nativeGetter:!1,func:n[0],deps:r.deps&&Array.isArray(r.deps)?r.deps:"auto",reevaluate:!!r.reevaluate,init:!!r.init,once:!!r.once,stateMap:!!r.stateMap,statify:!!r.statify,isSetter:0===e.indexOf("set_")}}}}(i,e);if(a){var l=a.isSetter?e.substring(4):e;if(a.func.bind(r),a.isSetter&&!a.nativeGetter)Yt(i.value,l,t,n),a.once&&(i.configurable=!0),Object.defineProperty(r,e,i);else if(a.nativeGetter){i.get.isStateGetter=!0;var u=Ut(Jt(i.get,r),2),c=u[0],s=u[1];c.forEach((function(n){t.addStateDependency(n,e)})),null==s||s.forEach((function(n){t.addStateDependency(n,e),r._global._stateManager.addGlobalStateDependency(n,e,t)})),i.get.bind(r),Object.defineProperty(r,l,i)}}else if(i.hasOwnProperty("value")){var f=e,p=Vt(i.value,f,t,n);t.privateState.hasOwnProperty(f)||(t.privateState[f]=p),Object.defineProperty(r,f,{set:function(e){e!==t.privateState[f]&&(e=Vt(e,f,t,n),t.privateState[f]=e,t.setDirtyProp(f),t.setDirtyProp("".concat(f,".length")))},get:function(){return t.privateState[f]}})}};for(var a in o)i(a)}function te(t,e,n,r){Object.defineProperty(e,t,{get:n,set:function(){throw Error("Cannot directly set a State property expression")},enumerable:!0}),e._stateManager.addStateDependency(r,t)}function ee(t){var e=new Set,n=new Set;return t.forEach((function(t){bt(t)?n.add(t):e.add(t)})),[e,n]}function ne(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||ae(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ae(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function oe(t){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(t)}function ie(t){return function(t){if(Array.isArray(t))return le(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ae(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(t,e){if(t){if("string"==typeof t)return le(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(t,e):void 0}}function le(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ue(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,fe(r.key),r)}}function ce(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function se(t,e,n){return(e=fe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fe(t){var e=function(t,e){if("object"!=oe(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oe(e)?e:e+""}function pe(t,e){return t.get(function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(t,e))}var he=m.pendingPaintNodeManagers,de=new WeakMap,ye=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),se(this,"stateNodes",{}),se(this,"conditionallyRenderingElements",{}),se(this,"bindableAttributesStateNodes",new Map(ie(A).map((function(t){return[t,new Map]})))),ce(this,de,new Map),se(this,"paintStatus",null)},(e=[{key:"addStateNode",value:function(t,e){this.stateNodes.hasOwnProperty(t)||(this.stateNodes[t]=new Set),this.stateNodes[t].add(e),p.has(e.nodeName)&&this.bindableAttributesStateNodes.get(e.nodeName).set(e.originalOwnerElement,e)}},{key:"removeStateNode",value:function(t,e){var n;null===(n=this.stateNodes)||void 0===n||n[t].delete(e)}},{key:"addConditionallyRenderingElements",value:function(t,e){var n;this.conditionallyRenderingElements.hasOwnProperty(t)||(this.conditionallyRenderingElements[t]=new Set),e.originalParentElement=e.parentElement||(null===(n=e.host)||void 0===n?void 0:n.shadowRoot),this.conditionallyRenderingElements[t].add(e)}},{key:"addNodeAction",value:function(t,e){pe(de,this).has(t)||pe(de,this).set(t,X(t.nodeType));var n=pe(de,this).get(t),r=e.actionType,o=e.actionValue;if(t.nodeType===Node.ELEMENT_NODE)switch(r){case"append":n.append.add(o);break;case"setProperty":n.setProperty(o.property,o.value);break;case"reattach":n.reattach=!0}else n[r]=o;this.paintStatus||(this.paintStatus="pending")}},{key:"queuePaint",value:function(){"pending"===this.paintStatus&&(he.add(this),K(),this.paintStatus="queued")}},{key:"resolveToDOMActions",value:function(){var t=[],e=[],n=[],r=[],o=[];return pe(de,this).forEach((function(i,a){switch(a.nodeType){case Node.ATTRIBUTE_NODE:var l=i.setAttribute,u=oe(l);if("undefined"!==u)if("boolean"===u){if(!a.hasOwnProperty("originalOwnerElement"))throw Error("originalOwnerElement not found on boolean attribute node! Should never happen!");!1===l?a.originalOwnerElement.hasAttribute(a.name)&&t.push((function(){a.originalOwnerElement.removeAttributeNode(a)})):a.originalOwnerElement.hasAttribute(a.name)||t.push((function(){a.originalOwnerElement.setAttributeNode(a)}))}else"string"===u&&a.nodeValue!==l&&t.push((function(){return a.nodeValue=l}));break;case Node.TEXT_NODE:if(void 0!==i.textContent){var c=String(i.textContent);a.nodeValue!==c&&e.push((function(){return a.nodeValue=c}))}break;case Node.ELEMENT_NODE:var s,f=re(i.append.values());try{var p=function(){var t=s.value;n.push((function(){return a.appendChild(t)}))};for(f.s();!(s=f.n()).done;)p()}catch(t){f.e(t)}finally{f.f()}var h,d,y=re(i.setProperty);try{var v=function(){var t=ne(h.value,2),e=t[0],n=t[1];a[e]!==n&&o.push((function(){return a[e]=n}))};for(y.s();!(h=y.n()).done;)v()}catch(t){y.e(t)}finally{y.f()}i.reattach&&(r.push((function(){return a.reattach()})),null!=a&&null!==(d=a.pendingKeyMapActions)&&void 0!==d&&d.size&&r.push((function(){var t,e=re(a.pendingKeyMapActions);try{for(e.s();!(t=e.n()).done;)(0,t.value)()}catch(t){e.e(t)}finally{e.f()}a.pendingKeyMapActions.clear()})),i.reattach=!1)}})),pe(de,this).clear(),[t,e,o,n,r]}}])&&ue(t.prototype,e),n&&ue(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function ve(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return new Proxy(t,function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return{set:function(n,r,o){if(vt(r))return Reflect.set.apply(Reflect,arguments);var i,a=Reflect.set.apply(Reflect,arguments),l=t._stateManager;return l.parentStateManager&&(performance.mark("todo-array-set-dirty-prop"),null===(i=l.parentStateManager)||void 0===i||i.setDirtyProp(e)),a},defineProperty:function(e,r,o){return vt(r)?Reflect.defineProperty.apply(Reflect,arguments):(void 0!==(null==o?void 0:o.value)&&(o.value=Vt(o.value,r,t._stateManager,n)),Reflect.defineProperty(e,r,o))},get:function(t,e,n){var r=Reflect.get.apply(Reflect,arguments);return"function"==typeof r?r.bind(t):r}}}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,e))}function be(t){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(t)}function me(t){return function(t){if(Array.isArray(t))return Ee(t)}(t)||ge(t)||Oe(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function we(t,e){return Ae(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||Oe(t,e)||Se()}function Se(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Oe(t,e){if(t){if("string"==typeof t)return Ee(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(t,e):void 0}}function Ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ae(t){if(Array.isArray(t))return t}function Te(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Pe(r.key),r)}}function Me(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function je(t,e,n){return(e=Pe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pe(t){var e=function(t,e){if("object"!=be(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==be(e)?e:e+""}function _e(t,e){return t.get(function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(t,e))}var ke=new Map;var Ne=new WeakMap,Ce=function(){return t=function t(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:yt,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:window;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),je(this,"isInitializing",!1),je(this,"privateState",{}),je(this,"state",new EventTarget),je(this,"stateDependencies",new Map),je(this,"parentStateProp",void 0),je(this,"parentStateManager",void 0),je(this,"dirtyProps",new Set),je(this,"nodeManager",new ye),Me(this,Ne,new Set),this.isInitializing=!0,this.parentStateProp=n,this.parentStateManager=r,this.handleStateChange=i,this.appScope=l,J(this.state,"_stateManager",this,!0),this.state.$$isInitializing=!0,this.state.populate=function(t){for(var e in t)this.hasOwnProperty(e)&&(this[e]=t[e])},n&&r&&(this.state=ve(this.state,n,l)),a)this.globalStateDependencies=new Map,this.addGlobalStateDependency=function(t,e,n){o.globalStateDependencies.has(t)||o.globalStateDependencies.set(t,new Map);var r=o.globalStateDependencies.get(t);r.has(n)||r.set(n,new Set),r.get(n).add(e)};else{var u=l[d]();J(this.state,"_global",u,!0)}!function(t,e){Zt(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:window)}(this,e,l),delete this.state.$$isInitializing,J(this.state,"_isStateManager",!0),J(this.state,"_isActive",!0,!1),this.isInitializing=!1},e=[{key:"setDirtyProp",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.state.$$isInitializing){var n,r,o=t.indexOf(".length"),i=o>0?t.substring(0,o):t;if(!Object.hasOwn(this.state,i))throw Error("Error in setDirtyProp. State has no property: '".concat(t,"'. This should never happen"));this.dirtyProps.add(t),Array.isArray(this.state[i])&&(this.state[i].lastDirtyTimestamp=(new Date).getTime()),e&&(n=this,r=this.handleStateChanges.bind(this),ke.set(n,r),$(Array.from(ke.values()),"STATE_CHANGE",(function(){return ke.clear()})))}}},{key:"handleStatePropDependencies",value:function(t){var e=this,n=this.stateDependencies,r=null==this?void 0:this.globalStateDependencies;t.forEach((function(t){!function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=t.state;if(bt(e)){var o=r[e],i=e.substring(4);Xt(o,i,t,n)&&yt(t,i,null,n.offscreenContainer)}else if(e.indexOf(".length")>0){var a=e.split(".")[0];yt(t,e,t.state[a].length,n.offscreenContainer)}else yt(t,e,null,n.offscreenContainer)}(e,t,e.appScope);var o=bt(t)?t.substring(4):t;if(null!=n&&n.has(o)){var i=we(ee(n.get(o)),2),a=i[0],l=i[1];l.size&&e.handleStatePropDependencies(l),a.size&&e.handleStatePropDependencies(a)}null!=r&&r.has(o)&&r.get(o).forEach((function(t,e){var n=we(ee(t),2),r=n[0],o=n[1];o.size&&e.handleStatePropDependencies(o),r.size&&e.handleStatePropDependencies(r)}))}))}},{key:"isGlobalState",value:function(){return!this.state.hasOwnProperty("_global")}},{key:"topologicalSortStateProps",value:function(t){var e=this;return me(t).toSorted((function(t,n){var r,o;return t.startsWith(n+".")?1:n.startsWith(t+".")?-1:((null===(r=e.stateDependencies[t])||void 0===r?void 0:r.size)||0)-(null===(o=e.stateDependencies[n])||void 0===o?void 0:o.size)||0}))}},{key:"handleStateChanges",value:function(){var t=this;if(this.dirtyProps.size){performance.mark("todo-topological-sort");var e=this.topologicalSortStateProps(this.dirtyProps);this.dirtyProps.clear(),this.isGlobalState();var n=new Set,r=new Set,o=new Set,i=this,a=i.state;e.forEach((function(e){var l;if(bt(e)){e=e.substring(4);var u=a[e];performance.mark("todo-call-setter-hook"),Xt(u,e,i,t.appScope)&&t.handleStateChange(i,e,null)}else t.handleStateChange(i,e,null);i.stateDependencies.has(e)&&i.stateDependencies.get(e).forEach((function(t){bt(t)?r.add(t):n.add(t)}));var c=null===(l=i.state)||void 0===l?void 0:l._global;if(c===y&&(c=t.appScope[d]()),c!==y){var s,f=(null===(s=c)||void 0===s?void 0:s._stateManager)||i;f.globalStateDependencies.has(e)&&o.add(f.globalStateDependencies.get(e))}})),r.size&&this.handleStatePropDependencies(r),n.size&&this.handleStatePropDependencies(n),o.size&&o.forEach((function(t,e){e.handleStatePropDependencies(t)})),i.clearStateMapsLastOperation(),this.parentStateManager&&this.parentStateManager.setDirtyProp(this.parentStateProp)}}},{key:"addStateDependency",value:function(t,e){this.stateDependencies.has(t)||this.stateDependencies.set(t,new Set),this.stateDependencies.get(t).add(e),Array.isArray(this.state[t])&&this.addStateDependency("".concat(t,".length"),e)}},{key:"clearStateDependencies",value:function(t){this.stateDependencies.has(t)&&this.stateDependencies.set(t,new Set)}},{key:"addStateNode",value:function(t,e){this.nodeManager.addStateNode(t,e)}},{key:"removeStateNode",value:function(t,e){this.nodeManager.removeStateNode(t,e)}},{key:"bindStatePropExpression",value:function(t,e,n){if(!e||!n){var r=nt(t),o=Ae(i=r)||ge(i)||Oe(i)||Se();e=o[0],n=o.slice(1)}var i,a=n[0];if(!a)throw Error("Must specify state property name for State expression: ".concat(t));var l=this.state,u=Object.getOwnPropertyDescriptor(l,a);if(u||(l=l._global,u=Object.getOwnPropertyDescriptor(l,a)),!u)throw Error("Could not bind state property ".concat(a,". State property ").concat(a," not defined!"));if(Object.hasOwn(l,t))return l[t];var c=u.hasOwnProperty("value"),s=this;switch(e){case"negation":var f=c?s.privateState:s.state;te(t,l,(function(){return!f[a]}),a);break;case"equality":var p=n[1];if(!p)throw Error("Must specify equality value for equality expression (is_something:equalToThis)");var h=c?s.privateState:s.state;te(t,l,(function(){return h[a]===p}),a);break;case"ternary":var d=n[1];if(!d)throw Error("Ternary state expression (prop?truthy:falsy) must include at least a truthy value!");var y=n[2],v=c?s.privateState:s.state;te(t,l,y?function(){return v[a]?d:y}:function(){return v[a]?d:void 0},a)}return l[t]}},{key:"getStateDependencies",value:function(){return this.stateDependencies}},{key:"use",value:function(t,e){t.call(this),_e(Ne,this).add(e)}},{key:"isUsing",value:function(t){return _e(Ne,this).has(t)}}],e&&Te(t.prototype,e),n&&Te(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const Le=Ce;function Ie(t){return Object.hasOwn(t,"state")?t:t.firstElementChild}var Re={replaceChildWith:function(t,e){var n,r,o,i=Ie(t),a=null!==(n=null==i||null===(r=i.state)||void 0===r?void 0:r.key)&&void 0!==n?n:t.stateKey,l=Ie(e),u=null!==(o=e.stateKey)&&void 0!==o?o:l.stateKey,c=this.replaceChild(e,t);return this.keyMap.delete(a),this.keyMap.set(u,e),c},swapChildWith:function(t,e){if(t!==e){var n=t.nextSiblingElement,r=e.nextSiblingElement;this.insertBefore(t,r),this.insertBefore(e,n)}},removeChild:function(t){var e,n=Ie(t),r=null!==(e=t.stateKey)&&void 0!==e?e:n.stateKey;HTMLElement.prototype.removeChild.call(this,t),this.keyMap.delete(r)},insertBefore:function(t,e){var n;HTMLElement.prototype.insertBefore.call(this,t,e);var r=Ie(t),o=null!==(n=t.stateKey)&&void 0!==n?n:r.stateKey;this.keyMap.set(o,t)},append:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(t=HTMLElement.prototype.append).call.apply(t,[this].concat(n));for(var o=0,i=n;o<i.length;o++){var a,l=i[o],u=Ie(l),c=null!==(a=l.stateKey)&&void 0!==a?a:u.stateKey;this.keyMap.set(c,l)}},appendChild:function(t){var e;HTMLElement.prototype.appendChild.call(this,t);var n=Ie(t),r=null!==(e=t.stateKey)&&void 0!==e?e:n.stateKey;this.keyMap.set(r,t)},prepend:function(t){var e;HTMLElement.prototype.prepend.call(this,t);var n=Ie(t),r=null!==(e=t.stateKey)&&void 0!==e?e:n.stateKey;this.keyMap.set(r,t)},detach:function(){var t;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]){var e=this.cloneNode(!0);e.$$originalElement=this,e.$$detached=j.CLONE,t=e}else this.setAttribute("inert",""),this.classList.add(T),this.$$detached=j.HIDE_UNHIDE,t=this;return t},reattach:function(){this.$$detached===j.HIDE_UNHIDE?(this.removeAttribute("inert",""),this.classList.remove(T)):this.$$detached===j.CLONE&&this.$$originalElement.replaceWith(this),this.$$detached=void 0},initialAppend:function(){for(var t,e=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];(t=HTMLElement.prototype.append).call.apply(t,[this].concat(r));for(var i=function(){var t=l[a];e.pendingKeyMapActions.add((function(){var n=Ie(t);if(n.isActive){var r,o,i=null!==(r=null==n||null===(o=n.state)||void 0===o?void 0:o.key)&&void 0!==r?r:t.stateKey;e.keyMap.set(i,t)}else n.addEventListener("active",(function(){var r,o,i=null!==(r=null==n||null===(o=n.state)||void 0===o?void 0:o.key)&&void 0!==r?r:t.stateKey;e.keyMap.set(i,t)}),{once:!0})}))},a=0,l=r;a<l.length;a++)i()}};function De(t){return function(t){if(Array.isArray(t))return He(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||$e(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(t,e){if(t){if("string"==typeof t)return He(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(t,e):void 0}}function He(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Fe={map:function(t){var e,n=xe(t.split(":"),2),r=n[0],o=n[1],i=this;e=i,Object.assign(e,Re),e.keyMap=new Map,e.pendingKeyMapActions=new Set,e.style.willChange="opacity",this.onAfterPaint((function(){var t=function(t,e,n){var r=xe(n.getState(t,!0),2),o=r[0],i=r[1];o.makeStateMap();var a=dt(o,e,N(n)?"li":void 0,n);return n.innerHTML="",a.length&&n.append.apply(n,De(a)),i}(r,o,i);if(!t)throw new Error("Mapping ".concat(r," to ").concat(o," failed!"));var e=t[r];if(!e||!e.hasOwnProperty("_isStatefulArray"))throw new Error("State array ".concat(r," for State Map must be stateful!"));t._stateManager.addStateMap(r,o,i)}))},text:function(t){var e=t;this.initialSetText(e)},bind:function(t){var e=xe(t.split(":"),2),n=e[0],r=e[1];this.bindAttributeToState(n,r)},bindprop:function(t){var e=xe(t.split(":"),2),n=e[0],r=e[1],o=xe(this.getState(n,!0),2),i=(o[0],o[1]);this[r]=i[n]}};function Ue(t){return Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ue(t)}function Ke(t){return function(t){if(Array.isArray(t))return Be(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ze(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||ze(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qe(){return qe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Je(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qe.apply(null,arguments)}function ze(t,e){if(t){if("string"==typeof t)return Be(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Be(t,e):void 0}}function Be(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function We(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ve(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,on(r.key),r)}}function Ye(t,e,n){return e&&Ve(t.prototype,e),n&&Ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xe(t,e,n){return e=Je(e),function(t,e){if(e&&("object"==Ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qe()?Reflect.construct(e,n||[],Je(t).constructor):e.apply(t,n))}function Qe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qe=function(){return!!t})()}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(t)}function Ze(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tn(t,e)}function tn(t,e){return tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tn(t,e)}function en(t,e,n){nn(t,e),e.set(t,n)}function nn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rn(t,e,n){return(e=on(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function on(t){var e=function(t,e){if("object"!=Ue(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ue(e)?e:e+""}function an(t,e,n){return t.set(un(t,e),n),n}function ln(t,e){return t.get(un(t,e))}function un(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new WeakMap,o=new WeakSet,i=new WeakMap,a=function(t){function n(){var t,e,a;return We(this,n),t=Xe(this,n),nn(e=t,a=o),a.add(e),rn(t,"host",null),en(t,r,!1),rn(t,"refName",void 0),en(t,i,[]),t.isReactiveElement=!0,t.isNativeElement=!0,t}return Ze(n,t),Ye(n,[{key:"activate",value:function(){var t,n=this,r=[],o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ze(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(this.getAttributeNames());try{for(o.s();!(t=o.n()).done;){var a=t.value,l=this.getAttribute(a);if(this.initialSetAttribute(a,l),0===a.indexOf("_")){var u=a.substring(1);r.push({command:u,args:l})}}}catch(t){o.e(t)}finally{o.f()}r.forEach((function(t){var r,o,i,a,l=t.command,u=t.args;null===(r=Fe[l])||void 0===r||r.call(n,u),null===(o=e.appCommands)||void 0===o||null===(o=o[l])||void 0===o||o.call(n,u);var c=(null===(i=n.host)||void 0===i?void 0:i.commands)||n.commands;null==c||null===(a=c[l])||void 0===a||a.call(n,u)})),ln(i,this).forEach((function(t){return t.call(n)})),ln(i,this).length=0,this.isActive=!0}},{key:"getHost",value:function(){var t;return this.host||this.parentNode||(null==this||null===(t=this.getRootNode())||void 0===t?void 0:t.host)}},{key:"connectedCallback",value:function(){var t=this;if(!ln(r,this)){var e=this.getRootNode();this.host=e===document?this.parentElement:e.host,this.host?this.host.isActive?this.activate():this.host.addEventListener("active",(function(){return t.activate()}),{once:!0}):this.activate(),an(r,this,!0)}}},{key:"disconnectedCallback",value:function(){var t,e=null!==(t=this.host)&&void 0!==t?t:this;e.ref&&delete e.ref[this.refName]}},{key:"attributeChangedCallback",value:function(t,e,n){var r=this;e!==n&&(this.isConnected?un(o,this,l).call(this,t,e,n):ln(i,this).push((function(){return un(o,r,l).call(r,t,e,n)})))}},{key:"getState",value:function(t){var n,r,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.isNativeElement&&this.host?this.host:this,a=!1;if(i&&i.state&&Object.hasOwn(i.state,t)&&(a=!0,r=(n=i.state)[t]),!a)for(;!a&&i.host;)(i=i.host)&&i.state&&Object.hasOwn(i.state,t)&&(a=!0,r=(n=i.state)[t]);if(!a){var l=e[d]();l&&Object.hasOwn(l,t)&&(a=!0,r=(n=l)[t])}return a||(r=void 0),o?[r,n]:r}},{key:"findElement",value:function(t){var n=this.host||this,r=n;return e.SPROUT_CONFIG.useShadow&&(r=n.shadowRoot),Object.hasOwn(n.ref,t)?n.ref[t]:r.querySelector('[ref="'.concat(t,'"]'))}},{key:"initialSetText",value:function(t){pt.call(this,t)}},{key:"initialSetAttribute",value:function(t,e){e=String(e);var n=0===e.indexOf("@"),r=function(t){return 0===t.indexOf(":")}(t),o=e;if(r){0;var i=e,a=t.substring(1);ft.call(this,a,i)}else{if(n){var l=this.getHost();0;var u=e.substring(1);o=l.getAttribute(u)}st.call(this,t,o)}}},{key:"onAfterPaint",value:function(t){requestAnimationFrame((function(){return requestAnimationFrame(t)}))}}])}(t);function l(t,e,n){var r=this.isNativeElement?this.host||this.getRootNode().host:this;if("ref"===t){var o=n;r.ref[o]=this,this.refName=o}}if(rn(a,"observedAttributes",c),n){var u=new WeakMap,s=function(t){function e(){var t;We(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return rn(t=Xe(this,e,[].concat(r)),"boundAttributesToState",new Map),en(t,u,void 0),t}return Ze(e,t),Ye(e,[{key:"bindAttributeToState",value:function(t,e){this.boundAttributesToState.set(t,e)}},{key:"updateStateFromAttribute",value:function(t){var e=rt(this.getAttribute(t)),n=this.boundAttributesToState.get(t),r=Ge(this.getState(n,!0),2),o=r[0],i=r[1];if(o===Symbol.for(E.STATE_NOT_FOUND))throw Error("updateStateFromAttribute: State property ".concat(n," not found"));o!==e&&(i[n]=e)}},{key:"activate",value:function(){qe(Je(e.prototype),"activate",this).call(this),an(u,this,(function(){var t=new Event("inputChange",{bubbles:!0,composed:!0});if("checkbox"===this.type){var e=this.host.state._stateManager.nodeManager.bindableAttributesStateNodes.get("checked"),n=null;e.has(this)&&(n=e.get(this)),this.checked?(n||(n=document.createAttribute("checked")),this.setAttributeNode(n)):(n||(n=this.getAttributeNode("checked")),n&&this.removeAttributeNode(n))}this.dispatchEvent(t)})),this.addEventListener("change",ln(u,this),!1)}},{key:"disconnectedCallback",value:function(){qe(Je(e.prototype),"disconnectedCallback",this).call(this),ln(u,this)&&this.removeEventListener("change",ln(u,this)),this.boundAttributesToState.clear()}},{key:"attributeChangedCallback",value:function(t,n,r){if(qe(Je(e.prototype),"attributeChangedCallback",this).apply(this,arguments),f.has(t)){var o=rt(r);this[t]!==o&&(this[t]=o)}this.boundAttributesToState.has(t)&&this.updateStateFromAttribute(t)}}])}(a);return rn(s,"observedAttributes",a.observedAttributes.concat(Ke(p))),s}return a}function sn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return fn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function fn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function hn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,On(r.key),r)}}function dn(t,e){if(e&&("object"==pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yn=function(){return!!t})()}function vn(){return vn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=bn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},vn.apply(null,arguments)}function bn(t){return bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bn(t)}function mn(t,e){return mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mn(t,e)}function gn(t,e,n){wn(t,e),e.set(t,n)}function wn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sn(t,e,n){return(e=On(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function On(t){var e=function(t,e){if("object"!=pn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pn(e)?e:e+""}function En(t,e){return t.get(Tn(t,e))}function An(t,e,n){return t.set(Tn(t,e),n),n}function Tn(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Mn=new CSSStyleSheet;function jn(t){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jn(t)}function Pn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||kn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(t){return function(t){if(Array.isArray(t))return Nn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||kn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kn(t,e){if(t){if("string"==typeof t)return Nn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nn(t,e):void 0}}function Nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Cn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xn(r.key),r)}}function Ln(t,e,n){return e=Rn(e),function(t,e){if(e&&("object"==jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,In()?Reflect.construct(e,n||[],Rn(t).constructor):e.apply(t,n))}function In(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(In=function(){return!!t})()}function Rn(t){return Rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rn(t)}function Dn(t,e){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dn(t,e)}function xn(t){var e=function(t,e){if("object"!=jn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=jn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jn(e)?e:e+""}function $n(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function Hn(t,e,n){return t.set(Un(t,e),n),n}function Fn(t,e){return t.get(Un(t,e))}function Un(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function Kn(t){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(t)}function Gn(){Gn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),l=new k(r||[]);return o(a,"_invoke",{value:M(t,n,l)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function m(){}function g(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(N([])));O&&O!==n&&r.call(O,a)&&(w=O);var E=g.prototype=b.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(o,i,a,l){var u=f(t[o],t,i);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==Kn(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,l)}),(function(t){n("throw",t,a,l)})):e.resolve(s).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,l)}))}l(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function M(e,n,r){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var u=j(l,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var c=f(e,n,r);if("normal"===c.type){if(o=r.done?y:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=y,r.method="throw",r.arg=c.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Kn(e)+" is not iterable")}return m.prototype=g,o(E,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},A(T.prototype),c(T.prototype,l,(function(){return this})),e.AsyncIterator=T,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new T(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=N,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function qn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Bn(r.key),r)}}function zn(t,e,n){return e&&qn(t.prototype,e),n&&qn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bn(t){var e=function(t,e){if("object"!=Kn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kn(e)?e:e+""}function Wn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vn(t,e,n){return e=Xn(e),function(t,e){if(e&&("object"==Kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Yn()?Reflect.construct(e,n||[],Xn(t).constructor):e.apply(t,n))}function Yn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Yn=function(){return!!t})()}function Xn(t){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xn(t)}function Qn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jn(t,e)}function Jn(t,e){return Jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jn(t,e)}function Zn(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function tr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Zn(i,r,o,a,l,"next",t)}function l(t){Zn(i,r,o,a,l,"throw",t)}a(void 0)}))}}function er(t){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(t)}function nr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rr(r.key),r)}}function rr(t){var e=function(t,e){if("object"!=er(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=er(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==er(e)?e:e+""}function or(t,e,n){return e=ar(e),function(t,e){if(e&&("object"==er(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ir()?Reflect.construct(e,n||[],ar(t).constructor):e.apply(t,n))}function ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ir=function(){return!!t})()}function ar(t){return ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ar(t)}function lr(t,e){return lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lr(t,e)}function ur(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Mn.replaceSync(":host { contain: layout paint; }");var cr=document.currentScript,sr=(null==cr?void 0:cr.hasAttribute("strict"))||!1,fr=Le,pr={useShadow:!0,allowAppScopeAccess:!0,useDSD:!1,strict:sr,appName:(null==cr?void 0:cr.getAttribute("app"))||"sprout-app",stateManagerClass:fr};pr.allowAppScopeAccess&&Object.defineProperty(globalThis,"sproutApps",{value:{},writable:!1});var hr,dr=new CSSStyleSheet;dr.replaceSync(M),document.adoptedStyleSheets=[].concat(function(t){if(Array.isArray(t))return ur(t)}(hr=document.adoptedStyleSheets)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(hr)||function(t,e){if(t){if("string"==typeof t)return ur(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(t,e):void 0}}(hr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[dr]);var yr,vr=(window,{window,document:null===(yr=window)||void 0===yr?void 0:yr.document});pr.allowAppScopeAccess&&Object.defineProperty(globalThis.sproutApps,pr.appName,{value:vr,writable:!1}),vr.SPROUT_CONFIG=Object.seal(pr);var br=Object.prototype.hasOwnProperty;J(Object.prototype,"hasOwnProperty",br),vr[d]=function(){return y},vr.setGlobalState=function(){var t=Wt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},void 0,void 0,yt,!0,vr).state,e="SproutGlobalState";return Object.defineProperty(vr,e,{value:t,writable:!1,configurable:!1}),Object.defineProperty(vr,d,{value:function(){return vr[e]}}),vr[e]},vr.setCommands=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(vr,"appCommands",{value:t,writable:!1,configurable:!1})};var mr={};v.forEach((function(t){return mr[t.element]=cn(t.class,vr,!0)})),vr.ReactiveCustomElement=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=cn(HTMLElement,t),n=(t.SPROUT_CONFIG.stateManagerClass,new WeakMap),r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,s=new WeakSet,f=function(e){function f(){var t,e,h,d,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,m=arguments.length>1?arguments[1]:void 0,g=arguments.length>2?arguments[2]:void 0,w=arguments.length>3?arguments[3]:void 0,S=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),e=this,h=bn(h=f),function(t,e){wn(t,e),e.add(t)}(t=dn(e,yn()?Reflect.construct(h,d||[],bn(e).constructor):h.apply(e,d)),s),Sn(t,"ownerMapElement",void 0),Sn(t,"state",void 0),Sn(t,"stateKey",void 0),gn(t,n,!1),gn(t,r,{init:null,mount:null,stateful:null,active:null,unmount:null}),gn(t,o,void 0),gn(t,i,void 0),gn(t,a,void 0),Sn(t,"events",void 0),Sn(t,"eventsMap",new Map),gn(t,l,void 0),Sn(t,"propAttributes",new Map),gn(t,u,!1),gn(t,c,void 0),Sn(t,"commands",void 0),Sn(t,"ref",{}),Sn(t,"canonicalTagName",void 0),"CONDITIONAL-ELEMENT"===t.tagName)return dn(t);if(t.isNativeElement=!1,An(u,t,S),w&&An(a,t,w),t.canonicalTagName=t.localName,En(u,t))t.canonicalTagName=t.localName.substring(0,t.localName.indexOf("-dsd"));else{if(g){var O=new CSSStyleSheet;O.replaceSync(g),An(i,t,O)}An(o,t,v?document.importNode(v,!0):document.importNode(b,!0)),Tn(s,t,y).call(t)}return m&&Tn(s,t,p).call(t,m),En(r,t).init&&En(r,t).init.call(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mn(t,e)}(f,e),d=f,(g=[{key:"setInitialState",value:function(t){this.initialState?Object.assign(this.initialState,t):this.initialState=t,t.hasOwnProperty("key")&&(this.stateKey=t.key)}},{key:"disconnectedCallback",value:function(){Tn(s,this,v).call(this),this.state=void 0,this.isActive=!1,En(r,this).unmount&&En(r,this).unmount.call(this)}},{key:"activate",value:function(){vn(bn(f.prototype),"activate",this).call(this),Tn(s,this,m).call(this),En(r,this).active&&En(r,this).active.call(this)}},{key:"findElement",value:function(e){var n,r,o=this,i=this;return t.SPROUT_CONFIG.useShadow&&(i=o.shadowRoot),Object.hasOwn(o.ref,e)?o.ref[e]:(null===(n=i)||void 0===n||null===(r=n.querySelector)||void 0===r?void 0:r.call(n,'[ref="'.concat(e,'"]')))||null}},{key:"connectedCallback",value:function(){var t=this;if(this.setAttribute("tagName",this.canonicalTagName),!En(n,this)){var e=this.getRootNode().host;En(r,this).mount&&En(r,this).mount.call(this);var o=function(){Tn(s,t,h).call(t),t.isActive=!0,t.dispatchEvent(new CustomEvent("active")),En(r,t).stateful&&En(r,t).stateful.call(t),t.activate()};e?e.isActive?o():e.addEventListener("active",o,{once:!0}):setTimeout(o,0),An(n,this,!0)}}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&("hidden"===t&&(null===n?this.dispatchEvent(new CustomEvent("unhide",{bubbles:!0})):this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))),this.propAttributes.has(t)&&this.propAttributes.get(t).forEach((function(t){t.nodeValue=n,"CONDITIONAL-RENDER"===t.ownerElement.tagName&&t.ownerElement.render()})))}}])&&hn(d.prototype,g),w&&hn(d,w),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,g,w}(e);function p(t){var e=this;if(An(c,this,t.settings),this.commands=t.commands,t.events){var o,i,a=function(t,n,r){e.eventsMap.has(t)||e.eventsMap.set(t,new Map),e.eventsMap.get(t).set(n,r)};for(var l in t.events)if("function"===(i=pn(o=t.events[l])))a("click",l,o);else if("object"===i)for(var u in o)a(u,l,o[u]);this.isConnected&&Tn(s,this,m).call(this)}for(var f in t.state&&(this.setInitialState(t.state),this.isConnected&&En(n,this)&&!this.state&&Tn(s,this,h).call(this)),En(r,this))t.hasOwnProperty(f)&&(En(r,this)[f]=t[f])}function h(){var e;if(this.initialState&&(null===(e=this.state)||void 0===e||!e._isActive)){var n=this.initialState;if(n._stateManager)this.state=n._stateManager.state;else{var r=Wt(n,void 0,void 0,yt,!1,t);this.state=r.state,this.state.$host=this}this.state._isActive=!0}}function y(){if(t.SPROUT_CONFIG.useShadow)this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot.adoptedStyleSheets=[Mn],En(a,this)&&this.shadowRoot.adoptedStyleSheets.push(En(a,this)),En(i,this)&&this.shadowRoot.adoptedStyleSheets.push(En(i,this)),this.shadowRoot.appendChild(En(o,this));else{var e=new DocumentFragment;e.appendChild(En(o,this)),this.appendChild(e)}}function v(){if(this.eventsMap.size){var t,e=sn(this.eventsMap.keys());try{for(e.s();!(t=e.n()).done;){var n=t.value;this.shadowRoot.removeEventListener(n,En(l,this),!1)}}catch(t){e.e(t)}finally{e.f()}}}function m(){if(!En(l,this)&&this.eventsMap.size){var e=t[d]();An(l,this,(function(t){var n=this.host,r=n.eventsMap.get(t.type);if(!r)return!1;var o,i=sn(t.composedPath());try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a&&a.refName&&r.has(a.refName)){var l=a,u=l.refName;r.get(u).call(l,t,n,e)}}}catch(t){i.e(t)}finally{i.f()}t.stopPropagation()}));var n,r=sn(this.eventsMap.keys());try{for(r.s();!(n=r.n()).done;){var o=n.value;this.shadowRoot.addEventListener(o,En(l,this),{capture:!0})}}catch(t){r.e(t)}finally{r.f()}}}return f}(vr),function(t,e){function n(t,e,n){return r.apply(this,arguments)}function r(){return(r=tr(Gn().mark((function e(n,r,o){var i,a,l,u,c;return Gn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.content,(a=i.querySelector("style"))&&i.removeChild(a),(u=i.querySelector("script"))&&(c=u.textContent,i.removeChild(u),c&&0!==c.trim().length))try{l=Function(c)()}catch(t){}customElements.define(r,function(t){function e(){var t;return Wn(this,e),Vn(this,e,[i,l,null===(t=a)||void 0===t?void 0:t.textContent,o])}return Qn(e,t),zn(e)}(t.ReactiveCustomElement)),customElements.define("".concat(r,"-dsd"),function(t){function e(){return Wn(this,e),Vn(this,e,[i,l,null,o,!0])}return Qn(e,t),zn(e)}(t.ReactiveCustomElement));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){var r,o=new CSSStyleSheet,i=document.querySelector('head > style[app="'.concat(e,'"]'));if(i)o.replaceSync(i.textContent);else{var a,l=null===(a=globalThis.SPROUT_COMPILED_STYLES)||void 0===a?void 0:a[e];o.replaceSync(l||"")}o.insertRule(M),"function"==typeof globalThis["".concat(e,"_runtime")]&&globalThis["".concat(e,"_runtime")].call(t);var u=null===(r=globalThis.SPROUT_COMPILED_TEMPLATES)||void 0===r?void 0:r[e];u&&"function"==typeof u.forEach?u.forEach((function(t,e){e&&t&&n(t,e,o)})):Array.prototype.forEach.call(document.querySelectorAll('template[app="'.concat(e,'"]')),(function(t){var e=t.getAttribute("for");e&&n(t,e,o)}))}()}(vr,pr.appName),v.forEach((function(t){customElements.define("reactive-".concat(t.element),mr[t.element],{extends:t.element})}));var gr=cn(HTMLHeadingElement,vr);["h1","h2","h3","h4","h5","h6"].forEach((function(t){customElements.define("reactive-".concat(t),function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),or(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lr(t,e)}(e,t),function(t,e,n){return e&&nr(t.prototype,e),n&&nr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(gr),{extends:t})}));var wr=cn(HTMLInputElement,vr,!0);customElements.define("reactive-input",wr,{extends:"input"});var Sr=function(t){var e,n,r,o=new WeakMap,i=new WeakMap,a=new WeakMap,l=function(t){function e(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return $n(t=Ln(this,e,[].concat(r)),o,void 0),$n(t,i,void 0),$n(t,a,void 0),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dn(t,e)}(e,t),n=e,r=[{key:"render",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Fn(o,this)){if(void 0===(t=this.getState(Fn(i,this))))throw Error("State value for ".concat(Fn(i,this)," not found while rendering conditional-render element:"),this)}else if(void 0===(t=this.getAttribute("_condition")))throw Error("_condition value not found while rendering conditional-render element:",this);var r=[];Fn(a,this).forEach((function(e){var n=e.condition,o=e.elements;(function(t,e,n){if("always"===t)return!0;switch(t){case"==":default:return n==e;case"===":return n===e;case"!=":return n!=e;case"!==":return n!==e;case"<":return n<e;case"<=":return n<=e;case">":return n>e;case">=":return n>=e}})(n.operator,n.value,t)&&r.push.apply(r,_n(o))})),n?(this.innerHTML="",this.append.apply(this,r)):r.length&&U(this,(function(){e.innerHTML="",e.append.apply(e,r)}))}},{key:"generateRenderMap",value:function(){var t=new Map;t.set("always",[]),_n(this.children).forEach((function(e){var n,r,o=e.getAttribute("_if").replaceAll(" ","");if(o)if(t.has(o))t.get(o).elements.push(e);else{var i=Pn(cond.trim().split(CONDITIONAL_OPERATORS_REGEX),3),a=i[1],l=i[2],u={operator:a,value:(r=n=l,"true"===n?r=!0:"false"===n?r=!1:isNaN(Number(n))||(r=Number(n)),r)};t.set(o,{condition:u,elements:[e]})}else t.get("always").elements.push(e)})),Hn(a,this,t)}},{key:"activate",value:function(){var t=this.getAttribute("_condition");if(!t)throw Error("conditional-render elements must have a _condition attribute!");if(0===t.indexOf("@")?(Z.call(this,"_condition",t),Hn(o,this,!1),Hn(i,this,t.substring(1))):(Hn(o,this,!0),Hn(i,this,t)),Fn(o,this)){var e=Fn(i,this),n=Pn(this.getState(e,!0),2),r=n[0],a=n[1];if(void 0===jn(r))throw Error("State property ".concat(e," not defined for _condition command!"));var l=a._stateManager;l.has("conditional-element")||l.use(Ht,"conditional-element"),l.addConditionallyRenderingElements(e,this),this.generateRenderMap(),this.render(!0)}else this.render(!0)}}],r&&Cn(n.prototype,r),l&&Cn(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l}(t);return e=l,r=["_condition"],(n=xn(n="observedAttributes"))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,l}(cn(HTMLElement,vr));customElements.define("conditional-render",Sr)})();
|
|
1
|
+
(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,r){return n=l(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,i()?Reflect.construct(n,r||[],l(e).constructor):n.apply(e,r))}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&a(o,n.prototype),o}(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var u=function(t){function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=r(this,n,[t])).add=function(){return n.unavailableMethod("add")},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(n,t),o=n,l=[{key:"unavailableMethod",value:function(t){throw Error("Can't use ".concat(t," in ReadonlySet"))}}],(i=[{key:"delete",value:function(){n.unavailableMethod("delete")}},{key:"clear",value:function(){n.unavailableMethod("clear")}}])&&e(o.prototype,i),l&&e(o,l),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,l}(o(Set)),c=["ref","hidden"],s=new u(["hidden","checked","disabled","required","selected"]),f=new u(["checked","disabled","selected","src"]),p=new u(["value","checked"]),h=new u(["_global","_gettingDependenciesFor","_localStateManager","_stateManager","_binding","_populate","_isActive","_isStateManager","_isStatefulArray","hasOwnProperty"]),d="getGlobalState",y="Global State Not Set Yet",v=(Object.freeze({NO_DEPENDENCIES_ARRAY_IN_SET_HOOK:function(t){return"State set hook, must include a dependencies array! None was found for ".concat(t)}}),Object.freeze([{class:HTMLAnchorElement,element:"a"},{class:HTMLAreaElement,element:"area"},{class:HTMLAudioElement,element:"audio"},{class:HTMLBodyElement,element:"body"},{class:HTMLBRElement,element:"br"},{class:HTMLButtonElement,element:"button"},{class:HTMLCanvasElement,element:"canvas"},{class:HTMLDataElement,element:"data"},{class:HTMLDataListElement,element:"datalist"},{class:HTMLDetailsElement,element:"details"},{class:HTMLDialogElement,element:"dialog"},{class:HTMLDivElement,element:"div"},{class:HTMLDListElement,element:"dl"},{class:HTMLEmbedElement,element:"embed"},{class:HTMLFieldSetElement,element:"fieldset"},{class:HTMLFormElement,element:"form"},{class:HTMLHRElement,element:"hr"},{class:HTMLHtmlElement,element:"html"},{class:HTMLIFrameElement,element:"iframe"},{class:HTMLImageElement,element:"img"},{class:HTMLLabelElement,element:"label"},{class:HTMLLegendElement,element:"legend"},{class:HTMLLIElement,element:"li"},{class:HTMLLinkElement,element:"link"},{class:HTMLMapElement,element:"map"},{class:HTMLMetaElement,element:"meta"},{class:HTMLMeterElement,element:"meter"},{class:HTMLObjectElement,element:"object"},{class:HTMLOListElement,element:"ol"},{class:HTMLOptGroupElement,element:"optgroup"},{class:HTMLOptionElement,element:"option"},{class:HTMLParagraphElement,element:"p"},{class:HTMLPictureElement,element:"picture"},{class:HTMLPreElement,element:"pre"},{class:HTMLProgressElement,element:"progress"},{class:HTMLQuoteElement,element:"blockquote"},{class:HTMLQuoteElement,element:"q"},{class:HTMLSelectElement,element:"select"},{class:HTMLSourceElement,element:"source"},{class:HTMLSpanElement,element:"span"},{class:HTMLTableElement,element:"table"},{class:HTMLTableCellElement,element:"td"},{class:HTMLTableCellElement,element:"th"},{class:HTMLTableRowElement,element:"tr"},{class:HTMLTableSectionElement,element:"thead"},{class:HTMLTableSectionElement,element:"tbody"},{class:HTMLTableSectionElement,element:"tfoot"},{class:HTMLTextAreaElement,element:"textarea"},{class:HTMLTimeElement,element:"time"},{class:HTMLTitleElement,element:"title"},{class:HTMLTrackElement,element:"track"},{class:HTMLUListElement,element:"ul"},{class:HTMLVideoElement,element:"video"},{class:HTMLSlotElement,element:"slot"}])),b=document.createElement("div"),m={nodeActionsMap:new Map,pendingPaintNodeManagers:new Set,eventBindingFunctions:new Map,conditionalRenders:new Map,stateChangeHandlers:new Map,paintRafId:null},g=(new u(["==","===","!=","!==","<","<=",">",">="]),new u(["shift","unshift","pop","push","reverse","sort","splice","copyWithin","fill"])),w=new u(["reverse","sort","copyWithin","fill"]),S=new u(["slice","map","filter","reduce","reduceRight","some","every","forEach","find","findIndex","findLast","findLastIndex","indexOf","lastIndexOf","includes","entries","keys","values","at","join","toString","toLocaleString"]),O=new u(["every","some","filter","forEach","map","reduce","reduceRight","slice"]),E={STATE_NOT_FOUND:"SPROUT_STATE_NOT_FOUND"},A=new u(["checked","value"]),T="sprout-frozen",M="\n .".concat(T," {\n clip-path: inset(100%);\n pointer-events: none;\n opacity: 0;\n }\n"),j=Object.freeze({HIDE_UNHIDE:1,CLONE:2}),P=100,_={ATTRIBUTE_ACTIONS:600,TEXT_ACTIONS:300,ELEMENT_ACTIONS:100,PROPERTY_ACTIONS:50,REATTACH_ACTIONS:10},k=8;function N(t){return"OL"===t.tagName||"UL"===t.tagName}function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||R(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||R(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(t,e){if(t){if("string"==typeof t)return I(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(t,e):void 0}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var D=m.pendingPaintNodeManagers,x=new Map;function $(t,e,n){var r;if(x.has(e)&&(r=x.get(e),cancelAnimationFrame(r)),t.length<P)r=requestAnimationFrame((function(){x.delete(e),t.forEach((function(t){return t()})),n&&n()})),x.set(e,r);else{x.delete(e);var o=L(t),i=0;requestAnimationFrame((function t(){o.slice(i,i+P).forEach((function(t){return t()})),(i+=P)<o.length&&requestAnimationFrame(t)}))}}var H=m.paintRafId,F=m.conditionalRenders;function U(t,e){F.set(t,e),$(Array.from(F.values()),"CONDITIONAL_RENDER",(function(){return F.clear()}))}function K(){H&&cancelAnimationFrame(H),H=requestAnimationFrame((function(){H=null,q()}))}function G(t){t.forEach((function(t){return t()}))}function q(t){var e,n=performance.now(),r=0,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=R(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(D);try{for(o.s();!(e=o.n()).done;){var i=e.value,a=C(i.resolveToDOMActions(),5),l=a[0],u=a[1],c=a[2],s=a[3],f=a[4];if(G(f.slice(0,_.REATTACH_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(s.slice(0,_.ELEMENT_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(l.slice(0,_.ATTRIBUTE_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(u.slice(0,_.TEXT_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(G(c.slice(0,_.PROPERTY_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return q()}));if(l.length||u.length||c.length||s.length||f.length)return requestAnimationFrame((function(){return q()}));i.paintStatus=null,D.delete(i)}}catch(t){o.e(t)}finally{o.f()}if(r>k)return requestAnimationFrame((function(){return q()}))}function z(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=V(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||V(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||V(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(t,e){if(t){if("string"==typeof t)return Y(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}"undefined"!=typeof window&&(window.SproutWaitIdle=function(){return new Promise((function(t){requestAnimationFrame((function e(){if(!m.pendingPaintNodeManagers.size)return t();requestAnimationFrame(e)}))}))});function X(t){switch(t){case Node.ATTRIBUTE_NODE:return{setAttribute:void 0};case Node.TEXT_NODE:return{textContent:void 0};case Node.ELEMENT_NODE:return{append:new Set,reattach:!1,setProperty:new Map,get hasPendingActions(){return this.append.size||this.reattach||this.setProperty.size}}}}function Q(t,e,n){var r=this,o=n;"todosFiltered"===e&&performance.mark("todo-generate-node-actions");var i=t.nodeManager.stateNodes[e],a=t.stateArrayMaps[e],l=t.nodeManager.conditionallyRenderingElements[e];if(i&&i.forEach((function(e){!function(t,e,n){e.nodeType===Node.ATTRIBUTE_NODE?t.addNodeAction(e,{actionType:"setAttribute",actionValue:n}):e.nodeType===Node.TEXT_NODE&&t.addNodeAction(e,{actionType:"textContent",actionValue:n})}(t.nodeManager,e,o)})),a){var u=o;a.forEach((function(e,n){!function(t,e,n,r){var o=null,i=!1,a=N(n),l=new Map,u=(n.getAttribute&&n.getAttribute("ref")||n.refName||n.tagName,t.map((function(t){return Object.hasOwn(t,"state")?t.state:t})));if(t.isNewArray){if(t.length){var c;i=!0;var s=pt(t,e,a?"li":void 0,o=n.detach());o.innerHTML="",(c=o).append.apply(c,W(s))}}else if(t.lastOperation){i=!0,o||(o=n.detach());var f=o.children,p=B(t.lastOperation,2),h=p[0],d=p[1];switch(h){case"shift":o.removeChild(o.firstElementChild);break;case"unshift":for(var y=d[0]-1;y>=0;y--){var v,b=t[y],m=null===(v=o.keyMap)||void 0===v?void 0:v.get(b.key);if(m){var g=o.firstElementChild;m!==g&&o.insertBefore(m,g)}else{var w=ft(b,e,a?"li":void 0,o);w.stateKey=b.key,o.prepend(w)}}break;case"pop":o.removeChild(o.lastElementChild);break;case"push":for(var S=f.length,O=t.length;S<O;S++){var E=t[S],A=ft(E,e,a?"li":void 0,o);A.stateKey=E.key,o.appendChild(A)}break;case"splice":var T,M,j=f.length,P=null!==(T=d[0])&&void 0!==T?T:0,_=d[1],k=P<0?Math.max(j+P,0):Math.min(P,j);M=void 0===_||_===1/0?j-k:_<0?0:Math.min(_,j-k);var C=d[2]||[],L=t.length;if(0===C.length&&j===L)break;if(0===k&&M>=j&&C.length===L&&j===L)break;for(var R=0;R<M;R++)o.removeChild(f[k]);var I,D=z(C);try{for(D.s();!(I=D.n()).done;){var x,$=ft(I.value,e,a?"li":void 0,o),H=null!==(x=f[k])&&void 0!==x?x:null;o.insertBefore($,H),k++}}catch(t){D.e(t)}finally{D.f()}}}else{for(var F,U=null==n?void 0:n.keyMap,K=null!==(F=o)&&void 0!==F?F:n,G=0;G<u.length;G++){var q,V,Y=u[G],X=null==Y?void 0:Y.key,Q=K.children[G];if(!Q)break;var J=a?null===(q=Q.firstElementChild)||void 0===q?void 0:q.state:Q.state,Z=J?J.key:Q.stateKey;if(Z!==X){i=!0,o||(o=n.detach());var tt=null!==(V=l.get(X))&&void 0!==V?V:U.get(X);if(tt){var et,nt=o.replaceChildWith(Q,tt);if(l.set(Z,nt),(a?null===(et=tt.firstElementChild)||void 0===et?void 0:et.state:tt.state)!==Y){var rt=ft(Y,e,a?"li":void 0,o);rt.stateKey=X,o.replaceChildWith(tt,rt)}}else{var ot=ft(Y,e,a?"li":void 0,o);ot.stateKey=X,o.replaceChildWith(Q,ot)}}else if(J!==Y){i=!0,o||(o=n.detach());var it=ft(Y,e,a?"li":void 0,o);it.stateKey=X,o.replaceChildWith(Q,it)}}for(;(null!==(at=o)&&void 0!==at?at:n).children.length>u.length;){var at,lt;i=!0,o||(o=n.detach()),o.removeChild((null!==(lt=o)&&void 0!==lt?lt:n).lastElementChild)}}var ut=o?o.children.length:n.children.length;if(t.length>ut){i=!0,o||(o=n.detach());for(var ct=o.children.length;ct<t.length;ct++){var st,ht=t[ct];if(null===(st=o.keyMap)||void 0===st||!st.has(ht.key)){var dt=void 0;(dt=l.has(ht.key)?l.get(ht.key):ft(ht,e,a?"li":void 0,o)).stateKey=ht.key,o.appendChild(dt)}}}i&&r.nodeManager.addNodeAction(o,{actionType:"reattach",actionValue:!0})}(u,e,n,t)}))}l&&l.forEach((function(t){U(r,t.render.bind(r))})),"pending"===t.nodeManager.paintStatus&&t.nodeManager.queuePaint()}function J(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,e,{value:n,configurable:!1,writable:!0,enumerable:r})}function Z(t,e,n){var r=e.substring(1),o=this.getAttributeNode(t);o.nodeValue=n.getAttribute(r),o.isPropAttribute=!0,n.propAttributes.has(r)||n.propAttributes.set(r,new Set),n.propAttributes.get(r).add(o)}function tt(t){if(0===t.indexOf("@"))return["property",[t.substring(1)]];if(0===t.indexOf("!"))return["negation",[t.substring(1)]];for(var e,n=0,r=t[n];n++<t.length;){if(e=t[n],3==n&&"is_"==r)return["equality",t.substring(3).split(":")];if("?"===e)return["ternary",r,t.substring(n+1).split(":")];r+=e}return["literal",[t]]}function et(t){return""===t||null!==t&&t}function nt(t,e){return lt(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||it(t,e)||ot()}function rt(t){return lt(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||it(t)||ot()}function ot(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function it(t,e){if(t){if("string"==typeof t)return at(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(t,e):void 0}}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function lt(t){if(Array.isArray(t))return t}"undefined"==typeof HTMLElement||Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var ut=function(t,e){var n;n=t,s.has(n)?"false"===e?this.removeAttribute(t):elementSetAttribute.call(this,t,""):elementSetAttribute.call(this,t,e)},ct=function(t,e){var n=rt(tt(e)),r=n[0],o=n.slice(1),i=o[0],a=nt(this.getState(i,!0),2),l=a[0],u=a[1];var c=u._stateManager,s="literal"===r?l:c.bindStatePropExpression(e,r,o);this.removeAttribute(t);var f=document.createAttribute(t);f.nodeValue=s,J(f,"isStateAttribute",!0),J(f,"originalOwnerElement",this),"boolean"==typeof s&&(f.nodeValue=""),c.addStateNode(e,f),!1!==s&&this.setAttributeNode(f),this.addEventListener("disconnected",(function(){u._stateManager.removeStateNode(e,f)}),{once:!0})},st=function(t){var e=rt(tt(t)),n=e[0],r=e.slice(1),o=r[0],i=nt(this.getState(o,!0),2),a=i[0],l=i[1];var u=l._stateManager,c="literal"===n?a:u.bindStatePropExpression(t,n,r),s=document.createTextNode(c);J(s,"isStateAttribute",!0),l._stateManager.addStateNode(t,s),this.appendChild(s),this.addEventListener("disconnected",(function(){l._stateManager.removeStateNode(t,s)}),{once:!0})};function ft(t,e,n,r){var o,i=document.createElement(e);return i.setInitialState(t),i.ownerMapElement=r,n?(o=document.createElement(n)).appendChild(i):o=i,t.hasOwnProperty("key")&&!o.hasOwnProperty("stateKey")&&(o.stateKey=t.key),o}function pt(t,e,n,r){return t.map((function(t,o){Object.hasOwn(t,"state")&&(t=t.state);var i=ft(t,e,n,r);return i.stateKey=t.key,i}))}function ht(t,e,n){var r;if(!dt(e)){var o=null!=n?n:t.state[e],i=Object.getOwnPropertyDescriptor(t.state,e);null==i||null===(r=i.get)||void 0===r||r.isStateGetter;!function(t,e,n){var r=new CustomEvent("stateChange",{bubbles:!1,composed:!1,detail:{property:e,newValue:n}});t.dispatchEvent(r)}(t.state,e,o),Q(t,e,o),e.startsWith("!")||Q(t,"!".concat(e),!o)}}function dt(t){return h.has(t)}function yt(t){return 0===t.indexOf("set_")}function vt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||mt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(t){return function(t){if(Array.isArray(t))return gt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||mt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(t,e){if(t){if("string"==typeof t)return gt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(t,e):void 0}}function gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_t(r.key),r)}}function Ot(t,e){if(e&&("object"==wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Et(){return Et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Et.apply(null,arguments)}function At(t){var e="function"==typeof Map?new Map:void 0;return At=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(Tt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&Mt(o,n.prototype),o}(t,arguments,jt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Mt(n,t)},At(t)}function Tt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tt=function(){return!!t})()}function Mt(t,e){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mt(t,e)}function jt(t){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jt(t)}function Pt(t,e,n){return(e=_t(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _t(t){var e=function(t,e){if("object"!=wt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wt(e)?e:e+""}var kt=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);i.SPROUT_CONFIG.stateManagerClass;if(!Array.isArray(t))throw Error("Argument for StateFulArray constructor must be an array!");var l,u,c,s=t,f=s.map((function(t,e){var o=t;return Object.hasOwn(t,"state")||Object.hasOwn(t,"_stateManager")||Array.isArray(t)||"object"===wt(t)&&(o=zt(t,r,n._stateManager,ht,!1,i)),o}));return l=this,u=e,c=bt(f),u=jt(u),Pt(o=Ot(l,Tt()?Reflect.construct(u,c||[],jt(l).constructor):u.apply(l,c)),"arrayMaps",{}),o.parentStateObject=n,o.arrayStateProp=r,o.appScope=i,o.rawArray=s,a&&o.makeStateMap(),J(f=new Proxy(o,Dt(null==n?void 0:n._stateManager,r,i)),"_isStatefulArray",!0),o.statefulArray=f,Ot(o,f)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)}(e,t),n=e,r=[{key:Symbol.iterator,value:function(){return Et(jt(e.prototype),Symbol.iterator,this).call(this)}},{key:"runArrayOperation",value:function(t,e,n){switch(t){case"shift":return this.lastOperation=["shift"],[e.apply(this,n),!1];case"unshift":return this.lastOperation=["unshift",[n.length]],[e.apply(this,n),!1];case"pop":return this.lastOperation=["pop"],[e.apply(this),!1];case"push":return this.lastOperation=["push",[n.length]],[e.apply(this,n),!1];case"splice":var r=vt(n,2),o=r[0],i=r[1],a=n.slice(2);return this.lastOperation=["splice",[o,i,a]],[e.apply(this,n),!1];default:this.lastOperation=void 0;var l=e.apply(this,n);return[l,Array.isArray(l)]}}},{key:"doArrayOperation",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.$$operation=t;var o,i=this.length,a=!1;if(O.has(t)){var l=n[0];if(this.length&&Object.hasOwn(this.arrayMaps,t)&&this.arrayMaps[t].has(l)){var u=this.arrayMaps[t].get(l);if(this.lastDirtyTimestamp>u.timestamp){var c=vt(this.runArrayOperation(t,Et(jt(e.prototype),t,this),n),2);o=c[0],a=c[1],this.arrayMaps[t].set(l,{lastResult:o,timestamp:(new Date).getTime()})}else o=u.lastResult}else{var s=vt(this.runArrayOperation(t,Et(jt(e.prototype),t,this),n),2);o=s[0],a=s[1],Object.hasOwn(this.arrayMaps,t)||(this.arrayMaps[t]=new Map,this.arrayMaps[t].set(l,{lastResult:o,timestamp:(new Date).getTime()}))}}else{var f=vt(this.runArrayOperation(t,Et(jt(e.prototype),t,this),n),2);o=f[0],a=f[1]}var p=this.length,h=w.has(t)||"splice"===t&&p===i;return r&&h&&this.parentStateObject._stateManager.setDirtyProp("".concat(this.arrayStateProp,".length"),!0),delete this.$$operation,r&&this.parentStateObject._stateManager.setDirtyProp(this.arrayStateProp),[o,a]}},{key:"mapStateKeys",value:function(){var t=this;this.forEach((function(e){var n=Object.hasOwn(e,"state")?e.state:e;t.keyMap.set(n.key,n)}))}},{key:"makeStateMap",value:function(){this._isStateMap=!0,this.keyMap=new Map,this.mapStateKeys()}}],o=[{key:Symbol.species,get:function(){return Array}}],r&&St(n.prototype,r),o&&St(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(At(Array));function Nt(t){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}function Ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Lt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Pt(kt,"functions",new u(["constructor","statifyArray","addDirtyIndex","doArrayOperation","runArrayOperation","makeStateMap","mapStateKeys","toArray"]));var Rt=function(){return{get:function(t,e,n){var r;if(dt(e)||0===e.indexOf("$$"))return Reflect.get.apply(Reflect,arguments);var o=Object.getOwnPropertyDescriptor(t,e);return null!=o&&null!==(r=o.get)&&void 0!==r&&r.isStateGetter||(Object.hasOwn(t.$$accessCount,e)?t.$$accessCount[e]++:t.$$accessCount[e]=1),Reflect.get.apply(Reflect,arguments)}}},It=function(t,e){arguments.length>2&&void 0!==arguments[2]||window,t.state;return{apply:function(n,r,o){t.clearStateDependencies(e);var i=r._global,a=Ct(Xt(n,r),3),l=a[0],u=a[1],c=a[2];return l.forEach((function(n){t.addStateDependency(n,e)})),null==u||u.forEach((function(n){i._stateManager.addGlobalStateDependency(n,e,t)})),c}}},Dt=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,o=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t.setDirtyProp(e,!0),n&&t.setDirtyProp("".concat(e,".length"),!0)},i=function(t){var e;if(t)return Object.hasOwn(t,"state")?null===(e=t.state)||void 0===e?void 0:e.key:t.key};return{set:function(a,l,u){if(0===l.indexOf("$$"))return Reflect.set(a,l,u);if("length"===l)return n=Reflect.set(a,l,u),a.hasDirtyItems=!0,a.hasOwnProperty("$$operation")?o(!0,!1):o(!0,!0),n;if(a[l]===u)return!0;var c;Number(l);if(!isNaN(l)){var s=Number(l),f=a[s],p=i(f);if(u=Bt(u,e,t,r),Object.hasOwn(u,"_stateManager")&&(u=u._stateManager),!a.hasOwnProperty("$$operation")){var h=!1;if(s<a.length&&(h=!0),(n=Reflect.set(a,l,u))&&a._isStateMap){void 0!==p&&a.keyMap.delete(p);var d=i(u);void 0!==d&&a.keyMap.set(d,(c=u,Object.hasOwn(c,"state")?c.state:c))}return h&&o(),n}}return Reflect.set(a,l,u)},get:function(e,n,r){if("symbol"===Nt(n))return Reflect.get.apply(Reflect,arguments);if("length"===n&&Object.hasOwn(e.parentStateObject,"$$accessCount")&&!Object.hasOwn(e,"$$operation")){var o=e.arrayStateProp;Object.hasOwn(e.parentStateObject.$$accessCount,"".concat(o,".length"))?e.parentStateObject.$$accessCount["".concat(o,".length")]++:e.parentStateObject.$$accessCount["".concat(o,".length")]=1}if(n.indexOf&&0===n.indexOf("__")){var i=n.substring(2);return Reflect.get(e,i,r)}if("function"==typeof e[n]&&!kt.functions.has(n)){var a=e.parentStateObject;if(a&&Object.hasOwn(a,"$$accessCount")){var l=String(n);if(S.has(l)){var u=e.arrayStateProp;a.$$accessCount[u]=(a.$$accessCount[u]||0)+1}}}if(!t.isInitializing&&"function"==typeof e[n]&&!kt.functions.has(n))return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=Ct(e.doArrayOperation.call(e.statefulArray,n,r,g.has(n)),2),a=i[0];i[1];return a};var c=Number(n);if(!isNaN(c)){var s=e[c];if(void 0===s)return;return s&&Object.hasOwn(s,"state")?s.state:s}return Reflect.get.apply(Reflect,arguments)},deleteProperty:function(t,e){if(isNaN(Number(e)))return Reflect.deleteProperty(t,e);var n=t[Number(e)],r=i(n),o=Reflect.deleteProperty(t,e);return o&&t._isStateMap&&void 0!==r&&t.keyMap.delete(r),o}}};function xt(){this.conditionallyRenderingElements={},this.addConditionallyRenderingElements=function(t,e){this.nodeManager.addConditionallyRenderingElements(t,e)}}function $t(){this.stateArrayMaps={},this.addStateMap=function(t,e,n){this.stateArrayMaps.hasOwnProperty(t)||(this.stateArrayMaps[t]=new Map),this.stateArrayMaps[t].set(n,e)},this.clearStateMapsLastOperation=function(){for(var t=0,e=Object.keys(this.stateArrayMaps);t<e.length;t++){var n=e[t];delete this.state[n].lastOperation}}}function Ht(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ft(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ut(t){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(t)}function Kt(t,e,n){if(qt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&Gt(o,n.prototype),o}function Gt(t,e){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gt(t,e)}function qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qt=function(){return!!t})()}function zt(t,e,n){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:window,o=new Ne(t,e,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:ht,arguments.length>4&&void 0!==arguments[4]&&arguments[4],r);return o.use(xt,"conditional-element"),o.use($t,"map"),o}function Bt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return dt(e)||(Array.isArray(t)?t=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Object.hasOwn(t,"_isStatefulArray"))return t;var i=Kt(kt,[t,n,e,r,o]);return n.hasOwnProperty("".concat(e,".length"))||Object.defineProperty(n,"".concat(e,".length"),{get:function(){return this[e].length}}),i}(t,e,n.state,r,o):"object"!==Ut(t)||null===t||t.hasOwnProperty("_stateManager")||(t=zt(t,e,n,ht,!1,r).state)),t}function Wt(t,e,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,i="set_".concat(e),a=Ht(t,2),l=a[0],u=a[1];if("function"!=typeof l)throw Error("Setter hooks must define a function as the first item!");var c,s=n.state;if(u.deps=null!==(r=u.deps)&&void 0!==r?r:"auto",!u.init||!u.once)if("auto"===u.deps)if(u.reevaluate){var f=It(n,i,o);l=new Proxy(l,f),t[0]=l}else{var p,h,d,y=Ht(Xt(l,s),3);h=y[0],d=y[1],c=y[2],h.forEach((function(t){n.addStateDependency(t,i)})),null===(p=d)||void 0===p||p.forEach((function(t){n.addStateDependency(t,i),s._global._stateManager.addGlobalStateDependency(t,i,n)}))}else u.deps.forEach((function(t){if(0===t.indexOf("global")){var e=t.substring(t.indexOf("global.")+7);s._global.addGlobalStateDependency(i,e,n)}else n.addStateDependency(t,i)}));Object.defineProperty(s,e,{get:function(){return Object.hasOwn(s,"$$accessCount")&&(Object.hasOwn(s.$$accessCount,e)?s.$$accessCount[e]++:s.$$accessCount[e]=1),n.privateState[e]},set:function(){throw Error("Cannot directly set the state value of a result of a setter hook function!")}}),u.init&&(c||(c=l.call(s)),(u.statify||u.stateMap)&&(c=Bt(c,e,n,o,u.stateMap)),n.privateState[e]=c,n.setDirtyProp(e))}function Vt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=n.state,i=n.privateState[e];void 0===i&&Wt(t,e,n,r);var a=Ht(t,2),l=a[0],u=a[1];if("function"!=typeof l)throw Error("Setter hooks must define a function as the first item!");var c=l.call(o),s=!1;if(void 0===c)throw Error("State Set Hook functions MUST return a value");return(u.statify||u.stateMap)&&(c=Bt(c,e,n,r,u.stateMap)),c!==i&&(n.privateState[e]=c,s=!0),u.once&&delete o["set_".concat(e)],s}function Yt(t){var e;for(var n in t)-1!==(e=n.indexOf(".length"))&&t[n.substring(0,e)]--;return new Set(Object.keys(t).filter((function(e){return t[e]>0})))}function Xt(t,e){var n=!1,r=new Proxy(e,Rt());r.$$accessCount={},Object.hasOwn(r,"_global")&&r._global!==y&&(n=!0,r._global=new Proxy(r._global,Rt),r._global.$$accessCount={});var o=t.call(r),i=Yt(r.$$accessCount);delete r.$$accessCount;var a=null;return n&&(a=Yt(r._global.$$accessCount),delete r._global.$$accessCount),[i,a,o]}function Qt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=t.state,o=Object.getOwnPropertyDescriptors(e),i=function(e){var i=o[e];if(dt(e))return Object.defineProperty(r,e,i),1;var a=function(t,e){if(t.get&&"function"==typeof t.get)return{nativeGetter:!0,func:t.get,deps:"auto",reevaluate:!1,init:!1,isSetter:!1};if(t.value){var n=t.value;if(0===e.indexOf("set_")){if(!Array.isArray(n))throw Error("State setter hooks must be arrays!");var r=n[1]||{};return{nativeGetter:!1,func:n[0],deps:r.deps&&Array.isArray(r.deps)?r.deps:"auto",reevaluate:!!r.reevaluate,init:!!r.init,once:!!r.once,stateMap:!!r.stateMap,statify:!!r.statify,isSetter:0===e.indexOf("set_")}}}}(i,e);if(a){var l=a.isSetter?e.substring(4):e;if(a.func.bind(r),a.isSetter&&!a.nativeGetter)Wt(i.value,l,t,n),a.once&&(i.configurable=!0),Object.defineProperty(r,e,i);else if(a.nativeGetter){i.get.isStateGetter=!0;var u=Ht(Xt(i.get,r),2),c=u[0],s=u[1];c.forEach((function(n){t.addStateDependency(n,e)})),null==s||s.forEach((function(n){t.addStateDependency(n,e),r._global._stateManager.addGlobalStateDependency(n,e,t)})),i.get.bind(r),Object.defineProperty(r,l,i)}}else if(i.hasOwnProperty("value")){var f=e,p=Bt(i.value,f,t,n);t.privateState.hasOwnProperty(f)||(t.privateState[f]=p),Object.defineProperty(r,f,{set:function(e){e!==t.privateState[f]&&(e=Bt(e,f,t,n),t.privateState[f]=e,t.setDirtyProp(f),t.setDirtyProp("".concat(f,".length")))},get:function(){return t.privateState[f]}})}};for(var a in o)i(a)}function Jt(t,e,n,r){Object.defineProperty(e,t,{get:n,set:function(){throw Error("Cannot directly set a State property expression")},enumerable:!0}),e._stateManager.addStateDependency(r,t)}function Zt(t){var e=new Set,n=new Set;return t.forEach((function(t){yt(t)?n.add(t):e.add(t)})),[e,n]}function te(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||oe(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=oe(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function re(t){return function(t){if(Array.isArray(t))return ie(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||oe(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(t,e){if(t){if("string"==typeof t)return ie(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(t,e):void 0}}function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ae(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ce(r.key),r)}}function le(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function ue(t,e,n){return(e=ce(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ce(t){var e=function(t,e){if("object"!=ne(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ne(e)?e:e+""}function se(t,e){return t.get(function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(t,e))}var fe=m.pendingPaintNodeManagers,pe=new WeakMap,he=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ue(this,"stateNodes",{}),ue(this,"conditionallyRenderingElements",{}),ue(this,"bindableAttributesStateNodes",new Map(re(A).map((function(t){return[t,new Map]})))),le(this,pe,new Map),ue(this,"paintStatus",null)},(e=[{key:"addStateNode",value:function(t,e){this.stateNodes.hasOwnProperty(t)||(this.stateNodes[t]=new Set),this.stateNodes[t].add(e),p.has(e.nodeName)&&this.bindableAttributesStateNodes.get(e.nodeName).set(e.originalOwnerElement,e)}},{key:"removeStateNode",value:function(t,e){var n;null===(n=this.stateNodes)||void 0===n||n[t].delete(e)}},{key:"addConditionallyRenderingElements",value:function(t,e){var n;this.conditionallyRenderingElements.hasOwnProperty(t)||(this.conditionallyRenderingElements[t]=new Set),e.originalParentElement=e.parentElement||(null===(n=e.host)||void 0===n?void 0:n.shadowRoot),this.conditionallyRenderingElements[t].add(e)}},{key:"addNodeAction",value:function(t,e){se(pe,this).has(t)||se(pe,this).set(t,X(t.nodeType));var n=se(pe,this).get(t),r=e.actionType,o=e.actionValue;if(t.nodeType===Node.ELEMENT_NODE)switch(r){case"append":n.append.add(o);break;case"setProperty":n.setProperty(o.property,o.value);break;case"reattach":n.reattach=!0}else n[r]=o;this.paintStatus||(this.paintStatus="pending")}},{key:"queuePaint",value:function(){"pending"===this.paintStatus&&(fe.add(this),K(),this.paintStatus="queued")}},{key:"resolveToDOMActions",value:function(){var t=[],e=[],n=[],r=[],o=[];return se(pe,this).forEach((function(i,a){switch(a.nodeType){case Node.ATTRIBUTE_NODE:var l=i.setAttribute,u=ne(l);if("undefined"!==u)if("boolean"===u){if(!a.hasOwnProperty("originalOwnerElement"))throw Error("originalOwnerElement not found on boolean attribute node! Should never happen!");!1===l?a.originalOwnerElement.hasAttribute(a.name)&&t.push((function(){a.originalOwnerElement.removeAttributeNode(a)})):a.originalOwnerElement.hasAttribute(a.name)||t.push((function(){a.originalOwnerElement.setAttributeNode(a)}))}else"string"===u&&a.nodeValue!==l&&t.push((function(){return a.nodeValue=l}));break;case Node.TEXT_NODE:if(void 0!==i.textContent){var c=String(i.textContent);a.nodeValue!==c&&e.push((function(){return a.nodeValue=c}))}break;case Node.ELEMENT_NODE:var s,f=ee(i.append.values());try{var p=function(){var t=s.value;n.push((function(){return a.appendChild(t)}))};for(f.s();!(s=f.n()).done;)p()}catch(t){f.e(t)}finally{f.f()}var h,d,y=ee(i.setProperty);try{var v=function(){var t=te(h.value,2),e=t[0],n=t[1];a[e]!==n&&o.push((function(){return a[e]=n}))};for(y.s();!(h=y.n()).done;)v()}catch(t){y.e(t)}finally{y.f()}i.reattach&&(r.push((function(){return a.reattach()})),null!=a&&null!==(d=a.pendingKeyMapActions)&&void 0!==d&&d.size&&r.push((function(){var t,e=ee(a.pendingKeyMapActions);try{for(e.s();!(t=e.n()).done;)(0,t.value)()}catch(t){e.e(t)}finally{e.f()}a.pendingKeyMapActions.clear()})),i.reattach=!1)}})),se(pe,this).clear(),[t,e,o,n,r]}}])&&ae(t.prototype,e),n&&ae(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function de(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return new Proxy(t,function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return{set:function(n,r,o){if(dt(r))return Reflect.set.apply(Reflect,arguments);var i,a=Reflect.set.apply(Reflect,arguments),l=t._stateManager;return l.parentStateManager&&(performance.mark("todo-array-set-dirty-prop"),null===(i=l.parentStateManager)||void 0===i||i.setDirtyProp(e)),a},defineProperty:function(e,r,o){return dt(r)?Reflect.defineProperty.apply(Reflect,arguments):(void 0!==(null==o?void 0:o.value)&&(o.value=Bt(o.value,r,t._stateManager,n)),Reflect.defineProperty(e,r,o))},get:function(t,e,n){var r=Reflect.get.apply(Reflect,arguments);return"function"==typeof r?r.bind(t):r}}}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,e))}function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function ve(t){return function(t){if(Array.isArray(t))return Se(t)}(t)||be(t)||we(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function me(t,e){return Oe(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||we(t,e)||ge()}function ge(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function we(t,e){if(t){if("string"==typeof t)return Se(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(t,e):void 0}}function Se(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Oe(t){if(Array.isArray(t))return t}function Ee(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Me(r.key),r)}}function Ae(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function Te(t,e,n){return(e=Me(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Me(t){var e=function(t,e){if("object"!=ye(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ye(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ye(e)?e:e+""}function je(t,e){return t.get(function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(t,e))}var Pe=new Map;var _e=new WeakMap,ke=function(){return t=function t(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ht,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:window;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Te(this,"isInitializing",!1),Te(this,"privateState",{}),Te(this,"state",new EventTarget),Te(this,"stateDependencies",new Map),Te(this,"parentStateProp",void 0),Te(this,"parentStateManager",void 0),Te(this,"dirtyProps",new Set),Te(this,"nodeManager",new he),Ae(this,_e,new Set),this.isInitializing=!0,this.parentStateProp=n,this.parentStateManager=r,this.handleStateChange=i,this.appScope=l,J(this.state,"_stateManager",this,!0),this.state.$$isInitializing=!0,this.state.populate=function(t){for(var e in t)this.hasOwnProperty(e)&&(this[e]=t[e])},n&&r&&(this.state=de(this.state,n,l)),a)this.globalStateDependencies=new Map,this.addGlobalStateDependency=function(t,e,n){o.globalStateDependencies.has(t)||o.globalStateDependencies.set(t,new Map);var r=o.globalStateDependencies.get(t);r.has(n)||r.set(n,new Set),r.get(n).add(e)};else{var u=l[d]();J(this.state,"_global",u,!0)}!function(t,e){Qt(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:window)}(this,e,l),delete this.state.$$isInitializing,J(this.state,"_isStateManager",!0),J(this.state,"_isActive",!0,!1),this.isInitializing=!1},e=[{key:"setDirtyProp",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.state.$$isInitializing){var n,r,o=t.indexOf(".length"),i=o>0?t.substring(0,o):t;if(!Object.hasOwn(this.state,i))throw Error("Error in setDirtyProp. State has no property: '".concat(t,"'. This should never happen"));this.dirtyProps.add(t),Array.isArray(this.state[i])&&(this.state[i].lastDirtyTimestamp=(new Date).getTime()),e&&(n=this,r=this.handleStateChanges.bind(this),Pe.set(n,r),$(Array.from(Pe.values()),"STATE_CHANGE",(function(){return Pe.clear()})))}}},{key:"handleStatePropDependencies",value:function(t){var e=this,n=this.stateDependencies,r=null==this?void 0:this.globalStateDependencies;t.forEach((function(t){!function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=t.state;if(yt(e)){var o=r[e],i=e.substring(4);Vt(o,i,t,n)&&ht(t,i,null,n.offscreenContainer)}else if(e.indexOf(".length")>0){var a=e.split(".")[0];ht(t,e,t.state[a].length,n.offscreenContainer)}else ht(t,e,null,n.offscreenContainer)}(e,t,e.appScope);var o=yt(t)?t.substring(4):t;if(null!=n&&n.has(o)){var i=me(Zt(n.get(o)),2),a=i[0],l=i[1];l.size&&e.handleStatePropDependencies(l),a.size&&e.handleStatePropDependencies(a)}null!=r&&r.has(o)&&r.get(o).forEach((function(t,e){var n=me(Zt(t),2),r=n[0],o=n[1];o.size&&e.handleStatePropDependencies(o),r.size&&e.handleStatePropDependencies(r)}))}))}},{key:"isGlobalState",value:function(){return!this.state.hasOwnProperty("_global")}},{key:"topologicalSortStateProps",value:function(t){var e=this;return ve(t).toSorted((function(t,n){var r,o;return t.startsWith(n+".")?1:n.startsWith(t+".")?-1:((null===(r=e.stateDependencies[t])||void 0===r?void 0:r.size)||0)-(null===(o=e.stateDependencies[n])||void 0===o?void 0:o.size)||0}))}},{key:"handleStateChanges",value:function(){var t=this;if(this.dirtyProps.size){performance.mark("todo-topological-sort");var e=this.topologicalSortStateProps(this.dirtyProps);this.dirtyProps.clear(),this.isGlobalState();var n=new Set,r=new Set,o=new Set,i=this,a=i.state;e.forEach((function(e){var l;if(yt(e)){e=e.substring(4);var u=a[e];performance.mark("todo-call-setter-hook"),Vt(u,e,i,t.appScope)&&t.handleStateChange(i,e,null)}else t.handleStateChange(i,e,null);i.stateDependencies.has(e)&&i.stateDependencies.get(e).forEach((function(t){yt(t)?r.add(t):n.add(t)}));var c=null===(l=i.state)||void 0===l?void 0:l._global;if(c===y&&(c=t.appScope[d]()),c!==y){var s,f=(null===(s=c)||void 0===s?void 0:s._stateManager)||i;f.globalStateDependencies.has(e)&&o.add(f.globalStateDependencies.get(e))}})),r.size&&this.handleStatePropDependencies(r),n.size&&this.handleStatePropDependencies(n),o.size&&o.forEach((function(t,e){e.handleStatePropDependencies(t)})),i.clearStateMapsLastOperation(),this.parentStateManager&&this.parentStateManager.setDirtyProp(this.parentStateProp)}}},{key:"addStateDependency",value:function(t,e){this.stateDependencies.has(t)||this.stateDependencies.set(t,new Set),this.stateDependencies.get(t).add(e),Array.isArray(this.state[t])&&this.addStateDependency("".concat(t,".length"),e)}},{key:"clearStateDependencies",value:function(t){this.stateDependencies.has(t)&&this.stateDependencies.set(t,new Set)}},{key:"addStateNode",value:function(t,e){this.nodeManager.addStateNode(t,e)}},{key:"removeStateNode",value:function(t,e){this.nodeManager.removeStateNode(t,e)}},{key:"bindStatePropExpression",value:function(t,e,n){if(!e||!n){var r=tt(t),o=Oe(i=r)||be(i)||we(i)||ge();e=o[0],n=o.slice(1)}var i,a=n[0];if(!a)throw Error("Must specify state property name for State expression: ".concat(t));var l=this.state,u=Object.getOwnPropertyDescriptor(l,a);if(u||(l=l._global,u=Object.getOwnPropertyDescriptor(l,a)),!u)throw Error("Could not bind state property ".concat(a,". State property ").concat(a," not defined!"));if(Object.hasOwn(l,t))return l[t];var c=u.hasOwnProperty("value"),s=this;switch(e){case"negation":var f=c?s.privateState:s.state;Jt(t,l,(function(){return!f[a]}),a);break;case"equality":var p=n[1];if(!p)throw Error("Must specify equality value for equality expression (is_something:equalToThis)");var h=c?s.privateState:s.state;Jt(t,l,(function(){return h[a]===p}),a);break;case"ternary":var d=n[1];if(!d)throw Error("Ternary state expression (prop?truthy:falsy) must include at least a truthy value!");var y=n[2],v=c?s.privateState:s.state;Jt(t,l,y?function(){return v[a]?d:y}:function(){return v[a]?d:void 0},a)}return l[t]}},{key:"getStateDependencies",value:function(){return this.stateDependencies}},{key:"use",value:function(t,e){t.call(this),je(_e,this).add(e)}},{key:"isUsing",value:function(t){return je(_e,this).has(t)}}],e&&Ee(t.prototype,e),n&&Ee(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const Ne=ke;function Ce(t){return Object.hasOwn(t,"state")?t:t.firstElementChild}var Le={replaceChildWith:function(t,e){var n,r,o,i=Ce(t),a=null!==(n=null==i||null===(r=i.state)||void 0===r?void 0:r.key)&&void 0!==n?n:t.stateKey,l=Ce(e),u=null!==(o=e.stateKey)&&void 0!==o?o:l.stateKey,c=this.replaceChild(e,t);return this.keyMap.delete(a),this.keyMap.set(u,e),c},swapChildWith:function(t,e){if(t!==e){var n=t.nextSiblingElement,r=e.nextSiblingElement;this.insertBefore(t,r),this.insertBefore(e,n)}},removeChild:function(t){var e,n=Ce(t),r=null!==(e=t.stateKey)&&void 0!==e?e:n.stateKey;HTMLElement.prototype.removeChild.call(this,t),this.keyMap.delete(r)},insertBefore:function(t,e){var n;HTMLElement.prototype.insertBefore.call(this,t,e);var r=Ce(t),o=null!==(n=t.stateKey)&&void 0!==n?n:r.stateKey;this.keyMap.set(o,t)},append:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(t=HTMLElement.prototype.append).call.apply(t,[this].concat(n));for(var o=0,i=n;o<i.length;o++){var a,l=i[o],u=Ce(l),c=null!==(a=l.stateKey)&&void 0!==a?a:u.stateKey;this.keyMap.set(c,l)}},appendChild:function(t){var e;HTMLElement.prototype.appendChild.call(this,t);var n=Ce(t),r=null!==(e=t.stateKey)&&void 0!==e?e:n.stateKey;this.keyMap.set(r,t)},prepend:function(t){var e;HTMLElement.prototype.prepend.call(this,t);var n=Ce(t),r=null!==(e=t.stateKey)&&void 0!==e?e:n.stateKey;this.keyMap.set(r,t)},detach:function(){var t;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]){var e=this.cloneNode(!0);e.$$originalElement=this,e.$$detached=j.CLONE,t=e}else this.setAttribute("inert",""),this.classList.add(T),this.$$detached=j.HIDE_UNHIDE,t=this;return t},reattach:function(){this.$$detached===j.HIDE_UNHIDE?(this.removeAttribute("inert",""),this.classList.remove(T)):this.$$detached===j.CLONE&&this.$$originalElement.replaceWith(this),this.$$detached=void 0},initialAppend:function(){for(var t,e=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];(t=HTMLElement.prototype.append).call.apply(t,[this].concat(r));for(var i=function(){var t=l[a];e.pendingKeyMapActions.add((function(){var n=Ce(t);if(n.isActive){var r,o,i=null!==(r=null==n||null===(o=n.state)||void 0===o?void 0:o.key)&&void 0!==r?r:t.stateKey;e.keyMap.set(i,t)}else n.addEventListener("active",(function(){var r,o,i=null!==(r=null==n||null===(o=n.state)||void 0===o?void 0:o.key)&&void 0!==r?r:t.stateKey;e.keyMap.set(i,t)}),{once:!0})}))},a=0,l=r;a<l.length;a++)i()}};function Re(t){return function(t){if(Array.isArray(t))return xe(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||De(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||De(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(t,e){if(t){if("string"==typeof t)return xe(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(t,e):void 0}}function xe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var $e={map:function(t){var e,n=Ie(t.split(":"),2),r=n[0],o=n[1],i=this;e=i,Object.assign(e,Le),e.keyMap=new Map,e.pendingKeyMapActions=new Set,e.style.willChange="opacity",this.onAfterPaint((function(){var t=function(t,e,n){var r=Ie(n.getState(t,!0),2),o=r[0],i=r[1];o.makeStateMap();var a=pt(o,e,N(n)?"li":void 0,n);return n.innerHTML="",a.length&&n.append.apply(n,Re(a)),i}(r,o,i);if(!t)throw new Error("Mapping ".concat(r," to ").concat(o," failed!"));var e=t[r];if(!e||!e.hasOwnProperty("_isStatefulArray"))throw new Error("State array ".concat(r," for State Map must be stateful!"));t._stateManager.addStateMap(r,o,i)}))},bind:function(t){var e=Ie(t.split(":"),2),n=e[0],r=e[1];this.bindAttributeToState(n,r)},bindprop:function(t){var e=Ie(t.split(":"),2),n=e[0],r=e[1],o=Ie(this.getState(n,!0),2),i=(o[0],o[1]);this[r]=i[n]}};function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Fe(t){return function(t){if(Array.isArray(t))return qe(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ge(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||Ge(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(){return Ke="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xe(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ke.apply(null,arguments)}function Ge(t,e){if(t){if("string"==typeof t)return qe(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qe(t,e):void 0}}function qe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ze(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Be(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nn(r.key),r)}}function We(t,e,n){return e&&Be(t.prototype,e),n&&Be(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ve(t,e,n){return e=Xe(e),function(t,e){if(e&&("object"==He(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ye()?Reflect.construct(e,n||[],Xe(t).constructor):e.apply(t,n))}function Ye(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ye=function(){return!!t})()}function Xe(t){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xe(t)}function Qe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Je(t,e)}function Je(t,e){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Je(t,e)}function Ze(t,e,n){tn(t,e),e.set(t,n)}function tn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function en(t,e,n){return(e=nn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nn(t){var e=function(t,e){if("object"!=He(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=He(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==He(e)?e:e+""}function rn(t,e,n){return t.set(an(t,e),n),n}function on(t,e){return t.get(an(t,e))}function an(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function ln(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new WeakMap,o=new WeakSet,i=new WeakMap,a=function(t){function n(){var t,e,a;return ze(this,n),t=Ve(this,n),tn(e=t,a=o),a.add(e),en(t,"host",null),Ze(t,r,!1),en(t,"refName",void 0),Ze(t,i,[]),t.isReactiveElement=!0,t.isNativeElement=!0,t}return Qe(n,t),We(n,[{key:"activate",value:function(){var t,n=this,r=[],o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ge(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(this.getAttributeNames());try{for(o.s();!(t=o.n()).done;){var a=t.value,l=this.getAttribute(a);if(this.initialSetAttribute(a,l),0===a.indexOf("_")){var u=a.substring(1);r.push({command:u,args:l})}}}catch(t){o.e(t)}finally{o.f()}r.forEach((function(t){var r,o,i,a,l=t.command,u=t.args;null===(r=$e[l])||void 0===r||r.call(n,u),null===(o=e.appCommands)||void 0===o||null===(o=o[l])||void 0===o||o.call(n,u);var c=(null===(i=n.host)||void 0===i?void 0:i.commands)||n.commands;null==c||null===(a=c[l])||void 0===a||a.call(n,u)})),on(i,this).forEach((function(t){return t.call(n)})),on(i,this).length=0,this.isActive=!0}},{key:"getHost",value:function(){var t;return this.host||this.parentNode||(null==this||null===(t=this.getRootNode())||void 0===t?void 0:t.host)}},{key:"connectedCallback",value:function(){var t=this;if(!on(r,this)){var e,n=this.getRootNode();n!==document?this.host=n.host:(e=this.parentElement)&&e.isReactiveElement&&!e.isNativeElement?this.host=this.parentElement:roost.host=null,this.host?this.host.isActive?this.activate():this.host.addEventListener("active",(function(){return t.activate()}),{once:!0}):this.activate(),rn(r,this,!0)}}},{key:"disconnectedCallback",value:function(){var t,e=null!==(t=this.host)&&void 0!==t?t:this;e.ref&&delete e.ref[this.refName]}},{key:"attributeChangedCallback",value:function(t,e,n){var r=this;e!==n&&(this.isConnected?an(o,this,l).call(this,t,e,n):on(i,this).push((function(){return an(o,r,l).call(r,t,e,n)})))}},{key:"getState",value:function(t){var n,r,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.isNativeElement&&this.host?this.host:this,a=!1;if(i&&i.state&&Object.hasOwn(i.state,t)&&(a=!0,r=(n=i.state)[t]),!a)for(;!a&&i.host;)(i=i.host)&&i.state&&Object.hasOwn(i.state,t)&&(a=!0,r=(n=i.state)[t]);if(!a){var l=e[d]();l&&Object.hasOwn(l,t)&&(a=!0,r=(n=l)[t])}return a||(r=void 0),o?[r,n]:r}},{key:"findElement",value:function(t){var n=this.host||this,r=n;return e.SPROUT_CONFIG.useShadow&&(r=n.shadowRoot),Object.hasOwn(n.ref,t)?n.ref[t]:r.querySelector('[ref="'.concat(t,'"]'))}},{key:"initialSetText",value:function(t){st.call(this,t)}},{key:"initialSetAttribute",value:function(t,e){e=String(e);var n=0===e.indexOf("@"),r=e;if(function(t){return 0===t.indexOf(":")}(t)){0;var o=e,i=t.substring(1);"textContent"===i?this.initialSetText(o):ct.call(this,i,o)}else{if(n){var a=this.getHost();0;var l=e.substring(1);r=a.getAttribute(l)}"textContent"===attrName?this.initialSetText(r):ut.call(this,t,r)}}},{key:"onAfterPaint",value:function(t){requestAnimationFrame((function(){return requestAnimationFrame(t)}))}}])}(t);function l(t,e,n){var r=this.isNativeElement?this.host||this.getRootNode().host:this;if("ref"===t){var o=n;r.ref[o]=this,this.refName=o}}if(en(a,"observedAttributes",c),n){var u=new WeakMap,s=function(t){function e(){var t;ze(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return en(t=Ve(this,e,[].concat(r)),"boundAttributesToState",new Map),Ze(t,u,void 0),t}return Qe(e,t),We(e,[{key:"bindAttributeToState",value:function(t,e){this.boundAttributesToState.set(t,e)}},{key:"updateStateFromAttribute",value:function(t){var e=et(this.getAttribute(t)),n=this.boundAttributesToState.get(t),r=Ue(this.getState(n,!0),2),o=r[0],i=r[1];if(o===Symbol.for(E.STATE_NOT_FOUND))throw Error("updateStateFromAttribute: State property ".concat(n," not found"));o!==e&&(i[n]=e)}},{key:"activate",value:function(){Ke(Xe(e.prototype),"activate",this).call(this),rn(u,this,(function(){var t=new Event("inputChange",{bubbles:!0,composed:!0});if("checkbox"===this.type){var e=this.host.state._stateManager.nodeManager.bindableAttributesStateNodes.get("checked"),n=null;e.has(this)&&(n=e.get(this)),this.checked?(n||(n=document.createAttribute("checked")),this.setAttributeNode(n)):(n||(n=this.getAttributeNode("checked")),n&&this.removeAttributeNode(n))}this.dispatchEvent(t)})),this.addEventListener("change",on(u,this),!1)}},{key:"disconnectedCallback",value:function(){Ke(Xe(e.prototype),"disconnectedCallback",this).call(this),on(u,this)&&this.removeEventListener("change",on(u,this)),this.boundAttributesToState.clear()}},{key:"attributeChangedCallback",value:function(t,n,r){if(Ke(Xe(e.prototype),"attributeChangedCallback",this).apply(this,arguments),f.has(t)){var o=et(r);this[t]!==o&&(this[t]=o)}this.boundAttributesToState.has(t)&&this.updateStateFromAttribute(t)}}])}(a);return en(s,"observedAttributes",a.observedAttributes.concat(Fe(p))),s}return a}function un(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return cn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function cn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function sn(t){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(t)}function fn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wn(r.key),r)}}function pn(t,e){if(e&&("object"==sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hn=function(){return!!t})()}function dn(){return dn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=yn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},dn.apply(null,arguments)}function yn(t){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yn(t)}function vn(t,e){return vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vn(t,e)}function bn(t,e,n){mn(t,e),e.set(t,n)}function mn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gn(t,e,n){return(e=wn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wn(t){var e=function(t,e){if("object"!=sn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==sn(e)?e:e+""}function Sn(t,e){return t.get(En(t,e))}function On(t,e,n){return t.set(En(t,e),n),n}function En(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var An=new CSSStyleSheet;function Tn(t){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(t)}function Mn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||Pn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jn(t){return function(t){if(Array.isArray(t))return _n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Pn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(t,e){if(t){if("string"==typeof t)return _n(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(t,e):void 0}}function _n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function kn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,In(r.key),r)}}function Nn(t,e,n){return e=Ln(e),function(t,e){if(e&&("object"==Tn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Cn()?Reflect.construct(e,n||[],Ln(t).constructor):e.apply(t,n))}function Cn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Cn=function(){return!!t})()}function Ln(t){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ln(t)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}function In(t){var e=function(t,e){if("object"!=Tn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Tn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Tn(e)?e:e+""}function Dn(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function xn(t,e,n){return t.set(Hn(t,e),n),n}function $n(t,e){return t.get(Hn(t,e))}function Hn(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function Fn(t){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(t)}function Un(){Un=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),l=new k(r||[]);return o(a,"_invoke",{value:M(t,n,l)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function m(){}function g(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(N([])));O&&O!==n&&r.call(O,a)&&(w=O);var E=g.prototype=b.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(o,i,a,l){var u=f(t[o],t,i);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==Fn(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,l)}),(function(t){n("throw",t,a,l)})):e.resolve(s).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,l)}))}l(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function M(e,n,r){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var u=j(l,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var c=f(e,n,r);if("normal"===c.type){if(o=r.done?y:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=y,r.method="throw",r.arg=c.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Fn(e)+" is not iterable")}return m.prototype=g,o(E,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},A(T.prototype),c(T.prototype,l,(function(){return this})),e.AsyncIterator=T,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new T(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=N,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function Kn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qn(r.key),r)}}function Gn(t,e,n){return e&&Kn(t.prototype,e),n&&Kn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function qn(t){var e=function(t,e){if("object"!=Fn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Fn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fn(e)?e:e+""}function zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bn(t,e,n){return e=Vn(e),function(t,e){if(e&&("object"==Fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wn()?Reflect.construct(e,n||[],Vn(t).constructor):e.apply(t,n))}function Wn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wn=function(){return!!t})()}function Vn(t){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vn(t)}function Yn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e)}function Xn(t,e){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xn(t,e)}function Qn(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function Jn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Qn(i,r,o,a,l,"next",t)}function l(t){Qn(i,r,o,a,l,"throw",t)}a(void 0)}))}}function Zn(t){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(t)}function tr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,er(r.key),r)}}function er(t){var e=function(t,e){if("object"!=Zn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Zn(e)?e:e+""}function nr(t,e,n){return e=or(e),function(t,e){if(e&&("object"==Zn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,rr()?Reflect.construct(e,n||[],or(t).constructor):e.apply(t,n))}function rr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rr=function(){return!!t})()}function or(t){return or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},or(t)}function ir(t,e){return ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ir(t,e)}function ar(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}An.replaceSync(":host { contain: layout paint; }");var lr=document.currentScript,ur=(null==lr?void 0:lr.hasAttribute("strict"))||!1,cr=Ne,sr={useShadow:!0,allowAppScopeAccess:!0,useDSD:!1,strict:ur,appName:(null==lr?void 0:lr.getAttribute("app"))||"sprout-app",stateManagerClass:cr};sr.allowAppScopeAccess&&Object.defineProperty(globalThis,"sproutApps",{value:{},writable:!1});var fr,pr=new CSSStyleSheet;pr.replaceSync(M),document.adoptedStyleSheets=[].concat(function(t){if(Array.isArray(t))return ar(t)}(fr=document.adoptedStyleSheets)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(fr)||function(t,e){if(t){if("string"==typeof t)return ar(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ar(t,e):void 0}}(fr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[pr]);var hr,dr=(window,{window,document:null===(hr=window)||void 0===hr?void 0:hr.document});sr.allowAppScopeAccess&&Object.defineProperty(globalThis.sproutApps,sr.appName,{value:dr,writable:!1}),dr.SPROUT_CONFIG=Object.seal(sr);var yr=Object.prototype.hasOwnProperty;J(Object.prototype,"hasOwnProperty",yr),dr[d]=function(){return y},dr.setGlobalState=function(){var t=zt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},void 0,void 0,ht,!0,dr).state,e="SproutGlobalState";return Object.defineProperty(dr,e,{value:t,writable:!1,configurable:!1}),Object.defineProperty(dr,d,{value:function(){return dr[e]}}),dr[e]},dr.setCommands=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(dr,"appCommands",{value:t,writable:!1,configurable:!1})};var vr={};v.forEach((function(t){return vr[t.element]=ln(t.class,dr,!0)})),dr.ReactiveCustomElement=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=ln(HTMLElement,t),n=(t.SPROUT_CONFIG.stateManagerClass,new WeakMap),r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,s=new WeakSet,f=function(e){function f(){var t,e,h,d,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,m=arguments.length>1?arguments[1]:void 0,g=arguments.length>2?arguments[2]:void 0,w=arguments.length>3?arguments[3]:void 0,S=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),e=this,h=yn(h=f),function(t,e){mn(t,e),e.add(t)}(t=pn(e,hn()?Reflect.construct(h,d||[],yn(e).constructor):h.apply(e,d)),s),gn(t,"ownerMapElement",void 0),gn(t,"state",void 0),gn(t,"stateKey",void 0),bn(t,n,!1),bn(t,r,{init:null,mount:null,stateful:null,active:null,unmount:null}),bn(t,o,void 0),bn(t,i,void 0),bn(t,a,void 0),gn(t,"events",void 0),gn(t,"eventsMap",new Map),bn(t,l,void 0),gn(t,"propAttributes",new Map),bn(t,u,!1),bn(t,c,void 0),gn(t,"commands",void 0),gn(t,"ref",{}),gn(t,"canonicalTagName",void 0),"CONDITIONAL-ELEMENT"===t.tagName)return pn(t);if(t.isNativeElement=!1,On(u,t,S),w&&On(a,t,w),t.canonicalTagName=t.localName,Sn(u,t))t.canonicalTagName=t.localName.substring(0,t.localName.indexOf("-dsd"));else{if(g){var O=new CSSStyleSheet;O.replaceSync(g),On(i,t,O)}On(o,t,v?document.importNode(v,!0):document.importNode(b,!0)),En(s,t,y).call(t)}return m&&En(s,t,p).call(t,m),Sn(r,t).init&&Sn(r,t).init.call(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vn(t,e)}(f,e),d=f,(g=[{key:"setInitialState",value:function(t){this.initialState?Object.assign(this.initialState,t):this.initialState=t,t.hasOwnProperty("key")&&(this.stateKey=t.key)}},{key:"disconnectedCallback",value:function(){En(s,this,v).call(this),this.state=void 0,this.isActive=!1,Sn(r,this).unmount&&Sn(r,this).unmount.call(this)}},{key:"activate",value:function(){dn(yn(f.prototype),"activate",this).call(this),En(s,this,m).call(this),Sn(r,this).active&&Sn(r,this).active.call(this)}},{key:"findElement",value:function(e){var n,r,o=this,i=this;return t.SPROUT_CONFIG.useShadow&&(i=o.shadowRoot),Object.hasOwn(o.ref,e)?o.ref[e]:(null===(n=i)||void 0===n||null===(r=n.querySelector)||void 0===r?void 0:r.call(n,'[ref="'.concat(e,'"]')))||null}},{key:"connectedCallback",value:function(){var t=this;if(this.setAttribute("tagName",this.canonicalTagName),!Sn(n,this)){var e=this.getRootNode().host;Sn(r,this).mount&&Sn(r,this).mount.call(this);var o=function(){En(s,t,h).call(t),t.isActive=!0,t.dispatchEvent(new CustomEvent("active")),Sn(r,t).stateful&&Sn(r,t).stateful.call(t),t.activate()};e?e.isActive?o():e.addEventListener("active",o,{once:!0}):setTimeout(o,0),On(n,this,!0)}}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&("hidden"===t&&(null===n?this.dispatchEvent(new CustomEvent("unhide",{bubbles:!0})):this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))),this.propAttributes.has(t)&&this.propAttributes.get(t).forEach((function(t){t.nodeValue=n,"CONDITIONAL-RENDER"===t.ownerElement.tagName&&t.ownerElement.render()})))}}])&&fn(d.prototype,g),w&&fn(d,w),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,g,w}(e);function p(t){var e=this;if(On(c,this,t.settings),this.commands=t.commands,t.events){var o,i,a=function(t,n,r){e.eventsMap.has(t)||e.eventsMap.set(t,new Map),e.eventsMap.get(t).set(n,r)};for(var l in t.events)if("function"===(i=sn(o=t.events[l])))a("click",l,o);else if("object"===i)for(var u in o)a(u,l,o[u]);this.isConnected&&En(s,this,m).call(this)}for(var f in t.state&&(this.setInitialState(t.state),this.isConnected&&Sn(n,this)&&!this.state&&En(s,this,h).call(this)),Sn(r,this))t.hasOwnProperty(f)&&(Sn(r,this)[f]=t[f])}function h(){var e;if(this.initialState&&(null===(e=this.state)||void 0===e||!e._isActive)){var n=this.initialState;if(n._stateManager)this.state=n._stateManager.state;else{var r=zt(n,void 0,void 0,ht,!1,t);this.state=r.state,this.state.$host=this}this.state._isActive=!0}}function y(){if(t.SPROUT_CONFIG.useShadow)this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot.adoptedStyleSheets=[An],Sn(a,this)&&this.shadowRoot.adoptedStyleSheets.push(Sn(a,this)),Sn(i,this)&&this.shadowRoot.adoptedStyleSheets.push(Sn(i,this)),this.shadowRoot.appendChild(Sn(o,this));else{var e=new DocumentFragment;e.appendChild(Sn(o,this)),this.appendChild(e)}}function v(){if(this.eventsMap.size){var t,e=un(this.eventsMap.keys());try{for(e.s();!(t=e.n()).done;){var n=t.value;this.shadowRoot.removeEventListener(n,Sn(l,this),!1)}}catch(t){e.e(t)}finally{e.f()}}}function m(){if(!Sn(l,this)&&this.eventsMap.size){var e=t[d]();On(l,this,(function(t){var n=this.host,r=n.eventsMap.get(t.type);if(!r)return!1;var o,i=un(t.composedPath());try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a&&a.refName&&r.has(a.refName)){var l=a,u=l.refName;r.get(u).call(l,t,n,e)}}}catch(t){i.e(t)}finally{i.f()}t.stopPropagation()}));var n,r=un(this.eventsMap.keys());try{for(r.s();!(n=r.n()).done;){var o=n.value;this.shadowRoot.addEventListener(o,Sn(l,this),{capture:!0})}}catch(t){r.e(t)}finally{r.f()}}}return f}(dr),function(t,e){function n(t,e,n){return r.apply(this,arguments)}function r(){return(r=Jn(Un().mark((function e(n,r,o){var i,a,l,u,c;return Un().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.content,(a=i.querySelector("style"))&&i.removeChild(a),(u=i.querySelector("script"))&&(c=u.textContent,i.removeChild(u),c&&0!==c.trim().length))try{l=Function(c)()}catch(t){}customElements.define(r,function(t){function e(){var t;return zn(this,e),Bn(this,e,[i,l,null===(t=a)||void 0===t?void 0:t.textContent,o])}return Yn(e,t),Gn(e)}(t.ReactiveCustomElement)),customElements.define("".concat(r,"-dsd"),function(t){function e(){return zn(this,e),Bn(this,e,[i,l,null,o,!0])}return Yn(e,t),Gn(e)}(t.ReactiveCustomElement));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){var r,o=new CSSStyleSheet,i=document.querySelector('head > style[app="'.concat(e,'"]'));if(i)o.replaceSync(i.textContent);else{var a,l=null===(a=globalThis.SPROUT_COMPILED_STYLES)||void 0===a?void 0:a[e];o.replaceSync(l||"")}o.insertRule(M),"function"==typeof globalThis["".concat(e,"_runtime")]&&globalThis["".concat(e,"_runtime")].call(t);var u=null===(r=globalThis.SPROUT_COMPILED_TEMPLATES)||void 0===r?void 0:r[e];u&&"function"==typeof u.forEach?u.forEach((function(t,e){e&&t&&n(t,e,o)})):Array.prototype.forEach.call(document.querySelectorAll('template[app="'.concat(e,'"]')),(function(t){var e=t.getAttribute("for");e&&n(t,e,o)}))}()}(dr,sr.appName),v.forEach((function(t){customElements.define("reactive-".concat(t.element),vr[t.element],{extends:t.element})}));var br=ln(HTMLHeadingElement,dr);["h1","h2","h3","h4","h5","h6"].forEach((function(t){customElements.define("reactive-".concat(t),function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),nr(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ir(t,e)}(e,t),function(t,e,n){return e&&tr(t.prototype,e),n&&tr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(br),{extends:t})}));var mr=ln(HTMLInputElement,dr,!0);customElements.define("reactive-input",mr,{extends:"input"});var gr=function(t){var e,n,r,o=new WeakMap,i=new WeakMap,a=new WeakMap,l=function(t){function e(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return Dn(t=Nn(this,e,[].concat(r)),o,void 0),Dn(t,i,void 0),Dn(t,a,void 0),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rn(t,e)}(e,t),n=e,r=[{key:"render",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if($n(o,this)){if(void 0===(t=this.getState($n(i,this))))throw Error("State value for ".concat($n(i,this)," not found while rendering conditional-render element:"),this)}else if(void 0===(t=this.getAttribute("_condition")))throw Error("_condition value not found while rendering conditional-render element:",this);var r=[];$n(a,this).forEach((function(e){var n=e.condition,o=e.elements;(function(t,e,n){if("always"===t)return!0;switch(t){case"==":default:return n==e;case"===":return n===e;case"!=":return n!=e;case"!==":return n!==e;case"<":return n<e;case"<=":return n<=e;case">":return n>e;case">=":return n>=e}})(n.operator,n.value,t)&&r.push.apply(r,jn(o))})),n?(this.innerHTML="",this.append.apply(this,r)):r.length&&U(this,(function(){e.innerHTML="",e.append.apply(e,r)}))}},{key:"generateRenderMap",value:function(){var t=new Map;t.set("always",[]),jn(this.children).forEach((function(e){var n,r,o=e.getAttribute("_if").replaceAll(" ","");if(o)if(t.has(o))t.get(o).elements.push(e);else{var i=Mn(cond.trim().split(CONDITIONAL_OPERATORS_REGEX),3),a=i[1],l=i[2],u={operator:a,value:(r=n=l,"true"===n?r=!0:"false"===n?r=!1:isNaN(Number(n))||(r=Number(n)),r)};t.set(o,{condition:u,elements:[e]})}else t.get("always").elements.push(e)})),xn(a,this,t)}},{key:"activate",value:function(){var t=this.getAttribute("_condition");if(!t)throw Error("conditional-render elements must have a _condition attribute!");if(0===t.indexOf("@")?(Z.call(this,"_condition",t),xn(o,this,!1),xn(i,this,t.substring(1))):(xn(o,this,!0),xn(i,this,t)),$n(o,this)){var e=$n(i,this),n=Mn(this.getState(e,!0),2),r=n[0],a=n[1];if(void 0===Tn(r))throw Error("State property ".concat(e," not defined for _condition command!"));var l=a._stateManager;l.has("conditional-element")||l.use(xt,"conditional-element"),l.addConditionallyRenderingElements(e,this),this.generateRenderMap(),this.render(!0)}else this.render(!0)}}],r&&kn(n.prototype,r),l&&kn(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l}(t);return e=l,r=["_condition"],(n=In(n="observedAttributes"))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,l}(ln(HTMLElement,dr));customElements.define("conditional-render",gr)})();
|
|
2
2
|
//# sourceMappingURL=sprout-core.strict.min.js.map
|