@benbraide/inlinejs-stripe 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inlinejs-stripe.js +678 -577
- package/dist/inlinejs-stripe.min.js +1 -1
- package/lib/common/components/field.d.ts +3 -2
- package/lib/common/components/field.js +55 -68
- package/lib/common/components/generic-field.d.ts +1 -2
- package/lib/common/components/generic-field.js +4 -18
- package/lib/common/components/stripe.d.ts +3 -2
- package/lib/common/components/stripe.js +7 -16
- package/lib/esm/components/field.d.ts +3 -2
- package/lib/esm/components/field.js +55 -68
- package/lib/esm/components/generic-field.d.ts +1 -2
- package/lib/esm/components/generic-field.js +4 -18
- package/lib/esm/components/stripe.d.ts +3 -2
- package/lib/esm/components/stripe.js +7 -16
- package/package.json +3 -3
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see inlinejs-stripe.min.js.LICENSE.txt */
|
2
|
-
(()=>{"use strict";var e={543:(e,t,n)=>{n.r(t),n.d(t,{CustomElement:()=>CustomElement,GetGlobalPropertyScope:()=>o,GetProperties:()=>l,GetPropertyScope:()=>a,InlineJSElement:()=>y,NativeElement:()=>NativeElement,NativeElementCompact:()=>h,Property:()=>c,Register:()=>_,RegisterCustomElement:()=>r,ResourceElement:()=>ResourceElement,ResourceElementCompact:()=>p,ResourceTargetElement:()=>ResourceTargetElement,ResourceTargetElementCompact:()=>f});var i=n(867);function r(e,t){let n=(0,i.ToSnakeCase)(t||e.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,e)}const s=(0,i.RandomString)();function o(){return s}function l(){return(0,i.GetGlobalScope)(`customProperties.${s}`)}function a(e,t){return t||("constructor"in e?t=e.constructor.name:("function"==typeof e||"object"==typeof e&&"name"in e)&&(t=e.name)),t||""}function c(e){return function(t,n,r){let s="",o=null;const c=e&&"initial"in e?e.initial:t[n];(void 0!==c||!r&&(null==e?void 0:e.update))&&(o="boolean"===(null==e?void 0:e.type)?(e,t)=>{e&&"false"!==e?t.setAttribute(s,s):t.hasAttribute(s)&&t.removeAttribute(s)}:(e,t)=>{t.setAttribute(s,e)});let u=null,h={name:"",type:(null==e?void 0:e.type)||"string",spread:(null==e?void 0:e.spread)||"",update:(null==e?void 0:e.update)||!1,initial:c,checkStoredObject:(null==e?void 0:e.checkStoredObject)||!1,delimiter:(null==e?void 0:e.delimiter)||",",handler:null,setInitial:o};if(r){if("function"==typeof r.value&&!r.get&&!r.set&&((null==e?void 0:e.name)||/^Update.+Property/.test(r.value.name))){const t=r.value;s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||r.value.name.replace(/^Update(.+)Property/,"$1")),u=(e,n)=>t.call(n,e)}}else s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||n),u=(e,t)=>t[n]=e;if(s&&u){h.name=s,h.handler=u;const e=a(t);let n=l();n[e]=n[e]||new Array,n[e].push(h)}}}var u=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class CustomElement extends HTMLElement{constructor(e={}){super(),this.options_=e,this.componentId_="",this.storedProxyAccessHandler_=null,this.resources_=new Array,this.loadedResources_=null,this.loadingResources_=!1,this.queuedResourceHandlers_=new Array,this.nativeElement_=null,this.nativeElements_=new Array,this.nativeAttributesBlacklist_=new Array,this.nativeAttributesWhitelist_=new Array,this.propertyScopes_=new Array,this.instanceProperties_=new Array,this.instancePropertyNames_=new Array,this.attributeChangeHandlers_={},this.spreads_={},this.storedObjects_={},this.booleanAttributes_=new Array,this.nonBooleanAttributes_=new Array,(this.options_.isTemplate||this.options_.isHidden)&&(this.style.display="none");const t=globalThis.InlineJS;if(!(this.options_.disableImplicitData||(0,i.IsObject)(t)&&t.disableImplicitData)){const e=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!1),t=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!0);let n=null;for(let i=this;i;i=i.parentNode)if(i instanceof Element&&(i.hasAttribute(e)||i.hasAttribute(t))){n=i;break}!n&&this.setAttribute(e,"")}}UpdateComponentProperty(e){var t;const n=(0,i.FindComponentById)(this.componentId_);n&&(e=(e||"").trim(),null===(t=n.FindScopeByRoot(this))||void 0===t||t.SetName(e),n.GetRoot()===this&&n.SetName(e))}AddResource(e){this.resources_.push(e)}RemoveResource(e){this.resources_=this.resources_.filter((t=>t!==e))}LoadResources(){return this.loadingResources_?new Promise(((e,t)=>{this.queuedResourceHandlers_.push((()=>{this.loadedResources_?e(this.loadedResources_):t()}))})):this.loadedResources_?Promise.resolve(this.loadedResources_):(this.loadingResources_=!0,new Promise(((e,t)=>{const n=new Array,r=new Array,s=t=>{this.loadingResources_=!1,this.loadedResources_=t,this.queuedResourceHandlers_.forEach((e=>e())),this.queuedResourceHandlers_=[],e(t)};if(this.resources_.forEach((e=>{"string"==typeof e?r.push(e):"LoadTargetResources"in e?n.push(e.LoadTargetResources()):"GetResource"in e?r.push(e.GetResource()):r.push(e)})),r.length>0){const e=(0,i.GetGlobal)().GetConcept("resource");if(e){const t=e.Get({items:r,attributes:this.GetResourceLoadAttributes_(),concurrent:this.IsConcurrentResourceLoad_()});n.push(t)}}0==n.length?s([]):Promise.all(n).then(s).catch(t)})))}AddNativeElement(e){this.nativeElements_.push(e),this.CopyNativeElements_(e)}RemoveNativeElement(e){this.nativeElements_=this.nativeElements_.filter((t=>t!==e))}AddBooleanAttribute(e){Array.isArray(e)?this.booleanAttributes_.push(...e):this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=Array.isArray(e)?this.booleanAttributes_.filter((t=>!e.includes(t))):this.booleanAttributes_.filter((t=>t!==e))}AddNonBooleanAttribute(e){Array.isArray(e)?this.nonBooleanAttributes_.push(...e):this.nonBooleanAttributes_.push(e)}RemoveNonBooleanAttribute(e){this.nonBooleanAttributes_=Array.isArray(e)?this.nonBooleanAttributes_.filter((t=>!e.includes(t))):this.nonBooleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return!this.nonBooleanAttributes_.includes(e)&&(!!this.booleanAttributes_.includes(e)||null)}IsTemplate(){return this.options_.isTemplate}OnElementScopeCreated(e){this.HandleElementScopeCreated_(e)}EvaluateExpression(e,t){return this.EvaluateWithStoredProxyAccessHandler((0,i.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:e,disableFunctionCall:null==t?void 0:t.disableFunctionCall,waitPromise:null==t?void 0:t.waitPromise,voidOnly:null==t?void 0:t.voidOnly}),null==t?void 0:t.callback,null==t?void 0:t.params,null==t?void 0:t.contexts)}EvaluateWithStoredProxyAccessHandler(e,t,n,i){if(!this.storedProxyAccessHandler_)return e(t,n,i);let r;return this.storedProxyAccessHandler_((()=>r=e(t,n,i))),r}AddPropertyScope_(e){this.propertyScopes_.push(a(CustomElement,e))}FindProperty_(e){return this.instanceProperties_.find((t=>t.name===e))}GetAllProperties_(){let e=new Array,t=l();for(let n of this.propertyScopes_)t.hasOwnProperty(n)&&e.push(...Object.values(t[n]));return e}HandleElementScopeCreated_({scope:e,componentId:t},n){this.componentId_=t,this.propertyScopes_=this.ComputePropertyScopes_(),this.storedProxyAccessHandler_=(0,i.StoreProxyHandler)(t),(this.instanceProperties_=this.GetAllProperties_()).forEach((e=>{"boolean"===e.type&&this.booleanAttributes_.push(e.name);const t=e.spread&&(0,i.ToSnakeCase)(e.spread);t&&this.spreads_.hasOwnProperty(t)?this.spreads_[t].push(e.name):t&&(this.spreads_[t]=[e.name])})),this.instancePropertyNames_=this.instanceProperties_.map((e=>e.name)),e.AddPostAttributesProcessCallback((()=>{this.instanceProperties_.forEach((e=>{void 0!==e.initial&&e.setInitial&&!this.hasAttribute(e.name)&&e.setInitial(this.EncodeValue_(e.initial,e.type),this)})),this.InitializeStateFromAttributes_(),n&&n()})),e.AddPostProcessCallback((()=>this.ShouldLoadResources_()&&this.LoadResources())),e.AddAttributeChangeCallback((e=>e&&this.AttributeChanged_(e))),e.AddUninitCallback((()=>{this.nativeElement_=null,this.storedProxyAccessHandler_=null}))}InitializeStateFromAttributes_(e){let t=Array.from(this.attributes);e&&(t=t.filter((({name:t})=>e.includes(t)))),t.forEach((({name:e})=>this.AttributeChanged_(e)))}EncodeValue_(e,t){return"boolean"===t?e?"true":"false":"json"===t?JSON.stringify(e):"array"===t?(e||[]).join(","):t.startsWith("array:")?(e||[]).map((e=>this.EncodeValue_(e,t.substring(6)))).join(","):"date"===t?(e||new Date).toString():(0,i.ToString)(e)}DecodeValue_(e,t,n){if("string"===t)return e||"";if("boolean"===t)return null!=e&&"0"!==e&&"false"!==e;if("number"===t)return null===e?NaN:parseFloat(e||"0")||0;if("json"===t){try{return JSON.parse(e||"")}catch(e){}return null}return"array"===t?(e||"").split(n||",").map((e=>e.trim()))||[]:t.startsWith("array:")?(e||"").split(n||",").map((e=>this.DecodeValue_(e,t.substring(6),n)))||[]:"date"===t?new Date(e||""):e}SpreadValue_(e,t){let n=e.split(" ");t.forEach(((e,t)=>{if(t>=n.length){let i=t%4-2;this.DispatchAttributeChange_(e,i<0||i>=n.length?n[0]:n[i])}else this.DispatchAttributeChange_(e,n[t])}))}DispatchAttributeChange_(e,t){let n=!1;this.spreads_.hasOwnProperty(e)&&(this.SpreadValue_(t||"",this.spreads_[e]),n=!0);const r=this.FindProperty_(e),s=this.storedObjects_.hasOwnProperty(e)&&this.storedObjects_[e];if(r){let o=null;if(r.checkStoredObject&&t){if(t===s)return;const n=(0,i.RetrieveStoredObject)({key:t,componentId:this.componentId_,contextElement:this});n!==t&&(this.storedObjects_[e]=t,o=e=>(0,i.JournalTry)((()=>e(n,this))))}o?o(r.handler):(0,i.JournalTry)((()=>r.handler(this.DecodeValue_(t,r.type||"string",r.delimiter),this))),n=!0}return n}AttributeChanged_(e){let t="";if(this.nativeElement_&&(e.startsWith("data-native-")?t=e.substring(12):e.startsWith("native-")?t=e.substring(7):e.startsWith("-")&&(t=e.substring(1))),t)this.hasAttribute(e)?this.nativeElement_.setAttribute(t,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(t)&&this.nativeElement_.removeAttribute(t);else{this.DispatchAttributeChange_(e,this.getAttribute(e))||!this.nativeAttributesWhitelist_.includes(e)&&this.nativeAttributesBlacklist_.includes(e)||!this.nativeElement_||e.startsWith("data-")||CustomElement.GlobalAttributes.includes(e)||(this.hasAttribute(e)?this.nativeElement_.setAttribute(e,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(e)&&this.nativeElement_.removeAttribute(e))}}ComputePropertyScopes_(){let e=new Array;for(let t=Object.getPrototypeOf(this);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(t.constructor.name);return e}SetNativeElement_(e){e!==this.nativeElement_&&(this.nativeElement_=e,this.CopyNativeElements_())}CopyNativeElements_(e){this.nativeElement_&&0!=this.nativeElements_.length&&((e?[e]:this.nativeElements_).forEach((e=>{e.GetAttributes().forEach((({name:e,value:t})=>this.nativeElement_.setAttribute(e,t)));for(let t=e.firstChild;t;t=e.firstChild)t.remove(),this.nativeElement_.appendChild(t)})),(0,i.ProcessDirectives)({component:this.componentId_,element:this.nativeElement_}))}GetResourceLoadAttributes_(){}IsConcurrentResourceLoad_(){return!0}ShouldLoadResources_(){return!0}}CustomElement.GlobalAttributes=["id","class","style","title","lang","dir","tabindex","accesskey","hidden","draggable","spellcheck","translate","contenteditable"],u([c({type:"string"})],CustomElement.prototype,"UpdateComponentProperty",null);class NativeElement extends CustomElement{constructor(){super(),this.attributes_=new Array,Array.from(this.attributes).forEach((({name:e,value:t})=>{this.attributes_.push({name:e,value:t}),this.removeAttribute(e)})),this.options_.isTemplate=!0,this.options_.isHidden=!0,this.style.display="none"}GetAttributes(){return this.attributes_}HandleElementScopeCreated_(e,t){var n;null===(n=(0,i.FindAncestor)(this,(e=>"AddNativeElement"in e)))||void 0===n||n.AddNativeElement(this),super.HandleElementScopeCreated_(e,t)}}function h(){r(NativeElement)}var d=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class ResourceElement extends CustomElement{constructor(){super({isTemplate:!0,isHidden:!0}),this.src="",this.type=""}GetResource(){return"link"===this.type||"script"===this.type||"data"===this.type?{type:this.type,path:this.src}:this.src}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}ShouldLoadResources_(){return!1}}function p(){r(ResourceElement,"resource")}d([c({type:"string"})],ResourceElement.prototype,"src",void 0),d([c({type:"string"})],ResourceElement.prototype,"type",void 0);var m=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class ResourceTargetElement extends CustomElement{constructor(){super({isHidden:!0}),this.attributes_=null,this.sequential=!1,this.defer=!1,this.onloaded="",this.onloadederror=""}UpdateAttributesProperty(e){this.attributes_=e}LoadResources(){const e=this.loadedResources_;return new Promise(((t,n)=>{super.LoadResources().then((n=>{!e&&this.onloaded&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloaded,{disableFunctionCall:!1,contexts:{data:n}}))),t(n)})).catch((e=>{this.onloadederror&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloadederror,{disableFunctionCall:!1,contexts:{reason:e}}))),n(e)}))}))}LoadTargetResources(){return this.LoadResources()}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}GetResourceLoadAttributes_(){return this.attributes_||void 0}IsConcurrentResourceLoad_(){return!this.sequential}ShouldLoadResources_(){return!this.defer}}function f(){r(ResourceTargetElement,"resource-target")}function _(e){return function(t){let n=(0,i.ToSnakeCase)(e||t.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,t)}}function y(){(0,i.WaitForGlobal)().then((()=>{h(),p(),f()}))}m([c({type:"object",checkStoredObject:!0})],ResourceTargetElement.prototype,"UpdateAttributesProperty",null),m([c({type:"boolean"})],ResourceTargetElement.prototype,"sequential",void 0),m([c({type:"boolean"})],ResourceTargetElement.prototype,"defer",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloaded",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloadederror",void 0)},867:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Ie,AddDirectiveExpansionRule:()=>lt,AddDirectiveHandler:()=>ii,AddMagicHandler:()=>fi,AddOutsideEventExcept:()=>At,AddOutsideEventListener:()=>St,ApplyDirectiveExpansionRules:()=>ct,AreObjects:()=>u,AttributeInterpolator:()=>Qn,AutoBootstrap:()=>ni,BaseComponent:()=>BaseComponent,BaseGlobal:()=>BaseGlobal,BeginsWith:()=>h,BindDirectiveExpansionRule:()=>yi,BindEvent:()=>li,BootstrapAndAttach:()=>ti,BuildGetterProxyOptions:()=>Me,BuildIntersectionOptions:()=>hi,BuildProxyOptions:()=>Le,CallIfFunction:()=>Ye,Changes:()=>Changes,ChildProxy:()=>ChildProxy,ClassDirectiveExpansionRule:()=>bi,ComponentCacheKey:()=>O,Config:()=>Config,ConsiderRange:()=>be,Context:()=>Context,ContextKeys:()=>E,CreateAnimationLoop:()=>ce,CreateChildProxy:()=>Re,CreateDirective:()=>ht,CreateDirectiveExpansionRule:()=>ot,CreateDirectiveHandlerCallback:()=>ri,CreateGlobal:()=>Jn,CreateInplaceProxy:()=>we,CreateLoop:()=>ae,CreateMagicHandlerCallback:()=>_i,CreateReadonlyProxy:()=>Fe,DecodeAttribute:()=>W,DecodeValue:()=>B,DeepCopy:()=>z,DefaultTransitionDelay:()=>Gt,DefaultTransitionDuration:()=>Tt,DefaultTransitionInitialDelay:()=>wt,DefaultTransitionRepeats:()=>Ft,DeleteProxyProp:()=>Oe,DirectiveManager:()=>DirectiveManager,DisableProxyAction:()=>De,DispatchDirective:()=>mt,ElementScope:()=>ElementScope,ElementScopeKey:()=>S,EncodeAttribute:()=>q,EncodeValue:()=>J,EndsWith:()=>K,EvaluateLater:()=>Ze,EvaluateMagicProperty:()=>ke,ExtractDuration:()=>di,FindAncestor:()=>V,FindAncestorByAttribute:()=>X,FindAncestorByAttributeValue:()=>Z,FindAncestorByClass:()=>Y,FindAncestorByTagName:()=>Q,FindCacheValue:()=>y,FindComponentByCallback:()=>D,FindComponentById:()=>G,FindComponentByName:()=>w,FindComponentByRoot:()=>F,FindFirstAttribute:()=>ne,FindFirstAttributeValue:()=>ie,FlattenDirective:()=>pt,ForwardEvent:()=>si,Future:()=>Future,GenerateFunctionFromString:()=>Xe,GenerateUniqueId:()=>Pe,GenerateValueReturningFunction:()=>Ke,GenerateVoidFunction:()=>Ve,GenericProxy:()=>GenericProxy,GetAttribute:()=>te,GetCache:()=>f,GetConfig:()=>st,GetDefaultCacheValue:()=>R,GetDefaultUniqueMarkers:()=>Ce,GetDirectiveValue:()=>ai,GetElementScopeId:()=>A,GetElementScopeIdWithElement:()=>C,GetGlobal:()=>I,GetGlobalScope:()=>d,GetLocal:()=>Ot,GetOrCreateGlobal:()=>qn,GetProxyProp:()=>Ne,GetTarget:()=>o,GetTargets:()=>l,GlobalCreatedEvent:()=>P,IncrementUniqueMarkers:()=>Ae,InferComponent:()=>L,InitCache:()=>m,InitComponentCache:()=>N,InitJITProxy:()=>He,InitializeDev:()=>Ei,InitializeGlobal:()=>Si,InitializeGlobalScope:()=>p,InitializeUtilities:()=>Ci,InitializeValues:()=>Ai,InitializeVersion:()=>xi,InlineJS:()=>Pi,InlineJSGlobalKey:()=>x,InsertHtml:()=>zn,Interpolate:()=>Zn,InterpolateText:()=>Xn,IntersectionObserver:()=>IntersectionObserver,InvalidateCache:()=>g,InvalidateComponentCache:()=>T,IsBooleanAttribute:()=>re,IsEqual:()=>se,IsInsideTemplate:()=>Se,IsObject:()=>c,IsTemplate:()=>Ee,JoinPath:()=>fe,JoinUniqueMarkers:()=>xe,JournalError:()=>i,JournalLog:()=>vi,JournalTry:()=>r,JournalWarn:()=>dt,LazyCheck:()=>mi,Loop:()=>Loop,MagicManager:()=>MagicManager,MeasureCallback:()=>ue,MergeObjects:()=>he,MutationObserver:()=>MutationObserver,NativeFetchConcept:()=>NativeFetchConcept,NextIdle:()=>NextIdle,NextNonIdle:()=>NextNonIdle,NextTick:()=>NextTick,Nothing:()=>Nothing,OnDirectiveExpansionRule:()=>gi,PathToRelative:()=>pe,PeekCurrentComponent:()=>$e,PeekCurrentScope:()=>kt,PeekStoredObject:()=>H,PopCurrentComponent:()=>Ue,PopCurrentScope:()=>It,ProcessDirectives:()=>_t,ProxyAccessStorage:()=>ProxyAccessStorage,ProxyKeys:()=>s,PushCurrentComponent:()=>Be,PushCurrentScope:()=>Pt,QueryGlobalComponent:()=>Nt,RandomString:()=>_e,Range:()=>Range,RemoveDirectiveExpansionRule:()=>at,RemoveOutsideEventListener:()=>Ct,ResizeObserver:()=>ResizeObserver,ResolveKeyValue:()=>ci,ResolveOptions:()=>pi,ResolveTransition:()=>Dt,RetrieveStoredObject:()=>j,RootProxy:()=>RootProxy,Scope:()=>Scope,SetAttributeUtil:()=>ge,SetCacheValue:()=>_,SetProxyAccessHandler:()=>tt,SetProxyProp:()=>Te,SplitPath:()=>me,Stack:()=>Stack,StoreProxyHandler:()=>nt,StreamData:()=>Qe,SubscribeToChanges:()=>it,SupportsAttributes:()=>U,TextContentInterpolator:()=>ei,TidyPath:()=>de,TimedRange:()=>TimedRange,ToCamelCase:()=>v,ToSnakeCase:()=>ve,ToString:()=>$,TraverseDirectives:()=>ft,TraverseInterpolationReplacements:()=>Yn,UnbindOutsideEvent:()=>xt,UseCache:()=>b,UseEffect:()=>rt,UseRange:()=>ye,WaitAnimation:()=>Lt,WaitForGlobal:()=>k,WaitPromise:()=>We,WaitTransition:()=>Mt,WaitWhile:()=>et});class Stack{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Purge(){return this.list_.splice(0)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class Future{constructor(e){this.callback_=e}Get(){return this.callback_()}}function i(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function r(e,t,n){try{return e()}catch(e){i(e,t,n)}}class Loop{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===r((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>r((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class Nothing{}const s={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function o(e){return(Array.isArray(e)||e&&"object"==typeof e)&&s.target in e?o(e[s.target]):e}function l(e){return e.map((e=>o(e)))}function a(e){return(e=o(e))&&"object"==typeof e&&(s.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function c(e){return!!a(e)}function u(e){return-1==e.findIndex((e=>!a(e)))}class Range{constructor(e,t){this.from_=e,this.to_=t}GetFrom(){return this.from_}GetTo(){return this.to_}Step(e,t=0){const n=this.IsAscending(),{start:i,end:r}=n?{start:this.from_,end:this.to_}:{start:this.to_,end:this.from_};if("number"==typeof this.from_&&"number"==typeof this.to_)return this.from_+(this.to_-this.from_)*e+t;if("string"==typeof i&&"string"==typeof r){const s=r.length-i.length,o=n?Math.round(s*e):Math.round(s*(1-e));return i+r.substring(i.length+t,i.length+t+o)}if(Array.isArray(i)&&Array.isArray(r)){const s=r.length-i.length,o=n?Math.round(s*e):Math.round(s*(1-e));return[...i,...r.slice(i.length+t,i.length+t+o)]}if(c(this.from_)&&c(this.to_)){const s=Object.assign({},i),o=Object.keys(i),l=Object.keys(r),a=l.length-o.length,c=n?Math.round(a*e):Math.round(a*(1-e));return l.slice(o.length+t,o.length+t+c).forEach((e=>s[e]=r[e])),s}return null}IsAscending(){return"number"==typeof this.from_&&"number"==typeof this.to_?this.from_<this.to_:"string"==typeof this.from_&&"string"==typeof this.to_||Array.isArray(this.from_)&&Array.isArray(this.to_)?this.from_.length<this.to_.length:!(!c(this.from_)||!c(this.to_))&&Object.keys(this.from_).length<Object.keys(this.to_).length}}class TimedRange extends Range{constructor(e,t,n,i){super(e,t),this.duration_=n,this.delay_=i}GetDuration(){return this.duration_}GetDelay(){return this.delay_}}function h(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}function d(e=null,t=!1){let n=globalThis.InlineJS=globalThis.InlineJS||{};return(e||"").trim().split(".").forEach((e=>{e&&(n=n[e]=n[e]&&c(n[e])?n[e]:{})})),!t||c(n)?n:{}}function p(e,t){const n=d(e);Object.entries(t).forEach((([e,t])=>n[e]=t))}function m(e,t){return d("cache")[e]="function"==typeof t?t():t}function f(e,t){const n=d("cache");return n.hasOwnProperty(e)?n[e]:m(e,t)}function _(e,t,n,i){const r=f(e,i);r&&"object"==typeof r&&(r[t]=n)}function y(e,t){const n=d("cache"),i=n.hasOwnProperty(e)?n[e]:void 0;if(i&&"object"==typeof i&&t in i)return i[t]}function b(e,t,n,i,r,s){let o=f(t,n);if(o&&i(o))return r(o);const l=e();return!1===l?s():(m(t,l),r(l))}function g(e){const t=d("cache");t.hasOwnProperty(e)&&delete t[e]}function v(e,t,n){const[i="",...r]=e.trim().split(n||"-"),s=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?s(i):i)+(r||[]).map((e=>s(e))).join("")}const E={self:"self",event:"event",scope:"scope"},S="__InlineJS_ELSCOPE_KEY__";function C(e){for(;e;){const n=S in(t=e)&&"string"==typeof t[S]?t[S]:"";if(n)return[n,e];if(e===document.body)return[null,null];e=e.parentElement}var t;return[null,null]}function A(e){const[t]=C(e);return t||""}const x="__InlineJS_GLOBAL_KEY__",P="inlinejs.global.created";function I(){return d("global").base||null}function k(){return I()?Promise.resolve():new Promise((e=>window.addEventListener(P,e,{once:!0})))}const O="component";function R(){return{id:"",component:null}}function N(){m(O,{id:"",component:null})}function T(e){f(O,R).id===e&&g(O)}function G(e){return b((()=>{const t=I().FindComponentById(e);return!!t&&{id:e,component:t}}),O,R,(t=>t.id===e),(e=>e.component),(()=>null))}function w(e){return I().FindComponentByName(e)}function F(e){return I().FindComponentByRoot(e)}function D(e){return I().FindComponentByCallback(e)}function L(e){const t=A(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?G(t[1]):D((t=>t.GetRoot()===e||t.GetRoot().contains(e)))}var M=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function j(e){var{key:t}=e,n=M(e,["key"]);const i=I().RetrieveObject(Object.assign({key:t},n));return I().IsNothing(i)?t:i}function H(e){var{key:t}=e,n=M(e,["key"]);const i=I().PeekObject(Object.assign({key:t},n));return I().IsNothing(i)?t:i}function B(e,t,n){var i;return j({key:e,componentId:t||(n?null===(i=L(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function U(e){return(e=o(e))&&"object"==typeof e&&"hasAttribute"in e&&"getAttribute"in e&&"setAttribute"in e&&"removeAttribute"in e}function $(e){return e=o(e),I().IsFuture(e)?$(e.Get()):!e&&!1!==e&&0!==e||I().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function W(e,t,n){const i=t&&U(e)?e.getAttribute(t):null;return i?B(i,n,e):$(i)}function z(e){if(e=o(e),!Array.isArray(e)&&!c(e))return e;if(Array.isArray(e))return e.map((e=>z(e)));const t={};return Object.entries(e).forEach((([e,n])=>t[e]=z(n))),t}function J(e,t,n){var i;return null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e?$(e):I().StoreObject({object:e,componentId:t||(n?null===(i=L(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function q(e,t,n,i){(!t||!U(e))&&e.setAttribute(t,J(n,i,e))}function K(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function V(e,t){for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n}catch(e){break}return null}function Y(e,t){return V(e,(e=>e.classList.contains(t)))}function X(e,t){return V(e,(e=>e.hasAttribute(t)))}function Z(e,t,n){return V(e,(e=>e.getAttribute(t)===n))}function Q(e,t){return V(e,(e=>e.tagName.toLowerCase()===t.toLowerCase()))}function ee(e,t){return t&&U(e)?e.getAttribute(t):null}function te(e,t){for(const n of Array.isArray(t)?t:[t]){const t=ee(e,n);if(t)return t}return null}function ne(e,t){if(!U(e))return null;for(const n of t)if(e.hasAttribute(n))return{name:n,value:e.getAttribute(n)};return null}function ie(e,t){const n=ne(e,t);return n?n.value:null}function re(e,t){if(e.hasOwnProperty("IsBooleanAttribute")&&"function"==typeof e.IsBooleanAttribute){const n=e.IsBooleanAttribute(t);if(!1===n||!0===n)return n}return I().GetConfig().IsBooleanAttribute(t)}function se(e,t,n=!0){const[i,r]=n?l([e,t]):[e,t];if(i===r)return!0;if(Array.isArray(i)&&Array.isArray(r))return i.length==r.length&&-1==i.findIndex(((e,t)=>!se(e,r[t],n)));if(u([i,r])){const e=Object.keys(i),t=Object.keys(r);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!se(i[e],r[e],n)))}return i==r}function oe(e,t,n,i,s,o=1){let l=!1,a=()=>l=!0,c=0,u=e=>t?Math.floor(e/t):e,h=performance.now(),d=h,p=0;const m=(t,n,i)=>{e((e=>{o>1?p++%o==0?f(t,n,i,e):m(t,n,i):f(t,n,i,e)}))},f=(e,o,f,_)=>{if(l)return void f();const y=_-h;if(s&&y>=s)if(n&&(n<0||c<n)){p=0;const t=y-s;i>0&&t<i?setTimeout((()=>{h=performance.now(),m(e,o,f)}),i-t):m(e,o,f),c+=1,h=_,d=_}else r((()=>o({repeats:c,steps:s?u(s):-1,elapsed:y,duration:s})));else{m(e,o,f);const n=_-d;n>=t&&(d=t?_-n%t:_,r((()=>e({repeats:c,steps:u(y),elapsed:y,duration:s,abort:a}))))}};return new Loop(((e,t,n)=>m(e,t,n)))}const le=[50,40,30,25,20,15,10,5,4,3,2,1,0];function ae(e,t=1e3,n=0,i=0,r=!0,s=1){let o=0,l=Math.floor(t/2.2);for(const e of le)if(e<=l){o=e;break}return oe((e=>setTimeout((()=>{r?requestAnimationFrame(e):e(performance.now())}),o)),t,n,i,e,s)}function ce(e,t=1e3,n=0,i=0,r=1){return oe(requestAnimationFrame,t,n,i,e,r)}function ue(e){const t=performance.now();return e(),performance.now()-t}function he(e,t){return Object.entries(t).forEach((([t,n])=>!(t in e)&&(e[t]=n))),e}function de(e,t=!1){return(e=e?e.trim():"")?(!(e=e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"")).startsWith("/?")&&(e=e.replace(/^[\/?&=]+/,"")),t&&(e=e.split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),"")),e):""}function pe(e,t,n,i=!1){return(e=de(e,i))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function me(e,t,n){const i=(e=t?pe(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function fe({base:e,query:t},n,i,r,s=!1){let o=`${de(e,s)}?${t}`;return o=n?pe(o,n,i):de(o,s),o=r?de(`${n}/${o}`,s):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function _e(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e||11},(()=>(t||n).charAt(Math.floor(Math.random()*(t||n).length)))).join("")}function ye(e,t,n=3e3,i=1e3,s=!0){const o=n=>{if(!s)return r((()=>t(n)));const i=e.GetFrom(),o=e.GetTo();return r("number"!=typeof i||"number"!=typeof o?()=>t(n):()=>t(Number.isInteger(i)&&Number.isInteger(o)?Math.floor(n):n))},l=()=>{const t=e.Step(1);null!==t&&o(t)};if(I().IsTimedRange(e)&&(n=e.GetDuration()||n,i=e.GetDelay()||i),n<=0)return void l();const a=e.Step(0);if(null===a)return void l();let c=a;!1!==o(c)&&ce(n,i).While((({elapsed:t,abort:i})=>{const r=e.Step(t/n);null===r?null==i||i():se(r,c)||(c=r,!1===o(r)&&(null==i||i()))})).Final(l)}function be(e,t,n=3e3,i=1e3,s=!0){I().IsRange(e)?ye(e,t,n,i,s):r((()=>t(e)))}function ge(e,t,n){t&&U(e)&&e.setAttribute(t,n)}function ve(e,t="-"){t=t||"-";const n=e.replace(/([A-Z]+)/g,(e=>`${t}${e.toLowerCase()}`));return n.startsWith(t)?n.substring(1):n}function Ee(e){return e instanceof HTMLTemplateElement||"IsTemplate"in e&&"function"==typeof e.IsTemplate&&!!e.IsTemplate()}function Se(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Element&&Ee(t))return!0;return!1}function Ce(){return{level0:0,level1:0,level2:0}}function Ae(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?Ae(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function xe(e){return`${e.level2}_${e.level1}_${e.level0}`}function Pe(e,t,n,i){return Ae(e),`${t||""}${n||""}${xe(e)}${i||""}`}function Ie(e,t,n,i,r=!0){if(!i)return;const s={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(s),!r)return;const o=t.split(".");for(;o.length>2;)o.pop(),i.Add({original:s,path:o.join(".")})}function ke(e,t,n,s="",o=!0){const l="string"==typeof e?G(e):e;if(!l)return i(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),I().CreateNothing();let a=s&&n.startsWith(s)?n.substring(s.length):n;const c=I().GetMagicManager().FindHandler(a,{contextElement:t,componentId:l.GetId(),component:l});if(!c){if(!o)return I().CreateNothing();const e=s&&n.startsWith(`${s}${s}`)||!1;a=e?a.substring(s.length):a;const t=l.FindScopeByName(a);if(t)return e?t.GetRoot():t.GetProxy().GetNative();const i=w(a);if(i)return e?i.GetRoot():i.GetRootProxy().GetNative();if(e){const e=l.GetId();return t=>{const i=L(t)||G(e);if(!i)return null;const r=i.FindElementScope(t),o=r&&r.GetLocal(n.substring(s.length));return r&&!I().IsNothing(o)?o:ke(i.GetId(),t,n,`${s}${s}`,!1)}}return I().CreateNothing()}return r((()=>c({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Oe(e,t,n,i){var r;if(!(i in t))return!1;const s=G(e);return null===(r=null==s?void 0:s.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==s||s.RemoveProxy(`${n}.${i}`),Ie("delete",`${n}.${i}`,i,null==s?void 0:s.GetBackend().changes),!0}function Re(e,t,n,i){if(!e)return null;const r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!c(n))return null;const s=I().CreateChildProxy(e,t,n),o=i||G(e.GetComponentId());return o&&o.AddProxy(s),s}function Ne(e,t,n,i,r,o){var l,a,c;switch(r){case s.target:return n;case s.componentId:return e;case s.name:return i.split(".").at(-1);case s.path:return i;case s.parentPath:return i.split(".").slice(0,-1).join(".")||""}if(r in n){if(!n.hasOwnProperty(r))return n[r];const s=n[r];if(I().IsFuture(s))return s.Get();if(null===(l=I().GetCurrentProxyAccessStorage())||void 0===l||l.Put(e,`${i}.${r}`),"function"==typeof s)return s.bind(t.GetNative());const o=G(e);return o&&(null===(a=Re(o.FindProxy(i)||null,r,s,o))||void 0===a?void 0:a.GetNative())||s}if(o){const t=o(G(e)||void 0,r);if(!I().IsNothing(t))return I().IsFuture(t)?t.Get():t}return null===(c=I().GetCurrentProxyAccessStorage())||void 0===c||c.Put(e,`${i}.${r}`),null}function Te(e,t,n,i,r){var s;if(i in t&&r===t[i])return!0;const o=G(e);return null===(s=null==o?void 0:o.FindProxy(n))||void 0===s||s.RemoveChild(i),t[i]=r,null==o||o.RemoveProxy(`${n}.${i}`),Ie("set",`${n}.${i}`,i,null==o?void 0:o.GetBackend().changes),!0}class GenericProxy{constructor(e,t,n,i,s=null){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==i?void 0:i.GetPath())||"",null==i||i.AddChild(this);const o=this.componentId_,l=!!s,a=this.GetPath(),c=(e,t)=>{if(!e)return I().CreateNothing();const{context:n}=e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){const e=n.Peek(t.substring(1),I().CreateNothing());if(!I().IsNothing(e))return e}const r=n.Peek(E.self),s=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!I().IsNothing(s))return s;const o=i?ke(e,r,t,"$"):I().CreateNothing();return t&&I().IsNothing(o)&&I().GetConfig().GetUseGlobalWindow()&&t in globalThis?globalThis[t]:o},u=!l&&!this.parentPath_,h=this,d={get(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),r=i&&i.Get?i.Get(t,e):I().CreateNothing();if(!I().IsNothing(r))return r}if((u||l)&&e.hasOwnProperty(t)&&"function"==typeof e[t]&&I().GetConfig().GetWrapScopedFunctions()){const n=I().FindComponentById(o),i=null==n?void 0:n.FindScopeById(s||""),l=e[t];i&&I().PushScopeContext(i);const a=r((()=>(...e)=>l(...e)));return i&&I().PopScopeContext(),a}return Ne(o,h,e,a,t.toString(),u?c:void 0)},set(e,t,n){var i;if("symbol"==typeof t||"prototype"===t)return Reflect.set(e,t,n);if(u){const r=null===(i=I().FindComponentById(o))||void 0===i?void 0:i.GetProxyAccessHandler(),s=r&&r.Set?r.Set(t,n,e):I().CreateNothing();if(!I().IsNothing(s))return s}return Te(o,e,a,t.toString(),n)},deleteProperty(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),r=i&&i.Delete?i.Delete(t,e):I().CreateNothing();if(!I().IsNothing(r))return r}return Oe(o,e,a,t.toString())},has(e,t){var n;if("symbol"==typeof t)return Reflect.has(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler();return!i||!i.Has||!!i.Has(t,e)}return Reflect.has(e,t)}};this.native_=new window.Proxy(this.target_,d)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}Destroy(){Object.values(this.children_).forEach((e=>e.Destroy())),this.componentId_="",this.name_="",this.target_=null,this.parentPath_="",this.native_=null,this.children_={}}}class ChildProxy extends GenericProxy{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}var Ge=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function we({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:s}){const o={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);const r=t?t(n.toString(),e):e[n];return I().IsNothing(r)?Reflect.get(e,n):(!s||s.list&&!s.list.includes(n.toString())||null===(i=I().GetCurrentProxyAccessStorage())||void 0===i||i.Put(s.componentId,`${s.id}.${n.toString()}`),r)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?!1!==n(t.toString(),i,e):Reflect.set(e,t,i),deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?!1!==i(t.toString(),e):Reflect.deleteProperty(e,t),has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(r)?r.includes(t.toString()):r?r(t.toString(),e):t in e)};return new window.Proxy(e||{},o)}function Fe(e){return we(Me({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function De(){return!1}function Le(e){var{setter:t,deleter:n,lookup:i}=e,r=Ge(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||De,deleter:n||De,lookup:i||De})}function Me(e){return Le(e)}const je="InlineJS_ProxyGlobal";function He(e,t,n){const i=null==t?void 0:t.FindElementScope(n),r=null==i?void 0:i.GetId();if(!r)return["",null,null];const s=globalThis[je]=globalThis[je]||{},o=s[e]=s[e]||{};return r in o?[r,o[r],o]:(null==i||i.AddUninitCallback((()=>delete o[r])),[r,null,o])}class RootProxy extends GenericProxy{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,n)}}function Be(e){I().PushCurrentComponent(e)}function Ue(){return I().PopCurrentComponent()}function $e(){return I().PeekCurrentComponent()}function We(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>We(e,t,!0))):e.then(t)}const ze="__InlineJS_Context__",Je="InlineJS_Func_Cache";function qe(e,t,n,r=!1){const s=y(Je,t);if(s)return s;try{const n=new Function(ze,`\n with (${ze}){\n ${e(t)};\n };\n `);return _(Je,t,n,{}),n}catch(e){if(r||!(e instanceof SyntaxError))return void i(e,`InlineJs.Region<${n||"NIL"}>.GenerateFunction`)}return null}function Ke(e,t,n=!1){return qe((e=>`return (${e})`),e,t,n)}function Ve(e,t,n=!1){return qe((e=>e),e,t,n)}function Ye(e,t,n,i=[]){if("function"==typeof e){const n=e(...i);return t?t(n):n}return t?t(e):e}function Xe({componentId:e,contextElement:t,expression:n,disableFunctionCall:r=!1,waitPromise:s="recursive",voidOnly:o}){const l=e=>(e&&e(null),null);if(!(n=n.trim()))return l;let a=o?null:Ke(n,e),c=!1;if(void 0===a)return l;if(!a&&(c=!0),!a&&!(a=Ve(n,e,!0)))return l;const u=(o,l,a,c,u=!0,h)=>{var d;const p=G(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(d=null==p?void 0:p.FindElementScope(t))||void 0===d?void 0:d.IsDestroyed()))return;const{context:f=null,changes:_=null}=(null==p?void 0:p.GetBackend())||{};null==f||f.Push(E.self,t),Be(e),Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Push(e,t)));try{let e=l(m);if(I().IsFuture(e)&&(e=e.Get()),!o)return r?e:Ye(e,o,0,a);const t=e=>{if(e&&"none"!==s)return We(e,o,"recursive"===s),h||"Loading data...";o(e)};return r?t(e):Ye(e,t,0,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;i(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Pop(e,t))),Ue(),null==f||f.Pop(E.self)}};return(r,s=[],o,h)=>{try{return u(r,a.bind(t),s||[],o||{},void 0,h)}catch(h){if(h instanceof SyntaxError&&!c)return c=!0,a=Ve(n,e,!0),a?u(r,a.bind(t),s||[],o||{},!1):l(r);i(h,`InlineJs.Region<${e}>.RunFunction('${n}')`)}return l(r)}}function Ze(e){return Xe(e)}function Qe(e,t){const n=(e,t)=>We(e,t,!0);return e instanceof Loop?new Loop(((i,r)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>r(e)))}))}))})):e instanceof Promise?new Promise((i=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})):t(e)}function et(e,t,n){e instanceof Loop?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function tt(e,t){if(!t)return()=>{};const n="handler"in t?t.handler:t;if(!n)return()=>{};const i="string"==typeof e?G(e):e;if(!i)return()=>{};const r=i.SetProxyAccessHandler(n||null)||null;return()=>t&&i.SetProxyAccessHandler(r)}function nt(e){var t;const n=null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.GetProxyAccessHandler();return t=>{const i=tt(e,n||null);r(t),i()}}function it({componentId:e,proxyAccessStorage:t,callback:n,subscriptionsCallback:r,contextElement:s}){var o,l;if(t.IsEmpty())return null==r||r({}),null;let a={},c=()=>{for(const e in a){const t=G(e);if(!t)continue;const{changes:n}=t.GetBackend();a[e].forEach((e=>n.Unsubscribe(e)))}a={}},u=!1,h=()=>{u=!0};const d=t=>{const r=G(e);if(!r||u)return void c();const{changes:s}=r.GetBackend();s.PushOrigin(d);try{n({changes:t,cancel:h})}catch(t){i(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}s.PopOrigin(),u&&c()},p=t.GetGroupedEntries();for(const e in p){const t=G(e);if(!t)continue;const n=new Array,{changes:i}=t.GetBackend();p[e].forEach((e=>n.push(i.Subscribe(e.path,d)))),a[e]=n}return s&&(null===(l=null===(o=G(e))||void 0===o?void 0:o.FindElementScope(s))||void 0===l||l.AddMarkedCallback((()=>{h(),c()}))),null==r||r(a),c}class ProxyAccessStorage{constructor(){this.storage_={},this.isSuspended_=!1}Put(e,t){if(this.isSuspended_)return;const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i),s=[];for(const e in this.storage_){if(e.startsWith(r)&&(e.length===r.length||"."===e[r.length]))return;!r.startsWith(e)||r.length!==e.length&&"."!==r[e.length]||s.push(e)}this.storage_[r]={componentId:n,path:i},s.forEach((e=>delete this.storage_[e]))}Remove(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t);delete this.storage_[ProxyAccessStorage.EncodeEntryPath(n,i)]}Clear(){this.storage_={}}GetEntries(){return Object.values(this.storage_)}GetGroupedEntries(){const e={};for(const t in this.storage_){const n=this.storage_[t];!e[n.componentId]&&(e[n.componentId]=[]),e[n.componentId].push(n)}return e}GetLongestPath(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i);let s=null,o="";for(const e in this.storage_)!e.startsWith(r)||e.length!==r.length&&"."!==e[r.length]||e.length>o.length&&(s=this.storage_[e],o=e);return s}HasEntry(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i);for(const e in this.storage_)if(e.startsWith(r)&&(e.length===r.length||"."===e[r.length]))return!0;return!1}Count(){return Object.keys(this.storage_).length}IsEmpty(){return 0===Object.keys(this.storage_).length}Suspend(){this.isSuspended_=!0}Resume(){this.isSuspended_=!1}IsSuspended(){return this.isSuspended_}static ResolveDetails(e,t){return"string"==typeof e?{componentId:e,path:t||""}:e}static EncodeEntryPath(e,t){return`${e}:${t}`}}function rt({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r,cancelCallback:s}){var o;const l=nt(e),a=()=>{const i=G(e);if(!i)return;let o=!1,a=null,c=()=>{o=!0};n&&(a=n instanceof HTMLElement?i.CreateElementScope(n):i.FindElementScope(n));const u=new ProxyAccessStorage;I().UseProxyAccessStorage((()=>{t({changes:[],cancel:c})}),u);!o&&it({componentId:e,proxyAccessStorage:u,subscriptionsCallback:r,callback:e=>l((()=>t(e))),contextElement:null==a?void 0:a.GetElement()})&&s&&s(c)};(null==i?void 0:i.nextTick)?null===(o=G(e))||void 0===o||o.GetBackend().changes.AddNextTickHandler(a):a()}function st(){return I().GetConfig()}function ot(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function lt(e){return I().GetDirectiveManager().AddExpansionRule(e)}function at(e){I().GetDirectiveManager().RemoveExpansionRule(e)}function ct(e){return I().GetDirectiveManager().Expand(e)}let ut={};function ht(e,t,n){if(!e||!(e=e.trim()))return null;if((t=(t||"").trim())===e&&(t=""),e in ut)return{meta:ut[e],value:t,proxyAccessHandler:n};const i=ct(e),r=i.match(st().GetDirectiveRegex());if(!r||3!=r.length||!r[2])return null;const s=r[2].indexOf(":");let o=-1==s?[r[2]]:[r[2].substring(0,s),r[2].substring(s+1)],l="",a="";o.length>1?[l,a]=o:[a]=o;let c=a.split("."),u="";if(l?u=c[0]:l=c[0],!l)return null;c.splice(0,1);const h=l.split("-"),d={view:{original:e,expanded:i},name:{value:l,joined:h.join("."),parts:h},arg:{key:u,options:c||[]}};return ut[e]=d,{meta:d,value:t,proxyAccessHandler:n}}function dt(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function pt(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function mt(e,t,n,s=0){const o="string"==typeof e?G(e):e;if(!o)return i(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=o.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++s),l=l||I().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){const e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}if(!l)return dt(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;const c=tt(o,n.proxyAccessHandler||null);return 0==s&&!a&&o.CreateElementScope(t),r((()=>{l(Object.assign(Object.assign({},pt(n)),{componentId:o.GetId(),component:o,contextElement:t}))}),"InlineJS.DispatchDirective",t),c(),!0}function ft({element:e,callback:t,attributeCallback:n,proxyAccessHandler:r}){Array.from(e.attributes).forEach((s=>{try{n&&n(s.name,s.value||"");const e=ht(s.name,s.value||"",r);e&&t(e)}catch(t){i(t,"InlineJS.TraverseDirectives",e)}}))}function _t({component:e,element:t,options:n={},proxyAccessHandler:r}){if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||!Se(e))}(t,n))return;const s="string"==typeof e?G(e):e;if(!s)return i("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let o=0;ft({element:t,proxyAccessHandler:r,callback:n=>{mt(e,t,n,o)&&(t.removeAttribute(n.meta.view.original),++o)},attributeCallback:(e,n)=>I().DispatchAttributeProcessing({name:e,value:n,proxyAccessHandler:r,componentId:s.GetId(),component:s,contextElement:t})}),I().DispatchTextContentProcessing({componentId:s.GetId(),component:s,contextElement:t,proxyAccessHandler:r}),"OnElementScopeCreated"in t&&"function"==typeof t.OnElementScopeCreated&&s.CreateElementScope(t);const l=s.FindElementScope(t);null==l||l.ExecutePostAttributesProcessCallbacks();const a=s.GetId(),c=()=>{const e=G(a);if(e&&!e.IsDestroyed()&&!n.ignoreChildren&&!Ee(t)){e.PushSelectionScope();const n={checkTemplate:!1,checkDocument:!1},i=(t,i)=>_t({component:e,proxyAccessHandler:r,options:Object.assign(Object.assign({},n),{ignoreChildren:i}),element:t});"TraverseChildren"in t&&"function"==typeof t.TraverseChildren?t.TraverseChildren((e=>i(e,e.contains(t)))):Array.from(t.children).forEach((e=>i(e,e.contains(t)))),e.PopSelectionScope()}null==l||l.ExecutePostProcessCallbacks()};"ProcessDirectivesCallback"in t?t.ProcessDirectivesCallback(c):c()}class ChangesMonitor{constructor(){this.listeners_=new Array}AddChangesMonitor(e){this.listeners_.push(e),this.listeners_.forEach((e=>r((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}RemoveChangesMonitor(e){const t=this.listeners_.length;this.listeners_=this.listeners_.filter((t=>t!==e)),t!=this.listeners_.length&&this.listeners_.forEach((e=>r((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}NotifyListeners_(e,t){this.listeners_.forEach((n=>r((()=>n({target:e,object:()=>z(t)})))))}}class Changes extends ChangesMonitor{constructor(e){super(),this.componentId_=e,this.nextTickHandlers_=new Array,this.nextIdleHandlers_=new Array,this.nextNonIdleHandlers_=new Array,this.isScheduled_=!1,this.isIdle_=!0,this.isDestroyed_=!1,this.list_=new Array,this.subscribers_={},this.subscriberPaths_={},this.origins_=new Stack,this.recentRemovals_=null}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)}AddNextIdleHandler(e){this.nextIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)}AddNextNonIdleHandler(e){this.nextNonIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)}Schedule(){this.isDestroyed_||this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;const e=new Map,t=(t,n)=>{var i;if(null===(i=this.recentRemovals_)||void 0===i?void 0:i.includes(n))return;const r=e.get(n)||[];r.push(t),e.set(n,r)};if(0!=this.list_.length){this.list_.splice(0).forEach((e=>{const n=(e=>"original"in e?e.original.origin:e.origin)(e);Object.keys(this.subscribers_).forEach((i=>{(i===e.path||i.startsWith(`${e.path}.`))&&Object.values(this.subscribers_[i]).filter((e=>e!==n)).forEach((n=>t(e,n)))}))})),this.NotifyListeners_("list",this.list_)}const n=()=>{0!=this.nextTickHandlers_.length&&(this.nextTickHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextTick`))),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)),this.recentRemovals_=null};if(0==e.size)return this.isIdle_=!0,0!=this.nextIdleHandlers_.length&&(this.nextIdleHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextIdle`))),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)),void n();this.isIdle_=!1,e.forEach(((e,t)=>{var n;!(null===(n=this.recentRemovals_)||void 0===n?void 0:n.includes(t))&&r((()=>t(e)),`InlineJs.Region<${this.componentId_}>.Schedule`)})),0!=this.nextNonIdleHandlers_.length&&(this.nextNonIdleHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextNonIdle`))),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)),n(),this.NotifyListeners_("scheduled",this.isScheduled_),this.Schedule()})),this.NotifyListeners_("scheduled",this.isScheduled_))}Add(e){this.list_.push(e),this.Schedule(),this.NotifyListeners_("list",this.list_)}AddComposed(e,t,n){const i={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:i,path:n}):this.Add(i)}GetLastChange(e=0){return z(this.list_.at(-(e+1))||null)}PushOrigin(e){this.origins_.Push(e),this.NotifyListeners_("origins",this.origins_)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){const e=this.origins_.Pop();return this.NotifyListeners_("origins",this.origins_),e}Subscribe(e,t){var n;const i=null===(n=G(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&((this.subscribers_[e]=this.subscribers_[e]||{})[i]=t,this.subscriberPaths_[i]=e,this.NotifyListeners_("subscribers",this.subscribers_)),i||""}Unsubscribe(e,t){if(this.recentRemovals_=this.recentRemovals_||[],"string"!=typeof e){(t?[t]:Object.keys(this.subscribers_)).forEach((t=>{t in this.subscribers_&&Object.entries(this.subscribers_[t]).filter((([t,n])=>e===n)).map((([e])=>e)).forEach((e=>this.Unsubscribe_(e)))}))}else e in this.subscriberPaths_&&this.Unsubscribe_(e);this.NotifyListeners_("subscribers",this.subscribers_)}Destroy(){this.isDestroyed_||(this.isDestroyed_=!0,this.componentId_="",this.nextTickHandlers_.splice(0),this.nextIdleHandlers_.splice(0),this.nextNonIdleHandlers_.splice(0),this.isScheduled_=!1,this.isIdle_=!0,this.list_.splice(0),this.subscribers_={},this.subscriberPaths_={},this.origins_.Purge())}Unsubscribe_(e){var t;const n=this.subscriberPaths_[e];n&&n in this.subscribers_&&e in this.subscribers_[n]&&(null===(t=this.recentRemovals_)||void 0===t||t.push(this.subscribers_[n][e]),delete this.subscribers_[n][e],delete this.subscriberPaths_[e],0==Object.keys(this.subscribers_[n]).length&&delete this.subscribers_[n])}}class Context{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new Stack).Push(t)}Purge(){const e=this.record_;return this.record_={},e}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}var yt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function bt(e,t,n){const i="function"==typeof e?function(e){const t={handler:n=>{var{argKey:i}=n,r=yt(n,["argKey"]);t.extensions.hasOwnProperty(i)?t.extensions[i](Object.assign({argKey:i},r)):e(Object.assign({argKey:i},r))},extensions:{}};return t}(e):e;return i.extensions[t]=n,i}function gt(e,t){let n="",i=null;return"function"==typeof e?(n=t||"",i=e):(n=e.GetName(),i=t=>e.Handle(t)),{computedName:n,callback:i}}class DirectiveManager{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){const t=I().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(const t in this.expansionRules_){const n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){const{computedName:n,callback:i}=gt(e,t);n&&i&&(this.handlers_[n]=i)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;const t=this.handlers_[e];return"function"==typeof t?t:t.handler}AddHandlerExtension(e,t,n){const i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;const{computedName:r,callback:s}=gt(t,n);r&&s&&(this.handlers_[e]=bt(i,r,s))}RemoveHandlerExtension(e,t){const n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}const vt="InlineJS_OutsideEvent";function Et(){return globalThis[vt]=globalThis[vt]||{targetScopes:new Array,eventCallbacks:{}}}function St(e,t,n){let i=Et(),s=i.targetScopes.find((t=>t.target===e));s||(s={target:e,listeners:{}},i.targetScopes.push(s)),(Array.isArray(t)?t:[t]).forEach((e=>{e in s.listeners||(s.listeners[e]={handlers:new Array,excepts:null}),s.listeners[e].handlers.push({callback:n,excepts:null}),e in i.eventCallbacks||(i.eventCallbacks[e]=e=>{i.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>r((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function Ct(e,t,n){const i=Et(),r=i.targetScopes.find((t=>t.target===e));r&&(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners&&(n?(r.listeners[e].handlers=r.listeners[e].handlers.filter((e=>e.callback!==n)),0===r.listeners[e].handlers.length&&delete r.listeners[e]):delete r.listeners[e]),e in i.eventCallbacks&&!i.targetScopes.some((t=>e in t.listeners))&&(window.removeEventListener(e,i.eventCallbacks[e]),delete i.eventCallbacks[e])}))}function At(e,t,n){const i=Et().targetScopes.find((t=>t.target===e));i&&Object.entries(t).forEach((([e,t])=>{const r=i.listeners[e];if(!r)return;const s=Array.isArray(t)?t:[t];if(n){const e=r.handlers.find((e=>e.callback===n));e&&(e.excepts=e.excepts||[],e.excepts.push(...s))}else r.excepts=r.excepts||[],r.excepts.push(...s)}))}function xt(e){const t=Et(),n=t.targetScopes;t.targetScopes=t.targetScopes.filter((t=>t.target!==e&&!e.contains(t.target))),n.length!==t.targetScopes.length&&Object.keys(t.eventCallbacks).forEach((e=>{t.targetScopes.some((t=>e in t.listeners))||(window.removeEventListener(e,t.eventCallbacks[e]),delete t.eventCallbacks[e])}))}class ElementScope extends ChangesMonitor{constructor(e,t,n,i){super(),this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.isInitialized_=!1,this.key_="",this.locals_={},this.data_={},this.queuedAttributeChanges_=null,this.managers_={directive:null},this.callbacks_={post:new Array,postAttributes:new Array,uninit:new Array,marked:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1}}SetInitialized(){this.isInitialized_=!0}IsInitialized(){return this.isInitialized_}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetKey(e){this.NotifyListeners_("key",this.key_=e)}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t,this.NotifyListeners_("locals",this.locals_))}DeleteLocal(e){delete this.locals_[e],this.NotifyListeners_("locals",this.locals_)}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:I().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t,this.NotifyListeners_("data",this.data_))}GetData(e){return e in this.data_?this.data_[e]:I().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||(this.callbacks_.post.push(e),this.NotifyListeners_("post-process-callbacks",this.callbacks_.post))}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).splice(0).forEach((e=>r(e,"ElementScope.ExecutePostProcessCallbacks")))}AddPostAttributesProcessCallback(e){this.state_.isMarked||(this.callbacks_.postAttributes.push(e),this.NotifyListeners_("post-attributes-process-callbacks",this.callbacks_.postAttributes))}ExecutePostAttributesProcessCallbacks(){(this.callbacks_.postAttributes||[]).splice(0).forEach((e=>r(e,"ElementScope.ExecutePostAttributesProcessCallbacks")))}AddUninitCallback(e){this.state_.isDestroyed?r(e):(this.callbacks_.uninit.push(e),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit))}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e)),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit)}AddMarkedCallback(e){this.state_.isMarked?r(e):(this.callbacks_.marked.push(e),this.NotifyListeners_("marked-callbacks",this.callbacks_.marked))}RemoveMarkedCallback(e){this.callbacks_.marked=this.callbacks_.marked.filter((t=>t!==e)),this.NotifyListeners_("marked-callbacks",this.callbacks_.marked)}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e)),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>r((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;const n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(..."string"==typeof t?[t]:t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]}),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}RemoveAttributeChangeCallback(e,t){const n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;const i="string"==typeof t?[t]:t||[];0!=i.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?i.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}ExecuteAttributeChangeCallbacks(e){this.queuedAttributeChanges_?!this.queuedAttributeChanges_.includes(e)&&this.queuedAttributeChanges_.push(e):(this.queuedAttributeChanges_=[e],queueMicrotask((()=>{if(!this.queuedAttributeChanges_)return;const e=this.queuedAttributeChanges_;this.queuedAttributeChanges_=null,e.forEach((e=>{(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>r((()=>t.callback(e)))))}))})))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,this.callbacks_.marked.splice(0).forEach((e=>r(e))),!(this.element_ instanceof HTMLTemplateElement)){const t=G(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.queuedAttributeChanges_=null,this.callbacks_.uninit.splice(0).forEach((e=>r(e))),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,xt(this.element_),I().GetMutationObserver().Unobserve(this.element_);const t=G(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[S],this.isRoot_){const e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>{I().RemoveComponent(e),T(e)}))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new DirectiveManager}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{const i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Scope{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new RootProxy(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentElement;n;n=n.parentElement){try{if(t(n))return n}catch(e){}if(n===this.root_)break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}Destroy(){this.componentId_="",this.id_="",this.name_="",this.root_=document.createElement("div"),r((()=>this.proxy_.Destroy()))}}class BaseComponent extends ChangesMonitor{constructor(e,t){super(),this.id_=e,this.root_=t,this.isDestroying_=!1,this.isDestroyed_=!1,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_=new Context,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new Stack,this.selectionScopes_=new Stack,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new Changes(this.id_),this.rootProxy_=new RootProxy(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,I().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{const s=G(e);if(!s)return;const o=new Array,l=I().GetConfig().GetDirectiveRegex(),a=null==i?void 0:i.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==s?void 0:s.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{const t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&r((()=>e.callback(t)))})),o.forEach((e=>_t({element:e,component:s,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));const c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement&&!s.FindElementScope(e)){_t({component:s,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=s.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=s.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}Destroy(){this.isDestroying_||this.isDestroyed_||(this.isDestroying_=!0,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_.Purge(),r((()=>this.changes_.Destroy())),Object.values(this.scopes_).forEach((e=>r((()=>e.Destroy())))),this.scopes_={},Object.values(this.elementScopes_).forEach((e=>r((()=>e.Destroy())))),this.elementScopes_={},r((()=>this.rootProxy_.Destroy())),this.refs_={},Object.values(this.proxies_).forEach((e=>r((()=>e.Destroy())))),this.proxies_={},this.currentScope_.Purge(),this.selectionScopes_.Purge(),this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=[],Object.values(this.observers_.intersections).forEach((e=>r((()=>e.Destroy())))),this.observers_.intersections={},this.isDestroyed_=!0,this.isDestroying_=!1)}IsDestroyed(){return this.isDestroying_||this.isDestroyed_}SetReactiveState(e){this.NotifyListeners_("reactive-state",this.reactiveState_=e)}GetReactiveState(){return"default"===this.reactiveState_?st().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){const n=Pe(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}SetName(e){this.NotifyListeners_("name",this.name_=e)}GetName(){return this.name_}SetProxyAccessHandler(e){const t=this.proxyAccessHandler_;return this.proxyAccessHandler_=e,this.NotifyListeners_("proxy-access-handler",this.proxyAccessHandler_),t}GetProxyAccessHandler(){return this.proxyAccessHandler_}CreateScope(e){const t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;const n=new Scope(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),this.NotifyListeners_("scopes",this.scopes_),n}RemoveScope(e){const t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t],this.NotifyListeners_("scopes",this.scopes_))}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e),this.NotifyListeners_("current-scope",this.currentScope_)}PopCurrentScope(){const e=this.currentScope_.IsEmpty(),t=this.currentScope_.Pop();return!e&&this.NotifyListeners_("current-scope",this.currentScope_),t}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){const t=I().PeekScopeContext();if(t)return t;let n=null;for(const t in this.scopes_){const i=this.scopes_[t],r=i.GetRoot();if(r===e)return i;!r.contains(e)||n&&!n.GetRoot().contains(r)||(n=i)}return n}PushSelectionScope(){const e={set:!1};return this.selectionScopes_.Push(e),this.NotifyListeners_("selection-scopes",this.selectionScopes_),e}PopSelectionScope(){const e=this.selectionScopes_.IsEmpty(),t=this.selectionScopes_.Pop();return!e&&this.NotifyListeners_("selection-scopes",this.selectionScopes_),t}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n;if(n===this.root_)break}catch(e){break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){const t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;const n=new ElementScope(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);this.elementScopes_[n.GetId()]=n,e[S]=n.GetId();const i=t=>{const n=ne(e,[st().GetDirectiveName(t,!1),st().GetDirectiveName(t,!0)]);if(n){const t=ht(n.name,n.value);t&&mt(this,e,t)}};return["data","component","ref","locals","init"].forEach((e=>i(e))),n.SetInitialized(),"OnElementScopeCreated"in e&&"function"==typeof e.OnElementScopeCreated&&r((()=>e.OnElementScopeCreated({componentId:this.id_,component:this,scope:n}))),this.NotifyListeners_("element-scopes",this.elementScopes_),n}RemoveElementScope(e){delete this.elementScopes_[e],this.NotifyListeners_("element-scopes",this.elementScopes_)}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;const t=!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_;return t&&S in t&&"string"==typeof t[S]&&t[S]in this.elementScopes_?this.elementScopes_[t[S]]:null}FindElementLocal(e,t,n){const i=this.FindElementScope(e);if(null==i?void 0:i.HasLocal(t))return i;if(!n||!i&&"string"==typeof e)return null;const r=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_);if(!r)return null;const s=this.FindAncestor(r);return s?this.FindElementLocal(s,t,!0):null}FindElementLocalValue(e,t,n){const i=this.FindElementScope(e),r=i?i.GetLocal(t):I().CreateNothing();if(!I().IsNothing(r)||!n||!i&&"string"==typeof e)return r;const s=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_);if(!s)return r;const o=this.FindAncestor(s);return o?this.FindElementLocalValue(o,t,!0):r}SetElementLocalValue(e,t,n){var i;null===(i=this.FindElementScope(e))||void 0===i||i.SetLocal(t,n)}DeleteElementLocalValue(e,t){var n;null===(n=this.FindElementScope(e))||void 0===n||n.DeleteLocal(t)}AddProxy(e){this.proxies_[e.GetPath()]=e,this.NotifyListeners_("proxies",this.proxies_)}RemoveProxy(e){const t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&(delete this.proxies_[t],this.NotifyListeners_("proxies",this.proxies_))}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t,this.NotifyListeners_("refs",this.refs_)}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}GetRefElements(){return this.refs_}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t}),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e||t&&n.callback!==t)),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e,this.NotifyListeners_("intersection-observers",this.observers_.intersections)}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&(delete this.observers_.intersections[e],this.NotifyListeners_("intersection-observers",this.observers_.intersections))}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return I()}}function Pt(e,t){var n;null===(n="string"==typeof e?G(e):e)||void 0===n||n.PushCurrentScope(t)}function It(e){var t;return(null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function kt(e){var t;return(null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function Ot(e,t,n,i={}){var r;let s=null;if(s=e instanceof HTMLElement?(null===(r="string"==typeof n?G(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!s)return i;let o=s.GetLocal(t);return I().IsNothing(o)&&s.SetLocal(t,o=i),o}const Rt="__InlineJS_GLOBAL_COMPONENT_KEY__";function Nt(e){const t=globalThis[Rt];if(t||!1===e)return t.component;const n=document.createElement("template");return globalThis[Rt]={root:n,component:I().CreateComponent(n)},globalThis[Rt]}const Tt=300,Gt=0,wt=0,Ft=0;function Dt(e,t){if(!e||I().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;const n=I().GetConcept("animation");return{ease:e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,actor:e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,duration:e.duration||Tt,initialDelay:e.initialDelay||wt,delay:e.delay||Gt,repeats:e.repeats||Ft,allowed:e.allowed||"both"}}function Lt({componentId:e,contextElement:t,target:n,keyframes:i,duration:s=0,initialDelay:o=0,delay:l=0,repeats:a=0,callback:c,onAbort:u}){var h,d;if(s<=0)return r((()=>c(!1))),null;const p=n||t;let m=null;const f=()=>{_||(p.dispatchEvent(new CustomEvent("transition.enter")),(m=p.animate(i)).finished.then((()=>{p.dispatchEvent(new CustomEvent("transition.leave")),(-1===a||a>0)&&(a>0&&a--,setTimeout((()=>f()),l)),r((()=>c(!0)))})).catch((()=>{g(),r((()=>c(!0)))})))};let _=!1,y=!1;const b=()=>{_||(_=!0,g())},g=()=>{var t,n;if(!y)return null===(n=null===(t=G(e))||void 0===t?void 0:t.FindElementScope(p))||void 0===n||n.RemoveUninitCallback(b),p.dispatchEvent(new CustomEvent("transition.canceled")),null==m||m.cancel(),u&&r((()=>u())),y=!0,!1};return null===(d=null===(h=G(e))||void 0===h?void 0:h.FindElementScope(p))||void 0===d||d.AddUninitCallback(b),o>0?setTimeout((()=>!_&&f()),o):f(),b}function Mt({componentId:e,contextElement:t,target:n,callback:i,onAbort:s,onPass:o,reverse:l,allowRepeats:a,restore:c}){var u,h,d,p;const m=n||t;if("WaitTransition"in m&&"function"==typeof m.WaitTransition)return m.WaitTransition({componentId:e,contextElement:t,target:n,callback:i,onAbort:s,reverse:l,allowRepeats:a});const f=Dt((null===(h=null===(u=G(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===h?void 0:h.GetData("transition"))||null,l||!1);if(!f||!f.actor||!f.ease||"number"!=typeof f.duration||f.duration<=0)return i(!1),null;const _=e=>{var t;return"function"==typeof(null==f?void 0:f.actor)?null==f?void 0:f.actor(e):f&&(null===(t=f.actor)||void 0===t?void 0:t.Handle(e))},y=e=>{var t;return"function"==typeof f.ease?f.ease(e):f&&(null===(t=f.ease)||void 0===t?void 0:t.Handle(e))||0};let b=!1,g=0;const v=()=>b=!0,E=e=>l?1-e:e,S=()=>{var n,i;return null===(i=null===(n=G(e))||void 0===n?void 0:n.FindElementScope(t))||void 0===i||i.RemoveUninitCallback(v),m.dispatchEvent(new CustomEvent("transition.canceled")),s&&r((()=>s())),!1},C=(e,t,n)=>{o&&r((()=>o({duration:f.duration,elapsed:t,fraction:n,target:m,stage:e})))};null===(p=null===(d=G(e))||void 0===d?void 0:d.FindElementScope(t))||void 0===p||p.AddUninitCallback(v);const A=f.duration,x=e=>{const t=E(e/A),n=y({duration:A,elapsed:e,fraction:t}),i=0==g++?"start":"middle";_({duration:A,elapsed:e,fraction:n,elapsedFraction:t,stage:i,restore:c,target:m,reverse:!!l}),C(i,e,n)};x(0);const P=()=>{ce(A,0,a?f.repeats:0,f.delay).While((({elapsed:e})=>{if(b)return S();0==g&&(m.style.transform="",m.style.transformOrigin="50% 50%",m.dispatchEvent(new CustomEvent("transition.enter"))),x(e)})).Final((()=>{if(b)S();else{const e=E(1);_({duration:A,elapsedFraction:e,elapsed:A,target:m,stage:"end",fraction:y({duration:f.duration,elapsed:f.duration,fraction:e}),reverse:!!l}),C("end",f.duration,e),m.dispatchEvent(new CustomEvent("transition.leave")),r((()=>i(!0)))}}))};return(f.initialDelay||0)>0?setTimeout((()=>!b&&P()),f.initialDelay):P(),v}const{entries:jt,setPrototypeOf:Ht,isFrozen:Bt,getPrototypeOf:Ut,getOwnPropertyDescriptor:$t}=Object;let{freeze:Wt,seal:zt,create:Jt}=Object,{apply:qt,construct:Kt}="undefined"!=typeof Reflect&&Reflect;Wt||(Wt=function(e){return e}),zt||(zt=function(e){return e}),qt||(qt=function(e,t,n){return e.apply(t,n)}),Kt||(Kt=function(e,t){return new e(...t)});const Vt=hn(Array.prototype.forEach),Yt=hn(Array.prototype.lastIndexOf),Xt=hn(Array.prototype.pop),Zt=hn(Array.prototype.push),Qt=hn(Array.prototype.splice),en=hn(String.prototype.toLowerCase),tn=hn(String.prototype.toString),nn=hn(String.prototype.match),rn=hn(String.prototype.replace),sn=hn(String.prototype.indexOf),on=hn(String.prototype.trim),ln=hn(Object.prototype.hasOwnProperty),an=hn(RegExp.prototype.test),cn=(un=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kt(un,t)});var un;function hn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return qt(e,t,i)}}function dn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:en;Ht&&Ht(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Bt(t)||(t[i]=e),r=e)}e[r]=!0}return e}function pn(e){for(let t=0;t<e.length;t++){ln(e,t)||(e[t]=null)}return e}function mn(e){const t=Jt(null);for(const[n,i]of jt(e)){ln(e,n)&&(Array.isArray(i)?t[n]=pn(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=mn(i):t[n]=i)}return t}function fn(e,t){for(;null!==e;){const n=$t(e,t);if(n){if(n.get)return hn(n.get);if("function"==typeof n.value)return hn(n.value)}e=Ut(e)}return function(){return null}}const _n=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yn=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bn=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),gn=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vn=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),En=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Sn=Wt(["#text"]),Cn=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),An=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xn=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pn=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),In=zt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kn=zt(/<%[\w\W]*|[\w\W]*%>/gm),On=zt(/\$\{[\w\W]*/gm),Rn=zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nn=zt(/^aria-[\-\w]+$/),Tn=zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gn=zt(/^(?:\w+script|data):/i),wn=zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fn=zt(/^html$/i),Dn=zt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ln=Object.freeze({__proto__:null,ARIA_ATTR:Nn,ATTR_WHITESPACE:wn,CUSTOM_ELEMENT:Dn,DATA_ATTR:Rn,DOCTYPE_NAME:Fn,ERB_EXPR:kn,IS_ALLOWED_URI:Tn,IS_SCRIPT_OR_DATA:Gn,MUSTACHE_EXPR:In,TMPLIT_EXPR:On});const Mn=1,jn=3,Hn=7,Bn=8,Un=9,$n=function(){return"undefined"==typeof window?null:window};var Wn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$n();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Un||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,s=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:a,Element:c,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:m}=t,f=c.prototype,_=fn(f,"cloneNode"),y=fn(f,"remove"),b=fn(f,"nextSibling"),g=fn(f,"childNodes"),v=fn(f,"parentNode");if("function"==typeof l){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let E,S="";const{implementation:C,createNodeIterator:A,createDocumentFragment:x,getElementsByTagName:P}=i,{importNode:I}=r;let k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof jt&&"function"==typeof v&&C&&void 0!==C.createHTMLDocument;const{MUSTACHE_EXPR:O,ERB_EXPR:R,TMPLIT_EXPR:N,DATA_ATTR:T,ARIA_ATTR:G,IS_SCRIPT_OR_DATA:w,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:D}=Ln;let{IS_ALLOWED_URI:L}=Ln,M=null;const j=dn({},[..._n,...yn,...bn,...vn,...Sn]);let H=null;const B=dn({},[...Cn,...An,...xn,...Pn]);let U=Object.seal(Jt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,W=null,z=!0,J=!0,q=!1,K=!0,V=!1,Y=!0,X=!1,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,se=!0,oe=!1,le={},ae=null;const ce=dn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const he=dn({},["audio","video","img","source","image","track"]);let de=null;const pe=dn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let ye=_e,be=!1,ge=null;const ve=dn({},[me,fe,_e],tn);let Ee=dn({},["mi","mo","mn","ms","mtext"]),Se=dn({},["annotation-xml"]);const Ce=dn({},["title","style","font","a","script"]);let Ae=null;const xe=["application/xhtml+xml","text/html"];let Pe=null,Ie=null;const ke=i.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},Re=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ie||Ie!==e){if(e&&"object"==typeof e||(e={}),e=mn(e),Ae=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Pe="application/xhtml+xml"===Ae?tn:en,M=ln(e,"ALLOWED_TAGS")?dn({},e.ALLOWED_TAGS,Pe):j,H=ln(e,"ALLOWED_ATTR")?dn({},e.ALLOWED_ATTR,Pe):B,ge=ln(e,"ALLOWED_NAMESPACES")?dn({},e.ALLOWED_NAMESPACES,tn):ve,de=ln(e,"ADD_URI_SAFE_ATTR")?dn(mn(pe),e.ADD_URI_SAFE_ATTR,Pe):pe,ue=ln(e,"ADD_DATA_URI_TAGS")?dn(mn(he),e.ADD_DATA_URI_TAGS,Pe):he,ae=ln(e,"FORBID_CONTENTS")?dn({},e.FORBID_CONTENTS,Pe):ce,$=ln(e,"FORBID_TAGS")?dn({},e.FORBID_TAGS,Pe):mn({}),W=ln(e,"FORBID_ATTR")?dn({},e.FORBID_ATTR,Pe):mn({}),le=!!ln(e,"USE_PROFILES")&&e.USE_PROFILES,z=!1!==e.ALLOW_ARIA_ATTR,J=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,V=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,L=e.ALLOWED_URI_REGEXP||Tn,ye=e.NAMESPACE||_e,Ee=e.MATHML_TEXT_INTEGRATION_POINTS||Ee,Se=e.HTML_INTEGRATION_POINTS||Se,U=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(J=!1),te&&(ee=!0),le&&(M=dn({},Sn),H=[],!0===le.html&&(dn(M,_n),dn(H,Cn)),!0===le.svg&&(dn(M,yn),dn(H,An),dn(H,Pn)),!0===le.svgFilters&&(dn(M,bn),dn(H,An),dn(H,Pn)),!0===le.mathMl&&(dn(M,vn),dn(H,xn),dn(H,Pn))),e.ADD_TAGS&&(M===j&&(M=mn(M)),dn(M,e.ADD_TAGS,Pe)),e.ADD_ATTR&&(H===B&&(H=mn(H)),dn(H,e.ADD_ATTR,Pe)),e.ADD_URI_SAFE_ATTR&&dn(de,e.ADD_URI_SAFE_ATTR,Pe),e.FORBID_CONTENTS&&(ae===ce&&(ae=mn(ae)),dn(ae,e.FORBID_CONTENTS,Pe)),se&&(M["#text"]=!0),X&&dn(M,["html","head","body"]),M.table&&(dn(M,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,S=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(m,s)),null!==E&&"string"==typeof S&&(S=E.createHTML(""));Wt&&Wt(e),Ie=e}},Ne=dn({},[...yn,...bn,...gn]),Te=dn({},[...vn,...En]),Ge=function(e){Zt(n.removed,{element:e});try{v(e).removeChild(e)}catch(t){y(e)}},we=function(e,t){try{Zt(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Zt(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ge(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Fe=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=nn(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ae&&ye===_e&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=E?E.createHTML(e):e;if(ye===_e)try{t=(new p).parseFromString(r,Ae)}catch(e){}if(!t||!t.documentElement){t=C.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?S:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),ye===_e?P.call(t,X?"html":"body")[0]:X?t.documentElement:s},De=function(e){return A.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Me=function(e){return"function"==typeof a&&e instanceof a};function je(e,t,i){Vt(e,(e=>{e.call(n,t,i,Ie)}))}const He=function(e){let t=null;if(je(k.beforeSanitizeElements,e,null),Le(e))return Ge(e),!0;const i=Pe(e.nodeName);if(je(k.uponSanitizeElement,e,{tagName:i,allowedTags:M}),Y&&e.hasChildNodes()&&!Me(e.firstElementChild)&&an(/<[/\w!]/g,e.innerHTML)&&an(/<[/\w!]/g,e.textContent))return Ge(e),!0;if(e.nodeType===Hn)return Ge(e),!0;if(Y&&e.nodeType===Bn&&an(/<[/\w]/g,e.data))return Ge(e),!0;if(!M[i]||$[i]){if(!$[i]&&Ue(i)){if(U.tagNameCheck instanceof RegExp&&an(U.tagNameCheck,i))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(i))return!1}if(se&&!ae[i]){const t=v(e)||e.parentNode,n=g(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const r=_(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,b(e))}}}return Ge(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=en(e.tagName),i=en(t.tagName);return!!ge[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===_e?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===i||Ee[i]):Boolean(Ne[n]):e.namespaceURI===me?t.namespaceURI===_e?"math"===n:t.namespaceURI===fe?"math"===n&&Se[i]:Boolean(Te[n]):e.namespaceURI===_e?!(t.namespaceURI===fe&&!Se[i])&&!(t.namespaceURI===me&&!Ee[i])&&!Te[n]&&(Ce[n]||!Ne[n]):!("application/xhtml+xml"!==Ae||!ge[e.namespaceURI]))}(e)?(Ge(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!an(/<\/no(script|embed|frames)/i,e.innerHTML)?(V&&e.nodeType===jn&&(t=e.textContent,Vt([O,R,N],(e=>{t=rn(t,e," ")})),e.textContent!==t&&(Zt(n.removed,{element:e.cloneNode()}),e.textContent=t)),je(k.afterSanitizeElements,e,null),!1):(Ge(e),!0)},Be=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in ke))return!1;if(J&&!W[t]&&an(T,t));else if(z&&an(G,t));else if(!H[t]||W[t]){if(!(Ue(e)&&(U.tagNameCheck instanceof RegExp&&an(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&an(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&an(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(de[t]);else if(an(L,rn(n,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==sn(n,"data:")||!ue[e]){if(q&&!an(w,rn(n,F,"")));else if(n)return!1}else;return!0},Ue=function(e){return"annotation-xml"!==e&&nn(e,D)},$e=function(e){je(k.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let r=t.length;for(;r--;){const s=t[r],{name:o,namespaceURI:l,value:a}=s,c=Pe(o),u=a;let h="value"===o?u:on(u);if(i.attrName=c,i.attrValue=h,i.keepAttr=!0,i.forceKeepAttr=void 0,je(k.uponSanitizeAttribute,e,i),h=i.attrValue,!re||"id"!==c&&"name"!==c||(we(o,e),h="user-content-"+h),Y&&an(/((--!?|])>)|<\/(style|title)/i,h)){we(o,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){we(o,e);continue}if(!K&&an(/\/>/i,h)){we(o,e);continue}V&&Vt([O,R,N],(e=>{h=rn(h,e," ")}));const d=Pe(e.nodeName);if(Be(d,c,h)){if(E&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(d,c)){case"TrustedHTML":h=E.createHTML(h);break;case"TrustedScriptURL":h=E.createScriptURL(h)}if(h!==u)try{l?e.setAttributeNS(l,o,h):e.setAttribute(o,h),Le(e)?Ge(e):Xt(n.removed)}catch(t){we(o,e)}}else we(o,e)}je(k.afterSanitizeAttributes,e,null)},We=function e(t){let n=null;const i=De(t);for(je(k.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)je(k.uponSanitizeShadowNode,n,null),He(n),$e(n),n.content instanceof o&&e(n.content);je(k.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,l=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Me(e)){if("function"!=typeof e.toString)throw cn("toString is not a function");if("string"!=typeof(e=e.toString()))throw cn("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Re(t),n.removed=[],"string"==typeof e&&(oe=!1),oe){if(e.nodeName){const t=Pe(e.nodeName);if(!M[t]||$[t])throw cn("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)i=Fe("\x3c!----\x3e"),s=i.ownerDocument.importNode(e,!0),s.nodeType===Mn&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!ee&&!V&&!X&&-1===e.indexOf("<"))return E&&ne?E.createHTML(e):e;if(i=Fe(e),!i)return ee?null:ne?S:""}i&&Q&&Ge(i.firstChild);const u=De(oe?e:i);for(;l=u.nextNode();)He(l),$e(l),l.content instanceof o&&We(l.content);if(oe)return e;if(ee){if(te)for(c=x.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(H.shadowroot||H.shadowrootmode)&&(c=I.call(r,c,!0)),c}let h=X?i.outerHTML:i.innerHTML;return X&&M["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&an(Fn,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),V&&Vt([O,R,N],(e=>{h=rn(h,e," ")})),E&&ne?E.createHTML(h):h},n.setConfig=function(){Re(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Ie=null,Z=!1},n.isValidAttribute=function(e,t,n){Ie||Re({});const i=Pe(e),r=Pe(t);return Be(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&Zt(k[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Yt(k[e],t);return-1===n?void 0:Qt(k[e],n,1)[0]}return Xt(k[e])},n.removeHooks=function(e){k[e]=[]},n.removeAllHooks=function(){k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function zn({element:e,html:t,type:n="replace",component:i,processDirectives:s=!0,beforeRemove:o,afterRemove:l,beforeInsert:a,afterInsert:c,afterTransitionCallback:u,transitionScope:h,useTransition:d,sanitize:p=!0}){const m="string"==typeof i?i:(null==i?void 0:i.GetId())||"",f=()=>{if(!1===(a&&r(a,"InlineJS.InsertHtml",e)))return;const i=document.createElement("template");i.innerHTML=p?Wn.sanitize(t):t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),c&&r(c,"InlineJS.InsertHtml",e);const o=G(m);s&&o&&Array.from(e.children).forEach((e=>_t({component:o,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),(u||d)&&((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),Mt({componentId:m,contextElement:h||e,target:e,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),u&&u()}}))},_=e=>{const t=G(m),n=I();Array.from(e.children).forEach((e=>{var i;let r=null==t?void 0:t.FindElementScope(e);r||(r=null===(i=n.InferComponentFrom(e))||void 0===i?void 0:i.FindElementScope(e))?r.Destroy():_(e)}))},y=()=>{!1!==(o&&r((()=>o(!1)),"InlineJS.InsertHtml",e))&&(_(e),Array.from(e.childNodes).forEach((e=>e.remove())),l&&r(l,"InlineJS.InsertHtml",e))};if("replace"===n&&0!=e.childNodes.length){if(!1===(o&&r((()=>o(!0)),"InlineJS.InsertHtml",e)))return;u||d?((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),Mt({componentId:m,contextElement:h||e,target:e,reverse:!0,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),y(),f()}})):(y(),f())}else f()}class NextCooldown{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;const n=()=>{var t;return null===(t=this.setCallback_||e||this.callback_)||void 0===t?void 0:t()},i=nt(this.componentId_);!this.queued_&&this.initialized_?(this.queued_=!0,this.ListenNext_(null===(t=G(this.componentId_))||void 0===t?void 0:t.GetBackend().changes,(()=>i((()=>{this.queued_=!1,n()}))))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}ListenNext_(e,t){}}class NextIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextIdleHandler(t)}}class NextNonIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextNonIdleHandler(t)}}class NextTick extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextTickHandler(t)}}class MagicManager{constructor(){this.handlers_={}}AddHandler(e,t,n){let i="",r=null;"function"==typeof e?(i=t||"",r=e):(i=e.GetName(),r=t=>e.Handle(t)),i&&(this.handlers_[i]={callback:r,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class MutationObserver{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{const t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,i;if("childList"===(null==e?void 0:e.type)){const i=e=>{var t;const r=A((null===(t=L(e))||void 0===t?void 0:t.GetRoot())||null);r?n(r).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(i)};e.removedNodes.forEach(i);const r=e.target instanceof HTMLElement?A((null===(t=L(e.target))||void 0===t?void 0:t.GetRoot())||null):"";r&&n(r).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){const t=e.target instanceof HTMLElement?A((null===(i=L(e.target))||void 0===i?void 0:i.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{const i=n.target instanceof HTMLElement?A(n.target):"";if(!i||!(i in t))return;const s=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=s("add",n,t[i].added),l=s("remove",n,t[i].removed),a=s("attribute",n,t[i].attributes);(o||l||a)&&r((()=>n.handler({id:e,added:o,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){const i=Pe(this.uniqueMarkers_);return this.handlers_[i]={target:e,handler:t,whitelist:n},i}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}Destroy(){var e;this.uniqueMarkers_={level0:0,level1:0,level2:0},this.handlers_={},null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class ResizeObserver{constructor(){if(this.observer_=null,this.handlers_=new Array,globalThis.MutationObserver)try{this.observer_=new globalThis.ResizeObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((n=>{r((()=>n.handler({entry:e,observer:t})),"InlineJS.ResizeObserver")}))}))}))}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){var i;this.handlers_.push({target:e,handler:t}),null===(i=this.observer_)||void 0===i||i.observe(e,n||{box:"border-box"})}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class Config{constructor(e){if(this.options_=e,this.defaultOptions_={reactiveState:"unoptimized",directivePrefix:"hx"},this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),this.options_=he(Object.assign({},d("config",!0)),he(this.options_,this.defaultOptions_)),this.UpdateDirectiveRegex_(),!this.options_.directiveNameBuilder){const e=this.options_,t=this.defaultOptions_;e.directiveNameBuilder=(n,i=!1)=>{const r=e.directivePrefix||t.directivePrefix||"hx";return i?`data-${r}-${n}`:`${r}-${n}`}}}GetAppName(){return this.options_.appName||""}SetDirectivePrefix(e){this.options_.directivePrefix=e,this.UpdateDirectiveRegex_()}GetDirectivePrefix(){return this.options_.directivePrefix||this.defaultOptions_.directivePrefix||"hx"}SetElementPrefix(e){this.options_.elementPrefix=e}GetElementPrefix(){return this.options_.elementPrefix||this.GetDirectivePrefix()}GetDirectiveRegex(){return this.options_.directiveRegex||this.UpdateDirectiveRegex_()}GetDirectiveName(e,t){return this.options_.directiveNameBuilder?this.options_.directiveNameBuilder(e,t):e}GetElementName(e){return`${this.GetElementPrefix()}-${e}`}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.options_.reactiveState=e}GetReactiveState(){return this.options_.reactiveState||this.defaultOptions_.reactiveState||"unoptimized"}SetUseGlobalWindow(e){this.options_.useGlobalWindow=e}GetUseGlobalWindow(){return this.options_.useGlobalWindow||!1}UpdateDirectiveRegex_(){return this.options_.directiveRegex=new RegExp(`^(data-)?${this.GetDirectivePrefix()}-(.+)$`)}SetWrapScopedFunctions(e){this.options_.wrapScopedFunctions=e}GetWrapScopedFunctions(){return this.options_.wrapScopedFunctions||!1}}class NativeFetchConcept{Get(e,t){return fetch(e,t)}}class BaseGlobal extends ChangesMonitor{constructor(e,t=0){super(),this.nothing_=new Nothing,this.currentProxyAccessStorage_=null,this.storedObjects_={},this.lastStoredObjectKey_="",this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new Stack,this.scopeContext_=new Stack,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.customElements_={},this.managers_={directive:new DirectiveManager,magic:new MagicManager},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new MutationObserver,this.resizeObserver_=new ResizeObserver,this.nativeFetch_=new NativeFetchConcept,this.fetchConcept_=null,this.concepts_={},this.config_=new Config(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.NotifyListeners_("config",this.config_=e)}GetConfig(){return this.config_}SetCurrentProxyAccessStorage(e){const t=this.currentProxyAccessStorage_;return this.currentProxyAccessStorage_=e,t}GetCurrentProxyAccessStorage(){return this.currentProxyAccessStorage_}UseProxyAccessStorage(e,t){t=t||new ProxyAccessStorage;const n=this.SetCurrentProxyAccessStorage(t),i=r((()=>e(t)),"InlineJS.Global.UseProxyAccessStorage");return this.SetCurrentProxyAccessStorage(n),i}SuspendProxyAccessStorage(e){const t=this.currentProxyAccessStorage_;null==t||t.Suspend();const n=r((()=>e()));return null==t||t.Resume(),n}GenerateUniqueId(e,t){const n=Pe(this.uniqueMarkers_,"",e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}StoreObject({object:e,componentId:t,contextElement:n}){var i;if(this.lastStoredObjectKey_=`@!@${_e(18)}@!@`,n){const r=null===(i=this.FindComponentById(t||"")||this.InferComponentFrom(n))||void 0===i?void 0:i.FindElementScope(n);if(r)return r.SetLocal(this.lastStoredObjectKey_,e),this.lastStoredObjectKey_}return this.storedObjects_[this.lastStoredObjectKey_]=e,this.NotifyListeners_("stored-objects",this.storedObjects_),this.lastStoredObjectKey_}RetrieveObject(e){return this.RetrieveObject_(e,!0)}PeekObject(e){return this.RetrieveObject_(e,!1)}GetLastObjectKey(){return this.lastStoredObjectKey_}AddComponentMonitor(e){this.componentsMonitorList_.push(e),this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}RemoveComponentMonitor(e){const t=this.componentsMonitorList_.length;this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e)),t!=this.componentsMonitorList_.length&&this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}CreateComponent(e){const t=this.InferComponentFrom(e);if(t)return t;const n=new BaseComponent(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.forEach((e=>r((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),this.NotifyListeners_("components",this.components_),n}RemoveComponent(e){const t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){const e=this.components_[t];delete this.components_[t],e.Destroy(),T(t),this.componentsMonitorList_.slice(0).forEach((t=>r((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent"))),this.NotifyListeners_("components",this.components_)}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&this.components_.hasOwnProperty(e)?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}FindComponentByCallback(e){return Object.values(this.components_).find(e)||null}PushCurrentComponent(e){this.currentComponent_.Push(e),this.NotifyListeners_("current-component",this.currentComponent_)}PopCurrentComponent(){const e=this.currentComponent_.IsEmpty(),t=this.currentComponent_.Pop();return!e&&this.NotifyListeners_("current-component",this.currentComponent_),t}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}PushScopeContext(e){this.scopeContext_.Push(e),this.NotifyListeners_("scope-context",this.scopeContext_)}PopScopeContext(){const e=this.scopeContext_.IsEmpty(),t=this.scopeContext_.Pop();return!e&&this.NotifyListeners_("scope-context",this.scopeContext_),t}PeekScopeContext(){return this.scopeContext_.Peek()}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e),this.NotifyListeners_("attribute-processors",this.attributeProcessors_)}DispatchAttributeProcessing(e){this.DispatchProcessing_(this.attributeProcessors_,e,"InlineJS.Global.DispatchAttribute")}AddTextContentProcessor(e){this.textContentProcessors_.push(e),this.NotifyListeners_("text-content-processors",this.textContentProcessors_)}DispatchTextContentProcessing(e){this.DispatchProcessing_(this.textContentProcessors_,e,"InlineJS.Global.DispatchTextContent")}GetMutationObserver(){return this.mutationObserver_}GetResizeObserver(){return this.resizeObserver_}SetFetchConcept(e){this.fetchConcept_=e,this.NotifyListeners_("fetch-concept",this.fetchConcept_)}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t,this.NotifyListeners_("concepts",this.concepts_)}RemoveConcept(e){delete this.concepts_[e],this.NotifyListeners_("concepts",this.concepts_)}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}AddCustomElement(e,t){this.customElements_.hasOwnProperty(e)||(this.customElements_[e]=t,customElements.define(this.config_.GetElementName(e),t),this.NotifyListeners_("custom-elements",this.customElements_))}FindCustomElement(e){return this.customElements_.hasOwnProperty(e)?this.customElements_[e]:null}CreateChildProxy(e,t,n){return new ChildProxy(e,t,n)}CreateFuture(e){return new Future(e)}IsFuture(e){return e instanceof Future}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof Nothing}CreateRange(e,t){return new Range(e,t)}IsRange(e){return e instanceof Range}CreateTimedRange(e,t,n,i){return new TimedRange(e,t,n,i)}IsTimedRange(e){return e instanceof TimedRange}RetrieveObject_({key:e,componentId:t,contextElement:n},i){if(n){const r=this.FindComponentById(t||"")||this.InferComponentFrom(n);if(r){const t=r.FindElementLocal(n,e,!0);if(t){const n=t.GetLocal(e);return i&&(t.DeleteLocal(e),e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_="")),n}}}if(this.storedObjects_.hasOwnProperty(e)){const t=this.storedObjects_[e];return i&&(e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_=""),delete this.storedObjects_[e],this.NotifyListeners_("stored-objects",this.storedObjects_)),t}return this.CreateNothing()}DispatchProcessing_(e,t,n){const i=tt(t.component||this.FindComponentById(t.componentId),t.proxyAccessHandler||null);e.forEach((e=>{r((()=>e(t)),n,t.contextElement)})),i()}}function Jn(e,t=0){const n=new BaseGlobal(e,t);return N(),p("global",{base:n}),window.dispatchEvent(new CustomEvent(P)),n}function qn(e,t=0){return I()||Jn(e,t)}const Kn=/\{\{\s*(.+?)\s*\}\}/g,Vn=/\{\{.+?\}\}/;function Yn(e,t,n,i,r){const s=[...n.matchAll(i)];if(0===s.length)return void r(0,n,I().CreateNothing(),"");let o=0;s.forEach(((i,l)=>{var a,c;const u=i[1],h=n.substring(o,i.index);o=(i.index||0)+i[0].length;const d=l<s.length-1?"":n.substring(o);let p=!0,m=null;rt({componentId:e,contextElement:t,callback:()=>{let n=0;Ze({componentId:e,contextElement:t,expression:u})((e=>{const t=++n;be(e,(e=>{if(t!==n)return!1;r(l,p?h:"",e,p?d:""),p=!1}))}))},cancelCallback:e=>m=e}),null===(c=null===(a=G(e))||void 0===a?void 0:a.FindElementScope(t))||void 0===c||c.AddUninitCallback((()=>null==m?void 0:m()))}))}function Xn({componentId:e,contextElement:t,text:n,testRegex:i,matchRegex:r,storeObject:s,handler:o}){if(!(i||Vn).test(n))return o(n);const l=[...n.matchAll(r||Kn)].length;if(0===l)return o(n);const a=new Array;let c=0;Yn(e,t,n,r||Kn,((n,i,r,u)=>{const h=3*n;h>=a.length?(a.push(i),I().IsNothing(r)?a.push(""):a.push(s?J(r,e,t):$(r)),a.push(u),c++,c===l&&o(a.join(""))):(a[h+1]=s?J(r,e,t):$(r),o(a.join("")))}))}function Zn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s}){if("string"==typeof n)return i&&Xn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s});[...t.childNodes].forEach((n=>{if(n.parentNode&&n.nodeType===Node.TEXT_NODE&&n.textContent&&(r||Vn).test(n.textContent)){const i=n.textContent,r=document.createDocumentFragment(),o=new Array;Yn(e,t,i,s||Kn,((e,t,n,i)=>{if(t&&r.appendChild(document.createTextNode(t)),!I().IsNothing(n))if(e>=o.length){const e=document.createTextNode("");r.appendChild(e),e.textContent=$(n),o.push(e)}else o[e].textContent=$(n);i&&r.appendChild(document.createTextNode(i))})),n.parentNode.replaceChild(r,n)}}))}function Qn({componentId:e,contextElement:t,name:n,value:i}){Xn({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e),storeObject:!0})}function ei({componentId:e,contextElement:t}){Zn({componentId:e,contextElement:t})}function ti(e){const t=e&&L(e);if(t)return void _t({component:t,element:e});const n=I(),i=n.GetConfig(),r=[i.GetDirectiveName("data",!0),i.GetDirectiveName("data",!1)],s=r.map((e=>`[${e}]`)).join(", "),o=new Set;e?(r.some((t=>e.hasAttribute(t)))&&o.add(e),e.querySelectorAll(s).forEach((e=>o.add(e)))):document.querySelectorAll(s).forEach((e=>o.add(e))),o.forEach((e=>{r.some((t=>e.hasAttribute(t)))&&document.contains(e)&&_t({component:n.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}function ni(e){qn();const t=d();t.hasOwnProperty("disableAutoBootstrap")&&t.disableAutoBootstrap||setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{ti(e)})):ti(e)}),0)}function ii(e,t){let n="",i=null;if("function"==typeof e)if(0===e.length){const t=e();t&&({name:n,callback:i}=t)}else n=e("name"),i=e("callback");else c(e)?({name:n,callback:i}=e):I().GetDirectiveManager().AddHandler(e);n&&i&&(t?I().GetDirectiveManager().AddHandlerExtension(t,i,n):I().GetDirectiveManager().AddHandler(i,n))}function ri(e,t){return{name:e,callback:t}}function si(e,t,n,i,r){const s=I().GetConfig().GetDirectiveName("on"),o=(r||[]).join("."),l=ht(o?`${s}:${n}.${o}`:`${s}:${n}`,i||"");return!!l&&mt(e,t,l)}const oi=["bind","event","on"];function li({component:e,contextElement:t,key:n,event:i,expression:r,options:s,defaultEvent:o,eventWhitelist:l=[],optionBlacklist:a}){const c=()=>a?null==s?void 0:s.filter((e=>!a.includes(e))):s,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?si(e,t,u(i),r,c()):!(!o||i!==o&&!oi.includes(i))&&si(e,t,u(o),r,c())}function ai(e,t,n){const i=I().GetConfig().GetDirectiveName(t,!1),r=I().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function ci({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:s,useEffect:o=!0}){let l=0,a=Ze({componentId:e,contextElement:t,expression:i}),u=(e,t)=>{Qe(e,(e=>{t==l&&(n?r([n,e]):c(e)?Object.entries(e).forEach(r):s&&("string"==typeof e||Array.isArray(e))&&s("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};o?rt({componentId:e,contextElement:t,callback:()=>a((e=>u(e,++l)))}):a((e=>u(e,l)))}const ui=Array.from(Array(100).keys()).map((e=>e/100));function hi(e){const t={root:null,rootMargin:"0px",threshold:0};return c(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=ui),t}class IntersectionObserver{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;const n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{r((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),hi(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_.forEach((({target:e})=>{var t;return null===(t=this.observer_)||void 0===t?void 0:t.unobserve(e)})),this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}function di(e,t=0){return e&&e.match(/^[0-9\.]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseFloat(e):parseFloat(e):t}function pi({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){const s=Array.isArray(e)?e:[e],o=e=>("number"==typeof n?n:n&&n(e))||0;for(let n=0;n<t.length;++n){const l=t[n],a=s.find((e=>e&&l in e));if(a){if(!i||!0!==i({options:e,list:t,option:l,index:n}))if("number"==typeof a[l]){const e=n<t.length-1?t[n+1].trim():"";e&&/^[0-9]/.test(e)?(a[l]=di(e,o(l)),++n):a[l]=o(l)}else"boolean"==typeof a[l]&&(a[l]=!0)}else r&&r({options:e,list:t,option:l,index:n})}return e}function mi({componentId:e,component:t,contextElement:n,expression:i,argOptions:s,callback:o,options:l,defaultOptionValue:a,useEffect:c}){let u=Ze({componentId:e,contextElement:n,expression:i}),h=pi({options:l||{lazy:!1,ancestor:-1,threshold:-1},list:s,defaultNumber:0===a?0:a||-1}),d=()=>u((e=>We(e,o))),p=()=>!1===c?d():rt({componentId:e,contextElement:n,callback:d});if(h.lazy){const i=t||G(e),s={root:h.ancestor<0?null:null==i?void 0:i.FindAncestor(n,h.ancestor),threshold:h.threshold<0?0:h.threshold},o=i?new IntersectionObserver(i.GenerateUniqueId("intob_"),s):null;if(o){const t=null==i?void 0:i.GetProxyAccessHandler();null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:n,entry:i}={})=>{var s;if(null==i?void 0:i.isIntersecting){const i=tt(e,t||null);if(n){const t=G(e);null===(s=null==t?void 0:t.FindIntersectionObserver(n))||void 0===s||s.Destroy(),null==t||t.RemoveIntersectionObserver(n)}r(p),i()}}))}else p()}else p()}function fi(e){let t,n="",i=null;if("function"==typeof e)if(0===e.length){const r=e();r&&({name:n,callback:i,onAccess:t}=r)}else n=e("name"),i=e("callback"),t=e("access");else c(e)?({name:n,callback:i,onAccess:t}=e):I().GetMagicManager().AddHandler(e);n&&i&&I().GetMagicManager().AddHandler(i,n,t)}function _i(e,t,n){return{name:e,callback:t,onAccess:n}}function yi(e){return e.startsWith(":")?I().GetConfig().GetDirectiveName("bind")+e:null}function bi(e){return e.startsWith(".")?e.replace(".",I().GetConfig().GetDirectiveName("class:")):null}function gi(e){return e.startsWith("@")?e.replace("@",I().GetConfig().GetDirectiveName("on:")):null}function vi(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}function Ei(e=!0){e&&ni(),I().AddAttributeProcessor(Qn),I().AddTextContentProcessor(ei)}function Si(){p("global",{bootstrap:ti,waitForGlobal:k,get:I,create:Jn,traverseInterpolationReplacements:Yn,interpolateText:Xn,interpolate:Zn,processDirectives:_t})}function Ci(){p("utilities",{beginsWith:h,endsWith:K,toCamelCase:v,toSnakeCase:ve,insertHtml:zn,findAncestor:V,getAttribute:te,findFirstAttribute:ne,findFirstAttributeValue:ie,setAttribute:ge,isBooleanAttribute:re,supportsAttributes:U,getTarget:o,getTargets:l,isEqual:se,isObject:c,toString:$,deepCopy:z,mergeObjects:he,tidyPath:de,pathToRelative:pe,splitPath:me,joinPath:fe,getRandomString:_e,measureCallback:ue,encodeAttribute:q,decodeAttribute:W,encodeValue:J,decodeValue:B,isTemplate:Ee,isInsideTemplate:Se})}function Ai(){p("values",{future:Future,loop:Loop,nothing:Nothing,stack:Stack})}function xi(){p("version",{major:1,minor:4,patch:3,get value(){return`${this.major}.${this.minor}.${this.patch}`},toString(){return this.value}})}function Pi(){Ei(),Si(),Ci(),Ai(),xi()}},204:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDetailElementCompact=t.StripeDetailElement=void 0;const r=n(543),s=n(9);class StripeDetailElement extends s.StripeGenericField{constructor(){super(...arguments),this.input=null,this.name="",this.value=""}ToggleFocus(e){const t=this.GetInput_();t&&(e?t.focus():t.blur())}Reset(){const e=this.GetInput_();e&&(e.value="")}AddDetails(e){const t=this.GetInput_();if(!this.name||!(null==t?void 0:t.value)&&!this.value)return;e.billingDetails=e.billingDetails||{};const n=this.name.split(".");if(1==n.length)e.billingDetails[this.name]=(null==t?void 0:t.value)||this.value;else{let i=e.billingDetails;n.slice(0,-1).forEach((e=>{i=i[e]=i[e]||{}})),i[n.slice(-1)[0]]=(null==t?void 0:t.value)||this.value}}GetInput_(){return this.input||this.querySelector("input")}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],StripeDetailElement.prototype,"input",void 0),i([(0,r.Property)({type:"string"})],StripeDetailElement.prototype,"name",void 0),i([(0,r.Property)({type:"string",checkStoredObject:!0})],StripeDetailElement.prototype,"value",void 0),t.StripeDetailElement=StripeDetailElement,t.StripeDetailElementCompact=function(){(0,r.RegisterCustomElement)(StripeDetailElement,"stripe-detail")}},449:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeFieldElementCompact=t.StripeFieldElement=void 0;const s=n(867),o=n(543),l=n(9);class StripeFieldElement extends l.StripeGenericField{constructor(){super(),this.stripeField_=null,this.isReady_=!1,this.isComplete_=!1,this.lastError_=null,this.readyWaiters_=new Array,this.changeListeners=new Array,this.options=null,this.type="",this.oncustomready="",this.oncustomcomplete="",this.oncustomerror=""}IsInteractive(){return!0}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}AddChangeListener(e){this.changeListeners.push(e)}RemoveChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)}ToggleFocus(e){var t,n;this.stripeField_&&(e?null===(t=this.stripeField_)||void 0===t||t.focus():null===(n=this.stripeField_)||void 0===n||n.blur())}Reset(){var e;this.stripeField_&&(null===(e=this.stripeField_)||void 0===e||e.clear())}AddDetails(e){this.stripeField_&&("card"===this.type||"number"===this.type||"cardNumber"===this.type)&&(e.method=this.stripeField_)}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.WaitInstance().then((e=>{var t;if(!(null==e?void 0:e.stripe)||!e.elements)return;let n="";["number","expiry","cvc"].includes(this.type)?n=`card${this.type.substring(0,1).toUpperCase()}${this.type.substring(1)}`:["card","cardNumber","cardExpiry","cardCvc","postalCode","paymentRequestButton","iban","idealBank"].includes(this.type)&&(n=this.type),n?(this.stripeField_=e.elements.create(n,this.options||(null===(t=this.GetStripe_())||void 0===t?void 0:t.options)||void 0),this.stripeField_.on("ready",(()=>{this.isReady_=!0,this.oncustomready&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))})),this.stripeField_.on("change",(e=>{((null==e?void 0:e.error)||null)!==this.lastError_&&(this.lastError_=(null==e?void 0:e.error)||null,this.oncustomerror&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomerror,disableFunctionCall:!1})(void 0,[this.lastError_],{error:this.lastError_}),this.changeListeners.forEach((e=>(0,s.JournalTry)((()=>e("error",this.lastError_)))))),((null==e?void 0:e.complete)||!1)!=this.isComplete_&&(this.isComplete_=(null==e?void 0:e.complete)||!1,this.oncustomcomplete&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomcomplete,disableFunctionCall:!1})(void 0,[this.isComplete_],{complete:this.isComplete_}),this.changeListeners.forEach((e=>(0,s.JournalTry)((()=>e("complete",this.isComplete_))))))})),this.stripeField_.mount(this)):(0,s.JournalWarn)("The element type provided is invalid.","StripeField.Mount",this)})).catch((e=>(0,s.JournalError)(e,"StripeField.Mount",this)))})),n.AddUninitCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.RemoveStripeField(this),this.stripeField_=null}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeFieldElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"type",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomready",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomcomplete",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomerror",void 0),t.StripeFieldElement=StripeFieldElement,t.StripeFieldElementCompact=function(){(0,o.RegisterCustomElement)(StripeFieldElement,"stripe-field")}},9:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeGenericField=void 0;const s=n(867),o=n(543);class StripeGenericField extends o.CustomElement{constructor(){super(...arguments),this.stripe=null}IsInteractive(){return!1}WaitReady(){return Promise.resolve()}AddChangeListener(e){}RemoveChangeListener(e){}ToggleFocus(e){}Reset(){}AddDetails(e){}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),(()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.AddStripeField(this),t&&t()}))}GetStripe_(){return this.stripe||(0,s.FindAncestor)(this,(e=>"AddStripeField"in e))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeGenericField.prototype,"stripe",void 0),t.StripeGenericField=StripeGenericField},113:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentMenthodElementCompact=t.StripePaymentMenthodElement=void 0;const r=n(543),s=n(9);class StripePaymentMenthodElement extends s.StripeGenericField{constructor(){super({isTemplate:!0,isHidden:!0}),this.value=""}AddDetails(e){this.value&&(e.method=this.value)}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],StripePaymentMenthodElement.prototype,"value",void 0),t.StripePaymentMenthodElement=StripePaymentMenthodElement,t.StripePaymentMenthodElementCompact=function(){(0,r.RegisterCustomElement)(StripePaymentMenthodElement,"stripe-payment-method")}},372:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeElementCompact=t.StripeElement=void 0;const s=n(867),o=n(543);class StripeElement extends o.CustomElement{constructor(){super(),this.stripe_=null,this.elements_=null,this.mounting_=!1,this.mounted_=!1,this.isReady_=!1,this.readyWaiters_=new Array,this.fields_=null,this.readyFields_=null,this.instanceWaiters_=new Array,this.interactiveFields_=null,this.completeFields_=null,this.errorFields_=null,this.options=null,this.publicKey="",this.oncustomready="",this.oncustomcomplete="",this.oncustomerror="",this.defer=!1,this.focusnext=!1}AddStripeField(e){this.fields_=this.fields_||[],this.fields_.push(e),e.WaitReady().then((()=>{this.readyFields_=this.readyFields_||[],this.readyFields_.push(e),e.IsInteractive()&&(this.interactiveFields_=this.interactiveFields_||[],this.interactiveFields_.push(e)),this.fields_&&this.readyFields_&&this.fields_.length<=this.readyFields_.length&&(0,s.JournalTry)((()=>{this.isReady_=!0,this.oncustomready&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))}))})),e.AddChangeListener(((t,n)=>{if("complete"===t){let t=!1;this.completeFields_=this.completeFields_||[],n&&!this.completeFields_.includes(e)?(this.completeFields_.push(e),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length)):!n&&this.completeFields_.includes(e)&&(this.completeFields_=this.completeFields_.filter((t=>t!==e)),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length-1)),t&&this.oncustomcomplete&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomcomplete,disableFunctionCall:!1})(void 0,[!!n],{complete:!!n}),n&&this.focusnext&&this.FocusNextField(e)}else if("error"===t){let t=!1;this.errorFields_=this.errorFields_||[],this.errorFields_.push(e),this.errorFields_=this.errorFields_||[],n&&!this.errorFields_.includes(e)?(this.errorFields_.push(e),t=1==this.errorFields_.length):!n&&this.errorFields_.includes(e)&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)),t=0==this.errorFields_.length),t&&this.oncustomerror&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomerror,disableFunctionCall:!1})(void 0,[n],{error:n})}}))}RemoveStripeField(e){this.fields_&&(this.fields_=this.fields_.filter((t=>t!==e))),this.readyFields_&&(this.readyFields_=this.readyFields_.filter((t=>t!==e))),this.interactiveFields_&&(this.interactiveFields_=this.interactiveFields_.filter((t=>t!==e))),this.completeFields_&&(this.completeFields_=this.completeFields_.filter((t=>t!==e))),this.errorFields_&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)))}FocusNextField(e){if(this.fields_){const t=this.fields_.indexOf(e);t>=0&&t<this.fields_.length-1&&this.fields_[t+1].ToggleFocus(!0)}}GetDetails(){return{stripe:this.stripe_,elements:this.elements_}}GetInstance(){return this.stripe_}WaitInstance(){return new Promise((e=>{this.mounted_?e(this.GetDetails()):this.instanceWaiters_.push((()=>e(this.GetDetails())))}))}Mount(){this.mounted_||this.mounting_||(this.mounting_=!0,this.LoadResources().then((()=>{this.mounting_=!1,this.mounted_=!0,this.stripe_=Stripe(this.publicKey),this.elements_=this.stripe_.elements(),this.instanceWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))})))}Pay(e,t=!1){return this.PayOrSetup_(!0,e,t)}Setup(e){return this.PayOrSetup_(!1,e)}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>!this.defer&&this.Mount())),n.AddUninitCallback((()=>this.stripe_=null))}PayOrSetup_(e,t,n=!1){return new Promise(((i,r)=>{this.WaitInstance().then((s=>{var o,l;if(!(null==s?void 0:s.stripe))return i(!1);const a={};if(null===(o=this.fields_)||void 0===o||o.forEach((e=>e.AddDetails(a))),!a.method)return i(!1);let c;c="string"==typeof a.method?{payment_method:a.method}:{payment_method:{card:a.method,billing_details:a.billingDetails}},e?((null===(l=a.billingDetails)||void 0===l?void 0:l.email)&&(c.receipt_email=a.billingDetails.email),n&&(c.setup_future_usage="off_session"),s.stripe.confirmCardPayment(t,c).then(i).catch(r)):s.stripe.confirmCardSetup(t,c).then(i).catch(r)})).catch(r)}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"publicKey",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncustomready",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncustomcomplete",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncustomerror",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"defer",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"focusnext",void 0),t.StripeElement=StripeElement,t.StripeElementCompact=function(){(0,o.RegisterCustomElement)(StripeElement,"stripe")}},0:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const i=n(867),r=n(372),s=n(449),o=n(204),l=n(113);t.InlineJSStripe=function(){(0,i.WaitForGlobal)().then((()=>{(0,r.StripeElementCompact)(),(0,s.StripeFieldElementCompact)(),(0,o.StripeDetailElementCompact)(),(0,l.StripePaymentMenthodElementCompact)()}))}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(0,n(0).InlineJSStripe)()})();
|
2
|
+
(()=>{"use strict";var e={543:(e,t,n)=>{n.r(t),n.d(t,{CustomElement:()=>CustomElement,GetGlobalPropertyScope:()=>o,GetProperties:()=>l,GetPropertyScope:()=>a,InlineJSElement:()=>b,NativeElement:()=>NativeElement,NativeElementCompact:()=>d,Property:()=>c,Register:()=>y,RegisterCustomElement:()=>r,ResourceElement:()=>ResourceElement,ResourceElementCompact:()=>m,ResourceTargetElement:()=>ResourceTargetElement,ResourceTargetElementCompact:()=>_});var i=n(936);function r(e,t){let n=(0,i.ToSnakeCase)(t||e.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,e)}const s=(0,i.RandomString)();function o(){return s}function l(){return(0,i.GetGlobalScope)(`customProperties.${s}`)}function a(e,t){return t||("constructor"in e?t=e.constructor.name:("function"==typeof e||"object"==typeof e&&"name"in e)&&(t=e.name)),t||""}function c(e){return function(t,n,r){let s="",o=null;const c=e&&"initial"in e?e.initial:void 0;(void 0!==c||!r&&(null==e?void 0:e.update))&&(o="boolean"===(null==e?void 0:e.type)?(e,t)=>{e&&"false"!==e?t.setAttribute(s,s):t.hasAttribute(s)&&t.removeAttribute(s)}:(e,t)=>{t.setAttribute(s,e)});let u=null,h={name:"",type:(null==e?void 0:e.type)||"string",spread:(null==e?void 0:e.spread)||"",update:(null==e?void 0:e.update)||!1,initial:c,checkStoredObject:(null==e?void 0:e.checkStoredObject)||!1,delimiter:(null==e?void 0:e.delimiter)||",",handler:null,setInitial:o};if(r){if("function"==typeof r.value&&!r.get&&!r.set&&((null==e?void 0:e.name)||/^Update.+Property/.test(r.value.name))){const t=r.value;s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||r.value.name.replace(/^Update(.+)Property/,"$1")),u=(e,n)=>t.call(n,e)}}else s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||n),u=(e,t)=>t[n]=e;if(s&&u){h.name=s,h.handler=u;const e=a(t);let n=l();n[e]=n[e]||new Array,n[e].push(h)}}}var u=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},h=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};class CustomElement extends HTMLElement{constructor(e={}){super(),this.options_=e,this.componentId_="",this.storedProxyAccessHandler_=null,this.resources_=new Array,this.loadedResources_=null,this.loadingResources_=!1,this.queuedResourceHandlers_=new Array,this.nativeElement_=null,this.nativeElements_=new Array,this.nativeAttributesBlacklist_=new Array,this.nativeAttributesWhitelist_=new Array,this.propertyScopes_=new Array,this.instanceProperties_=new Array,this.instancePropertyNames_=new Array,this.attributeChangeHandlers_={},this.spreads_={},this.storedObjects_={},this.booleanAttributes_=new Array,this.nonBooleanAttributes_=new Array,(this.options_.isTemplate||this.options_.isHidden)&&(this.style.display="none"),setTimeout((()=>{if(this.componentId_)return;if((0,i.InferComponent)(this))return;const e=(0,i.GetConfig)(),t=[e.GetDirectiveName("data",!1),e.GetDirectiveName("data",!0)];(0,i.FindAncestor)(this,(e=>!!(0,i.IsCustomElement)(e)||!!t.some((t=>e.hasAttribute(t)))))||(this.setAttribute(t[0],""),(0,i.BootstrapAndAttach)(this))}),0)}UpdateComponentProperty(e){var t;const n=(0,i.FindComponentById)(this.componentId_);n&&(e=(e||"").trim(),null===(t=n.FindScopeByRoot(this))||void 0===t||t.SetName(e),n.GetRoot()===this&&n.SetName(e))}AddResource(e){this.resources_.push(e)}RemoveResource(e){this.resources_=this.resources_.filter((t=>t!==e))}LoadResources(){return this.loadingResources_?new Promise(((e,t)=>{this.queuedResourceHandlers_.push((()=>{this.loadedResources_?e(this.loadedResources_):t()}))})):this.loadedResources_?Promise.resolve(this.loadedResources_):(this.loadingResources_=!0,new Promise(((e,t)=>{const n=new Array,r=new Array,s=t=>{this.loadingResources_=!1,this.loadedResources_=t,this.queuedResourceHandlers_.forEach((e=>e())),this.queuedResourceHandlers_=[],e(t)};if(this.resources_.forEach((e=>{"string"==typeof e?r.push(e):"LoadTargetResources"in e?n.push(e.LoadTargetResources()):"GetResource"in e?r.push(e.GetResource()):r.push(e)})),r.length>0){const e=(0,i.GetGlobal)().GetConcept("resource");if(e){const t=e.Get({items:r,attributes:this.GetResourceLoadAttributes_(),concurrent:this.IsConcurrentResourceLoad_()});n.push(t)}}0==n.length?s([]):Promise.all(n).then(s).catch(t)})))}AddNativeElement(e){this.nativeElements_.push(e),this.CopyNativeElements_(e)}RemoveNativeElement(e){this.nativeElements_=this.nativeElements_.filter((t=>t!==e))}AddBooleanAttribute(e){Array.isArray(e)?this.booleanAttributes_.push(...e):this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=Array.isArray(e)?this.booleanAttributes_.filter((t=>!e.includes(t))):this.booleanAttributes_.filter((t=>t!==e))}AddNonBooleanAttribute(e){Array.isArray(e)?this.nonBooleanAttributes_.push(...e):this.nonBooleanAttributes_.push(e)}RemoveNonBooleanAttribute(e){this.nonBooleanAttributes_=Array.isArray(e)?this.nonBooleanAttributes_.filter((t=>!e.includes(t))):this.nonBooleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return!this.nonBooleanAttributes_.includes(e)&&(!!this.booleanAttributes_.includes(e)||null)}IsTemplate(){return this.options_.isTemplate||!1}OnElementScopeCreated(e){this.HandleElementScopeCreated_(e)}OnElementScopeMarked(e){this.HandleElementScopeMarked_(e)}OnElementScopeDestroyed(e){this.HandleElementScopeDestroyed_(e)}EvaluateExpression(e,t){return this.EvaluateWithStoredProxyAccessHandler((0,i.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:e,disableFunctionCall:null==t?void 0:t.disableFunctionCall,waitPromise:null==t?void 0:t.waitPromise,voidOnly:null==t?void 0:t.voidOnly}),null==t?void 0:t.callback,null==t?void 0:t.params,null==t?void 0:t.contexts)}EvaluateWithStoredProxyAccessHandler(e,t,n,i){if(!this.storedProxyAccessHandler_)return e(t,n,i);let r;return this.storedProxyAccessHandler_((()=>r=e(t,n,i))),r}AddPropertyScope_(e){this.propertyScopes_.push(a(CustomElement,e))}FindProperty_(e){return this.instanceProperties_.find((t=>t.name===e))}GetAllProperties_(){let e=new Array,t=l();for(let n of this.propertyScopes_)t.hasOwnProperty(n)&&e.push(...Object.values(t[n]));return e}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=h(e,["scope"]);this.HandleElementScopeCreatedPrefix_(Object.assign({scope:n},i)),n.AddPostAttributesProcessCallback((()=>{this.HandlePostAttributesProcess_(),null==t||t()})),n.AddPostProcessCallback((()=>this.HandlePostProcess_())),n.AddAttributeChangeCallback((e=>e&&this.AttributeChanged_(e))),this.HandleElementScopeCreatedPostfix_(Object.assign({scope:n},i))}HandleElementScopeCreatedPrefix_({componentId:e}){this.componentId_=e,this.propertyScopes_=this.ComputePropertyScopes_(),this.storedProxyAccessHandler_=(0,i.StoreProxyHandler)(e),(this.instanceProperties_=this.GetAllProperties_()).forEach((e=>{"boolean"===e.type&&this.booleanAttributes_.push(e.name);const t=e.spread&&(0,i.ToSnakeCase)(e.spread);t&&this.spreads_.hasOwnProperty(t)?this.spreads_[t].push(e.name):t&&(this.spreads_[t]=[e.name])})),this.instancePropertyNames_=this.instanceProperties_.map((e=>e.name))}HandleElementScopeCreatedPostfix_(e){}HandleElementScopeMarked_(e){}HandleElementScopeDestroyed_(e){this.nativeElement_=null,this.storedProxyAccessHandler_=null}HandlePostProcess_(){this.ShouldLoadResources_()&&this.LoadResources()}HandlePostAttributesProcess_(){this.HandlePostAttributesProcessPrefix_(),this.instanceProperties_.forEach((e=>{void 0!==e.initial&&e.setInitial&&!this.hasAttribute(e.name)&&e.setInitial(this.EncodeValue_(e.initial,e.type),this)})),this.InitializeStateFromAttributes_(),this.HandlePostAttributesProcessPostfix_()}HandlePostAttributesProcessPrefix_(){}HandlePostAttributesProcessPostfix_(){}InitializeStateFromAttributes_(e){let t=Array.from(this.attributes);e&&(t=t.filter((({name:t})=>e.includes(t)))),t.forEach((({name:e})=>this.AttributeChanged_(e)))}EncodeValue_(e,t){return"boolean"===t?e?"true":"false":"json"===t?JSON.stringify(e):"array"===t?(e||[]).join(","):t.startsWith("array:")?(e||[]).map((e=>this.EncodeValue_(e,t.substring(6)))).join(","):"date"===t?(e||new Date).toString():(0,i.ToString)(e)}DecodeValue_(e,t,n){if("null"===e||"undefined"===e)return this.DecodeNullish_(t,"null"===e?null:void 0);if("string"===t)return e||"";if("boolean"===t)return null!=e&&"0"!==e&&"false"!==e;if("number"===t)return null===e?NaN:parseFloat(e||"0")||0;if("json"===t){try{return JSON.parse(e||"")}catch(e){}return null}return"array"===t?(e||"").split(n||",").map((e=>e.trim()))||[]:t.startsWith("array:")?(e||"").split(n||",").map((e=>this.DecodeValue_(e,t.substring(6),n)))||[]:"date"===t?new Date(e||""):e}DecodeNullish_(e,t=null){return"string"===e?"":"boolean"!==e&&("number"===e?NaN:t)}SpreadValue_(e,t){let n=e.split(" ");t.forEach(((e,t)=>{if(t>=n.length){let i=t%4-2;this.DispatchAttributeChange_(e,i<0||i>=n.length?n[0]:n[i])}else this.DispatchAttributeChange_(e,n[t])}))}DispatchAttributeChange_(e,t){let n=!1;this.spreads_.hasOwnProperty(e)&&(this.SpreadValue_(t||"",this.spreads_[e]),n=!0);const r=this.FindProperty_(e),s=this.storedObjects_.hasOwnProperty(e)&&this.storedObjects_[e];if(r){let o=null;if(r.checkStoredObject&&t){if(t===s)return;const n=(0,i.RetrieveStoredObject)({key:t,componentId:this.componentId_,contextElement:this});n!==t&&(this.storedObjects_[e]=t,o=e=>(0,i.JournalTry)((()=>e(n,this))))}o?o(r.handler):(0,i.JournalTry)((()=>r.handler(this.DecodeValue_(t,r.type||"string",r.delimiter),this))),n=!0}return n}AttributeChanged_(e){let t="";if(this.nativeElement_&&(e.startsWith("data-native-")?t=e.substring(12):e.startsWith("native-")?t=e.substring(7):e.startsWith("-")&&(t=e.substring(1))),t)this.hasAttribute(e)?this.nativeElement_.setAttribute(t,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(t)&&this.nativeElement_.removeAttribute(t);else{this.DispatchAttributeChange_(e,this.getAttribute(e))||!this.nativeAttributesWhitelist_.includes(e)&&this.nativeAttributesBlacklist_.includes(e)||!this.nativeElement_||e.startsWith("data-")||CustomElement.GlobalAttributes.includes(e)||(this.hasAttribute(e)?this.nativeElement_.setAttribute(e,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(e)&&this.nativeElement_.removeAttribute(e))}}ComputePropertyScopes_(){let e=new Array;for(let t=Object.getPrototypeOf(this);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(t.constructor.name);return e}SetNativeElement_(e){e!==this.nativeElement_&&(this.nativeElement_=e,this.CopyNativeElements_())}CopyNativeElements_(e){this.nativeElement_&&0!=this.nativeElements_.length&&((e?[e]:this.nativeElements_).forEach((e=>{e.GetAttributes().forEach((({name:e,value:t})=>this.nativeElement_.setAttribute(e,t)));for(let t=e.firstChild;t;t=e.firstChild)t.remove(),this.nativeElement_.appendChild(t)})),(0,i.ProcessDirectives)({component:this.componentId_,element:this.nativeElement_}))}GetResourceLoadAttributes_(){}IsConcurrentResourceLoad_(){return!0}ShouldLoadResources_(){return!0}}CustomElement.GlobalAttributes=["id","class","style","title","lang","dir","tabindex","accesskey","hidden","draggable","spellcheck","translate","contenteditable"],u([c({type:"string"})],CustomElement.prototype,"UpdateComponentProperty",null);class NativeElement extends CustomElement{constructor(){super(),this.attributes_=new Array,Array.from(this.attributes).forEach((({name:e,value:t})=>{this.attributes_.push({name:e,value:t}),this.removeAttribute(e)})),this.options_.isTemplate=!0,this.options_.isHidden=!0,this.style.display="none"}GetAttributes(){return this.attributes_}HandleElementScopeCreatedPrefix_(e){var t;null===(t=(0,i.FindAncestor)(this,(e=>"AddNativeElement"in e)))||void 0===t||t.AddNativeElement(this),super.HandleElementScopeCreatedPrefix_(e)}}function d(){r(NativeElement)}var p=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class ResourceElement extends CustomElement{constructor(){super({isTemplate:!0,isHidden:!0}),this.src="",this.type=""}GetResource(){return"link"===this.type||"script"===this.type||"data"===this.type?{type:this.type,path:this.src}:this.src}HandlePostAttributesProcessPostfix_(){var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this)}ShouldLoadResources_(){return!1}}function m(){r(ResourceElement,"resource")}p([c({type:"string"})],ResourceElement.prototype,"src",void 0),p([c({type:"string"})],ResourceElement.prototype,"type",void 0);var f=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class ResourceTargetElement extends CustomElement{constructor(){super({isHidden:!0}),this.attributes_=null,this.sequential=!1,this.defer=!1,this.onloaded="",this.onloadederror=""}UpdateAttributesProperty(e){this.attributes_=e}LoadResources(){const e=this.loadedResources_;return new Promise(((t,n)=>{super.LoadResources().then((n=>{!e&&this.onloaded&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloaded,{disableFunctionCall:!1,contexts:{data:n}}))),t(n)})).catch((e=>{this.onloadederror&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloadederror,{disableFunctionCall:!1,contexts:{reason:e}}))),n(e)}))}))}LoadTargetResources(){return this.LoadResources()}HandlePostAttributesProcessPostfix_(){var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this)}GetResourceLoadAttributes_(){return this.attributes_||void 0}IsConcurrentResourceLoad_(){return!this.sequential}ShouldLoadResources_(){return!this.defer}}function _(){r(ResourceTargetElement,"resource-target")}function y(e){return function(t){let n=(0,i.ToSnakeCase)(e||t.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,t)}}function b(){(0,i.WaitForGlobal)().then((()=>{d(),m(),_()}))}f([c({type:"object",checkStoredObject:!0})],ResourceTargetElement.prototype,"UpdateAttributesProperty",null),f([c({type:"boolean"})],ResourceTargetElement.prototype,"sequential",void 0),f([c({type:"boolean"})],ResourceTargetElement.prototype,"defer",void 0),f([c({type:"string"})],ResourceTargetElement.prototype,"onloaded",void 0),f([c({type:"string"})],ResourceTargetElement.prototype,"onloadederror",void 0)},936:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Re,AddDirectiveExpansionRule:()=>ht,AddDirectiveHandler:()=>ri,AddMagicHandler:()=>_i,AddOutsideEventExcept:()=>xt,AddOutsideEventListener:()=>Ct,ApplyDirectiveExpansionRules:()=>pt,AreObjects:()=>u,AttributeInterpolator:()=>ei,AutoBootstrap:()=>ii,BaseComponent:()=>BaseComponent,BaseGlobal:()=>BaseGlobal,BeginsWith:()=>h,BindDirectiveExpansionRule:()=>bi,BindEvent:()=>ai,BootstrapAndAttach:()=>ni,BuildGetterProxyOptions:()=>He,BuildIntersectionOptions:()=>di,BuildProxyOptions:()=>je,CallIfFunction:()=>Ze,Changes:()=>Changes,ChildProxy:()=>ChildProxy,ClassDirectiveExpansionRule:()=>gi,ComponentCacheKey:()=>R,Config:()=>Config,ConsiderRange:()=>ve,Context:()=>Context,ContextKeys:()=>E,CreateAnimationLoop:()=>he,CreateChildProxy:()=>Te,CreateDirective:()=>ft,CreateDirectiveExpansionRule:()=>ut,CreateDirectiveHandlerCallback:()=>si,CreateGlobal:()=>qn,CreateInplaceProxy:()=>Fe,CreateLoop:()=>ue,CreateMagicHandlerCallback:()=>yi,CreateReadonlyProxy:()=>Le,DecodeAttribute:()=>W,DecodeValue:()=>B,DeepCopy:()=>z,DefaultTransitionDelay:()=>wt,DefaultTransitionDuration:()=>Gt,DefaultTransitionInitialDelay:()=>Dt,DefaultTransitionRepeats:()=>Ft,DeleteProxyProp:()=>Ne,DirectiveManager:()=>DirectiveManager,DisableProxyAction:()=>Me,DispatchDirective:()=>ct,ElementScope:()=>ElementScope,ElementScopeKey:()=>S,EncodeAttribute:()=>q,EncodeValue:()=>J,EndsWith:()=>K,EvaluateLater:()=>et,EvaluateMagicProperty:()=>Oe,ExtractDuration:()=>pi,FindAncestor:()=>V,FindAncestorByAttribute:()=>X,FindAncestorByAttributeValue:()=>Z,FindAncestorByClass:()=>Y,FindAncestorByTagName:()=>Q,FindCacheValue:()=>y,FindComponentByCallback:()=>F,FindComponentById:()=>G,FindComponentByName:()=>w,FindComponentByRoot:()=>D,FindFirstAttribute:()=>ne,FindFirstAttributeValue:()=>ie,FlattenDirective:()=>at,ForwardEvent:()=>oi,Future:()=>Future,GenerateFunctionFromString:()=>Qe,GenerateUniqueId:()=>ke,GenerateValueReturningFunction:()=>Ye,GenerateVoidFunction:()=>Xe,GenericProxy:()=>GenericProxy,GetAttribute:()=>te,GetCache:()=>f,GetConfig:()=>se,GetDefaultCacheValue:()=>O,GetDefaultUniqueMarkers:()=>xe,GetDirectiveValue:()=>ci,GetElementScopeId:()=>A,GetElementScopeIdWithElement:()=>C,GetGlobal:()=>I,GetGlobalScope:()=>d,GetLocal:()=>Ot,GetOrCreateGlobal:()=>Kn,GetProxyProp:()=>Ge,GetTarget:()=>o,GetTargets:()=>l,GlobalCreatedEvent:()=>P,IncrementUniqueMarkers:()=>Pe,InferComponent:()=>L,InitCache:()=>m,InitComponentCache:()=>N,InitJITProxy:()=>Ue,InitializeDev:()=>Si,InitializeGlobal:()=>Ci,InitializeGlobalScope:()=>p,InitializeUtilities:()=>Ai,InitializeValues:()=>xi,InitializeVersion:()=>Pi,InlineJS:()=>Ii,InlineJSGlobalKey:()=>x,InsertHtml:()=>Jn,Interpolate:()=>Qn,InterpolateText:()=>Zn,IntersectionObserver:()=>IntersectionObserver,InvalidateCache:()=>g,InvalidateComponentCache:()=>T,IsBooleanAttribute:()=>re,IsCustomElement:()=>oe,IsEqual:()=>le,IsInsideTemplate:()=>Ae,IsObject:()=>c,IsTemplate:()=>Ce,JoinPath:()=>ye,JoinUniqueMarkers:()=>Ie,JournalError:()=>i,JournalLog:()=>Ei,JournalTry:()=>r,JournalWarn:()=>lt,LazyCheck:()=>fi,Loop:()=>Loop,MagicManager:()=>MagicManager,MeasureCallback:()=>de,MergeObjects:()=>pe,MutationObserver:()=>MutationObserver,NativeFetchConcept:()=>NativeFetchConcept,NextIdle:()=>NextIdle,NextNonIdle:()=>NextNonIdle,NextTick:()=>NextTick,Nothing:()=>Nothing,OnDirectiveExpansionRule:()=>vi,PathToRelative:()=>fe,PeekCurrentComponent:()=>ze,PeekCurrentScope:()=>Rt,PeekStoredObject:()=>H,PopCurrentComponent:()=>We,PopCurrentScope:()=>kt,ProcessDirectives:()=>yt,ProxyAccessStorage:()=>ProxyAccessStorage,ProxyKeys:()=>s,PushCurrentComponent:()=>$e,PushCurrentScope:()=>It,QueryGlobalComponent:()=>Tt,RandomString:()=>be,Range:()=>Range,RemoveDirectiveExpansionRule:()=>dt,RemoveOutsideEventListener:()=>At,ResizeObserver:()=>ResizeObserver,ResolveKeyValue:()=>ui,ResolveOptions:()=>mi,ResolveTransition:()=>Lt,RetrieveStoredObject:()=>j,RootProxy:()=>RootProxy,Scope:()=>Scope,SetAttributeUtil:()=>Ee,SetCacheValue:()=>_,SetProxyAccessHandler:()=>it,SetProxyProp:()=>we,SplitPath:()=>_e,Stack:()=>Stack,StoreProxyHandler:()=>rt,StreamData:()=>tt,SubscribeToChanges:()=>st,SupportsAttributes:()=>U,TextContentInterpolator:()=>ti,TidyPath:()=>me,TimedRange:()=>TimedRange,ToCamelCase:()=>v,ToSnakeCase:()=>Se,ToString:()=>$,TraverseDirectives:()=>_t,TraverseInterpolationReplacements:()=>Xn,UnbindOutsideEvent:()=>Pt,UseCache:()=>b,UseEffect:()=>ot,UseRange:()=>ge,WaitAnimation:()=>Mt,WaitForGlobal:()=>k,WaitPromise:()=>Je,WaitTransition:()=>jt,WaitWhile:()=>nt});class Stack{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Purge(){return this.list_.splice(0)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class Future{constructor(e){this.callback_=e}Get(){return this.callback_()}}function i(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function r(e,t,n){try{return e()}catch(e){i(e,t,n)}}class Loop{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===r((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>r((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class Nothing{}const s={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function o(e){return(Array.isArray(e)||e&&"object"==typeof e)&&s.target in e?o(e[s.target]):e}function l(e){return e.map((e=>o(e)))}function a(e){return(e=o(e))&&"object"==typeof e&&(s.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function c(e){return!!a(e)}function u(e){return-1==e.findIndex((e=>!a(e)))}class Range{constructor(e,t){this.from_=e,this.to_=t}GetFrom(){return this.from_}GetTo(){return this.to_}Step(e,t=0){const n=this.IsAscending(),{start:i,end:r}=n?{start:this.from_,end:this.to_}:{start:this.to_,end:this.from_};if("number"==typeof this.from_&&"number"==typeof this.to_)return this.from_+(this.to_-this.from_)*e+t;if("string"==typeof i&&"string"==typeof r){const s=r.length-i.length,o=n?Math.round(s*e):Math.round(s*(1-e));return i+r.substring(i.length+t,i.length+t+o)}if(Array.isArray(i)&&Array.isArray(r)){const s=r.length-i.length,o=n?Math.round(s*e):Math.round(s*(1-e));return[...i,...r.slice(i.length+t,i.length+t+o)]}if(c(this.from_)&&c(this.to_)){const s=Object.assign({},i),o=Object.keys(i),l=Object.keys(r),a=l.length-o.length,c=n?Math.round(a*e):Math.round(a*(1-e));return l.slice(o.length+t,o.length+t+c).forEach((e=>s[e]=r[e])),s}return null}IsAscending(){return"number"==typeof this.from_&&"number"==typeof this.to_?this.from_<this.to_:"string"==typeof this.from_&&"string"==typeof this.to_||Array.isArray(this.from_)&&Array.isArray(this.to_)?this.from_.length<this.to_.length:!(!c(this.from_)||!c(this.to_))&&Object.keys(this.from_).length<Object.keys(this.to_).length}}class TimedRange extends Range{constructor(e,t,n,i){super(e,t),this.duration_=n,this.delay_=i}GetDuration(){return this.duration_}GetDelay(){return this.delay_}}function h(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}function d(e=null,t=!1){let n=globalThis.InlineJS=globalThis.InlineJS||{};return(e||"").trim().split(".").forEach((e=>{e&&(n=n[e]=n[e]&&c(n[e])?n[e]:{})})),!t||c(n)?n:{}}function p(e,t){const n=d(e);Object.entries(t).forEach((([e,t])=>n[e]=t))}function m(e,t){return d("cache")[e]="function"==typeof t?t():t}function f(e,t){const n=d("cache");return n.hasOwnProperty(e)?n[e]:m(e,t)}function _(e,t,n,i){const r=f(e,i);r&&"object"==typeof r&&(r[t]=n)}function y(e,t){const n=d("cache"),i=n.hasOwnProperty(e)?n[e]:void 0;if(i&&"object"==typeof i&&t in i)return i[t]}function b(e,t,n,i,r,s){let o=f(t,n);if(o&&i(o))return r(o);const l=e();return!1===l?s():(m(t,l),r(l))}function g(e){const t=d("cache");t.hasOwnProperty(e)&&delete t[e]}function v(e,t,n){const[i="",...r]=e.trim().split(n||"-"),s=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?s(i):i)+(r||[]).map((e=>s(e))).join("")}const E={self:"self",event:"event",scope:"scope"},S="__InlineJS_ELSCOPE_KEY__";function C(e){for(;e;){const n=S in(t=e)&&"string"==typeof t[S]?t[S]:"";if(n)return[n,e];if(e===document.body)return[null,null];e=e.parentElement}var t;return[null,null]}function A(e){const[t]=C(e);return t||""}const x="__InlineJS_GLOBAL_KEY__",P="inlinejs.global.created";function I(){return d("global").base||null}function k(){return I()?Promise.resolve():new Promise((e=>window.addEventListener(P,e,{once:!0})))}const R="component";function O(){return{id:"",component:null}}function N(){m(R,{id:"",component:null})}function T(e){f(R,O).id===e&&g(R)}function G(e){return b((()=>{const t=I().FindComponentById(e);return!!t&&{id:e,component:t}}),R,O,(t=>t.id===e),(e=>e.component),(()=>null))}function w(e){return I().FindComponentByName(e)}function D(e){return I().FindComponentByRoot(e)}function F(e){return I().FindComponentByCallback(e)}function L(e){const t=A(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?G(t[1]):F((t=>t.GetRoot()===e||t.GetRoot().contains(e)))}var M=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function j(e){var{key:t}=e,n=M(e,["key"]);const i=I().RetrieveObject(Object.assign({key:t},n));return I().IsNothing(i)?t:i}function H(e){var{key:t}=e,n=M(e,["key"]);const i=I().PeekObject(Object.assign({key:t},n));return I().IsNothing(i)?t:i}function B(e,t,n){var i;return j({key:e,componentId:t||(n?null===(i=L(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function U(e){return(e=o(e))&&"object"==typeof e&&"hasAttribute"in e&&"getAttribute"in e&&"setAttribute"in e&&"removeAttribute"in e}function $(e){return e=o(e),I().IsFuture(e)?$(e.Get()):!e&&!1!==e&&0!==e||I().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function W(e,t,n){const i=t&&U(e)?e.getAttribute(t):null;return i?B(i,n,e):$(i)}function z(e){if(e=o(e),!Array.isArray(e)&&!c(e))return e;if(Array.isArray(e))return e.map((e=>z(e)));const t={};return Object.entries(e).forEach((([e,n])=>t[e]=z(n))),t}function J(e,t,n){var i;return null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e?$(e):I().StoreObject({object:e,componentId:t||(n?null===(i=L(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function q(e,t,n,i){(!t||!U(e))&&e.setAttribute(t,J(n,i,e))}function K(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function V(e,t){for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n}catch(e){break}return null}function Y(e,t){return V(e,(e=>e.classList.contains(t)))}function X(e,t){return V(e,(e=>e.hasAttribute(t)))}function Z(e,t,n){return V(e,(e=>e.getAttribute(t)===n))}function Q(e,t){return V(e,(e=>e.tagName.toLowerCase()===t.toLowerCase()))}function ee(e,t){return t&&U(e)?e.getAttribute(t):null}function te(e,t){for(const n of Array.isArray(t)?t:[t]){const t=ee(e,n);if(t)return t}return null}function ne(e,t){if(!U(e))return null;for(const n of t)if(e.hasAttribute(n))return{name:n,value:e.getAttribute(n)};return null}function ie(e,t){const n=ne(e,t);return n?n.value:null}function re(e,t){if(e.hasOwnProperty("IsBooleanAttribute")&&"function"==typeof e.IsBooleanAttribute){const n=e.IsBooleanAttribute(t);if(!1===n||!0===n)return n}return I().GetConfig().IsBooleanAttribute(t)}function se(){return I().GetConfig()}function oe(e){const t=e.tagName.toLowerCase();return se().MatchesElement(t)&&customElements.get(t)&&e.matches(":defined")}function le(e,t,n=!0){const[i,r]=n?l([e,t]):[e,t];if(i===r)return!0;if(Array.isArray(i)&&Array.isArray(r))return i.length==r.length&&-1==i.findIndex(((e,t)=>!le(e,r[t],n)));if(u([i,r])){const e=Object.keys(i),t=Object.keys(r);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!le(i[e],r[e],n)))}return i==r}function ae(e,t,n,i,s,o=1){let l=!1,a=()=>l=!0,c=0,u=e=>t?Math.floor(e/t):e,h=performance.now(),d=h,p=0;const m=(t,n,i)=>{e((e=>{o>1?p++%o==0?f(t,n,i,e):m(t,n,i):f(t,n,i,e)}))},f=(e,o,f,_)=>{if(l)return void f();const y=_-h;if(s&&y>=s)if(n&&(n<0||c<n)){p=0;const t=y-s;i>0&&t<i?setTimeout((()=>{h=performance.now(),m(e,o,f)}),i-t):m(e,o,f),c+=1,h=_,d=_}else r((()=>o({repeats:c,steps:s?u(s):-1,elapsed:y,duration:s})));else{m(e,o,f);const n=_-d;n>=t&&(d=t?_-n%t:_,r((()=>e({repeats:c,steps:u(y),elapsed:y,duration:s,abort:a}))))}};return new Loop(((e,t,n)=>m(e,t,n)))}const ce=[50,40,30,25,20,15,10,5,4,3,2,1,0];function ue(e,t=1e3,n=0,i=0,r=!0,s=1){let o=0,l=Math.floor(t/2.2);for(const e of ce)if(e<=l){o=e;break}return ae((e=>setTimeout((()=>{r?requestAnimationFrame(e):e(performance.now())}),o)),t,n,i,e,s)}function he(e,t=1e3,n=0,i=0,r=1){return ae(requestAnimationFrame,t,n,i,e,r)}function de(e){const t=performance.now();return e(),performance.now()-t}function pe(e,t){return Object.entries(t).forEach((([t,n])=>!(t in e)&&(e[t]=n))),e}function me(e,t=!1){return(e=e?e.trim():"")?(!(e=e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"")).startsWith("/?")&&(e=e.replace(/^[\/?&=]+/,"")),t&&(e=e.split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),"")),e):""}function fe(e,t,n,i=!1){return(e=me(e,i))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function _e(e,t,n){const i=(e=t?fe(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function ye({base:e,query:t},n,i,r,s=!1){let o=`${me(e,s)}?${t}`;return o=n?fe(o,n,i):me(o,s),o=r?me(`${n}/${o}`,s):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function be(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e||11},(()=>(t||n).charAt(Math.floor(Math.random()*(t||n).length)))).join("")}function ge(e,t,n=3e3,i=1e3,s=!0){const o=n=>{if(!s)return r((()=>t(n)));const i=e.GetFrom(),o=e.GetTo();return r("number"!=typeof i||"number"!=typeof o?()=>t(n):()=>t(Number.isInteger(i)&&Number.isInteger(o)?Math.floor(n):n))},l=()=>{const t=e.Step(1);null!==t&&o(t)};if(I().IsTimedRange(e)&&(n=e.GetDuration()||n,i=e.GetDelay()||i),n<=0)return void l();const a=e.Step(0);if(null===a)return void l();let c=a;!1!==o(c)&&he(n,i).While((({elapsed:t,abort:i})=>{const r=e.Step(t/n);null===r?null==i||i():le(r,c)||(c=r,!1===o(r)&&(null==i||i()))})).Final(l)}function ve(e,t,n=3e3,i=1e3,s=!0){I().IsRange(e)?ge(e,t,n,i,s):r((()=>t(e)))}function Ee(e,t,n){t&&U(e)&&e.setAttribute(t,n)}function Se(e,t="-"){t=t||"-";const n=e.replace(/([A-Z]+)/g,(e=>`${t}${e.toLowerCase()}`));return n.startsWith(t)?n.substring(1):n}function Ce(e){return e instanceof HTMLTemplateElement||oe(e)&&e.IsTemplate()}function Ae(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Element&&Ce(t))return!0;return!1}function xe(){return{level0:0,level1:0,level2:0}}function Pe(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?Pe(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function Ie(e){return`${e.level2}_${e.level1}_${e.level0}`}function ke(e,t,n,i){return Pe(e),`${t||""}${n||""}${Ie(e)}${i||""}`}function Re(e,t,n,i,r=!0){if(!i)return;const s={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(s),!r)return;const o=t.split(".");for(;o.length>2;)o.pop(),i.Add({original:s,path:o.join(".")})}function Oe(e,t,n,s="",o=!0){const l="string"==typeof e?G(e):e;if(!l)return i(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),I().CreateNothing();let a=s&&n.startsWith(s)?n.substring(s.length):n;const c=I().GetMagicManager().FindHandler(a,{contextElement:t,componentId:l.GetId(),component:l});if(!c){if(!o)return I().CreateNothing();const e=s&&n.startsWith(`${s}${s}`)||!1;a=e?a.substring(s.length):a;const t=l.FindScopeByName(a);if(t)return e?t.GetRoot():t.GetProxy().GetNative();const i=w(a);if(i)return e?i.GetRoot():i.GetRootProxy().GetNative();if(e){const e=l.GetId();return t=>{const i=L(t)||G(e);if(!i)return null;const r=i.FindElementScope(t),o=r&&r.GetLocal(n.substring(s.length));return r&&!I().IsNothing(o)?o:Oe(i.GetId(),t,n,`${s}${s}`,!1)}}return I().CreateNothing()}return r((()=>c({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Ne(e,t,n,i){var r;if(!(i in t))return!1;const s=G(e);return null===(r=null==s?void 0:s.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==s||s.RemoveProxy(`${n}.${i}`),Re("delete",`${n}.${i}`,i,null==s?void 0:s.GetBackend().changes),!0}function Te(e,t,n,i){if(!e)return null;const r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!c(n))return null;const s=I().CreateChildProxy(e,t,n),o=i||G(e.GetComponentId());return o&&o.AddProxy(s),s}function Ge(e,t,n,i,r,o){var l,a,c;switch(r){case s.target:return n;case s.componentId:return e;case s.name:return i.split(".").at(-1);case s.path:return i;case s.parentPath:return i.split(".").slice(0,-1).join(".")||""}if(r in n){if(!n.hasOwnProperty(r))return n[r];const s=n[r];if(I().IsFuture(s))return s.Get();if(null===(l=I().GetCurrentProxyAccessStorage())||void 0===l||l.Put(e,`${i}.${r}`),"function"==typeof s)return s.bind(t.GetNative());const o=G(e);return o&&(null===(a=Te(o.FindProxy(i)||null,r,s,o))||void 0===a?void 0:a.GetNative())||s}if(o){const t=o(G(e)||void 0,r);if(!I().IsNothing(t))return I().IsFuture(t)?t.Get():t}return null===(c=I().GetCurrentProxyAccessStorage())||void 0===c||c.Put(e,`${i}.${r}`),null}function we(e,t,n,i,r){var s;if(i in t&&r===t[i])return!0;const o=G(e);return null===(s=null==o?void 0:o.FindProxy(n))||void 0===s||s.RemoveChild(i),t[i]=r,null==o||o.RemoveProxy(`${n}.${i}`),Re("set",`${n}.${i}`,i,null==o?void 0:o.GetBackend().changes),!0}class GenericProxy{constructor(e,t,n,i,s=null){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==i?void 0:i.GetPath())||"",null==i||i.AddChild(this);const o=this.componentId_,l=!!s,a=this.GetPath(),c=(e,t)=>{if(!e)return I().CreateNothing();const{context:n}=e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){const e=n.Peek(t.substring(1),I().CreateNothing());if(!I().IsNothing(e))return e}const r=n.Peek(E.self),s=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!I().IsNothing(s))return s;const o=i?Oe(e,r,t,"$"):I().CreateNothing();return t&&I().IsNothing(o)&&I().GetConfig().GetUseGlobalWindow()&&t in globalThis?globalThis[t]:o},u=!l&&!this.parentPath_,h=this,d={get(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),r=i&&i.Get?i.Get(t,e):I().CreateNothing();if(!I().IsNothing(r))return r}if((u||l)&&e.hasOwnProperty(t)&&"function"==typeof e[t]&&I().GetConfig().GetWrapScopedFunctions()){const n=I().FindComponentById(o),i=null==n?void 0:n.FindScopeById(s||""),l=e[t];i&&I().PushScopeContext(i);const a=r((()=>(...e)=>l(...e)));return i&&I().PopScopeContext(),a}return Ge(o,h,e,a,t.toString(),u?c:void 0)},set(e,t,n){var i;if("symbol"==typeof t||"prototype"===t)return Reflect.set(e,t,n);if(u){const r=null===(i=I().FindComponentById(o))||void 0===i?void 0:i.GetProxyAccessHandler(),s=r&&r.Set?r.Set(t,n,e):I().CreateNothing();if(!I().IsNothing(s))return s}return we(o,e,a,t.toString(),n)},deleteProperty(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),r=i&&i.Delete?i.Delete(t,e):I().CreateNothing();if(!I().IsNothing(r))return r}return Ne(o,e,a,t.toString())},has(e,t){var n;if("symbol"==typeof t)return Reflect.has(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler();return!i||!i.Has||!!i.Has(t,e)}return Reflect.has(e,t)}};this.native_=new window.Proxy(this.target_,d)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}Destroy(){Object.values(this.children_).forEach((e=>e.Destroy())),this.componentId_="",this.name_="",this.target_=null,this.parentPath_="",this.native_=null,this.children_={}}}class ChildProxy extends GenericProxy{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}var De=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function Fe({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:s}){const o={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);const r=t?t(n.toString(),e):e[n];return I().IsNothing(r)?Reflect.get(e,n):(!s||s.list&&!s.list.includes(n.toString())||null===(i=I().GetCurrentProxyAccessStorage())||void 0===i||i.Put(s.componentId,`${s.id}.${n.toString()}`),r)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?!1!==n(t.toString(),i,e):Reflect.set(e,t,i),deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?!1!==i(t.toString(),e):Reflect.deleteProperty(e,t),has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(r)?r.includes(t.toString()):r?r(t.toString(),e):t in e)};return new window.Proxy(e||{},o)}function Le(e){return Fe(He({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function Me(){return!1}function je(e){var{setter:t,deleter:n,lookup:i}=e,r=De(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||Me,deleter:n||Me,lookup:i||Me})}function He(e){return je(e)}const Be="InlineJS_ProxyGlobal";function Ue(e,t,n){const i=null==t?void 0:t.FindElementScope(n),r=null==i?void 0:i.GetId();if(!r)return["",null,null];const s=globalThis[Be]=globalThis[Be]||{},o=s[e]=s[e]||{};return r in o?[r,o[r],o]:(null==i||i.AddUninitCallback((()=>delete o[r])),[r,null,o])}class RootProxy extends GenericProxy{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,n)}}function $e(e){I().PushCurrentComponent(e)}function We(){return I().PopCurrentComponent()}function ze(){return I().PeekCurrentComponent()}function Je(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>Je(e,t,!0))):e.then(t)}const qe="__InlineJS_Context__",Ke="InlineJS_Func_Cache";function Ve(e,t,n,r=!1){const s=y(Ke,t);if(s)return s;try{const n=new Function(qe,`\n with (${qe}){\n ${e(t)};\n };\n `);return _(Ke,t,n,{}),n}catch(e){if(r||!(e instanceof SyntaxError))return void i(e,`InlineJs.Region<${n||"NIL"}>.GenerateFunction`)}return null}function Ye(e,t,n=!1){return Ve((e=>`return (${e})`),e,t,n)}function Xe(e,t,n=!1){return Ve((e=>e),e,t,n)}function Ze(e,t,n,i=[]){if("function"==typeof e){const n=e(...i);return t?t(n):n}return t?t(e):e}function Qe({componentId:e,contextElement:t,expression:n,disableFunctionCall:r=!1,waitPromise:s="recursive",voidOnly:o}){const l=e=>(e&&e(null),null);if(!(n=n.trim()))return l;let a=o?null:Ye(n,e),c=!1;if(void 0===a)return l;if(!a&&(c=!0),!a&&!(a=Xe(n,e,!0)))return l;const u=(o,l,a,c,u=!0,h)=>{var d;const p=G(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(d=null==p?void 0:p.FindElementScope(t))||void 0===d?void 0:d.IsDestroyed()))return;const{context:f=null,changes:_=null}=(null==p?void 0:p.GetBackend())||{};null==f||f.Push(E.self,t),$e(e),Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Push(e,t)));try{let e=o(m);if(I().IsFuture(e)&&(e=e.Get()),!l)return r?e:Ze(e,l,0,a);const t=e=>{if(e&&"none"!==s)return Je(e,l,"recursive"===s),h||"Loading data...";l(e)};return r?t(e):Ze(e,t,0,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;i(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Pop(e,t))),We(),null==f||f.Pop(E.self)}};return(r,s=[],o,h)=>{var d;if(!a||t&&!t.isConnected)return l(r);const p=null===(d=G(e))||void 0===d?void 0:d.FindElementScope(t);if(null==p?void 0:p.IsMarked())return l(r);try{return u(a.bind(t),r,s||[],o||{},void 0,h)}catch(h){if(h instanceof SyntaxError&&!c)return c=!0,a=Xe(n,e,!0),a?u(a.bind(t),r,s||[],o||{},!1):l(r);i(h,`InlineJs.Region<${e}>.RunFunction('${n}')`)}return l(r)}}function et(e){return Qe(e)}function tt(e,t){const n=(e,t)=>Je(e,t,!0);return e instanceof Loop?new Loop(((i,r)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>r(e)))}))}))})):e instanceof Promise?new Promise((i=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})):t(e)}function nt(e,t,n){e instanceof Loop?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function it(e,t){if(!t)return()=>{};const n="handler"in t?t.handler:t;if(!n)return()=>{};const i="string"==typeof e?G(e):e;if(!i)return()=>{};const r=i.SetProxyAccessHandler(n||null)||null;return()=>t&&i.SetProxyAccessHandler(r)}function rt(e){var t;const n=null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.GetProxyAccessHandler();return t=>{const i=it(e,n||null);r(t),i()}}function st({componentId:e,proxyAccessStorage:t,callback:n,subscriptionsCallback:r,contextElement:s}){var o,l;if(t.IsEmpty())return null==r||r({}),null;let a={},c=()=>{for(const e in a){const t=G(e);if(!t)continue;const{changes:n}=t.GetBackend();a[e].forEach((e=>n.Unsubscribe(e)))}a={}},u=!1,h=()=>{u=!0};const d=t=>{const r=G(e);if(!r||u)return void c();const{changes:s}=r.GetBackend();s.PushOrigin(d);try{n({changes:t,cancel:h})}catch(t){i(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}s.PopOrigin(),u&&c()},p=t.GetGroupedEntries();for(const e in p){const t=G(e);if(!t)continue;const n=new Array,{changes:i}=t.GetBackend();p[e].forEach((e=>n.push(i.Subscribe(e.path,d)))),a[e]=n}return s&&(null===(l=null===(o=G(e))||void 0===o?void 0:o.FindElementScope(s))||void 0===l||l.AddMarkedCallback((()=>{h(),c()}))),null==r||r(a),c}class ProxyAccessStorage{constructor(){this.storage_={},this.isSuspended_=!1}Put(e,t){if(this.isSuspended_)return;const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i),s=[];for(const e in this.storage_){if(e.startsWith(r)&&(e.length===r.length||"."===e[r.length]))return;!r.startsWith(e)||r.length!==e.length&&"."!==r[e.length]||s.push(e)}this.storage_[r]={componentId:n,path:i},s.forEach((e=>delete this.storage_[e]))}Remove(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t);delete this.storage_[ProxyAccessStorage.EncodeEntryPath(n,i)]}Clear(){this.storage_={}}GetEntries(){return Object.values(this.storage_)}GetGroupedEntries(){const e={};for(const t in this.storage_){const n=this.storage_[t];!e[n.componentId]&&(e[n.componentId]=[]),e[n.componentId].push(n)}return e}GetLongestPath(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i);let s=null,o="";for(const e in this.storage_)!e.startsWith(r)||e.length!==r.length&&"."!==e[r.length]||e.length>o.length&&(s=this.storage_[e],o=e);return s}HasEntry(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i);for(const e in this.storage_)if(e.startsWith(r)&&(e.length===r.length||"."===e[r.length]))return!0;return!1}Count(){return Object.keys(this.storage_).length}IsEmpty(){return 0===Object.keys(this.storage_).length}Suspend(){this.isSuspended_=!0}Resume(){this.isSuspended_=!1}IsSuspended(){return this.isSuspended_}static ResolveDetails(e,t){return"string"==typeof e?{componentId:e,path:t||""}:e}static EncodeEntryPath(e,t){return`${e}:${t}`}}function ot({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r,cancelCallback:s}){var o;const l=rt(e),a=()=>{const i=G(e);if(!i)return;let o=!1,a=null,c=()=>{o=!0};n&&(a=n instanceof HTMLElement?i.CreateElementScope(n):i.FindElementScope(n));const u=new ProxyAccessStorage;I().UseProxyAccessStorage((()=>{t({changes:[],cancel:c})}),u);!o&&st({componentId:e,proxyAccessStorage:u,subscriptionsCallback:r,callback:e=>l((()=>t(e))),contextElement:null==a?void 0:a.GetElement()})&&s&&s(c)};(null==i?void 0:i.nextTick)?null===(o=G(e))||void 0===o||o.GetBackend().changes.AddNextTickHandler(a):a()}function lt(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function at(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function ct(e,t,n,s=0){const o="string"==typeof e?G(e):e;if(!o)return i(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=o.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++s),l=l||I().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){const e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}if(!l)return lt(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;const c=it(o,n.proxyAccessHandler||null);return 0==s&&!a&&o.CreateElementScope(t),r((()=>{l(Object.assign(Object.assign({},at(n)),{componentId:o.GetId(),component:o,contextElement:t}))}),"InlineJS.DispatchDirective",t),c(),!0}function ut(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function ht(e){return I().GetDirectiveManager().AddExpansionRule(e)}function dt(e){I().GetDirectiveManager().RemoveExpansionRule(e)}function pt(e){return I().GetDirectiveManager().Expand(e)}let mt={};function ft(e,t,n){if(!e||!(e=e.trim()))return null;if((t=(t||"").trim())===e&&(t=""),e in mt)return{meta:mt[e],value:t,proxyAccessHandler:n};const i=pt(e),r=i.match(se().GetDirectiveRegex());if(!r||3!=r.length||!r[2])return null;const s=r[2].indexOf(":");let o=-1==s?[r[2]]:[r[2].substring(0,s),r[2].substring(s+1)],l="",a="";o.length>1?[l,a]=o:[a]=o;let c=a.split("."),u="";if(l?u=c[0]:l=c[0],!l)return null;c.splice(0,1);const h=l.split("-"),d={view:{original:e,expanded:i},name:{value:l,joined:h.join("."),parts:h},arg:{key:u,options:c||[]}};return mt[e]=d,{meta:d,value:t,proxyAccessHandler:n}}function _t({element:e,callback:t,attributeCallback:n,proxyAccessHandler:r}){Array.from(e.attributes).forEach((s=>{try{n&&n(s.name,s.value||"");const e=ft(s.name,s.value||"",r);e&&t(e)}catch(t){i(t,"InlineJS.TraverseDirectives",e)}}))}function yt({component:e,element:t,options:n={},proxyAccessHandler:r}){if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||!Ae(e))}(t,n))return;const s="string"==typeof e?G(e):e;if(!s)return i("Failed to find component.","InlineJS.ProcessDirectives",t),!1;if(s.IsDestroyed())return i("Component is destroyed.","InlineJS.ProcessDirectives",t),!1;let o=0;_t({element:t,proxyAccessHandler:r,callback:n=>{ct(e,t,n,o)&&(t.removeAttribute(n.meta.view.original),++o)},attributeCallback:(e,n)=>I().DispatchAttributeProcessing({name:e,value:n,proxyAccessHandler:r,componentId:s.GetId(),component:s,contextElement:t})}),!Ce(t)&&I().DispatchTextContentProcessing({componentId:s.GetId(),component:s,contextElement:t,proxyAccessHandler:r}),oe(t)&&s.CreateElementScope(t);const l=s.FindElementScope(t);null==l||l.ExecutePostAttributesProcessCallbacks();const a=s.GetId(),c=()=>{const e=G(a);if(e&&!e.IsDestroyed()&&!n.ignoreChildren&&!Ce(t)){e.PushSelectionScope();const n={checkTemplate:!1,checkDocument:!1},i=(t,i)=>yt({component:e,proxyAccessHandler:r,options:Object.assign(Object.assign({},n),{ignoreChildren:i}),element:t});"TraverseChildren"in t&&"function"==typeof t.TraverseChildren?t.TraverseChildren((e=>i(e,e.contains(t)))):Array.from(t.children).forEach((e=>i(e,e.contains(t)))),e.PopSelectionScope()}null==l||l.ExecutePostProcessCallbacks()};"ProcessDirectivesCallback"in t?t.ProcessDirectivesCallback(c):c()}class ChangesMonitor{constructor(){this.listeners_=new Array}AddChangesMonitor(e){this.listeners_.push(e),this.listeners_.forEach((e=>r((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}RemoveChangesMonitor(e){const t=this.listeners_.length;this.listeners_=this.listeners_.filter((t=>t!==e)),t!=this.listeners_.length&&this.listeners_.forEach((e=>r((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}NotifyListeners_(e,t){this.listeners_.forEach((n=>r((()=>n({target:e,object:()=>z(t)})))))}}class Changes extends ChangesMonitor{constructor(e){super(),this.componentId_=e,this.nextTickHandlers_=new Array,this.nextIdleHandlers_=new Array,this.nextNonIdleHandlers_=new Array,this.isScheduled_=!1,this.isIdle_=!0,this.isDestroyed_=!1,this.list_=new Array,this.subscribers_={},this.subscriberPaths_={},this.origins_=new Stack,this.recentRemovals_=null}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)}AddNextIdleHandler(e){this.nextIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)}AddNextNonIdleHandler(e){this.nextNonIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)}Schedule(){this.isDestroyed_||this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;const e=new Map,t=(t,n)=>{var i;if(null===(i=this.recentRemovals_)||void 0===i?void 0:i.includes(n))return;const r=e.get(n)||[];r.push(t),e.set(n,r)};if(0!=this.list_.length){this.list_.splice(0).forEach((e=>{const n=(e=>"original"in e?e.original.origin:e.origin)(e);Object.keys(this.subscribers_).forEach((i=>{(i===e.path||i.startsWith(`${e.path}.`))&&Object.values(this.subscribers_[i]).filter((e=>e!==n)).forEach((n=>t(e,n)))}))})),this.NotifyListeners_("list",this.list_)}const n=()=>{0!=this.nextTickHandlers_.length&&(this.nextTickHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextTick`))),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)),this.recentRemovals_=null};if(0==e.size)return this.isIdle_=!0,0!=this.nextIdleHandlers_.length&&(this.nextIdleHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextIdle`))),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)),void n();this.isIdle_=!1,e.forEach(((e,t)=>{var n;!(null===(n=this.recentRemovals_)||void 0===n?void 0:n.includes(t))&&r((()=>t(e)),`InlineJs.Region<${this.componentId_}>.Schedule`)})),0!=this.nextNonIdleHandlers_.length&&(this.nextNonIdleHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextNonIdle`))),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)),n(),this.NotifyListeners_("scheduled",this.isScheduled_),this.Schedule()})),this.NotifyListeners_("scheduled",this.isScheduled_))}Add(e){this.list_.push(e),this.Schedule(),this.NotifyListeners_("list",this.list_)}AddComposed(e,t,n){const i={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:i,path:n}):this.Add(i)}GetLastChange(e=0){return z(this.list_.at(-(e+1))||null)}PushOrigin(e){this.origins_.Push(e),this.NotifyListeners_("origins",this.origins_)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){const e=this.origins_.Pop();return this.NotifyListeners_("origins",this.origins_),e}Subscribe(e,t){var n;const i=null===(n=G(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&((this.subscribers_[e]=this.subscribers_[e]||{})[i]=t,this.subscriberPaths_[i]=e,this.NotifyListeners_("subscribers",this.subscribers_)),i||""}Unsubscribe(e,t){if(this.recentRemovals_=this.recentRemovals_||[],"string"!=typeof e){(t?[t]:Object.keys(this.subscribers_)).forEach((t=>{t in this.subscribers_&&Object.entries(this.subscribers_[t]).filter((([t,n])=>e===n)).map((([e])=>e)).forEach((e=>this.Unsubscribe_(e)))}))}else e in this.subscriberPaths_&&this.Unsubscribe_(e);this.NotifyListeners_("subscribers",this.subscribers_)}Destroy(){this.isDestroyed_||(this.isDestroyed_=!0,this.componentId_="",this.nextTickHandlers_.splice(0),this.nextIdleHandlers_.splice(0),this.nextNonIdleHandlers_.splice(0),this.isScheduled_=!1,this.isIdle_=!0,this.list_.splice(0),this.subscribers_={},this.subscriberPaths_={},this.origins_.Purge())}Unsubscribe_(e){var t;const n=this.subscriberPaths_[e];n&&n in this.subscribers_&&e in this.subscribers_[n]&&(null===(t=this.recentRemovals_)||void 0===t||t.push(this.subscribers_[n][e]),delete this.subscribers_[n][e],delete this.subscriberPaths_[e],0==Object.keys(this.subscribers_[n]).length&&delete this.subscribers_[n])}}class Context{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new Stack).Push(t)}Purge(){const e=this.record_;return this.record_={},e}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}var bt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function gt(e,t,n){const i="function"==typeof e?function(e){const t={handler:n=>{var{argKey:i}=n,r=bt(n,["argKey"]);t.extensions.hasOwnProperty(i)?t.extensions[i](Object.assign({argKey:i},r)):e(Object.assign({argKey:i},r))},extensions:{}};return t}(e):e;return i.extensions[t]=n,i}function vt(e,t){let n="",i=null;return"function"==typeof e?(n=t||"",i=e):(n=e.GetName(),i=t=>e.Handle(t)),{computedName:n,callback:i}}class DirectiveManager{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){const t=I().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(const t in this.expansionRules_){const n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){const{computedName:n,callback:i}=vt(e,t);n&&i&&(this.handlers_[n]=i)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;const t=this.handlers_[e];return"function"==typeof t?t:t.handler}AddHandlerExtension(e,t,n){const i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;const{computedName:r,callback:s}=vt(t,n);r&&s&&(this.handlers_[e]=gt(i,r,s))}RemoveHandlerExtension(e,t){const n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}const Et="InlineJS_OutsideEvent";function St(){return globalThis[Et]=globalThis[Et]||{targetScopes:new Array,eventCallbacks:{}}}function Ct(e,t,n){let i=St(),s=i.targetScopes.find((t=>t.target===e));s||(s={target:e,listeners:{}},i.targetScopes.push(s)),(Array.isArray(t)?t:[t]).forEach((e=>{e in s.listeners||(s.listeners[e]={handlers:new Array,excepts:null}),s.listeners[e].handlers.push({callback:n,excepts:null}),e in i.eventCallbacks||(i.eventCallbacks[e]=e=>{i.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>r((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function At(e,t,n){const i=St(),r=i.targetScopes.find((t=>t.target===e));r&&(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners&&(n?(r.listeners[e].handlers=r.listeners[e].handlers.filter((e=>e.callback!==n)),0===r.listeners[e].handlers.length&&delete r.listeners[e]):delete r.listeners[e]),e in i.eventCallbacks&&!i.targetScopes.some((t=>e in t.listeners))&&(window.removeEventListener(e,i.eventCallbacks[e]),delete i.eventCallbacks[e])}))}function xt(e,t,n){const i=St().targetScopes.find((t=>t.target===e));i&&Object.entries(t).forEach((([e,t])=>{const r=i.listeners[e];if(!r)return;const s=Array.isArray(t)?t:[t];if(n){const e=r.handlers.find((e=>e.callback===n));e&&(e.excepts=e.excepts||[],e.excepts.push(...s))}else r.excepts=r.excepts||[],r.excepts.push(...s)}))}function Pt(e){const t=St(),n=t.targetScopes;t.targetScopes=t.targetScopes.filter((t=>t.target!==e&&!e.contains(t.target))),n.length!==t.targetScopes.length&&Object.keys(t.eventCallbacks).forEach((e=>{t.targetScopes.some((t=>e in t.listeners))||(window.removeEventListener(e,t.eventCallbacks[e]),delete t.eventCallbacks[e])}))}class ElementScope extends ChangesMonitor{constructor(e,t,n,i,s,o){super(),this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.isInitialized_=!1,this.key_="",this.locals_={},this.data_={},this.queuedAttributeChanges_=null,this.managers_={directive:null},this.callbacks_={post:new Array,postAttributes:new Array,uninit:new Array,marked:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1},n[S]=t,null==o||o(this);const l=se();["data","component","ref","locals","init"].map((e=>[l.GetDirectiveName(e,!1),l.GetDirectiveName(e,!0)])).forEach((t=>{const i=ne(n,t);if(i){const t=ft(i.name,i.value);t&&ct(s||e,n,t)}})),this.isInitialized_=!0,oe(n)&&r((()=>n.OnElementScopeCreated({componentId:e,component:s||null,scope:this})))}SetInitialized(){this.isInitialized_=!0}IsInitialized(){return this.isInitialized_}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetKey(e){this.NotifyListeners_("key",this.key_=e)}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t,this.NotifyListeners_("locals",this.locals_))}DeleteLocal(e){delete this.locals_[e],this.NotifyListeners_("locals",this.locals_)}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:I().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t,this.NotifyListeners_("data",this.data_))}GetData(e){return e in this.data_?this.data_[e]:I().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||(this.callbacks_.post.push(e),this.NotifyListeners_("post-process-callbacks",this.callbacks_.post))}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).splice(0).forEach((e=>r(e,"ElementScope.ExecutePostProcessCallbacks")))}AddPostAttributesProcessCallback(e){this.state_.isMarked||(this.callbacks_.postAttributes.push(e),this.NotifyListeners_("post-attributes-process-callbacks",this.callbacks_.postAttributes))}ExecutePostAttributesProcessCallbacks(){(this.callbacks_.postAttributes||[]).splice(0).forEach((e=>r(e,"ElementScope.ExecutePostAttributesProcessCallbacks")))}AddUninitCallback(e){this.state_.isDestroyed?r(e):(this.callbacks_.uninit.push(e),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit))}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e)),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit)}AddMarkedCallback(e){this.state_.isMarked?r(e):(this.callbacks_.marked.push(e),this.NotifyListeners_("marked-callbacks",this.callbacks_.marked))}RemoveMarkedCallback(e){this.callbacks_.marked=this.callbacks_.marked.filter((t=>t!==e)),this.NotifyListeners_("marked-callbacks",this.callbacks_.marked)}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e)),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>r((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;const n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(..."string"==typeof t?[t]:t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]}),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}RemoveAttributeChangeCallback(e,t){const n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;const i="string"==typeof t?[t]:t||[];0!=i.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?i.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}ExecuteAttributeChangeCallbacks(e){this.queuedAttributeChanges_?!this.queuedAttributeChanges_.includes(e)&&this.queuedAttributeChanges_.push(e):(this.queuedAttributeChanges_=[e],queueMicrotask((()=>{if(!this.queuedAttributeChanges_)return;const e=this.queuedAttributeChanges_;this.queuedAttributeChanges_=null,e.forEach((e=>{(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>r((()=>t.callback(e)))))}))})))}Destroy(e){if(this.state_.isDestroyed)return;const t=oe(this.element_),n=Ce(this.element_);if(!this.state_.isMarked&&(this.state_.isMarked=!0,this.callbacks_.marked.splice(0).forEach((e=>r(e))),t&&r((()=>this.element_.OnElementScopeMarked(this))),e&&!n)){const e=G(this.componentId_);e&&this.DestroyChildren_(e,this.element_,!0)}if(e)return;if(this.state_.isDestroyed=!0,this.queuedAttributeChanges_=null,this.callbacks_.uninit.splice(0).forEach((e=>r(e))),t&&r((()=>this.element_.OnElementScopeDestroyed(this))),!n){const e=G(this.componentId_);e&&this.DestroyChildren_(e,this.element_,!1)}this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},Pt(this.element_),I().GetMutationObserver().Unobserve(this.element_);const i=G(this.componentId_);if(null==i||i.RemoveElementScope(this.id_),delete this.element_[S],this.isRoot_){const e=this.componentId_;null==i||i.GetBackend().changes.AddNextTickHandler((()=>{I().RemoveComponent(e),T(e)}))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new DirectiveManager}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{const i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Scope{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new RootProxy(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentElement;n;n=n.parentElement){try{if(t(n))return n}catch(e){}if(n===this.root_)break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}Destroy(){this.componentId_="",this.id_="",this.name_="",this.root_=document.createElement("div"),r((()=>this.proxy_.Destroy()))}}class BaseComponent extends ChangesMonitor{constructor(e,t){super(),this.id_=e,this.root_=t,this.isDestroying_=!1,this.isDestroyed_=!1,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_=new Context,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new Stack,this.selectionScopes_=new Stack,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new Changes(this.id_),this.rootProxy_=new RootProxy(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,I().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{const s=G(e);if(!s)return;const o=new Array,l=I().GetConfig().GetDirectiveRegex(),a=null==i?void 0:i.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==s?void 0:s.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{const t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&r((()=>e.callback(t)))})),o.forEach((e=>yt({element:e,component:s,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));const c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement&&!s.FindElementScope(e)){yt({component:s,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=s.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=s.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}Destroy(){this.isDestroying_||this.isDestroyed_||(this.isDestroying_=!0,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_.Purge(),r((()=>this.changes_.Destroy())),Object.values(this.scopes_).forEach((e=>r((()=>e.Destroy())))),this.scopes_={},Object.values(this.elementScopes_).forEach((e=>r((()=>e.Destroy())))),this.elementScopes_={},r((()=>this.rootProxy_.Destroy())),this.refs_={},Object.values(this.proxies_).forEach((e=>r((()=>e.Destroy())))),this.proxies_={},this.currentScope_.Purge(),this.selectionScopes_.Purge(),this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=[],Object.values(this.observers_.intersections).forEach((e=>r((()=>e.Destroy())))),this.observers_.intersections={},this.isDestroyed_=!0,this.isDestroying_=!1)}IsDestroyed(){return this.isDestroying_||this.isDestroyed_}SetReactiveState(e){this.NotifyListeners_("reactive-state",this.reactiveState_=e)}GetReactiveState(){return"default"===this.reactiveState_?se().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){const n=ke(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}SetName(e){this.NotifyListeners_("name",this.name_=e)}GetName(){return this.name_}SetProxyAccessHandler(e){const t=this.proxyAccessHandler_;return this.proxyAccessHandler_=e,this.NotifyListeners_("proxy-access-handler",this.proxyAccessHandler_),t}GetProxyAccessHandler(){return this.proxyAccessHandler_}CreateScope(e){const t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;const n=new Scope(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),this.NotifyListeners_("scopes",this.scopes_),n}RemoveScope(e){const t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t],this.NotifyListeners_("scopes",this.scopes_))}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e),this.NotifyListeners_("current-scope",this.currentScope_)}PopCurrentScope(){const e=this.currentScope_.IsEmpty(),t=this.currentScope_.Pop();return!e&&this.NotifyListeners_("current-scope",this.currentScope_),t}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){const t=I().PeekScopeContext();if(t)return t;let n=null;for(const t in this.scopes_){const i=this.scopes_[t],r=i.GetRoot();if(r===e)return i;!r.contains(e)||n&&!n.GetRoot().contains(r)||(n=i)}return n}PushSelectionScope(){const e={set:!1};return this.selectionScopes_.Push(e),this.NotifyListeners_("selection-scopes",this.selectionScopes_),e}PopSelectionScope(){const e=this.selectionScopes_.IsEmpty(),t=this.selectionScopes_.Pop();return!e&&this.NotifyListeners_("selection-scopes",this.selectionScopes_),t}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n;if(n===this.root_)break}catch(e){break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){const t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;const n=new ElementScope(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_,this,(e=>{this.elementScopes_[e.GetId()]=e}));return this.NotifyListeners_("element-scopes",this.elementScopes_),n}RemoveElementScope(e){delete this.elementScopes_[e],this.NotifyListeners_("element-scopes",this.elementScopes_)}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;const t=!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_;return t&&S in t&&"string"==typeof t[S]&&t[S]in this.elementScopes_?this.elementScopes_[t[S]]:null}FindElementLocal(e,t,n){const i=this.FindElementScope(e);if(null==i?void 0:i.HasLocal(t))return i;if(!n||!i&&"string"==typeof e)return null;const r=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_);if(!r)return null;const s=this.FindAncestor(r);return s?this.FindElementLocal(s,t,!0):null}FindElementLocalValue(e,t,n){const i=this.FindElementScope(e),r=i?i.GetLocal(t):I().CreateNothing();if(!I().IsNothing(r)||!n||!i&&"string"==typeof e)return r;const s=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_);if(!s)return r;const o=this.FindAncestor(s);return o?this.FindElementLocalValue(o,t,!0):r}SetElementLocalValue(e,t,n){var i;null===(i=this.FindElementScope(e))||void 0===i||i.SetLocal(t,n)}DeleteElementLocalValue(e,t){var n;null===(n=this.FindElementScope(e))||void 0===n||n.DeleteLocal(t)}AddProxy(e){this.proxies_[e.GetPath()]=e,this.NotifyListeners_("proxies",this.proxies_)}RemoveProxy(e){const t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&(delete this.proxies_[t],this.NotifyListeners_("proxies",this.proxies_))}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t,this.NotifyListeners_("refs",this.refs_)}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}GetRefElements(){return this.refs_}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t}),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e||t&&n.callback!==t)),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e,this.NotifyListeners_("intersection-observers",this.observers_.intersections)}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&(delete this.observers_.intersections[e],this.NotifyListeners_("intersection-observers",this.observers_.intersections))}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return I()}}function It(e,t){var n;null===(n="string"==typeof e?G(e):e)||void 0===n||n.PushCurrentScope(t)}function kt(e){var t;return(null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function Rt(e){var t;return(null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function Ot(e,t,n,i={}){var r;let s=null;if(s=e instanceof HTMLElement?(null===(r="string"==typeof n?G(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!s)return i;let o=s.GetLocal(t);return I().IsNothing(o)&&s.SetLocal(t,o=i),o}const Nt="__InlineJS_GLOBAL_COMPONENT_KEY__";function Tt(e){const t=globalThis[Nt];if(t||!1===e)return t.component;const n=document.createElement("template");return globalThis[Nt]={root:n,component:I().CreateComponent(n)},globalThis[Nt]}const Gt=300,wt=0,Dt=0,Ft=0;function Lt(e,t){if(!e||I().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;const n=I().GetConcept("animation");return{ease:e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,actor:e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,duration:e.duration||Gt,initialDelay:e.initialDelay||Dt,delay:e.delay||wt,repeats:e.repeats||Ft,allowed:e.allowed||"both"}}function Mt({componentId:e,contextElement:t,target:n,keyframes:i,duration:s=0,initialDelay:o=0,delay:l=0,repeats:a=0,callback:c,onAbort:u}){var h,d;if(s<=0)return r((()=>c(!1))),null;const p=n||t;let m=null;const f=()=>{_||(p.dispatchEvent(new CustomEvent("transition.enter")),(m=p.animate(i)).finished.then((()=>{p.dispatchEvent(new CustomEvent("transition.leave")),(-1===a||a>0)&&(a>0&&a--,setTimeout((()=>f()),l)),r((()=>c(!0)))})).catch((()=>{g(),r((()=>c(!0)))})))};let _=!1,y=!1;const b=()=>{_||(_=!0,g())},g=()=>{var t,n;if(!y)return null===(n=null===(t=G(e))||void 0===t?void 0:t.FindElementScope(p))||void 0===n||n.RemoveUninitCallback(b),p.dispatchEvent(new CustomEvent("transition.canceled")),null==m||m.cancel(),u&&r((()=>u())),y=!0,!1};return null===(d=null===(h=G(e))||void 0===h?void 0:h.FindElementScope(p))||void 0===d||d.AddUninitCallback(b),o>0?setTimeout((()=>!_&&f()),o):f(),b}function jt({componentId:e,contextElement:t,target:n,callback:i,onAbort:s,onPass:o,reverse:l,allowRepeats:a,restore:c}){var u,h,d,p;const m=n||t;if("WaitTransition"in m&&"function"==typeof m.WaitTransition)return m.WaitTransition({componentId:e,contextElement:t,target:n,callback:i,onAbort:s,reverse:l,allowRepeats:a});const f=Lt((null===(h=null===(u=G(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===h?void 0:h.GetData("transition"))||null,l||!1);if(!f||!f.actor||!f.ease||"number"!=typeof f.duration||f.duration<=0)return i(!1),null;const _=e=>{var t;return"function"==typeof(null==f?void 0:f.actor)?null==f?void 0:f.actor(e):f&&(null===(t=f.actor)||void 0===t?void 0:t.Handle(e))},y=e=>{var t;return"function"==typeof f.ease?f.ease(e):f&&(null===(t=f.ease)||void 0===t?void 0:t.Handle(e))||0};let b=!1,g=0;const v=()=>b=!0,E=e=>l?1-e:e,S=()=>{var n,i;return null===(i=null===(n=G(e))||void 0===n?void 0:n.FindElementScope(t))||void 0===i||i.RemoveUninitCallback(v),m.dispatchEvent(new CustomEvent("transition.canceled")),s&&r((()=>s())),!1},C=(e,t,n)=>{o&&r((()=>o({duration:f.duration,elapsed:t,fraction:n,target:m,stage:e})))};null===(p=null===(d=G(e))||void 0===d?void 0:d.FindElementScope(t))||void 0===p||p.AddUninitCallback(v);const A=f.duration,x=e=>{const t=E(e/A),n=y({duration:A,elapsed:e,fraction:t}),i=0==g++?"start":"middle";_({duration:A,elapsed:e,fraction:n,elapsedFraction:t,stage:i,restore:c,target:m,reverse:!!l}),C(i,e,n)};x(0);const P=()=>{he(A,0,a?f.repeats:0,f.delay).While((({elapsed:e})=>{if(b)return S();0==g&&(m.style.transform="",m.style.transformOrigin="50% 50%",m.dispatchEvent(new CustomEvent("transition.enter"))),x(e)})).Final((()=>{if(b)S();else{const e=E(1);_({duration:A,elapsedFraction:e,elapsed:A,target:m,stage:"end",fraction:y({duration:f.duration,elapsed:f.duration,fraction:e}),reverse:!!l}),C("end",f.duration,e),m.dispatchEvent(new CustomEvent("transition.leave")),r((()=>i(!0)))}}))};return(f.initialDelay||0)>0?setTimeout((()=>!b&&P()),f.initialDelay):P(),v}const{entries:Ht,setPrototypeOf:Bt,isFrozen:Ut,getPrototypeOf:$t,getOwnPropertyDescriptor:Wt}=Object;let{freeze:zt,seal:Jt,create:qt}=Object,{apply:Kt,construct:Vt}="undefined"!=typeof Reflect&&Reflect;zt||(zt=function(e){return e}),Jt||(Jt=function(e){return e}),Kt||(Kt=function(e,t,n){return e.apply(t,n)}),Vt||(Vt=function(e,t){return new e(...t)});const Yt=dn(Array.prototype.forEach),Xt=dn(Array.prototype.lastIndexOf),Zt=dn(Array.prototype.pop),Qt=dn(Array.prototype.push),en=dn(Array.prototype.splice),tn=dn(String.prototype.toLowerCase),nn=dn(String.prototype.toString),rn=dn(String.prototype.match),sn=dn(String.prototype.replace),on=dn(String.prototype.indexOf),ln=dn(String.prototype.trim),an=dn(Object.prototype.hasOwnProperty),cn=dn(RegExp.prototype.test),un=(hn=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vt(hn,t)});var hn;function dn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Kt(e,t,i)}}function pn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tn;Bt&&Bt(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Ut(t)||(t[i]=e),r=e)}e[r]=!0}return e}function mn(e){for(let t=0;t<e.length;t++){an(e,t)||(e[t]=null)}return e}function fn(e){const t=qt(null);for(const[n,i]of Ht(e)){an(e,n)&&(Array.isArray(i)?t[n]=mn(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=fn(i):t[n]=i)}return t}function _n(e,t){for(;null!==e;){const n=Wt(e,t);if(n){if(n.get)return dn(n.get);if("function"==typeof n.value)return dn(n.value)}e=$t(e)}return function(){return null}}const yn=zt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bn=zt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),gn=zt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),vn=zt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),En=zt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Sn=zt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cn=zt(["#text"]),An=zt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xn=zt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pn=zt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),In=zt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kn=Jt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Rn=Jt(/<%[\w\W]*|[\w\W]*%>/gm),On=Jt(/\$\{[\w\W]*/gm),Nn=Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Tn=Jt(/^aria-[\-\w]+$/),Gn=Jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wn=Jt(/^(?:\w+script|data):/i),Dn=Jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fn=Jt(/^html$/i),Ln=Jt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Mn=Object.freeze({__proto__:null,ARIA_ATTR:Tn,ATTR_WHITESPACE:Dn,CUSTOM_ELEMENT:Ln,DATA_ATTR:Nn,DOCTYPE_NAME:Fn,ERB_EXPR:Rn,IS_ALLOWED_URI:Gn,IS_SCRIPT_OR_DATA:wn,MUSTACHE_EXPR:kn,TMPLIT_EXPR:On});const jn=1,Hn=3,Bn=7,Un=8,$n=9,Wn=function(){return"undefined"==typeof window?null:window};var zn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wn();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==$n||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,s=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:a,Element:c,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:m}=t,f=c.prototype,_=_n(f,"cloneNode"),y=_n(f,"remove"),b=_n(f,"nextSibling"),g=_n(f,"childNodes"),v=_n(f,"parentNode");if("function"==typeof l){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let E,S="";const{implementation:C,createNodeIterator:A,createDocumentFragment:x,getElementsByTagName:P}=i,{importNode:I}=r;let k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Ht&&"function"==typeof v&&C&&void 0!==C.createHTMLDocument;const{MUSTACHE_EXPR:R,ERB_EXPR:O,TMPLIT_EXPR:N,DATA_ATTR:T,ARIA_ATTR:G,IS_SCRIPT_OR_DATA:w,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:F}=Mn;let{IS_ALLOWED_URI:L}=Mn,M=null;const j=pn({},[...yn,...bn,...gn,...En,...Cn]);let H=null;const B=pn({},[...An,...xn,...Pn,...In]);let U=Object.seal(qt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,W=null,z=!0,J=!0,q=!1,K=!0,V=!1,Y=!0,X=!1,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,se=!0,oe=!1,le={},ae=null;const ce=pn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const he=pn({},["audio","video","img","source","image","track"]);let de=null;const pe=pn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let ye=_e,be=!1,ge=null;const ve=pn({},[me,fe,_e],nn);let Ee=pn({},["mi","mo","mn","ms","mtext"]),Se=pn({},["annotation-xml"]);const Ce=pn({},["title","style","font","a","script"]);let Ae=null;const xe=["application/xhtml+xml","text/html"];let Pe=null,Ie=null;const ke=i.createElement("form"),Re=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ie||Ie!==e){if(e&&"object"==typeof e||(e={}),e=fn(e),Ae=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Pe="application/xhtml+xml"===Ae?nn:tn,M=an(e,"ALLOWED_TAGS")?pn({},e.ALLOWED_TAGS,Pe):j,H=an(e,"ALLOWED_ATTR")?pn({},e.ALLOWED_ATTR,Pe):B,ge=an(e,"ALLOWED_NAMESPACES")?pn({},e.ALLOWED_NAMESPACES,nn):ve,de=an(e,"ADD_URI_SAFE_ATTR")?pn(fn(pe),e.ADD_URI_SAFE_ATTR,Pe):pe,ue=an(e,"ADD_DATA_URI_TAGS")?pn(fn(he),e.ADD_DATA_URI_TAGS,Pe):he,ae=an(e,"FORBID_CONTENTS")?pn({},e.FORBID_CONTENTS,Pe):ce,$=an(e,"FORBID_TAGS")?pn({},e.FORBID_TAGS,Pe):fn({}),W=an(e,"FORBID_ATTR")?pn({},e.FORBID_ATTR,Pe):fn({}),le=!!an(e,"USE_PROFILES")&&e.USE_PROFILES,z=!1!==e.ALLOW_ARIA_ATTR,J=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,V=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,L=e.ALLOWED_URI_REGEXP||Gn,ye=e.NAMESPACE||_e,Ee=e.MATHML_TEXT_INTEGRATION_POINTS||Ee,Se=e.HTML_INTEGRATION_POINTS||Se,U=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Re(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Re(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(J=!1),te&&(ee=!0),le&&(M=pn({},Cn),H=[],!0===le.html&&(pn(M,yn),pn(H,An)),!0===le.svg&&(pn(M,bn),pn(H,xn),pn(H,In)),!0===le.svgFilters&&(pn(M,gn),pn(H,xn),pn(H,In)),!0===le.mathMl&&(pn(M,En),pn(H,Pn),pn(H,In))),e.ADD_TAGS&&(M===j&&(M=fn(M)),pn(M,e.ADD_TAGS,Pe)),e.ADD_ATTR&&(H===B&&(H=fn(H)),pn(H,e.ADD_ATTR,Pe)),e.ADD_URI_SAFE_ATTR&&pn(de,e.ADD_URI_SAFE_ATTR,Pe),e.FORBID_CONTENTS&&(ae===ce&&(ae=fn(ae)),pn(ae,e.FORBID_CONTENTS,Pe)),se&&(M["#text"]=!0),X&&pn(M,["html","head","body"]),M.table&&(pn(M,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,S=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(m,s)),null!==E&&"string"==typeof S&&(S=E.createHTML(""));zt&&zt(e),Ie=e}},Ne=pn({},[...bn,...gn,...vn]),Te=pn({},[...En,...Sn]),Ge=function(e){Qt(n.removed,{element:e});try{v(e).removeChild(e)}catch(t){y(e)}},we=function(e,t){try{Qt(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Qt(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ge(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=rn(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ae&&ye===_e&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=E?E.createHTML(e):e;if(ye===_e)try{t=(new p).parseFromString(r,Ae)}catch(e){}if(!t||!t.documentElement){t=C.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?S:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),ye===_e?P.call(t,X?"html":"body")[0]:X?t.documentElement:s},Fe=function(e){return A.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Me=function(e){return"function"==typeof a&&e instanceof a};function je(e,t,i){Yt(e,(e=>{e.call(n,t,i,Ie)}))}const He=function(e){let t=null;if(je(k.beforeSanitizeElements,e,null),Le(e))return Ge(e),!0;const i=Pe(e.nodeName);if(je(k.uponSanitizeElement,e,{tagName:i,allowedTags:M}),Y&&e.hasChildNodes()&&!Me(e.firstElementChild)&&cn(/<[/\w!]/g,e.innerHTML)&&cn(/<[/\w!]/g,e.textContent))return Ge(e),!0;if(e.nodeType===Bn)return Ge(e),!0;if(Y&&e.nodeType===Un&&cn(/<[/\w]/g,e.data))return Ge(e),!0;if(!M[i]||$[i]){if(!$[i]&&Ue(i)){if(U.tagNameCheck instanceof RegExp&&cn(U.tagNameCheck,i))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(i))return!1}if(se&&!ae[i]){const t=v(e)||e.parentNode,n=g(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const r=_(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,b(e))}}}return Ge(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=tn(e.tagName),i=tn(t.tagName);return!!ge[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===_e?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===i||Ee[i]):Boolean(Ne[n]):e.namespaceURI===me?t.namespaceURI===_e?"math"===n:t.namespaceURI===fe?"math"===n&&Se[i]:Boolean(Te[n]):e.namespaceURI===_e?!(t.namespaceURI===fe&&!Se[i])&&!(t.namespaceURI===me&&!Ee[i])&&!Te[n]&&(Ce[n]||!Ne[n]):!("application/xhtml+xml"!==Ae||!ge[e.namespaceURI]))}(e)?(Ge(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!cn(/<\/no(script|embed|frames)/i,e.innerHTML)?(V&&e.nodeType===Hn&&(t=e.textContent,Yt([R,O,N],(e=>{t=sn(t,e," ")})),e.textContent!==t&&(Qt(n.removed,{element:e.cloneNode()}),e.textContent=t)),je(k.afterSanitizeElements,e,null),!1):(Ge(e),!0)},Be=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in ke))return!1;if(J&&!W[t]&&cn(T,t));else if(z&&cn(G,t));else if(!H[t]||W[t]){if(!(Ue(e)&&(U.tagNameCheck instanceof RegExp&&cn(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&cn(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&cn(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(de[t]);else if(cn(L,sn(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==on(n,"data:")||!ue[e]){if(q&&!cn(w,sn(n,D,"")));else if(n)return!1}else;return!0},Ue=function(e){return"annotation-xml"!==e&&rn(e,F)},$e=function(e){je(k.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let r=t.length;for(;r--;){const s=t[r],{name:o,namespaceURI:l,value:a}=s,c=Pe(o),u=a;let h="value"===o?u:ln(u);if(i.attrName=c,i.attrValue=h,i.keepAttr=!0,i.forceKeepAttr=void 0,je(k.uponSanitizeAttribute,e,i),h=i.attrValue,!re||"id"!==c&&"name"!==c||(we(o,e),h="user-content-"+h),Y&&cn(/((--!?|])>)|<\/(style|title)/i,h)){we(o,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){we(o,e);continue}if(!K&&cn(/\/>/i,h)){we(o,e);continue}V&&Yt([R,O,N],(e=>{h=sn(h,e," ")}));const d=Pe(e.nodeName);if(Be(d,c,h)){if(E&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(d,c)){case"TrustedHTML":h=E.createHTML(h);break;case"TrustedScriptURL":h=E.createScriptURL(h)}if(h!==u)try{l?e.setAttributeNS(l,o,h):e.setAttribute(o,h),Le(e)?Ge(e):Zt(n.removed)}catch(t){we(o,e)}}else we(o,e)}je(k.afterSanitizeAttributes,e,null)},We=function e(t){let n=null;const i=Fe(t);for(je(k.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)je(k.uponSanitizeShadowNode,n,null),He(n),$e(n),n.content instanceof o&&e(n.content);je(k.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,l=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Me(e)){if("function"!=typeof e.toString)throw un("toString is not a function");if("string"!=typeof(e=e.toString()))throw un("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Oe(t),n.removed=[],"string"==typeof e&&(oe=!1),oe){if(e.nodeName){const t=Pe(e.nodeName);if(!M[t]||$[t])throw un("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)i=De("\x3c!----\x3e"),s=i.ownerDocument.importNode(e,!0),s.nodeType===jn&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!ee&&!V&&!X&&-1===e.indexOf("<"))return E&&ne?E.createHTML(e):e;if(i=De(e),!i)return ee?null:ne?S:""}i&&Q&&Ge(i.firstChild);const u=Fe(oe?e:i);for(;l=u.nextNode();)He(l),$e(l),l.content instanceof o&&We(l.content);if(oe)return e;if(ee){if(te)for(c=x.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(H.shadowroot||H.shadowrootmode)&&(c=I.call(r,c,!0)),c}let h=X?i.outerHTML:i.innerHTML;return X&&M["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&cn(Fn,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),V&&Yt([R,O,N],(e=>{h=sn(h,e," ")})),E&&ne?E.createHTML(h):h},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Ie=null,Z=!1},n.isValidAttribute=function(e,t,n){Ie||Oe({});const i=Pe(e),r=Pe(t);return Be(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&Qt(k[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Xt(k[e],t);return-1===n?void 0:en(k[e],n,1)[0]}return Zt(k[e])},n.removeHooks=function(e){k[e]=[]},n.removeAllHooks=function(){k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function Jn({element:e,html:t,type:n="replace",component:i,processDirectives:s=!0,beforeRemove:o,afterRemove:l,beforeInsert:a,afterInsert:c,afterTransitionCallback:u,transitionScope:h,useTransition:d,sanitize:p=!0}){const m="string"==typeof i?i:(null==i?void 0:i.GetId())||"",f=()=>{if(!1===(a&&r(a,"InlineJS.InsertHtml",e)))return;const i=document.createElement("template");i.innerHTML=p?zn.sanitize(t):t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),c&&r(c,"InlineJS.InsertHtml",e);const o=G(m);s&&o&&Array.from(e.children).forEach((e=>yt({component:o,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),(u||d)&&((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),jt({componentId:m,contextElement:h||e,target:e,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),u&&u()}}))},_=e=>{const t=G(m),n=I();Array.from(e.children).forEach((e=>{var i;let r=null==t?void 0:t.FindElementScope(e);r||(r=null===(i=n.InferComponentFrom(e))||void 0===i?void 0:i.FindElementScope(e))?r.Destroy():_(e)}))},y=()=>{!1!==(o&&r((()=>o(!1)),"InlineJS.InsertHtml",e))&&(_(e),Array.from(e.childNodes).forEach((e=>e.remove())),l&&r(l,"InlineJS.InsertHtml",e))};if("replace"===n&&0!=e.childNodes.length){if(!1===(o&&r((()=>o(!0)),"InlineJS.InsertHtml",e)))return;u||d?((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),jt({componentId:m,contextElement:h||e,target:e,reverse:!0,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),y(),f()}})):(y(),f())}else f()}class NextCooldown{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;const n=()=>{var t;return null===(t=this.setCallback_||e||this.callback_)||void 0===t?void 0:t()},i=rt(this.componentId_);!this.queued_&&this.initialized_?(this.queued_=!0,this.ListenNext_(null===(t=G(this.componentId_))||void 0===t?void 0:t.GetBackend().changes,(()=>i((()=>{this.queued_=!1,n()}))))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}ListenNext_(e,t){}}class NextIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextIdleHandler(t)}}class NextNonIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextNonIdleHandler(t)}}class NextTick extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextTickHandler(t)}}class MagicManager{constructor(){this.handlers_={}}AddHandler(e,t,n){let i="",r=null;"function"==typeof e?(i=t||"",r=e):(i=e.GetName(),r=t=>e.Handle(t)),i&&(this.handlers_[i]={callback:r,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class MutationObserver{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{const t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,i;if("childList"===(null==e?void 0:e.type)){const i=e=>{var t;const r=A((null===(t=L(e))||void 0===t?void 0:t.GetRoot())||null);r?n(r).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(i)};e.removedNodes.forEach(i);const r=e.target instanceof HTMLElement?A((null===(t=L(e.target))||void 0===t?void 0:t.GetRoot())||null):"";r&&n(r).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){const t=e.target instanceof HTMLElement?A((null===(i=L(e.target))||void 0===i?void 0:i.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{const i=n.target instanceof HTMLElement?A(n.target):"";if(!i||!(i in t))return;const s=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=s("add",n,t[i].added),l=s("remove",n,t[i].removed),a=s("attribute",n,t[i].attributes);(o||l||a)&&r((()=>n.handler({id:e,added:o,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){const i=ke(this.uniqueMarkers_);return this.handlers_[i]={target:e,handler:t,whitelist:n},i}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}Destroy(){var e;this.uniqueMarkers_={level0:0,level1:0,level2:0},this.handlers_={},null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class ResizeObserver{constructor(){if(this.observer_=null,this.handlers_=new Array,globalThis.MutationObserver)try{this.observer_=new globalThis.ResizeObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((n=>{r((()=>n.handler({entry:e,observer:t})),"InlineJS.ResizeObserver")}))}))}))}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){var i;this.handlers_.push({target:e,handler:t}),null===(i=this.observer_)||void 0===i||i.observe(e,n||{box:"border-box"})}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class Config{constructor(e){if(this.options_=e,this.defaultOptions_={reactiveState:"unoptimized",directivePrefix:"hx"},this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),this.options_=pe(Object.assign({},d("config",!0)),pe(this.options_,this.defaultOptions_)),this.UpdateDirectiveRegex_(),this.options_.directivePrefix&&(this.options_.directivePrefix=this.options_.directivePrefix.replace(/\-/g,"")),this.options_.elementPrefix&&(this.options_.directivePrefix=this.options_.elementPrefix.replace(/\-/g,"")),!this.options_.directiveNameBuilder){const e=this.options_,t=this.defaultOptions_;e.directiveNameBuilder=(n,i=!1)=>{const r=e.directivePrefix||t.directivePrefix||"hx";return i?`data-${r}-${n}`:`${r}-${n}`}}}GetAppName(){return this.options_.appName||""}SetDirectivePrefix(e){this.options_.directivePrefix=e.replace(/\-/g,""),this.UpdateDirectiveRegex_()}GetDirectivePrefix(){return this.options_.directivePrefix||this.defaultOptions_.directivePrefix||"hx"}GetDirectiveRegex(){return this.options_.directiveRegex||this.UpdateDirectiveRegex_()}GetDirectiveName(e,t){return this.options_.directiveNameBuilder?this.options_.directiveNameBuilder(e,t):e}MatchesDirective(e){return this.GetDirectiveRegex().test(e)}SetElementPrefix(e){this.options_.elementPrefix=e.replace(/\-/g,"")}GetElementPrefix(){return this.options_.elementPrefix||this.GetDirectivePrefix()}GetElementRegex(){return this.options_.elementRegex||this.UpdateElementRegex_()}GetElementName(e){return`${this.GetElementPrefix()}-${e}`}MatchesElement(e){return this.GetElementRegex().test(e)}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.options_.reactiveState=e}GetReactiveState(){return this.options_.reactiveState||this.defaultOptions_.reactiveState||"unoptimized"}SetUseGlobalWindow(e){this.options_.useGlobalWindow=e}GetUseGlobalWindow(){return this.options_.useGlobalWindow||!1}SetWrapScopedFunctions(e){this.options_.wrapScopedFunctions=e}GetWrapScopedFunctions(){return this.options_.wrapScopedFunctions||!1}UpdateDirectiveRegex_(){return this.options_.directiveRegex=new RegExp(`^(data-)?${this.GetDirectivePrefix()}-(.+)$`)}UpdateElementRegex_(){return this.options_.elementRegex=new RegExp(`^${this.GetElementPrefix()}-(.+)$`)}}class NativeFetchConcept{Get(e,t){return fetch(e,t)}}class BaseGlobal extends ChangesMonitor{constructor(e,t=0){super(),this.nothing_=new Nothing,this.currentProxyAccessStorage_=null,this.storedObjects_={},this.lastStoredObjectKey_="",this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new Stack,this.scopeContext_=new Stack,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.customElements_={},this.managers_={directive:new DirectiveManager,magic:new MagicManager},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new MutationObserver,this.resizeObserver_=new ResizeObserver,this.nativeFetch_=new NativeFetchConcept,this.fetchConcept_=null,this.concepts_={},this.config_=new Config(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.NotifyListeners_("config",this.config_=e)}GetConfig(){return this.config_}SetCurrentProxyAccessStorage(e){const t=this.currentProxyAccessStorage_;return this.currentProxyAccessStorage_=e,t}GetCurrentProxyAccessStorage(){return this.currentProxyAccessStorage_}UseProxyAccessStorage(e,t){t=t||new ProxyAccessStorage;const n=this.SetCurrentProxyAccessStorage(t),i=r((()=>e(t)),"InlineJS.Global.UseProxyAccessStorage");return this.SetCurrentProxyAccessStorage(n),i}SuspendProxyAccessStorage(e){const t=this.currentProxyAccessStorage_;null==t||t.Suspend();const n=r((()=>e()));return null==t||t.Resume(),n}GenerateUniqueId(e,t){const n=ke(this.uniqueMarkers_,"",e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}StoreObject({object:e,componentId:t,contextElement:n}){var i;if(this.lastStoredObjectKey_=`@!@${be(18)}@!@`,n){const r=null===(i=this.FindComponentById(t||"")||this.InferComponentFrom(n))||void 0===i?void 0:i.FindElementScope(n);if(r)return r.SetLocal(this.lastStoredObjectKey_,e),this.lastStoredObjectKey_}return this.storedObjects_[this.lastStoredObjectKey_]=e,this.NotifyListeners_("stored-objects",this.storedObjects_),this.lastStoredObjectKey_}RetrieveObject(e){return this.RetrieveObject_(e,!0)}PeekObject(e){return this.RetrieveObject_(e,!1)}GetLastObjectKey(){return this.lastStoredObjectKey_}AddComponentMonitor(e){this.componentsMonitorList_.push(e),this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}RemoveComponentMonitor(e){const t=this.componentsMonitorList_.length;this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e)),t!=this.componentsMonitorList_.length&&this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}CreateComponent(e){const t=this.InferComponentFrom(e);if(t)return t;const n=new BaseComponent(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.forEach((e=>r((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),this.NotifyListeners_("components",this.components_),n}RemoveComponent(e){const t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){const e=this.components_[t];delete this.components_[t],e.Destroy(),T(t),this.componentsMonitorList_.slice(0).forEach((t=>r((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent"))),this.NotifyListeners_("components",this.components_)}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&this.components_.hasOwnProperty(e)?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}FindComponentByCallback(e){return Object.values(this.components_).find(e)||null}PushCurrentComponent(e){this.currentComponent_.Push(e),this.NotifyListeners_("current-component",this.currentComponent_)}PopCurrentComponent(){const e=this.currentComponent_.IsEmpty(),t=this.currentComponent_.Pop();return!e&&this.NotifyListeners_("current-component",this.currentComponent_),t}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}PushScopeContext(e){this.scopeContext_.Push(e),this.NotifyListeners_("scope-context",this.scopeContext_)}PopScopeContext(){const e=this.scopeContext_.IsEmpty(),t=this.scopeContext_.Pop();return!e&&this.NotifyListeners_("scope-context",this.scopeContext_),t}PeekScopeContext(){return this.scopeContext_.Peek()}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e),this.NotifyListeners_("attribute-processors",this.attributeProcessors_)}DispatchAttributeProcessing(e){this.DispatchProcessing_(this.attributeProcessors_,e,"InlineJS.Global.DispatchAttribute")}AddTextContentProcessor(e){this.textContentProcessors_.push(e),this.NotifyListeners_("text-content-processors",this.textContentProcessors_)}DispatchTextContentProcessing(e){this.DispatchProcessing_(this.textContentProcessors_,e,"InlineJS.Global.DispatchTextContent")}GetMutationObserver(){return this.mutationObserver_}GetResizeObserver(){return this.resizeObserver_}SetFetchConcept(e){this.fetchConcept_=e,this.NotifyListeners_("fetch-concept",this.fetchConcept_)}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t,this.NotifyListeners_("concepts",this.concepts_)}RemoveConcept(e){delete this.concepts_[e],this.NotifyListeners_("concepts",this.concepts_)}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}AddCustomElement(e,t){this.customElements_.hasOwnProperty(e)||(this.customElements_[e]=t,customElements.define(this.config_.GetElementName(e),t),this.NotifyListeners_("custom-elements",this.customElements_))}FindCustomElement(e){return this.customElements_.hasOwnProperty(e)?this.customElements_[e]:null}CreateChildProxy(e,t,n){return new ChildProxy(e,t,n)}CreateFuture(e){return new Future(e)}IsFuture(e){return e instanceof Future}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof Nothing}CreateRange(e,t){return new Range(e,t)}IsRange(e){return e instanceof Range}CreateTimedRange(e,t,n,i){return new TimedRange(e,t,n,i)}IsTimedRange(e){return e instanceof TimedRange}RetrieveObject_({key:e,componentId:t,contextElement:n},i){if(n){const r=this.FindComponentById(t||"")||this.InferComponentFrom(n);if(r){const t=r.FindElementLocal(n,e,!0);if(t){const n=t.GetLocal(e);return i&&(t.DeleteLocal(e),e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_="")),n}}}if(this.storedObjects_.hasOwnProperty(e)){const t=this.storedObjects_[e];return i&&(e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_=""),delete this.storedObjects_[e],this.NotifyListeners_("stored-objects",this.storedObjects_)),t}return this.CreateNothing()}DispatchProcessing_(e,t,n){const i=it(t.component||this.FindComponentById(t.componentId),t.proxyAccessHandler||null);e.forEach((e=>{r((()=>e(t)),n,t.contextElement)})),i()}}function qn(e,t=0){const n=new BaseGlobal(e,t);return N(),p("global",{base:n}),window.dispatchEvent(new CustomEvent(P)),n}function Kn(e,t=0){return I()||qn(e,t)}const Vn=/\{\{\s*(.+?)\s*\}\}/g,Yn=/\{\{.+?\}\}/;function Xn(e,t,n,i,r){const s=[...n.matchAll(i)];if(0===s.length)return void r(0,n,I().CreateNothing(),"");let o=0;s.forEach(((i,l)=>{var a,c;const u=i[1],h=n.substring(o,i.index);o=(i.index||0)+i[0].length;const d=l<s.length-1?"":n.substring(o);let p=!0,m=null;ot({componentId:e,contextElement:t,callback:()=>{let n=0;et({componentId:e,contextElement:t,expression:u})((e=>{const t=++n;ve(e,(e=>{if(t!==n)return!1;r(l,p?h:"",e,p?d:""),p=!1}))}))},cancelCallback:e=>m=e}),null===(c=null===(a=G(e))||void 0===a?void 0:a.FindElementScope(t))||void 0===c||c.AddUninitCallback((()=>null==m?void 0:m()))}))}function Zn({componentId:e,contextElement:t,text:n,testRegex:i,matchRegex:r,storeObject:s,handler:o}){if(!(i||Yn).test(n))return o(n);const l=[...n.matchAll(r||Vn)].length;if(0===l)return o(n);const a=new Array;let c=0;Xn(e,t,n,r||Vn,((n,i,r,u)=>{const h=3*n;h>=a.length?(a.push(i),I().IsNothing(r)?a.push(""):a.push(s?J(r,e,t):$(r)),a.push(u),c++,c===l&&o(a.join(""))):(a[h+1]=s?J(r,e,t):$(r),o(a.join("")))}))}function Qn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s}){if("string"==typeof n)return i&&Zn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s});[...t.childNodes].forEach((n=>{if(n.parentNode&&n.nodeType===Node.TEXT_NODE&&n.textContent&&(r||Yn).test(n.textContent)){const i=n.textContent,r=document.createDocumentFragment(),o=new Array;Xn(e,t,i,s||Vn,((e,t,n,i)=>{if(t&&r.appendChild(document.createTextNode(t)),!I().IsNothing(n))if(e>=o.length){const e=document.createTextNode("");r.appendChild(e),e.textContent=$(n),o.push(e)}else o[e].textContent=$(n);i&&r.appendChild(document.createTextNode(i))})),n.parentNode.replaceChild(r,n)}}))}function ei({componentId:e,contextElement:t,name:n,value:i}){Zn({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e),storeObject:!0})}function ti({componentId:e,contextElement:t}){Qn({componentId:e,contextElement:t})}function ni(e){const t=e&&L(e);if(t)return void yt({component:t,element:e});const n=I(),i=n.GetConfig(),r=[i.GetDirectiveName("data",!0),i.GetDirectiveName("data",!1)],s=r.map((e=>`[${e}]`)).join(", "),o=new Set;e?(r.some((t=>e.hasAttribute(t)))&&o.add(e),e.querySelectorAll(s).forEach((e=>o.add(e)))):document.querySelectorAll(s).forEach((e=>o.add(e))),o.forEach((e=>{r.some((t=>e.hasAttribute(t)))&&document.contains(e)&&yt({component:n.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}function ii(e){Kn();const t=d();t.hasOwnProperty("disableAutoBootstrap")&&t.disableAutoBootstrap||setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{ni(e)})):ni(e)}),0)}function ri(e,t){let n="",i=null;if("function"==typeof e)if(0===e.length){const t=e();t&&({name:n,callback:i}=t)}else n=e("name"),i=e("callback");else c(e)?({name:n,callback:i}=e):I().GetDirectiveManager().AddHandler(e);n&&i&&(t?I().GetDirectiveManager().AddHandlerExtension(t,i,n):I().GetDirectiveManager().AddHandler(i,n))}function si(e,t){return{name:e,callback:t}}function oi(e,t,n,i,r){const s=I().GetConfig().GetDirectiveName("on"),o=(r||[]).join("."),l=ft(o?`${s}:${n}.${o}`:`${s}:${n}`,i||"");return!!l&&ct(e,t,l)}const li=["bind","event","on"];function ai({component:e,contextElement:t,key:n,event:i,expression:r,options:s,defaultEvent:o,eventWhitelist:l=[],optionBlacklist:a}){const c=()=>a?null==s?void 0:s.filter((e=>!a.includes(e))):s,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?oi(e,t,u(i),r,c()):!(!o||i!==o&&!li.includes(i))&&oi(e,t,u(o),r,c())}function ci(e,t,n){const i=I().GetConfig().GetDirectiveName(t,!1),r=I().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function ui({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:s,useEffect:o=!0}){let l=0,a=et({componentId:e,contextElement:t,expression:i}),u=(e,t)=>{tt(e,(e=>{t==l&&(n?r([n,e]):c(e)?Object.entries(e).forEach(r):s&&("string"==typeof e||Array.isArray(e))&&s("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};o?ot({componentId:e,contextElement:t,callback:()=>a((e=>u(e,++l)))}):a((e=>u(e,l)))}const hi=Array.from(Array(100).keys()).map((e=>e/100));function di(e){const t={root:null,rootMargin:"0px",threshold:0};return c(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=hi),t}class IntersectionObserver{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;const n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{r((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),di(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_.forEach((({target:e})=>{var t;return null===(t=this.observer_)||void 0===t?void 0:t.unobserve(e)})),this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}function pi(e,t=0){return e&&e.match(/^[0-9\.]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseFloat(e):parseFloat(e):t}function mi({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){const s=Array.isArray(e)?e:[e],o=e=>("number"==typeof n?n:n&&n(e))||0;for(let n=0;n<t.length;++n){const l=t[n],a=s.find((e=>e&&l in e));if(a){if(!i||!0!==i({options:e,list:t,option:l,index:n}))if("number"==typeof a[l]){const e=n<t.length-1?t[n+1].trim():"";e&&/^[0-9]/.test(e)?(a[l]=pi(e,o(l)),++n):a[l]=o(l)}else"boolean"==typeof a[l]&&(a[l]=!0)}else r&&r({options:e,list:t,option:l,index:n})}return e}function fi({componentId:e,component:t,contextElement:n,expression:i,argOptions:s,callback:o,options:l,defaultOptionValue:a,useEffect:c}){let u=et({componentId:e,contextElement:n,expression:i}),h=mi({options:l||{lazy:!1,ancestor:-1,threshold:-1},list:s,defaultNumber:0===a?0:a||-1}),d=()=>u((e=>Je(e,o))),p=()=>!1===c?d():ot({componentId:e,contextElement:n,callback:d});if(h.lazy){const i=t||G(e),s={root:h.ancestor<0?null:null==i?void 0:i.FindAncestor(n,h.ancestor),threshold:h.threshold<0?0:h.threshold},o=i?new IntersectionObserver(i.GenerateUniqueId("intob_"),s):null;if(o){const t=null==i?void 0:i.GetProxyAccessHandler();null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:n,entry:i}={})=>{var s;if(null==i?void 0:i.isIntersecting){const i=it(e,t||null);if(n){const t=G(e);null===(s=null==t?void 0:t.FindIntersectionObserver(n))||void 0===s||s.Destroy(),null==t||t.RemoveIntersectionObserver(n)}r(p),i()}}))}else p()}else p()}function _i(e){let t,n="",i=null;if("function"==typeof e)if(0===e.length){const r=e();r&&({name:n,callback:i,onAccess:t}=r)}else n=e("name"),i=e("callback"),t=e("access");else c(e)?({name:n,callback:i,onAccess:t}=e):I().GetMagicManager().AddHandler(e);n&&i&&I().GetMagicManager().AddHandler(i,n,t)}function yi(e,t,n){return{name:e,callback:t,onAccess:n}}function bi(e){return e.startsWith(":")?I().GetConfig().GetDirectiveName("bind")+e:null}function gi(e){return e.startsWith(".")?e.replace(".",I().GetConfig().GetDirectiveName("class:")):null}function vi(e){return e.startsWith("@")?e.replace("@",I().GetConfig().GetDirectiveName("on:")):null}function Ei(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}function Si(e=!0){e&&ii(),I().AddAttributeProcessor(ei),I().AddTextContentProcessor(ti)}function Ci(){p("global",{bootstrap:ni,waitForGlobal:k,get:I,create:qn,traverseInterpolationReplacements:Xn,interpolateText:Zn,interpolate:Qn,processDirectives:yt})}function Ai(){p("utilities",{beginsWith:h,endsWith:K,toCamelCase:v,toSnakeCase:Se,insertHtml:Jn,findAncestor:V,getAttribute:te,findFirstAttribute:ne,findFirstAttributeValue:ie,setAttribute:Ee,isBooleanAttribute:re,supportsAttributes:U,getTarget:o,getTargets:l,isEqual:le,isObject:c,isCustomElement:oe,toString:$,deepCopy:z,mergeObjects:pe,tidyPath:me,pathToRelative:fe,splitPath:_e,joinPath:ye,getRandomString:be,measureCallback:de,encodeAttribute:q,decodeAttribute:W,encodeValue:J,decodeValue:B,isTemplate:Ce,isInsideTemplate:Ae})}function xi(){p("values",{future:Future,loop:Loop,nothing:Nothing,stack:Stack})}function Pi(){p("version",{major:1,minor:4,patch:3,get value(){return`${this.major}.${this.minor}.${this.patch}`},toString(){return this.value}})}function Ii(){Si(),Ci(),Ai(),xi(),Pi()}},204:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDetailElementCompact=t.StripeDetailElement=void 0;const r=n(543),s=n(9);class StripeDetailElement extends s.StripeGenericField{constructor(){super(...arguments),this.input=null,this.name="",this.value=""}ToggleFocus(e){const t=this.GetInput_();t&&(e?t.focus():t.blur())}Reset(){const e=this.GetInput_();e&&(e.value="")}AddDetails(e){const t=this.GetInput_();if(!this.name||!(null==t?void 0:t.value)&&!this.value)return;e.billingDetails=e.billingDetails||{};const n=this.name.split(".");if(1==n.length)e.billingDetails[this.name]=(null==t?void 0:t.value)||this.value;else{let i=e.billingDetails;n.slice(0,-1).forEach((e=>{i=i[e]=i[e]||{}})),i[n.slice(-1)[0]]=(null==t?void 0:t.value)||this.value}}GetInput_(){return this.input||this.querySelector("input")}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],StripeDetailElement.prototype,"input",void 0),i([(0,r.Property)({type:"string"})],StripeDetailElement.prototype,"name",void 0),i([(0,r.Property)({type:"string",checkStoredObject:!0})],StripeDetailElement.prototype,"value",void 0),t.StripeDetailElement=StripeDetailElement,t.StripeDetailElementCompact=function(){(0,r.RegisterCustomElement)(StripeDetailElement,"stripe-detail")}},449:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeFieldElementCompact=t.StripeFieldElement=void 0;const r=n(936),s=n(543),o=n(9);class StripeFieldElement extends o.StripeGenericField{constructor(){super(),this.stripeField_=null,this.isReady_=!1,this.isComplete_=!1,this.lastError_=null,this.readyWaiters_=new Array,this.changeListeners=new Array,this.options=null,this.type="",this.oncustomready="",this.oncustomcomplete="",this.oncustomerror=""}IsInteractive(){return!0}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}AddChangeListener(e){this.changeListeners.push(e)}RemoveChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)}ToggleFocus(e){var t,n;this.stripeField_&&(e?null===(t=this.stripeField_)||void 0===t||t.focus():null===(n=this.stripeField_)||void 0===n||n.blur())}Reset(){var e;this.stripeField_&&(null===(e=this.stripeField_)||void 0===e||e.clear())}AddDetails(e){this.stripeField_&&("card"===this.type||"number"===this.type||"cardNumber"===this.type)&&(e.method=this.stripeField_)}HandleElementScopeDestroyed_(e){var t;super.HandleElementScopeDestroyed_(e),null===(t=this.GetStripe_())||void 0===t||t.RemoveStripeField(this),this.stripeField_=null}HandlePostProcess_(){var e;super.HandlePostProcess_(),null===(e=this.GetStripe_())||void 0===e||e.WaitInstance().then((e=>{var t;if(!(null==e?void 0:e.stripe)||!e.elements)return;let n="";["number","expiry","cvc"].includes(this.type)?n=`card${this.type.substring(0,1).toUpperCase()}${this.type.substring(1)}`:["card","cardNumber","cardExpiry","cardCvc","postalCode","paymentRequestButton","iban","idealBank"].includes(this.type)&&(n=this.type),n?(this.stripeField_=e.elements.create(n,this.options||(null===(t=this.GetStripe_())||void 0===t?void 0:t.options)||void 0),this.stripeField_.on("ready",(()=>{this.isReady_=!0,this.oncustomready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})),this.stripeField_.on("change",(e=>{((null==e?void 0:e.error)||null)!==this.lastError_&&(this.lastError_=(null==e?void 0:e.error)||null,this.oncustomerror&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomerror,disableFunctionCall:!1})(void 0,[this.lastError_],{error:this.lastError_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("error",this.lastError_)))))),((null==e?void 0:e.complete)||!1)!=this.isComplete_&&(this.isComplete_=(null==e?void 0:e.complete)||!1,this.oncustomcomplete&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomcomplete,disableFunctionCall:!1})(void 0,[this.isComplete_],{complete:this.isComplete_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("complete",this.isComplete_))))))})),this.stripeField_.mount(this)):(0,r.JournalWarn)("The element type provided is invalid.","StripeField.Mount",this)})).catch((e=>(0,r.JournalError)(e,"StripeField.Mount",this)))}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripeFieldElement.prototype,"options",void 0),i([(0,s.Property)({type:"string"})],StripeFieldElement.prototype,"type",void 0),i([(0,s.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomready",void 0),i([(0,s.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomcomplete",void 0),i([(0,s.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomerror",void 0),t.StripeFieldElement=StripeFieldElement,t.StripeFieldElementCompact=function(){(0,s.RegisterCustomElement)(StripeFieldElement,"stripe-field")}},9:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeGenericField=void 0;const r=n(936),s=n(543);class StripeGenericField extends s.CustomElement{constructor(){super(...arguments),this.stripe=null}IsInteractive(){return!1}WaitReady(){return Promise.resolve()}AddChangeListener(e){}RemoveChangeListener(e){}ToggleFocus(e){}Reset(){}AddDetails(e){}HandlePostAttributesProcessPostfix_(){var e;super.HandlePostAttributesProcessPostfix_(),null===(e=this.GetStripe_())||void 0===e||e.AddStripeField(this)}GetStripe_(){return this.stripe||(0,r.FindAncestor)(this,(e=>"AddStripeField"in e))}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripeGenericField.prototype,"stripe",void 0),t.StripeGenericField=StripeGenericField},113:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentMenthodElementCompact=t.StripePaymentMenthodElement=void 0;const r=n(543),s=n(9);class StripePaymentMenthodElement extends s.StripeGenericField{constructor(){super({isTemplate:!0,isHidden:!0}),this.value=""}AddDetails(e){this.value&&(e.method=this.value)}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],StripePaymentMenthodElement.prototype,"value",void 0),t.StripePaymentMenthodElement=StripePaymentMenthodElement,t.StripePaymentMenthodElementCompact=function(){(0,r.RegisterCustomElement)(StripePaymentMenthodElement,"stripe-payment-method")}},372:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeElementCompact=t.StripeElement=void 0;const r=n(936),s=n(543);class StripeElement extends s.CustomElement{constructor(){super(),this.stripe_=null,this.elements_=null,this.mounting_=!1,this.mounted_=!1,this.isReady_=!1,this.readyWaiters_=new Array,this.fields_=null,this.readyFields_=null,this.instanceWaiters_=new Array,this.interactiveFields_=null,this.completeFields_=null,this.errorFields_=null,this.options=null,this.publicKey="",this.oncustomready="",this.oncustomcomplete="",this.oncustomerror="",this.defer=!1,this.focusnext=!1}AddStripeField(e){this.fields_=this.fields_||[],this.fields_.push(e),e.WaitReady().then((()=>{this.readyFields_=this.readyFields_||[],this.readyFields_.push(e),e.IsInteractive()&&(this.interactiveFields_=this.interactiveFields_||[],this.interactiveFields_.push(e)),this.fields_&&this.readyFields_&&this.fields_.length<=this.readyFields_.length&&(0,r.JournalTry)((()=>{this.isReady_=!0,this.oncustomready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))}))})),e.AddChangeListener(((t,n)=>{if("complete"===t){let t=!1;this.completeFields_=this.completeFields_||[],n&&!this.completeFields_.includes(e)?(this.completeFields_.push(e),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length)):!n&&this.completeFields_.includes(e)&&(this.completeFields_=this.completeFields_.filter((t=>t!==e)),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length-1)),t&&this.oncustomcomplete&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomcomplete,disableFunctionCall:!1})(void 0,[!!n],{complete:!!n}),n&&this.focusnext&&this.FocusNextField(e)}else if("error"===t){let t=!1;this.errorFields_=this.errorFields_||[],this.errorFields_.push(e),this.errorFields_=this.errorFields_||[],n&&!this.errorFields_.includes(e)?(this.errorFields_.push(e),t=1==this.errorFields_.length):!n&&this.errorFields_.includes(e)&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)),t=0==this.errorFields_.length),t&&this.oncustomerror&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomerror,disableFunctionCall:!1})(void 0,[n],{error:n})}}))}RemoveStripeField(e){this.fields_&&(this.fields_=this.fields_.filter((t=>t!==e))),this.readyFields_&&(this.readyFields_=this.readyFields_.filter((t=>t!==e))),this.interactiveFields_&&(this.interactiveFields_=this.interactiveFields_.filter((t=>t!==e))),this.completeFields_&&(this.completeFields_=this.completeFields_.filter((t=>t!==e))),this.errorFields_&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)))}FocusNextField(e){if(this.fields_){const t=this.fields_.indexOf(e);t>=0&&t<this.fields_.length-1&&this.fields_[t+1].ToggleFocus(!0)}}GetDetails(){return{stripe:this.stripe_,elements:this.elements_}}GetInstance(){return this.stripe_}WaitInstance(){return new Promise((e=>{this.mounted_?e(this.GetDetails()):this.instanceWaiters_.push((()=>e(this.GetDetails())))}))}Mount(){this.mounted_||this.mounting_||(this.mounting_=!0,this.LoadResources().then((()=>{this.mounting_=!1,this.mounted_=!0,this.stripe_=Stripe(this.publicKey),this.elements_=this.stripe_.elements(),this.instanceWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})))}Pay(e,t=!1){return this.PayOrSetup_(!0,e,t)}Setup(e){return this.PayOrSetup_(!1,e)}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}HandleElementScopeDestroyed_(e){super.HandleElementScopeDestroyed_(e),this.stripe_=null}HandlePostProcess_(){super.HandlePostProcess_(),!this.defer&&this.Mount()}PayOrSetup_(e,t,n=!1){return new Promise(((i,r)=>{this.WaitInstance().then((s=>{var o,l;if(!(null==s?void 0:s.stripe))return i(!1);const a={};if(null===(o=this.fields_)||void 0===o||o.forEach((e=>e.AddDetails(a))),!a.method)return i(!1);let c;c="string"==typeof a.method?{payment_method:a.method}:{payment_method:{card:a.method,billing_details:a.billingDetails}},e?((null===(l=a.billingDetails)||void 0===l?void 0:l.email)&&(c.receipt_email=a.billingDetails.email),n&&(c.setup_future_usage="off_session"),s.stripe.confirmCardPayment(t,c).then(i).catch(r)):s.stripe.confirmCardSetup(t,c).then(i).catch(r)})).catch(r)}))}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripeElement.prototype,"options",void 0),i([(0,s.Property)({type:"string"})],StripeElement.prototype,"publicKey",void 0),i([(0,s.Property)({type:"string"})],StripeElement.prototype,"oncustomready",void 0),i([(0,s.Property)({type:"string"})],StripeElement.prototype,"oncustomcomplete",void 0),i([(0,s.Property)({type:"string"})],StripeElement.prototype,"oncustomerror",void 0),i([(0,s.Property)({type:"boolean"})],StripeElement.prototype,"defer",void 0),i([(0,s.Property)({type:"boolean"})],StripeElement.prototype,"focusnext",void 0),t.StripeElement=StripeElement,t.StripeElementCompact=function(){(0,s.RegisterCustomElement)(StripeElement,"stripe")}},0:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const i=n(936),r=n(372),s=n(449),o=n(204),l=n(113);t.InlineJSStripe=function(){(0,i.WaitForGlobal)().then((()=>{(0,r.StripeElementCompact)(),(0,s.StripeFieldElementCompact)(),(0,o.StripeDetailElementCompact)(),(0,l.StripePaymentMenthodElementCompact)()}))}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(0,n(0).InlineJSStripe)()})();
|