sproutjs-core
Advanced tools
Comparing version
{ | ||
"name": "sproutjs-core", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"keywords": [], | ||
@@ -5,0 +5,0 @@ "author": "", |
@@ -1,2 +0,2 @@ | ||
(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,r){return n=l(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,i()?Reflect.construct(n,r||[],l(e).constructor):n.apply(e,r))}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&a(o,n.prototype),o}(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var c=["hidden","checked"],u=["hidden","value","checked"],s=["value","checked"],f=[null,"text","color","date","datetime-local","email","month","number","password","range","search","tel","time","url","week"],p=["_global","_gettingDependenciesFor","_localStateManager","_stateManager","_binding","_populate"],h="getGlobalState",d=function(t){return"State set hook, must include a dependencies array! None was found for ".concat(t)},y=[{class:HTMLAnchorElement,element:"a"},{class:HTMLAreaElement,element:"area"},{class:HTMLAudioElement,element:"audio"},{class:HTMLBaseElement,element:"base"},{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:HTMLHeadingElement,element:"h1"},{class:HTMLHeadingElement,element:"h2"},{class:HTMLHeadingElement,element:"h3"},{class:HTMLHeadingElement,element:"h4"},{class:HTMLHeadingElement,element:"h5"},{class:HTMLHeadingElement,element:"h6"},{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:HTMLOutputElement,element:"output"},{class:HTMLParagraphElement,element:"p"},{class:HTMLParamElement,element:"param"},{class:HTMLPictureElement,element:"picture"},{class:HTMLPreElement,element:"pre"},{class:HTMLProgressElement,element:"progress"},{class:HTMLQuoteElement,element:"blockquote"},{class:HTMLQuoteElement,element:"q"},{class:HTMLScriptElement,element:"script"},{class:HTMLSelectElement,element:"select"},{class:HTMLSourceElement,element:"source"},{class:HTMLSpanElement,element:"span"},{class:HTMLStyleElement,element:"style"},{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"},{class:function(t){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),r(this,n,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&&a(t,e)}(n,t),o=n,i&&e(o.prototype,i),l&&e(o,l),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,l}(o(HTMLElement)),element:"code"}],v=!1,m=document.createElement("div"),b={nodeActionsMap:new Map,eventBindingFunctions:new Map,conditionalRenders:new Map,paintRafId:null,eventBindRafId:null,conditionalRenderRafId:null},g=["=","==","!=","!==","<","<=",">",">="],w=100;function S(t){return"OL"===t.tagName||"UL"===t.tagName}var E=b.paintRafId,O=b.eventBindingFunctions,M=b.eventBindRafId,T=b.conditionalRenderRafId,A=b.conditionalRenders,P=b.nodeActionsMap;function j(t,e){O.set(t,e),O.size+1>=w||(M&&cancelAnimationFrame(M),M=requestAnimationFrame((function(){M=null,O.forEach((function(t){return t()})),O=new Map})))}function _(){P.size+1>=w||(E&&cancelAnimationFrame(E),E=requestAnimationFrame((function(){E=null,function(){var t=b.nodeActionsMap;if(t.size){var e=function(){var t=[],e=b.nodeActionsMap;return e.forEach((function(e,n){if(e.hasOwnProperty("setAttribute")){var r=e.setAttribute;"boolean"==typeof r?(n.hasOwnProperty("originalOwnerElement"),!1===r?n.originalOwnerElement.hasAttribute(n.name)&&t.push((function(){n.originalOwnerElement.removeAttributeNode(n)})):n.originalOwnerElement.hasAttribute(n.name)||t.push((function(){n.originalOwnerElement.setAttributeNode(n)}))):"string"==typeof r&&n.nodeValue!==r&&t.push((function(){return n.nodeValue=r}))}else if(e.hasOwnProperty("textContent")){var o=String(e.textContent);if(n.nodeValue===o)return;t.push((function(){return n.nodeValue=o}))}else e.replace.forEach((function(e,r){t.push((function(){return n.replaceChild(e,r)}))})),e.remove.values().forEach((function(e){e.forEach((function(e){e.parentNode&&e.parentNode===n&&t.push((function(){return n.removeChild(e)}))}))})),e.append.values().forEach((function(e){e.forEach((function(e){t.push((function(){return n.appendChild(e)}))}))}))})),t}();e.forEach((function(t){return t()})),b.nodeActionsMap=new Map}}()})))}function L(t,e){A.set(t,e),A.size>=w||(T&&cancelAnimationFrame(T),T=requestAnimationFrame((function(){T=null,A.forEach((function(t){return t()})),A=new Map})))}function k(t,e,n){t.nodeType===Node.ATTRIBUTE_NODE?e.setAttribute=n:t.nodeType===Node.TEXT_NODE&&(e.textContent=n)}function H(t,e,n){t.append.has(n)||t.append.set(n,new Set),t.append.get(n).add(e)}function x(){return{append:new Map,replace:new Map,after:new Map,remove:new Map,get hasPendingActions(){return this.append.size||this.replace.size||this.after.size||this.remove.size}}}function R(t,e){var n=this,r=b.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,{}),k(t,r.get(t),o)})),a){var c=o;a.forEach((function(t){var e=t.customElementName,n=t.parentElement,o=x(),i=-1,a=S(n);n.children.length&&Array.prototype.forEach.call(n.children,(function(t,r){var l,u=t;a&&(u=t.firstElementChild);var s,f,p,h=c[r];if(null!==(l=h)&&void 0!==l&&l.hasOwnProperty("state")&&(h=h.state),h){if(u.state!==h){var d=W(h,e,S(n)?"li":void 0);!function(t,e,n){t.replace.set(e,n)}(o,t,d)}}else f=t,(s=o).remove.has(p)||s.remove.set(p,new Set),s.remove.get(p).add(f);i=r}));for(var l=++i,u=c.length;l<u;l++){var s=c[l];if(s){var f=W(s,e,S(n)?"li":void 0);H(o,f,s)}}o.hasPendingActions&&r.set(n,o)}))}l&&l.forEach((function(t){L(n,(function(){return t.render()}))}))}function C(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 N(t){return N="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},N(t)}function I(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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return D(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)?D(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 D(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 $=b.nodeActionsMap;"undefined"==typeof HTMLElement||Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var F=function(t,e){c.includes(t)?"false"===e?this.removeAttribute(t):elementSetAttribute.call(this,t,""):elementSetAttribute.call(this,t,e)},B=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=I(this.getState(e,!0),2),i=o[0],a=o[1];if(void 0!==i&&a){if(n){var l="is_"+e+n,c=e;Object.defineProperty(a,l,{get:function(){return this[c]===n},enumerable:!1}),a._stateManager.addStateDependency(e,l),i=a[l],e=l}var u=i;this.removeAttribute(t);var s=document.createAttribute(t);s.nodeValue=u,C(s,"isStateAttribute",!0),C(s,"originalOwnerElement",this),"boolean"==typeof u&&(s.nodeValue=""),!1!==u&&this.setAttributeNode(s),a._stateManager.addStateNode(e,s,"boolean"==typeof u)}},G=function(t){var e=I(this.getState(t,!0),2),n=e[0],r=e[1];if(null!=n&&r){var o=n,i=document.createTextNode(o);C(i,"isStateAttribute",!0),this.appendChild(i),r._stateManager.addStateNode(t,i)}};function W(t,e,n){var r,o=document.createElement(e);return o.setInitialState(t),n?(r=document.createElement(n)).appendChild(o):r=o,r}function q(t,e){if(!p.includes(e)){R(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))}R(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 o=t.globalStateDependencies[e];null==o||o.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))}R(e,t),n.hasOwnProperty("on".concat(t,"Change"))&&"function"==typeof n["on".concat(t,"Change")]&&r["on".concat(t,"Change")].call(r)}))}))}$.size&&_()}}function U(t){var e=t;return"true"===t||"false"===t?e=Boolean("true"===t):isNaN(Number(t))||(e=Number(t)),e}function z(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Q(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){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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||Q(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 Q(t,e){if(t){if("string"==typeof t)return Y(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function X(t,e,n){var r=V(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"!==N(t)?{}:W(t,e,n)}))}(o,e,S(n)?"li":void 0);return n.innerHTML="",a.length&&n.append.apply(n,z(a)),i}var J={map:function(t){var e=V(t.split(":"),2),n=e[0],r=e[1],o=X(n,r,this);o&&o._stateManager.addStateMap(n,r,this)},text:function(t){var e=t;this.initialSetText(e)},bind:function(t){var e=this,n=V(t.split(":"),2),r=n[0],o=n[1];r&&o&&(!r in u||(this.bindAttributeToState(r,o),s.includes(r)&&("value"===r&&"INPUT"===this.tagName&&f.includes(this.getAttribute("type"))?this.addEventListener("input",(function(){return e.updateStateFromProperty("value")})):"checked"===r&&"INPUT"===this.tagName&&"checkbox"===this.getAttribute("type")&&this.addEventListener("change",(function(){return e.updateStateFromProperty("checked")})))))},condition:function(t){var e=this;if("SLOT"!==this.tagName)throw Error("_condition command can only be used on a slot element!");if(!this.children||!this.children.length)throw Error("Conditional rendering slot (a reactive-slot with a _condition command) must have children! For slot: ",this);var n=t,r=V(this.getState(n,!0),2),o=r[0],i=r[1];if(void 0===o)throw Error("State property ".concat(n," not defined for _condition command!"));var a=this.host,l=z(this.children),c=[];l.forEach((function(t){var e=t.getAttribute("_if");if(e){t.host=a,t.conditionalSlotChild=!0,t.querySelectorAll("*").forEach((function(t){t.host=a}));var n=U(e);o===n&&c.push(t)}})),requestAnimationFrame((function(){a.append.apply(a,z(l)),c.length&&e.assign.apply(e,c)})),i._stateManager.addConditionallyRenderingElements(n,this)}};function K(t){return function(t){if(Array.isArray(t))return Z(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 Z(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)?Z(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 Z(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 tt(t){return tt="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},tt(t)}function et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ct(r.key),r)}}function nt(t,e){if(e&&("object"==tt(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 rt(){return rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=lt(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}},rt.apply(null,arguments)}function ot(t){var e="function"==typeof Map?new Map:void 0;return ot=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(it())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&at(o,n.prototype),o}(t,arguments,lt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),at(n,t)},ot(t)}function it(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(it=function(){return!!t})()}function at(t,e){return at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},at(t,e)}function lt(t){return lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lt(t)}function ct(t){var e=function(t,e){if("object"!=tt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tt(e)?e:e+""}var ut=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;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!Array.isArray(t))throw Error("Argument for StateFulArray constructor must be an array!");var l,c,u,s,f=t;return i||(l=f.map((function(t,e){return null!=t&&t.hasOwnProperty("state")||Array.isArray(t)?t:"object"===tt(t)?new bt(t,r,n._stateManager,!1,a):t}))),c=this,u=e,s=K(l),u=lt(u),function(t,e,n){(e=ct(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(o=nt(c,it()?Reflect.construct(u,s||[],lt(c).constructor):u.apply(c,s)),"dependencyProps",new Map),o.parentStateObject=n,o.arrayStateProp=r,o.rawArray=f,nt(o,l=new Proxy(o,pt(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&&at(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=rt(lt(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=rt(lt(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=rt(lt(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=rt(lt(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(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=rt(lt(e.prototype),"reverse",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(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=rt(lt(e.prototype),"fill",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(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=rt(lt(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(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=rt(lt(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&&et(n.prototype,r),o&&et(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(ot(Array));const st=ut;function ft(t){return ft="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},ft(t)}var pt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return{set:function(r,o,i){if("length"===o){var a=Reflect.set(r,o,i);return q(t,e),a}if(r[o]===i)return!0;var l=Number(o);if(!isNaN(l)&&("object"!==ft(i)||i.hasOwnProperty("_stateManager")||i.hasOwnProperty("state")||(i=new bt(i,e,t,!1,n)),i.hasOwnProperty("_stateManager")&&(i=i._stateManager),!r.hasOwnProperty("$$operation"))){var c=!1;l<r.length&&(c=!0);var u=Reflect.set(r,o,i);return c&&q(t,e),u}return Reflect.set(r,o,i)},get:function(t,e,n){if("symbol"===ft(e))return Reflect.get.apply(Reflect,arguments);if("hasOwnProperty"===e)return Reflect.get.apply(Reflect,arguments);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)}}};function ht(t){return ht="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},ht(t)}function dt(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,vt(r.key),r)}}function yt(t,e,n){return(e=vt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vt(t){var e=function(t,e){if("object"!=ht(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ht(e)?e:e+""}var mt=function(){return t=function t(e,n,r){var o=this,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,t),yt(this,"privateState",{}),yt(this,"state",{}),yt(this,"stateArrayMaps",{}),yt(this,"stateDependencies",{}),yt(this,"conditionallyRenderingElements",{}),yt(this,"stateNodes",{}),yt(this,"parentStateProp",void 0),yt(this,"parentStateManager",void 0),this.parentStateProp=n,this.parentStateManager=r,C(this.state,"_stateManager",this,!0),this.state=new Proxy(this.state,function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return{defineProperty:function(n,r,o){var i;if(p.includes(r)||null!==(i=n)&&void 0!==i&&i._binding)return Reflect.defineProperty.apply(Reflect,arguments);var a,l=n,c=new Set;if(n=new Proxy(n,{get:function(t,e,n){return"_global"===e&&(t._global._gettingDependenciesFor=r,t._global._localStateManager=t._stateManager),p.includes(e)||(Array.isArray(t[e])&&(t[e]._gettingDependenciesFor=r),c.add(e)),Reflect.get.apply(Reflect,arguments)}}),void 0!==(null==o?void 0:o.value)){var u,s=o.value;if(Array.isArray(s))if(0===r.indexOf("set_")){if(!(null==s?void 0:s[1]))throw Error(d(r));if(null==s||s[1].forEach((function(t){c.add(t)})),!0===(null==s?void 0:s[2])){a=r.substring(4);var f=null==s?void 0:s[0];f&&"function"==typeof f&&(t[a]=f.call(t))}else null!=s&&s[3]&&(t[a]=s[3])}else null!=s&&null!==(u=s[0])&&void 0!==u&&u._stateManager||(o.value=new st(o.value,t,r,!1,e))}else"function"==typeof(null==o?void 0:o.get)&&o.get.call(n);c.size&&c.forEach((function(e){return t._stateManager.addStateDependency(e,r)}));var h=Reflect.defineProperty(l,r,o),y=t._stateManager;return a&&(r=a),l.hasOwnProperty("_populate")||q(y,r),h},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)}}}(this.state,a)),i?(this.globalStateDependencies={},this.addGlobalStateDependency=function(t,e,n){o.globalStateDependencies.hasOwnProperty(t)||(o.globalStateDependencies[t]=new Map),o.globalStateDependencies[t].has(n)||o.globalStateDependencies[t].set(n,new Set),o.globalStateDependencies[t].get(n).add(e)}):C(this.state,"_global",a[h](),!0),e&&function(t,e){t._populate=!0;var n,r=Object.getOwnPropertyDescriptors(e);for(var o in r)if(p.includes(o))delete r[o];else if((n=r[o]).hasOwnProperty("get")&&"function"==typeof n.get&&n.get.bind(t),n.hasOwnProperty("value")){var i=n.value;if("function"==typeof i)n.value.bind(t);else if(Array.isArray(i)&&0===o.indexOf("set_")){var a=null==i?void 0:i[0];a&&"function"==typeof a&&a.bind(t)}}Object.defineProperties(t,r),delete t._populate}(this.state,e)},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]=[]),this.stateArrayMaps[t].push({customElementName:e,parentElement:n})}},{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=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.state;if(0!==t.indexOf("!")){var r=Object.getOwnPropertyDescriptor(n,t);if(!(r||(n=n._global,r=Object.getOwnPropertyDescriptor(n,t))))throw Error("Could not bind state prop ".concat(t,". State prop not defined!"));var o=r.hasOwnProperty("value"),i=n._stateManager;if(o&&(i.privateState.hasOwnProperty(t)||(i.privateState[t]=n[t]),n._binding=!0,Object.defineProperty(n,t,{set:function(e){e!==i.privateState[t]&&(i.privateState[t]=e,q(i,t),i.parentStateManager&&q(i.parentStateManager,i.parentStateProp))},get:function(){return i.privateState[t]}})),e&&0!==t.indexOf("!")){var a="!".concat(t);o?i.privateState.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.privateState[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a)):i.state.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.state[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a))}delete this.state._binding}else{var l=t.substring(1),c=Object.getOwnPropertyDescriptor(n,l);if(!(c||(n=n._global,c=Object.getOwnPropertyDescriptor(n,l))))throw Error("Could not bind state prop ".concat(t,". State prop ").concat(l," not defined!"))}}}],e&&dt(t.prototype,e),n&&dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const bt=mt;function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function wt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Et(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 St(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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||Et(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 Et(t,e){if(t){if("string"==typeof t)return Ot(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)?Ot(t,e):void 0}}function Ot(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,Ht(r.key),r)}}function Tt(t,e,n){return e=Pt(e),function(t,e){if(e&&("object"==gt(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,At()?Reflect.construct(e,n||[],Pt(t).constructor):e.apply(t,n))}function At(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(At=function(){return!!t})()}function Pt(t){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pt(t)}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function _t(t,e,n){Lt(t,e),e.set(t,n)}function Lt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kt(t,e,n){return(e=Ht(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ht(t){var e=function(t,e){if("object"!=gt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gt(e)?e:e+""}function xt(t,e){return t.get(Ct(t,e))}function Rt(t,e,n){return t.set(Ct(t,e),n),n}function Ct(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 Nt(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 WeakMap,i=new WeakMap,a=new WeakMap,l=new WeakMap,s=new WeakMap,f=new WeakMap,p=new WeakMap,d=new WeakMap,y=new WeakMap,v=new WeakSet,b=function(t){function c(){var t,e,n,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,h=arguments.length>1?arguments[1]:void 0,b=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,c),t=Tt(this,c),Lt(e=t,n=v),n.add(e),kt(t,"host",null),_t(t,r,void 0),kt(t,"_onRender",void 0),_t(t,o,!1),_t(t,i,{}),_t(t,a,void 0),_t(t,l,void 0),_t(t,s,void 0),_t(t,f,void 0),_t(t,p,[]),_t(t,d,void 0),_t(t,y,void 0),t.isReactiveElement=!0,t.isSpecialElement="CONDITIONAL-ELEMENT"===t.tagName,t.isNativeElement=t.hasAttribute("is")&&!t.isSpecialElement,!t.isNativeElement){if(h){var S=new Function(h.textContent)();Ct(v,t,g).call(t,S)}if(Rt(a,t,u?u.cloneNode(!0):m.cloneNode()),b){var E=new CSSStyleSheet;E.replaceSync(b),Rt(l,t,E)}w&&Rt(s,t,w),t.ref={}}return 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&&jt(t,e)}(c,t),u=c,b=[{key:"setInitialState",value:function(t){this.initialState?Object.assign(this.initialState,t):this.initialState=t}},{key:"bindAttributeToState",value:function(t,e){xt(i,this)[t]=e}},{key:"unbindAttributeToState",value:function(t){delete xt(i,this)[t]}},{key:"updateStateFromProperty",value:function(t){var e=this[t],n=xt(i,this)[t],r=St(this.getState(n,!0),2),o=r[0],a=r[1];o!==e&&(a[n]=e)}},{key:"resolveTextContentTemplateStringTag",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.reduce((function(t,n,o){var i,a=!!r[o]&&r[o].replaceAll(/\s/g,"");return t+n+(a?null===(i=e.host)||void 0===i?void 0:i.getAttribute(a):"")}),"")}},{key:"disconnectedCallback",value:function(){var t,e=null!==(t=this.host)&&void 0!==t?t:this;if(e.ref){var n=this.getAttribute("ref");n&&delete e.ref[n]}Rt(i,this,{}),Ct(v,this,E).call(this)}},{key:"connectedCallback",value:function(){var t=this;if(!xt(o,this)){if(this.host=this.getRootNode().host,!this.isNativeElement){var i,a,l=wt(this.getAttributeNames());try{for(l.s();!(a=l.n()).done;){var c,u=a.value;0===(i=this.getAttribute(u)).indexOf("@")&&(null!==(c=this.initialState)&&void 0!==c||(this.initialState={}),this.initialState[u]=U(i.substring(1)))}}catch(t){l.e(t)}finally{l.f()}Ct(v,this,w).call(this)}"INPUT"===(null==this?void 0:this.tagName)&&(Rt(y,this,(function(){var t=new Event("inputChange",{bubbles:!0,composed:!0});this.dispatchEvent(t)})),this.addEventListener("change",xt(y,this),!1)),this.isNativeElement||n||Ct(v,this,S).call(this);var s,f=[],p=wt(this.getAttributeNames());try{for(p.s();!(s=p.n()).done;){var d=s.value,m=this.getAttribute(d);if(this.initialSetAttribute(d,m),0===d.indexOf("_")){var b=d.substring(1);f.push({command:b,args:m})}}}catch(t){p.e(t)}finally{p.f()}f.forEach((function(e){var n,r=e.command,o=e.args;null===(n=J[r])||void 0===n||n.call(t,o)})),this.isNativeElement?-1!==this.textContent.indexOf("${")&&(this.textContent=Ct(v,this,T).call(this)):(j(this,(function(){return Ct(v,t,O).call(t)})),xt(r,this)&&queueMicrotask((function(){return xt(r,t).call(t,e[h]())})),this._onRender&&this._onRender.call(this)),Rt(o,this,!0)}}},{key:"attributeChangedCallback",value:function(t,e,n){if(e!==n&&this.isConnected){if("ref"===t){var r=n;(this.isNativeElement?this.host:this).ref[r]=this}t in xt(i,this)&&Ct(v,this,M).call(this,t)}}},{key:"getState",value:function(t){var n,r,o,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.isNativeElement&&this.host?this.host:this;a&&a.state&&(r=null===(o=a.state)||void 0===o?void 0:o[t]);for(var l,c=!1;void 0===r&&void 0!==a.host&&null!==a.host;){var u;r=null===(u=(a=a.host).state)||void 0===u?void 0:u[t]}return void 0!==r?n=a.state:void 0!==(r=null===(l=c=e[h]())||void 0===l?void 0:l[t])&&(n=c),i?[r,n]:r}},{key:"findElement",value:function(t){var n=this.isNativeElement?this.host:this,r=n;return e.SPROUT_CONFIG.useShadow&&(r=n.shadowRoot),n.ref.hasOwnProperty(t)?n.ref[t]:r.querySelector('[ref="'.concat(t,'"]'))}}],b&&Mt(u.prototype,b),A&&Mt(u,A),Object.defineProperty(u,"prototype",{writable:!1}),u;var u,b,A}(t);function g(t){var e=this;t.events&&(Rt(f,this,t.events),this.isConnected&&j(this,(function(){return Ct(v,e,O).call(e)}))),t.state&&(this.setInitialState(t.state),this.isConnected&&Ct(v,this,w).call(this)),t.onMount&&Rt(r,this,t.onMount)}function w(){if(this.initialState){var t=this.initialState;t._stateManager?this.state=t._stateManager.state:this.state=new bt(t,void 0,void 0,!1,e).state,delete this.initialState}}function S(){if(e.SPROUT_CONFIG.useShadow){var t=this.attachShadow({mode:"open"});this.shadowRoot.adoptedStyleSheets=[],xt(s,this)&&this.shadowRoot.adoptedStyleSheets.push(xt(s,this)),xt(l,this)&&this.shadowRoot.adoptedStyleSheets.push(xt(l,this)),t.appendChild(xt(a,this))}else{var n=new DocumentFragment;n.appendChild(xt(a,this)),this.appendChild(n)}}function E(){var t=this;if(xt(y,this)&&this.removeEventListener("change",xt(y,this)),xt(p,this).length){var e=this;xt(p,this).forEach((function(n){e.removeEventListener(n,xt(d,t),!1)}))}}function O(){var t,n=this;if(xt(f,this)){var r=Object.keys(xt(f,this)),o={},i={};r.forEach((function(t){var e=xt(f,n)[t];if("function"==typeof e)o[t]=e;else if("object"===gt(e)){Object.keys(e).forEach((function(n){"click"===n?o[t]=e[n]:(i[n]||(i[n]={}),i[n][t]=e[n])}))}}));var a=e[h]();Rt(d,this,(function(t,e){var n,r=t.composedPath();if(n=r?r.find((function(t){return t.hasAttribute&&t.hasAttribute("ref")&&t.getAttribute("ref")in e})):t.target.hasAttribute&&t.target.hasAttribute("ref")&&t.target.getAttribute("ref")in e?t.target:null){var o,i=n.getAttribute("ref");null===(o=e[i])||void 0===o||o.call(n,t,t.target,a)}}));var l=this;Object.keys(o).length&&(l.addEventListener("click",(function(t){xt(d,n).call(n,t,o)}),!1),xt(p,this).push("click"));for(var c=Object.keys(i),u=function(){var t=y[s];l.addEventListener(t,(function(e){xt(d,n).call(n,e,i[t])}),!1)},s=0,y=c;s<y.length;s++)u();(t=xt(p,this)).push.apply(t,c)}}function M(t){var e=this.getAttribute(t);c.includes(t)&&(e=null!==e);var n=xt(i,this)[t],r=St(this.getState(n,!0),2),o=r[0],a=r[1];o!==e&&(a[n]=e)}function T(){return new Function("return this.resolveTextContentTemplateStringTag`"+this.textContent+"`;").bind(this)()}return kt(b,"observedAttributes",["ref"].concat(u).concat(Object.keys(J).map((function(t){return"_"+t.toLowerCase()})))),b.prototype.initialSetText=function(t){G.call(this,t)},b.prototype.initialSetAttribute=function(t,e){var n=e=String(e);if(0===e.indexOf("@")&&this.host&&this.isConnected&&(n=this.host.getAttribute(e.substring(1))),0===e.indexOf("$")&&this.isConnected){var r=e.substring(1);B.call(this,t,r)}else F.call(this,t,n)},b}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",c=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),l=new L(r||[]);return o(a,"_invoke",{value:A(t,n,l)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(k([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=m.prototype=Object.create(w);function M(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(o,i,a,l){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,s=u.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){u.value=t,a(u)}),(function(t){return n("throw",t,a,l)}))}l(c.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 A(e,n,r){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var c=P(l,r);if(c){if(c===v)continue;return c}}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 u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function P(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,P(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 j(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(j,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 b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,c,"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,u(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},M(T.prototype),u(T.prototype,l,(function(){return this})),e.AsyncIterator=T,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new T(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},M(O),u(O,c,"Generator"),u(O,a,(function(){return this})),u(O,"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 c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)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 Gt(t,e,n){return e=qt(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,Wt()?Reflect.construct(e,n||[],qt(t).constructor):e.apply(t,n))}function Wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wt=function(){return!!t})()}function qt(t){return qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qt(t)}function Ut(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),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).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),Gt(this,e,[i,l,null==a?void 0:a.textContent,o])}return Ut(e,t),n=e,r&&$t(n.prototype,r),c&&$t(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c}(t.ReactiveElement));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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)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"!=ue(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ue(e)?e:e+""}function ee(t,e,n){return e=re(e),function(t,e){if(e&&("object"==ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,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(ce(t,e),n),n}function le(t,e){return t.get(ce(t,e))}function ce(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 ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function 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,r=this,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(void 0===(t=0===le(e,this).indexOf("@")?this.host.getAttribute(le(e,this).substring(1)):this.getState(le(e,this))))throw Error("State value for ".concat(le(e,this)," not found while rendering conditional-render element:"),this);var i=[];le(n,this).forEach((function(e,n){(function(t,e){return"string"!==ue(t)?e===t:"always"===t||(g.includes(t[0])?new Function("return ".concat(e).concat(t))():e===t)})(n,t)&&i.push.apply(i,Xt(e))})),o?(this.innerHTML="",this.append.apply(this,i)):i.length&&L(this,(function(){r.innerHTML="",r.append.apply(r,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");if(!this.children||!this.children.length)throw Error("Conditional element must have children!");var o=t;ae(e,this,o);var i,a,l=0===le(e,this).indexOf("@");if(!l){var c=Yt(this.getState(o,!0),2);if(i=c[0],a=c[1],void 0===i)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=t.getAttribute("_if");if(e){var n=U(e);u.has(n)||u.set(n,[]),u.get(n).push(t)}else u.get("always").push(t)})),ae(n,this,u),l||a._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}var fe=document.currentScript.hasAttribute("allowappscopeaccess");globalThis.SproutInitApp=function(t){var e,n=(window,{window,document:null===(e=window)||void 0===e?void 0:e.document}),r={useShadow:!0,allowAppScopeAccess:fe};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;C(Object.prototype,"hasOwnProperty",o),n[h]=function(){return{}},n.setGlobalState=function(){var t=new bt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},void 0,void 0,!0,n).state,e="SproutGlobalState";Object.defineProperty(n,e,{value:t,writable:!1,configurable:!1}),Object.defineProperty(n,h,{value:function(){return n[e]}})},n.ReactiveElement=Nt(HTMLElement,n),y.forEach((function(t){return customElements.define("reactive-".concat(t.element),Nt(t.class,n,!0),{extends:t.element})}));var i=se(Nt(HTMLElement,n,!0));return customElements.define("conditional-render",i),function(){Qt(n,t)}.bind(n)}})(); | ||
(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,r){return n=l(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,i()?Reflect.construct(n,r||[],l(e).constructor):n.apply(e,r))}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&a(o,n.prototype),o}(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var c=["hidden","checked"],u=["hidden","value","checked"],s=["value","checked"],f=[null,"text","color","date","datetime-local","email","month","number","password","range","search","tel","time","url","week"],p=["_global","_gettingDependenciesFor","_localStateManager","_stateManager","_binding","_populate"],h="getGlobalState",y=function(t){return"State set hook, must include a dependencies array! None was found for ".concat(t)},d=[{class:HTMLAnchorElement,element:"a"},{class:HTMLAreaElement,element:"area"},{class:HTMLAudioElement,element:"audio"},{class:HTMLBaseElement,element:"base"},{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:HTMLHeadingElement,element:"h1"},{class:HTMLHeadingElement,element:"h2"},{class:HTMLHeadingElement,element:"h3"},{class:HTMLHeadingElement,element:"h4"},{class:HTMLHeadingElement,element:"h5"},{class:HTMLHeadingElement,element:"h6"},{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:HTMLOutputElement,element:"output"},{class:HTMLParagraphElement,element:"p"},{class:HTMLParamElement,element:"param"},{class:HTMLPictureElement,element:"picture"},{class:HTMLPreElement,element:"pre"},{class:HTMLProgressElement,element:"progress"},{class:HTMLQuoteElement,element:"blockquote"},{class:HTMLQuoteElement,element:"q"},{class:HTMLScriptElement,element:"script"},{class:HTMLSelectElement,element:"select"},{class:HTMLSourceElement,element:"source"},{class:HTMLSpanElement,element:"span"},{class:HTMLStyleElement,element:"style"},{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"},{class:function(t){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),r(this,n,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&&a(t,e)}(n,t),o=n,i&&e(o.prototype,i),l&&e(o,l),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,l}(o(HTMLElement)),element:"code"}],v=!1,m=document.createElement("div"),b={nodeActionsMap:new Map,eventBindingFunctions:new Map,conditionalRenders:new Map,paintRafId:null,eventBindRafId:null,conditionalRenderRafId:null},g=["=","==","!=","!==","<","<=",">",">="],w=100;function S(t){return"OL"===t.tagName||"UL"===t.tagName}var E=b.paintRafId,O=b.eventBindingFunctions,A=b.eventBindRafId,M=b.conditionalRenderRafId,T=b.conditionalRenders,P=b.nodeActionsMap;function j(t,e){O.set(t,e),O.size+1>=w||(A&&cancelAnimationFrame(A),A=requestAnimationFrame((function(){A=null,O.forEach((function(t){return t()})),O=new Map})))}function _(){P.size+1>=w||(E&&cancelAnimationFrame(E),E=requestAnimationFrame((function(){E=null,function(){var t=b.nodeActionsMap;if(t.size){var e=function(){var t=[],e=b.nodeActionsMap;return e.forEach((function(e,n){if(e.hasOwnProperty("setAttribute")){var r=e.setAttribute;"boolean"==typeof r?(n.hasOwnProperty("originalOwnerElement"),!1===r?n.originalOwnerElement.hasAttribute(n.name)&&t.push((function(){n.originalOwnerElement.removeAttributeNode(n)})):n.originalOwnerElement.hasAttribute(n.name)||t.push((function(){n.originalOwnerElement.setAttributeNode(n)}))):"string"==typeof r&&n.nodeValue!==r&&t.push((function(){return n.nodeValue=r}))}else if(e.hasOwnProperty("textContent")){var o=String(e.textContent);if(n.nodeValue===o)return;t.push((function(){return n.nodeValue=o}))}else{e.replace.forEach((function(e,r){t.push((function(){return n.replaceChild(e,r)}))}));var i,a=k(e.remove.values());try{for(a.s();!(i=a.n()).done;){var l,c=k(i.value);try{var u=function(){var e=l.value;e.parentNode&&e.parentNode===n&&t.push((function(){return n.removeChild(e)}))};for(c.s();!(l=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}var s,f=k(e.append.values());try{for(f.s();!(s=f.n()).done;){var p,h=k(s.value);try{var y=function(){var e=p.value;t.push((function(){return n.appendChild(e)}))};for(h.s();!(p=h.n()).done;)y()}catch(t){h.e(t)}finally{h.f()}}}catch(t){f.e(t)}finally{f.f()}}})),t}();e.forEach((function(t){return t()})),b.nodeActionsMap=new Map}}()})))}function L(t,e){T.set(t,e),T.size>=w||(M&&cancelAnimationFrame(M),M=requestAnimationFrame((function(){M=null,T.forEach((function(t){return t()})),T=new Map})))}function k(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=x(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 x(t,e){if(t){if("string"==typeof t)return H(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)?H(t,e):void 0}}function H(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 R(t,e,n){t.nodeType===Node.ATTRIBUTE_NODE?e.setAttribute=n:t.nodeType===Node.TEXT_NODE&&(e.textContent=n)}function C(t,e,n){t.append.has(n)||t.append.set(n,new Set),t.append.get(n).add(e)}function N(){return{append:new Map,replace:new Map,after:new Map,remove:new Map,get hasPendingActions(){return this.append.size||this.replace.size||this.after.size||this.remove.size}}}function I(t,e){var n=this,r=b.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,{}),R(t,r.get(t),o)})),a){var c=o;a.forEach((function(t){var e=t.customElementName,n=t.parentElement,o=N(),i=-1,a=S(n);n.children.length&&Array.prototype.forEach.call(n.children,(function(t,r){var l,u=t;a&&(u=t.firstElementChild);var s,f,p,h=c[r];if(null!==(l=h)&&void 0!==l&&l.hasOwnProperty("state")&&(h=h.state),h){if(u.state!==h){var y=z(h,e,S(n)?"li":void 0);!function(t,e,n){t.replace.set(e,n)}(o,t,y)}}else f=t,(s=o).remove.has(p)||s.remove.set(p,new Set),s.remove.get(p).add(f);i=r}));for(var l=++i,u=c.length;l<u;l++){var s=c[l];if(s){var f=z(s,e,S(n)?"li":void 0);C(o,f,s)}}o.hasPendingActions&&r.set(n,o)}))}l&&l.forEach((function(t){L(n,(function(){return t.render()}))}))}function D(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 $(t){return $="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)}function F(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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(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}}(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 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}var G=b.nodeActionsMap;"undefined"==typeof HTMLElement||Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var W=function(t,e){c.includes(t)?"false"===e?this.removeAttribute(t):elementSetAttribute.call(this,t,""):elementSetAttribute.call(this,t,e)},q=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=F(this.getState(e,!0),2),i=o[0],a=o[1];if(void 0!==i&&a){if(n){var l="is_"+e+n,c=e;Object.defineProperty(a,l,{get:function(){return this[c]===n},enumerable:!1}),a._stateManager.addStateDependency(e,l),i=a[l],e=l}var u=i;this.removeAttribute(t);var s=document.createAttribute(t);s.nodeValue=u,D(s,"isStateAttribute",!0),D(s,"originalOwnerElement",this),"boolean"==typeof u&&(s.nodeValue=""),!1!==u&&this.setAttributeNode(s),a._stateManager.addStateNode(e,s,"boolean"==typeof u)}},U=function(t){var e=F(this.getState(t,!0),2),n=e[0],r=e[1];if(null!=n&&r){var o=n,i=document.createTextNode(o);D(i,"isStateAttribute",!0),this.appendChild(i),r._stateManager.addStateNode(t,i)}};function z(t,e,n){var r,o=document.createElement(e);return o.setInitialState(t),n?(r=document.createElement(n)).appendChild(o):r=o,r}function V(t,e){if(!p.includes(e)){I(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))}I(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 o=t.globalStateDependencies[e];null==o||o.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))}I(e,t),n.hasOwnProperty("on".concat(t,"Change"))&&"function"==typeof n["on".concat(t,"Change")]&&r["on".concat(t,"Change")].call(r)}))}))}G.size&&_()}}function Q(t){var e=t;return"true"===t||"false"===t?e=Boolean("true"===t):isNaN(Number(t))||(e=Number(t)),e}function Y(t){return function(t){if(Array.isArray(t))return K(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||J(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 X(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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||J(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 J(t,e){if(t){if("string"==typeof t)return K(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)?K(t,e):void 0}}function K(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 Z(t,e,n){var r=X(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"!==$(t)?{}:z(t,e,n)}))}(o,e,S(n)?"li":void 0);return n.innerHTML="",a.length&&n.append.apply(n,Y(a)),i}var tt={map:function(t){var e=X(t.split(":"),2),n=e[0],r=e[1],o=Z(n,r,this);o&&o._stateManager.addStateMap(n,r,this)},text:function(t){var e=t;this.initialSetText(e)},bind:function(t){var e=this,n=X(t.split(":"),2),r=n[0],o=n[1];r&&o&&(!r in u||(this.bindAttributeToState(r,o),s.includes(r)&&("value"===r&&"INPUT"===this.tagName&&f.includes(this.getAttribute("type"))?this.addEventListener("input",(function(){return e.updateStateFromProperty("value")})):"checked"===r&&"INPUT"===this.tagName&&"checkbox"===this.getAttribute("type")&&this.addEventListener("change",(function(){return e.updateStateFromProperty("checked")})))))},condition:function(t){var e=this;if("SLOT"!==this.tagName)throw Error("_condition command can only be used on a slot element!");if(!this.children||!this.children.length)throw Error("Conditional rendering slot (a reactive-slot with a _condition command) must have children! For slot: ",this);var n=t,r=X(this.getState(n,!0),2),o=r[0],i=r[1];if(void 0===o)throw Error("State property ".concat(n," not defined for _condition command!"));var a=this.host,l=Y(this.children),c=[];l.forEach((function(t){var e=t.getAttribute("_if");if(e){t.host=a,t.conditionalSlotChild=!0,t.querySelectorAll("*").forEach((function(t){t.host=a}));var n=Q(e);o===n&&c.push(t)}})),requestAnimationFrame((function(){a.append.apply(a,Y(l)),c.length&&e.assign.apply(e,c)})),i._stateManager.addConditionallyRenderingElements(n,this)}};function et(t){return function(t){if(Array.isArray(t))return nt(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 nt(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)?nt(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 nt(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 rt(t){return rt="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},rt(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,ft(r.key),r)}}function it(t,e){if(e&&("object"==rt(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=st(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 lt(t){var e="function"==typeof Map?new Map:void 0;return lt=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(ct())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&ut(o,n.prototype),o}(t,arguments,st(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ut(n,t)},lt(t)}function ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ct=function(){return!!t})()}function ut(t,e){return ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ut(t,e)}function st(t){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},st(t)}function ft(t){var e=function(t,e){if("object"!=rt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rt(e)?e:e+""}var pt=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;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!Array.isArray(t))throw Error("Argument for StateFulArray constructor must be an array!");var l,c,u,s,f=t;return i||(l=f.map((function(t,e){return null!=t&&t.hasOwnProperty("state")||Array.isArray(t)?t:"object"===rt(t)?new St(t,r,n._stateManager,!1,a):t}))),c=this,u=e,s=et(l),u=st(u),function(t,e,n){(e=ft(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(o=it(c,ct()?Reflect.construct(u,s||[],st(c).constructor):u.apply(c,s)),"dependencyProps",new Map),o.parentStateObject=n,o.arrayStateProp=r,o.rawArray=f,it(o,l=new Proxy(o,dt(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&&ut(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=at(st(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=at(st(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=at(st(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=at(st(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,V(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=at(st(e.prototype),"reverse",this)).call.apply(t,[this].concat(r));return delete this.$$operation,V(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=at(st(e.prototype),"fill",this)).call.apply(t,[this].concat(r));return delete this.$$operation,V(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=at(st(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,V(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=at(st(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&&ot(n.prototype,r),o&&ot(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(lt(Array));const ht=pt;function yt(t){return yt="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},yt(t)}var dt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return{set:function(r,o,i){if("length"===o){var a=Reflect.set(r,o,i);return V(t,e),a}if(r[o]===i)return!0;var l=Number(o);if(!isNaN(l)&&("object"!==yt(i)||i.hasOwnProperty("_stateManager")||i.hasOwnProperty("state")||(i=new St(i,e,t,!1,n)),i.hasOwnProperty("_stateManager")&&(i=i._stateManager),!r.hasOwnProperty("$$operation"))){var c=!1;l<r.length&&(c=!0);var u=Reflect.set(r,o,i);return c&&V(t,e),u}return Reflect.set(r,o,i)},get:function(t,e,n){if("symbol"===yt(e))return Reflect.get.apply(Reflect,arguments);if("hasOwnProperty"===e)return Reflect.get.apply(Reflect,arguments);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)}}};function vt(t){return vt="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},vt(t)}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,gt(r.key),r)}}function bt(t,e,n){return(e=gt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gt(t){var e=function(t,e){if("object"!=vt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vt(e)?e:e+""}var wt=function(){return t=function t(e,n,r){var o=this,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,t),bt(this,"privateState",{}),bt(this,"state",{}),bt(this,"stateArrayMaps",{}),bt(this,"stateDependencies",{}),bt(this,"conditionallyRenderingElements",{}),bt(this,"stateNodes",{}),bt(this,"parentStateProp",void 0),bt(this,"parentStateManager",void 0),this.parentStateProp=n,this.parentStateManager=r,D(this.state,"_stateManager",this,!0),this.state=new Proxy(this.state,function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return{defineProperty:function(n,r,o){var i;if(p.includes(r)||null!==(i=n)&&void 0!==i&&i._binding)return Reflect.defineProperty.apply(Reflect,arguments);var a,l=n,c=new Set;if(n=new Proxy(n,{get:function(t,e,n){return"_global"===e&&(t._global._gettingDependenciesFor=r,t._global._localStateManager=t._stateManager),p.includes(e)||(Array.isArray(t[e])&&(t[e]._gettingDependenciesFor=r),c.add(e)),Reflect.get.apply(Reflect,arguments)}}),void 0!==(null==o?void 0:o.value)){var u,s=o.value;if(Array.isArray(s))if(0===r.indexOf("set_")){if(!(null==s?void 0:s[1]))throw Error(y(r));if(null==s||s[1].forEach((function(t){c.add(t)})),!0===(null==s?void 0:s[2])){a=r.substring(4);var f=null==s?void 0:s[0];f&&"function"==typeof f&&(t[a]=f.call(t))}else null!=s&&s[3]&&(t[a]=s[3])}else null!=s&&null!==(u=s[0])&&void 0!==u&&u._stateManager||(o.value=new ht(o.value,t,r,!1,e))}else"function"==typeof(null==o?void 0:o.get)&&o.get.call(n);c.size&&c.forEach((function(e){return t._stateManager.addStateDependency(e,r)}));var h=Reflect.defineProperty(l,r,o),d=t._stateManager;return a&&(r=a),l.hasOwnProperty("_populate")||V(d,r),h},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)}}}(this.state,a)),i?(this.globalStateDependencies={},this.addGlobalStateDependency=function(t,e,n){o.globalStateDependencies.hasOwnProperty(t)||(o.globalStateDependencies[t]=new Map),o.globalStateDependencies[t].has(n)||o.globalStateDependencies[t].set(n,new Set),o.globalStateDependencies[t].get(n).add(e)}):D(this.state,"_global",a[h](),!0),e&&function(t,e){t._populate=!0;var n,r=Object.getOwnPropertyDescriptors(e);for(var o in r)if(p.includes(o))delete r[o];else if((n=r[o]).hasOwnProperty("get")&&"function"==typeof n.get&&n.get.bind(t),n.hasOwnProperty("value")){var i=n.value;if("function"==typeof i)n.value.bind(t);else if(Array.isArray(i)&&0===o.indexOf("set_")){var a=null==i?void 0:i[0];a&&"function"==typeof a&&a.bind(t)}}Object.defineProperties(t,r),delete t._populate}(this.state,e)},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]=[]),this.stateArrayMaps[t].push({customElementName:e,parentElement:n})}},{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=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.state;if(0!==t.indexOf("!")){var r=Object.getOwnPropertyDescriptor(n,t);if(!(r||(n=n._global,r=Object.getOwnPropertyDescriptor(n,t))))throw Error("Could not bind state prop ".concat(t,". State prop not defined!"));var o=r.hasOwnProperty("value"),i=n._stateManager;if(o&&(i.privateState.hasOwnProperty(t)||(i.privateState[t]=n[t]),n._binding=!0,Object.defineProperty(n,t,{set:function(e){e!==i.privateState[t]&&(i.privateState[t]=e,V(i,t),i.parentStateManager&&V(i.parentStateManager,i.parentStateProp))},get:function(){return i.privateState[t]}})),e&&0!==t.indexOf("!")){var a="!".concat(t);o?i.privateState.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.privateState[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a)):i.state.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.state[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a))}delete this.state._binding}else{var l=t.substring(1),c=Object.getOwnPropertyDescriptor(n,l);if(!(c||(n=n._global,c=Object.getOwnPropertyDescriptor(n,l))))throw Error("Could not bind state prop ".concat(t,". State prop ").concat(l," not defined!"))}}}],e&&mt(t.prototype,e),n&&mt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const St=wt;function Et(t){return Et="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},Et(t)}function Ot(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Mt(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 At(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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||Mt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(t,e){if(t){if("string"==typeof t)return Tt(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)?Tt(t,e):void 0}}function Tt(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 Pt(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,Ct(r.key),r)}}function jt(t,e,n){return e=Lt(e),function(t,e){if(e&&("object"==Et(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,_t()?Reflect.construct(e,n||[],Lt(t).constructor):e.apply(t,n))}function _t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_t=function(){return!!t})()}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function kt(t,e){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kt(t,e)}function xt(t,e,n){Ht(t,e),e.set(t,n)}function Ht(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rt(t,e,n){return(e=Ct(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ct(t){var e=function(t,e){if("object"!=Et(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Et(e)?e:e+""}function Nt(t,e){return t.get(Dt(t,e))}function It(t,e,n){return t.set(Dt(t,e),n),n}function Dt(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 $t(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 WeakMap,i=new WeakMap,a=new WeakMap,l=new WeakMap,s=new WeakMap,f=new WeakMap,p=new WeakMap,y=new WeakMap,d=new WeakMap,v=new WeakSet,b=function(t){function c(){var t,e,n,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,h=arguments.length>1?arguments[1]:void 0,b=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,c),t=jt(this,c),Ht(e=t,n=v),n.add(e),Rt(t,"host",null),xt(t,r,void 0),Rt(t,"_onRender",void 0),xt(t,o,!1),xt(t,i,{}),xt(t,a,void 0),xt(t,l,void 0),xt(t,s,void 0),xt(t,f,void 0),xt(t,p,[]),xt(t,y,void 0),xt(t,d,void 0),t.isReactiveElement=!0,t.isSpecialElement="CONDITIONAL-ELEMENT"===t.tagName,t.isNativeElement=t.hasAttribute("is")&&!t.isSpecialElement,!t.isNativeElement){if(h){var S=new Function(h.textContent)();Dt(v,t,g).call(t,S)}if(It(a,t,u?u.cloneNode(!0):m.cloneNode()),b){var E=new CSSStyleSheet;E.replaceSync(b),It(l,t,E)}w&&It(s,t,w),t.ref={}}return 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&&kt(t,e)}(c,t),u=c,b=[{key:"setInitialState",value:function(t){this.initialState?Object.assign(this.initialState,t):this.initialState=t}},{key:"bindAttributeToState",value:function(t,e){Nt(i,this)[t]=e}},{key:"unbindAttributeToState",value:function(t){delete Nt(i,this)[t]}},{key:"updateStateFromProperty",value:function(t){var e=this[t],n=Nt(i,this)[t],r=At(this.getState(n,!0),2),o=r[0],a=r[1];o!==e&&(a[n]=e)}},{key:"resolveTextContentTemplateStringTag",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.reduce((function(t,n,o){var i,a=!!r[o]&&r[o].replaceAll(/\s/g,"");return t+n+(a?null===(i=e.host)||void 0===i?void 0:i.getAttribute(a):"")}),"")}},{key:"disconnectedCallback",value:function(){var t,e=null!==(t=this.host)&&void 0!==t?t:this;if(e.ref){var n=this.getAttribute("ref");n&&delete e.ref[n]}It(i,this,{}),Dt(v,this,E).call(this)}},{key:"connectedCallback",value:function(){var t=this;if(!Nt(o,this)){if(this.host=this.getRootNode().host,!this.isNativeElement){var i,a,l=Ot(this.getAttributeNames());try{for(l.s();!(a=l.n()).done;){var c,u=a.value;0===(i=this.getAttribute(u)).indexOf("@")&&(null!==(c=this.initialState)&&void 0!==c||(this.initialState={}),this.initialState[u]=Q(i.substring(1)))}}catch(t){l.e(t)}finally{l.f()}Dt(v,this,w).call(this)}"INPUT"===(null==this?void 0:this.tagName)&&(It(d,this,(function(){var t=new Event("inputChange",{bubbles:!0,composed:!0});this.dispatchEvent(t)})),this.addEventListener("change",Nt(d,this),!1)),this.isNativeElement||n||Dt(v,this,S).call(this);var s,f=[],p=Ot(this.getAttributeNames());try{for(p.s();!(s=p.n()).done;){var y=s.value,m=this.getAttribute(y);if(this.initialSetAttribute(y,m),0===y.indexOf("_")){var b=y.substring(1);f.push({command:b,args:m})}}}catch(t){p.e(t)}finally{p.f()}f.forEach((function(e){var n,r=e.command,o=e.args;null===(n=tt[r])||void 0===n||n.call(t,o)})),this.isNativeElement?-1!==this.textContent.indexOf("${")&&(this.textContent=Dt(v,this,M).call(this)):(j(this,(function(){return Dt(v,t,O).call(t)})),Nt(r,this)&&queueMicrotask((function(){return Nt(r,t).call(t,e[h]())})),this._onRender&&this._onRender.call(this)),It(o,this,!0)}}},{key:"attributeChangedCallback",value:function(t,e,n){if(e!==n&&this.isConnected){if("ref"===t){var r=n;(this.isNativeElement?this.host:this).ref[r]=this}t in Nt(i,this)&&Dt(v,this,A).call(this,t)}}},{key:"getState",value:function(t){var n,r,o,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.isNativeElement&&this.host?this.host:this;a&&a.state&&(r=null===(o=a.state)||void 0===o?void 0:o[t]);for(var l,c=!1;void 0===r&&void 0!==a.host&&null!==a.host;){var u;r=null===(u=(a=a.host).state)||void 0===u?void 0:u[t]}return void 0!==r?n=a.state:void 0!==(r=null===(l=c=e[h]())||void 0===l?void 0:l[t])&&(n=c),i?[r,n]:r}},{key:"findElement",value:function(t){var n=this.isNativeElement?this.host:this,r=n;return e.SPROUT_CONFIG.useShadow&&(r=n.shadowRoot),n.ref.hasOwnProperty(t)?n.ref[t]:r.querySelector('[ref="'.concat(t,'"]'))}}],b&&Pt(u.prototype,b),T&&Pt(u,T),Object.defineProperty(u,"prototype",{writable:!1}),u;var u,b,T}(t);function g(t){var e=this;t.events&&(It(f,this,t.events),this.isConnected&&j(this,(function(){return Dt(v,e,O).call(e)}))),t.state&&(this.setInitialState(t.state),this.isConnected&&Dt(v,this,w).call(this)),t.onMount&&It(r,this,t.onMount)}function w(){if(this.initialState){var t=this.initialState;t._stateManager?this.state=t._stateManager.state:this.state=new St(t,void 0,void 0,!1,e).state,delete this.initialState}}function S(){if(e.SPROUT_CONFIG.useShadow){var t=this.attachShadow({mode:"open"});this.shadowRoot.adoptedStyleSheets=[],Nt(s,this)&&this.shadowRoot.adoptedStyleSheets.push(Nt(s,this)),Nt(l,this)&&this.shadowRoot.adoptedStyleSheets.push(Nt(l,this)),t.appendChild(Nt(a,this))}else{var n=new DocumentFragment;n.appendChild(Nt(a,this)),this.appendChild(n)}}function E(){var t=this;if(Nt(d,this)&&this.removeEventListener("change",Nt(d,this)),Nt(p,this).length){var e=this;Nt(p,this).forEach((function(n){e.removeEventListener(n,Nt(y,t),!1)}))}}function O(){var t,n=this;if(Nt(f,this)){var r=Object.keys(Nt(f,this)),o={},i={};r.forEach((function(t){var e=Nt(f,n)[t];if("function"==typeof e)o[t]=e;else if("object"===Et(e)){Object.keys(e).forEach((function(n){"click"===n?o[t]=e[n]:(i[n]||(i[n]={}),i[n][t]=e[n])}))}}));var a=e[h]();It(y,this,(function(t,e){var n,r=t.composedPath();if(n=r?r.find((function(t){return t.hasAttribute&&t.hasAttribute("ref")&&t.getAttribute("ref")in e})):t.target.hasAttribute&&t.target.hasAttribute("ref")&&t.target.getAttribute("ref")in e?t.target:null){var o,i=n.getAttribute("ref");null===(o=e[i])||void 0===o||o.call(n,t,t.target,a)}}));var l=this;Object.keys(o).length&&(l.addEventListener("click",(function(t){Nt(y,n).call(n,t,o)}),!1),Nt(p,this).push("click"));for(var c=Object.keys(i),u=function(){var t=d[s];l.addEventListener(t,(function(e){Nt(y,n).call(n,e,i[t])}),!1)},s=0,d=c;s<d.length;s++)u();(t=Nt(p,this)).push.apply(t,c)}}function A(t){var e=this.getAttribute(t);c.includes(t)&&(e=null!==e);var n=Nt(i,this)[t],r=At(this.getState(n,!0),2),o=r[0],a=r[1];o!==e&&(a[n]=e)}function M(){return new Function("return this.resolveTextContentTemplateStringTag`"+this.textContent+"`;").bind(this)()}return Rt(b,"observedAttributes",["ref"].concat(u).concat(Object.keys(tt).map((function(t){return"_"+t.toLowerCase()})))),b.prototype.initialSetText=function(t){U.call(this,t)},b.prototype.initialSetAttribute=function(t,e){var n=e=String(e);if(0===e.indexOf("@")&&this.host&&this.isConnected&&(n=this.host.getAttribute(e.substring(1))),0===e.indexOf("$")&&this.isConnected){var r=e.substring(1);q.call(this,t,r)}else W.call(this,t,n)},b}function Ft(t){return Ft="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},Ft(t)}function Bt(){Bt=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",c=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),l=new L(r||[]);return o(a,"_invoke",{value:T(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 m(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(k([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=m.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,e){function n(o,i,a,l){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"==Ft(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){u.value=t,a(u)}),(function(t){return n("throw",t,a,l)}))}l(c.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 T(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 c=P(l,r);if(c){if(c===v)continue;return c}}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 u=f(e,n,r);if("normal"===u.type){if(o=r.done?d:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=d,r.method="throw",r.arg=u.arg)}}}function P(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,P(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 j(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(j,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(Ft(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,c,"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,u(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},A(M.prototype),u(M.prototype,l,(function(){return this})),e.AsyncIterator=M,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new M(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(O),u(O,c,"Generator"),u(O,a,(function(){return this})),u(O,"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 c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)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 Gt(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,Wt(r.key),r)}}function Wt(t){var e=function(t,e){if("object"!=Ft(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ft(e)?e:e+""}function qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ut(t,e,n){return e=Vt(e),function(t,e){if(e&&("object"==Ft(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,zt()?Reflect.construct(e,n||[],Vt(t).constructor):e.apply(t,n))}function zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zt=function(){return!!t})()}function Vt(t){return Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vt(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&&Yt(t,e)}function Yt(t,e){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yt(t,e)}function Xt(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function Jt(t,e){function n(){var e;return e=Bt().mark((function e(n,r,o){var i,a,l;return Bt().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 qt(this,e),Ut(this,e,[i,l,null==a?void 0:a.textContent,o])}return Qt(e,t),n=e,r&&Gt(n.prototype,r),c&&Gt(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c}(t.ReactiveElement));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){Xt(i,r,o,a,l,"next",t)}function l(t){Xt(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 Kt(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=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||te(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 Zt(t){return function(t){if(Array.isArray(t))return ee(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||te(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 te(t,e){if(t){if("string"==typeof t)return ee(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(t,e):void 0}}function ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ne(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,re(r.key),r)}}function re(t){var e=function(t,e){if("object"!=pe(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pe(e)?e:e+""}function oe(t,e,n){return e=ae(e),function(t,e){if(e&&("object"==pe(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,ie()?Reflect.construct(e,n||[],ae(t).constructor):e.apply(t,n))}function ie(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ie=function(){return!!t})()}function ae(t){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ae(t)}function le(t,e){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},le(t,e)}function ce(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function ue(t,e,n){return t.set(fe(t,e),n),n}function se(t,e){return t.get(fe(t,e))}function fe(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 pe(t){return pe="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},pe(t)}function he(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 ce(t=oe(this,o,[].concat(a)),e,void 0),ce(t,n,void 0),ce(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&&le(t,e)}(o,t),i=o,a=[{key:"render",value:function(){var t,r=this,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(void 0===(t=0===se(e,this).indexOf("@")?this.host.getAttribute(se(e,this).substring(1)):this.getState(se(e,this))))throw Error("State value for ".concat(se(e,this)," not found while rendering conditional-render element:"),this);var i=[];se(n,this).forEach((function(e,n){(function(t,e){return"string"!==pe(t)?e===t:"always"===t||(g.includes(t[0])?new Function("return ".concat(e).concat(t))():e===t)})(n,t)&&i.push.apply(i,Zt(e))})),o?(this.innerHTML="",this.append.apply(this,i)):i.length&&L(this,(function(){r.innerHTML="",r.append.apply(r,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(!se(r,this)){var t=this.getAttribute("_condition");if(!t)throw Error("conditional-render elements must have a _condition command attribute");if(!this.children||!this.children.length)throw Error("Conditional element must have children!");var o=t;ue(e,this,o);var i,a,l=0===se(e,this).indexOf("@");if(!l){var c=Kt(this.getState(o,!0),2);if(i=c[0],a=c[1],void 0===i)throw Error("State property ".concat(o," not defined for _condition command!"))}var u=new Map;u.set("always",[]),Zt(this.children).forEach((function(t){var e=t.getAttribute("_if");if(e){var n=Q(e);u.has(n)||u.set(n,[]),u.get(n).push(t)}else u.get("always").push(t)})),ue(n,this,u),l||a._stateManager.addConditionallyRenderingElements(o,this),this.render(!0),ue(r,this,!0)}}}],a&&ne(i.prototype,a),l&&ne(i,l),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,a,l}(t);return o}var ye=document.currentScript.hasAttribute("allowappscopeaccess");globalThis.SproutInitApp=function(t){var e,n=(window,{window,document:null===(e=window)||void 0===e?void 0:e.document}),r={useShadow:!0,allowAppScopeAccess:ye};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;D(Object.prototype,"hasOwnProperty",o),n[h]=function(){return{}},n.setGlobalState=function(){var t=new St(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},void 0,void 0,!0,n).state,e="SproutGlobalState";Object.defineProperty(n,e,{value:t,writable:!1,configurable:!1}),Object.defineProperty(n,h,{value:function(){return n[e]}})},n.ReactiveElement=$t(HTMLElement,n),d.forEach((function(t){return customElements.define("reactive-".concat(t.element),$t(t.class,n,!0),{extends:t.element})}));var i=he($t(HTMLElement,n,!0));return customElements.define("conditional-render",i),function(){Jt(n,t)}.bind(n)}})(); | ||
//# sourceMappingURL=sprout-core.min.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
570504
0.94%2974
1.74%