(function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("handlebars")):"function"==typeof define&&define.amd?define(["handlebars"],e):e(t.handlebars)})(this,(function(t){"use strict"
class e{validate(t){return this.value()===t}}e.id=0
const r=[],s=[]
class n{constructor(t,e){this.type=t,this.inner=e}value(){return(0,r[this.type])(this.inner)}validate(t){return(0,s[this.type])(this.inner,t)}}function i(t){let e=r.length
r.push(t=>t.value()),s.push((t,e)=>t.validate(e)),t.id=e}r.push(()=>0),s.push((t,e)=>0===e)
const a=new n(0,null)
r.push(()=>NaN),s.push((t,e)=>NaN===e)
const o=new n(1,null)
r.push(()=>c),s.push((t,e)=>e===c)
const l=new n(2,null)
function u({tag:t}){return t===a}function h(t){return t===a}let c=1
function p(){c++}class d extends e{static create(t=c){return new n(this.id,new d(t))}constructor(t=c){super(),this.revision=t}value(){return this.revision}dirty(){this.revision=++c}}function m(t){let e=[]
for(let r=0,s=t.length;r<s;r++){let s=t[r].tag
if(s===o)return o
s!==a&&e.push(s)}return b(e)}function f(t){let e=[],r=t.head()
for(;null!==r;){let s=r.tag
if(s===o)return o
s!==a&&e.push(s),r=t.nextNode(r)}return b(e)}function g(t){let e=[]
for(let r=0,s=t.length;r<s;r++){let s=t[r]
if(s===o)return o
s!==a&&e.push(s)}return b(e)}function b(t){switch(t.length){case 0:return a
case 1:return t[0]
case 2:return v.create(t[0],t[1])
default:return k.create(t)}}i(d)
class y extends e{constructor(){super(...arguments),this.lastChecked=null,this.lastValue=null}value(){let{lastChecked:t}=this
return t!==c&&(this.lastChecked=c,this.lastValue=this.compute()),this.lastValue}invalidate(){this.lastChecked=null}}class v extends y{static create(t,e){return new n(this.id,new v(t,e))}constructor(t,e){super(),this.first=t,this.second=e}compute(){return Math.max(this.first.value(),this.second.value())}}i(v)
class k extends y{static create(t){return new n(this.id,new k(t))}constructor(t){super(),this.tags=t}compute(){let{tags:t}=this,e=-1
for(let r=0;r<t.length;r++){let s=t[r].value()
e=Math.max(s,e)}return e}}i(k)
class w extends y{static create(t){return new n(this.id,new w(t))}constructor(t){super(),this.tag=t,this.lastUpdated=1}compute(){return Math.max(this.lastUpdated,this.tag.value())}update(t){t!==this.tag&&(this.tag=t,this.lastUpdated=c,this.invalidate())}}i(w)
class S extends y{static create(t=a){return new n(this.id,new S(t))}constructor(t,e=c){super(),this.tag=t,this.lastUpdated=1,this.revision=e}compute(){return Math.max(this.lastUpdated,this.tag.value(),this.revision)}update(t){t!==this.tag&&(this.tag=t,this.lastUpdated=c,this.invalidate())}dirty(){this.revision=++c}}i(S)
class E{constructor(t){this.lastValue=null,this.lastRevision=null,this.initialized=!1,this.tag=t.tag,this.reference=t}peek(){return this.initialized?this.lastValue:this.initialize()}revalidate(){if(!this.initialized)return this.initialize()
let{reference:t,lastRevision:e}=this,r=t.tag
if(r.validate(e))return A
this.lastRevision=r.value()
let{lastValue:s}=this,n=t.value()
return n===s?A:(this.lastValue=n,n)}initialize(){let{reference:t}=this,e=this.lastValue=t.value()
return this.lastRevision=t.tag.value(),this.initialized=!0,e}}const A="adb3b78e-3d22-4e4b-877a-6317c2c5c145"
const N=Object.freeze([])
function T(t,e){if(!t)throw new Error(e||"assertion failure")}let C=0
function x(t){return t._guid=++C}function L(){return Object.create(null)}class D{constructor(){this.dict=L()}add(t){var e
return"string"==typeof t?this.dict[t]=t:this.dict[(e=t,e._guid||x(e))]=t,this}delete(t){"string"==typeof t?delete this.dict[t]:t._guid&&delete this.dict[t._guid]}}class _{constructor(){this.stack=[],this.current=null}get size(){return this.stack.length}push(t){this.current=t,this.stack.push(t)}pop(){let t=this.stack.pop(),e=this.stack.length
return this.current=0===e?null:this.stack[e-1],void 0===t?null:t}nth(t){let e=this.stack.length
return e<t?null:this.stack[e-t]}isEmpty(){return 0===this.stack.length}toArray(){return this.stack}}const B="DESTROY [fc611582-3742-4845-88e1-971c3775e0b8]"
function O(t){let e=t.firstChild
for(;e;){let r=e.nextSibling
t.removeChild(e),e=r}}const R=new WeakMap,V="DROP [94d46cf3-3974-435d-b278-3e60d1155290]",q="CHILDREN [7142e52a-8600-4e01-a773-42055b96630d]",I=new WeakMap
function P(t,e){M(t,U(e))}function M(t,e){let r=R.get(t)
r||(r=new Set,R.set(t,r)),r.add(e)}function z(t){let e=R.get(t)
e&&e.forEach(t=>{t[V](),e.delete(t)})}function U(t){let e=I.get(t)
return e||(e=function(t){return!(!t||!(B in t))}(t)?new H(t):function(t){return!(!t||"object"!=typeof t||"function"!=typeof t.destroy)}(t)?new F(t):new $(t),I.set(t,e)),e}class j{constructor(t){this.destructors=t}[V](){this.destructors.forEach(t=>t[V]())}get[q](){return this.destructors}toString(){return"SnapshotDestructor"}}class H{constructor(t){this.inner=t}[V](){this.inner[B](),z(this.inner)}get[q](){return R.get(this.inner)||[]}toString(){return"DestroyableDestructor"}}class F{constructor(t){this.inner=t}[V](){this.inner.destroy(),z(this.inner)}get[q](){return R.get(this.inner)||[]}toString(){return"StringDestroyableDestructor"}}class ${constructor(t){this.inner=t}[V](){z(this.inner)}get[q](){return R.get(this.inner)||[]}toString(){return"SimpleDestructor"}}class G{constructor(){this.clear()}head(){return this._head}tail(){return this._tail}clear(){this._head=this._tail=null}toArray(){let t=[]
return this.forEachNode(e=>t.push(e)),t}nextNode(t){return t.next}forEachNode(t){let e=this._head
for(;null!==e;)t(e),e=e.next}insertBefore(t,e=null){return null===e?this.append(t):(e.prev?e.prev.next=t:this._head=t,t.prev=e.prev,t.next=e,e.prev=t,t)}append(t){let e=this._tail
return e?(e.next=t,t.prev=e,t.next=null):this._head=t,this._tail=t}remove(t){return t.prev?t.prev.next=t.next:this._head=t.next,t.next?t.next.prev=t.prev:this._tail=t.prev,t}[V](){this.forEachNode(t=>U(t)[V]())}get[q](){let t=[]
return this.forEachNode(e=>t.push(...U(e)[q])),t}}class J{constructor(t,e){this._head=t,this._tail=e}forEachNode(t){let e=this._head
for(;null!==e;)t(e),e=this.nextNode(e)}head(){return this._head}tail(){return this._tail}toArray(){let t=[]
return this.forEachNode(e=>t.push(e)),t}nextNode(t){return t===this._tail?null:t.next}}const{keys:Y}=Object
function W(t){for(let e=1;e<arguments.length;e++){let r=arguments[e]
if(null===r||"object"!=typeof r)continue
let s=Y(r)
for(let e=0;e<s.length;e++){let n=s[e]
t[n]=r[n]}}return t}function Q(t,e){if(null==t)throw new Error(e)
return t}function K(t="unreachable"){return new Error(t)}function Z(t){throw new Error("Exhausted "+t)}const X=(...t)=>t
d.create()
const tt=new class{constructor(t){this.inner=t,this.tag=a}value(){return this.inner}get(t){return tt}}(void 0)
class et{constructor(t){this.inner=t,this.tag=a}value(){return this.inner}get(t){return tt}}class rt extends class{constructor(t){this.next=null,this.prev=null,this.value=t}}{constructor(t,e){super(t.valueReferenceFor(e)),this.retained=!1,this.seen=!1,this.key=e.key,this.iterable=t,this.memo=t.memoReferenceFor(e)}update(t){this.retained=!0,this.iterable.updateValueReference(this.value,t),this.iterable.updateMemoReference(this.memo,t)}shouldRemove(){return!this.retained}reset(){this.retained=!1,this.seen=!1}}class st{constructor(t){this.iterator=null,this.map=new Map,this.list=new G,this.tag=t.tag,this.iterable=t}isEmpty(){return(this.iterator=this.iterable.iterate()).isEmpty()}iterate(){let t
return t=null===this.iterator?this.iterable.iterate():this.iterator,this.iterator=null,t}advanceToKey(t,e){let r=e
for(;null!==r&&r.key!==t;)r=this.advanceNode(r)
return r}has(t){return this.map.has(t)}get(t){return this.map.get(t)}wasSeen(t){let e=this.map.get(t)
return void 0!==e&&e.seen}update(t){let e=this.get(t.key)
return e.update(t),e}append(t){let{map:e,list:r,iterable:s}=this,n=new rt(s,t)
return e.set(t.key,n),r.append(n),n}insertBefore(t,e){let{map:r,list:s,iterable:n}=this,i=new rt(n,t)
return r.set(t.key,i),i.retained=!0,s.insertBefore(i,e),i}move(t,e){let{list:r}=this
t.retained=!0,r.remove(t),r.insertBefore(t,e)}remove(t){let{list:e}=this
e.remove(t),this.map.delete(t.key)}nextNode(t){return this.list.nextNode(t)}advanceNode(t){return t.seen=!0,this.list.nextNode(t)}head(){return this.list.head()}}class nt{constructor(t){this.iterator=null
let e=new st(t)
this.artifacts=e}next(){let{artifacts:t}=this,e=(this.iterator=this.iterator||t.iterate()).next()
return null===e?null:t.append(e)}}var it;(function(t){t[t.Append=0]="Append",t[t.Prune=1]="Prune",t[t.Done=2]="Done"})(it||(it={}))
const at="END [2600abdf-889f-4406-b059-b44ecbafa5c5]"
class ot{constructor({target:t,artifacts:e,env:r}){this.target=t,this.artifacts=e,this.iterator=e.iterate(),this.current=e.head(),this.env=r}sync(){let t=it.Append
for(;;)switch(t){case it.Append:t=this.nextAppend()
break
case it.Prune:t=this.nextPrune()
break
case it.Done:return void this.nextDone()}}advanceToKey(t){let{current:e,artifacts:r}=this
if(null===e)return
let s=r.advanceNode(e)
if(s.key===t)return void(this.current=r.advanceNode(s))
let n=r.advanceToKey(t,e)
n&&(this.move(n,e),this.current=r.nextNode(e))}move(t,e){t.next!==e&&(this.artifacts.move(t,e),this.target.move(this.env,t.key,t.value,t.memo,e?e.key:at))}nextAppend(){let{iterator:t,current:e,artifacts:r}=this,s=t.next()
if(null===s)return this.startPrune()
let{key:n}=s
return null!==e&&e.key===n?this.nextRetain(s,e):r.has(n)?this.nextMove(s):this.nextInsert(s),it.Append}nextRetain(t,e){let{artifacts:r}=this
e.update(t),this.current=r.nextNode(e),this.target.retain(this.env,t.key,e.value,e.memo)}nextMove(t){let{current:e,artifacts:r}=this,{key:s}=t,n=r.update(t)
r.wasSeen(s)?this.move(n,e):this.advanceToKey(s)}nextInsert(t){let{artifacts:e,target:r,current:s}=this,n=e.insertBefore(t,s)
r.insert(this.env,n.key,n.value,n.memo,s?s.key:null)}startPrune(){return this.current=this.artifacts.head(),it.Prune}nextPrune(){let{artifacts:t,target:e,current:r}=this
if(null===r)return it.Done
let s=r
return this.current=t.nextNode(s),s.shouldRemove()?(t.remove(s),e.delete(this.env,s.key)):s.reset(),it.Prune}nextDone(){this.target.done(this.env)}}class lt{constructor(){this.tags=new Set}add(t){this.tags.add(t)}combine(){let{tags:t}=this
return 0===t.size?a:g(Array.from(t))}}function ut(...t){let[e,r,s]=t
if(s)return s.get?function(t,e,r){let s=ft(t)
s.trackedProperties[e]=!0,s.trackedComputedProperties[e]=!0
let n=r.get,i=r.set
return{enumerable:!0,configurable:!1,get:function(){let t=ht,r=ht=new lt,s=n.call(this)
ht=t
let i=r.combine()
return ht&&ht.add(i),ft(this).updatableTagFor(e).inner.update(i),s},set:i?function(){p(),ft(this).updatableTagFor(e).inner.update(d.create()),i.apply(this,arguments)}:void 0}}(e,r,s):ct(e,r,s)
Object.defineProperty(e,r,ct(e,r))}let ht=null
function ct(t,e,r){T(!r||!r.value&&!r.get&&!r.set,`You attempted to use @tracked on ${e}, but that element is not a class field. @tracked is only usable on class fields. Native getters and setters will autotrack add any tracked fields they encounter, so there is no need mark getters and setters with @tracked.`)
ft(t).trackedProperties[e]=!0
const s=r?r.initializer:void 0,n=new WeakMap,i="function"==typeof s
return{enumerable:!0,configurable:!0,get(){let t
return pt(this,e),i&&!n.has(this)?(t=s.call(this),n.set(this,t)):t=n.get(this),t},set(t){ft(this).tagFor(e).inner.dirty(),n.set(this,t),bt()}}}function pt(t,e){ht&&ht.add(ft(t).tagFor(e))}class dt{constructor(t){this.tags=L(),this.computedPropertyTags=L(),this.trackedProperties=t?Object.create(t.trackedProperties):L(),this.trackedComputedProperties=t?Object.create(t.trackedComputedProperties):L()}tagFor(t){let e=this.tags[t]
return e||(this.trackedComputedProperties[t]?this.tags[t]=w.create(a):this.tags[t]=d.create())}updatableTagFor(t){return this.tags[t]||(this.tags[t]=w.create(a))}}const mt=new WeakMap
function ft(t){let e=mt.get(t)
if(e)return e
let r=function(t){let e=null,r=t
for(;!e;){if(r=gt(r),!r)return e
e=mt.get(r)}return e}(t)
return e=new dt(r),mt.set(t,e),e}const gt=Object.getPrototypeOf
let bt=function(){}
class yt extends Error{constructor(t,e,r){super(r),this.target=t,this.key=e}static for(t,e){return new yt(t,e,`The property '${e}' on ${t} was changed after being rendered. If you want to change a property used in a template after the component has rendered, mark the property as a tracked property with the @tracked decorator.`)}}function vt(t,e){throw yt.for(t,e)}function kt(t,e,r=vt){return"object"==typeof t&&t?ft(t).tagFor(e):a}class wt{constructor(t,e=null){this._registry=t,this._resolver=e,this._lookups={},this._factoryDefinitionLookups={}}factoryFor(t){let e=this._factoryDefinitionLookups[t]
if(e||(this._resolver&&(e=this._resolver.retrieve(t)),e||(e=this._registry.registration(t)),e&&(this._factoryDefinitionLookups[t]=e)),e)return this.buildFactory(t,e)}lookup(t){let e=!1!==this._registry.registeredOption(t,"singleton")
if(e&&this._lookups[t])return this._lookups[t]
let r=this.factoryFor(t)
if(!r)return
if(!1===this._registry.registeredOption(t,"instantiate"))return r.class
let s=r.create()
return e&&s&&(this._lookups[t]=s),s}defaultInjections(t){return{}}buildInjections(t){let e,r=this.defaultInjections(t),s=this._registry.registeredInjections(t)
for(let n=0;n<s.length;n++)e=s[n],r[e.property]=this.lookup(e.source)
return r}buildFactory(t,e){let r=this.buildInjections(t)
return{class:e,create(t){let s=Object.assign({},r,t)
return e.create(s)}}}}class St{constructor(t){this._registrations={},this._registeredOptions={},this._registeredInjections={},t&&t.fallback&&(this._fallback=t.fallback)}register(t,e,r){this._registrations[t]=e,r&&(this._registeredOptions[t]=r)}registration(t){let e=this._registrations[t]
return void 0===e&&this._fallback&&(e=this._fallback.registration(t)),e}unregister(t){delete this._registrations[t],delete this._registeredOptions[t],delete this._registeredInjections[t]}registerOption(t,e,r){let s=this._registeredOptions[t]
s||(s={},this._registeredOptions[t]=s),s[e]=r}registeredOption(t,e){let r,s=this.registeredOptions(t)
return s&&(r=s[e]),void 0===r&&void 0!==this._fallback&&(r=this._fallback.registeredOption(t,e)),r}registeredOptions(t){let e=this._registeredOptions[t]
if(void 0===e){let[r]=t.split(":")
e=this._registeredOptions[r]}return e}unregisterOption(t,e){let r=this._registeredOptions[t]
r&&delete r[e]}registerInjection(t,e,r){let s=this._registeredInjections[t]
void 0===s&&(this._registeredInjections[t]=s=[]),s.push({property:e,source:r})}registeredInjections(t){let[e]=t.split(":"),r=this._fallback?this._fallback.registeredInjections(t):[]
return Array.prototype.push.apply(r,this._registeredInjections[e]),Array.prototype.push.apply(r,this._registeredInjections[t]),r}}function Et(t){return t.__owner__}function At(t,e){t.__owner__=e}var Nt,Tt
const Ct=Symbol("destroying"),xt=Symbol("destroyed")
Nt=Ct,Tt=xt
class Lt extends class{constructor(t,e){this[Nt]=!1,this[Tt]=!1,this.args=e,At(this,t)}get isDestroying(){return this[Ct]}get isDestroyed(){return this[xt]}willDestroy(){}}{constructor(){super(...arguments),this.debugName=null}get args(){return pt(this,"args"),this.__args__}set args(t){this.__args__=t,ft(this).updatableTagFor("args").inner.update(l)}toString(){return this.debugName+" component"}didInsertElement(){}didUpdate(){}get element(){let{bounds:t}=this
return T(t&&t.firstNode===t.lastNode,"The 'element' property can only be accessed on components that contain a single root element in their template. Try using 'bounds' instead to access the first and last nodes."),t.firstNode}}const Dt={attributeHook:!0,createArgs:!0,createCaller:!1,createInstance:!0,dynamicLayout:!1,dynamicScope:!1,dynamicTag:!0,elementHook:!0,prepareArgs:!1,updateHook:!0,wrapped:!1}
class _t{constructor(t,e,r,s){this.name=t,this.manager=e,this.ComponentClass=r,this.handle=s,this.state={name:t,capabilities:Dt,ComponentClass:r,handle:s}}toJSON(){return{GlimmerDebug:`<component-definition name="${this.name}">`}}}class Bt{constructor(t){this._bounds=t}get firstNode(){return this._bounds.firstNode()}get lastNode(){return this._bounds.lastNode()}}function Ot(t){return t<=3}var Rt,Vt;(function(t){t[t.s0=4]="s0",t[t.s1=5]="s1"})(Rt||(Rt={})),function(t){t[t.t0=6]="t0",t[t.t1=7]="t1"}(Vt||(Vt={}))
const qt="INNER_VM [dca1b7fe-b48e-462e-b775-08fd7a31017e]",It="DESTRUCTOR_STACK [e42a81ff-9d89-4d65-9ad9-be4c9590fdad]",Pt="STACKS [70876a06-8897-4609-a396-e9b0ceac967b]",Mt="REGISTERS [435c3390-2d57-430f-954a-1bf98d880ce0]",zt="HEAP [06377b5b-f0b2-4933-913a-da577a047a0a]",Ut="CONSTANTS [340fd695-d3f5-4492-91db-7f923ae95d8e]",jt="ARGS [5cd2e5b3-8a3b-4c2f-ac4f-96e360253d6f]"
class Ht{constructor(t,e){this.element=t,this.nextSibling=e}}class Ft{constructor(t,e,r){this.parentNode=t,this.first=e,this.last=r}parentElement(){return this.parentNode}firstNode(){return this.first}lastNode(){return this.last}}class $t{constructor(t,e){this.parentNode=t,this.node=e}parentElement(){return this.parentNode}firstNode(){return this.node}lastNode(){return this.node}}function Gt(t,e){let r=t.parentElement(),s=t.firstNode(),n=t.lastNode(),i=s
for(;;){let t=i.nextSibling
if(r.insertBefore(i,e),i===n)return t
i=t}}function Jt(t){let e=t.parentElement(),r=t.firstNode(),s=t.lastNode(),n=r
for(;;){let t=n.nextSibling
if(e.removeChild(n),n===s)return t
n=t}}function Yt(t,e){let r=function(t){let e=R.get(t)
return e&&e.size>0?(R.delete(t),e):null}(t)
r&&e.didDestroy(new j(r))}function Wt(t,e){e.didDestroy(U(t))}var Qt
class Kt{constructor(t){this.node=t}firstNode(){return this.node}}class Zt{constructor(t){this.node=t}lastNode(){return this.node}}const Xt="CURSOR_STACK [31ea0d2f-7c22-4814-9db7-28e4469b54e6]"
class te{constructor(t,e,r){this.constructing=null,this.operations=null,this[Qt]=new _,this.modifierStack=new _,this.blockStack=new _,this.pushElement(e,r),this.env=t,this.dom=t.getAppendOperations(),this.updateOperations=t.getDOM()}static forInitialRender(t,e){return new this(t,e.element,e.nextSibling).initialize()}static resume(t,e){let r=new this(t,e.parentElement(),e.reset(t)).initialize()
return r.pushLiveBlock(e),r}initialize(){return this.pushSimpleBlock(),this}debugBlocks(){return this.blockStack.toArray()}get element(){return this[Xt].current.element}get nextSibling(){return this[Xt].current.nextSibling}block(){return this.blockStack.current}popElement(){this[Xt].pop(),this[Xt].current}pushSimpleBlock(){return this.pushLiveBlock(new ee(this.element))}pushUpdatableBlock(){return this.pushLiveBlock(new se(this.element))}pushBlockList(t){return this.pushLiveBlock(new ne(this.element,t))}pushLiveBlock(t,e=!1){let r=this.blockStack.current
return null!==r&&(e||r.didAppendBounds(t)),this.__openBlock(),this.blockStack.push(t),t}popBlock(){return this.block().finalize(this),this.__closeBlock(),this.blockStack.pop()}__openBlock(){}__closeBlock(){}openElement(t){let e=this.__openElement(t)
return this.constructing=e,e}__openElement(t){return this.dom.createElement(t,this.element)}flushElement(t){let e=this.element,r=this.constructing
this.__flushElement(e,r),this.constructing=null,this.operations=null,this.pushModifiers(t),this.pushElement(r,null),this.didOpenElement(r)}__flushElement(t,e){this.dom.insertBefore(t,e,this.nextSibling)}closeElement(){return this.willCloseElement(),this.popElement(),this.popModifiers()}pushRemoteElement(t,e,r){return this.__pushRemoteElement(t,e,r)}__pushRemoteElement(t,e,r){if(this.pushElement(t,r),void 0===r)for(;t.lastChild;)t.removeChild(t.lastChild)
let s=new re(t)
return this.pushLiveBlock(s,!0)}popRemoteElement(){this.popBlock(),this.popElement()}pushElement(t,e=null){this[Xt].push(new Ht(t,e))}pushModifiers(t){this.modifierStack.push(t)}popModifiers(){return this.modifierStack.pop()}didAppendBounds(t){return this.block().didAppendBounds(t),t}didAppendNode(t){return this.block().didAppendNode(t),t}didOpenElement(t){return this.block().openElement(t),t}willCloseElement(){this.block().closeElement()}appendText(t){return this.didAppendNode(this.__appendText(t))}__appendText(t){let{dom:e,element:r,nextSibling:s}=this,n=e.createTextNode(t)
return e.insertBefore(r,n,s),n}__appendNode(t){return this.dom.insertBefore(this.element,t,this.nextSibling),t}__appendFragment(t){let e=t.firstChild
if(e){let r=new Ft(this.element,e,t.lastChild)
return this.dom.insertBefore(this.element,t,this.nextSibling),r}return new $t(this.element,this.__appendComment(""))}__appendHTML(t){return this.dom.insertHTMLBefore(this.element,this.nextSibling,t)}appendDynamicHTML(t){let e=this.trustedContent(t)
this.didAppendBounds(e)}appendDynamicText(t){let e=this.untrustedContent(t)
return this.didAppendNode(e),e}appendDynamicFragment(t){let e=this.__appendFragment(t)
this.didAppendBounds(e)}appendDynamicNode(t){let e=this.__appendNode(t),r=new $t(this.element,e)
this.didAppendBounds(r)}trustedContent(t){return this.__appendHTML(t)}untrustedContent(t){return this.__appendText(t)}appendComment(t){return this.didAppendNode(this.__appendComment(t))}__appendComment(t){let{dom:e,element:r,nextSibling:s}=this,n=e.createComment(t)
return e.insertBefore(r,n,s),n}__setAttribute(t,e,r){this.dom.setAttribute(this.constructing,t,e,r)}__setProperty(t,e){this.constructing[t]=e}setStaticAttribute(t,e,r){this.__setAttribute(t,e,r)}setDynamicAttribute(t,e,r,s){let n=this.constructing,i=this.env.attributeFor(n,t,r,s)
return i.set(this,e,this.env),i}}Qt=Xt
class ee{constructor(t){this.parent=t,this.first=null,this.last=null,this.destroyables=null,this.nesting=0}parentElement(){return this.parent}firstNode(){return this.first.firstNode()}lastNode(){return this.last.lastNode()}openElement(t){this.didAppendNode(t),this.nesting++}closeElement(){this.nesting--}didAppendNode(t){0===this.nesting&&(this.first||(this.first=new Kt(t)),this.last=new Zt(t))}didAppendBounds(t){0===this.nesting&&(this.first||(this.first=t),this.last=t)}finalize(t){null===this.first&&t.appendComment("")}}class re extends ee{[B](){Jt(this)}}class se extends ee{reset(t){let e=function(t,e){return Yt(t,e),Jt(t)}(this,t)
return this.first=null,this.last=null,this.destroyables=null,this.nesting=0,e}}class ne{constructor(t,e){this.parent=t,this.boundList=e,this.parent=t,this.boundList=e}parentElement(){return this.parent}firstNode(){return this.boundList.head().firstNode()}lastNode(){return this.boundList.tail().lastNode()}openElement(t){}closeElement(){}didAppendNode(t){}didAppendBounds(t){}finalize(t){}}const ie={foreignObject:1,desc:1,title:1},ae=Object.create(null)
class oe{constructor(t){this.document=t,this.setupUselessElement()}setupUselessElement(){this.uselessElement=this.document.createElement("div")}createElement(t,e){let r,s
if(e?(r="http://www.w3.org/2000/svg"===e.namespaceURI||"svg"===t,s=!!ie[e.tagName]):(r="svg"===t,s=!1),r&&!s){if(ae[t])throw new Error(`Cannot create a ${t} inside an SVG context`)
return this.document.createElementNS("http://www.w3.org/2000/svg",t)}return this.document.createElement(t)}insertBefore(t,e,r){t.insertBefore(e,r)}insertHTMLBefore(t,e,r){if(""===r){let r=this.createComment("")
return t.insertBefore(r,e),new Ft(t,r,r)}let s,n=e?e.previousSibling:t.lastChild
if(null===e)t.insertAdjacentHTML("beforeend",r),s=t.lastChild
else if(e instanceof HTMLElement)e.insertAdjacentHTML("beforebegin",r),s=e.previousSibling
else{let{uselessElement:n}=this
t.insertBefore(n,e),n.insertAdjacentHTML("beforebegin",r),s=n.previousSibling,t.removeChild(n)}let i=n?n.nextSibling:t.firstChild
return new Ft(t,i,s)}createTextNode(t){return this.document.createTextNode(t)}createComment(t){return this.document.createComment(t)}}function le(t,e,r){if(!t)return e
if(!function(t,e){let r=t.createElementNS(e,"svg")
try{r.insertAdjacentHTML("beforeend","<circle></circle>")}catch(s){}finally{return 1!==r.childNodes.length||"http://www.w3.org/2000/svg"!==r.firstChild.namespaceURI}}(t,r))return e
let s=t.createElement("div")
return class extends e{insertHTMLBefore(t,e,n){return""===n||t.namespaceURI!==r?super.insertHTMLBefore(t,e,n):function(t,e,r,s){let n
if("FOREIGNOBJECT"===t.tagName.toUpperCase()){let t="<svg><foreignObject>"+r+"</foreignObject></svg>"
O(e),e.insertAdjacentHTML("afterbegin",t),n=e.firstChild.firstChild}else{let t="<svg>"+r+"</svg>"
O(e),e.insertAdjacentHTML("afterbegin",t),n=e.firstChild}return function(t,e,r){let s=t.firstChild,n=s,i=s
for(;i;){let t=i.nextSibling
e.insertBefore(i,r),n=i,i=t}return new Ft(e,s,n)}(n,t,s)}(t,s,n,e)}}}function ue(t,e){return t&&function(t){let e=t.createElement("div")
if(e.appendChild(t.createTextNode("first")),e.insertAdjacentHTML("beforeend","second"),2===e.childNodes.length)return!1
return!0}(t)?class extends e{constructor(t){super(t),this.uselessComment=t.createComment("")}insertHTMLBefore(t,e,r){if(""===r)return super.insertHTMLBefore(t,e,r)
let s=!1,n=e?e.previousSibling:t.lastChild
n&&n instanceof Text&&(s=!0,t.insertBefore(this.uselessComment,e))
let i=super.insertHTMLBefore(t,e,r)
return s&&t.removeChild(this.uselessComment),i}}:e}["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","main","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].forEach(t=>ae[t]=1)
let he="undefined"==typeof document?null:document
var ce;(function(t){class e extends oe{createElementNS(t,e){return this.document.createElementNS(t,e)}setAttribute(t,e,r,s=null){s?t.setAttributeNS(s,e,r):t.setAttribute(e,r)}}t.TreeConstruction=e
let r=e
r=ue(he,r),r=le(he,r,"http://www.w3.org/2000/svg"),t.DOMTreeConstruction=r})(ce||(ce={}))
let pe=class extends oe{constructor(t){super(t),this.document=t,this.namespace=null}setAttribute(t,e,r){t.setAttribute(e,r)}removeAttribute(t,e){t.removeAttribute(e)}insertAfter(t,e,r){this.insertBefore(t,e,r.nextSibling)}}
pe=ue(he,pe),pe=le(he,pe,"http://www.w3.org/2000/svg")
var de=pe
const me=ce.DOMTreeConstruction
class fe extends et{constructor(t){super(t)}static create(t){return void 0===t?ye:null===t?ve:!0===t?ke:!1===t?we:"number"==typeof t?new be(t):new ge(t)}get(t){return ye}}class ge extends fe{constructor(){super(...arguments),this.lengthReference=null}get(t){if("length"===t){let{lengthReference:t}=this
return null===t&&(t=this.lengthReference=new be(this.inner.length)),t}return super.get(t)}}class be extends fe{constructor(t){super(t)}}const ye=new be(void 0),ve=new be(null),ke=new be(!0),we=new be(!1)
class Se{constructor(t,e=Ee){this.inner=t,this.toBool=e,this.tag=t.tag}value(){return this.toBool(this.inner.value())}}function Ee(t){return!!t}function Ae(t){return Ne(t)?"":String(t)}function Ne(t){return null==t||"function"!=typeof t.toString}function Te(t){return"object"==typeof t&&null!==t&&"function"==typeof t.toHTML}function Ce(t){return"object"==typeof t&&null!==t&&"number"==typeof t.nodeType}function xe(t){return"string"==typeof t}function Le(t,e){let r,s
if(e in t)s=e,r="prop"
else{let n=e.toLowerCase()
n in t?(r="prop",s=n):(r="attr",s=e)}return"prop"!==r||"style"!==s.toLowerCase()&&!function(t,e){let r=De[t.toUpperCase()]
return r&&r[e.toLowerCase()]||!1}(t.tagName,s)||(r="attr"),{normalized:s,type:r}}const De={INPUT:{form:!0,autocorrect:!0,list:!0},SELECT:{form:!0},OPTION:{form:!0},TEXTAREA:{form:!0},LABEL:{form:!0},FIELDSET:{form:!0},LEGEND:{form:!0},OBJECT:{form:!0},BUTTON:{form:!0}}
const _e=["javascript:","vbscript:"],Be=["A","BODY","LINK","IMG","IFRAME","BASE","FORM"],Oe=["EMBED"],Re=["href","src","background","action"],Ve=["src"]
function qe(t,e){return-1!==t.indexOf(e)}function Ie(t,e){return(null===t||qe(Be,t))&&qe(Re,e)}function Pe(t,e){return null!==t&&(qe(Oe,t)&&qe(Ve,e))}function Me(t,e){return Ie(t,e)||Pe(t,e)}function ze(t,e,r,s){let n=null
if(null==s)return s
if(Te(s))return s.toHTML()
n=e?e.tagName.toUpperCase():null
let i=Ae(s)
if(Ie(n,r)){let e=t.protocolForURL(i)
if(qe(_e,e))return"unsafe:"+i}return Pe(n,r)?"unsafe:"+i:i}function Ue(t,e,r){let{tagName:s,namespaceURI:n}=t,i={element:t,name:e,namespace:r}
if("http://www.w3.org/2000/svg"===n)return je(s,e,i)
let{type:a,normalized:o}=Le(t,e)
return"attr"===a?je(s,o,i):function(t,e,r){if(Me(t,e))return new Ge(e,r)
if(function(t,e){return("INPUT"===t||"TEXTAREA"===t)&&"value"===e}(t,e))return new Ye(e,r)
if(function(t,e){return"OPTION"===t&&"selected"===e}(t,e))return new We(e,r)
return new $e(e,r)}(s,o,i)}function je(t,e,r){return Me(t,e)?new Je(r):new Fe(r)}class He{constructor(t){this.attribute=t}}class Fe extends He{set(t,e,r){let s=Qe(e)
if(null!==s){let{name:e,namespace:r}=this.attribute
t.__setAttribute(e,s,r)}}update(t,e){let r=Qe(t),{element:s,name:n}=this.attribute
null===r?s.removeAttribute(n):s.setAttribute(n,r)}}class $e extends He{constructor(t,e){super(e),this.normalizedName=t}set(t,e,r){null!=e&&(this.value=e,t.__setProperty(this.normalizedName,e))}update(t,e){let{element:r}=this.attribute
this.value!==t&&(r[this.normalizedName]=this.value=t,null==t&&this.removeAttribute())}removeAttribute(){let{element:t,namespace:e}=this.attribute
e?t.removeAttributeNS(e,this.normalizedName):t.removeAttribute(this.normalizedName)}}class Ge extends $e{set(t,e,r){let{element:s,name:n}=this.attribute,i=ze(r,s,n,e)
super.set(t,i,r)}update(t,e){let{element:r,name:s}=this.attribute,n=ze(e,r,s,t)
super.update(n,e)}}class Je extends Fe{set(t,e,r){let{element:s,name:n}=this.attribute,i=ze(r,s,n,e)
super.set(t,i,r)}update(t,e){let{element:r,name:s}=this.attribute,n=ze(e,r,s,t)
super.update(n,e)}}class Ye extends $e{set(t,e){t.__setProperty("value",Ae(e))}update(t){let e=this.attribute.element,r=e.value,s=Ae(t)
r!==s&&(e.value=s)}}class We extends $e{set(t,e){null!=e&&!1!==e&&t.__setProperty("selected",!0)}update(t){let e=this.attribute.element
e.selected=!!t}}function Qe(t){return!1===t||null==t||void 0===t.toString?null:!0===t?"":"function"==typeof t?null:String(t)}const Ke={},Ze=Object.freeze([])
class Xe{constructor(t){this.strings=t.strings,this.arrays=t.arrays,this.handles=t.handles,this.numbers=t.numbers,this.others=[]}getString(t){return this.strings[t]}getNumber(t){return this.numbers[t]}getStringArray(t){let e=this.getArray(t),r=new Array(e.length)
for(let s=0;s<e.length;s++){let t=e[s]
r[s]=this.getString(t)}return r}getArray(t){return this.arrays[t]}getTemplateMeta(t){return JSON.parse(this.strings[t])}getOther(t){return this.others[t]}}class tr extends class{constructor(){this.strings=[],this.arrays=[Ze],this.tables=[],this.handles=[],this.resolved=[],this.numbers=[],this.others=[]}other(t){return this.others.push(t)-1}string(t){let e=this.strings.indexOf(t)
return e>-1?e:this.strings.push(t)-1}stringArray(t){let e=new Array(t.length)
for(let r=0;r<t.length;r++)e[r]=this.string(t[r])
return this.array(e)}array(t){if(0===t.length)return 0
let e=this.arrays.indexOf(t)
return e>-1?e:this.arrays.push(t)-1}templateMeta(t){let e=JSON.stringify(t),r=this.strings.indexOf(e)
return r>-1?r:this.strings.push(e)-1}number(t){let e=this.numbers.indexOf(t)
return e>-1?e:this.numbers.push(t)-1}toPool(){return{strings:this.strings,arrays:this.arrays,handles:this.handles,numbers:this.numbers}}}{constructor(t){super(),t&&(this.strings=t.strings,this.arrays=t.arrays,this.handles=t.handles,this.resolved=this.handles.map(()=>Ke),this.numbers=t.numbers),this.others=[]}getNumber(t){return this.numbers[t]}getString(t){return this.strings[t]}getStringArray(t){let e=this.getArray(t),r=new Array(e.length)
for(let s=0;s<e.length;s++){let t=e[s]
r[s]=this.getString(t)}return r}getArray(t){return this.arrays[t]}getTemplateMeta(t){return JSON.parse(this.strings[t])}getOther(t){return this.others[t]}}class er{constructor(t){this.heap=t,this.offset=0}get size(){return 1+((768&this.heap.getbyaddr(this.offset))>>8)}get isMachine(){return 1024&this.heap.getbyaddr(this.offset)?1:0}get type(){return 255&this.heap.getbyaddr(this.offset)}get op1(){return this.heap.getbyaddr(this.offset+1)}get op2(){return this.heap.getbyaddr(this.offset+2)}get op3(){return this.heap.getbyaddr(this.offset+3)}}function rr(t,e){return e|t<<2}function sr(t,e){return t|e<<30}class nr{constructor(t){let{buffer:e,table:r}=t
this.heap=new Uint32Array(e),this.table=r}getaddr(t){return this.table[t]}getbyaddr(t){return this.heap[t]}sizeof(t){return lr(this.table,t)}scopesizeof(t){return ur(this.table,t)}}class ir{constructor(){this.placeholders=[],this.stdlibs=[],this.offset=0,this.handle=0,this.capacity=1048576,this.heap=new Uint32Array(1048576),this.table=[]}push(t){this.sizeCheck(),this.heap[this.offset++]=t}sizeCheck(){if(0===this.capacity){let t=or(this.heap,0,this.offset)
this.heap=new Uint32Array(t.length+1048576),this.heap.set(t,0),this.capacity=1048576}this.capacity--}getbyaddr(t){return this.heap[t]}setbyaddr(t,e){this.heap[t]=e}malloc(){this.table.push(this.offset,0,0)
let t=this.handle
return this.handle+=3,t}finishMalloc(t,e){this.table[t+1]=rr(e,0)}size(){return this.offset}getaddr(t){return this.table[t]}gethandle(t){this.table.push(t,rr(0,3),0)
let e=this.handle
return this.handle+=3,e}sizeof(t){return lr(this.table,t)}scopesizeof(t){return ur(this.table,t)}free(t){let e=this.table[t+1]
this.table[t+1]=sr(e,1)}compact(){let t=0,{table:e,table:{length:r},heap:s}=this
for(let n=0;n<r;n+=3){let r=e[n],i=e[n+1],a=i&Size.SIZE_MASK,o=0&i
if(2!==o)if(1===o)e[n+1]=sr(i,2),t+=a
else if(0===o){for(let e=r;e<=n+a;e++)s[e-t]=s[e]
e[n]=r-t}else 3===o&&(e[n]=r-t)}this.offset=this.offset-t}pushPlaceholder(t){this.sizeCheck()
let e=this.offset++
this.heap[e]=2147483647,this.placeholders.push([e,t])}pushStdlib(t){this.sizeCheck()
let e=this.offset++
this.heap[e]=2147483647,this.stdlibs.push([e,t])}patchPlaceholders(){let{placeholders:t}=this
for(let e=0;e<t.length;e++){let[r,s]=t[e]
this.setbyaddr(r,s())}}patchStdlibs(t){let{stdlibs:e}=this
for(let r=0;r<e.length;r++){let[s,{value:n}]=e[r]
this.setbyaddr(s,t[n])}this.stdlibs=[]}capture(t,e=this.offset){this.patchPlaceholders(),this.patchStdlibs(t)
let r=or(this.heap,0,e).buffer
return{handle:this.handle,table:this.table,buffer:r}}}class ar{constructor(t,e){this.constants=t,this.heap=e,this._opcode=new er(this.heap)}static hydrate(t){let e=new nr(t.heap),r=new Xe(t.constants)
return new ar(r,e)}opcode(t){return this._opcode.offset=t,this._opcode}}function or(t,e,r){if(void 0!==t.slice)return t.slice(e,r)
let s=new Uint32Array(r)
for(;e<r;e++)s[e]=t[e]
return s}function lr(t,e){return-1}function ur(t,e){return t[e+1]>>2}function hr(t){t.heap.patchStdlibs(t.stdlib)}var cr
class pr{constructor(t,e,r,s){this.slots=t,this.callerScope=e,this.evalScope=r,this.partialMap=s}static root(t,e=0){let r=new Array(e+1)
for(let s=0;s<=e;s++)r[s]=ye
return new pr(r,null,null,null).init({self:t})}static sized(t=0){let e=new Array(t+1)
for(let r=0;r<=t;r++)e[r]=ye
return new pr(e,null,null,null)}init({self:t}){return this.slots[0]=t,this}getSelf(){return this.get(0)}getSymbol(t){return this.get(t)}getBlock(t){let e=this.get(t)
return e===ye?null:e}getEvalScope(){return this.evalScope}getPartialMap(){return this.partialMap}bind(t,e){this.set(t,e)}bindSelf(t){this.set(0,t)}bindSymbol(t,e){this.set(t,e)}bindBlock(t,e){this.set(t,e)}bindEvalScope(t){this.evalScope=t}bindPartialMap(t){this.partialMap=t}bindCallerScope(t){this.callerScope=t}getCallerScope(){return this.callerScope}child(){return new pr(this.slots.slice(),this.callerScope,this.evalScope,this.partialMap)}get(t){if(t>=this.slots.length)throw new RangeError(`BUG: cannot get $${t} from scope; length=${this.slots.length}`)
return this.slots[t]}set(t,e){if(t>=this.slots.length)throw new RangeError(`BUG: cannot get $${t} from scope; length=${this.slots.length}`)
this.slots[t]=e}}const dr="TRANSACTION [c3938885-aba0-422f-b540-3fd3431c78b5]"
class mr{constructor(){this.scheduledInstallManagers=[],this.scheduledInstallModifiers=[],this.scheduledUpdateModifierManagers=[],this.scheduledUpdateModifiers=[],this.createdComponents=[],this.createdManagers=[],this.updatedComponents=[],this.updatedManagers=[],this.destructors=[]}didCreate(t,e){this.createdComponents.push(t),this.createdManagers.push(e)}didUpdate(t,e){this.updatedComponents.push(t),this.updatedManagers.push(e)}scheduleInstallModifier(t,e){this.scheduledInstallModifiers.push(t),this.scheduledInstallManagers.push(e)}scheduleUpdateModifier(t,e){this.scheduledUpdateModifiers.push(t),this.scheduledUpdateModifierManagers.push(e)}didDestroy(t){this.destructors.push(t)}commit(){let{createdComponents:t,createdManagers:e}=this
for(let u=0;u<t.length;u++){let r=t[u]
e[u].didCreate(r)}let{updatedComponents:r,updatedManagers:s}=this
for(let u=0;u<r.length;u++){let t=r[u]
s[u].didUpdate(t)}let{destructors:n}=this
for(let u=0;u<n.length;u++)n[u][V]()
let{scheduledInstallManagers:i,scheduledInstallModifiers:a}=this
for(let u=0;u<i.length;u++){let t=a[u]
i[u].install(t)}let{scheduledUpdateModifierManagers:o,scheduledUpdateModifiers:l}=this
for(let u=0;u<o.length;u++){let t=l[u]
o[u].update(t)}}}function fr(t){return!!t}cr=dr
class gr{constructor(t){this.inner=t}lookupComponent(t,e){if(this.inner.lookupComponent){let r=this.inner.lookupComponent(t,e)
if(void 0===r)throw new Error(`Unexpected component ${t} (from ${e}) (lookupComponent returned undefined)`)
return r}throw new Error("lookupComponent not implemented on RuntimeResolver.")}lookupPartial(t,e){if(this.inner.lookupPartial){let r=this.inner.lookupPartial(t,e)
if(void 0===r)throw new Error(`Unexpected partial ${t} (from ${e}) (lookupPartial returned undefined)`)
return r}throw new Error("lookupPartial not implemented on RuntimeResolver.")}resolve(t){if(this.inner.resolve){let e=this.inner.resolve(t)
if(void 0===e)throw new Error(`Unexpected handle ${t} (resolve returned undefined)`)
return e}throw new Error("resolve not implemented on RuntimeResolver.")}compilable(t){if(this.inner.compilable){let e=this.inner.compilable(t)
if(void 0===e)throw new Error(`Unable to compile ${name} (compilable returned undefined)`)
return e}throw new Error("compilable not implemented on RuntimeResolver.")}getInvocation(t){if(this.inner.getInvocation){let e=this.inner.getInvocation(t)
if(void 0===e)throw new Error(`Unable to get invocation for ${JSON.stringify(t)} (getInvocation returned undefined)`)
return e}throw new Error("getInvocation not implemented on RuntimeResolver.")}}function br(t,e,r){let s=new ar(e.program.constants,e.program.heap)
return{env:r,resolver:new gr(t),program:s}}const yr=new class{constructor(){this.evaluateOpcode=function(t){let e=new Array(t)
for(let r=0;r<t;r++)e[r]=null
return e}(90).slice()}add(t,e,r="syscall"){this.evaluateOpcode[t]={syscall:"machine"!==r,evaluate:e}}debugBefore(t,e){return{sp:void 0,pc:t.fetchValue(0),name:void 0,params:void 0,type:e.type,isMachine:e.isMachine,size:e.size,state:void 0}}debugAfter(t,e){}evaluate(t,e,r){let s=this.evaluateOpcode[r]
s.syscall?s.evaluate(t,e):s.evaluate(t[qt],e)}}
class vr extends class{constructor(){x(this)}}{constructor(){super(...arguments),this.next=null,this.prev=null}}class kr extends class{constructor(){this.lastRevision=null,this.lastValue=null}value(){let{tag:t,lastRevision:e,lastValue:r}=this
return null!==e&&t.validate(e)||(r=this.lastValue=this.compute(),this.lastRevision=t.value()),r}invalidate(){this.lastRevision=null}}{constructor(t){super(),this.parts=t,this.tag=m(t)}compute(){let t=new Array
for(let e=0;e<this.parts.length;e++){let r=this.parts[e].value()
null!=r&&(t[e]=wr(r))}return t.length>0?t.join(""):null}}function wr(t){return"function"!=typeof t.toString?"":String(t)}function Sr(t){return 0|(t.dynamicLayout?1:0)|(t.dynamicTag?2:0)|(t.prepareArgs?4:0)|(t.createArgs?8:0)|(t.attributeHook?16:0)|(t.elementHook?32:0)|(t.dynamicScope?64:0)|(t.createCaller?128:0)|(t.updateHook?256:0)|(t.createInstance?512:0)|(t.wrapped?1024:0)}function Er(t,e,r){return!!(e&r)}var Ar
yr.add(16,(t,{op1:e})=>{let r=t.stack,s=t.runtime.resolver.resolve(e)(r.pop(),t)
t.loadValue(8,s)}),yr.add(22,(t,{op1:e})=>{let r=t.referenceForSymbol(e)
t.stack.push(r)}),yr.add(19,(t,{op1:e})=>{let r=t.stack.pop()
t.scope().bindSymbol(e,r)}),yr.add(21,(t,{op1:e})=>{let r=t.stack.pop(),s=t.stack.pop(),n=t.stack.pop(),i=n?[r,s,n]:null
t.scope().bindBlock(e,i)},"jit"),yr.add(20,(t,{op1:e})=>{let r=t.stack.pop(),s=t.stack.pop(),n=t.stack.pop(),i=n?[r,s,n]:null
t.scope().bindBlock(e,i)}),yr.add(104,(t,{op1:e})=>{let r=t[Ut].getString(e),s=t.scope().getPartialMap()[r]
void 0===s&&(s=t.getSelf().get(r)),t.stack.push(s)}),yr.add(36,(t,{op1:e})=>{t.pushRootScope(e)}),yr.add(23,(t,{op1:e})=>{let r=t[Ut].getString(e),s=t.stack.pop()
t.stack.push(s.get(r))}),yr.add(24,(t,{op1:e})=>{let{stack:r}=t,s=t.scope().getBlock(e)
s?(r.push(s[2]),r.push(s[1]),r.push(s[0])):(r.push(null),r.push(null),r.push(null))}),yr.add(25,(t,{op1:e})=>{let r=!!t.scope().getBlock(e)
t.stack.push(r?ke:we)}),yr.add(26,t=>{t.stack.pop(),t.stack.pop()
let e=t.stack.pop(),r=e&&e.parameters.length
t.stack.push(r?ke:we)}),yr.add(27,(t,{op1:e})=>{let r=new Array(e)
for(let s=e;s>0;s--){r[s-1]=t.stack.pop()}t.stack.push(new kr(r))})
const Nr="CURRIED COMPONENT DEFINITION [id=6f00feb9-a0ef-4547-99ea-ac328f80acea]"
function Tr(t){return!(!t||!t[Nr])}class Cr{constructor(t,e){this.inner=t,this.args=e,this[Ar]=!0}unwrap(t){t.realloc(this.offset)
let e=this
for(;;){let{args:r,inner:s}=e
if(r&&(t.positional.prepend(r.positional),t.named.merge(r.named)),!Tr(s))return s
e=s}}get offset(){let{inner:t,args:e}=this,r=e?e.positional.length:0
return Tr(t)?r+t.offset:r}}function xr(t,e,r){return t.lookupComponent(e,r)}Ar=Nr
class Lr{constructor(t){this.list=t,this.tag=m(t),this.list=t}value(){let t=[],{list:e}=this
for(let r=0;r<e.length;r++){let s=Ae(e[r].value())
s&&t.push(s)}return 0===t.length?null:t.join(" ")}}class Dr{constructor(t,e,r,s){this.inner=t,this.resolver=e,this.meta=r,this.args=s,this.tag=t.tag,this.lastValue=null,this.lastDefinition=null}value(){let{inner:t,lastValue:e}=this,r=t.value()
if(r===e)return this.lastDefinition
let s=null
if(Tr(r))s=r
else if("string"==typeof r&&r){let{resolver:t,meta:e}=this
s=xr(t,r,e)}return s=this.curry(s),this.lastValue=r,this.lastDefinition=s,s}get(){return ye}curry(t){let{args:e}=this
return!e&&Tr(t)?t:t?new Cr(t,e):null}}class _r extends vr{constructor(t,e,r){super(),this.node=t,this.reference=e,this.lastValue=r,this.type="dynamic-text",this.tag=e.tag,this.lastRevision=this.tag.value()}evaluate(){let{reference:t,tag:e}=this
e.validate(this.lastRevision)||(this.lastRevision=e.value(),this.update(t.value()))}update(t){let e,{lastValue:r}=this
if(t!==r&&(e=Ne(t)?"":xe(t)?t:String(t),e!==r)){this.node.nodeValue=this.lastValue=e}}}class Br{constructor(t){this.inner=t,this.tag=t.tag}value(){let t=this.inner.value()
return function(t){return xe(t)||Ne(t)||"boolean"==typeof t||"number"==typeof t}(t)?1:(e=t)&&e[Nr]?0:Te(t)?3:function(t){return Ce(t)&&11===t.nodeType}(t)?4:Ce(t)?5:1
var e}}yr.add(42,t=>{let e=t.stack.pop().value(),r=Ne(e)?"":String(e)
t.elements().appendDynamicHTML(r)}),yr.add(43,t=>{let e=t.stack.pop().value().toHTML(),r=Ne(e)?"":e
t.elements().appendDynamicHTML(r)}),yr.add(46,t=>{let e=t.stack.pop(),r=e.value(),s=Ne(r)?"":String(r),n=t.elements().appendDynamicText(s)
u(e)||t.updateWith(new _r(n,e,s))}),yr.add(44,t=>{let e=t.stack.pop().value()
t.elements().appendDynamicFragment(e)}),yr.add(45,t=>{let e=t.stack.pop().value()
t.elements().appendDynamicNode(e)}),yr.add(38,t=>t.pushChildScope()),yr.add(39,t=>t.popScope()),yr.add(58,t=>t.pushDynamicScope()),yr.add(59,t=>t.popDynamicScope()),yr.add(28,(t,{op1:e})=>{t.stack.push(t[Ut].getOther(e))}),yr.add(29,(t,{op1:e})=>{let r=t.stack,s=e>>3
switch(7&e){case 0:r.push(s)
break
case 1:r.push(t[Ut].getNumber(s))
break
case 2:r.push(t[Ut].getString(s))
break
case 3:r.pushRaw(e)
break
case 4:case 5:r.push(t[Ut].getNumber(s))}}),yr.add(30,t=>{let e=t.stack
e.push(fe.create(e.pop()))}),yr.add(31,t=>{let e=t.stack
e.push(e.peek().value())}),yr.add(32,(t,{op1:e,op2:r})=>{let s=t.fetchValue(e)-r
t.stack.dup(s)}),yr.add(33,(t,{op1:e})=>{t.stack.pop(e)}),yr.add(34,(t,{op1:e})=>{t.load(e)}),yr.add(35,(t,{op1:e})=>{t.fetch(e)}),yr.add(57,(t,{op1:e})=>{let r=t[Ut].getArray(e)
t.bindDynamicScope(r)}),yr.add(68,(t,{op1:e})=>{t.enter(e)}),yr.add(69,t=>{t.exit()}),yr.add(62,(t,{op1:e})=>{t.stack.push(t[Ut].getTemplateMeta(e))}),yr.add(61,t=>{t.stack.push(t.scope())}),yr.add(60,t=>{let e=t.stack,r=e.pop()
r?e.push(t.compile(r)):e.push(null)},"jit"),yr.add(63,t=>{let{stack:e}=t,r=e.pop(),s=e.pop(),n=e.pop(),i=e.pop()
if(null===n)return t.pushFrame(),void t.pushScope(s)
let a=s
{let t=n.parameters,e=t.length
if(e>0){a=a.child()
for(let r=0;r<e;r++)a.bindSymbol(t[r],i.at(r))}}t.pushFrame(),t.pushScope(a),t.call(r)}),yr.add(64,(t,{op1:e})=>{let r=t.stack.pop()
if(u(r))r.value()&&t.goto(e)
else{let s=new E(r)
s.peek()&&t.goto(e),t.updateWith(new Or(s))}}),yr.add(65,(t,{op1:e})=>{let r=t.stack.pop()
if(u(r))r.value()||t.goto(e)
else{let s=new E(r)
s.peek()||t.goto(e),t.updateWith(new Or(s))}}),yr.add(66,(t,{op1:e,op2:r})=>{t.stack.peek()===r&&t.goto(e)}),yr.add(67,t=>{let e=t.stack.peek()
u(e)||t.updateWith(Or.initialize(new E(e)))}),yr.add(70,t=>{let{env:e,stack:r}=t
r.push(e.toConditionalReference(r.pop()))})
class Or extends vr{constructor(t){super(),this.type="assert",this.tag=t.tag,this.cache=t}static initialize(t){let e=new Or(t)
return t.peek(),e}evaluate(t){let{cache:e}=this
e.revalidate()!==A&&t.throw()}}class Rr extends vr{constructor(t,e){super(),this.target=e,this.type="jump-if-not-modified",this.tag=t,this.lastRevision=t.value()}evaluate(t){let{tag:e,target:r,lastRevision:s}=this
!t.alwaysRevalidate&&e.validate(s)&&t.goto(r)}didModify(){this.lastRevision=this.tag.value()}}class Vr extends vr{constructor(t){super(),this.target=t,this.type="did-modify",this.tag=a}evaluate(){this.target.didModify()}}class qr{constructor(t){this.tag=a,this.type="label",this.label=null,this.prev=null,this.next=null,x(this),this.label=t}evaluate(){}inspect(){return`${this.label} [${this._guid}]`}}yr.add(40,(t,{op1:e})=>{t.elements().appendText(t[Ut].getString(e))}),yr.add(41,(t,{op1:e})=>{t.elements().appendComment(t[Ut].getString(e))}),yr.add(47,(t,{op1:e})=>{t.elements().openElement(t[Ut].getString(e))}),yr.add(48,t=>{let e=t.stack.pop().value()
t.elements().openElement(e)}),yr.add(49,t=>{let e,r,s=t.stack.pop(),n=t.stack.pop(),i=t.stack.pop().value()
if(u(s))e=s.value()
else{let r=new E(s)
e=r.peek(),t.updateWith(new Or(r))}if(void 0!==n.value())if(u(n))r=n.value()
else{let e=new E(n)
r=e.peek(),t.updateWith(new Or(e))}let a=t.elements().pushRemoteElement(e,i,r)
a&&t.associateDestroyable(a)}),yr.add(55,t=>{t.elements().popRemoteElement()}),yr.add(53,t=>{let e=t.fetchValue(6),r=null
e&&(r=e.flush(t),t.loadValue(6,null)),t.elements().flushElement(r)}),yr.add(54,t=>{let e=t.elements().closeElement()
e&&e.forEach(([e,r])=>{t.env.scheduleInstallModifier(r,e)
let s=e.getDestructor(r)
s&&t.associateDestroyable(s)})}),yr.add(56,(t,{op1:e})=>{let{manager:r,state:s}=t.runtime.resolver.resolve(e),n=t.stack.pop(),{constructing:i,updateOperations:a}=t.elements(),o=t.dynamicScope(),l=r.create(i,s,n,o,a)
t.fetchValue(6).addModifier(r,l)
let u=r.getTag(l)
h(u)||t.updateWith(new Ir(u,r,l))})
class Ir extends vr{constructor(t,e,r){super(),this.tag=t,this.manager=e,this.modifier=r,this.type="update-modifier",this.lastUpdated=t.value()}evaluate(t){let{manager:e,modifier:r,tag:s,lastUpdated:n}=this
s.validate(n)||(t.env.scheduleUpdateModifier(r,e),this.lastUpdated=s.value())}}yr.add(50,(t,{op1:e,op2:r,op3:s})=>{let n=t[Ut].getString(e),i=t[Ut].getString(r),a=s?t[Ut].getString(s):null
t.elements().setStaticAttribute(n,i,a)}),yr.add(51,(t,{op1:e,op2:r,op3:s})=>{let n=t[Ut].getString(e),i=t.stack.pop(),a=i.value(),o=s?t[Ut].getString(s):null,l=t.elements().setDynamicAttribute(n,a,!!r,o)
u(i)||t.updateWith(new Pr(i,l))})
class Pr extends vr{constructor(t,e){super(),this.reference=t,this.attribute=e,this.type="patch-element",this.tag=t.tag,this.lastRevision=this.tag.value()}evaluate(t){let{attribute:e,reference:r,tag:s}=this
s.validate(this.lastRevision)||(this.lastRevision=s.value(),e.update(r.value(),t.env))}}const Mr="COMPONENT_INSTANCE [c56c57de-e73a-4ef0-b137-07661da17029]"
yr.add(76,t=>{let e=t.stack,r=e.pop()
e.push(new Se(r,Tr))}),yr.add(77,t=>{let e=t.stack,r=e.peek()
e.push(new Br(r))}),yr.add(78,(t,{op1:e})=>{let r=t.stack,s=r.pop(),n=r.pop(),i=t[Ut].getTemplateMeta(e),a=t.runtime.resolver
t.loadValue(8,new Dr(s,a,i,n))}),yr.add(79,(t,{op1:e})=>{let r=t.runtime.resolver.resolve(e),{manager:s}=r,n=Sr(s.getCapabilities(r.state)),i={[Mr]:!0,definition:r,manager:s,capabilities:n,state:null,handle:null,table:null,lookup:null}
t.stack.push(i)}),yr.add(82,(t,{op1:e})=>{let r,s=t.stack,n=s.pop().value(),i=t[Ut].getTemplateMeta(e)
if(t.loadValue(7,null),"string"==typeof n){r=xr(t.runtime.resolver,n,i)}else{if(!Tr(n))throw K()
r=n}s.push(r)}),yr.add(80,t=>{let e,r,{stack:s}=t,n=s.pop()
Tr(n)?r=e=null:(r=n.manager,e=Sr(r.getCapabilities(n.state))),s.push({definition:n,capabilities:e,manager:r,state:null,handle:null,table:null})}),yr.add(81,t=>{let e,r=t.stack,s=r.pop().value()
if(!Tr(s))throw K()
e=s,r.push(e)}),yr.add(83,(t,{op1:e,op2:r})=>{let s=t.stack,n=t[Ut].getStringArray(e),i=r>>4,a=8&r,o=[]
4&r&&o.push("main"),2&r&&o.push("else"),1&r&&o.push("attrs"),t[jt].setup(s,n,o,i,!!a),s.push(t[jt])}),yr.add(84,t=>{let{stack:e}=t
e.push(t[jt].empty(e))}),yr.add(87,t=>{let e=t.stack,r=e.pop().capture()
e.push(r)}),yr.add(86,(t,{op1:e})=>{let r=t.stack,s=t.fetchValue(e),n=r.pop(),{definition:i}=s
Tr(i)&&(i=function(t,e,r){let s=t.definition=e.unwrap(r),{manager:n,state:i}=s
return t.manager=n,t.capabilities=Sr(n.getCapabilities(i)),s}(s,i,n))
let{manager:a,state:o}=i
if(!Er(0,s.capabilities,4))return void r.push(n)
let l=n.blocks.values,u=n.blocks.names,h=a.prepareArgs(o,n)
if(h){n.clear()
for(let n=0;n<l.length;n++)r.push(l[n])
let{positional:t,named:e}=h,s=t.length
for(let n=0;n<s;n++)r.push(t[n])
let i=Object.keys(e)
for(let n=0;n<i.length;n++)r.push(e[i[n]])
n.setup(r,i,u,s,!1)}r.push(n)}),yr.add(88,(t,{op1:e,op2:r})=>{let s=t.fetchValue(r),{definition:n,manager:i}=s,a=s.capabilities=Sr(i.getCapabilities(n.state))
if(!Er(0,a,512))throw new Error("BUG")
let o=null
Er(0,a,64)&&(o=t.dynamicScope())
let l=1&e,u=null
Er(0,a,8)&&(u=t.stack.peek())
let c=null
Er(0,a,128)&&(c=t.getSelf())
let p=i.create(t.env,n.state,u,o,c,!!l)
s.state=p
let d=i.getTag(p)
Er(0,a,256)&&!h(d)&&t.updateWith(new Fr(d,p,i,o))}),yr.add(89,(t,{op1:e})=>{let{manager:r,state:s}=t.fetchValue(e),n=r.getDestructor(s)
n&&t.associateDestroyable(n)}),yr.add(99,t=>{t.beginCacheGroup(),t.elements().pushSimpleBlock()}),yr.add(90,t=>{t.loadValue(6,new zr)}),yr.add(52,(t,{op1:e,op2:r,op3:s})=>{let n=t[Ut].getString(e),i=t.stack.pop(),a=s?t[Ut].getString(s):null
t.fetchValue(6).setAttribute(n,i,!!r,a)})
class zr{constructor(){this.attributes=L(),this.classes=[],this.modifiers=[]}setAttribute(t,e,r,s){let n={value:e,namespace:s,trusting:r}
"class"===t&&this.classes.push(e),this.attributes[t]=n}addModifier(t,e){this.modifiers.push([t,e])}flush(t){for(let e in this.attributes){let r=this.attributes[e],{value:s,namespace:n,trusting:i}=r
if("class"===e&&(s=new Lr(this.classes)),"type"===e)continue
let a=t.elements().setDynamicAttribute(e,s.value(),i,n)
u(s)||t.updateWith(new Pr(s,a))}if("type"in this.attributes){let e=this.attributes.type,{value:r,namespace:s,trusting:n}=e,i=t.elements().setDynamicAttribute("type",r.value(),n,s)
u(r)||t.updateWith(new Pr(r,i))}return this.modifiers}}function Ur(t,e){return!1===Er(0,t,1)}function jr(t,e){return!0===Er(0,t,1)}function Hr(t,e,r,s,n){let i=r.table.symbols.indexOf(t),a=s.get(e);-1!==i&&n.scope().bindBlock(i+1,a),r.lookup&&(r.lookup[t]=a)}yr.add(101,(t,{op1:e})=>{let{definition:r,state:s}=t.fetchValue(e),{manager:n}=r,i=t.fetchValue(6)
n.didCreateElement(s,t.elements().constructing,i)}),yr.add(91,(t,{op1:e})=>{let{definition:r,state:s}=t.fetchValue(e),{manager:n}=r
t.stack.push(n.getSelf(s))}),yr.add(92,(t,{op1:e})=>{let{definition:r,state:s}=t.fetchValue(e),{manager:n}=r
t.stack.push(n.getTagName(s))}),yr.add(94,(t,{op1:e})=>{let r,s=t.fetchValue(e),n=s.manager,{definition:i}=s,{stack:a}=t,{capabilities:o}=s
if(Ur(o,n))r=n.getJitStaticLayout(i.state,t.runtime.resolver)
else{if(!jr(o,n))throw K()
{let e=n.getJitDynamicLayout(s.state,t.runtime.resolver,t.context)
r=function(t,e){return!!(t&e)}(o,1024)?e.asWrappedLayout():e.asLayout()}}let l=r.compile(t.context)
a.push(r.symbolTable),a.push(l)},"jit"),yr.add(93,(t,{op1:e})=>{let r,s=t.fetchValue(e),{manager:n,definition:i}=s,{stack:a}=t,{state:o,capabilities:l}=s,{state:u}=i
if(Ur(l,n))r=n.getAotStaticLayout(u,t.runtime.resolver)
else{if(!jr(l,n))throw K()
r=n.getAotDynamicLayout(o,t.runtime.resolver)}a.push(r.symbolTable),a.push(r.handle)}),yr.add(75,(t,{op1:e})=>{let r=t.stack.pop(),s=t.stack.pop(),{manager:n}=r,i=Sr(n.getCapabilities(r.state)),a={[Mr]:!0,definition:r,manager:n,capabilities:i,state:null,handle:s.handle,table:s.symbolTable,lookup:null}
t.loadValue(e,a)}),yr.add(97,(t,{op1:e})=>{let{stack:r}=t,s=r.pop(),n=r.pop(),i=t.fetchValue(e)
i.handle=s,i.table=n}),yr.add(37,(t,{op1:e})=>{let{symbols:r}=t.fetchValue(e).table
t.pushRootScope(r.length+1)}),yr.add(96,(t,{op1:e})=>{let r=t.fetchValue(e)
if(r.table.hasEval){let e=r.lookup=L()
t.scope().bindEvalScope(e)}}),yr.add(17,(t,{op1:e})=>{let r=t.fetchValue(e),s=t.scope(),n=t.stack.peek(),i=n.named.atNames
for(let a=i.length-1;a>=0;a--){let t=i[a],e=r.table.symbols.indexOf(i[a]),o=n.named.get(t,!0);-1!==e&&s.bindSymbol(e+1,o),r.lookup&&(r.lookup[t]=o)}}),yr.add(18,(t,{op1:e})=>{let r=t.fetchValue(e),{blocks:s}=t.stack.peek()
Hr("&attrs","attrs",r,s,t),Hr("&else","else",r,s,t),Hr("&default","main",r,s,t)}),yr.add(98,(t,{op1:e})=>{let r=t.fetchValue(e)
t.call(r.handle)}),yr.add(102,(t,{op1:e})=>{let{manager:r,state:s,capabilities:n}=t.fetchValue(e),i=t.elements().popBlock()
if(!Er(0,n,512))throw new Error("BUG")
r.didRenderLayout(s,i),t.env.didCreate(s,r),t.updateWith(new $r(r,s,i))}),yr.add(100,t=>{t.commitCacheGroup()})
class Fr extends vr{constructor(t,e,r,s){super(),this.tag=t,this.component=e,this.manager=r,this.dynamicScope=s,this.type="update-component"}evaluate(t){let{component:e,manager:r,dynamicScope:s}=this
r.update(e,s)}}class $r extends vr{constructor(t,e,r){super(),this.manager=t,this.component=e,this.bounds=r,this.type="did-update-layout",this.tag=a}evaluate(t){let{manager:e,component:r,bounds:s}=this
e.didUpdateLayout(r,s),t.env.didUpdate(r,e)}}let Gr=function(t,e){console.info("Use `context`, and `get(<path>)` to debug this template."),e("this")}
class Jr{constructor(t,e,r){this.scope=t,this.locals=L()
for(let s=0;s<r.length;s++){let n=r[s],i=e[n-1],a=t.getSymbol(n)
this.locals[i]=a}}get(t){let e,{scope:r,locals:s}=this,n=t.split("."),[i,...a]=t.split("."),o=r.getEvalScope()
return"this"===i?e=r.getSelf():s[i]?e=s[i]:0===i.indexOf("@")&&o[i]?e=o[i]:(e=this.scope.getSelf(),a=n),a.reduce((t,e)=>t.get(e),e)}}yr.add(105,(t,{op1:e,op2:r})=>{let s=t[Ut].getStringArray(e),n=t[Ut].getArray(r),i=new Jr(t.scope(),s,n)
Gr(t.getSelf().value(),t=>i.get(t).value())}),yr.add(103,(t,{op1:e,op2:r,op3:s})=>{let{[Ut]:n,stack:i}=t,a=i.pop().value(),o=n.getTemplateMeta(e),l=n.getStringArray(r),u=n.getArray(s),h=t.runtime.resolver.lookupPartial(a,o),c=t.runtime.resolver.resolve(h),{symbolTable:p,handle:d}=c.getPartial(t.context)
{let e=p.symbols,r=t.scope(),s=t.pushRootScope(e.length),n=r.getEvalScope()
s.bindEvalScope(n),s.bindSelf(r.getSelf())
let i=Object.create(r.getPartialMap())
for(let t=0;t<u.length;t++){let e=u[t],s=l[e-1],n=r.getSymbol(e)
i[s]=n}if(n)for(let t=0;t<e.length;t++){let r=t+1,i=n[e[t]]
void 0!==i&&s.bind(r,i)}s.bindPartialMap(i),t.pushFrame(),t.call(d)}},"jit")
class Yr{constructor(t){this.tag=t.tag,this.artifacts=t}value(){return!this.artifacts.isEmpty()}}yr.add(73,t=>{let e=t.stack,r=e.pop(),s=e.pop(),n=t.env.iterableFor(r,s.value()),i=new nt(n)
e.push(i),e.push(new Yr(i.artifacts))}),yr.add(71,(t,{op1:e})=>{t.enterList(e)}),yr.add(72,t=>{t.exitList()}),yr.add(74,(t,{op1:e})=>{let r=t.stack.peek().next()
if(r){let e=t.iterate(r.memo,r.value)
t.enterItem(r.key,e)}else t.goto(e)})
class Wr{constructor(t){this.bucket=t?W({},t):{}}get(t){return this.bucket[t]}set(t,e){return this.bucket[t]=e}child(){return new Wr(this.bucket)}}class Qr{constructor(t,e){this.scope=t,this.nameRef=e
let r=this.varTag=w.create(a)
this.tag=g([e.tag,r])}value(){return this.getVar().value()}get(t){return this.getVar().get(t)}getVar(){let t=String(this.nameRef.value()),e=this.scope.get(t)
return this.varTag.inner.update(e.tag),e}}function Kr(t,e){let r=e.dynamicScope(),s=t.positional.at(0)
return new Qr(r,s)}class Zr{constructor(){this.stack=null,this.positional=new Xr,this.named=new es,this.blocks=new ss}empty(t){let e=t[Mt][3]+1
return this.named.empty(t,e),this.positional.empty(t,e),this.blocks.empty(t,e),this}setup(t,e,r,s,n){this.stack=t
let i=this.named,a=e.length,o=t[Mt][3]-a+1
i.setup(t,o,a,e,n)
let l=o-s
this.positional.setup(t,l,s)
let u=this.blocks,h=r.length,c=l-3*h
u.setup(t,c,h,r)}get tag(){return m([this.positional,this.named])}get base(){return this.blocks.base}get length(){return this.positional.length+this.named.length+3*this.blocks.length}at(t){return this.positional.at(t)}realloc(t){let{stack:e}=this
if(t>0&&null!==e){let{positional:r,named:s}=this,n=r.base+t
for(let t=r.length+s.length-1;t>=0;t--)e.copy(t+r.base,t+n)
r.base+=t,s.base+=t,e[Mt][3]+=t}}capture(){let t=0===this.positional.length?os:this.positional.capture(),e=0===this.named.length?as:this.named.capture()
return new is(this.tag,t,e,this.length)}clear(){let{stack:t,length:e}=this
e>0&&null!==t&&t.pop(e)}}class Xr{constructor(){this.base=0,this.length=0,this.stack=null,this._tag=null,this._references=null}empty(t,e){this.stack=t,this.base=e,this.length=0,this._tag=a,this._references=N}setup(t,e,r){this.stack=t,this.base=e,this.length=r,0===r?(this._tag=a,this._references=N):(this._tag=null,this._references=null)}get tag(){let t=this._tag
return t||(t=this._tag=m(this.references)),t}at(t){let{base:e,length:r,stack:s}=this
return t<0||t>=r?ye:s.get(t,e)}capture(){return new ts(this.tag,this.references)}prepend(t){let e=t.length
if(e>0){let{base:r,length:s,stack:n}=this
this.base=r-=e,this.length=s+e
for(let i=0;i<e;i++)n.set(t.at(i),i,r)
this._tag=null,this._references=null}}get references(){let t=this._references
if(!t){let{stack:e,base:r,length:s}=this
t=this._references=e.sliceArray(r,r+s)}return t}}class ts{constructor(t,e,r=e.length){this.tag=t,this.references=e,this.length=r}static empty(){return new ts(a,N,0)}at(t){return this.references[t]}value(){return this.references.map(this.valueOf)}get(t){let{references:e,length:r}=this
if("length"===t)return fe.create(r)
{let s=parseInt(t,10)
return s<0||s>=r?ye:e[s]}}valueOf(t){return t.value()}}class es{constructor(){this.base=0,this.length=0,this._references=null,this._names=N,this._atNames=N}empty(t,e){this.stack=t,this.base=e,this.length=0,this._references=N,this._names=N,this._atNames=N}setup(t,e,r,s,n){this.stack=t,this.base=e,this.length=r,0===r?(this._references=N,this._names=N,this._atNames=N):(this._references=null,n?(this._names=null,this._atNames=s):(this._names=s,this._atNames=null))}get tag(){return m(this.references)}get names(){let t=this._names
return t||(t=this._names=this._atNames.map(this.toSyntheticName)),t}get atNames(){let t=this._atNames
return t||(t=this._atNames=this._names.map(this.toAtName)),t}has(t){return-1!==this.names.indexOf(t)}get(t,e=!1){let{base:r,stack:s}=this,n=(e?this.atNames:this.names).indexOf(t)
return-1===n?ye:s.get(n,r)}capture(){return new rs(this.tag,this.names,this.references)}merge(t){let{length:e}=t
if(e>0){let{names:r,length:s,stack:n}=this,{names:i}=t
Object.isFrozen(r)&&0===r.length&&(r=[])
for(let a=0;a<e;a++){let e=i[a];-1===r.indexOf(e)&&(s=r.push(e),n.push(t.references[a]))}this.length=s,this._references=null,this._names=r,this._atNames=null}}get references(){let t=this._references
if(!t){let{base:e,length:r,stack:s}=this
t=this._references=s.sliceArray(e,e+r)}return t}toSyntheticName(t){return t.slice(1)}toAtName(t){return"@"+t}}class rs{constructor(t,e,r){this.tag=t,this.names=e,this.references=r,this.length=e.length,this._map=null}get map(){let t=this._map
if(!t){let{names:e,references:r}=this
t=this._map=L()
for(let s=0;s<e.length;s++){t[e[s]]=r[s]}}return t}has(t){return-1!==this.names.indexOf(t)}get(t){let{names:e,references:r}=this,s=e.indexOf(t)
return-1===s?ye:r[s]}value(){let{names:t,references:e}=this,r=L()
for(let s=0;s<t.length;s++){r[t[s]]=e[s].value()}return r}}class ss{constructor(){this.internalValues=null,this.internalTag=null,this.names=N,this.length=0,this.base=0}empty(t,e){this.stack=t,this.names=N,this.base=e,this.length=0,this.internalTag=a,this.internalValues=N}setup(t,e,r,s){this.stack=t,this.names=s,this.base=e,this.length=r,0===r?(this.internalTag=a,this.internalValues=N):(this.internalTag=null,this.internalValues=null)}get values(){let t=this.internalValues
if(!t){let{base:e,length:r,stack:s}=this
t=this.internalValues=s.sliceArray(e,e+3*r)}return t}has(t){return-1!==this.names.indexOf(t)}get(t){let{base:e,stack:r,names:s}=this,n=s.indexOf(t)
if(-1===s.indexOf(t))return null
let i=r.get(3*n,e),a=r.get(3*n+1,e),o=r.get(3*n+2,e)
return null===o?null:[o,a,i]}capture(){return new ns(this.names,this.values)}}class ns{constructor(t,e){this.names=t,this.values=e,this.length=t.length}has(t){return-1!==this.names.indexOf(t)}get(t){let e=this.names.indexOf(t)
return-1===e?null:[this.values[3*e+2],this.values[3*e+1],this.values[3*e]]}}class is{constructor(t,e,r,s){this.tag=t,this.positional=e,this.named=r,this.length=s}value(){return{named:this.named.value(),positional:this.positional.value()}}}const as=new rs(a,N,N),os=new ts(a,N)
class ls{constructor(t,e,r,s,n){this.stack=t,this.heap=e,this.program=r,this.externs=s,this.registers=n,this.currentOpSize=0}fetchRegister(t){return this.registers[t]}loadRegister(t,e){this.registers[t]=e}setPc(t){this.registers[0]=t}pushFrame(){this.stack.push(this.registers[1]),this.stack.push(this.registers[2]),this.registers[2]=this.registers[3]-1}popFrame(){this.registers[3]=this.registers[2]-1,this.registers[1]=this.stack.get(0),this.registers[2]=this.stack.get(1)}pushSmallFrame(){this.stack.push(this.registers[1])}popSmallFrame(){this.registers[1]=this.stack.pop()}goto(t){this.setPc(this.target(t))}target(t){return this.registers[0]+t-this.currentOpSize}call(t){this.registers[1]=this.registers[0],this.setPc(this.heap.getaddr(t))}returnTo(t){this.registers[1]=this.target(t)}return(){this.setPc(this.registers[1])}nextStatement(){let{registers:t,program:e}=this,r=t[0]
if(-1===r)return null
let s=e.opcode(r),n=this.currentOpSize=s.size
return this.registers[0]+=n,s}evaluateOuter(t,e){this.evaluateInner(t,e)}evaluateInner(t,e){t.isMachine?this.evaluateMachine(t):this.evaluateSyscall(t,e)}evaluateMachine(t){switch(t.type){case 0:return this.pushFrame()
case 1:return this.popFrame()
case 3:return this.call(t.op1)
case 2:return this.call(this.stack.pop())
case 4:return this.goto(t.op1)
case 5:return this.return()
case 6:return this.returnTo(t.op1)}}evaluateSyscall(t,e){yr.evaluate(e,t,t.type)}}class us{constructor(t,{alwaysRevalidate:e=!1}){this.frameStack=new _,this.env=t,this.dom=t.getDOM(),this.alwaysRevalidate=e}execute(t,e){let{frameStack:r}=this
for(this.try(t,e);!r.isEmpty();){let t=this.frame.nextStatement()
null!==t?t.evaluate(this):r.pop()}}get frame(){return this.frameStack.current}goto(t){this.frame.goto(t)}try(t,e){this.frameStack.push(new fs(t,e))}throw(){this.frame.handleException(),this.frameStack.pop()}}class hs{constructor(t,e){this.state=t,this.resumeCallback=e}resume(t,e){return this.resumeCallback(t,this.state,e)}}class cs extends vr{constructor(t,e,r,s){super(),this.state=t,this.runtime=e,this.type="block",this.next=null,this.prev=null,this.children=s,this.bounds=r}parentElement(){return this.bounds.parentElement()}firstNode(){return this.bounds.firstNode()}lastNode(){return this.bounds.lastNode()}evaluate(t){t.try(this.children,null)}}class ps extends cs{constructor(t,e,r,s){super(t,e,r,s),this.type="try",this.tag=this._tag=w.create(a)}didInitializeChildren(){this._tag.inner.update(f(this.children))}evaluate(t){t.try(this.children,this)}handleException(){let{state:t,bounds:e,children:r,prev:s,next:n,runtime:i}=this
r.clear(),Yt(this,i.env)
let a=te.resume(i.env,e),o=t.resume(i,a),l=new G
P(this,o.execute(t=>{t.pushUpdating(l),t.updateWith(this),t.pushUpdating(r)}).drop),this.prev=s,this.next=n}}class ds{constructor(t,e){this.opcode=t,this.marker=e,this.didInsert=!1,this.didDelete=!1,this.map=t.map,this.updating=t.children}insert(t,e,r,s,n){let{map:i,opcode:a,updating:o}=this,l=null,u=null
"string"==typeof n?(u=i.get(n),l=u.bounds.firstNode()):l=this.marker
let h=a.vmForInsertion(l),c=null
h.execute(t=>{c=t.iterate(s,r),i.set(e,c),t.pushUpdating(new G),t.updateWith(c),t.pushUpdating(c.children)}),o.insertBefore(c,u),this.didInsert=!0}retain(t,e,r,s){}move(t,e,r,s,n){let{map:i,updating:a}=this,o=i.get(e)
if(n===at)Gt(o,this.marker),a.remove(o),a.append(o)
else{let t=i.get(n)
Gt(o,t.firstNode()),a.remove(o),a.insertBefore(o,t)}}delete(t,e){let{map:r,updating:s}=this,n=r.get(e);(function(t,e){Jt(t),Wt(t,e)})(n,t),s.remove(n),r.delete(e),this.didDelete=!0}done(){this.opcode.didInitializeChildren(this.didInsert||this.didDelete)}}class ms extends cs{constructor(t,e,r,s,n){super(t,e,r,s),this.type="list-block",this.map=new Map,this.lastIterated=1,this.artifacts=n
let i=this._tag=w.create(a)
this.tag=g([n.tag,i])}didInitializeChildren(t=!0){this.lastIterated=this.artifacts.tag.value(),t&&this._tag.inner.update(f(this.children))}evaluate(t){let{artifacts:e,lastIterated:r}=this
if(!e.tag.validate(r)){let{bounds:r}=this,{dom:s}=t,n=s.createComment("")
s.insertAfter(r.parentElement(),n,r.lastNode())
let i=new ds(this,n)
new ot({target:i,artifacts:e,env:t.env}).sync(),this.parentElement().removeChild(n)}super.evaluate(t)}vmForInsertion(t){let{bounds:e,state:r,runtime:s}=this,n=te.forInitialRender(s.env,{element:e.parentElement(),nextSibling:t})
return r.resume(s,n)}}class fs{constructor(t,e){this.ops=t,this.exceptionHandler=e,this.current=t.head()}goto(t){this.current=t}nextStatement(){let{current:t,ops:e}=this
return t&&(this.current=e.nextNode(t)),t}handleException(){this.exceptionHandler&&this.exceptionHandler.handleException()}}class gs{constructor(t,e,r,s){this.env=t,this.updating=e,this.bounds=r,this.drop=s,P(this,s)}rerender({alwaysRevalidate:t=!1}={alwaysRevalidate:!1}){let{env:e,updating:r}=this
new us(e,{alwaysRevalidate:t}).execute(r,this)}parentElement(){return this.bounds.parentElement()}firstNode(){return this.bounds.firstNode()}lastNode(){return this.bounds.lastNode()}handleException(){throw"this should never happen"}[B](){Jt(this.bounds)}destroy(){(function(t,e){if(t[dr])e()
else{t.begin()
try{e()}finally{t.commit()}}})(this.env,()=>Wt(this,this.env))}}class bs{constructor(t=[]){this.vec=t}clone(){return new bs(this.vec.slice())}sliceFrom(t){return new bs(this.vec.slice(t))}slice(t,e){return new bs(this.vec.slice(t,e))}copy(t,e){this.vec[e]=this.vec[t]}writeRaw(t,e){this.vec[t]=e}getRaw(t){return this.vec[t]}reset(){this.vec.length=0}len(){return this.vec.length}}class ys{constructor(t=new bs,e=[]){this.inner=t,this.js=e}slice(t,e){let r
return r="number"==typeof t&&"number"==typeof e?this.inner.slice(t,e):"number"==typeof t&&void 0===e?this.inner.sliceFrom(t):this.inner.clone(),new ys(r,this.js.slice(t,e))}sliceInner(t,e){let r=[]
for(let s=t;s<e;s++)r.push(this.get(s))
return r}copy(t,e){this.inner.copy(t,e)}write(t,e){!function(t){let e=typeof t
if(null==t)return!0
switch(e){case"boolean":case"undefined":return!0
case"number":if(t%1!=0)return!1
return!(Math.abs(t)>268435455)
default:return!1}}(e)?this.writeJs(t,e):this.writeRaw(t,function(t){switch(typeof t){case"number":return function(t){return t<0?Math.abs(t)<<3|4:t<<3|0}(t)
case"boolean":return t?11:3
case"object":return 19
case"undefined":return 27
default:throw K()}}(e))}writeJs(t,e){let r=this.js.length
this.js.push(e),this.inner.writeRaw(t,~r)}writeRaw(t,e){this.inner.writeRaw(t,e)}get(t){let e=this.inner.getRaw(t)
return e<0?this.js[~e]:function(t){switch(t){case 3:return!1
case 11:return!0
case 19:return null
case 27:return
default:return function(t){switch(7&t){case 0:return t>>3
case 4:return-(t>>3)
default:throw K()}}(t)}}(e)}reset(){this.inner.reset(),this.js.length=0}get length(){return this.inner.len()}}var vs,ks
class ws{constructor(){this.scope=new _,this.dynamicScope=new _,this.updating=new _,this.cache=new _,this.list=new _}}function Ss(t,e=pr.root(ye,0),r){return{pc:t,scope:e,dynamicScope:r,stack:[]}}function Es(t){return(e,r,s)=>new As(e,r,s,t)}vs=Pt,ks=It
class As extends class{constructor(t,{pc:e,scope:r,dynamicScope:s,stack:n},i){this.runtime=t,this.elementStack=i,this[vs]=new ws,this[ks]=new _,this.s0=null,this.s1=null,this.t0=null,this.t1=null,this.v0=null
let a=class{constructor(t,e){this.stack=t,this[Mt]=e}static restore(t){let e=new ys
for(let r=0;r<t.length;r++)e.write(r,t[r])
return new this(e,[0,-1,t.length-1,0])}push(t){this.stack.write(++this[Mt][3],t)}pushRaw(t){this.stack.writeRaw(++this[Mt][3],t)}pushNull(){this.stack.write(++this[Mt][3],null)}dup(t=this[Mt][3]){this.stack.copy(t,++this[Mt][3])}copy(t,e){this.stack.copy(t,e)}pop(t=1){let e=this.stack.get(this[Mt][3])
return this[Mt][3]-=t,e}peek(t=0){return this.stack.get(this[Mt][3]-t)}get(t,e=this[Mt][2]){return this.stack.get(e+t)}set(t,e,r=this[Mt][2]){this.stack.write(r+e,t)}slice(t,e){return this.stack.slice(t,e)}sliceArray(t,e){return this.stack.sliceInner(t,e)}capture(t){let e=this[Mt][3]+1,r=e-t
return this.stack.sliceInner(r,e)}reset(){this.stack.reset()}toArray(){return console.log(this[Mt]),this.stack.sliceInner(this[Mt][2],this[Mt][3]+1)}}.restore(n)
a[Mt][0]=e,a[Mt][3]=n.length-1,a[Mt][2]=-1,this[zt]=this.program.heap,this[Ut]=this.program.constants,this.elementStack=i,this[Pt].scope.push(r),this[Pt].dynamicScope.push(s),this[jt]=new Zr,this[qt]=new ls(a,this[zt],t.program,{debugBefore:t=>yr.debugBefore(this,t),debugAfter:t=>{yr.debugAfter(this,t)}},a[Mt]),this.destructor={},this[It].push(this.destructor)}get stack(){return this[qt].stack}currentBlock(){return this.elements().block()}get pc(){return this[qt].fetchRegister(0)}fetch(t){this.stack.push(this.fetchValue(t))}load(t){let e=this.stack.pop()
this.loadValue(t,e)}fetchValue(t){if(Ot(t))return this[qt].fetchRegister(t)
switch(t){case 4:return this.s0
case 5:return this.s1
case 6:return this.t0
case 7:return this.t1
case 8:return this.v0}}loadValue(t,e){switch(Ot(t)&&this[qt].loadRegister(t,e),t){case 4:this.s0=e
break
case 5:this.s1=e
break
case 6:this.t0=e
break
case 7:this.t1=e
break
case 8:this.v0=e}}pushFrame(){this[qt].pushFrame()}popFrame(){this[qt].popFrame()}goto(t){this[qt].goto(t)}call(t){this[qt].call(t)}returnTo(t){this[qt].returnTo(t)}return(){this[qt].return()}get program(){return this.runtime.program}get env(){return this.runtime.env}captureState(t,e=this[qt].fetchRegister(0)){return{pc:e,dynamicScope:this.dynamicScope(),scope:this.scope(),stack:this.stack.capture(t)}}beginCacheGroup(){this[Pt].cache.push(this.updating().tail())}commitCacheGroup(){let t=new qr("END"),e=this.updating(),r=this[Pt].cache.pop(),s=r?e.nextNode(r):e.head(),n=e.tail(),i=f(new J(s,n)),a=new Rr(i,t)
e.insertBefore(a,s),e.append(new Vr(a)),e.append(t)}enter(t){let e=new G,r=this.capture(t),s=this.elements().pushUpdatableBlock(),n=new ps(r,this.runtime,s,e)
this.didEnter(n)}iterate(t,e){let r=this.stack
r.push(e),r.push(t)
let s=this.capture(2),n=this.elements().pushUpdatableBlock()
return new ps(s,this.runtime,n,new G)}enterItem(t,e){this.listBlock().map.set(t,e),this.didEnter(e)}enterList(t){let e=new G,r=this[qt].target(t),s=this.capture(0,r),n=this.elements().pushBlockList(e),i=this.stack.peek().artifacts,a=new ms(s,this.runtime,n,e,i)
this[Pt].list.push(a),this.didEnter(a)}didEnter(t){this.associateDestructor(U(t)),this[It].push(t),this.updateWith(t),this.pushUpdating(t.children)}exit(){this[It].pop(),this.elements().popBlock(),this.popUpdating(),this.updating().tail().didInitializeChildren()}exitList(){this.exit(),this[Pt].list.pop()}pushUpdating(t=new G){this[Pt].updating.push(t)}popUpdating(){return this[Pt].updating.pop()}updateWith(t){this.updating().append(t)}listBlock(){return this[Pt].list.current}associateDestructor(t){if(null===(e=t)||"object"!=typeof e||!(V in e))return
var e
M(this[It].current,t)}associateDestroyable(t){this.associateDestructor(U(t))}tryUpdating(){return this[Pt].updating.current}updating(){return this[Pt].updating.current}elements(){return this.elementStack}scope(){return this[Pt].scope.current}dynamicScope(){return this[Pt].dynamicScope.current}pushChildScope(){this[Pt].scope.push(this.scope().child())}pushDynamicScope(){let t=this.dynamicScope().child()
return this[Pt].dynamicScope.push(t),t}pushRootScope(t){let e=pr.sized(t)
return this[Pt].scope.push(e),e}pushScope(t){this[Pt].scope.push(t)}popScope(){this[Pt].scope.pop()}popDynamicScope(){this[Pt].dynamicScope.pop()}getSelf(){return this.scope().getSelf()}referenceForSymbol(t){return this.scope().getSymbol(t)}execute(t){let e
for(t&&t(this);e=this.next(),!e.done;);return e.value}next(){let t,{env:e,elementStack:r}=this,s=this[qt].nextStatement()
return null!==s?(this[qt].evaluateOuter(s,this),t={done:!1,value:null}):(this.stack.reset(),t={done:!0,value:new gs(e,this.popUpdating(),r.popBlock(),this.destructor)}),t}bindDynamicScope(t){let e=this.dynamicScope()
for(let r=t.length-1;r>=0;r--){let s=this[Ut].getString(t[r])
e.set(s,this.stack.pop())}}}{constructor(t,e,r,s){super(t,e,r),this.context=s,this.resume=Es(this.context)}static initial(t,e,{handle:r,self:s,dynamicScope:n,treeBuilder:i}){let a=t.program.heap.scopesizeof(r),o=pr.root(s,a),l=Ss(t.program.heap.getaddr(r),o,n),u=Es(e)(t,l,i)
return u.pushUpdating(),u}static empty(t,{handle:e,treeBuilder:r,dynamicScope:s},n){let i=Es(n)(t,Ss(t.program.heap.getaddr(e),pr.root(ye,0),s),r)
return i.pushUpdating(),i}capture(t,e=this[qt].fetchRegister(0)){return new hs(this.captureState(t,e),this.resume)}compile(t){return t.compile(this.context)}}class Ns{constructor(t){this.vm=t}next(){return this.vm.next()}sync(){return function(t,e){let r
t.begin()
do{r=e.next()}while(!r.done)
let s=r.value
return t.commit(),s}(this.vm.runtime.env,this)}}function Ts(t,e,r,s,n,i={},a=new Wr){let o=As.empty(t,{treeBuilder:e,handle:s,dynamicScope:a},r)
const l=xr(o.runtime.resolver,n),{manager:u,state:h}=l
let c
if(!Ur(Sr(u.getCapabilities(h))))throw new Error("Cannot invoke components with dynamic layouts as a root component.")
{let t=u.getJitStaticLayout(h,o.runtime.resolver)
c={handle:t.compile(r),symbolTable:t.symbolTable}}return function(t,e,r,s){const n=Object.keys(s).map(t=>[t,s[t]]),i=["main","else","attrs"],a=n.map(([t])=>"@"+t)
t.pushFrame()
for(let o=0;o<3*i.length;o++)t.stack.push(null)
return t.stack.push(null),n.forEach(([,e])=>{t.stack.push(e)}),t[jt].setup(t.stack,a,i,0,!0),t.stack.push(t[jt]),t.stack.push(e),t.stack.push(r),new Ns(t)}(o,c,l,i)}class Cs{get(t){return Ds.create(this,t)}}class xs extends Cs{constructor(){super(...arguments),this._lastRevision=null,this._lastValue=null}value(){let{tag:t,_lastRevision:e,_lastValue:r}=this
return e&&t.validate(e)||(r=this._lastValue=this.compute(),this._lastRevision=t.value()),r}}class Ls extends et{constructor(){super(...arguments),this.children=L()}get(t){let e=this.children[t]
return e||(e=this.children[t]=new _s(this.inner,t)),e}}class Ds extends xs{static create(t,e){return u(t)?new _s(t.value(),e):new Bs(t,e)}get(t){return new Bs(this,t)}}class _s extends Ds{constructor(t,e){super(),this._parentValue=t,this._propertyKey=e,this.tag=kt(t,e)}compute(){return this._parentValue[this._propertyKey]}}class Bs extends Ds{constructor(t,e){super()
let r=t.tag,s=w.create(a)
this._parentReference=t,this._parentObjectTag=s,this._propertyKey=e,this.tag=g([r,s])}compute(){let{_parentReference:t,_parentObjectTag:e,_propertyKey:r}=this,s=t.value()
return e.inner.update(kt(s,r)),"string"==typeof s&&"length"===r?s.length:"object"==typeof s&&s?s[r]:void 0}}class Os extends Cs{constructor(t){super(),this.tag=d.create(),this._value=t}value(){return this._value}update(t){let{_value:e}=this
t!==e&&(this.tag.inner.dirty(),this._value=t)}}class Rs{constructor(t,e,r,s){let{ComponentClass:n,name:i}=t
this.args=e,n&&(void 0!==n.class&&(n=n.class),this.component=new n(r,this.namedArgsSnapshot()),this.component.debugName=i)}get tag(){return this.args.tag}namedArgsSnapshot(){let t=this.args.named.value()
return Object.freeze(t)}}const Vs=new Ls(null)
class qs{static create(t){return new qs(t)}constructor(t){this.env=t.env}prepareArgs(t,e){return null}getCapabilities(t){return t.capabilities}getJitStaticLayout(t,e){let r=e.resolve(t.handle).meta
return e.compilable(r).asLayout()}getAotStaticLayout({name:t,handle:e,symbolTable:r},s){if(e&&r)return{handle:e,symbolTable:r}
throw new Error("unimplemented getAotStaticLayout")}create(t,e,r,s,n,i){if(e.ComponentClass){let t=this.env.getOwner()
return new Rs(e,r.capture(),t,this.env)}}getSelf(t){return t?new Ls(t.component):Vs}didCreateElement(t,e){}didRenderLayout(t,e){t&&(t.component.bounds=new Bt(e))}didCreate(t){t&&t.component.didInsertElement()}getTag(t){return t?t.tag:a}update(t,e){t&&(t.component.args=t.namedArgsSnapshot())}didUpdateLayout(){}didUpdate(t){t&&t.component.didUpdate()}getDestructor(t){return t?{destroy(){t.component[Ct]=!0,t.component.willDestroy(),t.component[xt]=!0}}:Is}}const Is={destroy(){}}
class Ps{constructor(t,e){this._registry=t,this._resolver=e}register(t,e,r){let s=this._toAbsoluteSpecifier(t)
this._registry.register(s,e,r)}registration(t){let e=this._toAbsoluteSpecifier(t)
return this._registry.registration(e)}unregister(t){let e=this._toAbsoluteSpecifier(t)
this._registry.unregister(e)}registerOption(t,e,r){let s=this._toAbsoluteOrTypeSpecifier(t)
this._registry.registerOption(s,e,r)}registeredOption(t,e){let r=this._toAbsoluteOrTypeSpecifier(t)
return this._registry.registeredOption(r,e)}registeredOptions(t){let e=this._toAbsoluteOrTypeSpecifier(t)
return this._registry.registeredOptions(e)}unregisterOption(t,e){let r=this._toAbsoluteOrTypeSpecifier(t)
this._registry.unregisterOption(r,e)}registerInjection(t,e,r){let s=this._toAbsoluteOrTypeSpecifier(t),n=this._toAbsoluteSpecifier(r)
this._registry.registerInjection(s,e,n)}registeredInjections(t){let e=this._toAbsoluteOrTypeSpecifier(t)
return this._registry.registeredInjections(e)}_toAbsoluteSpecifier(t,e){return this._resolver.identify(t,e)}_toAbsoluteOrTypeSpecifier(t){return function(t){return-1===t.indexOf(":")}(t)?t:this._toAbsoluteSpecifier(t)}}class Ms{constructor(t,e){this.position=0,this.array=t,this.keyFor=e}isEmpty(){return 0===this.array.length}next(){let{position:t,array:e,keyFor:r}=this
if(t>=e.length)return null
let s=e[t],n=r(s,t),i=t
return this.position++,{key:n,value:s,memo:i}}}class zs{constructor(t,e,r){this.position=0,this.keys=t,this.values=e,this.keyFor=r}isEmpty(){return 0===this.keys.length}next(){let{position:t,keys:e,values:r,keyFor:s}=this
if(t>=e.length)return null
let n=r[t],i=e[t],a=s(n,i)
return this.position++,{key:a,value:n,memo:i}}}const Us=new class{isEmpty(){return!0}next(){throw new Error("Cannot call next() on an empty iterator")}}
class js{constructor(t,e){this.tag=t.tag,this.ref=t,this.keyFor=e}iterate(){let{ref:t,keyFor:e}=this,r=t.value()
if(Array.isArray(r))return r.length>0?new Ms(r,e):Us
if(null==r)return Us
if(void 0!==r.forEach){let t=[]
return r.forEach((function(e){t.push(e)})),t.length>0?new Ms(t,e):Us}if("object"==typeof r){let t=Object.keys(r)
return t.length>0?new zs(t,t.map(t=>r[t]),e):Us}throw new Error(`Don't know how to {{#each ${r}}}`)}valueReferenceFor(t){return new Os(t.value)}updateValueReference(t,e){t.update(e.value)}memoReferenceFor(t){return new Os(t.memo)}updateMemoReference(t,e){t.update(e.memo)}}class Hs extends class{constructor({appendOperations:t,updateOperations:e}){this[cr]=null,this.appendOperations=t,this.updateOperations=e}toConditionalReference(t){return new Se(t,fr)}getAppendOperations(){return this.appendOperations}getDOM(){return this.updateOperations}begin(){this[dr]=new mr}get transaction(){return this[dr]}didCreate(t,e){this.transaction.didCreate(t,e)}didUpdate(t,e){this.transaction.didUpdate(t,e)}scheduleInstallModifier(t,e){this.transaction.scheduleInstallModifier(t,e)}scheduleUpdateModifier(t,e){this.transaction.scheduleUpdateModifier(t,e)}didDestroy(t){this.transaction.didDestroy(t)}commit(){let t=this.transaction
this[dr]=null,t.commit()}attributeFor(t,e,r,s=null){return Ue(t,e,s)}}{static create(t={}){return t.document=t.document||self.document,t.appendOperations=t.appendOperations||new me(t.document),new Hs(t)}constructor(t){super({appendOperations:t.appendOperations,updateOperations:new de(t.document)}),At(this,Et(t)),this.uselessAnchor=t.document.createElement("a")}protocolForURL(t){return this.uselessAnchor.href=t,this.uselessAnchor.protocol}iterableFor(t,e){return function(t,e){let r
if(!e)throw new Error("Must specify a key for #each")
if("@identity"===e)throw new Error("@identity key in #each loop supported only in Ember, use @primitive, @index or property path instead")
switch(e){case"@index":r=(t,e)=>String(e)
break
case"@primitive":r=t=>String(t)
break
default:if("@"===e.charAt(0))throw new Error(`Invalid key: ${e}, valid keys: @index, @primitive, path`)
r=t=>null!=t?t[e]:t}return new js(t,r)}(t,e)}getOwner(){return Et(this)}setOwner(t,e){At(t,e)}}const Fs="object"==typeof document?document:null
class $s{constructor(){this.byName=L(),this.byHandle=L()}hasName(t){return t in this.byName}getHandle(t){return this.byName[t]}hasHandle(t){return t in this.byHandle}getByHandle(t){return this.byHandle[t]}register(t,e,r){this.byHandle[t]=r,this.byName[e]=t}}class Gs extends xs{constructor(t,e){super(),this.helper=t,this.tag=e.tag,this.args=e.capture()}compute(){let{helper:t,args:e}=this
return t(e.positional.value(),e.named.value())}}function Js(t){return{type:"number",value:t}}function Ys(t){return{type:"array",value:t}}function Ws(t){return{type:"string-array",value:t}}function Qs(t){return{type:"serializable",value:t}}function Ks(t){return{type:"other",value:t}}function Zs(t){return{type:"label",value:t}}class Xs{constructor(t){this.buffer=t,this.size=0}encode(t,e){if(t>255)throw new Error(`Opcode type over 8-bits. Got ${t}.`)
let r=t|e|arguments.length-2<<8
this.buffer.push(r)
for(let s=2;s<arguments.length;s++){let t=arguments[s]
if("number"==typeof t&&t>4294967295)throw new Error(`Operand over 32-bits. Got ${t}.`)
this.buffer.push(t)}this.size=this.buffer.length}patch(t,e){if(-1!==this.buffer[t+1])throw new Error("Trying to patch operand in populated slot instead of a reserved slot.")
this.buffer[t+1]=e}}class tn{constructor(t){this.blocks=t}get(t){return this.blocks&&this.blocks[t]||null}has(t){let{blocks:e}=this
return null!==e&&t in e}with(t,e){let{blocks:r}=this
return new tn(r?W({},r,{[t]:e}):{[t]:e})}get hasAny(){return null!==this.blocks}}const en=new tn(null)
function rn(t,e){if(null===t)return en
let r=L(),[s,n]=t
for(let i=0;i<s.length;i++)r[s[i]]=Ba(n[i],e)
return new tn(r)}class sn{constructor(){this.labels=L(),this.targets=[]}label(t,e){this.labels[t]=e}target(t,e){this.targets.push({at:t,target:e})}patch(t){let{targets:e,labels:r}=this
for(let s=0;s<e.length;s++){let{at:n,target:i}=e[s],a=r[i]-n
t.patch(n,a)}}}function nn(t,e,r,s){if("number"==typeof t)return void 0!==s?{type:"Number",op:t,op1:e,op2:r,op3:s}:void 0!==r?{type:"Number",op:t,op1:e,op2:r}:void 0!==e?{type:"Number",op:t,op1:e}:{type:"Number",op:t}
{let r
if(function(t){return"CompileInline"===t||"CompileBlock"===t||"InvokeStatic"===t||"PushCompilable"===t||"Args"===t||"IfResolvedComponent"===t||"DynamicComponent"===t}(t))r="Compile"
else if(function(t){return"IfResolved"===t||"Expr"===t||"SimpleArgs"===t}(t))r="Resolution"
else{if(!function(t){return"Label"===t||"Option"===t||"GetComponentLayout"===t||"StartLabels"===t||"StopLabels"===t||"SimpleArgs"===t||"JitCompileBlock"===t||"SetBlock"===t}(t))throw new Error("Exhausted "+t)
r="Simple"}return void 0===e?{type:r,op:t,op1:void 0}:{type:r,op:t,op1:e}}}class an{constructor(){this.labelsStack=new _,this.encoder=new Xs([])}commit(t,e){return this.encoder.encode(5,1024),function(t,e,r){let s=t.malloc()
for(let n=0;n<r.length;n++){let e=r[n]
"function"==typeof e?t.pushPlaceholder(e):"object"==typeof e?t.pushStdlib(e):t.push(e)}return t.finishMalloc(s,e),s}(t,e,this.encoder.buffer)}push(t,e,...r){if((s=e)>=0&&s<=15){let s=r.map((e,r)=>this.operand(t,e,r))
return this.encoder.encode(e,1024,...s)}{let s=r.map((e,r)=>this.operand(t,e,r))
return this.encoder.encode(e,0,...s)}var s}operand(t,e,r){return e&&"object"==typeof e&&"label"===e.type?(this.currentLabels.target(this.encoder.size+r,e.value),-1):on(t,e)}get currentLabels(){return this.labelsStack.current}label(t){this.currentLabels.label(t,this.encoder.size)}startLabels(){this.labelsStack.push(new sn)}stopLabels(){this.labelsStack.pop().patch(this.encoder)}}function on(t,e){if("number"==typeof e||"function"==typeof e)return e
if("boolean"==typeof e)return!0===e?1:0
if("string"==typeof e)return t.string(e)
if(null===e)return 0
switch(e.type){case"number":return t.number(e.value)
case"array":return t.array(e.value)
case"string-array":return t.stringArray(e.value)
case"serializable":return t.templateMeta(e.value)
case"other":return t.other(e.value)
case"stdlib":return e
case"primitive":{let{primitive:r,type:s}=e.value
return function(t,e,r){if(e>=4294967295||e<0){if("number"!=typeof r)throw new Error("This condition should only be possible if the primitive isn't already a constant")
return on(t,Js(r))<<3|5}return e}(t,on(t,r)<<3|s,r)}default:throw new Error("Exhausted "+e)}}function ln(t){return[un(t),nn(30)]}function un(t){let e,r=0
switch(typeof t){case"number":t%1==0?t>-1?e=t:(e=Js(t),r=4):(e=Js(t),r=1)
break
case"string":e=t,r=2
break
case"boolean":e=t,r=3
break
case"object":e=2,r=3
break
case"undefined":e=3,r=3
break
default:throw new Error("Invalid primitive passed to pushPrimitive")}return nn(29,function(t,e){return{type:"primitive",value:{primitive:t,type:e}}}(e,r))}function hn({handle:t,params:e,hash:r}){return[nn(0),nn("SimpleArgs",{params:e,hash:r,atNames:!1}),nn(16,t),nn(1),nn(35,8)]}function cn(t,e){let r=[nn(58)]
return t&&t.length&&r.push(nn(57,Ws(t))),r.push(e(),nn(59)),r}function pn(t,e){return[nn("SimpleArgs",{params:e,hash:null,atNames:!0}),nn(24,t),nn("Option",nn("JitCompileBlock")),nn(63),nn(39),nn(1)]}function dn(t){return[gn(t&&t.symbolTable),nn(61),nn("PushCompilable",t)]}function mn(t){return[nn(0),nn("PushCompilable",t),nn("JitCompileBlock"),nn(2),nn(1)]}function fn(t,e){let{parameters:r}=t.symbolTable,s=r.length,n=Math.min(e,s)
if(0===n)return mn(t)
let i=[]
if(i.push(nn(0)),n){i.push(nn(38))
for(let t=0;t<n;t++)i.push(nn(32,2,e-t)),i.push(nn(19,r[t]))}return i.push(nn("PushCompilable",t)),i.push(nn("JitCompileBlock")),i.push(nn(2)),n&&i.push(nn(39)),i.push(nn(1)),i}function gn(t){return t?nn(62,Qs(t)):un(null)}function bn(t,e){let{encoder:r,syntax:{program:{mode:s,constants:n}}}=t
switch(e.op){case"Option":return Cn(t,function(t){let e=t.op1
return null===e?En:e}(e))
case"Label":return r.label(e.op1)
case"StartLabels":return r.startLabels()
case"StopLabels":return r.stopLabels()
case"JitCompileBlock":return Cn(t,function(t){return"jit"===t?nn(60):En}(s))
case"GetComponentLayout":return r.push(n,function(t){return"aot"===t?93:94}(s),e.op1)
case"SetBlock":return r.push(n,function(t){return"aot"===t?20:21}(s),e.op1)
default:return Z(e)}}function yn(t,e){Ln(t,function(t,e){switch(e.op){case"CompileBlock":return function(t,e){return function(t,e){let[,r,s,n,i]=t,a=rn(i,e.meta)
return e.syntax.macros.blocks.compile(r,s,n,a,e)}(e.op1,t)}(t,e)
case"CompileInline":return function(t,e){let{inline:r,ifUnhandled:s}=e.op1,n=function(t,e){return e.syntax.macros.inlines.compile(t,e)}(r,t)
return Tn(n)?n:s(r)}(t,e)
case"InvokeStatic":return function(t,e){let r=e.op1
if("aot"===t.program.mode){let e=r.compile(t)
return nn(3,e===xa?()=>r.compile(t):e)}return[nn(28,Ks(e.op1)),nn(60),nn(2)]}(t.syntax,e)
case"Args":return function({params:t,hash:e,blocks:r,atNames:s}){let n=[]
r.hasAny&&(n.push(dn(r.get("default"))),n.push(dn(r.get("else"))),n.push(dn(r.get("attrs"))))
let{count:i,actions:a}=Dn(t)
n.push(a)
let o=i<<4
s&&(o|=8)
r&&(o|=7)
let l=N
if(e){l=e[0]
let t=e[1]
for(let e=0;e<t.length;e++)n.push(nn("Expr",t[e]))}return n.push(nn(83,Ws(l),o)),n}(e.op1)
case"PushCompilable":return function(t,e){return null===t?un(null):"aot"===e.program.mode?un(t.compile(e)):nn(28,Ks(t))}(e.op1,t.syntax)
case"DynamicComponent":return function(t,e){let{definition:r,attrs:s,params:n,args:i,blocks:a,atNames:o}=e.op1,l=s&&s.length>0?Ba(s,t.meta):null,u=Array.isArray(a)||null===a?rn(a,t.meta):a
return Pa(t.meta,{definition:r,attrs:l,params:n,hash:i,atNames:o,blocks:u})}(t,e)
case"IfResolvedComponent":return function(t,e){let{name:r,attrs:s,blocks:n,staticTemplate:i,dynamicTemplate:a,orElse:o}=e.op1,l=Va(r,{resolver:t.syntax.program.resolverDelegate,meta:t.meta}),{meta:u}=t
if(null!==l){let{handle:t,capabilities:e,compilable:r}=l,o=Ba(s,u),h=rn(n,u)
return null!==r?i(t,e,r,{attrs:o,blocks:h}):a(t,e,{attrs:o,blocks:h})}if(o)return o()
throw new Error("Compile Error: Cannot find component "+r)}(t,e)
default:return Z(e)}}(t,e))}function vn(t,e,r){void 0!==r.op3?t.push(e,r.op,r.op1,r.op2,r.op3):void 0!==r.op2?t.push(e,r.op,r.op1,r.op2):void 0!==r.op1?t.push(e,r.op,r.op1):t.push(e,r.op)}class kn{constructor(){this.names=L()}add(t,e){this.funcs.push(e),this.names[t]=this.funcs.length-1}}const wn=new class extends kn{constructor(){super(...arguments),this.funcs=[]}compile(t,e){let r=t[0],s=this.names[r]
return(0,this.funcs[s])(t,e)}}
function Sn(t,e,r,s){switch(r.op){case"SimpleArgs":xn(t,e,function(t,e,r){let s=[],{count:n,actions:i}=Dn(t)
s.push(i)
let a=n<<4
r&&(a|=8)
let o=N
if(e){o=e[0]
let t=e[1]
for(let e=0;e<t.length;e++)s.push(nn("Expr",t[e]))}return s.push(nn(83,Ws(o),a)),s}(r.op1.params,r.op1.hash,r.op1.atNames),s)
break
case"Expr":xn(t,e,(n=r.op1,i=e.meta,Array.isArray(n)?wn.compile(n,i):[un(n),nn(30)]),s)
break
case"IfResolved":xn(t,e,function(t,e){let{kind:r,name:s,andThen:n,orElse:i}=e.op1,a=function(t,e,r,s){switch(e){case"Modifier":return t.lookupModifier(r,s)
case"Helper":return t.lookupHelper(r,s)
case"ComponentDefinition":{let e=t.lookupComponent(r,s)
return e&&e.handle}}}(t.syntax.program.resolverDelegate,r,s,t.meta.referrer)
if(null!==a)return n(a)
if(i)return i()
throw new Error(`Unexpected ${r} ${s}`)}(e,r),s)
break
default:return Z(r)}var n,i}wn.add(23,([,t],e)=>nn("IfResolved",{kind:"Helper",name:t,andThen:t=>hn({handle:t,params:null,hash:null}),orElse:()=>e.asPartial?nn(104,t):[nn(22,0),nn(23,t)]})),wn.add(30,([,t])=>{let e=[]
for(let r of t)e.push(nn("Expr",r))
return e.push(nn(27,t.length)),e}),wn.add(29,([,t,e,r],s)=>{if("component"===t){let[t,...n]=e
return function({definition:t,params:e,hash:r,atNames:s},n){return[nn(0),nn("SimpleArgs",{params:e,hash:r,atNames:s}),nn(87),nn("Expr",t),nn(78,Qs(n)),nn(1),nn(35,8)]}({definition:t,params:n,hash:r,atNames:!1},s.referrer)}return nn("IfResolved",{kind:"Helper",name:t,andThen:t=>hn({handle:t,params:e,hash:r})})}),wn.add(24,([,t,e])=>[nn(22,t),...e.map(t=>nn(23,t))]),wn.add(25,([,t],e)=>{let r=[]
if(e.asPartial){let e=t[0]
t=t.slice(1),r.push(nn(104,e))}else r.push(nn(22,0))
for(let s=0;s<t.length;s++)r.push(nn(23,t[s]))
return r}),wn.add(28,()=>ln(void 0)),wn.add(26,([,t])=>nn(25,t)),wn.add(27,([,t])=>[nn(24,t),nn("JitCompileBlock"),nn(26)])
const En={"no-action":!0},An={"not-handled":!0}
function Nn(t){return t&&!!t["no-action"]}function Tn(t){return!t||!t["not-handled"]}function Cn(t,e){if(!Nn(e))if(Array.isArray(e))for(let r of e)Cn(t,r)
else"Simple"===e.type?bn(t,e):vn(t.encoder,t.syntax.program.constants,e)}function xn(t,e,r,s){if(!Nn(r))if(Array.isArray(r))for(let n of r)xn(t,e,n,s)
else"Number"===r.type?vn(t,s,r):"Resolution"===r.type?Sn(t,e,r,s):bn(e,r)}function Ln(t,e){if(!Nn(e))if(Array.isArray(e))for(let r of e)Ln(t,r)
else"Number"===e.type?vn(t.encoder,t.syntax.program.constants,e):"Compile"===e.type?yn(t,e):"Resolution"===e.type?Sn(t.encoder,t,e,t.syntax.program.constants):bn(t,e)}function Dn(t){if(!t)return{count:0,actions:En}
let e=[]
for(let r=0;r<t.length;r++)e.push(nn("Expr",t[r]))
return{count:t.length,actions:e}}function _n(t){return{asPartial:t.asPartial||!1,evalSymbols:Bn(t),referrer:t.referrer,size:t.block.symbols.length}}function Bn(t){let{block:e}=t
return e.hasEval?e.symbols:null}function On(t){let e=[],r=0
t((function(t,s){e.push({match:t,callback:s,label:"CLAUSE"+r++})}))
let s=[nn(68,2),nn(67),nn(31),nn("StartLabels")]
for(let n of e.slice(0,-1))s.push(nn(66,Zs(n.label),n.match))
for(let n=e.length-1;n>=0;n--){let t=e[n]
s.push(nn("Label",t.label),nn(33,2),t.callback()),0!==n&&s.push(nn(4,Zs("END")))}return s.push(nn("Label","END"),nn("StopLabels"),nn(69)),s}function Rn({args:t,body:e}){let{count:r,actions:s}=t()
return[nn("StartLabels"),nn(0),nn(6,Zs("ENDINITIAL")),s,nn(68,r),e(),nn("Label","FINALLY"),nn(69),nn(5),nn("Label","ENDINITIAL"),nn(1),nn("StopLabels")]}function Vn({args:t,ifTrue:e,ifFalse:r}){return Rn({args:t,body:()=>{let t=[nn(65,Zs("ELSE")),e(),nn(4,Zs("FINALLY")),nn("Label","ELSE")]
return r&&t.push(r()),t}})}class qn{constructor(){let{blocks:t,inlines:e}=function(t,e){return t.add("if",(t,e,r)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #if requires a single argument")
return Vn({args:()=>({count:1,actions:[nn("Expr",t[0]),nn(70)]}),ifTrue:()=>mn(r.get("default")),ifFalse:()=>r.has("else")?mn(r.get("else")):En})}),t.add("unless",(t,e,r)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #unless requires a single argument")
return Vn({args:()=>({count:1,actions:[nn("Expr",t[0]),nn(70)]}),ifTrue:()=>r.has("else")?mn(r.get("else")):En,ifFalse:()=>mn(r.get("default"))})}),t.add("with",(t,e,r)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #with requires a single argument")
return Vn({args:()=>({count:2,actions:[nn("Expr",t[0]),nn(32,3,0),nn(70)]}),ifTrue:()=>fn(r.get("default"),1),ifFalse:()=>r.has("else")?mn(r.get("else")):En})}),t.add("let",(t,e,r)=>{if(!t)throw new Error("SYNTAX ERROR: #let requires arguments")
let{count:s,actions:n}=Dn(t)
return[n,fn(r.get("default"),s)]}),t.add("each",(t,e,r)=>Rn({args(){let r
return r=e&&"key"===e[0][0]?[nn("Expr",e[1][0])]:[ln(null)],r.push(nn("Expr",t[0])),{count:2,actions:r}},body(){let t=[nn(73),nn(65,Zs("ELSE")),nn(0),nn(32,2,1),nn(6,Zs("ITER")),nn(71,Zs("BODY")),nn("Label","ITER"),nn(74,Zs("BREAK")),nn("Label","BODY"),fn(r.get("default"),2),nn(33,2),nn(4,Zs("FINALLY")),nn("Label","BREAK"),nn(72),nn(1),nn(4,Zs("FINALLY")),nn("Label","ELSE")]
return r.has("else")&&t.push(mn(r.get("else"))),t}})),t.add("in-element",(t,e,r)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #in-element requires a single argument")
return Vn({args(){let[r,s]=e,n=[]
for(let t=0;t<r.length;t++){let e=r[t]
if("guid"!==e&&"insertBefore"!==e)throw new Error(`SYNTAX ERROR: #in-element does not take a \`${r[0]}\` option`)
n.push(nn("Expr",s[t]))}return n.push(nn("Expr",t[0]),nn(32,3,0)),{count:4,actions:n}},ifTrue:()=>[nn(49),mn(r.get("default")),nn(55)]})}),t.add("-with-dynamic-vars",(t,e,r)=>{if(e){let[t,s]=e,{actions:n}=Dn(s)
return[n,cn(t,()=>mn(r.get("default")))]}return mn(r.get("default"))}),t.add("component",(t,e,r,s)=>{if("string"==typeof t[0]){let n=qa(s,t[0],e,r.get("default"))
if(Tn(n))return n}let[n,...i]=t
return nn("DynamicComponent",{definition:n,attrs:null,params:i,args:e,atNames:!1,blocks:r})}),e.add("component",(t,e,r,s)=>{let n=e&&e[0]
if("string"==typeof n){let t=qa(s,n,r,null)
if(t!==An)return t}let[i,...a]=e
return Pa(s.meta,{definition:i,attrs:null,params:a,hash:r,atNames:!1,blocks:en})}),{blocks:t,inlines:e}}(new In,new Pn)
this.blocks=t,this.inlines=e}}class In{constructor(){this.names=L(),this.funcs=[]}add(t,e){this.funcs.push(e),this.names[t]=this.funcs.length-1}addMissing(t){this.missing=t}compile(t,e,r,s,n){let i=this.names[t],a={resolver:n.syntax.program.resolverDelegate,meta:n.meta}
if(void 0===i){return(0,this.missing)(t,e,r,s,a)}return(0,this.funcs[i])(e,r,s,a)}}class Pn{constructor(){this.names=L(),this.funcs=[]}add(t,e){this.funcs.push(e),this.names[t]=this.funcs.length-1}addMissing(t){this.missing=t}compile(t,e){let r,s,n,i=t[1]
if(!Array.isArray(i))return An
if(29===i[0])r=i[1],s=i[2],n=i[3]
else{if(23!==i[0])return An
r=i[1],s=n=null}let a=this.names[r],o={resolver:e.syntax.program.resolverDelegate,meta:e.meta}
if(void 0===a&&this.missing){return(0,this.missing)(r,s,n,o)}if(void 0!==a){return(0,this.funcs[a])(r,s,n,o)}return An}}function Mn(t,e){return{syntax:t,encoder:new an,meta:e}}const zn=new class extends kn{constructor(){super(...arguments),this.funcs=[]}add(t,e){this.funcs.push(e),this.names[t]=this.funcs.length-1}compile(t,e){let r=t[0],s=this.names[r]
return(0,this.funcs[s])(t,e)}}
function Un(t,e,r,s){return{type:"ElementModifierStatement",path:Jn(t),params:e||[],hash:r||Wn([]),loc:ti(s||null)}}function jn(t){return Array.isArray(t)&&2===t.length&&"loc"===t[0]}function Hn(t){if("string"==typeof t)return Un(t)
let e,r,s=function(t){return"string"==typeof t?Jn(t):Jn(t[1],t[2]&&t[2][1])}(t[0]),n=null,i=t.slice(1),a=i.shift()
var o
return o=a,Array.isArray(o)&&!jn(o)&&(e=a,a=i.shift(),function(t){return!("object"!=typeof t||!t||Array.isArray(t))}(a)&&(r=function(t,e){let r=[]
return Object.keys(t).forEach(e=>{r.push(Qn(e,t[e]))}),Wn(r,e)}(a))),jn(a)&&(n=a[1]),Un(s,e,r,n)}function Fn(t){let e,r=t[0]
return e="string"==typeof t[1]?Gn(t[1]):t[1],$n(r,e,t[2]?t[2][1]:void 0)}function $n(t,e,r){return{type:"AttrNode",name:t,value:e,loc:ti(r||null)}}function Gn(t,e){return{type:"TextNode",chars:t||"",loc:ti(e||null)}}function Jn(t,e){if("string"!=typeof t)return t
let r=t.split("."),s=!1
return"this"===r[0]&&(s=!0,r=r.slice(1)),{type:"PathExpression",original:t,this:s,parts:r,data:!1,loc:ti(e||null)}}function Yn(t,e,r){return{type:t,value:e,original:e,loc:ti(r||null)}}function Wn(t,e){return{type:"Hash",pairs:t||[],loc:ti(e||null)}}function Qn(t,e,r){return{type:"HashPair",key:t,value:e,loc:ti(r||null)}}function Kn(t){return t||null}function Zn(t,e){return{line:t,column:e}}zn.add(0,t=>nn(40,t[1])),zn.add(2,t=>nn(41,t[1])),zn.add(10,()=>nn(54)),zn.add(9,()=>nn(53)),zn.add(3,t=>{let[,e,r,s]=t
return nn("IfResolved",{kind:"Modifier",name:e,andThen:t=>[nn(0),nn("SimpleArgs",{params:r,hash:s,atNames:!1}),nn(56,t),nn(1)]})}),zn.add(11,([,t,e,r])=>nn(50,t,e,r)),zn.add(12,([,t,e,r])=>[nn("Expr",e),nn(51,t,!1,r)]),zn.add(19,([,t,e,r])=>[nn("Expr",e),nn(51,t,!0,r)]),zn.add(13,([,t,e,r])=>[nn("Expr",e),nn(52,t,!1,r)]),zn.add(20,([,t,e,r])=>[nn("Expr",e),nn(52,t,!0,r)]),zn.add(7,([,t,e])=>e?nn(47,t):[nn(90),nn(47,t)]),zn.add(6,([,t,e,r,s])=>nn("DynamicComponent",{definition:t,attrs:e,params:null,args:r,blocks:s,atNames:!0})),zn.add(5,([,t,e,r,s])=>nn("IfResolvedComponent",{name:t,attrs:e,blocks:s,staticTemplate:(t,e,s,{blocks:n,attrs:i})=>[nn(79,t),Ia({capabilities:e,layout:s,attrs:i,params:null,hash:r,blocks:n})],dynamicTemplate:(t,e,{attrs:s,blocks:n})=>[nn(79,t),Ma({capabilities:e,attrs:s,params:null,hash:r,atNames:!0,blocks:n})]})),zn.add(16,([,t,e],r)=>Vn({args:()=>({count:2,actions:[nn("Expr",t),nn(32,3,0)]}),ifTrue:()=>[nn(103,Qs(r.referrer),Ws(r.evalSymbols),Ys(e)),nn(39),nn(1)]})),zn.add(15,([,t,e])=>pn(t,e)),zn.add(14,([,t])=>pn(t,N)),zn.add(21,([,t],e)=>nn(105,Ws(e.evalSymbols),Ys(t))),zn.add(1,t=>nn("CompileInline",{inline:t,ifUnhandled:()=>[nn(0),nn("Expr",t[1]),nn(3,{type:"stdlib",value:t[2]?"trusting-append":"cautious-append"}),nn(1)]})),zn.add(4,t=>nn("CompileBlock",t))
const Xn={source:"(synthetic)",start:{line:1,column:0},end:{line:1,column:0}}
function ti(...t){if(1===t.length){let e=t[0]
return e&&"object"==typeof e?{source:Kn(e.source),start:Zn(e.start.line,e.start.column),end:Zn(e.end.line,e.end.column)}:Xn}{let[e,r,s,n,i]=t
return{source:Kn(i),start:Zn(e,r),end:Zn(s,n)}}}var ei={mustache:function(t,e,r,s,n,i){return"string"==typeof t&&(t=Jn(t)),{type:"MustacheStatement",path:t,params:e||[],hash:r||Wn([]),escaped:!s,loc:ti(n||null),strip:i||{open:!1,close:!1}}},block:function(t,e,r,s,n,i,a,o,l){let u,h
return u="Template"===s.type?W({},s,{type:"Block"}):s,h=null!=n&&"Template"===n.type?W({},n,{type:"Block"}):n,{type:"BlockStatement",path:Jn(t),params:e||[],hash:r||Wn([]),program:u||null,inverse:h||null,loc:ti(i||null),openStrip:a||{open:!1,close:!1},inverseStrip:o||{open:!1,close:!1},closeStrip:l||{open:!1,close:!1}}},partial:function(t,e,r,s,n){return{type:"PartialStatement",name:t,params:e||[],hash:r||Wn([]),indent:s||"",strip:{open:!1,close:!1},loc:ti(n||null)}},comment:function(t,e){return{type:"CommentStatement",value:t,loc:ti(e||null)}},mustacheComment:function(t,e){return{type:"MustacheCommentStatement",value:t,loc:ti(e||null)}},element:function(t,e,...r){let s
s=Array.isArray(e)?function(...t){let e={}
for(let r of t)switch(r[0]){case"attrs":{let[,...t]=r
e.attrs=t.map(Fn)
break}case"modifiers":{let[,...t]=r
e.modifiers=t.map(Hn)
break}case"body":{let[,...t]=r
e.children=t
break}case"comments":{let[,...t]=r
e.comments=t
break}case"as":{let[,...t]=r
e.blockParams=t
break}case"loc":{let[,t]=r
e.loc=t
break}}return e}(e,...r):e||{}
let{attrs:n,blockParams:i,modifiers:a,comments:o,children:l,loc:u}=s,h=!1
return"object"==typeof t?(h=t.selfClosing,t=t.name):"/"===t.slice(-1)&&(t=t.slice(0,-1),h=!0),{type:"ElementNode",tag:t||"",selfClosing:h,attributes:n||[],blockParams:i||[],modifiers:a||[],comments:o||[],children:l||[],loc:ti(u||null)}},elementModifier:Un,attr:$n,text:Gn,sexpr:function(t,e,r,s){return{type:"SubExpression",path:Jn(t),params:e||[],hash:r||Wn([]),loc:ti(s||null)}},path:Jn,concat:function(t,e){return{type:"ConcatStatement",parts:t||[],loc:ti(e||null)}},hash:Wn,pair:Qn,literal:Yn,program:function(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:ti(r||null)}},blockItself:function(t,e,r=!1,s){return{type:"Block",body:t||[],blockParams:e||[],chained:r,loc:ti(s||null)}},template:function(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:ti(r||null)}},loc:ti,pos:Zn,string:ri("StringLiteral"),boolean:ri("BooleanLiteral"),number:ri("NumberLiteral"),undefined:()=>Yn("UndefinedLiteral",void 0),null:()=>Yn("NullLiteral",null)}
function ri(t){return function(e){return Yn(t,e)}}const si=function(){function t(t,e){let r=Error.call(this,t)
this.message=t,this.stack=r.stack,this.location=e}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}()
let ni=/[!"#%-,\.\/;->@\[-\^`\{-~]/
function ii(t){let e=function(t){let e=t.attributes.length,r=[]
for(let n=0;n<e;n++)r.push(t.attributes[n].name)
let s=r.indexOf("as")
if(-1!==s&&e>s&&"|"===r[s+1].charAt(0)){let n=r.slice(s).join(" ")
if("|"!==n.charAt(n.length-1)||2!==n.match(/\|/g).length)throw new si("Invalid block parameters syntax: '"+n+"'",t.loc)
let i=[]
for(let a=s+1;a<e;a++){let e=r[a].replace(/\|/g,"")
if(""!==e){if(ni.test(e))throw new si("Invalid identifier for block parameters: '"+e+"' in '"+n+"'",t.loc)
i.push(e)}}if(0===i.length)throw new si("Cannot use zero block parameters: '"+n+"'",t.loc)
return t.attributes=t.attributes.slice(0,s),i}return null}(t)
e&&(t.blockParams=e)}function ai(t,e){(function(t){switch(t.type){case"Block":case"Template":return t.body
case"ElementNode":return t.children}})(t).push(e)}function oi(t){return"StringLiteral"===t.type||"BooleanLiteral"===t.type||"NumberLiteral"===t.type||"NullLiteral"===t.type||"UndefinedLiteral"===t.type}var li={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ﬃ",fflig:"ﬀ",ffllig:"ﬄ",Ffr:"𝔉",ffr:"𝔣",filig:"ﬁ",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"ﬂ",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"Ĳ",ijlig:"ĳ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ŉ",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},ui=/^#[xX]([A-Fa-f0-9]+)$/,hi=/^#([0-9]+)$/,ci=/^([A-Za-z0-9]+)$/,pi=function(){function t(t){this.named=t}return t.prototype.parse=function(t){if(t){var e=t.match(ui)
return e?String.fromCharCode(parseInt(e[1],16)):(e=t.match(hi))?String.fromCharCode(parseInt(e[1],10)):(e=t.match(ci))?this.named[e[1]]:void 0}},t}(),di=/[\t\n\f ]/,mi=/[A-Za-z]/,fi=/\r\n?/g
function gi(t){return di.test(t)}function bi(t){return mi.test(t)}var yi=function(){function t(t,e,r){void 0===r&&(r="precompile"),this.delegate=t,this.entityParser=e,this.mode=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var t=this.peek()
if("<"!==t||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===t){var e=this.tagNameBuffer.toLowerCase()
"pre"!==e&&"textarea"!==e||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var t=this.peek(),e=this.tagNameBuffer
"<"!==t||this.isIgnoredEndTag()?"&"===t&&"script"!==e&&"style"!==e?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(t)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var t=this.consume()
"!"===t?this.transitionTo("markupDeclarationOpen"):"/"===t?this.transitionTo("endTagOpen"):("@"===t||":"===t||bi(t))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(t))},markupDeclarationOpen:function(){"-"===this.consume()&&"-"===this.peek()&&(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment())},commentStart:function(){var t=this.consume()
"-"===t?this.transitionTo("commentStartDash"):">"===t?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(t),this.transitionTo("comment"))},commentStartDash:function(){var t=this.consume()
"-"===t?this.transitionTo("commentEnd"):">"===t?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var t=this.consume()
"-"===t?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(t)},commentEndDash:function(){var t=this.consume()
"-"===t?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+t),this.transitionTo("comment"))},commentEnd:function(){var t=this.consume()
">"===t?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+t),this.transitionTo("comment"))},tagName:function(){var t=this.consume()
gi(t)?this.transitionTo("beforeAttributeName"):"/"===t?this.transitionTo("selfClosingStartTag"):">"===t?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(t)},endTagName:function(){var t=this.consume()
gi(t)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===t?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===t?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(t)},beforeAttributeName:function(){var t=this.peek()
gi(t)?this.consume():"/"===t?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===t?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===t?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(t)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var t=this.peek()
gi(t)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===t?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===t||"'"===t||"<"===t?(this.delegate.reportSyntaxError(t+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(t)):(this.consume(),this.delegate.appendToAttributeName(t))},afterAttributeName:function(){var t=this.peek()
gi(t)?this.consume():"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===t?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(t))},beforeAttributeValue:function(){var t=this.peek()
gi(t)?this.consume():'"'===t?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===t?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(t))},attributeValueDoubleQuoted:function(){var t=this.consume()
'"'===t?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(t)},attributeValueSingleQuoted:function(){var t=this.consume()
"'"===t?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(t)},attributeValueUnquoted:function(){var t=this.peek()
gi(t)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===t?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===t?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===t?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(t))},afterAttributeValueQuoted:function(){var t=this.peek()
gi(t)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===t?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===t?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var t=this.consume();("@"===t||":"===t||bi(t))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(t))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(t){this.state=t},t.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},t.prototype.tokenizePart=function(t){for(this.input+=function(t){return t.replace(fi,"\n")}(t);this.index<this.input.length;){var e=this.states[this.state]
if(void 0===e)throw new Error("unhandled state "+this.state)
e.call(this)}},t.prototype.tokenizeEOF=function(){this.flushData()},t.prototype.flushData=function(){"data"===this.state&&(this.delegate.finishData(),this.transitionTo("beforeData"))},t.prototype.peek=function(){return this.input.charAt(this.index)},t.prototype.consume=function(){var t=this.peek()
return this.index++,"\n"===t?(this.line++,this.column=0):this.column++,t},t.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index)
if(-1!==t){var e=this.input.slice(this.index,t),r=this.entityParser.parse(e)
if(r){for(var s=e.length;s;)this.consume(),s--
return this.consume(),r}}},t.prototype.markTagStart=function(){this.delegate.tagOpen()},t.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},t.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer
return"title"===t&&"</title>"!==this.input.substring(this.index,this.index+8)||"style"===t&&"</style>"!==this.input.substring(this.index,this.index+8)||"script"===t&&"<\/script>"!==this.input.substring(this.index,this.index+9)},t}()
function vi(t,e){return{path:t.PathExpression(e.path),params:e.params?e.params.map(e=>t.acceptNode(e)):[],hash:e.hash?t.Hash(e.hash):ei.hash()}}function ki(t,e){let{path:r,params:s,hash:n,loc:i}=e
if(oi(r)){let s=`{{${function(t){return"UndefinedLiteral"===t.type?"undefined":JSON.stringify(t.value)}(r)}}}`,n=`<${t.name} ... ${s} ...`
throw new si(`In ${n}, ${s} is not a valid modifier: "${r.original}" on line ${i&&i.start.line}.`,e.loc)}let a=ei.elementModifier(r,s,n,i)
t.modifiers.push(a)}function wi(t,e){t.isDynamic=!0,t.parts.push(e)}const Si={Program:X("body"),Template:X("body"),Block:X("body"),MustacheStatement:X("path","params","hash"),BlockStatement:X("path","params","hash","program","inverse"),ElementModifierStatement:X("path","params","hash"),PartialStatement:X("name","params","hash"),CommentStatement:X(),MustacheCommentStatement:X(),ElementNode:X("attributes","modifiers","children","comments"),AttrNode:X("value"),TextNode:X(),ConcatStatement:X("parts"),SubExpression:X("path","params","hash"),PathExpression:X(),StringLiteral:X(),BooleanLiteral:X(),NumberLiteral:X(),NullLiteral:X(),UndefinedLiteral:X(),Hash:X("pairs"),HashPair:X("value")},Ei=function(){function t(t,e,r,s){let n=Error.call(this,t)
this.key=s,this.message=t,this.node=e,this.parent=r,this.stack=n.stack}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}()
function Ai(t,e,r){return new Ei("Cannot remove a node unless it is part of an array",t,e,r)}function Ni(t,e){return new Ei("Replacing and removing in key handlers is not yet supported.",t,null,e)}function Ti(t){return"function"==typeof t?t:t.enter}function Ci(t){return"function"==typeof t?void 0:t.exit}function xi(t,e){let r,s,n,i=function(t,e){if(("Template"===e||"Block"===e)&&t.Program)return t.Program
let r=t[e]
return void 0!==r?r:t.All}(t,e.type)
if(void 0!==i&&(r=Ti(i),s=Ci(i)),void 0!==r&&(n=r(e)),null!=n){if(JSON.stringify(e)!==JSON.stringify(n))return Array.isArray(n)?(_i(t,n),n):xi(t,n)||n
n=void 0}if(void 0===n){let r=Si[e.type]
for(let s=0;s<r.length;s++){Di(t,i,e,r[s])}void 0!==s&&(n=s(e))}return n}function Li(t,e,r){t[e]=r}function Di(t,e,r,s){let n,i,a=function(t,e){return t[e]}(r,s)
if(a){if(void 0!==e){let t=function(t,e){let r="function"!=typeof t?t.keys:void 0
if(void 0===r)return
let s=r[e]
return void 0!==s?s:r.All}(e,s)
void 0!==t&&(n=Ti(t),i=Ci(t))}if(void 0!==n&&void 0!==n(r,s))throw Ni(r,s)
if(Array.isArray(a))_i(t,a)
else{let e=xi(t,a)
void 0!==e&&function(t,e,r,s){if(null===s)throw Ai(r,t,e)
if(Array.isArray(s)){if(1!==s.length)throw 0===s.length?Ai(r,t,e):function(t,e,r){return new Ei("Cannot replace a node with multiple nodes unless it is part of an array",t,e,r)}(r,t,e)
Li(t,e,s[0])}else Li(t,e,s)}(r,s,a,e)}if(void 0!==i&&void 0!==i(r,s))throw Ni(r,s)}}function _i(t,e){for(let r=0;r<e.length;r++){let s=xi(t,e[r])
void 0!==s&&(r+=Bi(e,r,s)-1)}}function Bi(t,e,r){return null===r?(t.splice(e,1),0):Array.isArray(r)?(t.splice(e,1,...r),r.length):(t.splice(e,1,r),1)}function Oi(t,e){xi(e,t)}const Ri=/[\xA0"&]/,Vi=new RegExp(Ri.source,"g"),qi=/[\xA0&<>]/,Ii=new RegExp(qi.source,"g")
function Pi(t){switch(t.charCodeAt(0)){case 160:return"&nbsp;"
case 34:return"&quot;"
case 38:return"&amp;"
default:return t}}function Mi(t){switch(t.charCodeAt(0)){case 160:return"&nbsp;"
case 38:return"&amp;"
case 60:return"&lt;"
case 62:return"&gt;"
default:return t}}function zi(t){return Ri.test(t)?t.replace(Vi,Pi):t}let Ui={Program(t,e,r){for(let s=0;s<e.body.length;s++)t.visit(e.body[s],r)},Template(t,e,r){for(let s=0;s<e.body.length;s++)t.visit(e.body[s],r)},Block(t,e,r){for(let s=0;s<e.body.length;s++)t.visit(e.body[s],r)},ElementNode(t,e,r){for(let s=0;s<e.children.length;s++)t.visit(e.children[s],r)},BlockStatement(t,e,r){t.visit(e.program,r),t.visit(e.inverse||null,r)}}
const ji=Object.create(null)
"area base br col command embed hr img input keygen link meta param source track wbr".split(" ").forEach(t=>{ji[t]=!0})
class Hi extends class extends class{constructor(t,e=new pi(li)){this.elementStack=[],this.currentAttribute=null,this.currentNode=null,this.source=t.split(/(?:\r\n?|\n)/g),this.tokenizer=new yi(this,e)}get currentAttr(){return this.currentAttribute}get currentTag(){return this.currentNode}get currentStartTag(){return this.currentNode}get currentEndTag(){return this.currentNode}get currentComment(){return this.currentNode}get currentData(){return this.currentNode}acceptTemplate(t){return this[t.type](t)}acceptNode(t){return this[t.type](t)}currentElement(){return this.elementStack[this.elementStack.length-1]}sourceForNode(t,e){let r,s,n,i=t.loc.start.line-1,a=i-1,o=t.loc.start.column,l=[]
for(e?(s=e.loc.end.line-1,n=e.loc.end.column):(s=t.loc.end.line-1,n=t.loc.end.column);a<s;)a++,r=this.source[a],a===i?i===s?l.push(r.slice(o,n)):l.push(r.slice(o)):a===s?l.push(r.slice(0,n)):l.push(r)
return l.join("\n")}}{constructor(){super(...arguments),this.cursorCount=0}cursor(){return`%cursor:${this.cursorCount++}%`}get isTopLevel(){return 0===this.elementStack.length}Program(t){let e,r=[]
this.cursorCount=0,e=this.isTopLevel?ei.template(r,t.blockParams,t.loc):ei.blockItself(r,t.blockParams,t.chained,t.loc)
let s,n=t.body.length
if(this.elementStack.push(e),0===n)return this.elementStack.pop()
for(s=0;s<n;s++)this.acceptNode(t.body[s])
let i=this.elementStack.pop()
if(i!==e){let t=i
throw new si("Unclosed element `"+t.tag+"` (on line "+t.loc.start.line+").",t.loc)}return e}BlockStatement(t){if("comment"===this.tokenizer.state)return void this.appendToCommentData(this.sourceForNode(t))
if("comment"!==this.tokenizer.state&&"data"!==this.tokenizer.state&&"beforeData"!==this.tokenizer.state)throw new si("A block may only be used inside an HTML element or another block.",t.loc)
let{path:e,params:r,hash:s}=vi(this,t),n=this.Program(t.program),i=t.inverse?this.Program(t.inverse):null
"in-element"===e.original&&(s=function(t,e,r){let s=!1
e.pairs.forEach(t=>{if("guid"===t.key)throw new si("Cannot pass `guid` from user space",r)
"insertBefore"===t.key&&(s=!0)})
let n=ei.literal("StringLiteral",t),i=ei.pair("guid",n)
if(e.pairs.unshift(i),!s){let t=ei.literal("UndefinedLiteral",void 0),r=ei.pair("insertBefore",t)
e.pairs.push(r)}return e}(this.cursor(),s,t.loc))
let a=ei.block(e,r,s,n,i,t.loc,t.openStrip,t.inverseStrip,t.closeStrip)
ai(this.currentElement(),a)}MustacheStatement(t){let e,{tokenizer:r}=this
if("comment"===r.state)return void this.appendToCommentData(this.sourceForNode(t))
let{escaped:s,loc:n,strip:i}=t
if(oi(t.path))e={type:"MustacheStatement",path:this.acceptNode(t.path),params:[],hash:ei.hash(),escaped:s,loc:n,strip:i}
else{let{path:r,params:a,hash:o}=vi(this,t)
e=ei.mustache(r,a,o,!s,n,i)}switch(r.state){case"tagOpen":case"tagName":throw new si(`Cannot use mustaches in an elements tagname: \`${this.sourceForNode(t,t.path)}\` at L${n.start.line}:C${n.start.column}`,e.loc)
case"beforeAttributeName":ki(this.currentStartTag,e)
break
case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),ki(this.currentStartTag,e),r.transitionTo("beforeAttributeName")
break
case"afterAttributeValueQuoted":ki(this.currentStartTag,e),r.transitionTo("beforeAttributeName")
break
case"beforeAttributeValue":this.beginAttributeValue(!1),wi(this.currentAttribute,e),r.transitionTo("attributeValueUnquoted")
break
case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":wi(this.currentAttribute,e)
break
default:ai(this.currentElement(),e)}return e}ContentStatement(t){(function(t,e){let r=e.loc.start.line,s=e.loc.start.column,n=function(t,e){if(""===e)return{lines:t.split("\n").length-1,columns:0}
let r=t.split(e)[0].split(/\n/),s=r.length-1
return{lines:s,columns:r[s].length}}(e.original,e.value)
r+=n.lines,n.lines?s=n.columns:s+=n.columns
t.line=r,t.column=s})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:e}=this
if("comment"===e.state)return this.appendToCommentData(this.sourceForNode(t)),null
let{value:r,loc:s}=t,n=ei.mustacheComment(r,s)
switch(e.state){case"beforeAttributeName":this.currentStartTag.comments.push(n)
break
case"beforeData":case"data":ai(this.currentElement(),n)
break
default:throw new si(`Using a Handlebars comment when in the \`${e.state}\` state is not supported: "${n.value}" on line ${s.start.line}:${s.start.column}`,t.loc)}return n}PartialStatement(t){let{loc:e}=t
throw new si(`Handlebars partials are not supported: "${this.sourceForNode(t,t.name)}" at L${e.start.line}:C${e.start.column}`,t.loc)}PartialBlockStatement(t){let{loc:e}=t
throw new si(`Handlebars partial blocks are not supported: "${this.sourceForNode(t,t.name)}" at L${e.start.line}:C${e.start.column}`,t.loc)}Decorator(t){let{loc:e}=t
throw new si(`Handlebars decorators are not supported: "${this.sourceForNode(t,t.path)}" at L${e.start.line}:C${e.start.column}`,t.loc)}DecoratorBlock(t){let{loc:e}=t
throw new si(`Handlebars decorator blocks are not supported: "${this.sourceForNode(t,t.path)}" at L${e.start.line}:C${e.start.column}`,t.loc)}SubExpression(t){let{path:e,params:r,hash:s}=vi(this,t)
return ei.sexpr(e,r,s,t.loc)}PathExpression(t){let e,{original:r,loc:s}=t
if(-1!==r.indexOf("/")){if("./"===r.slice(0,2))throw new si(`Using "./" is not supported in Glimmer and unnecessary: "${t.original}" on line ${s.start.line}.`,t.loc)
if("../"===r.slice(0,3))throw new si(`Changing context using "../" is not supported in Glimmer: "${t.original}" on line ${s.start.line}.`,t.loc)
if(-1!==r.indexOf("."))throw new si(`Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths: "${t.original}" on line ${s.start.line}.`,t.loc)
e=[t.parts.join("/")]}else{if("."===r){let e=`L${s.start.line}:C${s.start.column}`
throw new si(`'.' is not a supported path in Glimmer; check for a path with a trailing '.' at ${e}.`,t.loc)}e=t.parts}let n=!1
return r.match(/^this(\..+)?$/)&&(n=!0),{type:"PathExpression",original:t.original,this:n,parts:e,data:t.data,loc:t.loc}}Hash(t){let e=[]
for(let r=0;r<t.pairs.length;r++){let s=t.pairs[r]
e.push(ei.pair(s.key,this.acceptNode(s.value),s.loc))}return ei.hash(e,t.loc)}StringLiteral(t){return ei.literal("StringLiteral",t.value,t.loc)}BooleanLiteral(t){return ei.literal("BooleanLiteral",t.value,t.loc)}NumberLiteral(t){return ei.literal("NumberLiteral",t.value,t.loc)}UndefinedLiteral(t){return ei.literal("UndefinedLiteral",void 0,t.loc)}NullLiteral(t){return ei.literal("NullLiteral",null,t.loc)}}{constructor(){super(...arguments),this.tagOpenLine=0,this.tagOpenColumn=0}reset(){this.currentNode=null}beginComment(){this.currentNode=ei.comment(""),this.currentNode.loc={source:null,start:ei.pos(this.tagOpenLine,this.tagOpenColumn),end:null}}appendToCommentData(t){this.currentComment.value+=t}finishComment(){this.currentComment.loc.end=ei.pos(this.tokenizer.line,this.tokenizer.column),ai(this.currentElement(),this.currentComment)}beginData(){this.currentNode=ei.text(),this.currentNode.loc={source:null,start:ei.pos(this.tokenizer.line,this.tokenizer.column),end:null}}appendToData(t){this.currentData.chars+=t}finishData(){this.currentData.loc.end=ei.pos(this.tokenizer.line,this.tokenizer.column),ai(this.currentElement(),this.currentData)}tagOpen(){this.tagOpenLine=this.tokenizer.line,this.tagOpenColumn=this.tokenizer.column}beginStartTag(){this.currentNode={type:"StartTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:Xn}}beginEndTag(){this.currentNode={type:"EndTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:Xn}}finishTag(){let{line:t,column:e}=this.tokenizer,r=this.currentTag
r.loc=ei.loc(this.tagOpenLine,this.tagOpenColumn,t,e),"StartTag"===r.type?(this.finishStartTag(),(ji[r.name]||r.selfClosing)&&this.finishEndTag(!0)):"EndTag"===r.type&&this.finishEndTag(!1)}finishStartTag(){let{name:t,attributes:e,modifiers:r,comments:s,selfClosing:n}=this.currentStartTag,i=ei.loc(this.tagOpenLine,this.tagOpenColumn),a=ei.element({name:t,selfClosing:n},{attrs:e,modifiers:r,comments:s,loc:i})
this.elementStack.push(a)}finishEndTag(t){let e=this.currentTag,r=this.elementStack.pop(),s=this.currentElement();(function(t,e,r){let s
ji[t.name]&&!r?s="Invalid end tag "+Fi(t)+" (void elements cannot have end tags).":void 0===e.tag?s="Closing tag "+Fi(t)+" without an open tag.":e.tag!==t.name&&(s="Closing tag "+Fi(t)+" did not match last open tag `"+e.tag+"` (on line "+e.loc.start.line+").")
if(s)throw new si(s,e.loc)})(e,r,t),r.loc.end.line=this.tokenizer.line,r.loc.end.column=this.tokenizer.column,ii(r),ai(s,r)}markTagAsSelfClosing(){this.currentTag.selfClosing=!0}appendToTagName(t){this.currentTag.name+=t}beginAttribute(){let t=this.currentTag
if("EndTag"===t.type)throw new si(`Invalid end tag: closing tag must not have attributes, in \`${t.name}\` (on line ${this.tokenizer.line}).`,t.loc)
this.currentAttribute={name:"",parts:[],isQuoted:!1,isDynamic:!1,start:ei.pos(this.tokenizer.line,this.tokenizer.column),valueStartLine:0,valueStartColumn:0}}appendToAttributeName(t){this.currentAttr.name+=t}beginAttributeValue(t){this.currentAttr.isQuoted=t,this.currentAttr.valueStartLine=this.tokenizer.line,this.currentAttr.valueStartColumn=this.tokenizer.column}appendToAttributeValue(t){let e=this.currentAttr.parts,r=e[e.length-1]
if(r&&"TextNode"===r.type)r.chars+=t,r.loc.end.line=this.tokenizer.line,r.loc.end.column=this.tokenizer.column
else{let s=ei.loc(this.tokenizer.line,this.tokenizer.column,this.tokenizer.line,this.tokenizer.column)
"\n"===t&&(s.start.line-=1,s.start.column=r?r.loc.end.column:this.currentAttr.valueStartColumn)
let n=ei.text(t,s)
e.push(n)}}finishAttributeValue(){let{name:t,parts:e,isQuoted:r,isDynamic:s,valueStartLine:n,valueStartColumn:i}=this.currentAttr,a=function(t,e,r,s){if(r){if(e)return function(t){for(let e=0;e<t.length;e++){let r=t[e]
if("MustacheStatement"!==r.type&&"TextNode"!==r.type)throw new si("Unsupported node in quoted attribute value: "+r.type,r.loc)}return ei.concat(t)}(t)
if(1===t.length||2===t.length&&"TextNode"===t[1].type&&"/"===t[1].chars)return t[0]
throw new si(`An unquoted attribute value must be a string or a mustache, preceeded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>' (on line ${s})`,ei.loc(s,0))}return t.length>0?t[0]:ei.text("")}(e,r,s,this.tokenizer.line)
a.loc=ei.loc(n,i,this.tokenizer.line,this.tokenizer.column)
let o=ei.loc(this.currentAttr.start.line,this.currentAttr.start.column,this.tokenizer.line,this.tokenizer.column),l=ei.attr(t,a,o)
this.currentStartTag.attributes.push(l)}reportSyntaxError(t){throw new si(`Syntax error at line ${this.tokenizer.line} col ${this.tokenizer.column}: ${t}`,ei.loc(this.tokenizer.line,this.tokenizer.column))}}function Fi(t){return"`"+t.name+"` (on line "+t.loc.end.line+")"}const $i={parse:Gi,builders:ei,print:function t(e,r={entityEncoding:"transformed"}){if(!e)return""
if(r.override){let t=r.override(e,r)
if(void 0!==t)return t}function s(e){return e.map(e=>t(e,r))}function n(e){let n
switch(e.type){case"MustacheStatement":case"SubExpression":case"ElementModifierStatement":case"BlockStatement":n=t(e.path,r)
break
case"PartialStatement":n=t(e.name,r)
break
default:return function(){throw new Error("unreachable")}()}return i([n,s(e.params).join(" "),t(e.hash,r)]," ")}function i(t,e){return function(t){const e=[]
return t.forEach(t=>{null!=t&&""!==t&&e.push(t)}),e}(t).join(e||"")}function a(t){const e=t.program.blockParams
return e.length?` as |${e.join(" ")}|`:null}const o=[]
switch(e.type){case"Program":case"Block":case"Template":{const t=e.chained&&e.body[0]
t&&(t.chained=!0)
const r=s(e.body).join("")
o.push(r)}break
case"ElementNode":o.push("<",e.tag),e.attributes.length&&o.push(" ",s(e.attributes).join(" ")),e.modifiers.length&&o.push(" ",s(e.modifiers).join(" ")),e.comments.length&&o.push(" ",s(e.comments).join(" ")),e.blockParams.length&&o.push(" ","as"," ",`|${e.blockParams.join(" ")}|`),ji[e.tag]?(e.selfClosing&&o.push(" /"),o.push(">")):e.selfClosing?o.push(" />"):(o.push(">"),o.push.apply(o,s(e.children)),o.push("</",e.tag,">"))
break
case"AttrNode":"TextNode"===e.value.type?""!==e.value.chars?(o.push(e.name,"="),o.push('"',"raw"===r.entityEncoding?e.value.chars:zi(e.value.chars),'"')):o.push(e.name):(o.push(e.name,"="),o.push(t(e.value,r)))
break
case"ConcatStatement":o.push('"'),e.parts.forEach(e=>{"TextNode"===e.type?o.push("raw"===r.entityEncoding?e.chars:zi(e.chars)):o.push(t(e,r))}),o.push('"')
break
case"TextNode":o.push("raw"===r.entityEncoding?e.chars:(u=e.chars,qi.test(u)?u.replace(Ii,Mi):u))
break
case"MustacheStatement":o.push(i([e.escaped?"{{":"{{{",e.strip.open?"~":null,n(e),e.strip.close?"~":null,e.escaped?"}}":"}}}"]))
break
case"MustacheCommentStatement":o.push(i(["{{!--",e.value,"--}}"]))
break
case"ElementModifierStatement":o.push(i(["{{",n(e),"}}"]))
break
case"PathExpression":o.push(e.original)
break
case"SubExpression":o.push("(",n(e),")")
break
case"BooleanLiteral":o.push(e.value?"true":"false")
break
case"BlockStatement":{const s=[]
e.chained?s.push(i(["{{",e.inverseStrip.open?"~":null,"else ",n(e),e.inverseStrip.close?"~":null,"}}"])):s.push(i(["{{",(l=e).openStrip.open?"~":null,"#",n(l),a(l),l.openStrip.close?"~":null,"}}"])),s.push(t(e.program,r)),e.inverse&&(e.inverse.chained||s.push(i(["{{",e.inverseStrip.open?"~":null,"else",e.inverseStrip.close?"~":null,"}}"])),s.push(t(e.inverse,r))),e.chained||s.push(function(e){return i(["{{",e.closeStrip.open?"~":null,"/",t(e.path,r),e.closeStrip.close?"~":null,"}}"])}(e)),o.push(s.join(""))}break
case"PartialStatement":o.push(i(["{{>",n(e),"}}"]))
break
case"CommentStatement":o.push(i(["\x3c!--",e.value,"--\x3e"]))
break
case"StringLiteral":o.push(`"${e.value}"`)
break
case"NumberLiteral":o.push(String(e.value))
break
case"UndefinedLiteral":o.push("undefined")
break
case"NullLiteral":o.push("null")
break
case"Hash":o.push(e.pairs.map(e=>t(e,r)).join(" "))
break
case"HashPair":o.push(`${e.key}=${t(e.value,r)}`)}var l,u
return o.join("")},traverse:Oi,Walker:class{constructor(t){this.order=t,this.stack=[]}visit(t,e){t&&(this.stack.push(t),"post"===this.order?(this.children(t,e),e(t,this)):(e(t,this),this.children(t,e)),this.stack.pop())}children(t,e){let r
r="Block"===t.type||"Template"===t.type&&Ui.Program?"Program":t.type
let s=Ui[r]
s&&s(this,t,e)}}}
function Gi(e,r={}){let s,n=r.mode||"precompile"
if("object"==typeof e)s=e
else{let i=r.parseOptions||{}
"codemod"===n&&(i.ignoreStandalone=!0),s=t.parse(e,i)}let i=void 0
"codemod"===n&&(i=new pi({}))
let a=new Hi(e,i).acceptTemplate(s)
if(r&&r.plugins&&r.plugins.ast)for(let t=0,o=r.plugins.ast.length;t<o;t++){Oi(a,(0,r.plugins.ast[t])(W({},r,{syntax:$i},{plugins:void 0})).visitor)}return a}class Ji{static top(){return new Yi}child(t){let e=t.map(t=>this.allocate(t))
return new Wi(this,t,e)}}class Yi extends Ji{constructor(){super(...arguments),this.symbols=[],this.size=1,this.named=L(),this.blocks=L()}has(t){return!1}get(t){throw K()}getLocalsMap(){return{}}getEvalInfo(){return[]}allocateNamed(t){let e=this.named[t]
return e||(e=this.named[t]=this.allocate(t)),e}allocateBlock(t){"inverse"===t&&(t="else")
let e=this.blocks[t]
return e||(e=this.blocks[t]=this.allocate("&"+t)),e}allocate(t){return this.symbols.push(t),this.size++}}class Wi extends Ji{constructor(t,e,r){super(),this.parent=t,this.symbols=e,this.slots=r}has(t){return-1!==this.symbols.indexOf(t)||this.parent.has(t)}get(t){let e=this.symbols.indexOf(t)
return-1===e?this.parent.get(t):this.slots[e]}getLocalsMap(){let t=this.parent.getLocalsMap()
return this.symbols.forEach(e=>t[e]=this.get(e)),t}getEvalInfo(){let t=this.getLocalsMap()
return Object.keys(t).map(e=>t[e])}allocateNamed(t){return this.parent.allocateNamed(t)}allocateBlock(t){return this.parent.allocateBlock(t)}allocate(t){return this.parent.allocate(t)}}class Qi{constructor(){this.parentNode=null,this.children=null,this.childIndex=null,this.childCount=null,this.childTemplateCount=0,this.mustacheCount=0,this.actions=[],this.blankChildTextNodes=null,this.symbols=null}}class Ki{constructor(){this.frameStack=[],this.actions=[],this.programDepth=-1}visit(t){this[t.type](t)}Block(t){return this.anyBlock(t)}Template(t){return this.anyBlock(t)}anyBlock(t){this.programDepth++
let e,r,s=this.getCurrentFrame(),n=this.pushFrame()
t.symbols=s?s.symbols.child(t.blockParams):Ji.top(),0===this.programDepth?(e="startProgram",r="endProgram"):(e="startBlock",r="endBlock"),n.parentNode=t,n.children=t.body,n.childCount=t.body.length,n.blankChildTextNodes=[],n.actions.push([r,[t,this.programDepth]]),n.symbols=t.symbols
for(let i=t.body.length-1;i>=0;i--)n.childIndex=i,this.visit(t.body[i])
n.actions.push([e,[t,n.childTemplateCount,n.blankChildTextNodes.reverse()]]),this.popFrame(),this.programDepth--,s&&s.childTemplateCount++,this.actions.push(...n.actions.reverse())}ElementNode(t){let e=this.currentFrame,r=this.pushFrame()
r.parentNode=t,r.children=t.children,r.childCount=t.children.length,r.mustacheCount+=t.modifiers.length,r.blankChildTextNodes=[],r.symbols=t.symbols=e.symbols.child(t.blockParams)
let s=[t,e.childIndex,e.childCount]
r.actions.push(["closeElement",s])
for(let i=t.attributes.length-1;i>=0;i--)this.visit(t.attributes[i])
for(let i=t.children.length-1;i>=0;i--)r.childIndex=i,this.visit(t.children[i])
let n=["openElement",[...s,r.mustacheCount,r.blankChildTextNodes.reverse()]]
r.actions.push(n),this.popFrame(),r.mustacheCount>0&&e.mustacheCount++,e.childTemplateCount+=r.childTemplateCount,e.actions.push(...r.actions)}AttrNode(t){"TextNode"!==t.value.type&&this.currentFrame.mustacheCount++}TextNode(t){let e=this.currentFrame
""===t.chars&&e.blankChildTextNodes.push(function(t,e){let r=-1
for(let s=0;s<t.length;s++){let n=t[s]
if(("TextNode"===n.type||"ElementNode"===n.type)&&(r++,n===e))return r}return-1}(e.children,t)),e.actions.push(["text",[t,e.childIndex,e.childCount]])}BlockStatement(t){let e=this.currentFrame
e.mustacheCount++,e.actions.push(["block",[t,e.childIndex,e.childCount]]),t.inverse&&this.visit(t.inverse),t.program&&this.visit(t.program)}PartialStatement(t){let e=this.currentFrame
e.mustacheCount++,e.actions.push(["mustache",[t,e.childIndex,e.childCount]])}CommentStatement(t){let e=this.currentFrame
e.actions.push(["comment",[t,e.childIndex,e.childCount]])}MustacheCommentStatement(){}MustacheStatement(t){let e=this.currentFrame
e.mustacheCount++,e.actions.push(["mustache",[t,e.childIndex,e.childCount]])}get currentFrame(){return this.getCurrentFrame()}getCurrentFrame(){return this.frameStack[this.frameStack.length-1]}pushFrame(){let t=new Qi
return this.frameStack.push(t),t}popFrame(){return this.frameStack.pop()}}const Zi=(Xi=9,function(t){return Array.isArray(t)&&t[0]===Xi})
var Xi
class ta{constructor(){this.statements=[]}push(t){this.statements.push(t)}}class ea extends ta{constructor(t){super(),this.table=t}toJSON(){return{statements:this.statements,parameters:this.table.slots}}}class ra extends ea{constructor(t,e){super(e),this.name=t}}class sa extends ta{constructor(t){super(),this.symbolTable=t,this.type="template",this.yields=new D,this.named=new D,this.blocks=[],this.hasEval=!1}push(t){this.statements.push(t)}toJSON(){return{symbols:this.symbolTable.symbols,statements:this.statements,hasEval:this.hasEval}}}class na extends ta{constructor(t,e,r){super(),this.tag=t,this.table=e,this.selfClosing=r,this.attributes=[],this.arguments=[],this.inParams=!0,this.positionals=[],this.blocks=[]}push(t){if(this.inParams)if(Zi(t))this.inParams=!1
else if(18===(e=t)[0]||17===e[0])this.arguments.push(t)
else{if(!function(t){return 11===t[0]||12===t[0]||19===t[0]||13===t[0]||20===t[0]||14===t[0]||3===t[0]}(t))throw new Error("Compile Error: only parameters allowed before flush-element")
this.attributes.push(t)}else this.statements.push(t)
var e}pushBlock(t,e){this.blocks.push([t,e])}toJSON(){let t,e=this.arguments,r=e.map(t=>t[1]),s=e.map(t=>t[2])
if(this.selfClosing)t=null
else if(this.blocks.length>0){let e=[],r=[]
for(let t=0;t<this.blocks.length;t++){let[s,n]=this.blocks[t]
e.push(s.slice(1)),r.push(n)}t=[e,r]}else t=[["default"],[{statements:this.statements,parameters:this.table.slots}]]
return[this.tag,this.attributes,[r,s],t]}}class ia{constructor(t){this.block=new sa(t)}toJSON(){return this.block.toJSON()}}class aa{constructor(t,e,r){this.blocks=new _,this.values=[],this.opcodes=t,this.template=new ia(e),this.options=r}static process(t,e,r){return new aa(t,e,r).process()}get currentBlock(){return this.blocks.current}get currentComponent(){let t=this.currentBlock
if(t instanceof na)return t
throw new Error("Expected ComponentBlock on stack, found "+t.constructor.name)}process(){return this.opcodes.forEach(t=>{let e=t[0],r=t[1]
if(!this[e])throw new Error(`unimplemented ${e} on JavaScriptCompiler`)
this[e](r)}),this.template}startBlock(t){this.startInlineBlock(t.symbols)}endBlock(){let t=this.endInlineBlock()
this.template.block.blocks.push(t)}startProgram(){this.blocks.push(this.template.block)}endProgram(){}text(t){this.push([0,t])}append(t){this.push([1,this.popValue(),t])}comment(t){this.push([2,t])}modifier(t){let e=this.popValue(),r=this.popValue()
this.push([3,t,e,r])}block([t,e,r]){let s,n=this.popValue(),i=this.popValue(),a=this.template.block.blocks
s=null===e&&null===r?null:null===r?[["default"],[a[e]]]:[["default","else"],[a[e],a[r]]],this.push([4,t,n,i,s])}openComponent(t){let e=this.options&&this.options.customizeComponentName?this.options.customizeComponentName(t.tag):t.tag,r=new na(e,t.symbols,t.selfClosing)
this.blocks.push(r)}openNamedBlock(t){let e=new ra(t.tag,t.symbols)
this.blocks.push(e)}openElement([t,e]){let r=t.tag
if(t.blockParams.length>0)throw new Error(`Compile Error: <${t.tag}> is not a component and doesn't support block parameters`)
this.push([7,r,e])}flushElement(){this.push([9])}closeComponent(t){let[e,r,s,n]=this.endComponent()
this.push([5,e,r,s,n])}closeNamedBlock(t){let{blocks:e}=this,r=e.pop()
this.currentComponent.pushBlock(r.name,r.toJSON())}closeDynamicComponent(t){let[,e,r,s]=this.endComponent()
this.push([6,this.popValue(),e,r,s])}closeElement(t){this.push([10])}staticAttr([t,e]){let r=this.popValue()
this.push([11,t,r,e])}dynamicAttr([t,e]){let r=this.popValue()
this.push([12,t,r,e])}componentAttr([t,e]){let r=this.popValue()
this.push([13,t,r,e])}trustingAttr([t,e]){let r=this.popValue()
this.push([19,t,r,e])}trustingComponentAttr([t,e]){let r=this.popValue()
this.push([20,t,r,e])}staticArg(t){let e=this.popValue()
this.push([18,t,e])}dynamicArg(t){let e=this.popValue()
this.push([17,t,e])}yield(t){let e=this.popValue()
this.push([15,t,e])}attrSplat(t){this.popValue(),this.push([14,t])}debugger(t){this.push([21,t]),this.template.block.hasEval=!0}hasBlock(t){this.pushValue([26,t])}hasBlockParams(t){this.pushValue([27,t])}partial(t){let e=this.popValue()
this.push([16,e[0],t]),this.template.block.hasEval=!0}literal(t){void 0===t?this.pushValue([28]):this.pushValue(t)}unknown(t){this.pushValue([23,t])}get([t,e]){this.pushValue([24,t,e])}maybeLocal(t){this.pushValue([25,t])}concat(){this.pushValue([30,this.popValue()])}helper(t){let e=this.popValue(),r=this.popValue()
this.pushValue([29,t,e,r])}prepareArray(t){let e=[]
for(let r=0;r<t;r++)e.push(this.popValue())
this.pushValue(e)}prepareObject(t){let e=new Array(t),r=new Array(t)
for(let s=0;s<t;s++)e[s]=this.popValue(),r[s]=this.popValue()
this.pushValue([e,r])}endComponent(){return this.blocks.pop().toJSON()}startInlineBlock(t){let e=new ea(t)
this.blocks.push(e)}endInlineBlock(){let{blocks:t}=this
return t.pop().toJSON()}push(t){this.currentBlock.push(t)}pushValue(t){this.values.push(t)}popValue(){return this.values.pop()}}const oa="http://www.w3.org/1999/xlink",la="http://www.w3.org/XML/1998/namespace",ua="http://www.w3.org/2000/xmlns/",ha={"xlink:actuate":oa,"xlink:arcrole":oa,"xlink:href":oa,"xlink:role":oa,"xlink:show":oa,"xlink:title":oa,"xlink:type":oa,"xml:base":la,"xml:lang":la,"xml:space":la,xmlns:ua,"xmlns:xlink":ua}
class ca{constructor(t){this.ops=t,this.symbolStack=new _}process(){let t=[],{ops:e}=this
for(let r=0;r<e.length;r++){let s=e[r],n=this.dispatch(s)
void 0===n?t.push(s):t.push(n)}return t}dispatch(t){let e=t[0],r=t[1]
return this[e](r)}get symbols(){return this.symbolStack.current}startProgram(t){this.symbolStack.push(t.symbols)}endProgram(t){this.symbolStack.pop()}startBlock(t){this.symbolStack.push(t.symbols)}endBlock(t){this.symbolStack.pop()}openNamedBlock(t){this.symbolStack.push(t.symbols)}closeNamedBlock(t){this.symbolStack.pop()}flushElement(t){this.symbolStack.push(t.symbols)}closeElement(t){this.symbolStack.pop()}closeComponent(t){this.symbolStack.pop()}closeDynamicComponent(t){this.symbolStack.pop()}attrSplat(t){return["attrSplat",this.symbols.allocateBlock("attrs")]}get(t){let[e,r]=t
if(0===e)return["get",[0,r]]
if(pa(e,this.symbols)){return["get",[this.symbols.get(e),r]]}if("@"===e[0]){return["get",[this.symbols.allocateNamed(e),r]]}return["maybeLocal",[e,...r]]}maybeGet(t){let[e,r]=t
if(0===e)return["get",[0,r]]
if(pa(e,this.symbols)){return["get",[this.symbols.get(e),r]]}if("@"===e[0]){return["get",[this.symbols.allocateNamed(e),r]]}return 0===r.length?["unknown",e]:["maybeLocal",[e,...r]]}yield(t){if(0===t)throw new Error("Cannot yield to this")
return["yield",this.symbols.allocateBlock(t)]}debugger(t){return["debugger",this.symbols.getEvalInfo()]}hasBlock(t){if(0===t)throw new Error("Cannot hasBlock this")
return["hasBlock",this.symbols.allocateBlock(t)]}hasBlockParams(t){if(0===t)throw new Error("Cannot hasBlockParams this")
return["hasBlockParams",this.symbols.allocateBlock(t)]}partial(t){return["partial",this.symbols.getEvalInfo()]}text(t){}comment(t){}openComponent(t){}openElement(t){}staticArg(t){}dynamicArg(t){}staticAttr(t){}trustingAttr(t){}dynamicAttr(t){}componentAttr(t){}trustingComponentAttr(t){}modifier(t){}append(t){}block(t){}literal(t){}helper(t){}unknown(t){}maybeLocal(t){}prepareArray(t){}prepareObject(t){}concat(t){}}function pa(t,e){return e&&e.has(t)}class da{constructor(){this.templateId=0,this.templateIds=[],this.opcodes=[],this.includeMeta=!1}static compile(t,e){let r=new Ki
r.visit(t)
let s=(new da).process(r.actions),n=new ca(s).process()
return aa.process(n,t.symbols,e)}process(t){return t.forEach(([t,...e])=>{if(!this[t])throw new Error(`Unimplemented ${t} on TemplateCompiler`)
this[t](...e)}),this.opcodes}startProgram([t]){this.opcode(["startProgram",t],t)}endProgram(){this.opcode(["endProgram",null],null)}startBlock([t]){this.templateId++,this.opcode(["startBlock",t],t)}endBlock(){this.templateIds.push(this.templateId-1),this.opcode(["endBlock",null],null)}text([t]){this.opcode(["text",t.chars],t)}comment([t]){this.opcode(["comment",t.value],t)}openElement([t]){let e=t.attributes,r=!0
for(let n=0;n<e.length;n++){if("...attributes"===e[n].name){r=!1
break}}t.modifiers.length>0&&(r=!1)
let s=!1
if(ba(t)){let e,r;[e,...r]=t.tag.split("."),"this"===e&&(e=0),this.opcode(["get",[e,r]]),this.opcode(["openComponent",t],t),s=!0}else va(t)?this.opcode(["openNamedBlock",t],t):ya(t)?(this.opcode(["openComponent",t],t),s=!0):this.opcode(["openElement",[t,r]],t)
if(!va(t)){let e=null,n=t.attributes
for(let t=0;t<n.length;t++)"type"!==n[t].name?this.attribute([n[t]],!r||s):e=n[t]
e&&this.attribute([e],!r||s)
for(let r=0;r<t.modifiers.length;r++)this.modifier([t.modifiers[r]])
this.opcode(["flushElement",t],null)}}closeElement([t]){va(t)?this.opcode(["closeNamedBlock",t]):ba(t)?this.opcode(["closeDynamicComponent",t],t):ya(t)?this.opcode(["closeComponent",t],t):this.opcode(["closeElement",t],t)}attribute([t],e){let{name:r,value:s}=t,n=ha[r]||null
let i=this.prepareAttributeValue(s)
if("@"===r.charAt(0))i?this.opcode(["staticArg",r],t):(t.value.type,this.opcode(["dynamicArg",r],t))
else{let a=function(t){return void 0!==t.escaped&&!t.escaped}(s)
i&&"...attributes"===r?this.opcode(["attrSplat",null],t):i&&!e?this.opcode(["staticAttr",[r,n]],t):a?this.opcode([e?"trustingComponentAttr":"trustingAttr",[r,n]],t):(t.value.type,this.opcode([e?"componentAttr":"dynamicAttr",[r,n]],t))}}modifier([t]){ka(t.path,t.loc,"modifier")
let{path:{parts:e}}=t
this.prepareHelper(t),this.opcode(["modifier",e[0]],t)}mustache([t]){let{path:e}=t
if(oi(e))this.mustacheExpression(t),this.opcode(["append",!t.escaped],t)
else if(function(t){return"yield"===t.original}(e)){let e=function(t){let{pairs:e}=t.hash
if(1===e.length&&"to"!==e[0].key||e.length>1)throw new si("yield only takes a single named argument: 'to'",t.loc)
if(1===e.length&&"StringLiteral"!==e[0].value.type)throw new si("you can only yield to a literal value",t.loc)
return 0===e.length?"default":e[0].value.value}(t)
this.yield(e,t)}else if(function(t){return"partial"===t.original}(e)){let e=function(t){let{params:e,hash:r,escaped:s,loc:n}=t
if(e&&1!==e.length)throw new si(`Partial found with no arguments. You must specify a template name. (on line ${n.start.line})`,t.loc)
if(r&&r.pairs.length>0)throw new si(`partial does not take any named arguments (on line ${n.start.line})`,t.loc)
if(!s)throw new si(`{{{partial ...}}} is not supported, please use {{partial ...}} instead (on line ${n.start.line})`,t.loc)
return e}(t)
this.partial(e,t)}else!function(t){return"debugger"===t.original}(e)?(this.mustacheExpression(t),this.opcode(["append",!t.escaped],t)):(function(t){let{params:e,hash:r}=t
if(r&&r.pairs.length>0)throw new si("debugger does not take any named arguments",t.loc)
if(0===e.length)return"default"
throw new si("debugger does not take any positional arguments",t.loc)}(t),this.debugger("debugger",t))}block([t]){this.prepareHelper(t)
let e=this.templateIds.pop(),r=null===t.inverse?null:this.templateIds.pop()
this.opcode(["block",[t.path.parts[0],e,r]],t)}arg([t]){let{parts:[e,...r]}=t
this.opcode(["get",["@"+e,r]],t)}mustacheExpression(t){let{path:e}=t
if(oi(e))this.opcode(["literal",e.value],t)
else if(ga(e))this.builtInHelper(t)
else if(function(t){return!!t.data}(e))this.arg([e])
else if((r=t).params&&r.params.length>0||r.hash&&r.hash.pairs.length>0)this.prepareHelper(t),this.opcode(["helper",e.parts[0]],t)
else if(e.this)this.opcode(["get",[0,e.parts]],t)
else{let[r,...s]=e.parts
this.opcode(["maybeGet",[r,s]],t)}var r}yield(t,e){this.prepareParams(e.params),this.opcode(["yield",t],e)}debugger(t,e){this.opcode(["debugger",null],e)}hasBlock(t,e){this.opcode(["hasBlock",t],e)}hasBlockParams(t,e){this.opcode(["hasBlockParams",t],e)}partial(t,e){this.prepareParams(e.params),this.opcode(["partial",null],e)}builtInHelper(t){let{path:e}=t
if(ma(e)){let e=wa(t.path.original,t)
this.hasBlock(e,t)}else if(fa(e)){let e=wa(t.path.original,t)
this.hasBlockParams(e,t)}}SubExpression(t){ga(t.path)?this.builtInHelper(t):(this.prepareHelper(t),this.opcode(["helper",t.path.parts[0]],t))}PathExpression(t){if(t.data)this.arg([t])
else{let[e,...r]=t.parts
t.this?this.opcode(["get",[0,t.parts]],t):this.opcode(["get",[e,r]],t)}}StringLiteral(t){this.opcode(["literal",t.value],t)}BooleanLiteral(t){this.opcode(["literal",t.value],t)}NumberLiteral(t){this.opcode(["literal",t.value],t)}NullLiteral(t){this.opcode(["literal",t.value],t)}UndefinedLiteral(t){this.opcode(["literal",t.value],t)}opcode(t,e=null){this.includeMeta&&e&&t.push(this.meta(e)),this.opcodes.push(t)}prepareHelper(t){ka(t.path,t.loc,"helper")
let{params:e,hash:r}=t
this.prepareHash(r),this.prepareParams(e)}prepareParams(t){if(t.length){for(let e=t.length-1;e>=0;e--){let r=t[e]
this[r.type](r)}this.opcode(["prepareArray",t.length],null)}else this.opcode(["literal",null],null)}prepareHash(t){let e=t.pairs
if(e.length){for(let t=e.length-1;t>=0;t--){let{key:r,value:s}=e[t]
this[s.type](s),this.opcode(["literal",r],null)}this.opcode(["prepareObject",e.length],null)}else this.opcode(["literal",null],null)}prepareAttributeValue(t){switch(t.type){case"TextNode":return this.opcode(["literal",t.chars],t),!0
case"MustacheStatement":return this.attributeMustache([t]),!1
case"ConcatStatement":return this.prepareConcatParts(t.parts),this.opcode(["concat",null],t),!1}}prepareConcatParts(t){for(let e=t.length-1;e>=0;e--){let r=t[e]
"MustacheStatement"===r.type?this.attributeMustache([r]):"TextNode"===r.type&&this.opcode(["literal",r.chars],null)}this.opcode(["prepareArray",t.length],null)}attributeMustache([t]){this.mustacheExpression(t)}meta(t){let e=t.loc
if(!e)return[]
let{source:r,start:s,end:n}=e
return["loc",[r||null,[s.line,s.column],[n.line,n.column]]]}}function ma(t){return"has-block"===t.original}function fa(t){return"has-block-params"===t.original}function ga(t){return ma(t)||fa(t)}function ba(t){let e=t.tag.charAt(0),[r]=t.tag.split("."),s="@"===e,n=t.symbols.has(r),i=0===t.tag.indexOf("this.")
return n||s||i}function ya(t){let e=t.tag.charAt(0),r=t.tag.indexOf(".")>-1
return e===e.toUpperCase()&&e!==e.toLowerCase()&&!r||ba(t)}function va(t){return":"===t.tag.charAt(0)}function ka(t,e,r){if(!function({parts:t}){return 1===t.length}(t))throw new si(`\`${t.original}\` is not a valid name for a ${r} on line ${e.start.line}.`,t.loc)}function wa(t,e){let{params:r,hash:s,loc:n}=e
if(s&&s.pairs.length>0)throw new si(t+" does not take any named arguments",e.loc)
if(0===r.length)return"default"
if(1===r.length){let t=r[0]
if("StringLiteral"===t.type)return t.value
throw new si(`you can only yield to a literal value (on line ${n.start.line})`,e.loc)}throw new si(`${t} only takes a single positional argument (on line ${n.start.line})`,e.loc)}const Sa=(()=>{if("function"==typeof require)try{const t=require("crypto")
let e=e=>{let r=t.createHash("sha1")
return r.update(e,"utf8"),r.digest("base64").substring(0,8)}
return e("test"),e}catch(t){}return function(){return null}})(),Ea={id:Sa,meta:{}}
class Aa{constructor(t){this.layout=t,this.compiled=null
let{block:e}=t,r=e.symbols.slice(),s=r.indexOf("&attrs")
this.attrsBlockNumber=-1===s?r.push("&attrs"):s+1,this.symbolTable={hasEval:e.hasEval,symbols:r}}compile(t){if(null!==this.compiled)return this.compiled
let e=_n(this.layout),r=Mn(t,e)
var s,n
Ln(r,(s=this.layout,n=this.attrsBlockNumber,[nn("StartLabels"),ja(5,()=>[nn(92,4),nn(30),nn(32,3,0)]),nn(65,Zs("BODY")),nn(35,5),nn(90),nn(48),nn(101,4),pn(n,N),nn(53),nn("Label","BODY"),mn(Ua(s)),nn(35,5),nn(65,Zs("END")),nn(54),nn("Label","END"),nn(34,5),nn("StopLabels")]))
let i=this.compiled=r.encoder.commit(r.syntax.program.heap,e.size)
return hr(r.syntax.program),i}}let Na=0
function Ta({id:t,meta:e,block:r}){let s,n=t||"client-"+Na++
return{id:n,meta:e,create:t=>{let i=t?W({},t,e):e
return s||(s=JSON.parse(r)),new Ca({id:n,block:s,referrer:i})}}}class Ca{constructor(t){this.parsedLayout=t,this.layout=null,this.partial=null,this.wrappedLayout=null
let{block:e}=t
this.symbols=e.symbols,this.hasEval=e.hasEval,this.referrer=t.referrer,this.id=t.id||"client-"+Na++}asLayout(){return this.layout?this.layout:this.layout=_a(W({},this.parsedLayout,{asPartial:!1}))}asPartial(){return this.partial?this.partial:this.layout=_a(W({},this.parsedLayout,{asPartial:!0}))}asWrappedLayout(){return this.wrappedLayout?this.wrappedLayout:this.wrappedLayout=new Aa(W({},this.parsedLayout,{asPartial:!1}))}}const xa=-1
class La{constructor(t,e,r){this.statements=t,this.meta=e,this.symbolTable=r,this.compiled=null}compile(t){return function(t,e){if(null!==t.compiled)return t.compiled
t.compiled=xa
let{statements:r,meta:s}=t,n=t.compiled=function(t,e,r){let s=zn,n=Mn(r,e)
for(let i=0;i<t.length;i++)Ln(n,s.compile(t[i],n.meta))
return n.encoder.commit(r.program.heap,e.size)}(r,s,e)
return hr(e.program),n}(this,t)}}function Da(t,e){return Ta(JSON.parse(function(t,e=Ea){let r=Gi(t,e),{meta:s}=e,{block:n}=da.compile(r,e),i=e.id||Sa,a=JSON.stringify(n.toJSON()),o={id:i(JSON.stringify(s)+a),block:a,meta:s}
return JSON.stringify(o)}(t))).create(e)}function _a(t){let e=t.block
return new La(e.statements,_n(t),{symbols:e.symbols,hasEval:e.hasEval})}function Ba(t,e){let r=Array.isArray(t)?{statements:t,parameters:N}:t
return new La(r.statements,e,{parameters:r.parameters})}const Oa={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!1,attributeHook:!1,elementHook:!1,dynamicScope:!1,createCaller:!1,updateHook:!1,createInstance:!1,wrapped:!1}
class Ra{constructor(t){this.inner=t}lookupHelper(t,e){if(this.inner.lookupHelper){let r=this.inner.lookupHelper(t,e)
if(void 0===r)throw new Error(`Unexpected helper (${t} from ${JSON.stringify(e)}) (lookupHelper returned undefined)`)
return r}throw new Error("Can't compile global helper invocations without an implementation of lookupHelper")}lookupModifier(t,e){if(this.inner.lookupModifier){let r=this.inner.lookupModifier(t,e)
if(void 0===r)throw new Error(`Unexpected modifier (${t} from ${JSON.stringify(e)}) (lookupModifier returned undefined)`)
return r}throw new Error("Can't compile global modifier invocations without an implementation of lookupModifier")}lookupComponent(t,e){if(this.inner.lookupComponent){let r=this.inner.lookupComponent(t,e)
if(void 0===r)throw new Error(`Unexpected component (${t} from ${JSON.stringify(e)}) (lookupComponent returned undefined)`)
return r}throw new Error("Can't compile global component invocations without an implementation of lookupComponent")}lookupPartial(t,e){if(this.inner.lookupPartial){let r=this.inner.lookupPartial(t,e)
if(void 0===r)throw new Error(`Unexpected partial (${t} from ${JSON.stringify(e)}) (lookupPartial returned undefined)`)
return r}throw new Error("Can't compile global partial invocations without an implementation of lookupPartial")}compile(t){return Da(t,{})}resolve(t){if(this.inner.resolve)return this.inner.resolve(t)
throw new Error("Compile-time debugging requires an implementation of resolve")}}function Va(t,{resolver:e,meta:{referrer:r}}){let s=e.lookupComponent(t,r)
if(null===s)return s
let{handle:n,compilable:i,capabilities:a}=s
return{handle:n,compilable:i,capabilities:a||Oa}}function qa(t,e,r,s){let n=Va(e,t)
if(null!==n){let{compilable:t,handle:e,capabilities:i}=n
if(t){if(r)for(let t=0;t<r.length;t+=2)r[t][0]="@"+r[t][0]
let n=[nn(79,e)]
return n.push(Ia({capabilities:i,layout:t,attrs:null,params:null,hash:r,blocks:new tn({default:s})})),n}}return An}function Ia({capabilities:t,layout:e,attrs:r,params:s,hash:n,blocks:i}){let{symbolTable:a}=e
if(a.hasEval||t.prepareArgs)return Ma({capabilities:t,attrs:r,params:s,hash:n,atNames:!0,blocks:i,layout:e})
let o=[nn(35,4),nn(32,3,1),nn(34,4)],{symbols:l}=a
t.createArgs&&o.push(nn(0),nn("SimpleArgs",{params:null,hash:n,atNames:!0})),o.push(nn(99)),t.dynamicScope&&o.push(nn(58)),t.createInstance&&o.push(nn(88,0|i.has("default"),4)),t.createArgs&&o.push(nn(1)),o.push(nn(0),nn(89,4))
let u=[]
o.push(nn(91,4)),u.push({symbol:0,isBlock:!1})
for(let h=0;h<l.length;h++){let t=l[h]
switch(t.charAt(0)){case"&":let e
e="&attrs"===t?r:i.get(t.slice(1)),e?(o.push(dn(e)),u.push({symbol:h+1,isBlock:!0})):(o.push(dn(null)),u.push({symbol:h+1,isBlock:!0}))
break
case"@":if(!n)break
let[s,a]=n,l=t,c=s.indexOf(l);-1!==c&&(o.push(nn("Expr",a[c])),u.push({symbol:h+1,isBlock:!1}))}}o.push(nn(36,l.length+1,Object.keys(i).length>0?1:0))
for(let h=u.length-1;h>=0;h--){let{symbol:t,isBlock:e}=u[h]
e?o.push(nn("SetBlock",t)):o.push(nn(19,t))}return o.push(nn("InvokeStatic",e)),t.createInstance&&o.push(nn(102,4)),o.push(nn(1),nn(39)),t.dynamicScope&&o.push(nn(59)),o.push(nn(100),nn(34,4)),o}function Pa(t,{definition:e,attrs:r,params:s,hash:n,atNames:i,blocks:a}){return Rn({args:()=>({count:2,actions:[nn("Expr",e),nn(32,3,0)]}),body:()=>[nn(65,Zs("ELSE")),nn(82,Qs(t.referrer)),nn(80),Ma({capabilities:!0,attrs:r,params:s,hash:n,atNames:i,blocks:a}),nn("Label","ELSE")]})}function Ma({capabilities:t,attrs:e,params:r,hash:s,atNames:n,blocks:i,layout:a}){let o=!!i,l=!0===t||t.prepareArgs||!(!s||0===s[0].length),u=i.with("attrs",e)
return[nn(35,4),nn(32,3,1),nn(34,4),nn(0),nn("Args",{params:r,hash:s,blocks:u,atNames:n}),nn(86,4),za(u.has("default"),o,l,()=>{let t
return t=a?[gn(a.symbolTable),nn("PushCompilable",a),nn("JitCompileBlock")]:[nn("GetComponentLayout",4)],t.push(nn(97,4)),t}),nn(34,4)]}function za(t,e,r,s=null){let n=[nn(99),nn(58),nn(88,0|t,4)]
return s&&n.push(s()),n.push(nn(89,4),nn(91,4),nn(37,4),nn(19,0),nn(96,4),r?nn(17,4):En,e?nn(18,4):En,nn(33,1),nn(98,4),nn(102,4),nn(1),nn(39),nn(59),nn(100)),n}function Ua(t){return Ba(t.block.statements,_n(t))}function ja(t,e){return[nn(35,t),e(),nn(34,t)]}class Ha{constructor(t,e,r){this.main=t,this.trustingGuardedAppend=e,this.cautiousGuardedAppend=r}get"trusting-append"(){return this.trustingGuardedAppend}get"cautious-append"(){return this.cautiousGuardedAppend}getAppend(t){return t?this.trustingGuardedAppend:this.cautiousGuardedAppend}}function Fa(){return[nn(75,4),za(!1,!1,!0)]}function $a(t){return[nn(77),On(e=>{e(1,()=>t?[nn(67),nn(42)]:nn(46)),e(0,()=>[nn(81),nn(80),[nn(35,4),nn(32,3,1),nn(34,4),nn(0),nn(84),nn(86,4),za(!1,!1,!0,()=>[nn("GetComponentLayout",4),nn(97,4)]),nn(34,4)]]),e(3,()=>[nn(67),nn(43)]),e(4,()=>[nn(67),nn(44)]),e(5,()=>[nn(67),nn(45)])})]}const Ga={asPartial:!1,evalSymbols:null,referrer:{},size:0}
function Ja(t,e){let r=new an,s=new qn
return Cn({encoder:r,meta:Ga,syntax:{macros:s,program:t}},e()),r.commit(t.heap,0)}(function(){function t(t,e){let r=Error.call(this,t)
this.message=t,this.stack=r.stack,this.location=e}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t})()
var Ya=/[\t\n\f ]/,Wa=/[A-Za-z]/,Qa=/\r\n?/g
function Ka(t){return Ya.test(t)}function Za(t){return Wa.test(t)}function Xa(t,e){if(!t)throw new Error((e||"value")+" was null")
return t}var to=function(){function t(t,e){this.delegate=t,this.entityParser=e,this.state=null,this.input=null,this.index=-1,this.tagLine=-1,this.tagColumn=-1,this.line=-1,this.column=-1,this.states={beforeData:function(){"<"===this.peek()?(this.state="tagOpen",this.markTagStart(),this.consume()):(this.state="data",this.delegate.beginData())},data:function(){var t=this.peek()
"<"===t?(this.delegate.finishData(),this.state="tagOpen",this.markTagStart(),this.consume()):"&"===t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(t))},tagOpen:function(){var t=this.consume()
"!"===t?this.state="markupDeclaration":"/"===t?this.state="endTagOpen":Za(t)&&(this.state="tagName",this.delegate.beginStartTag(),this.delegate.appendToTagName(t.toLowerCase()))},markupDeclaration:function(){"-"===this.consume()&&"-"===this.input.charAt(this.index)&&(this.consume(),this.state="commentStart",this.delegate.beginComment())},commentStart:function(){var t=this.consume()
"-"===t?this.state="commentStartDash":">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(t),this.state="comment")},commentStartDash:function(){var t=this.consume()
"-"===t?this.state="commentEnd":">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var t=this.consume()
"-"===t?this.state="commentEndDash":this.delegate.appendToCommentData(t)},commentEndDash:function(){var t=this.consume()
"-"===t?this.state="commentEnd":(this.delegate.appendToCommentData("-"+t),this.state="comment")},commentEnd:function(){var t=this.consume()
">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+t),this.state="comment")},tagName:function(){var t=this.consume()
Ka(t)?this.state="beforeAttributeName":"/"===t?this.state="selfClosingStartTag":">"===t?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(t)},beforeAttributeName:function(){var t=this.peek()
Ka(t)?this.consume():"/"===t?(this.state="selfClosingStartTag",this.consume()):">"===t?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):"="===t?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.state="attributeName",this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(t)):(this.state="attributeName",this.delegate.beginAttribute())},attributeName:function(){var t=this.peek()
Ka(t)?(this.state="afterAttributeName",this.consume()):"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===t?(this.state="beforeAttributeValue",this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):'"'===t||"'"===t||"<"===t?(this.delegate.reportSyntaxError(t+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(t)):(this.consume(),this.delegate.appendToAttributeName(t))},afterAttributeName:function(){var t=this.peek()
Ka(t)?this.consume():"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===t?(this.consume(),this.state="beforeAttributeValue"):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(t))},beforeAttributeValue:function(){var t=this.peek()
Ka(t)?this.consume():'"'===t?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):"'"===t?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(t))},attributeValueDoubleQuoted:function(){var t=this.consume()
'"'===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(t)},attributeValueSingleQuoted:function(){var t=this.consume()
"'"===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(t)},attributeValueUnquoted:function(){var t=this.peek()
Ka(t)?(this.delegate.finishAttributeValue(),this.consume(),this.state="beforeAttributeName"):"&"===t?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&")):">"===t?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeValue(t))},afterAttributeValueQuoted:function(){var t=this.peek()
Ka(t)?(this.consume(),this.state="beforeAttributeName"):"/"===t?(this.consume(),this.state="selfClosingStartTag"):">"===t?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var t=this.consume()
Za(t)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(t.toLowerCase()))}},this.reset()}return t.prototype.reset=function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},t.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},t.prototype.tokenizePart=function(t){for(this.input+=function(t){return t.replace(Qa,"\n")}(t);this.index<this.input.length;)this.states[this.state].call(this)},t.prototype.tokenizeEOF=function(){this.flushData()},t.prototype.flushData=function(){"data"===this.state&&(this.delegate.finishData(),this.state="beforeData")},t.prototype.peek=function(){return this.input.charAt(this.index)},t.prototype.consume=function(){var t=this.peek()
return this.index++,"\n"===t?(this.line++,this.column=0):this.column++,t},t.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index)
if(-1!==t){var e=this.input.slice(this.index,t),r=this.entityParser.parse(e)
if(r){for(var s=e.length;s;)this.consume(),s--
return this.consume(),r}}},t.prototype.markTagStart=function(){this.tagLine=this.line,this.tagColumn=this.column,this.delegate.tagOpen&&this.delegate.tagOpen()},t}();(function(){function t(t,e){void 0===e&&(e={}),this.options=e,this._token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.currentAttribute=null,this.tokenizer=new to(this,t)}Object.defineProperty(t.prototype,"token",{get:function(){return Xa(this._token)},set:function(t){this._token=t},enumerable:!0,configurable:!0}),t.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},t.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this._token=null,this.startLine=1,this.startColumn=0},t.prototype.addLocInfo=function(){this.options.loc&&(this.token.loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},t.prototype.beginData=function(){this.token={type:"Chars",chars:""},this.tokens.push(this.token)},t.prototype.appendToData=function(t){this.token.chars+=t},t.prototype.finishData=function(){this.addLocInfo()},t.prototype.beginComment=function(){this.token={type:"Comment",chars:""},this.tokens.push(this.token)},t.prototype.appendToCommentData=function(t){this.token.chars+=t},t.prototype.finishComment=function(){this.addLocInfo()},t.prototype.beginStartTag=function(){this.token={type:"StartTag",tagName:"",attributes:[],selfClosing:!1},this.tokens.push(this.token)},t.prototype.beginEndTag=function(){this.token={type:"EndTag",tagName:""},this.tokens.push(this.token)},t.prototype.finishTag=function(){this.addLocInfo()},t.prototype.markTagAsSelfClosing=function(){this.token.selfClosing=!0},t.prototype.appendToTagName=function(t){this.token.tagName+=t},t.prototype.beginAttribute=function(){var t=Xa(this.token.attributes,"current token's attributs")
this.currentAttribute=["","",!1],t.push(this.currentAttribute)},t.prototype.appendToAttributeName=function(t){Xa(this.currentAttribute)[0]+=t},t.prototype.beginAttributeValue=function(t){Xa(this.currentAttribute)[2]=t},t.prototype.appendToAttributeValue=function(t){var e=Xa(this.currentAttribute)
e[1]=e[1]||"",e[1]+=t},t.prototype.finishAttributeValue=function(){},t.prototype.reportSyntaxError=function(t){this.token.syntaxError=t}})()
Object.freeze([]),function(){function t(t,e,r,s){let n=Error.call(this,t)
this.key=s,this.message=t,this.node=e,this.parent=r,this.stack=n.stack}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t}()
const eo=Object.create(null)
var ro
function so(t){return function(e){return Array.isArray(e)&&e[0]===t}}"area base br col command embed hr img input keygen link meta param source track wbr".split(" ").forEach(t=>{eo[t]=!0}),function(t){t[t.Text=0]="Text",t[t.Append=1]="Append",t[t.Comment=2]="Comment",t[t.Modifier=3]="Modifier",t[t.Block=4]="Block",t[t.Component=5]="Component",t[t.OpenElement=6]="OpenElement",t[t.OpenSplattedElement=7]="OpenSplattedElement",t[t.FlushElement=8]="FlushElement",t[t.CloseElement=9]="CloseElement",t[t.StaticAttr=10]="StaticAttr",t[t.DynamicAttr=11]="DynamicAttr",t[t.AttrSplat=12]="AttrSplat",t[t.Yield=13]="Yield",t[t.Partial=14]="Partial",t[t.DynamicArg=15]="DynamicArg",t[t.StaticArg=16]="StaticArg",t[t.TrustingAttr=17]="TrustingAttr",t[t.Debugger=18]="Debugger",t[t.ClientSideStatement=19]="ClientSideStatement",t[t.Unknown=20]="Unknown",t[t.Get=21]="Get",t[t.MaybeLocal=22]="MaybeLocal",t[t.HasBlock=23]="HasBlock",t[t.HasBlockParams=24]="HasBlockParams",t[t.Undefined=25]="Undefined",t[t.Helper=26]="Helper",t[t.Concat=27]="Concat",t[t.ClientSideExpression=28]="ClientSideExpression"}(ro||(ro={}))
so(ro.Modifier),so(ro.FlushElement),so(ro.Get),so(ro.MaybeLocal),(()=>{if("function"==typeof require)try{const t=require("crypto")
let e=e=>{let r=t.createHash("sha1")
return r.update(e,"utf8"),r.digest("base64").substring(0,8)}
return e("test"),e}catch(t){}})()
var no,io;(function(t){t[t.pc=0]="pc",t[t.ra=1]="ra",t[t.fp=2]="fp",t[t.sp=3]="sp",t[t.s0=4]="s0",t[t.s1=5]="s1",t[t.t0=6]="t0",t[t.t1=7]="t1",t[t.v0=8]="v0"})(no||(no={})),function(t){t[t.OpenComponentElement=0]="OpenComponentElement",t[t.DidCreateElement=1]="DidCreateElement",t[t.SetComponentAttrs=2]="SetComponentAttrs",t[t.DidRenderLayout=3]="DidRenderLayout",t[t.Debugger=4]="Debugger"}(io||(io={}))
Object.freeze([])
class ao{constructor(t){this.constants=new tr,this.heap=new ir,this.mode="jit",this.resolverDelegate=t,this.stdlib=function(t){let e=Ja(t,Fa),r=Ja(t,()=>$a(!0)),s=Ja(t,()=>$a(!1))
return new Ha(e,r,s)}(this)}}class oo{constructor(t){this.owner=t,this.handleLookup=[],this.cache={component:new $s,template:new $s,compiledTemplate:new $s,helper:new $s,manager:new $s,modifier:new $s}}lookup(t,e,r){return this.cache[t].hasName(e)?this.cache[t].getHandle(e):null}get(t,e,r){if(this.cache[t].hasName(e)){let r=this.cache[t].getHandle(e)
return this.cache[t].getByHandle(r)}return null}register(t,e,r){let s=this.cache[t],n=this.handleLookup.length
return this.handleLookup.push(s),this.cache[t].register(n,e,r),n}lookupModifier(t,e){let r=this.lookup("modifier",t)
if(null===r)throw new Error(`Modifier for ${t} not found.`)
return r}compilableFrom(t,e){let r=this.owner.identify("template:"+t,e.specifier)
return this.compilable({specifier:r})}compilable(t){return Ta(this.get("template",t.specifier)).create()}registerHelper(t,e){return this.register("helper",t,t=>new Gs(e,t))}registerInternalHelper(t,e){this.register("helper",t,e)}registerComponent(t,e,r,s){let n=this.registerTemplate(e,s),i=this.managerFor(n.meta.managerId),a=new _t(t,i,r,n.handle)
return this.register("component",t,a)}lookupComponent(t,e){return this.cache.component.hasName(t)||this.lookupComponentDefinition(t,e),this.get("component",t,e)}lookupComponentHandle(t,e){return this.cache.component.hasName(t)||this.lookupComponentDefinition(t,e),this.lookup("component",t,e)}managerFor(t="main"){let e
if(this.cache.manager.hasName(t)){let e=this.cache.manager.getHandle(t)
return this.cache.manager.getByHandle(e)}{let{rootName:r}=this.owner
if(e=this.owner.lookup(`component-manager:/${r}/component-managers/${t}`),!e)throw new Error(`No component manager found for ID ${t}.`)
return this.register("manager",t,e),e}}registerTemplate(t,e){return{name:t,handle:this.register("template",t,e),meta:e.meta}}lookupComponentDefinition(t,e){let r
if(this.cache.component.hasName(t))r=this.lookup("component",t,e)
else{let s=Q(this.identifyComponent(t,e),`Could not find the component '${t}'`),n=this.owner.lookup("template",s),i=this.owner.identify("component",s),a=null
void 0!==i&&(a=this.owner.factoryFor(i)),r=this.registerComponent(t,s,a,n)}return this.resolve(r)}lookupHelper(t,e){if(!this.cache.helper.hasName(t)){let r=this.owner,s="helper:"+t,n=e.specifier,i=r.identify(s,n)
if(void 0===i)return null
let a=this.owner.lookup(i,e.specifier)
return this.registerHelper(t,a)}return this.lookup("helper",t,e)}lookupPartial(t,e){throw new Error("Partials are not available in Glimmer applications.")}resolve(t){return this.handleLookup[t].getByHandle(t)}identifyComponent(t,e={specifier:null}){let r=this.owner,s="template:"+t,n=e.specifier,i=r.identify(s,n)
if(void 0===i&&r.identify("component:"+t,n))throw new Error(`The component '${t}' is missing a template. All components must have a template. Make sure there is a template.hbs in the component directory.`)
return i}}var lo={id:"eEI4b84c",block:'{"symbols":["root"],"statements":[[4,"each",[[25,["roots"]]],[["key"],["id"]],[["default"],[{"statements":[[4,"in-element",[[24,1,["parent"]]],[["guid","insertBefore"],["%cursor:0%",[24,1,["insertBefore"]]]],[["default"],[{"statements":[[1,[29,"component",[[24,1,["component"]]],null],false]],"parameters":[]}]]]],"parameters":[1]}]]]],"hasEval":false}',meta:{specifier:"template:/-application/application/src/templates/main"}}
function uo(t,e){let r=e.getSelf(),s=t.capture(),n=s.positional.at(0).value()
return"function"!=typeof n&&function(t,e){let r=function(t){let e,r,s=""
if(null==t)return s
"parent"in t&&"property"in t?(e=t.parent.value(),r=t.property):"_parentValue"in t&&"_propertyKey"in t&&(e=t._parentValue,r=t._propertyKey)
void 0!==r&&(s+=`('${r}' on ${function(t){let e=typeof t
if(null==t)return e
if("number"===e||"boolean"===e)return t.toString()
if(t.debugName)return t.debugName
try{return JSON.stringify(t)}catch(r){}return t.toString()}(e)}) `)
return s}(e)
throw new Error(`You tried to create an action with the {{action}} helper, but the first argument ${r}was ${typeof t} instead of a function.`)}(n,s.positional.at(0)),new Os((function(...t){let e=s.positional.value()
e.shift(),e.push(...t),n.apply(r&&r.value(),e)}))}function ho(t){return t[0]?t[1]:t[2]}class co{constructor(t){this.resolver=t}getComponentDefinition(t){let e=this.resolver.resolve(t)
return T(!!e,"Couldn't find a template for "+t),e}getCapabilities(t){let e=this.getComponentDefinition(t),{manager:r,state:s}=e
return r.getCapabilities(s)}getLayout(t){let e=this.getComponentDefinition(t),{manager:r}=e
return r.getJitStaticLayout(e,this.resolver)}lookupHelper(t,e){return this.resolver.lookupHelper(t,e)}lookupModifier(t,e){return this.resolver.lookupModifier(t,e)}lookupComponentDefinition(t,e){return this.resolver.lookupComponentHandle(t,e)}lookupComponent(t,e){let r=this.lookupComponentDefinition(t,e),s=this.resolver.resolve(r),n=this.resolver.resolve(s.handle)
return{handle:r,capabilities:s.manager.getCapabilities(s.state),compilable:Ta(n).create().asLayout()}}lookupPartial(t,e){return this.resolver.lookupPartial(t,e)}}class po{async getTemplateIterator(t,e,r,s,n){let i=this.getResolver(t),a=this.getContext(i),o=br(i,a,t.env),l=Ta(lo).create()
return Promise.resolve(function(t,e,r,s,n,i=new Wr){let a=As.initial(t,e,{self:r,dynamicScope:i,treeBuilder:s,handle:n})
return new Ns(a)}(o,a,n,r,l.asLayout().compile(a),s))}getComponentTemplateIterator(t,e,r,s,n,i){let a=this.getResolver(t),o=this.getContext(a),l=br(a,o,e)
return Promise.resolve(Ts(l,r,o,0,s,n,i))}getResolver(t){let e=new oo(t)
return e.registerTemplate("main",lo),e.registerInternalHelper("action",uo),e.registerHelper("if",ho),e.registerInternalHelper("-get-dynamic-var",Kr),e}getContext(t){return function(t={},e=new qn){return{program:new ao(new Ra(t)),macros:e}}(new co(t))}}class mo{constructor({element:t,nextSibling:e=null}){this.cursor={element:t,nextSibling:e}}getBuilder(t){return function(t,e){return te.forInitialRender(t,e)}(t,this.cursor)}}class fo{constructor(){this.result=null}render(t){let e
do{e=t.next()}while(!e.done)
this.result=e.value}rerender(){if(!this.result)throw new Error("Cannot re-render before initial render has completed")
this.result.rerender()}}function go(t){return void 0!==t.rootName&&void 0!==t.collection&&void 0!==t.name&&void 0!==t.type}function bo(t){let e=t.type,r=function(t){let e=[]
t.rootName&&e.push(t.rootName)
t.collection&&e.push(t.collection)
t.namespace&&e.push(t.namespace)
t.name&&e.push(t.name)
if(e.length>0){let r=e.join("/")
return go(t)&&(r="/"+r),r}}(t)
return r?e+":"+r:e}function yo(t){let e={}
if(t.indexOf(":")>-1){let r,s=t.split(":"),n=s[0],i=s[1]
e.type=n,0===i.indexOf("/")?(r=i.substr(1).split("/"),i.substr(1).startsWith("@")?e.rootName=r.shift()+"/"+r.shift():e.rootName=r.shift(),e.collection=r.shift()):r=i.split("/"),r.length>0&&(e.name=r.pop(),r.length>0&&(e.namespace=r.join("/")))}else e.type=t
return e}function vo(t,e){if(!e)throw new Error("Assertion Failed: "+t)}class ko{constructor(t,e){this.config=t,this.registry=e}identify(t,e){if(function(t){let e=t.split(":"),r=e[0],s=e[1]
return!!(r&&s&&0===s.indexOf("/")&&s.split("/").length>3)}(t))return t
let r,s=yo(t)
if(e){let t=yo(e)
if(go(t)){vo("Specifier must not include a rootName, collection, or namespace when combined with an absolute referrer",void 0===s.rootName&&void 0===s.collection&&void 0===s.namespace),s.rootName=t.rootName,s.collection=t.collection
let e=this._definitiveCollection(s.type)
if(!s.name)return s.namespace=t.namespace,s.name=t.name,this._serializeAndVerify(s)
if(s.namespace=t.namespace?t.namespace+"/"+t.name:t.name,function(t){let{namespace:e,collection:r}=t,s=e.lastIndexOf("/-")
if(s>-1){s+=2
let t=e.indexOf("/",s)
r=e.slice(s,t>-1?t:void 0)}return r}(s)===e&&(r=this._serializeAndVerify(s)))return r
if(e&&(s.namespace+="/-"+e,r=this._serializeAndVerify(s)))return r
s.rootName=s.collection=s.namespace=void 0}else vo('Referrer must either be "absolute" or include a `type` to determine the associated type',t.type),s.collection=this._definitiveCollection(t.type),s.namespace||(s.namespace=t.rootName),vo(`'${t.type}' does not have a definitive collection`,s.collection)}if(s.collection||(s.collection=this._definitiveCollection(s.type),vo(`'${s.type}' does not have a definitive collection`,s.collection)),!s.rootName){if(s.rootName=this.config.app.rootName||"app",r=this._serializeAndVerify(s))return r
s.namespace?(s.rootName=s.namespace,s.namespace=void 0):(s.rootName=s.name,s.name="main")}return(r=this._serializeAndVerify(s))?r:void 0}retrieve(t){return this.registry.get(t)}resolve(t,e){let r=this.identify(t,e)
if(r)return this.retrieve(r)}_definitiveCollection(t){let e=this.config.types[t]
return vo(`'${t}' is not a recognized type`,e),e.definitiveCollection}_serializeAndVerify(t){let e=bo(t)
if(this.registry.has(e))return e}}class wo{constructor(t={}){this._entries=t}has(t){return t in this._entries}get(t){return this._entries[t]}}var So=function(t,e,r,s){var n,i=arguments.length,a=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s
if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,s)
else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(i<3?n(a):i>3?n(e,r,a):n(e,r))||a)
return i>3&&a&&Object.defineProperty(e,r,a),a}
class Eo{constructor({id:t,label:e,selected:r}){this.label="",this.selected=!1,this.id=t,this.label=e,this.selected=r}}So([ut],Eo.prototype,"label",void 0),So([ut],Eo.prototype,"selected",void 0)
const Ao=t=>Math.round(1e3*Math.random())%t,No=(t,e=1e3)=>{const r=["pretty","large","big","small","tall","short","long","handsome","plain","quaint","clean","elegant","easy","angry","crazy","helpful","mushy","odd","unsightly","adorable","important","inexpensive","cheap","expensive","fancy"]
let s=["red","yellow","blue","green","pink","brown","purple","brown","white","black","orange"],n=["table","chair","house","bbq","desk","car","pony","cookie","sandwich","burger","pizza","mouse","keyboard"],i=[]
for(let a=0;a<e;a++)i.push(new Eo({id:t++,label:r[Ao(r.length)]+" "+s[Ao(s.length)]+" "+n[Ao(n.length)],selected:!1}))
return{data:i,id:t}}
var To=function(t,e,r,s){var n,i=arguments.length,a=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s
if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,s)
else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(i<3?n(a):i>3?n(e,r,a):n(e,r))||a)
return i>3&&a&&Object.defineProperty(e,r,a),a}
function Co(t){return!(!t.__owner__._rendering&&!t.__owner__._scheduled)}class xo extends Lt{constructor(){super(...arguments),this.id=1,this.data=[]}create(){if(Co(this))return
const t=(e=this.id,No(e))
var e
this.data=t.data,this.id=t.id}add(){Co(this)||(this.data=((t,e)=>{const r=No(t,1e3)
return{data:[...e,...r.data],id:r.id}})(this.id,this.data).data)}update(){Co(this)||((t,e=10)=>{for(let r=0;r<t.length;r+=e)t[r].label=t[r].label+" !!!"})(this.data)}runLots(){if(Co(this))return
const t=(e=this.id,No(e,1e4))
var e
this.data=t.data,this.id=t.id,this.resetSelection()}clear(){this.data=[]}swapRows(){Co(this)||(this.data=(t=>{const e=[...t]
if(e.length>998){let t=e[1]
e[1]=e[998],e[998]=t}return e})(this.data))}remove(t){Co(this)||(this.data=((t,e)=>t.filter(t=>t.id!==e))(this.data,t),this.resetSelection())}select(t){Co(this)||this.data.forEach(e=>{e.id===t?e.selected=!0:e.selected&&(e.selected=!1)})}resetSelection(){this.data.forEach(t=>{t.selected&&(t.selected=!1)})}}To([ut],xo.prototype,"id",void 0),To([ut],xo.prototype,"data",void 0)
var Lo={"template:/glimmer/components/BsButton":{id:"FQEzP93k",block:'{"symbols":["&attrs","@onClick","&default"],"statements":[[7,"button",false],[13,"class","btn btn-primary btn-block",null],[14,1],[13,"onclick",[24,2,[]],null],[13,"type","button",null],[9],[0,"\\n\\n  "],[15,3,null],[0,"\\n\\n"],[10]],"hasEval":false}',meta:{specifier:"template:/glimmer/components/BsButton"}},"component:/glimmer/components/Glimmer":xo,"template:/glimmer/components/Glimmer":{id:"viiXB2Ro",block:'{"symbols":[],"statements":[[7,"div",true],[11,"class","container",null],[9],[0,"\\n  "],[7,"div",true],[11,"class","jumbotron",null],[9],[0,"\\n    "],[7,"div",true],[11,"class","row",null],[9],[0,"\\n      "],[7,"div",true],[11,"class","col-md-6",null],[9],[0,"\\n        "],[7,"h1",true],[9],[0,"Glimmer v0.14.0"],[10],[0,"\\n      "],[10],[0,"\\n      "],[7,"div",true],[11,"class","col-md-6",null],[9],[0,"\\n        "],[7,"div",true],[11,"class","row",null],[9],[0,"\\n          "],[7,"div",true],[11,"class","col-sm-6 smallpad",null],[9],[0,"\\n            "],[5,"BsButton",[[13,"id","run",null]],[["@onClick"],[[29,"action",[[24,0,["create"]]],null]]],[["default"],[{"statements":[[0,"\\n              Create 1,000 rows\\n            "]],"parameters":[]}]]],[0,"\\n          "],[10],[0,"\\n          "],[7,"div",true],[11,"class","col-sm-6 smallpad",null],[9],[0,"\\n            "],[5,"BsButton",[[13,"id","runlots",null]],[["@onClick"],[[29,"action",[[24,0,["runLots"]]],null]]],[["default"],[{"statements":[[0,"\\n              Create 10,000 rows\\n            "]],"parameters":[]}]]],[0,"\\n          "],[10],[0,"\\n          "],[7,"div",true],[11,"class","col-sm-6 smallpad",null],[9],[0,"\\n            "],[5,"BsButton",[[13,"id","add",null]],[["@onClick"],[[29,"action",[[24,0,["add"]]],null]]],[["default"],[{"statements":[[0,"\\n              Append 1,000 rows\\n            "]],"parameters":[]}]]],[0,"\\n          "],[10],[0,"\\n          "],[7,"div",true],[11,"class","col-sm-6 smallpad",null],[9],[0,"\\n            "],[5,"BsButton",[[13,"id","update",null]],[["@onClick"],[[29,"action",[[24,0,["update"]]],null]]],[["default"],[{"statements":[[0,"\\n              Update every 10th row\\n            "]],"parameters":[]}]]],[0,"\\n          "],[10],[0,"\\n          "],[7,"div",true],[11,"class","col-sm-6 smallpad",null],[9],[0,"\\n            "],[5,"BsButton",[[13,"id","clear",null]],[["@onClick"],[[29,"action",[[24,0,["clear"]]],null]]],[["default"],[{"statements":[[0,"\\n              Clear\\n            "]],"parameters":[]}]]],[0,"\\n          "],[10],[0,"\\n          "],[7,"div",true],[11,"class","col-sm-6 smallpad",null],[9],[0,"\\n            "],[5,"BsButton",[[13,"id","swaprows",null]],[["@onClick"],[[29,"action",[[24,0,["swapRows"]]],null]]],[["default"],[{"statements":[[0,"\\n              Swap Rows\\n            "]],"parameters":[]}]]],[0,"\\n          "],[10],[0,"\\n        "],[10],[0,"\\n      "],[10],[0,"\\n    "],[10],[0,"\\n  "],[10],[0,"\\n\\n\\n  "],[5,"Table",[],[["@data","@onSelect","@onRemove"],[[24,0,["data"]],[29,"action",[[24,0,["select"]]],null],[29,"action",[[24,0,["remove"]]],null]]],null],[0,"\\n\\n  "],[7,"span",true],[11,"class","preloadicon glyphicon glyphicon-remove",null],[11,"aria-hidden","true",null],[9],[10],[0,"\\n\\n"],[10]],"hasEval":false}',meta:{specifier:"template:/glimmer/components/Glimmer"}},"component:/glimmer/components/PerformantEach":class extends Lt{constructor(){super(...arguments),this.fragment=null,this.fragment=document.createElement("tbody")}get appendNode(){const t=document.getElementById("items-list")
return t.contains(this.fragment)||t.append(this.fragment),""}},"template:/glimmer/components/PerformantEach":{id:"wrsrPZy1",block:'{"symbols":["item","@onSelect","@onRemove","@items"],"statements":[[4,"in-element",[[24,0,["fragment"]]],[["guid","insertBefore"],["%cursor:0%",[28]]],[["default"],[{"statements":[[0,"  "],[4,"each",[[24,4,[]]],[["key"],["id"]],[["default"],[{"statements":[[7,"tr",true],[12,"class",[29,"if",[[24,1,["selected"]],"danger"],null],null],[9],[7,"td",true],[11,"class","col-md-1",null],[9],[1,[24,1,["id"]],false],[10],[7,"td",true],[11,"class","col-md-4",null],[9],[7,"a",true],[12,"onclick",[29,"action",[[24,2,[]],[24,1,["id"]]],null],null],[9],[1,[24,1,["label"]],false],[10],[10],[7,"td",true],[11,"class","col-md-1",null],[9],[7,"a",true],[12,"onclick",[29,"action",[[24,3,[]],[24,1,["id"]]],null],null],[9],[7,"span",true],[11,"class","glyphicon glyphicon-remove",null],[11,"aria-hidden","true",null],[9],[10],[10],[10],[7,"td",true],[11,"class","col-md-6",null],[9],[10],[10]],"parameters":[1]}]]],[0,"\\n  "],[1,[24,0,["appendNode"]],false],[0,"\\n"]],"parameters":[]}]]]],"hasEval":false}',meta:{specifier:"template:/glimmer/components/PerformantEach"}},"template:/glimmer/components/Table":{id:"WCU43Ogp",block:'{"symbols":["@onSelect","@onRemove","@data"],"statements":[[7,"table",true],[11,"class","table table-hover table-striped test-data",null],[11,"id","items-list",null],[9],[0,"\\n"],[4,"if",[[24,3,["length"]]],null,[["default"],[{"statements":[[0,"    "],[5,"PerformantEach",[],[["@onSelect","@onRemove","@items"],[[24,1,[]],[24,2,[]],[24,3,[]]]],null],[0,"\\n"]],"parameters":[]}]]],[10],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/glimmer/components/Table"}}},Do={app:{name:"glimmer",rootName:"glimmer"},types:{application:{definitiveCollection:"main"},component:{definitiveCollection:"components"},"component-test":{unresolvable:!0},helper:{definitiveCollection:"components"},"helper-test":{unresolvable:!0},renderer:{definitiveCollection:"main"},template:{definitiveCollection:"components"}},collections:{main:{types:["application","renderer"]},components:{group:"ui",types:["component","component-test","template","helper","helper-test"],defaultType:"component",privateCollections:["utils"]},styles:{group:"ui",unresolvable:!0},utils:{unresolvable:!0}}}
const _o=new class extends class extends class{constructor({rootName:t,resolver:e,environment:r,loader:s,renderer:n}){this._initializers=[],this.resolver=e,this.rootName=t,this._environment=r,T(s,"Must provide a Loader for preparing templates and other metadata required for a Glimmer Application."),T(n,"Must provide a Renderer to render the templates produced by the Loader."),this.loader=s,this.renderer=n}initialize(){this.initRegistry(),this.initContainer()}registerInitializer(t){this._initializers.push(t)}initRegistry(){let t=this._registry=new St,e=new Ps(this._registry,this.resolver)
t.register(`environment:/${this.rootName}/main/main`,this._environment),t.registerOption("helper","instantiate",!1),t.registerOption("template","instantiate",!1),t.registerInjection("environment","document",`document:/${this.rootName}/main/main`),t.registerInjection("component-manager","env",`environment:/${this.rootName}/main/main`)
let r=this._initializers
for(let s=0;s<r.length;s++)r[s].initialize(e)}initContainer(){this._container=new wt(this._registry,this.resolver),this._container.defaultInjections=t=>{let e={}
return At(e,this),e}}identify(t,e){return this.resolver.identify(t,e)}factoryFor(t,e){return this._container.factoryFor(this.identify(t,e))}lookup(t,e){return this._container.lookup(this.identify(t,e))}}{constructor(t){super({rootName:t.rootName,resolver:t.resolver,environment:Hs,loader:t.loader,renderer:t.renderer}),this.env=null,this._roots=[],this._rootsIndex=0,this._self=null,this._rendering=!1,this._rendered=!1,this._scheduled=!1,this._notifiers=[],T(t.builder,"Must provide a Builder that is responsible to building DOM.")
const e=this.document=t.document||Q(Fs,"You must pass a document to the Application constructor in non-browser environments.")
this.builder=t.builder,this.registerInitializer({initialize(r){r.register(`document:/${t.rootName}/main/main`,e),r.registerOption("document","instantiate",!1)}})}renderComponent(t,e,r=null){let{_roots:s,_self:n}=this
s.push({id:this._rootsIndex++,component:t,parent:e,insertBefore:r}),n&&(n.update({roots:s}),this.scheduleRerender())}async boot(){this.initialize(),this.env=this.lookup(`environment:/${this.rootName}/main/main`),await this._render()}scheduleRerender(){!this._scheduled&&this._rendered&&(this._rendering=!0,this._scheduled=!0,setTimeout(async()=>{this._scheduled=!1,await this._rerender(),this._rendering=!1},0))}async _render(){const t=Q(this.env,"Unexpected missing environment during render")
let e=this._self=new Os({roots:this._roots}),r=new Wr,s=this.builder.getBuilder(t),n=await this.loader.getTemplateIterator(this,t,s,r,e)
try{t.begin(),await this.renderer.render(n),t.commit(),this._didRender()}catch(i){this._didError(i)}}async _rerender(){const t=Q(this.env,"Unexpected missing environment during re-render")
try{t.begin(),await this.renderer.rerender(),t.commit(),this._didRender()}catch(e){this._didError(e)}}_didRender(){this._rendered=!0
let t=this._notifiers
this._notifiers=[],t.forEach(t=>t[0]())}_didError(t){let e=this._notifiers
this._notifiers=[],e.forEach(e=>e[1](t))}}{constructor(){let t=new wo(Lo),e=new ko(Do,t)
const r=document.body
super({builder:new mo({element:r,nextSibling:null}),loader:new po,renderer:new fo,resolver:e,rootName:Do.app.rootName})}},Bo=document.getElementById("app")
bt=()=>{_o.scheduleRerender()},_o.registerInitializer({initialize(t){t.register(`component-manager:/${_o.rootName}/component-managers/main`,qs)}}),_o.renderComponent("Glimmer",Bo,null),_o.boot()}))
