sproutjs-core 2.5.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 +4030 -1810
- package/sprout-core.js.map +1 -1
- package/sprout-core.min.js +1 -1
- package/sprout-core.min.js.gz +0 -0
- package/sprout-core.min.js.map +1 -1
- package/sprout-core.strict.js +3864 -0
- package/sprout-core.strict.js.map +1 -0
- package/sprout-core.strict.min.js +2 -0
- package/sprout-core.strict.min.js.map +1 -0
- package/sprout_core.js +0 -2575
- package/sprout_core.js.map +0 -1
package/sprout-core.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var t=["hidden","checked"],e=["hidden","value","checked"],n=["value","checked"],r=[null,"text","color","date","datetime-local","email","month","number","password","range","search","tel","time","url","week"],o=["_global","_gettingDependenciesFor","_localStateManager","_stateManager","_binding","_populate","_isActive"],i="getGlobalState",a=function(t){return"State set hook, must include a dependencies array! None was found for ".concat(t)},l=[{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:HTMLInputElement,element:"input"},{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"}],u=!1,c=document.createElement("div"),s={nodeActionsMap:new Map,eventBindingFunctions:new Map,conditionalRenders:new Map,paintRafId:null,eventBindRafId:null,conditionalRenderRafId:null,activateRafId:null,elementActivateFunctions:new Map},f=["=","==","!=","!==","<","<=",">",">="],p=100;function h(t){return"OL"===t.tagName||"UL"===t.tagName}var y=s.paintRafId,d=s.eventBindingFunctions,v=s.eventBindRafId,b=s.conditionalRenderRafId,m=s.conditionalRenders,g=s.nodeActionsMap;s.activateRafId,s.elementActivateFunctions;function w(){g.size<p&&(y&&cancelAnimationFrame(y),y=null),y||(y=requestAnimationFrame((function(){y=null,function(){var t=s.nodeActionsMap;if(t.size){var e=function(){var t=[],e=[],n=s.nodeActionsMap;return n.forEach((function(n,r){if(n.hasOwnProperty("setAttribute")){var o=n.setAttribute;"boolean"==typeof o?(r.hasOwnProperty("originalOwnerElement"),!1===o?r.originalOwnerElement.hasAttribute(r.name)&&t.push((function(){r.originalOwnerElement.removeAttributeNode(r)})):r.originalOwnerElement.hasAttribute(r.name)||t.push((function(){r.originalOwnerElement.setAttributeNode(r)}))):"string"==typeof o&&r.nodeValue!==o&&t.push((function(){return r.nodeValue=o}))}else if(n.hasOwnProperty("textContent")){var i=String(n.textContent);if(r.nodeValue===i)return;e.push((function(){return r.nodeValue=i}))}else if(n.switch)e.push((function(){return r.replaceWith(n.switch)}));else{n.replace.forEach((function(t,n){e.push((function(){return r.replaceChild(t,n)}))}));var a,l=O(n.remove.values());try{for(l.s();!(a=l.n()).done;){var u,c=O(a.value);try{var s=function(){var t=u.value;t.parentNode&&t.parentNode===r&&e.push((function(){return r.removeChild(t)}))};for(c.s();!(u=c.n()).done;)s()}catch(t){c.e(t)}finally{c.f()}}}catch(t){l.e(t)}finally{l.f()}var f,p=O(n.append.values());try{for(p.s();!(f=p.n()).done;){var h,y=O(f.value);try{var d=function(){var t=h.value;e.push((function(){return r.appendChild(t)}))};for(y.s();!(h=y.n()).done;)d()}catch(t){y.e(t)}finally{y.f()}}}catch(t){p.e(t)}finally{p.f()}}})),[].concat(t,e)}();e.forEach((function(t){return t()})),s.nodeActionsMap=new Map}}()})))}function S(t,e){m.set(t,e),m.size<p&&(b&&cancelAnimationFrame(b),b=null),b||(b=requestAnimationFrame((function(){b=null,m.forEach((function(t){return t()})),m.clear()})))}function O(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=E(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 E(t,e){if(t){if("string"==typeof t)return A(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)?A(t,e):void 0}}function A(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 P(t,e,n){t.nodeType===Node.ATTRIBUTE_NODE?e.setAttribute=n:t.nodeType===Node.TEXT_NODE&&(e.textContent=n)}function j(t,e,n){t.append.has(n)||t.append.set(n,new Set),t.append.get(n).add(e)}function M(){return{append:new Map,replace:new Map,after:new Map,remove:new Map,switch:null,get hasPendingActions(){return null!==this.switch||this.append.size||this.replace.size||this.after.size||this.remove.size}}}function T(t,e){var n=this,r=s.nodeActionsMap,o=t.state[e],i=t.stateNodes[e],a=t.stateArrayMaps[e],l=t.conditionallyRenderingElements[e];if(i&&i.forEach((function(t){r.has(t)||r.set(t,{}),P(t,r.get(t),o)})),a){var u=o;a.forEach((function(t,e){var n=M(),o=-1,i=h(e);e.children.length&&Array.prototype.forEach.call(e.children,(function(r,a){var l,c=r;i&&(c=r.firstElementChild);var s,f,p,y=u[a];if(null!==(l=y)&&void 0!==l&&l.hasOwnProperty("state")&&(y=y.state),y){if(c.state!==y){var d=H(y,t,h(e)?"li":void 0);!function(t,e,n){t.replace.set(e,n)}(n,r,d)}}else f=r,(s=n).remove.has(p)||s.remove.set(p,new Set),s.remove.get(p).add(f);o=a}));for(var a=++o,l=u.length;a<l;a++){var c=u[a];if(c){var s=H(c,t,h(e)?"li":void 0);j(n,s,c)}}n.hasPendingActions&&r.set(e,n)}))}l&&l.forEach((function(t){S(n,(function(){return t.render()}))})),r.size&&w()}function _(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,e,{value:n,configurable:!1,writable:!1,enumerable:r})}function L(t){return L="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},L(t)}function k(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 C(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)?C(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 C(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 HTMLElement||Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var R=function(e,n){t.includes(e)?"false"===n?this.removeAttribute(e):elementSetAttribute.call(this,e,""):elementSetAttribute.call(this,e,n)},x=function(t,e){var n=null;if(-1!==e.indexOf(":")&&0===e.indexOf("is_")){var r=e.indexOf(":");if(-1===r)throw Error("When using conditional equality state attribute, you must include a colon character followed by an equality value!");n=e.substring(r+1),e=e.substring(3,r)}var o=k(this.getState(e,!0),2),i=o[0],a=o[1];if(void 0!==i&&a){if(n){var l="is_"+e+n,u=e;Object.defineProperty(a,l,{get:function(){return this[u]===n},enumerable:!1}),a._stateManager.addStateDependency(e,l),i=a[l],e=l}var c=i;this.removeAttribute(t);var s=document.createAttribute(t);s.nodeValue=c,_(s,"isStateAttribute",!0),_(s,"originalOwnerElement",this),"boolean"==typeof c&&(s.nodeValue=""),!1!==c&&this.setAttributeNode(s),a._stateManager.addStateNode(e,s,"boolean"==typeof c)}},N=function(t){var e=k(this.getState(t,!0),2),n=e[0],r=e[1];if(null!=n&&r){var o=n,i=document.createTextNode(o);_(i,"isStateAttribute",!0),this.appendChild(i),r._stateManager.addStateNode(t,i)}};function H(t,e,n){var r,o=document.createElement(e);return o.setInitialState(t),n?(r=document.createElement(n)).appendChild(o):r=o,r}function I(t,e){if(!o.includes(e)){T(t,e);var n=t.state;n.hasOwnProperty("on_".concat(e,"Change"))&&"function"==typeof n["on_".concat(e,"Change")]&&n["on_".concat(e,"Change")].call(n);var r=t.stateDependencies[e];if(r&&r.forEach((function(e){if(0===e.indexOf("set_")){var r=e.substring(4),o=n[e][0];if(o&&"function"==typeof o)return void(n[r]=o.call(n))}T(t,e),n.hasOwnProperty("on".concat(e,"Change"))&&"function"==typeof n["on".concat(e,"Change")]&&n["on".concat(e,"Change")].call(n)})),!n._global){var i=t.globalStateDependencies[e];null==i||i.forEach((function(t,e){var r=e.state;t.forEach((function(t){if(0===t.indexOf("set_")){var o=t.substring(4),i=n[t][0];if(i&&"function"==typeof i)return void(r[o]=i.call(r))}T(e,t),n.hasOwnProperty("on".concat(t,"Change"))&&"function"==typeof n["on".concat(t,"Change")]&&r["on".concat(t,"Change")].call(r)}))}))}}}function D(t){return function(t){if(Array.isArray(t))return B(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||F(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 $(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)||F(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 F(t,e){if(t){if("string"==typeof t)return B(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)?B(t,e):void 0}}function B(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 W(t,e,n){var r=$(n.getState(t,!0),2),o=r[0],i=r[1];if(!o||!Array.isArray(o))return null;var a=function(t,e,n){return t.map((function(t){return t.hasOwnProperty("state")&&(t=t.state),"object"!==L(t)?{}:H(t,e,n)}))}(o,e,h(n)?"li":void 0);return n.innerHTML="",a.length&&n.append.apply(n,D(a)),i}var G={map:function(t){var e=$(t.split(":"),2),n=e[0],r=e[1],o=W(n,r,this);o&&o._stateManager.addStateMap(n,r,this)},text:function(t){var e=t;this.initialSetText(e)},bind:function(t){var o=this,i=$(t.split(":"),2),a=i[0],l=i[1];a&&l&&(!a in e||(this.bindAttributeToState(a,l),n.includes(a)&&("value"===a&&"INPUT"===this.tagName&&r.includes(this.getAttribute("type"))?this.addEventListener("input",(function(){return o.updateStateFromProperty("value")})):"checked"===a&&"INPUT"===this.tagName&&"checkbox"===this.getAttribute("type")&&this.addEventListener("change",(function(){return o.updateStateFromProperty("checked")})))))}};function U(t){return U="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},U(t)}function q(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)||z(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 z(t,e){if(t){if("string"==typeof t)return V(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)?V(t,e):void 0}}function V(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 Q(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 Y(t,e,n){return e=J(e),function(t,e){if(e&&("object"==U(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,X()?Reflect.construct(e,n||[],J(t).constructor):e.apply(t,n))}function X(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(X=function(){return!!t})()}function J(t){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},J(t)}function K(t,e){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},K(t,e)}function Z(t,e,n){tt(t,e),e.set(t,n)}function tt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function et(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"!=U(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=U(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==U(e)?e:e+""}function rt(t,e,n){return t.set(it(t,e),n),n}function ot(t,e){return t.get(it(t,e))}function it(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 at(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,o=new WeakMap,a=new WeakMap,l=new WeakMap,u=new WeakSet,c=function(t){function e(){var t,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return t=Y(this,e,[].concat(c)),tt(n=t,r=u),r.add(n),et(t,"host",null),Z(t,o,void 0),Z(t,a,!1),Z(t,l,{}),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&&K(t,e)}(e,t),n=e,c=[{key:"bindAttributeToState",value:function(t,e){ot(l,this)[t]=e}},{key:"unbindAttributeToState",value:function(t){delete ot(l,this)[t]}},{key:"updateStateFromProperty",value:function(t){var e=this[t],n=ot(l,this)[t],r=q(this.getState(n,!0),2),o=r[0],i=r[1];o!==e&&(i[n]=e)}},{key:"disconnectedCallback",value:function(){var t;ot(o,this)&&this.removeEventListener("change",ot(o,this));var e=null!==(t=this.host)&&void 0!==t?t:this;if(e.ref){var n=this.getAttribute("ref");n&&(delete e.ref[n],delete e.events[n])}rt(l,this,{})}},{key:"activate",value:function(){var t=this;"INPUT"===(null==this?void 0:this.tagName)&&(rt(o,this,(function(){var t=new Event("inputChange",{bubbles:!0,composed:!0});this.dispatchEvent(t)})),this.addEventListener("change",ot(o,this),!1));var e,n=[],r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=z(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(r.s();!(e=r.n()).done;){var i=e.value,a=this.getAttribute(i);if(this.initialSetAttribute(i,a),0===i.indexOf("_")){var l=i.substring(1);n.push({command:l,args:a})}}}catch(t){r.e(t)}finally{r.f()}n.forEach((function(e){var n,r=e.command,o=e.args;null===(n=G[r])||void 0===n||n.call(t,o)}))}},{key:"connectedCallback",value:function(){var t=this;ot(a,this)||(this.host=this.getRootNode().host,this.host?this.host.addEventListener("connected",(function(){return t.activate()})):queueMicrotask((function(){return t.activate()})),rt(a,this,!0))}},{key:"attributeChangedCallback",value:function(t,e,n){if(e!==n&&this.isConnected)if("ref"!==t){if(t in ot(l,this))it(u,this,s).call(this,t);else if(0===t.indexOf("@")){var r=t.substring(1),o=this.getAttributeNode(t);o.nodeValue=this.host.getAttribute(r),this.host.propAttributes.has(r)||this.host.propAttributes.set(r,new Set),this.host.propAttributes.get(r).add(o)}}else{var i=n;(this.isNativeElement?this.host:this).ref[i]=this}}},{key:"getState",value:function(t){var e,n,o,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.isNativeElement&&this.host?this.host:this;l&&l.state&&(n=null===(o=l.state)||void 0===o?void 0:o[t]);for(var u,c=!1;void 0===n&&void 0!==l.host&&null!==l.host;){var s;n=null===(s=(l=l.host).state)||void 0===s?void 0:s[t]}return void 0!==n?e=l.state:void 0!==(n=null===(u=c=r[i]())||void 0===u?void 0:u[t])&&(e=c),a?[n,e]:n}},{key:"findElement",value:function(t){var e=this.host||this,n=e;return r.SPROUT_CONFIG.useShadow&&(n=e.shadowRoot),e.ref.hasOwnProperty(t)?e.ref[t]:n.querySelector('[ref="'.concat(t,'"]'))}},{key:"initialSetText",value:function(t){N.call(this,t)}},{key:"initialSetAttribute",value:function(t,e){var n=e=String(e);if(0===e.indexOf("$")&&this.isConnected){var r=e.substring(1);x.call(this,t,r)}else R.call(this,t,n)}}],c&&Q(n.prototype,c),f&&Q(n,f),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c,f}(n);function s(e){var n=this.getAttribute(e);t.includes(e)&&(n=null!==n);var r=ot(l,this)[e],o=q(this.getState(r,!0),2),i=o[0],a=o[1];i!==n&&(a[r]=n)}return et(c,"observedAttributes",["ref"].concat(e).concat(Object.keys(G).map((function(t){return"_"+t.toLowerCase()})))),c}function lt(t){return function(t){if(Array.isArray(t))return ut(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 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}}(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 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){return ct="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},ct(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,bt(r.key),r)}}function ft(t,e){if(e&&("object"==ct(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 pt(){return pt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=vt(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}},pt.apply(null,arguments)}function ht(t){var e="function"==typeof Map?new Map:void 0;return ht=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(yt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&dt(o,n.prototype),o}(t,arguments,vt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),dt(n,t)},ht(t)}function yt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yt=function(){return!!t})()}function dt(t,e){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dt(t,e)}function vt(t){return vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vt(t)}function bt(t){var e=function(t,e){if("object"!=ct(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ct(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ct(e)?e:e+""}var mt=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var l=a.SPROUT_CONFIG.stateManagerClass;if(!Array.isArray(t))throw Error("Argument for StateFulArray constructor must be an array!");var u,c,s,f,p=t;return i||(u=p.map((function(t,e){return null!=t&&t.hasOwnProperty("state")||Array.isArray(t)?t:"object"===ct(t)?new l(t,r,n._stateManager,!1,a):t}))),c=this,s=e,f=lt(u),s=vt(s),function(t,e,n){(e=bt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(o=ft(c,yt()?Reflect.construct(s,f||[],vt(c).constructor):s.apply(c,f)),"dependencyProps",new Map),o.parentStateObject=n,o.arrayStateProp=r,o.rawArray=p,ft(o,u=new Proxy(o,St(null==n?void 0:n._stateManager,r,a)))}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&&dt(t,e)}(e,t),n=e,r=[{key:"splice",value:function(){var t;this.$$operation="splice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"splice",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"shift",value:function(){var t;this.$$operation="shift";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"shift",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"unshift",value:function(){var t;this.$$operation="splice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"unshift",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"sort",value:function(){var t;this.$$operation="sort";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,I(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"reverse",value:function(){var t;this.$$operation="reverse";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"reverse",this)).call.apply(t,[this].concat(r));return delete this.$$operation,I(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"fill",value:function(){var t;this.$$operation="fill";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"fill",this)).call.apply(t,[this].concat(r));return delete this.$$operation,I(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"copyWithin",value:function(){var t;this.$$operation="copyWithin";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,I(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"slice",value:function(){var t;this.$$operation="slice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=pt(vt(e.prototype),"slice",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"toArray",value:function(){this.$$operation="toArray";var t=this.rawArray;return delete this.$$operation,t}}],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}(ht(Array));const gt=mt;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)}var St=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=n.SPROUT_CONFIG.stateManagerClass;return{set:function(o,i,a){if("length"===i){var l=Reflect.set(o,i,a);return t.setDirtyProp(e),l}if(o[i]===a)return!0;var u=Number(i);if(!isNaN(u)&&("object"!==wt(a)||a.hasOwnProperty("_stateManager")||a.hasOwnProperty("state")||(a=new r(a,e,t,!1,n)),a.hasOwnProperty("_stateManager")&&(a=a._stateManager),!o.hasOwnProperty("$$operation"))){var c=!1;u<o.length&&(c=!0);var s=Reflect.set(o,i,a);return c&&t.setDirtyProp(e),s}return Reflect.set(o,i,a)},get:function(t,e,n){var r=Number(e);if(!isNaN(r)){if(!t[r])return;return t[r].hasOwnProperty("state")?t[r].state:t[r]}return Reflect.get.apply(Reflect,arguments)}}},Ot=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return{defineProperty:function(o,i,a){if(void 0!==(null==a?void 0:a.value)){var l,u=a.value;if(Array.isArray(u))null!=u&&null!==(l=u[0])&&void 0!==l&&l._stateManager||(a.value=new gt(a.value,e,n,!1,r));else"object"===wt(u)&&(a.value=new Proxy(a.value,t(e,n,r)))}else"function"==typeof(null==a?void 0:a.get)&&a.get.call(o);var c=Reflect.defineProperty(o,i,a);return e._stateManager.setDirtyProp(n),c}}},Et=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return{defineProperty:function(n,r,i){var l;if(o.includes(r)||null!==(l=n)&&void 0!==l&&l._binding)return Reflect.defineProperty.apply(Reflect,arguments);var u,c=n,s=new Set;if(n=new Proxy(n,{get:function(t,e,n){return"_global"===e&&(t._global._gettingDependenciesFor=r,t._global._localStateManager=t._stateManager),o.includes(e)||(Array.isArray(t[e])&&(t[e]._gettingDependenciesFor=r),s.add(e)),Reflect.get.apply(Reflect,arguments)}}),void 0!==(null==i?void 0:i.value)){var f,p=i.value;if(Array.isArray(p))if(0===r.indexOf("set_")){if(!(null==p?void 0:p[1]))throw Error(a(r));if(null==p||p[1].forEach((function(t){s.add(t)})),!0===(null==p?void 0:p[2])){u=r.substring(4);var h=null==p?void 0:p[0];h&&"function"==typeof h&&(t[u]=h.call(t))}else null!=p&&p[3]&&(t[u]=p[3])}else null!=p&&null!==(f=p[0])&&void 0!==f&&f._stateManager||(i.value=new gt(i.value,t,r,!1,e));else"object"===wt(p)&&(i.value=new Proxy(i.value,Ot(t,r,e)))}else"function"==typeof(null==i?void 0:i.get)&&i.get.call(n);s.size&&s.forEach((function(e){return t._stateManager.addStateDependency(e,r)}));var y=Reflect.defineProperty(c,r,i),d=t._stateManager;return u&&(r=u),c.hasOwnProperty("_populate")||d.setDirtyProp(r),y},get:function(t,e,n){if("hasOwnProperty"===e)return Reflect.get.apply(Reflect,arguments);if(!t.hasOwnProperty("_global")&&t.hasOwnProperty("_gettingDependenciesFor"))return t._stateManager.addGlobalStateDependency(e,t._gettingDependenciesFor,t._localStateManager),delete t._gettingDependenciesFor,delete t._localStateManager,Reflect.get.apply(Reflect,arguments);if("function"==typeof(null==e?void 0:e.indexOf)&&0===(null==e?void 0:e.indexOf("!"))){var r=e.substring(1);if(t.hasOwnProperty(r))return!t[r]}return Reflect.get.apply(Reflect,arguments)}}};function At(t){return At="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},At(t)}function Pt(t){return function(t){if(Array.isArray(t))return jt(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 jt(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)?jt(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 jt(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 Mt(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,Lt(r.key),r)}}function Tt(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 _t(t,e,n){return(e=Lt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Lt(t){var e=function(t,e){if("object"!=At(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==At(e)?e:e+""}function kt(t,e,n){return t.set(Rt(t,e),n),n}function Ct(t,e){return t.get(Rt(t,e))}function Rt(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 xt=new WeakMap,Nt=function(){return t=function t(e,n,r){var a=this,l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),_t(this,"privateState",{}),_t(this,"state",{}),_t(this,"stateArrayMaps",{}),_t(this,"stateDependencies",{}),_t(this,"conditionallyRenderingElements",{}),_t(this,"stateNodes",{}),_t(this,"parentStateProp",void 0),_t(this,"parentStateManager",void 0),_t(this,"dirtyProps",new Set),Tt(this,xt,null),this.parentStateProp=n,this.parentStateManager=r,_(this.state,"_stateManager",this,!0),this.state=new Proxy(this.state,Et(this.state,u)),l?(this.globalStateDependencies={},this.addGlobalStateDependency=function(t,e,n){a.globalStateDependencies.hasOwnProperty(t)||(a.globalStateDependencies[t]=new Map),a.globalStateDependencies[t].has(n)||a.globalStateDependencies[t].set(n,new Set),a.globalStateDependencies[t].get(n).add(e)}):_(this.state,"_global",u[i](),!0),e&&function(t,e){t._populate=!0;var n,r=Object.getOwnPropertyDescriptors(e);for(var i in r)if(o.includes(i))delete r[i];else if((n=r[i]).hasOwnProperty("get")&&"function"==typeof n.get&&n.get.bind(t),n.hasOwnProperty("value")){var a=n.value;if("function"==typeof a)n.value.bind(t);else if(Array.isArray(a)&&0===i.indexOf("set_")){var l=null==a?void 0:a[0];l&&"function"==typeof l&&l.bind(t)}}Object.defineProperties(t,r),delete t._populate}(this.state,e),_(this.state,"_isActive",this,!0)},e=[{key:"setDirtyProp",value:function(t){var e=this;this.dirtyProps.add(t),Ct(xt,this)&&cancelAnimationFrame(Ct(xt,this)),kt(xt,this,requestAnimationFrame((function(){kt(xt,e,null),e.dirtyProps.size>0&&e.handleStateChanges()})))}},{key:"handleStateChanges",value:function(){var t=this,e=Pt(this.dirtyProps);this.dirtyProps.clear(),e.forEach((function(e){I(t,e)}))}},{key:"addStateDependency",value:function(t,e){this.stateDependencies.hasOwnProperty(t)||(this.stateDependencies[t]=new Set),this.stateDependencies[t].add(e)}},{key:"addStateMap",value:function(t,e,n){this.stateArrayMaps.hasOwnProperty(t)||(this.stateArrayMaps[t]=new Map),this.stateArrayMaps[t].set(n,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:"addStateNode",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.stateNodes.hasOwnProperty(t)||(this.stateNodes[t]=new Set,this.setAndBindStateProperty(t,n)),this.stateNodes[t].add(e)}},{key:"setAndBindStateProperty",value:function(t){var e=this.state,n=t,r=0===t.indexOf("!");r&&(n=t.substring(1));var o=Object.getOwnPropertyDescriptor(e,n);if(!(o||(e=e._global,o=Object.getOwnPropertyDescriptor(e,n))))throw Error("Could not bind state prop ".concat(t,". State prop ").concat(n," not defined!"));e._binding=!0;var i=o.hasOwnProperty("value"),a=e._stateManager;if(r){var l=t;i?a.privateState.hasOwnProperty(l)||(Object.defineProperty(e,l,{get:function(){return!a.privateState[n]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),a.addStateDependency(n,l)):a.state.hasOwnProperty(l)||(Object.defineProperty(e,l,{get:function(){return!a.state[n]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),a.addStateDependency(n,l))}else i&&(a.privateState.hasOwnProperty(t)||(a.privateState[t]=e[t]),Object.defineProperty(e,t,{set:function(e){e!==a.privateState[t]&&(a.privateState[t]=e,I(a,t),a.parentStateManager&&I(a.parentStateManager,a.parentStateProp))},get:function(){return a.privateState[t]}}));delete this.state._binding}}],e&&Mt(t.prototype,e),n&&Mt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const Ht=Nt;function It(t){return It="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},It(t)}function Dt(){Dt=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 L(r||[]);return o(a,"_invoke",{value:j(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",y="executing",d="completed",v={};function b(){}function m(){}function g(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(k([])));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 P(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"==It(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 j(e,n,r){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){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=M(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=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var c=f(e,n,r);if("normal"===c.type){if(o=r.done?d:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=d,r.method="throw",r.arg=c.arg)}}}function M(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,M(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 T(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 L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function k(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(It(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(P.prototype),c(P.prototype,l,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(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=k,L.prototype={constructor:L,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:k(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function $t(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,Ft(r.key),r)}}function Ft(t){var e=function(t,e){if("object"!=It(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==It(e)?e:e+""}function Bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wt(t,e,n){return e=Ut(e),function(t,e){if(e&&("object"==It(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,Gt()?Reflect.construct(e,n||[],Ut(t).constructor):e.apply(t,n))}function Gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gt=function(){return!!t})()}function Ut(t){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ut(t)}function qt(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&&zt(t,e)}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function Vt(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 Qt(t,e){function n(){var e;return e=Dt().mark((function e(n,r,o){var i,a,l;return Dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=document.importNode(n.content,!0),(a=i.querySelector("style"))&&i.removeChild(a),(l=i.querySelector("script"))&&i.removeChild(l),customElements.define(r,function(t){function e(){return Bt(this,e),Wt(this,e,[i,l,null==a?void 0:a.textContent,o])}return qt(e,t),n=e,r&&$t(n.prototype,r),u&&$t(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,u}(t.ReactiveCustomElement));case 6:case"end":return e.stop()}}),e)})),n=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(t){Vt(i,r,o,a,l,"next",t)}function l(t){Vt(i,r,o,a,l,"throw",t)}a(void 0)}))},n.apply(this,arguments)}var r,o;(o=document.querySelector('head > style[app="'.concat(e,'"]')))&&(r=new CSSStyleSheet).replaceSync(o.textContent),Array.prototype.forEach.call(document.querySelectorAll('template[app="'.concat(e,'"]')),(function(t){!function(t,e,r){n.apply(this,arguments)}(t,t.getAttribute("for"),r)})),"function"==typeof globalThis["".concat(e,"_runtime")]&&globalThis["".concat(e,"_runtime")].call(t)}function Yt(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)||Jt(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 Xt(t){return function(t){if(Array.isArray(t))return Kt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Jt(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 Jt(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}}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 Zt(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,te(r.key),r)}}function te(t){var e=function(t,e){if("object"!=ce(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ce(e)?e:e+""}function ee(t,e,n){return e=re(e),function(t,e){if(e&&("object"==ce(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,ne()?Reflect.construct(e,n||[],re(t).constructor):e.apply(t,n))}function ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ne=function(){return!!t})()}function re(t){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},re(t)}function oe(t,e){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oe(t,e)}function ie(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 ae(t,e,n){return t.set(ue(t,e),n),n}function le(t,e){return t.get(ue(t,e))}function ue(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 ce(t){return ce="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},ce(t)}function se(t){var e=new WeakMap,n=new WeakMap,r=new WeakMap,o=function(t){function o(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return ie(t=ee(this,o,[].concat(a)),e,void 0),ie(t,n,void 0),ie(t,r,!1),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&&oe(t,e)}(o,t),i=o,a=[{key:"render",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=this.getState(le(e,this));if(void 0===o)throw Error("State value for ".concat(le(e,this)," not found while rendering conditional-render element:"),this);var i=[];le(n,this).forEach((function(t,e){(function(t,e){return"string"!==ce(t)?e===t:"always"===t||(f.includes(t[0])?new Function("return ".concat(e).concat(t))():e===t)})(e,o)&&i.push.apply(i,Xt(t))})),r?(this.innerHTML="",this.append.apply(this,i)):i.length&&S(this,(function(){t.innerHTML="",t.append.apply(t,i)}))}},{key:"connectedCallback",value:function(){if(this.host=this.getRootNode().host,!this.host)throw Error("<conditional-render> must be used as part of a custom element template! Cannot be used outside of a custom element.");if(!le(r,this)){var t=this.getAttribute("_condition");if(!t)throw Error("conditional-render elements must have a _condition command attribute");!this.children||this.children.length;var o=t;ae(e,this,o);var i=Yt(this.getState(o,!0),2),a=i[0],l=i[1];if(void 0===a)throw Error("State property ".concat(o," not defined for _condition command!"));var u=new Map;u.set("always",[]),Xt(this.children).forEach((function(t){var e,n,r=t.getAttribute("_if");if(r){var o=(n=e=r,"true"===e?n=!0:"false"===e?n=!1:isNaN(Number(e))||(n=Number(e)),n);u.has(o)||u.set(o,[]),u.get(o).push(t)}else u.get("always").push(t)})),ae(n,this,u),l._stateManager.addConditionallyRenderingElements(o,this),this.render(!0),ae(r,this,!0)}}}],a&&Zt(i.prototype,a),l&&Zt(i,l),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,a,l}(t);return o}function fe(t){return fe="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},fe(t)}function pe(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 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}}(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 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}function ye(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,Oe(r.key),r)}}function de(t,e){if(e&&("object"==fe(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 ve(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ve=function(){return!!t})()}function be(t){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},be(t)}function me(t,e){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},me(t,e)}function ge(t,e,n){we(t,e),e.set(t,n)}function we(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Se(t,e,n){return(e=Oe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oe(t){var e=function(t,e){if("object"!=fe(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fe(e)?e:e+""}function Ee(t,e){return t.get(Pe(t,e))}function Ae(t,e,n){return t.set(Pe(t,e),n),n}function Pe(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 je(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=at(HTMLElement,t),n=t.SPROUT_CONFIG.stateManagerClass,r=new WeakMap,o=new WeakMap,a=new WeakMap,l=new WeakMap,u=new WeakMap,s=new WeakMap,f=new WeakMap,h=new WeakMap,y=new WeakMap,b=new WeakSet,m=function(e){function n(){var t,e,i,p,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,v=arguments.length>1?arguments[1]:void 0,m=arguments.length>2?arguments[2]:void 0,w=arguments.length>3?arguments[3]:void 0;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e=this,i=be(i=n),function(t,e){we(t,e),e.add(t)}(t=de(e,ve()?Reflect.construct(i,p||[],be(e).constructor):i.apply(e,p)),b),Se(t,"host",null),ge(t,r,!1),ge(t,o,void 0),ge(t,a,void 0),ge(t,l,void 0),ge(t,u,void 0),ge(t,s,void 0),ge(t,f,void 0),Se(t,"events",void 0),ge(t,h,[]),ge(t,y,void 0),Se(t,"propAttributes",new Map),"CONDITIONAL-ELEMENT"===t.tagName)return de(t);if(v){var S=new Function(v.textContent)();Pe(b,t,g).call(t,S)}if(m){var O=new CSSStyleSheet;O.replaceSync(m),Ae(s,t,O)}return w&&Ae(f,t,w),Ae(u,t,(null==d?void 0:d.cloneNode(!0))||c.cloneNode()),t.ref={},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&&me(t,e)}(n,e),m=n,(A=[{key:"setInitialState",value:function(t){this.initialState?Object.assign(this.initialState,t):this.initialState=t}},{key:"disconnectedCallback",value:function(){Pe(b,this,O).call(this),this.state=void 0}},{key:"activate",value:function(){var e,n,r,a=this,l=pe(this.getAttributeNames());try{for(l.s();!(e=l.n()).done;){var u=e.value,c=this.getAttribute(u);this.initialSetAttribute(u,c)}}catch(t){l.e(t)}finally{l.f()}n=this,r=function(){return Pe(b,a,E).call(a)},d.set(n,r),d.size<p&&(v&&cancelAnimationFrame(v),v=null),v||(v=requestAnimationFrame((function(){v=null,d.forEach((function(t){return t()})),d.clear()}))),Ee(o,this)&&queueMicrotask((function(){return Ee(o,a).call(a,t[i]())}))}},{key:"connectedCallback",value:function(){var e=this;Ee(r,this)||(this.host=this.getRootNode().host,Ee(a,this)&&Ee(a,this).call(this,t[i]()),Pe(b,this,S).call(this),Ee(l,this)&&Ee(l,this).call(this,t[i]()),queueMicrotask((function(){Pe(b,e,w).call(e),e.dispatchEvent(new CustomEvent("connected")),e.activate()})),Ae(r,this,!0))}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&this.propAttributes.has(t)&&this.propAttributes.get(t).forEach((function(t){return t.nodeValue=n}))}}])&&ye(m.prototype,A),P&&ye(m,P),Object.defineProperty(m,"prototype",{writable:!1}),m;var m,A,P}(e);function g(t){t.events&&(this.events=t.events,this.isConnected&&Pe(b,this,E).call(this)),t.state&&(this.setInitialState(t.state),this.isConnected&&Pe(b,this,w).call(this)),t.onMount&&Ae(o,this,t.onMount),t.beforeRender&&Ae(a,this,t.beforeRender)}function w(){if(this.initialState){var e=this.initialState;e._stateManager?this.state=e._stateManager.state:this.state=new n(e,void 0,void 0,!1,t).state,delete this.initialState}}function S(){if(t.SPROUT_CONFIG.useShadow){var e=this.attachShadow({mode:"open"});this.shadowRoot.adoptedStyleSheets=[],Ee(f,this)&&this.shadowRoot.adoptedStyleSheets.push(Ee(f,this)),Ee(s,this)&&this.shadowRoot.adoptedStyleSheets.push(Ee(s,this)),e.appendChild(Ee(u,this))}else{var n=new DocumentFragment;n.appendChild(Ee(u,this)),this.appendChild(n)}}function O(){var t=this;if(Ee(h,this).length){var e=this;Ee(h,this).forEach((function(n){e.removeEventListener(n,Ee(y,t),!1)}))}}function E(){var e,n=this;if(this.events){var r=Object.keys(this.events),o={},a={};r.forEach((function(t){var e=n.events[t];if("function"==typeof e)o[t]=e;else if("object"===fe(e)){Object.keys(e).forEach((function(n){"click"===n?o[t]=e[n]:(a[n]||(a[n]={}),a[n][t]=e[n])}))}}));var l=t[i]();Ae(y,this,(function(t){var e,n=this,r=(performance.now(),t.composedPath());if(e=r?r.find((function(t){return t.hasAttribute&&t.hasAttribute("ref")&&t.getAttribute("ref")in n.events})):t.target.hasAttribute&&t.target.hasAttribute("ref")&&t.target.getAttribute("ref")in this.events?t.target:null){var o=e.getAttribute("ref"),i=t.type;if("click"===i){var a="function"==typeof this.events[o]?this.events[o]:null;null==a||a.call(e,t,t.target,l)}else{var u;null===(u=this.events[o][i])||void 0===u||u.call(e,t,t.target,l)}}}));Object.keys(o).length&&(this.addEventListener("click",Ee(y,this)),Ee(h,this).push("click"));for(var u=Object.keys(a),c=0,s=u;c<s.length;c++){var f=s[c];this.addEventListener(f,Ee(y,this))}(e=Ee(h,this)).push.apply(e,u)}}return m}function Me(t){return Me="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},Me(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,_e(r.key),r)}}function _e(t){var e=function(t,e){if("object"!=Me(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Me(e)?e:e+""}function Le(t,e,n){return e=Ce(e),function(t,e){if(e&&("object"==Me(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,ke()?Reflect.construct(e,n||[],Ce(t).constructor):e.apply(t,n))}function ke(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ke=function(){return!!t})()}function Ce(t){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ce(t)}function Re(t,e){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Re(t,e)}var xe=document.currentScript.hasAttribute("allowappscopeaccess"),Ne=Ht;globalThis.SproutInitApp=function(t){var e,n=(window,{window,document:null===(e=window)||void 0===e?void 0:e.document}),r={useShadow:!0,allowAppScopeAccess:xe,stateManagerClass:Ne};r.allowAppScopeAccess&&(Object.defineProperty(globalThis,"sproutApps",{value:{},writable:!1}),Object.defineProperty(globalThis.sproutApps,t,{value:n,writable:!1})),n.SPROUT_CONFIG=Object.seal(r);var o=Object.prototype.hasOwnProperty;_(Object.prototype,"hasOwnProperty",o),n[i]=function(){return{}},n.setGlobalState=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new n.SPROUT_CONFIG.stateManagerClass(t,void 0,void 0,!0,n).state,r="SproutGlobalState";Object.defineProperty(n,r,{value:e,writable:!1,configurable:!1}),Object.defineProperty(n,i,{value:function(){return n[r]}})};var a={};l.forEach((function(t){return a[t.element]=at(t.class,n,!0)})),n.ReactiveCustomElement=je(n),l.forEach((function(t){customElements.define("reactive-".concat(t.element),a[t.element],{extends:t.element})}));var u=at(HTMLHeadingElement,n);["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),Le(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&&Re(t,e)}(e,t),n=e,r&&Te(n.prototype,r),o&&Te(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(u),{extends:t})}));var c=se(at(HTMLElement,n));return customElements.define("conditional-render",c),function(){Qt(n,t)}.bind(n)}})();
|
|
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,a()?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(a())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&i(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}}),i(n,t)},o(t)}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(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&&i(t,e)}(n,t),o=n,l=[{key:"unavailableMethod",value:function(t){throw Error("Can't use ".concat(t," in ReadonlySet"))}}],(a=[{key:"delete",value:function(){n.unavailableMethod("delete")}},{key:"clear",value:function(){n.unavailableMethod("clear")}}])&&e(o.prototype,a),l&&e(o,l),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,a,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"}])),m=document.createElement("div"),b={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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))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 x=b.pendingPaintNodeManagers,D=new Map;function H(t,e,n){var r;if(D.has(e)&&(r=D.get(e),cancelAnimationFrame(r)),t.length<P)r=requestAnimationFrame((function(){D.delete(e),t.forEach((function(t){return t()})),n&&n()})),D.set(e,r);else{D.delete(e);var o=L(t),a=0;requestAnimationFrame((function t(){o.slice(a,a+P).forEach((function(t){return t()})),(a+=P)<o.length&&requestAnimationFrame(t)}))}}var $=b.paintRafId,F=b.conditionalRenders;function U(t,e){F.set(t,e),H(Array.from(F.values()),"CONDITIONAL_RENDER",(function(){return F.clear()}))}function K(){$&&cancelAnimationFrame($),$=requestAnimationFrame((function(){$=null,B()}))}function G(t){t.forEach((function(t){return t()}))}function B(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 a,i=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){l=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}(x);try{for(o.s();!(e=o.n()).done;){var a=e.value,i=C(a.resolveToDOMActions(),5),l=i[0],u=i[1],c=i[2],s=i[3],f=i[4];if(console.log("Running reattach"),G(f.slice(0,_.REATTACH_ACTIONS)),r=performance.now()-n,console.log("took: ",r),r>k)return requestAnimationFrame((function(){return B()}));if(console.log("Running elements"),G(s.slice(0,_.ELEMENT_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return B()}));if(console.log("took: ",r),console.log("Running attributes"),G(l.slice(0,_.ATTRIBUTE_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return B()}));if(console.log("Running text"),G(u.slice(0,_.TEXT_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return B()}));if(G(c.slice(0,_.PROPERTY_ACTIONS)),(r=performance.now()-n)>k)return requestAnimationFrame((function(){return B()}));if(l.length||u.length||c.length||s.length||f.length)return requestAnimationFrame((function(){return B()}));a.paintStatus=null,x.delete(a),console.log("Took ",performance.now()-n)}}catch(t){o.e(t)}finally{o.f()}if(r>k)return requestAnimationFrame((function(){return B()}))}function q(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 a,i=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){l=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function z(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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))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 X(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 X(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)?X(t,e):void 0}}function X(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(!b.pendingPaintNodeManagers.size)return t();requestAnimationFrame(e)}))}))});function Y(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 a=t.nodeManager.stateNodes[e],i=t.stateArrayMaps[e],l=t.nodeManager.conditionallyRenderingElements[e];if(a&&a.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)})),i){var u=o;console.log("Reconcile state map, for: "+e),i.forEach((function(e,n){!function(t,e,n,r){var o;console.log("[RECONCILE] LAST OPERATION:",t.lastOperation);var a=null,i=!1,l=N(n),u=new Map,c=n.getAttribute&&n.getAttribute("ref")||n.refName||n.tagName,s=t.map((function(t){return Object.hasOwn(t,"state")?t.state:t})),f=function(t){var e,n=l?null===(e=t.firstElementChild)||void 0===e?void 0:e.state:t.state;return n?n.key:t.stateKey},p=function(t){var e,n=l?null===(e=t.firstElementChild)||void 0===e?void 0:e.state:t.state;return n?n.label:void 0};try{console.log("[RECONCILE] before (ref=".concat(c,"), EXPECTED KEYS:"),s.map((function(t){return null==t?void 0:t.key})),"EXISTING KEYS",W(n.children).map(f),"EXPECTED LABELS",s.map((function(t){return null==t?void 0:t.label})),"EXISTING LABELS",W(n.children).map(p))}catch(t){}if(t.isNewArray){if(t.length){var h;i=!0,a=n.detach();var d=ht(t,e,l?"li":void 0,a);a.innerHTML="",(h=a).append.apply(h,W(d))}}else if(t.lastOperation){i=!0,a||(a=n.detach());var y=a.children,v=z(t.lastOperation,2),m=v[0],b=v[1];switch(m){case"shift":a.removeChild(a.firstElementChild);break;case"unshift":for(var g=b[0]-1;g>=0;g--){var w,S=t[g],O=null===(w=a.keyMap)||void 0===w?void 0:w.get(S.key);if(O){var E=a.firstElementChild;O!==E&&a.insertBefore(O,E)}else{var A=pt(S,e,l?"li":void 0,a);A.stateKey=S.key,a.prepend(A)}}break;case"pop":a.removeChild(a.lastElementChild);break;case"push":for(var T=y.length,M=t.length;T<M;T++){var j=t[T],P=pt(j,e,l?"li":void 0,a);P.stateKey=j.key,a.appendChild(P)}break;case"splice":var _,k,C=y.length,L=null!==(_=b[0])&&void 0!==_?_:0,I=b[1],R=L<0?Math.max(C+L,0):Math.min(L,C);k=void 0===I||I===1/0?C-R:I<0?0:Math.min(I,C-R);var x=b[2]||[],D=t.length;if(0===x.length&&C===D)break;if(0===R&&k>=C&&x.length===D&&C===D)break;for(var H=0;H<k;H++)a.removeChild(y[R]);var $,F=q(x);try{for(F.s();!($=F.n()).done;){var U,K=pt($.value,e,l?"li":void 0,a),G=null!==(U=y[R])&&void 0!==U?U:null;a.insertBefore(K,G),R++}}catch(t){F.e(t)}finally{F.f()}}}else{for(var B,V=null==n?void 0:n.keyMap,X=null!==(B=a)&&void 0!==B?B:n,Y=0;Y<s.length;Y++){var Q,J,Z=s[Y],tt=null==Z?void 0:Z.key,et=X.children[Y];if(!et)break;var nt=l?null===(Q=et.firstElementChild)||void 0===Q?void 0:Q.state:et.state,rt=nt?nt.key:et.stateKey;try{console.log("[RECONCILE][normal] ref=".concat(c," idx=").concat(Y," have=").concat(rt," want=").concat(tt," action=").concat(rt===tt?"keep":"move"))}catch(t){}if(rt!==tt){i=!0,a||(a=n.detach());var ot=null!==(J=u.get(tt))&&void 0!==J?J:V.get(tt);if(ot){var at,it=a.replaceChildWith(et,ot);u.set(rt,it);try{console.log("[RECONCILE][normal] ref=".concat(c," idx=").concat(Y," move via=").concat(u.has(tt)?"replaced":"keyMap"))}catch(t){}if((l?null===(at=ot.firstElementChild)||void 0===at?void 0:at.state:ot.state)!==Z){var lt=pt(Z,e,l?"li":void 0,a);lt.stateKey=tt,a.replaceChildWith(ot,lt);try{console.log("[RECONCILE][normal] ref=".concat(c," idx=").concat(Y," refresh-in-place key=").concat(tt))}catch(t){}}}else{var ut=pt(Z,e,l?"li":void 0,a);ut.stateKey=tt,a.replaceChildWith(et,ut);try{console.log("[RECONCILE][normal] ref=".concat(c," idx=").concat(Y," create key=").concat(tt))}catch(t){}}}else if(nt!==Z){i=!0,a||(a=n.detach());var ct=pt(Z,e,l?"li":void 0,a);ct.stateKey=tt,a.replaceChildWith(et,ct);try{console.log("[RECONCILE][normal] ref=".concat(c," idx=").concat(Y," refresh key=").concat(tt))}catch(t){}}}for(;(null!==(st=a)&&void 0!==st?st:n).children.length>s.length;){var st,ft;i=!0,a||(a=n.detach()),a.removeChild((null!==(ft=a)&&void 0!==ft?ft:n).lastElementChild)}}var dt=a?a.children.length:n.children.length;if(t.length>dt){i=!0,a||(a=n.detach());for(var yt=a.children.length;yt<t.length;yt++){var vt,mt=t[yt];if(null===(vt=a.keyMap)||void 0===vt||!vt.has(mt.key)){var bt=void 0;(bt=u.has(mt.key)?u.get(mt.key):pt(mt,e,l?"li":void 0,a)).stateKey=mt.key,a.appendChild(bt)}}}var gt=null!==(o=a)&&void 0!==o?o:n;try{console.log("[RECONCILE] after (ref=".concat(c,"), EXPECTED KEYS:"),s.map((function(t){return null==t?void 0:t.key})),"EXISTING KEYS",W(gt.children).map(f),"EXPECTED LABELS",s.map((function(t){return null==t?void 0:t.label})),"EXISTING LABELS",W(gt.children).map(p))}catch(t){}i&&r.nodeManager.addNodeAction(a,{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){n||console.warn("Host element not found when binding prop attribute ".concat(t," to ").concat(e));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){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 rt(t,e){return ut(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,e)||it(t,e)||at()}function ot(t){return ut(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||it(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 it(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}}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}function ut(t){if(Array.isArray(t))return t}"undefined"==typeof HTMLElement?console.warn("HTMLElement was not found! This probably means you are running in a non-browser environment, and can lead to unexpected results"):Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var ct=function(t,e){var n;n=t,s.has(n)?"false"===e?this.removeAttribute(t):elementSetAttribute.call(this,t,""):elementSetAttribute.call(this,t,e)},st=function(t,e){var n=ot(tt(e)),r=n[0],o=n.slice(1),a=o[0],i=rt(this.getState(a,!0),2),l=i[0],u=i[1];if(l!==Symbol.for(E.STATE_NOT_FOUND))if(u){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})}else console.warn("No State object with state prop: "+a);else console.warn("State value for ".concat(a," is undefined. State values should never be undefined."))},ft=function(t){var e=ot(tt(t)),n=e[0],r=e.slice(1),o=r[0],a=rt(this.getState(o,!0),2),i=a[0],l=a[1];if(i!==Symbol.for(E.STATE_NOT_FOUND))if(l){var u=l._stateManager,c="literal"===n?i: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})}else console.warn("No State object with state prop: "+o);else console.warn("State value for ".concat(o," is undefined. State values should never be undefined."))};function pt(t,e,n,r){var o,a=document.createElement(e);return a.setInitialState(t),a.ownerMapElement=r,n?(o=document.createElement(n)).appendChild(a):o=a,t.hasOwnProperty("key")&&!o.hasOwnProperty("stateKey")&&(o.stateKey=t.key),o}function ht(t,e,n,r){return t.map((function(t,o){if(Object.hasOwn(t,"state")&&(t=t.state),"object"!==nt(t))return console.warn("item in State array for _map is not an object: ",t),{};Object.hasOwn(t,"key")||(console.warn("State object in elements map has no 'key' property. Adding automatically per index. This can have unexpected results on mutations!"),t.key=o);var a=pt(t,e,n,r);return a.stateKey=t.key,a}))}function dt(t,e,n){var r;if(!yt(e)){console.log("Handling state change for: "+e);var o=null!=n?n:t.state[e],a=Object.getOwnPropertyDescriptor(t.state,e);null==a||null===(r=a.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 yt(t){return h.has(t)}function vt(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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,e)||gt(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 wt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gt(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 gt(t,e){if(t){if("string"==typeof t)return wt(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)?wt(t,e):void 0}}function wt(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 St(t){return St="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},St(t)}function Ot(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,kt(r.key),r)}}function Et(t,e){if(e&&("object"==St(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 At(){return At="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Pt(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}},At.apply(null,arguments)}function Tt(t){var e="function"==typeof Map?new Map:void 0;return Tt=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(Mt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&jt(o,n.prototype),o}(t,arguments,Pt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),jt(n,t)},Tt(t)}function Mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Mt=function(){return!!t})()}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Pt(t){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pt(t)}function _t(t,e,n){return(e=kt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kt(t){var e=function(t,e){if("object"!=St(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=St(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==St(e)?e:e+""}var Nt=function(t){function e(t,n,r){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,i=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);a.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"===St(t)&&(o=zt(t,r,n._stateManager,dt,!1,a)),o}));return l=this,u=e,c=bt(f),u=Pt(u),_t(o=Et(l,Mt()?Reflect.construct(u,c||[],Pt(l).constructor):u.apply(l,c)),"arrayMaps",{}),o.parentStateObject=n,o.arrayStateProp=r,o.appScope=a,o.rawArray=s,i&&o.makeStateMap(),J(f=new Proxy(o,Dt(null==n?void 0:n._stateManager,r,a)),"_isStatefulArray",!0),o.statefulArray=f,Et(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&&jt(t,e)}(e,t),n=e,r=[{key:Symbol.iterator,value:function(){return At(Pt(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],a=r[1],i=n.slice(2);return this.lastOperation=["splice",[o,a,i]],[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,a=this.length,i=!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,At(Pt(e.prototype),t,this),n),2);o=c[0],i=c[1],this.arrayMaps[t].set(l,{lastResult:o,timestamp:(new Date).getTime()})}else o=u.lastResult}else{var s=mt(this.runArrayOperation(t,At(Pt(e.prototype),t,this),n),2);o=s[0],i=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,At(Pt(e.prototype),t,this),n),2);o=f[0],i=f[1]}var p=this.length,h=w.has(t)||"splice"===t&&p===a;return r&&h&&this.parentStateObject._stateManager.setDirtyProp("".concat(this.arrayStateProp,".length"),!0),delete this.$$operation,r&&this.parentStateObject._stateManager.setDirtyProp(this.arrayStateProp),[o,i]}},{key:"mapStateKeys",value:function(){var t=this;this.forEach((function(e){var n=Object.hasOwn(e,"state")?e.state:e;Object.hasOwn(n,"key")||console.warn("Items in State Map Array ".concat(t.arrayStateProp," SHOULD have a 'key' property!")),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&&Ot(n.prototype,r),o&&Ot(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(Tt(Array));function Ct(t){return Ct="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},Ct(t)}function Lt(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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return It(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)?It(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 It(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}_t(Nt,"functions",new u(["constructor","statifyArray","addDirtyIndex","doArrayOperation","runArrayOperation","makeStateMap","mapStateKeys","toArray"]));var Rt=function(){return{get:function(t,e,n){var r;if(yt(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 a=r._global,i=Lt(Qt(n,r),3),l=i[0],u=i[1],c=i[2];return l.forEach((function(n){t.addStateDependency(n,e)})),null==u||u.forEach((function(n){a._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)},a=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(i,l,u){if(0===l.indexOf("$$"))return Reflect.set(i,l,u);if("length"===l)return n=Reflect.set(i,l,u),i.hasDirtyItems=!0,i.hasOwnProperty("$$operation")?o(!0,!1):o(!0,!0),n;if(i[l]===u)return!0;var c;Number(l);if(!isNaN(l)){var s=Number(l),f=i[s],p=a(f);if(u=Wt(u,e,t,r),Object.hasOwn(u,"_stateManager")&&(u=u._stateManager),!i.hasOwnProperty("$$operation")){var h=!1;if(s<i.length&&(h=!0),(n=Reflect.set(i,l,u))&&i._isStateMap){void 0!==p&&i.keyMap.delete(p);var d=a(u);void 0!==d&&i.keyMap.set(d,(c=u,Object.hasOwn(c,"state")?c.state:c))}return h&&o(),n}}return Reflect.set(i,l,u)},get:function(e,n,r){if("symbol"===Ct(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 a=n.substring(2);return Reflect.get(e,a,r)}if("function"==typeof e[n]&&!Nt.functions.has(n)){var i=e.parentStateObject;if(i&&Object.hasOwn(i,"$$accessCount")){var l=String(n);if(S.has(l)){var u=e.arrayStateProp;i.$$accessCount[u]=(i.$$accessCount[u]||0)+1}}}if(!t.isInitializing&&"function"==typeof e[n]&&!Nt.functions.has(n))return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var a=Lt(e.doArrayOperation.call(e.statefulArray,n,r,g.has(n)),2),i=a[0];a[1];return i};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=a(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 $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 Ft(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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,e)||function(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}}(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 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 Kt(t){return Kt="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},Kt(t)}function Gt(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&&Bt(o,n.prototype),o}function Bt(t,e){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bt(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 Ce(t,e,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:dt,arguments.length>4&&void 0!==arguments[4]&&arguments[4],r);return o.use(Ht,"conditional-element"),o.use($t,"map"),o}function Wt(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 yt(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 a=Gt(Nt,[t,n,e,r,o]);return n.hasOwnProperty("".concat(e,".length"))||Object.defineProperty(n,"".concat(e,".length"),{get:function(){return this[e].length}}),a}(t,e,n.state,r,o):"object"!==Kt(t)||null===t||t.hasOwnProperty("_stateManager")||(t=zt(t,e,n,dt,!1,r).state)),t}function Vt(t,e,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a="set_".concat(e),i=Ft(t,2),l=i[0],u=i[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,a,o);l=new Proxy(l,f),t[0]=l}else{var p,h,d,y=Ft(Qt(l,s),3);h=y[0],d=y[1],c=y[2],h.forEach((function(t){n.addStateDependency(t,a)})),null===(p=d)||void 0===p||p.forEach((function(t){n.addStateDependency(t,a),s._global._stateManager.addGlobalStateDependency(t,a,n)}))}else u.deps.forEach((function(t){if(0===t.indexOf("global")){var e=t.substring(t.indexOf("global.")+7);s._global.addGlobalStateDependency(a,e,n)}else n.addStateDependency(t,a)}));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=Wt(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,a=n.privateState[e];void 0===a&&Vt(t,e,n,r);var i=Ft(t,2),l=i[0],u=i[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=Wt(c,e,n,r,u.stateMap)),c!==a&&(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 Qt(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),a=Yt(r.$$accessCount);delete r.$$accessCount;var i=null;return n&&(i=Yt(r._global.$$accessCount),delete r._global.$$accessCount),[a,i,o]}function Jt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=t.state,o=Object.getOwnPropertyDescriptors(e),a=function(e){var a=o[e];if(yt(e))return Object.defineProperty(r,e,a),1;var i=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_")}}}}(a,e);if(i){var l=i.isSetter?e.substring(4):e;if(i.func.bind(r),i.isSetter&&!i.nativeGetter)Vt(a.value,l,t,n),i.once&&(a.configurable=!0),Object.defineProperty(r,e,a);else if(i.nativeGetter){a.get.isStateGetter=!0;var u=Ft(Qt(a.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)})),a.get.bind(r),Object.defineProperty(r,l,a)}}else if(a.hasOwnProperty("value")){var f=e,p=Wt(a.value,f,t,n);t.privateState.hasOwnProperty(f)||(t.privateState[f]=p),Object.defineProperty(r,f,{set:function(e){e!==t.privateState[f]&&(e=Wt(e,f,t,n),t.privateState[f]=e,t.setDirtyProp(f),t.setDirtyProp("".concat(f,".length")))},get:function(){return t.privateState[f]}})}};for(var i in o)a(i)}function Zt(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 te(t){var e=new Set,n=new Set;return t.forEach((function(t){vt(t)?n.add(t):e.add(t)})),[e,n]}function ee(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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))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 ne(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 a,i=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){l=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function re(t){return re="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},re(t)}function oe(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)||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 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 le(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,se(r.key),r)}}function ue(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 ce(t,e,n){return(e=se(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function se(t){var e=function(t,e){if("object"!=re(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=re(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==re(e)?e:e+""}function fe(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=b.pendingPaintNodeManagers,he=new WeakMap,de=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ce(this,"stateNodes",{}),ce(this,"conditionallyRenderingElements",{}),ce(this,"bindableAttributesStateNodes",new Map(oe(A).map((function(t){return[t,new Map]})))),ue(this,he,new Map),ce(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){fe(he,this).has(t)||fe(he,this).set(t,Y(t.nodeType));var n=fe(he,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&&(pe.add(this),K(),this.paintStatus="queued")}},{key:"resolveToDOMActions",value:function(){var t=[],e=[],n=[],r=[],o=[];return fe(he,this).forEach((function(a,i){switch(i.nodeType){case Node.ATTRIBUTE_NODE:var l=a.setAttribute,u=re(l);if("undefined"!==u)if("boolean"===u){if(!i.hasOwnProperty("originalOwnerElement"))throw Error("originalOwnerElement not found on boolean attribute node! Should never happen!");!1===l?i.originalOwnerElement.hasAttribute(i.name)&&t.push((function(){i.originalOwnerElement.removeAttributeNode(i)})):i.originalOwnerElement.hasAttribute(i.name)||t.push((function(){i.originalOwnerElement.setAttributeNode(i)}))}else"string"===u&&i.nodeValue!==l&&t.push((function(){return i.nodeValue=l}));break;case Node.TEXT_NODE:if(void 0!==a.textContent){var c=String(a.textContent);i.nodeValue!==c&&e.push((function(){return i.nodeValue=c}))}break;case Node.ELEMENT_NODE:var s,f=ne(a.append.values());try{var p=function(){var t=s.value;n.push((function(){return i.appendChild(t)}))};for(f.s();!(s=f.n()).done;)p()}catch(t){f.e(t)}finally{f.f()}var h,d,y=ne(a.setProperty);try{var v=function(){var t=ee(h.value,2),e=t[0],n=t[1];i[e]!==n&&o.push((function(){return i[e]=n}))};for(y.s();!(h=y.n()).done;)v()}catch(t){y.e(t)}finally{y.f()}a.reattach&&(r.push((function(){return i.reattach()})),null!=i&&null!==(d=i.pendingKeyMapActions)&&void 0!==d&&d.size&&r.push((function(){var t,e=ne(i.pendingKeyMapActions);try{for(e.s();!(t=e.n()).done;)(0,t.value)()}catch(t){e.e(t)}finally{e.f()}i.pendingKeyMapActions.clear()})),a.reattach=!1)}})),fe(he,this).clear(),[t,e,o,n,r]}}])&&le(t.prototype,e),n&&le(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function ye(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(yt(r))return Reflect.set.apply(Reflect,arguments);var a,i=Reflect.set.apply(Reflect,arguments),l=t._stateManager;return l.parentStateManager&&(performance.mark("todo-array-set-dirty-prop"),null===(a=l.parentStateManager)||void 0===a||a.setDirtyProp(e)),i},defineProperty:function(e,r,o){return yt(r)?Reflect.defineProperty.apply(Reflect,arguments):(void 0!==(null==o?void 0:o.value)&&(o.value=Wt(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 ve(t){return ve="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},ve(t)}function me(t){return function(t){if(Array.isArray(t))return Oe(t)}(t)||be(t)||Se(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 ge(t,e){return Ee(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,e)||Se(t,e)||we()}function we(){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 Se(t,e){if(t){if("string"==typeof t)return Oe(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)?Oe(t,e):void 0}}function Oe(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 Ee(t){if(Array.isArray(t))return t}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,je(r.key),r)}}function Te(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 Me(t,e,n){return(e=je(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function je(t){var e=function(t,e){if("object"!=ve(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ve(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ve(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 _e=new Map;var ke=new WeakMap,Ne=function(){return t=function t(e,n,r){var o=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:dt,i=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),Me(this,"isInitializing",!1),Me(this,"privateState",{}),Me(this,"state",new EventTarget),Me(this,"stateDependencies",new Map),Me(this,"parentStateProp",void 0),Me(this,"parentStateManager",void 0),Me(this,"dirtyProps",new Set),Me(this,"nodeManager",new de),Te(this,ke,new Set),this.isInitializing=!0,this.parentStateProp=n,this.parentStateManager=r,this.handleStateChange=a,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=ye(this.state,n,l)),e&&Object.keys(e).length||console.warn("Empty initial state objects should never be used!"),i)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){Jt(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"),a=o>0?t.substring(0,o):t;if(!Object.hasOwn(this.state,a))throw Error("Error in setDirtyProp. State has no property: '".concat(t,"'. This should never happen"));this.dirtyProps.add(t),Array.isArray(this.state[a])&&(this.state[a].lastDirtyTimestamp=(new Date).getTime()),e&&(n=this,r=this.handleStateChanges.bind(this),_e.set(n,r),H(Array.from(_e.values()),"STATE_CHANGE",(function(){return _e.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(vt(e)){var o=r[e],a=e.substring(4);Xt(o,a,t,n)&&dt(t,a,null,n.offscreenContainer)}else if(e.indexOf(".length")>0){var i=e.split(".")[0];dt(t,e,t.state[i].length,n.offscreenContainer)}else dt(t,e,null,n.offscreenContainer)}(e,t,e.appScope);var o=vt(t)?t.substring(4):t;if(null!=n&&n.has(o)){var a=ge(te(n.get(o)),2),i=a[0],l=a[1];l.size&&e.handleStatePropDependencies(l),i.size&&e.handleStatePropDependencies(i)}null!=r&&r.has(o)&&r.get(o).forEach((function(t,e){var n=ge(te(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,a=this,i=a.state;e.forEach((function(e){var l;if(vt(e)){e=e.substring(4);var u=i[e];performance.mark("todo-call-setter-hook"),Xt(u,e,a,t.appScope)&&t.handleStateChange(a,e,null)}else t.handleStateChange(a,e,null);a.stateDependencies.has(e)&&a.stateDependencies.get(e).forEach((function(t){vt(t)?r.add(t):n.add(t)}));var c=null===(l=a.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)||a;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)})),a.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=Ee(a=r)||be(a)||Se(a)||we();e=o[0],n=o.slice(1)}var a,i=n[0];if(!i)throw Error("Must specify state property name for State expression: ".concat(t));var l=this.state,u=Object.getOwnPropertyDescriptor(l,i);if(u||(l=l._global,u=Object.getOwnPropertyDescriptor(l,i)),!u)throw Error("Could not bind state property ".concat(i,". State property ").concat(i," 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;Zt(t,l,(function(){return!f[i]}),i);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;Zt(t,l,(function(){return h[i]===p}),i);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;Zt(t,l,y?function(){return v[i]?d:y}:function(){return v[i]?d:void 0},i)}return l[t]}},{key:"getStateDependencies",value:function(){return this.stateDependencies}},{key:"use",value:function(t,e){t.call(this),Pe(ke,this).add(e)}},{key:"isUsing",value:function(t){return Pe(ke,this).has(t)}}],e&&Ae(t.prototype,e),n&&Ae(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const Ce=Ne;function Le(t){return Object.hasOwn(t,"state")?t:t.firstElementChild}var Ie={replaceChildWith:function(t,e){var n,r,o,a=Le(t),i=null!==(n=null==a||null===(r=a.state)||void 0===r?void 0:r.key)&&void 0!==n?n:t.stateKey,l=Le(e),u=null!==(o=e.stateKey)&&void 0!==o?o:l.stateKey,c=this.replaceChild(e,t);return this.keyMap.delete(i),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=Le(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=Le(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,a=n;o<a.length;o++){var i,l=a[o],u=Le(l),c=null!==(i=l.stateKey)&&void 0!==i?i:u.stateKey;this.keyMap.set(c,l)}},appendChild:function(t){var e;HTMLElement.prototype.appendChild.call(this,t);var n=Le(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=Le(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?(this.$$detached===j.HIDE_UNHIDE?(this.removeAttribute("inert",""),this.classList.remove(T)):this.$$detached===j.CLONE&&this.$$originalElement.replaceWith(this),this.$$detached=void 0):console.warn("Tried to reattach an undetached element")},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 a=function(){var t=l[i];e.pendingKeyMapActions.add((function(){var n=Le(t);if(n.isActive){var r,o,a=null!==(r=null==n||null===(o=n.state)||void 0===o?void 0:o.key)&&void 0!==r?r:t.stateKey;e.keyMap.set(a,t)}else n.addEventListener("active",(function(){var r,o,a=null!==(r=null==n||null===(o=n.state)||void 0===o?void 0:o.key)&&void 0!==r?r:t.stateKey;e.keyMap.set(a,t)}),{once:!0})}))},i=0,l=r;i<l.length;i++)a()}};function Re(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)||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 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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))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 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 $e={map:function(t){var e,n=xe(t.split(":"),2),r=n[0],o=n[1],a=this;e=a,Object.assign(e,Ie),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],a=r[1];if(!o||!Array.isArray(o))throw new Error("State value for _map is not an array, in state property: "+t);if(!o.hasOwnProperty("_isStatefulArray"))throw new Error("Array '".concat(t,"' used for State Map must be a stateful array. Use a direct array value or an SSH with statify:true or stateMap: true "));o.makeStateMap();var i=ht(o,e,N(n)?"li":void 0,n);return n.innerHTML="",i.length&&n.append.apply(n,Re(i)),a}(r,o,a);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,a)}))},bind:function(t){if("INPUT"===this.tagName){var e=xe(t.split(":"),2),n=e[0],r=e[1];n&&r?p.has(n)?this.bindAttributeToState(n,r):console.warn("Attribute ".concat(n," is not supported for _bind command!")):console.warn("Incorrect usage of _bind command! Please pass <attribute-name>:<state-property-name>")}else console.warn("_bind command is only supported on input elements!")},bindprop:function(t){var e=xe(t.split(":"),2),n=e[0],r=e[1],o=xe(this.getState(n,!0),2),a=(o[0],o[1]);a?this[r]=a[n]:console.warn("State property ".concat(n," not found for bindProp command!"))}};function Fe(t){return Fe="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},Fe(t)}function Ue(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)||Be(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 Ke(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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,e)||Be(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 Ge(){return Ge="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Qe(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}},Ge.apply(null,arguments)}function Be(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 We(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,rn(r.key),r)}}function Ve(t,e,n){return e&&We(t.prototype,e),n&&We(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xe(t,e,n){return e=Qe(e),function(t,e){if(e&&("object"==Fe(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||[],Qe(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 Qe(t){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qe(t)}function Je(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&&Ze(t,e)}function Ze(t,e){return Ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ze(t,e)}function tn(t,e,n){en(t,e),e.set(t,n)}function en(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nn(t,e,n){return(e=rn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rn(t){var e=function(t,e){if("object"!=Fe(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fe(e)?e:e+""}function on(t,e,n){return t.set(ln(t,e),n),n}function an(t,e){return t.get(ln(t,e))}function ln(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 un(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,a=new WeakMap,i=function(t){function n(){var t,e,i;return ze(this,n),t=Xe(this,n),en(e=t,i=o),i.add(e),nn(t,"host",null),tn(t,r,!1),nn(t,"refName",void 0),tn(t,a,[]),t.isReactiveElement=!0,t.isNativeElement=!0,t}return Je(n,t),Ve(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=Be(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 a,i=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){l=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}(this.getAttributeNames());try{for(o.s();!(t=o.n()).done;){var i=t.value,l=this.getAttribute(i);if(this.initialSetAttribute(i,l),0===i.indexOf("_")){var u=i.substring(1);r.push({command:u,args:l})}}}catch(t){o.e(t)}finally{o.f()}r.forEach((function(t){var r,o,a,i,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===(a=n.host)||void 0===a?void 0:a.commands)||n.commands;null==c||null===(i=c[l])||void 0===i||i.call(n,u)})),an(a,this).forEach((function(t){return t.call(n)})),an(a,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(!an(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(),on(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?ln(o,this,l).call(this,t,e,n):an(a,this).push((function(){return ln(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],a=this.isNativeElement&&this.host?this.host:this,i=!1;if(a&&a.state&&Object.hasOwn(a.state,t)&&(i=!0,r=(n=a.state)[t]),!i)for(;!i&&a.host;)(a=a.host)&&a.state&&Object.hasOwn(a.state,t)&&(i=!0,r=(n=a.state)[t]);if(!i){var l=e[d]();l&&Object.hasOwn(l,t)&&(i=!0,r=(n=l)[t])}return i||(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){ft.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)){n&&console.warn("Mixing between prop attributes and state attributes can lead to unexpected results!");var o=e,a=t.substring(1);"textContent"===a?this.initialSetText(o):st.call(this,a,o)}else{if(n){var i=this.getHost();i||console.warn("Host element not found when resolving prop attribute ".concat(t,":").concat(e));var l=e.substring(1);r=i.getAttribute(l)}"textContent"===attrName?this.initialSetText(r):ct.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(nn(i,"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 nn(t=Xe(this,e,[].concat(r)),"boundAttributesToState",new Map),tn(t,u,void 0),t}return Je(e,t),Ve(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=Ke(this.getState(n,!0),2),o=r[0],a=r[1];if(o===Symbol.for(E.STATE_NOT_FOUND))throw Error("updateStateFromAttribute: State property ".concat(n," not found"));o!==e&&(a[n]=e)}},{key:"activate",value:function(){Ge(Qe(e.prototype),"activate",this).call(this),on(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",an(u,this),!1)}},{key:"disconnectedCallback",value:function(){Ge(Qe(e.prototype),"disconnectedCallback",this).call(this),an(u,this)&&this.removeEventListener("change",an(u,this)),this.boundAttributesToState.clear()}},{key:"attributeChangedCallback",value:function(t,n,r){if(0===t.indexOf(":"))return console.warn("State attributes should never be changed explicitely!"),!1;if(Ge(Qe(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)}}])}(i);return nn(s,"observedAttributes",i.observedAttributes.concat(Ue(p))),s}return i}function cn(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 sn(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)?sn(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 a,i=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){l=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function sn(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 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 pn(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,Sn(r.key),r)}}function hn(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)}function dn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dn=function(){return!!t})()}function yn(){return yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=vn(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}},yn.apply(null,arguments)}function vn(t){return vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vn(t)}function mn(t,e){return mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mn(t,e)}function bn(t,e,n){gn(t,e),e.set(t,n)}function gn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wn(t,e,n){return(e=Sn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sn(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 On(t,e){return t.get(An(t,e))}function En(t,e,n){return t.set(An(t,e),n),n}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")}var Tn=new CSSStyleSheet;function Mn(t){return Mn="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},Mn(t)}function jn(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,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,e)||_n(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 Pn(t){return function(t){if(Array.isArray(t))return kn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_n(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 _n(t,e){if(t){if("string"==typeof t)return kn(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)?kn(t,e):void 0}}function kn(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 Nn(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 Cn(t,e,n){return e=In(e),function(t,e){if(e&&("object"==Mn(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,Ln()?Reflect.construct(e,n||[],In(t).constructor):e.apply(t,n))}function Ln(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ln=function(){return!!t})()}function In(t){return In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},In(t)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}function xn(t){var e=function(t,e){if("object"!=Mn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Mn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Mn(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 Hn(t,e,n){return t.set(Fn(t,e),n),n}function $n(t,e){return t.get(Fn(t,e))}function Fn(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 Un(t){return Un="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},Un(t)}function Kn(){Kn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.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 a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),l=new k(r||[]);return o(i,"_invoke",{value:M(t,n,l)}),i}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 m(){}function b(){}function g(){}var w={};c(w,i,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(N([])));O&&O!==n&&r.call(O,i)&&(w=O);var E=g.prototype=m.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,a,i,l){var u=f(t[o],t,a);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==Un(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,i,l)}),(function(t){n("throw",t,i,l)})):e.resolve(s).then((function(t){c.value=t,i(c)}),(function(t){return n("throw",t,i,l)}))}l(u.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function M(e,n,r){var o=p;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){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 a=f(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(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[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(Un(e)+" is not iterable")}return b.prototype=g,o(E,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"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,a){void 0===a&&(a=Promise);var i=new T(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},A(E),c(E,u,"Generator"),c(E,i,(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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},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 Gn(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 Bn(t,e,n){return e&&Gn(t.prototype,e),n&&Gn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function qn(t){var e=function(t,e){if("object"!=Un(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Un(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Un(e)?e:e+""}function zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wn(t,e,n){return e=Xn(e),function(t,e){if(e&&("object"==Un(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,Vn()?Reflect.construct(e,n||[],Xn(t).constructor):e.apply(t,n))}function Vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vn=function(){return!!t})()}function Xn(t){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xn(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&&Qn(t,e)}function Qn(t,e){return Qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qn(t,e)}function Jn(t,e,n,r,o,a,i){try{var l=t[a](i),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function Zn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){Jn(a,r,o,i,l,"next",t)}function l(t){Jn(a,r,o,i,l,"throw",t)}i(void 0)}))}}function tr(t){return tr="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},tr(t)}function er(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,nr(r.key),r)}}function nr(t){var e=function(t,e){if("object"!=tr(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=tr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tr(e)?e:e+""}function rr(t,e,n){return e=ar(e),function(t,e){if(e&&("object"==tr(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,or()?Reflect.construct(e,n||[],ar(t).constructor):e.apply(t,n))}function or(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(or=function(){return!!t})()}function ar(t){return ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ar(t)}function ir(t,e){return ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ir(t,e)}function lr(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}Tn.replaceSync(":host { contain: layout paint; }");var ur=document.currentScript,cr=(null==ur?void 0:ur.hasAttribute("strict"))||!1,sr=Ce,fr={useShadow:!0,allowAppScopeAccess:!0,useDSD:!1,strict:cr,appName:(null==ur?void 0:ur.getAttribute("app"))||"sprout-app",stateManagerClass:sr};fr.allowAppScopeAccess&&Object.defineProperty(globalThis,"sproutApps",{value:{},writable:!1});var pr,hr=new CSSStyleSheet;hr.replaceSync(M),document.adoptedStyleSheets=[].concat(function(t){if(Array.isArray(t))return lr(t)}(pr=document.adoptedStyleSheets)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(pr)||function(t,e){if(t){if("string"==typeof t)return lr(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)?lr(t,e):void 0}}(pr)||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.")}(),[hr]);var dr,yr=(window,{window,document:null===(dr=window)||void 0===dr?void 0:dr.document});fr.allowAppScopeAccess&&Object.defineProperty(globalThis.sproutApps,fr.appName,{value:yr,writable:!1}),yr.SPROUT_CONFIG=Object.seal(fr);var vr=Object.prototype.hasOwnProperty;J(Object.prototype,"hasOwnProperty",vr),yr[d]=function(){return y},yr.setGlobalState=function(){var t=zt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},void 0,void 0,dt,!0,yr).state,e="SproutGlobalState";return Object.defineProperty(yr,e,{value:t,writable:!1,configurable:!1}),Object.defineProperty(yr,d,{value:function(){return yr[e]}}),yr[e]},yr.setCommands=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(yr,"appCommands",{value:t,writable:!1,configurable:!1})};var mr={};v.forEach((function(t){return mr[t.element]=un(t.class,yr,!0)})),yr.ReactiveCustomElement=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=un(HTMLElement,t),n=(t.SPROUT_CONFIG.stateManagerClass,new WeakMap),r=new WeakMap,o=new WeakMap,a=new WeakMap,i=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,b=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=vn(h=f),function(t,e){gn(t,e),e.add(t)}(t=hn(e,dn()?Reflect.construct(h,d||[],vn(e).constructor):h.apply(e,d)),s),wn(t,"ownerMapElement",void 0),wn(t,"state",void 0),wn(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,a,void 0),bn(t,i,void 0),wn(t,"events",void 0),wn(t,"eventsMap",new Map),bn(t,l,void 0),wn(t,"propAttributes",new Map),bn(t,u,!1),bn(t,c,void 0),wn(t,"commands",void 0),wn(t,"ref",{}),wn(t,"canonicalTagName",void 0),"CONDITIONAL-ELEMENT"===t.tagName)return hn(t);if(t.isNativeElement=!1,En(u,t,S),w&&En(i,t,w),t.canonicalTagName=t.localName,On(u,t))t.canonicalTagName=t.localName.substring(0,t.localName.indexOf("-dsd"));else{if(g){var O=new CSSStyleSheet;O.replaceSync(g),En(a,t,O)}En(o,t,v?document.importNode(v,!0):document.importNode(m,!0)),An(s,t,y).call(t)}return b&&An(s,t,p).call(t,b),On(r,t).init&&On(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(){An(s,this,v).call(this),this.state=void 0,this.isActive=!1,On(r,this).unmount&&On(r,this).unmount.call(this)}},{key:"activate",value:function(){yn(vn(f.prototype),"activate",this).call(this),An(s,this,b).call(this),On(r,this).active&&On(r,this).active.call(this)}},{key:"findElement",value:function(e){var n,r,o=this,a=this;return t.SPROUT_CONFIG.useShadow&&(a=o.shadowRoot),Object.hasOwn(o.ref,e)?o.ref[e]:(null===(n=a)||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),!On(n,this)){var e=this.getRootNode().host;On(r,this).mount&&On(r,this).mount.call(this);var o=function(){An(s,t,h).call(t),t.isActive=!0,t.dispatchEvent(new CustomEvent("active")),On(r,t).stateful&&On(r,t).stateful.call(t),t.activate()};e?e.isActive?o():e.addEventListener("active",o,{once:!0}):setTimeout(o,0),En(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()})))}}])&&pn(d.prototype,g),w&&pn(d,w),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,g,w}(e);function p(t){var e=this;if(En(c,this,t.settings),this.commands=t.commands,t.events){var o,a,i=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"===(a=fn(o=t.events[l])))i("click",l,o);else if("object"===a)for(var u in o)i(u,l,o[u]);this.isConnected&&An(s,this,b).call(this)}for(var f in t.state&&(this.setInitialState(t.state),this.isConnected&&On(n,this)&&!this.state&&An(s,this,h).call(this)),On(r,this))t.hasOwnProperty(f)&&(On(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,dt,!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=[Tn],On(i,this)&&this.shadowRoot.adoptedStyleSheets.push(On(i,this)),On(a,this)&&this.shadowRoot.adoptedStyleSheets.push(On(a,this)),this.shadowRoot.appendChild(On(o,this));else{var e=new DocumentFragment;e.appendChild(On(o,this)),this.appendChild(e)}}function v(){if(this.eventsMap.size){var t,e=cn(this.eventsMap.keys());try{for(e.s();!(t=e.n()).done;){var n=t.value;this.shadowRoot.removeEventListener(n,On(l,this),!1)}}catch(t){e.e(t)}finally{e.f()}}}function b(){if(!On(l,this)&&this.eventsMap.size){var e=t[d]();En(l,this,(function(t){var n=this.host,r=n.eventsMap.get(t.type);if(!r)return!1;var o,a=cn(t.composedPath());try{for(a.s();!(o=a.n()).done;){var i=o.value;if(i&&i.refName&&r.has(i.refName)){var l=i,u=l.refName;r.get(u).call(l,t,n,e)}}}catch(t){a.e(t)}finally{a.f()}t.stopPropagation()}));var n,r=cn(this.eventsMap.keys());try{for(r.s();!(n=r.n()).done;){var o=n.value;this.shadowRoot.addEventListener(o,On(l,this),{capture:!0})}}catch(t){r.e(t)}finally{r.f()}}}return f}(yr),function(t,e){function n(t,e,n){return r.apply(this,arguments)}function r(){return(r=Zn(Kn().mark((function e(n,r,o){var a,i,l,u,c;return Kn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.content,(i=a.querySelector("style"))&&a.removeChild(i),(u=a.querySelector("script"))&&(c=u.textContent,a.removeChild(u),c&&0!==c.trim().length))try{l=Function(c)()}catch(t){console.warn("Failed to evaluate runtime for ".concat(r," from template script"),t)}customElements.define(r,function(t){function e(){var t;return zn(this,e),Wn(this,e,[a,l,null===(t=i)||void 0===t?void 0:t.textContent,o])}return Yn(e,t),Bn(e)}(t.ReactiveCustomElement)),customElements.define("".concat(r,"-dsd"),function(t){function e(){return zn(this,e),Wn(this,e,[a,l,null,o,!0])}return Yn(e,t),Bn(e)}(t.ReactiveCustomElement));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){var r,o=new CSSStyleSheet,a=document.querySelector('head > style[app="'.concat(e,'"]'));if(a)o.replaceSync(a.textContent);else{var i,l=null===(i=globalThis.SPROUT_COMPILED_STYLES)||void 0===i?void 0:i[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)}))}()}(yr,fr.appName),v.forEach((function(t){customElements.define("reactive-".concat(t.element),mr[t.element],{extends:t.element})}));var br=un(HTMLHeadingElement,yr);["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),rr(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&&er(t.prototype,e),n&&er(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(br),{extends:t})}));var gr=un(HTMLInputElement,yr,!0);customElements.define("reactive-input",gr,{extends:"input"});var wr=function(t){var e,n,r,o=new WeakMap,a=new WeakMap,i=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=Cn(this,e,[].concat(r)),o,void 0),Dn(t,a,void 0),Dn(t,i,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(a,this))))throw Error("State value for ".concat($n(a,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(i,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,Pn(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",[]),Pn(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 a=jn(cond.trim().split(CONDITIONAL_OPERATORS_REGEX),3),i=a[1],l=a[2],u={operator:i,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(i,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(a,this,t.substring(1))):(Hn(o,this,!0),Hn(a,this,t)),this.children&&this.children.length||console.warn("Conditional element doesn't have any children!"),$n(o,this)){var e=$n(a,this),n=jn(this.getState(e,!0),2),r=n[0],i=n[1];if(void 0===Mn(r))throw Error("State property ".concat(e," not defined for _condition command!"));var l=i._stateManager;l.has("conditional-element")||l.use(Ht,"conditional-element"),l.addConditionallyRenderingElements(e,this),this.generateRenderMap(),this.render(!0)}else this.render(!0)}}],r&&Nn(n.prototype,r),l&&Nn(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}(un(HTMLElement,yr));customElements.define("conditional-render",wr)})();
|
|
2
2
|
//# sourceMappingURL=sprout-core.min.js.map
|
package/sprout-core.min.js.gz
CHANGED
|
Binary file
|