UNPKG

@tko/build.knockout

Version:

Knockout makes it easier to create rich, responsive UIs with JavaScript

7 lines 130 kB
// @tko/build.knockout 🥊 4.0.1 IIFE "use strict";var ko=(()=>{var sn=Object.defineProperty;var as=Object.getOwnPropertyDescriptor;var us=Object.getOwnPropertyNames;var ls=Object.prototype.hasOwnProperty;var Vn=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),Hn=n=>{throw TypeError(n)},ii=Math.pow,ds=(n,e,t)=>e in n?sn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Ye=(n,e)=>{for(var t in e)sn(n,t,{get:e[t],enumerable:!0})},cs=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of us(e))!ls.call(n,i)&&i!==t&&sn(n,i,{get:()=>e[i],enumerable:!(r=as(e,i))||r.enumerable});return n};var ps=n=>cs(sn({},"__esModule",{value:!0}),n);var d=(n,e,t)=>ds(n,typeof e!="symbol"?e+"":e,t),oi=(n,e,t)=>e.has(n)||Hn("Cannot "+t);var $n=(n,e,t)=>(oi(n,e,"read from private field"),t?t.call(n):e.get(n)),si=(n,e,t)=>e.has(n)?Hn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),ai=(n,e,t,r)=>(oi(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var Ze=(n,e,t)=>new Promise((r,i)=>{var o=u=>{try{a(t.next(u))}catch(l){i(l)}},s=u=>{try{a(t.throw(u))}catch(l){i(l)}},a=u=>u.done?r(u.value):Promise.resolve(u.value).then(o,s);a((t=t.apply(n,e)).next())}),fs=function(n,e){this[0]=n,this[1]=e};var Le=n=>{var e=n[Vn("asyncIterator")],t=!1,r,i={};return e==null?(e=n[Vn("iterator")](),r=o=>i[o]=s=>e[o](s)):(e=e.call(n),r=o=>i[o]=s=>{if(t){if(t=!1,o==="throw")throw s;return s}return t=!0,{done:!1,value:new fs(new Promise(a=>{var u=e[o](s);u instanceof Object||Hn("Object expected"),a(u)}),1)}}),i[Vn("iterator")]=()=>i,r("next"),"throw"in e?r("throw"):i.throw=o=>{throw o},"return"in e&&r("return"),i};var Ga={};Ye(Ga,{default:()=>Ja});var{isArray:Ot}=Array;function L(n,e,t){arguments.length>2&&(e=e.bind(t));for(let r=0,i=n.length;r<i;++r)e(n[r],r,n)}function W(n,e){return(Ot(n)?n:[...n]).indexOf(e)}function an(n,e,t){return(Ot(n)?n:[...n]).find(e,t)}function et(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:Array.from(n,e)}function tt(n,e){let t=W(n,e);t>0?n.splice(t,1):t===0&&n.shift()}function ci(n){let e=new Set;return n===null?[]:(Ot(n)?n:[...n]).filter(t=>e.has(t)?!1:e.add(t))}function Re(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:(Ot(n)?n:[...n]).filter(e)}function nt(n,e){if(Ot(e))n.push.apply(n,e);else for(let t=0,r=e.length;t<r;t++)n.push(e[t]);return n}function Ne(n,e,t){let r=W(typeof n.peek=="function"?n.peek():n,e);r<0?t&&n.push(e):t||n.splice(r,1)}function ue(n){return Array.from(n)}function pi(n,e){let t=typeof n=="function"?n():n,r=typeof e=="function"?e():e,i=[];for(let o=t;o<=r;o++)i.push(o);return i}function jn(n,e,t){if(n.length&&e.length){let r,i,o,s,a;for(r=i=0;(!t||r<t)&&(s=n[i]);++i){for(o=0;a=e[o];++o)if(s.value===a.value){s.moved=a.index,a.moved=s.index,e.splice(o,1),r=o=0;break}r+=o}}}var ui="added",li="deleted";function rt(n,e,t){return t=typeof t=="boolean"?{dontLimitMoves:t}:t||{},n=n||[],e=e||[],n.length<e.length?di(n,e,ui,li,t):di(e,n,li,ui,t)}function di(n,e,t,r,i){let o=Math.min,s=Math.max,a=new Array,u,l=n.length,f,m=e.length,b=m-l||1,g=l+m+1,x,T,h,O;for(u=0;u<=l;u++)for(T=x,a.push(x=new Array),h=o(m,u+b),O=s(0,u-1),f=O;f<=h;f++)if(!f)x[f]=u+1;else if(!u)x[f]=f+1;else if(n[u-1]===e[f-1])x[f]=T[f-1];else{let k=T[f]||g,P=x[f-1]||g;x[f]=o(k,P)+1}let M=new Array,y,w=new Array,v=new Array;for(u=l,f=m;u||f;)y=a[u][f]-1,f&&y===a[u][f-1]?w.push(M[M.length]={status:t,value:e[--f],index:f}):u&&y===a[u-1][f]?v.push(M[M.length]={status:r,value:n[--u],index:u}):(--f,--u,i!=null&&i.sparse||M.push({status:"retained",value:e[f]}));return jn(v,w,!i.dontLimitMoves&&l*10),M.reverse()}var un=class{constructor(){d(this,"bindingStringPreparsers",[]);d(this,"knockoutInstance",null);d(this,"deferUpdates",!1);d(this,"useOnlyNativeEvents",!0);d(this,"useTemplateTag",!0);d(this,"protoProperty","__ko_proto__");d(this,"defaultBindingAttribute","data-bind");d(this,"allowVirtualElements",!0);d(this,"bindingGlobals",Object.create(null));d(this,"bindingProviderInstance");d(this,"createChildContextWithAs",!1);d(this,"disableJQueryUsage",!1);d(this,"_jQuery");d(this,"Promise",globalThis.Promise);d(this,"taskScheduler",null);d(this,"debug",!1);d(this,"templateSizeLimit",4096);d(this,"allowScriptTagsInTemplates",!1);d(this,"_sanitizeWarningLogged",!1);d(this,"global",globalThis);d(this,"document",globalThis.document);d(this,"filters",{});d(this,"includeDestroyed",!1);d(this,"foreachHidesDestroyed",!1)}get jQuery(){var e;if(!this.disableJQueryUsage)return(e=this._jQuery)!=null?e:globalThis.jQuery}set jQuery(e){e?(this._jQuery=e,this.disableJQueryUsage=!1):(this.disableJQueryUsage=!0,this._jQuery=void 0)}sanitizeHtmlTemplate(e){return this._sanitizeWarningLogged||(console.warn("WARNING -- You don't have a HTML sanitizer configured. Please configure options.sanitizeHtmlTemplate to avoid XSS vulnerabilities."),this._sanitizeWarningLogged=!0),e}onError(e,t=!0){if(t)throw e;return e}set(e,t){this[e]=t}getBindingHandler(e){return null}cleanExternalData(e,t){}},fi=new un;function Wn(n,e){var r;let t=e.default;Object.defineProperty(fi,n,{get(){return t},set(i){var o;t=i,(o=e.set)==null||o.call(e,i)},enumerable:!0,configurable:!0}),(r=e.set)==null||r.call(e,t)}var c=fi;function Un(n){return c.onError?(...e)=>{try{return n(...e)}catch(t){c.onError(t)}}:n}function qn(n){le(function(){throw n},0)}function le(n,e){return setTimeout(Un(n),e)}function ln(n,e){let t;return function(...r){t||(t=le(function(){t=void 0,n(...r)},e))}}function dn(n,e){let t;return function(...r){clearTimeout(t),t=le(()=>n(...r),e)}}function G(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function kt(n){return n===null?!1:typeof n=="object"||typeof n=="function"}function H(n,e){if(e)for(let t of Object.keys(e))G(e,t)&&(n[t]=e[t]);return n}function R(n,e){for(let t in n)G(n,t)&&e(t,n[t])}function me(n,e,t){if(!n)return n;arguments.length>2&&(e=e.bind(t));let r={};for(let i in n)G(n,i)&&(r[i]=e(n[i],i,n));return r}function Qn(n,e){return G(n,e)?n[e]:void 0}function Kn(n,e){if(e||(e=new Array),!n||typeof n!="object"||n.constructor!==Object||e.indexOf(n)!==-1)return n;e.push(n);let t={};for(let r in n)G(n,r)&&(t[r]=Kn(n[r],e));return t}function mi(n){let e=new Set;return JSON.stringify(n,(t,r)=>e.has(r)?"...":(typeof r=="object"&&e.add(r),r))}function Jn(n){return kt(n)&&typeof n.then=="function"}function ms(){try{return Object.defineProperty(function(){},"length",{}),!0}catch(n){return!1}}var hs=ms();function cn(n,e){hs&&Object.defineProperty(n,"length",e)}function _t(n){return n==null?"":n.trim?n.trim():n.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function hi(n,e){return n=n||"",e.length>n.length?!1:n.substring(0,e.length)===e}function gi(n){return typeof n=="string"&&(n=_t(n),n)?JSON.parse(n):null}var gs=typeof Symbol=="function";function z(n){return gs?Symbol(n):n}var Gn=/\S+/g;function it(n,e,t){let r;e&&(typeof n.classList=="object"?(r=n.classList[t?"add":"remove"],L(e.match(Gn),function(i){r.call(n.classList,i)})):typeof n.className.baseVal=="string"?yi(n.className,"baseVal",e,t):yi(n,"className",e,t))}function yi(n,e,t,r){let i=n[e].match(Gn)||[];L(t.match(Gn),function(o){Ne(i,o,r)}),n[e]=i.join(" ")}function zn(n,e){if(n===e)return!0;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(e.contains)return e.contains(n.nodeType!==Node.ELEMENT_NODE?n.parentNode:n);if(e.compareDocumentPosition)return(e.compareDocumentPosition(n)&16)==16;let t=n;for(;t&&t!=e;)t=t.parentNode;return!!t}function It(n){return zn(n,n.ownerDocument.documentElement)}function bi(n){return!!an(n,It)}function V(n){return n&&n.tagName&&n.tagName.toLowerCase()}function Ei(n){return window.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&n.nodeType===Node.ELEMENT_NODE}function Xn(n){return window.DocumentFragment?n instanceof DocumentFragment:n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}var Yn={},Ci={};Yn.UIEvents=["keyup","keydown","keypress"];Yn.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];R(Yn,function(n,e){if(e.length)for(let t=0,r=e.length;t<r;t++)Ci[e[t]]=n});function ys(n,e){if(V(n)!=="input"||!n.type||e.toLowerCase()!="click")return!1;let t=n.type;return t=="checkbox"||t=="radio"}function K(n,e,t,r=!1){let i=Un(t),o=!!r,s=c.jQuery;if(!c.useOnlyNativeEvents&&!o&&s)s(n).on(e,i);else if(typeof n.addEventListener=="function")n.addEventListener(e,i,r);else throw new Error("Browser doesn't support addEventListener")}function bs(n){return typeof n.click=="function"}function Ve(n,e){if(!(n&&n.nodeType))throw new Error("element must be a DOM node when calling triggerEvent");let t=ys(n,e);if(!c.useOnlyNativeEvents&&c.jQuery&&!t)c.jQuery(n).trigger(e);else if(typeof document.createEvent=="function")if(typeof n.dispatchEvent=="function"){let r=Ci[e]||"HTMLEvents",i=document.createEvent(r);i.initEvent(e,!0,!0,c.global,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(i)}else throw new Error("The supplied element doesn't support dispatchEvent");else if(t&&bs(n))n.click();else throw new Error("Browser doesn't support triggering events")}var A={};Ye(A,{clear:()=>tr,get:()=>He,getOrSet:()=>As,nextKey:()=>Mt,set:()=>xe});var Es=new Date().getTime(),Cs=`__ko__${Es}`,pn=Symbol("Knockout data");var xs=0;function Zn(n){return n!=="__proto__"&&n!=="constructor"&&n!=="prototype"}function er(n,e){let t=n[pn];return!t&&e&&(t=n[pn]={}),t}function tr(n){return n[pn]?(delete n[pn],!0):!1}function Mt(){return xs+++Cs}function He(n,e){if(!Zn(e))throw new Error("Unsafe key for DOM data: "+e);let t=er(n,!1);return t&&t[e]}function xe(n,e,t){if(!Zn(e))throw new Error("Unsafe key for DOM data: "+e);let r=er(n,t!==void 0);r&&(r[e]=t)}function As(n,e,t){if(!Zn(e))throw new Error("Unsafe key for DOM data: "+e);let r=er(n,!0);return r[e]||(r[e]=t)}var nr=Mt(),vs={1:!0,8:!0,9:!0},xi={1:!0,9:!0};function rr(n,e){let t=He(n,nr);return t===void 0&&e&&(t=new Array,xe(n,nr,t)),t}function Ds(n){xe(n,nr,void 0)}function Ai(n){let e=rr(n,!1);if(e){e=e.slice(0);for(let t=0;t<e.length;t++)e[t](n)}tr(n);for(let t=0,r=ot.length;t<r;++t)ot[t](n);c.cleanExternalData&&c.cleanExternalData(n),xi[n.nodeType]&&vi(n.childNodes,!0)}function vi(n,e){let t=new Array,r;for(let i=0;i<n.length;i++)if((!e||n[i].nodeType===Node.COMMENT_NODE)&&(Ai(t[t.length]=r=n[i]),n[i]!==r))for(;i--&&W(t,n[i])===-1;);}function Ae(n,e){if(typeof e!="function")throw new Error("Callback must be a function");rr(n,!0).push(e)}function st(n,e){let t=rr(n,!1);t&&(tt(t,e),t.length===0&&Ds(n))}function X(n){return vs[n.nodeType]&&(Ai(n),xi[n.nodeType]&&n instanceof Element&&vi(n.getElementsByTagName("*"))),n}function he(n){n&&(X(n),n.parentNode&&n.parentNode.removeChild(n))}var ot=new Array;function Di(n){ot.push(n)}function Ti(n){let e=ot.indexOf(n);e>=0&&ot.splice(e,1)}function Ts(n){let e=c.jQuery?c.jQuery.cleanData:null;e&&e([n])}ot.push(Ts);function Pt(n){let e=ue(n),r=(e[0]&&e[0].ownerDocument||document).createElement("div");for(let i=0,o=e.length;i<o;i++)r.appendChild(X(e[i]));return r}function ve(n,e){let t=new Array;for(let r=0;r<n.length;r++){let i=n[r].cloneNode(!0);t.push(e?X(i):i)}return t}function Bi(n,e){if(Lt(n),e)for(let t=0;t<e.length;t++)n.appendChild(e[t])}function fn(n,e){let t=Array.isArray(n)?n:[n];if(t.length>0){let r=t[0],i=r.parentNode;for(let o=0;o<e.length;o++)i==null||i.insertBefore(e[o],r);for(let o=0;o<t.length;o++)he(t[o])}}function Lt(n){for(;n.firstChild;)he(n.firstChild)}function $e(n,e){if(n.length){for(e=e.nodeType===Node.COMMENT_NODE&&e.parentNode||e;n.length&&n[0].parentNode!==e;)n.splice(0,1);for(;n.length>1&&n[n.length-1].parentNode!==e;)n.length--;if(n.length>1){let t=n[0],r=n[n.length-1];for(n.length=0;t!==r;)n.push(t),t=t.nextSibling;n.push(r)}}return n}function mn(n,e){n.selected=e}var C={};Ye(C,{allowedBindings:()=>ws,childNodes:()=>Si,emptyNode:()=>hn,endCommentRegex:()=>Fi,firstChild:()=>yn,getVirtualChildren:()=>or,hasBindingValue:()=>Ss,insertAfter:()=>Os,isEndComment:()=>we,isStartComment:()=>re,lastChild:()=>ks,nextSibling:()=>bn,normaliseVirtualElementDomStructure:()=>Ms,prepend:()=>Oi,previousSibling:()=>_s,setDomNodeChildren:()=>gn,startCommentRegex:()=>ir,virtualNodeBindingValue:()=>Is});var ir=/^\s*ko(?:\s+([\s\S]+))?\s*$/,Fi=/^\s*\/ko\s*$/,Bs={ul:!0,ol:!0};function re(n){return n.nodeType===Node.COMMENT_NODE&&ir.test(n.nodeValue)}function we(n){return n.nodeType===Node.COMMENT_NODE&&Fi.test(n.nodeValue)}function Fs(n){return we(n)&&!He(n,Ni)}var Ni="__ko_matchedEndComment__";function or(n,e){let t=n,r=1,i=new Array;for(;t=t.nextSibling;){if(we(t)&&(xe(t,Ni,!0),r--,r===0))return i;i.push(t),re(t)&&r++}if(!e)throw new Error("Cannot find closing comment tag to match: "+n.nodeValue);return null}function wi(n,e){let t=or(n,e);return t?t.length>0?t[t.length-1].nextSibling:n.nextSibling:null}function Ns(n){let e=n.firstChild,t=null;if(e)do if(t)t.push(e);else if(re(e)){let r=wi(e,!0);r?e=r:t=[e]}else we(e)&&(t=[e]);while(e=e.nextSibling);return t}var ws=Object.create(null),Ss=re;function Si(n){return re(n)?or(n):n.childNodes}function hn(n){if(!re(n))Lt(n);else{let e=Si(n);for(let t=0,r=e.length;t<r;t++)he(e[t])}}function gn(n,e){if(!re(n))Bi(n,e);else{hn(n);let t=n.nextSibling;if(t&&t.parentNode){let r=t.parentNode;for(let i=0,o=e.length;i<o;++i)r.insertBefore(e[i],t)}}}function Oi(n,e){var t;re(n)?(t=n.parentNode)==null||t.insertBefore(e,n.nextSibling):n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e)}function Os(n,e,t){var r;t?re(n)?(r=n.parentNode)==null||r.insertBefore(e,t.nextSibling):t.nextSibling?n.insertBefore(e,t.nextSibling):n.appendChild(e):Oi(n,e)}function yn(n){if(!re(n)){if(n.firstChild&&we(n.firstChild))throw new Error("Found invalid end comment, as the first child of "+n.outerHTML);return n.firstChild}return!n.nextSibling||we(n.nextSibling)?null:n.nextSibling}function ks(n){let e=yn(n);if(!e)return null;let t;do t=e;while(e=bn(e));return t}function bn(n){if(re(n)&&(n=wi(n)),n.nextSibling&&we(n.nextSibling)){if(Fs(n.nextSibling))throw Error("Found end comment without a matching opening comment, as next sibling of "+n.outerHTML);return null}else return n.nextSibling}function _s(n){let e=0;do if(n.nodeType===Node.COMMENT_NODE)if(re(n)){if(--e===0)return n}else we(n)&&e++;else if(e===0)return n;while(n=n.previousSibling)}function Is(n){let e=n.nodeValue.match(ir);return e?e[1]:null}function Ms(n){if(!Bs[V(n)])return;let e=n.firstChild;if(e)do if(e.nodeType===Node.ELEMENT_NODE){let t=Ns(e);if(t){let r=e.nextSibling;for(let i=0;i<t.length;i++)r?n.insertBefore(t[i],r):n.appendChild(t[i])}}while(e=e.nextSibling)}var ki=c.useTemplateTag&&c.document&&"content"in c.document.createElement("template");function Ps(n,e){e||(e=document);let t=e.createElement("div");return t.innerHTML=n,ue(t.childNodes)}function Ls(n,e){e||(e=document);let t=e.createElement("template");return t.innerHTML=n,ue(t.content.childNodes)}function Rs(n,e){let t=c.jQuery;return t?t.parseHTML(n,e)||[]:[]}function de(n,e){let t=_i(n);return ki?Ls(t,e):c.jQuery?Rs(t,e):Ps(t,e)}var Vs=/<script\b[^>]*>([\s\S]*?)<\/script[^>]*>/i;function _i(n){if(!n)return"";if(c.templateSizeLimit>0&&n.length>c.templateSizeLimit)throw new Error("Template is too long. Please configure the 'templateSizeLimit'");if(!c.allowScriptTagsInTemplates&&Vs.test(n))throw new Error("Script-tag in template detected.");return c.sanitizeHtmlTemplate(n)}function Ii(n,e){let t=de(n,e);return t.length&&t[0].parentElement||Pt(t)}function at(n,e){if(Lt(n),typeof e=="function"&&(e=e()),e!=null){typeof e!="string"&&(e=e.toString());let t=c.jQuery;if(t&&!ki){let r=_i(e);t(n).html(r)}else{let r;if(n.ownerDocument?r=de(e,n.ownerDocument):r=de(e),n.nodeType===Node.COMMENT_NODE)e===null?hn(n):gn(n,r);else for(let i=0;i<r.length;i++)n.appendChild(r[i])}}}function je(n,e){let t=typeof e=="function"?e():e;t==null&&(t="");let r=yn(n);!r||r.nodeType!==Node.TEXT_NODE||bn(r)?gn(n,[n.ownerDocument.createTextNode(t)]):r.data=t}var En=Symbol("Knockout selectExtensions hasDomDataProperty"),_={optionValueDomDataKey:Mt(),readValue:function(n){switch(V(n)){case"option":return n[En]===!0?He(n,_.optionValueDomDataKey):n.value;case"select":{let e=n;return e.selectedIndex>=0?_.readValue(e.options[e.selectedIndex]):void 0}default:return n.value}},writeValue:function(n,e,t){switch(V(n)){case"option":if(typeof e=="string")xe(n,_.optionValueDomDataKey,void 0),En in n&&delete n[En],n.value=e;else{let r=n;xe(n,_.optionValueDomDataKey,e),r[En]=!0,r.value=typeof e=="number"?e:""}break;case"select":{(e===""||e===null)&&(e=void 0);let r=-1,i=n;for(let o=0,s=i.options.length,a;o<s;++o){a=_.readValue(i.options[o]);let u=a===e,l=a===""&&e===void 0,f=typeof e=="number"&&Number(a)===e;if(u||l||f){r=o;break}}(t||r>=0||e===void 0&&i.size>1)&&(i.selectedIndex=r)}break;default:e==null&&(e=""),n.value=e;break}}};var We={};Ye(We,{memoize:()=>$s,parseMemoText:()=>Ri,unmemoize:()=>Li,unmemoizeDomNodeAndDescendants:()=>js});var sr={};function Mi(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function Hs(){return Mi()+Mi()}function Pi(n,e){if(n){if(n.nodeType===Node.COMMENT_NODE){let r=Ri(n.nodeValue);r!=null&&e.push({domNode:n,memoId:r})}else if(n.nodeType===Node.ELEMENT_NODE)for(let t=0,r=n.childNodes,i=r.length;t<i;t++)Pi(r[t],e)}}function $s(n){if(typeof n!="function")throw new Error("You can only pass a function to memoization.memoize()");let e=Hs();return sr[e]=n,"<!--[ko_memo:"+e+"]-->"}function Li(n,e){let t=sr[n];if(t===void 0)throw new Error("Couldn't find any memo with ID "+n+". Perhaps it's already been unmemoized.");try{return t.apply(null,e||[]),!0}finally{delete sr[n]}}function js(n,e){let t=new Array;Pi(n,t);for(let r=0,i=t.length;r<i;r++){let o=t[r].domNode,s=[o];e&&nt(s,e),Li(t[r].memoId,s),o.nodeValue="",o.parentNode&&o.parentNode.removeChild(o)}}function Ri(n){if(!n)return null;let e=n.match(/^\[ko_memo\:(.*?)\]$/);return e?e[1]:null}var ye={};Ye(ye,{cancel:()=>Qs,resetForTesting:()=>Ks,runEarly:()=>Hi,schedule:()=>qs});var Rt=new Array,ie=0,Vi=1,Se=0,ge=c.global;ge&&typeof ge.queueMicrotask=="function"?c.taskScheduler=n=>ge.queueMicrotask(n):ge&&ge.MutationObserver&&ge.document&&!(ge.navigator&&ge.navigator.standalone)?c.taskScheduler=(function(){let n=null,e=!1,t=ge.document.createElement("div");return new ge.MutationObserver(function(){let r=n;n=null,r==null||r()}).observe(t,{attributes:!0}),function(r){n=r,e=!e,t.setAttribute("data-task-scheduler",e?"1":"0")}})():c.taskScheduler=n=>setTimeout(n,0);function Hi(){if(ie){let n=ie,e=0;for(let t;Se<ie;)if(t=Rt[Se++]){if(Se>n){if(++e>=5e3){Se=ie,qn(Error("'Too much recursion' after processing "+e+" task groups."));break}n=ie}try{t()}catch(r){qn(r)}}}}function Ws(){Hi(),Se=ie=Rt.length=0}function Us(){c.taskScheduler(Ws)}function qs(n){return ie||Us(),Rt[ie++]=n,Vi++}function Qs(n){let e=n-(Vi-ie);e>=Se&&e<ie&&(Rt[e]=null)}function Ks(){let n=ie-Se;return Se=ie=Rt.length=0,n}var D={};Ye(D,{begin:()=>Cn,end:()=>xn,getDependencies:()=>Ys,getDependenciesCount:()=>Xs,ignore:()=>zs,ignoreDependencies:()=>zs,isInitial:()=>Zs,registerDependency:()=>ur});var ar=Symbol("Knockout Subscribable");function ut(n){return n&&n[ar]||!1}var $i=new Array,oe,Js=0;function Gs(){return++Js}function Cn(n){$i.push(oe),oe=n}function xn(){oe=$i.pop()}function ur(n){if(oe){if(!ut(n))throw new Error("Only subscribable things can act as dependencies");oe.callback.call(oe.callbackTarget,n,n._id||(n._id=Gs()))}}function zs(n,e,t){try{return Cn(),n.apply(e,t||[])}finally{xn()}}function Xs(){if(oe)return oe.computed.getDependenciesCount()}function Ys(){if(oe)return oe.computed.getDependencies()}function Zs(){if(oe)return oe.isInitial}function Vt(n){n._deferUpdates||(n._deferUpdates=!0,n.limit(function(e){let t,r=!1;return function(){if(!r){ye.cancel(t),t=ye.schedule(e);try{r=!0,n.notifySubscribers(void 0,"dirty")}finally{r=!1}}}}))}var Ht=class{constructor(e,t,r){d(this,"_disposeCallback");d(this,"_target");d(this,"_callback");d(this,"_isDisposed");d(this,"_domNodeDisposalCallback");d(this,"_node");this._target=e,this._callback=t.next,this._disposeCallback=r,this._isDisposed=!1,this._domNodeDisposalCallback=null}dispose(){this._domNodeDisposalCallback&&st(this._node,this._domNodeDisposalCallback),this._isDisposed=!0,this._disposeCallback()}disposeWhenNodeIsRemoved(e){this._node=e,Ae(e,this._domNodeDisposalCallback=this.dispose.bind(this))}unsubscribe(){this.dispose()}get closed(){return this._isDisposed}};var ea={undefined:1,boolean:1,number:1,string:1};function lt(n,e){return n===null||typeof n in ea?n===e:!1}function lr(n){let e=this;return n&&R(n,function(t,r){let i=be[t];typeof i=="function"?e=i(e,r)||e:c.onError(new Error("Extender not found: "+t))}),e}function ta(n,e){n.equalityComparer=e=="always"?null:lt}function na(n,e){if(e!==!0)throw new Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");Vt(n)}function ra(n,e){let t,r,i;typeof e=="number"?t=e:(t=e.timeout,r=e.method),n._deferUpdates=!1,i=r==="notifyWhenChangesStop"?dn:ln,n.limit(function(o){return i(o,t)})}var be={notify:ta,deferred:na,rateLimit:ra};var Y=Symbol("Knockout latest value");Symbol.observable||(Symbol.observable=Symbol.for("@tko/Symbol.observable"));var U=function(){Object.setPrototypeOf(this,An),An.init(this)},De="change",An={[ar]:!0,[Symbol.observable](){return this},init(n){n._subscriptions={change:[]},n._versionNumber=1},subscribe(n,e,t){let r=typeof n=="object"&&n.next;t=t||De;let i=r?n:{next:e?n.bind(e):n},o=new Ht(this,i,()=>{tt(this._subscriptions[t],o),this.afterSubscriptionRemove&&this.afterSubscriptionRemove(t)});return this.beforeSubscriptionAdd&&this.beforeSubscriptionAdd(t),this._subscriptions[t]||(this._subscriptions[t]=new Array),this._subscriptions[t].push(o),r&&Y in this&&i.next(this[Y]),o},notifySubscribers(n,e){if(e=e||De,e===De&&this.updateVersion(),this.hasSubscriptionsForEvent(e)){let t=e===De&&this._changeSubscriptions||[...this._subscriptions[e]];try{Cn();for(let r=0,i;i=t[r];++r)i._isDisposed||i._callback(n)}finally{xn()}}},getVersion(){return this._versionNumber},hasChanged(n){return this.getVersion()!==n},updateVersion(){++this._versionNumber},hasSubscriptionsForEvent(n){return this._subscriptions[n]&&this._subscriptions[n].length},getSubscriptionsCount(n){if(n)return this._subscriptions[n]&&this._subscriptions[n].length||0;{let e=0;return R(this._subscriptions,function(t,r){t!=="dirty"&&(e+=r.length)}),e}},isDifferent(n,e){return!this.equalityComparer||!this.equalityComparer(n,e)},once(n){let e=this.subscribe(t=>{e.dispose(),n(t)})},when(n,e){let t=this.peek(),r=arguments.length>1,i=typeof n=="function"?n:o=>o===n;return i(t)?c.Promise.resolve(r?e:t):new c.Promise((o,s)=>{let a=this.subscribe(u=>{i(u)&&(a.dispose(),o(r?e:u))})})},yet(n,...e){let t=typeof n=="function"?n:i=>i===n,r=i=>!t(i);return this.when(r,...e)},next(){return new Promise(n=>this.once(n))},toString(){return"[object Object]"},extend:lr};Object.setPrototypeOf(An,Function.prototype);U.fn=An;function F(n){function e(){return arguments.length>0?(e.isDifferent(e[Y],arguments[0])&&(e.valueWillMutate(),e[Y]=arguments[0],e.valueHasMutated()),this):(ur(e),e[Y])}return cn(e,{value:void 0}),e[Y]=n,U.fn.init(e),Object.setPrototypeOf(e,F.fn),c.deferUpdates&&Vt(e),e}F.fn={equalityComparer:lt,peek(){return this[Y]},valueHasMutated(){this.notifySubscribers(this[Y],"spectate"),this.notifySubscribers(this[Y])},valueWillMutate(){this.notifySubscribers(this[Y],"beforeChange")},modify(n,e=!0){this(n(e?this.peek():this()))},isWriteable:!0};function ia(n,e){!e||e===De?this._limitChange(n):e==="beforeChange"?this._limitBeforeChange(n):this._origNotifySubscribers(n,e)}U.fn.limit=function(e){let t=this,r=S(t),i="beforeChange",o,s,a,u,l;t._origNotifySubscribers||(t._origNotifySubscribers=t.notifySubscribers,t.notifySubscribers=ia);let f=e(function(){t._notificationIsPending=!1,r&&u===t&&(u=t._evalIfChanged?t._evalIfChanged():t());let m=s||l&&t.isDifferent(a,u);t._notifyNextChange=l=o=!1,m&&t._origNotifySubscribers(a=u)});Object.assign(t,{_limitChange(m,b){(!b||!t._notificationIsPending)&&(l=!b),t._changeSubscriptions=[...t._subscriptions[De]],t._notificationIsPending=o=!0,u=m,f()},_limitBeforeChange(m){o||(a=m,t._origNotifySubscribers(m,i))},_notifyNextChangeIfValueIsDifferent(){t.isDifferent(a,t.peek(!0))&&(s=!0)},_recordUpdate(){l=!0}})};Object.setPrototypeOf(F.fn,U.fn);var ji=F.protoProperty=c.protoProperty;F.fn[ji]=F;F.observablePrototypes=new Set([F]);function S(n){let e=typeof n=="function"&&n[ji];if(e&&!F.observablePrototypes.has(e))throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e}function p(n){return S(n)?n():n}function dt(n){return S(n)?n.peek():n}function Q(n){return S(n)&&n.isWriteable}var ct="arrayChange";function Ue(n,e){if(n.compareArrayOptions={},e&&typeof e=="object"&&H(n.compareArrayOptions,e),n.compareArrayOptions.sparse=!0,n.cacheDiffForKnownOperation)return;let t=!1,r=null,i,o=0,s,a=n.beforeSubscriptionAdd,u=n.afterSubscriptionRemove;n.beforeSubscriptionAdd=function(m){a&&a.call(n,m),m===ct&&l()},n.afterSubscriptionRemove=function(m){u&&u.call(n,m),m===ct&&!n.hasSubscriptionsForEvent(ct)&&(s&&(n.notifySubscribers=s,s=void 0),i&&i.dispose(),i=null,t=!1)};function l(){if(t)return;t=!0,s=n.notifySubscribers,n.notifySubscribers=function(b,g){return(!g||g===De)&&++o,s.apply(this,arguments)};let m=new Array().concat(n.peek()===void 0?[]:n.peek());r=null,i=n.subscribe(function(b){let g;b=new Array().concat(b||[]),n.hasSubscriptionsForEvent(ct)&&(g=f(m,b)),m=b,r=null,o=0,g&&g.length&&n.notifySubscribers(g,ct)})}function f(m,b){return(!r||o>1)&&(r=Ue.compareArrays(m,b,n.compareArrayOptions)),r}n.cacheDiffForKnownOperation=function(m,b,g){if(!t||o)return;let x=new Array,T=m.length,h=g.length,O=0;function M(y,w,v){return x[x.length]={status:y,value:w,index:v}}switch(b){case"push":O=T;case"unshift":for(let y=0;y<h;y++)M("added",g[y],O+y);break;case"pop":O=T-1;case"shift":T&&M("deleted",m[O],O);break;case"splice":{let y=Math.min(Math.max(0,g[0]<0?T+g[0]:g[0]),T),w=h===1?T:Math.min(y+(g[1]||0),T),v=y+h-2,k=Math.max(w,v),P=new Array,j=new Array;for(let ne=y,ri=2;ne<k;++ne,++ri)ne<w&&j.push(M("deleted",m[ne],ne)),ne<v&&P.push(M("added",g[ri],ne));jn(j,P)}break;default:return}r=x}}Ue.compareArrays=rt;be.trackArrayChanges=Ue;function ce(n){if(n=n||[],typeof n!="object"||!("length"in n))throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");let e=Object.setPrototypeOf(F(n),ce.fn);return Ue(e),cn(e,{get:()=>{var t;return(t=e())==null?void 0:t.length}}),e}function $t(n){return S(n)&&typeof n.remove=="function"&&typeof n.push=="function"}ce.fn={remove(n){let e=this.peek(),t=new Array,r=typeof n=="function"&&!S(n)?n:function(i){return i===n};for(let i=0;i<e.length;i++){let o=e[i];if(r(o)){if(t.length===0&&this.valueWillMutate(),e[i]!==o)throw Error("Array modified during remove; cannot remove item");t.push(o),e.splice(i,1),i--}}return t.length&&this.valueHasMutated(),t},removeAll(n){if(n===void 0){let e=this.peek(),t=e.slice(0);return this.valueWillMutate(),e.splice(0,e.length),this.valueHasMutated(),t}return n?this.remove(function(e){return W(n,e)>=0}):[]},destroy(n){let e=this.peek(),t=typeof n=="function"&&!S(n)?n:function(r){return r===n};this.valueWillMutate();for(let r=e.length-1;r>=0;r--){let i=e[r];t(i)&&(i._destroy=!0)}this.valueHasMutated()},destroyAll(n){return n===void 0?this.destroy(function(){return!0}):n?this.destroy(function(e){return W(n,e)>=0}):[]},indexOf(n){return W(this(),n)},replace(n,e){let t=this.indexOf(n);t>=0&&(this.valueWillMutate(),this.peek()[t]=e,this.valueHasMutated())},sorted(n){return[...this()].sort(n)},reversed(){return[...this()].reverse()},[Symbol.iterator]:function*(){yield*Le(this())}};Object.setPrototypeOf(ce.fn,F.fn);L(["pop","push","reverse","shift","sort","splice","unshift"],function(n){ce.fn[n]=function(){let e=this.peek();this.valueWillMutate(),this.cacheDiffForKnownOperation(e,n,arguments);let t=e[n].apply(e,arguments);return this.valueHasMutated(),t===e?this:t}});L(["slice"],function(n){ce.fn[n]=function(){let e=this();return e[n].apply(e,arguments)}});ce.trackArrayChanges=Ue;var oa=10;function pt(n){if(arguments.length==0)throw new Error("When calling ko.toJS, pass the object you want to convert.");return Wi(n,function(e){for(let t=0;S(e)&&t<oa;t++)e=e();return e})}function dr(n,e,t){let r=pt(n);return JSON.stringify(r,e,t)}function Wi(n,e,t=new Map){if(n=e(n),!(typeof n=="object"&&n!==null&&n!==void 0&&!(n instanceof RegExp)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof Number)&&!(n instanceof Boolean)))return n;let i=n instanceof Array?[]:{};return t.set(n,i),sa(n,function(o){let s=e(n[o]);switch(typeof s){case"boolean":case"number":case"string":case"function":i[o]=s;break;case"object":case"undefined":{let a=t.get(s);i[o]=a!==void 0?a:Wi(s,e,t)}break}}),i}function sa(n,e){if(n instanceof Array){for(let t=0;t<n.length;t++)e(t);typeof n.toJSON=="function"&&e("toJSON")}else for(let t in n)e(t)}function cr(){}function aa(n,e){for(;typeof e=="function";)e=e();return e}function pr(n,e){return n==e}pr.precedence=10;function fr(n,e){return n!=e}fr.precedence=10;function mr(n,e){return n===e}mr.precedence=10;function hr(n,e){return n!==e}hr.precedence=10;var E={"@":aa,"#":(n,e)=>()=>p(e),"=>":cr,"!":function(e,t){return!t},"!!":function(e,t){return!!t},"++":function(e,t){return++t},"--":function(e,t){return--t},"**":function(e,t){return ii(e,t)},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return(e||0)-(t||0)},"&-":function(e,t){return-1*t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":pr,"!=":fr,"===":mr,"!==":hr,"&":function(e,t){return e&t},"^":function(e,t){return e^t},"|":function(e,t){return e|t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"??":function(e,t){return e!=null?e:t},".":function(e,t){return e==null?void 0:e[t]},"?.":function(e,t){return e==null?void 0:e[t]},"[":function(e,t){return e==null?void 0:e[t]},",":function(e,t){return t},call:function(e,t){return e.apply(null,t)}};E["@"].precedence=21;E["#"].precedence=21;E["."].precedence=19;E["["].precedence=19;E["?."].precedence=19;E["!"].precedence=16;E["!!"].precedence=16;E["++"].precedence=16;E["--"].precedence=16;E["&-"].precedence=16;E["**"].precedence=15;E["%"].precedence=14;E["*"].precedence=14;E["/"].precedence=14;E["+"].precedence=13;E["-"].precedence=13;E["|"].precedence=12;E["^"].precedence=11;E["&"].precedence=10;E["<"].precedence=11;E["<="].precedence=11;E[">"].precedence=11;E[">="].precedence=11;E["=="].precedence=10;E["!="].precedence=10;E["==="].precedence=10;E["!=="].precedence=10;E["&&"].precedence=6;E["||"].precedence=5;E["??"].precedence=5;E["&&"].earlyOut=n=>!n;E["||"].earlyOut=n=>n;E["??"].earlyOut=n=>n;E[","].precedence=2;E.call.precedence=1;E["=>"].precedence=1;Wn("strictEquality",{default:!1,set(n){E["=="]=n?mr:pr,E["!="]=n?hr:fr}});var Ui=Symbol("Node - Is Expression Or Identifier"),B=class n{constructor(e,t,r){d(this,"lhs");d(this,"op");d(this,"rhs");this.lhs=e,this.op=t,this.rhs=r}static get operators(){return E}get_leaf_value(e,t,r,i){return typeof e=="function"?p(e()):typeof e!="object"||e===null?e:e[n.isExpressionOrIdentifierSymbol]?p(e.get_value(void 0,t,r,i)):e}get_value(e,t,r,i){if(this.op===cr)return(...u)=>{let l=t;return this.lhs&&(l=this.lhs.extendContext(t,u)),this.get_leaf_value(this.rhs,l,r,this)};let o=this.get_leaf_value(this.lhs,t,r,this),s=this.op.earlyOut;if(s&&s(o))return o;let a=this.get_leaf_value(this.rhs,t,r,this);return this.op(o,a,t,r)}static get isExpressionOrIdentifierSymbol(){return Ui}get[Ui](){return!0}static value_of(e,t,r,i){return e&&e[n.isExpressionOrIdentifierSymbol]?e.get_value(e,t,r,i):e}static create_root(e,t=!1){let r=new Array,i=new Array;for(let o=0;o<e.length;o+=2){r.push(e[o]);let s=e[o+1],a=(s==null?void 0:s.precedence)||0;for(;i.length&&a<=i[i.length-1].precedence;){let u=r.pop(),l=r.pop();r.push(new n(l,i.pop(),u))}i.push(s)}if(r.length!==1)throw new Error(`unexpected nodes remain in shunting yard output stack: ${r}`);return r[0]}};E["?"]=function(e,t,r,i,o){return B.value_of(e?t.yes:t.no,r,i,o)};E["?"].precedence=4;var Oe=class{constructor(e){d(this,"nodes");d(this,"root");this.nodes=e,this.root=B.create_root(e)}get_value(e,t,r,i){return this.root||(this.root=B.create_root(this.nodes)),this.root.get_value(e,t,r,i)}};Oe.prototype[B.isExpressionOrIdentifierSymbol]=!0;var Ee=class{constructor(e,t){d(this,"parser");d(this,"args");this.parser=e,this.args=t}get_value(e,t,r,i){let o=new Array;for(let s=0,a=this.args.length;s<a;++s)o.push(B.value_of(this.args[s],t,r,i));return o}get[B.isExpressionOrIdentifierSymbol](){return!0}};var qi=/[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Qi=/[\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;var q=class n{constructor(e,t,r){d(this,"token");d(this,"dereferences");d(this,"parser");this.token=t,this.dereferences=r,this.parser=e}dereference(e,t,r,i){let o,s=this.dereferences||[],a=t.$data||{},u,l,f;for(l=0,f=s.length;l<f;++l)if(o=B.value_of(s[l],t,r,i),typeof e=="function"&&s[l]instanceof Ee)e=e.apply(u||a,o),u=e;else{if(e==null)return e;u=e,e=B.value_of(e[o],t,r,i)}return typeof e=="function"&&f>0&&u!==e&&!G(u,o)?e.bind(u):e}get_value(e,t,r,i){let o=e&&!(e instanceof n)?B.value_of(e,t,r,i)[this.token]:t.lookup(this.token,r,i);return this.dereference(o,t,r,i)}assign(e,t,r){Q(e[t])?e[t](r):S(e[t])||(e[t]=r)}set_value(e,t,r){let i=t.$data||{},o=this.dereferences||[],s=this.token,a,u,l;if(kt(i)&&s in i)l=i;else if(s in t)l=t;else if(s in r)l=r;else throw new Error("Identifier::set_value -- The property '"+s+"' does not exist on the $data, $context, or globals.");if(u=o.length,u===0){this.assign(l,s,e);return}for(l=l[s],a=0;a<u-1;++a)s=o[a],s instanceof Ee?l=l():l=l[B.value_of(s)];if(o[a]===!0)throw new Error("Cannot assign a value to a function.");o[a]&&this.assign(l,B.value_of(o[a]),e)}static is_valid_start_char(e){return qi.test(e)}static is_valid_continue_char(e){return Qi.test(e)}get[B.isExpressionOrIdentifierSymbol](){return!0}};var ft,gr=class gr{constructor(e,t){si(this,ft);t instanceof Oe&&(t=t.root);try{ai(this,ft,gr.nodeTreeToNames(t))}catch(r){e.error(r)}}extendContext(e,t){if($n(this,ft)){let r={};return $n(this,ft).forEach((i,o)=>{r[i]=t[o]}),e.extend(r)}else return e}get[B.isExpressionOrIdentifierSymbol](){return!0}static nodeTreeToNames(e){let t=new Array;for(;e;)if(e instanceof q)t.push(e.token),e=null;else if(this.isCommaNode(e))t.push(e.rhs.token),e=e.lhs;else throw new Error(`only simple identifiers allowed in lambda parameter list but found ${JSON.stringify(e,null,2)}`);return t.reverse(),t}static isCommaNode(e){return e instanceof B&&e.op===E[","]&&e.rhs instanceof q}};ft=new WeakMap;var jt=gr;var mt=class{constructor(e,t){d(this,"yes");d(this,"no");Object.assign(this,{yes:e,no:t})}get_value(){return this}get[B.isExpressionOrIdentifierSymbol](){return!0}};var Ki={"'":"'",'"':'"',"`":"`","\\":"\\","/":"/",$:"$",b:"\b",f:"\f",n:` `,r:"\r",t:" "},ke=class{constructor(){d(this,"ch");d(this,"at");d(this,"text");d(this,"currentContextGlobals")}white(){let e=this.ch;for(;e&&e<=" ";)e=this.next();return this.comment(e)}comment(e){if(e!=="/")return e;let t=this.at,r=this.lookahead();if(r==="/"){for(;e&&(e=this.next(),!(e===` `||e==="\r")););e=this.next()}else if(r==="*"){for(;e;)if(e=this.next(),e==="*"&&this.lookahead()==="/"){this.next();break}return e||this.error("Unclosed comment, starting at character "+t),this.next(),this.white()}return e}next(e){return e&&e!==this.ch&&this.error("Expected '"+e+"' but got '"+this.ch+"'"),this.ch=this.text.charAt(this.at),this.at+=1,this.ch}lookahead(){return this.text[this.at]}error(e){throw e instanceof Error?e:this.createError(e)}createError(e){let[t,r]=e.name?[e.name,e.message]:[e,""],i=` ${t} ${r} of ${this.text} `+Array(this.at).join(" ")+`_/ \u{1F525} \\_ `;return new Error(i)}name(){let e="",t;this.white();let r=this.ch;for((r==="'"||r==='"')&&(t=r,r=this.next());r;){if(t&&r===t)return this.white(),r=this.next(),r!==":"&&r!==","&&this.error("Object name: "+e+" missing closing "+t),e;if(r===":"||r<=" "||r===","||r==="|")return e;e+=r,r=this.next()}return e}number(){let e,t="",r=this.ch;for(r==="-"&&(t="-",r=this.next("-"));r>="0"&&r<="9";)t+=r,r=this.next();if(r===".")for(t+=".",r=this.next();r&&r>="0"&&r<="9";)t+=r,r=this.next();if(r==="e"||r==="E")for(t+=r,r=this.next(),(r==="-"||r==="+")&&(t+=r,r=this.next());r>="0"&&r<="9";)t+=r,r=this.next();if(e=+t,!isFinite(e))c.onError(new Error("Bad number: "+e+" in "+t));else return e}objectAddValue(e,t,r){r&&r[B.isExpressionOrIdentifierSymbol]?Object.defineProperty(e,t,{get:()=>B.value_of(r,...this.currentContextGlobals),enumerable:!0}):Array.isArray(r)?Object.defineProperty(e,t,{get:()=>r.map(i=>B.value_of(i,...this.currentContextGlobals)),enumerable:!0}):e[t]=r}object(){let e,t={},r=this.ch;if(r==="{"){if(this.next("{"),r=this.white(),r==="}")return r=this.next("}"),t;for(;r;){if(r==='"'||r==="'"||r==="`"?e=this.string():e=this.name(),G(t,e)&&this.error('Duplicate key "'+e+'"'),this.white()===":")r=this.next(":"),this.objectAddValue(t,e,this.singleValueExpression());else{let i=new q(this,e,[]);this.objectAddValue(t,e,i)}if(r=this.white(),r==="}")return r=this.next("}"),t;if(this.next(","),r=this.white(),r==="}")return r=this.next("}"),t}}throw this.createError("Bad object")}readString(e){let t="",r=[""],i=E["+"],o,s,a,u=e==="`",l=this.next();for(;l;){if(l===e)return l=this.next(),u&&r.push(i),r.push(t),r;if(l==="\\")if(l=this.next(),l==="u"){for(a=0,s=0;s<4&&(o=parseInt(l=this.next(),16),!!isFinite(o));s+=1)a=a*16+o;t+=String.fromCharCode(a)}else if(typeof Ki[l]=="string")t+=Ki[l];else break;else u&&l==="$"?(l=this.next(),l==="{"?(this.next("{"),r.push(i),r.push(t),r.push(i),r.push(this.expression()),t=""):t+="$"+l):t+=l;l=this.next()}throw this.createError("Bad string")}string(){var t,r;let e=this.ch;if(e==='"')return(t=this.readString('"'))==null?void 0:t.join("");if(e==="'")return(r=this.readString("'"))==null?void 0:r.join("");if(e==="`")return B.create_root(this.readString("`"));this.error("Bad string")}array(){let e=new Array,t=this.ch;if(t==="["){if(t=this.next("["),this.white(),t==="]")return t=this.next("]"),e;for(;t;){if(e.push(this.singleValueExpression()),t=this.white(),t==="]")return t=this.next("]"),e;this.next(","),t=this.white()}}throw this.createError("Bad array")}value(){this.white();let e=this.ch;switch(e){case"{":return this.object();case"[":return this.array();case'"':case"'":case"`":return this.string();case"-":return this.number();default:return e>="0"&&e<="9"?this.number():this.identifier()}}operator(e){let t="",r,i=this.white(),o=q.is_valid_start_char;for(;i&&!(o(i)||i<=" "||i===""||i==='"'||i==="'"||i==="{"||i==="("||i==="`"||i===")"||i<="9"&&i>="0"||!e.not_an_array&&i==="["||(t+=i,i=this.next(),i==="@"));)o=q.is_valid_continue_char;return t!==""&&(e.prefix&&t==="-"&&(t="&-"),r=E[t],r||this.error("Bad operator: '"+t+"'.")),r}filter(){let e=this.next(),t=new Array,r=function(s){return s},i=this.name();for(c.filters[i]||c.onError(new Error("Cannot find filter by the name of: "+i)),e=this.white();e;){if(e===":"&&(e=this.next(),t.push(this.singleValueExpression("|"))),e==="|"){r=this.filter();break}if(e===",")break;e=this.white()}function o(s,a,u,l,f){let m=[s];for(let b=0,g=t.length;b<g;++b)m.push(B.value_of(t[b],u,l,f));return r(c.filters[i].apply(u,m),a,u,l,f)}return o.precedence=1,o}expression(e=!1,t=!0){let r,i=new Array,o=this.white();for(;o&&(r=this.operator({prefix:!0}),r&&(i.push(void 0),i.push(r),o=this.white()),o==="("?(this.next(),i.push(this.expression()),this.next(")")):i.push(this.value()),o=this.white(),!(o===":"||o==="}"||o==="]"||o===")"||o===""||o==="`"||o==="|"&&e==="|"||o===","&&!t));){if(o==="|"&&this.lookahead()!=="|"&&e){i.push(this.filter()),i.push(void 0);break}if(r=this.operator({not_an_array:!0}),r===E["?"]){this.ternary(i);break}else r===E["."]||r===E["?."]?(i.push(r),i.push(this.member()),r=null):r===E["["]?(i.push(r),i.push(this.expression()),o=this.next("]"),r=null):r===E["=>"]?(i[i.length-1]=new jt(this,i[i.length-1]),i.push(r)):r&&i.push(r);if(o=this.white(),o==="]"||!r&&o==="(")break}if(i.length===0)return;let s=this.dereferences();if(i.length===1&&!s.length)return i[0];for(let a=0,u=s.length;a<u;++a){let l=s[a];l.constructor===Ee?i.push(E.call):i.push(E["."]),i.push(l)}return new Oe(i)}singleValueExpression(e=!1){return this.expression(e,!1)}ternary(e){let t=new mt;t.yes=this.singleValueExpression(),this.next(":"),t.no=this.singleValueExpression(),e.push(E["?"]),e.p