@benbraide/inlinejs-stripe 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
package/dist/inlinejs-stripe.js
CHANGED
@@ -2083,7 +2083,7 @@ function WaitTransition({ componentId, contextElement, target, callback, onAbort
|
|
2083
2083
|
return false;
|
2084
2084
|
};
|
2085
2085
|
(_d = (_c = (0,_component_find__WEBPACK_IMPORTED_MODULE_0__.FindComponentById)(componentId)) === null || _c === void 0 ? void 0 : _c.FindElementScope(contextElement)) === null || _d === void 0 ? void 0 : _d.AddUninitCallback(abort);
|
2086
|
-
(0,_utilities_loop__WEBPACK_IMPORTED_MODULE_3__.
|
2086
|
+
(0,_utilities_loop__WEBPACK_IMPORTED_MODULE_3__.CreateAnimationLoop)(info.duration, 0, (allowRepeats ? info.repeats : 0), info.delay).While(({ elapsed }) => {
|
2087
2087
|
if (aborted) {
|
2088
2088
|
return onAborted();
|
2089
2089
|
}
|
@@ -2970,6 +2970,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2970
2970
|
/* harmony export */ "Config": () => (/* reexport safe */ _global_config__WEBPACK_IMPORTED_MODULE_78__.Config),
|
2971
2971
|
/* harmony export */ "Context": () => (/* reexport safe */ _component_context__WEBPACK_IMPORTED_MODULE_63__.Context),
|
2972
2972
|
/* harmony export */ "ContextKeys": () => (/* reexport safe */ _utilities_context_keys__WEBPACK_IMPORTED_MODULE_30__.ContextKeys),
|
2973
|
+
/* harmony export */ "CreateAnimationLoop": () => (/* reexport safe */ _utilities_loop__WEBPACK_IMPORTED_MODULE_37__.CreateAnimationLoop),
|
2973
2974
|
/* harmony export */ "CreateChildProxy": () => (/* reexport safe */ _proxy_create_child__WEBPACK_IMPORTED_MODULE_47__.CreateChildProxy),
|
2974
2975
|
/* harmony export */ "CreateDirective": () => (/* reexport safe */ _directive_create__WEBPACK_IMPORTED_MODULE_88__.CreateDirective),
|
2975
2976
|
/* harmony export */ "CreateDirectiveExpansionRule": () => (/* reexport safe */ _directive_expand__WEBPACK_IMPORTED_MODULE_91__.CreateDirectiveExpansionRule),
|
@@ -4883,6 +4884,7 @@ function AreObjects(targets) {
|
|
4883
4884
|
|
4884
4885
|
__webpack_require__.r(__webpack_exports__);
|
4885
4886
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
4887
|
+
/* harmony export */ "CreateAnimationLoop": () => (/* binding */ CreateAnimationLoop),
|
4886
4888
|
/* harmony export */ "CreateLoop": () => (/* binding */ CreateLoop)
|
4887
4889
|
/* harmony export */ });
|
4888
4890
|
/* harmony import */ var _values_loop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../values/loop */ "./node_modules/@benbraide/inlinejs/lib/esm/values/loop.js");
|
@@ -4920,6 +4922,39 @@ function CreateLoop(duration, delay = 1000, repeats = 0, repeatDelay = 0, vsync
|
|
4920
4922
|
setTimeout(step.bind(null, doWhile, doFinal, doAbort), delay);
|
4921
4923
|
});
|
4922
4924
|
}
|
4925
|
+
function CreateAnimationLoop(duration, delay = 1000, repeats = 0, repeatDelay = 0) {
|
4926
|
+
let activeDelay = delay;
|
4927
|
+
let startTimestamp = -1, lastTimestamp = -1, aborted = false, passes = 0, pass = (doWhile, doFinal, timestamp) => {
|
4928
|
+
if (aborted) {
|
4929
|
+
return;
|
4930
|
+
}
|
4931
|
+
if (startTimestamp == -1) {
|
4932
|
+
startTimestamp = timestamp;
|
4933
|
+
}
|
4934
|
+
let elapsed = (timestamp - startTimestamp);
|
4935
|
+
if (duration && elapsed >= duration) {
|
4936
|
+
if (!repeats) {
|
4937
|
+
return doFinal({ passes, elapsed, duration });
|
4938
|
+
}
|
4939
|
+
activeDelay = repeatDelay;
|
4940
|
+
lastTimestamp = timestamp;
|
4941
|
+
(repeats > 0) && (repeats -= 1);
|
4942
|
+
}
|
4943
|
+
if (lastTimestamp == -1) {
|
4944
|
+
lastTimestamp = timestamp;
|
4945
|
+
}
|
4946
|
+
let wait = (timestamp - lastTimestamp);
|
4947
|
+
if (wait >= activeDelay) {
|
4948
|
+
lastTimestamp = (timestamp - (wait - activeDelay));
|
4949
|
+
activeDelay = delay;
|
4950
|
+
doWhile({ passes: ++passes, elapsed, duration, abort: () => (aborted = true) });
|
4951
|
+
}
|
4952
|
+
requestAnimationFrame(pass.bind(null, doWhile, doFinal));
|
4953
|
+
};
|
4954
|
+
return new _values_loop__WEBPACK_IMPORTED_MODULE_0__.Loop((doWhile, doFinal) => {
|
4955
|
+
requestAnimationFrame(pass.bind(null, doWhile, doFinal));
|
4956
|
+
});
|
4957
|
+
}
|
4923
4958
|
|
4924
4959
|
|
4925
4960
|
/***/ }),
|
@@ -1 +1 @@
|
|
1
|
-
(()=>{"use strict";var e={992:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Q,AddDirectiveExpansionRule:()=>L,AddDirectiveHandler:()=>It,AddMagicHandler:()=>Mt,AddOutsideEventExcept:()=>Ee,AddOutsideEventListener:()=>ye,ApplyDirectiveExpansionRules:()=>J,AreObjects:()=>_,AttributeInterpolator:()=>Ct,AutoBootstrap:()=>kt,BaseComponent:()=>Ae,BaseGlobal:()=>Fe,BeginsWith:()=>c,BindDirectiveExpansionRule:()=>Lt,BindEvent:()=>Pt,BootstrapAndAttach:()=>xt,BuildGetterProxyOptions:()=>ze,BuildIntersectionOptions:()=>Rt,BuildProxyOptions:()=>He,CallIfFunction:()=>Ze,Changes:()=>de,ChildProxy:()=>Pe,ClassDirectiveExpansionRule:()=>jt,Config:()=>we,Context:()=>he,ContextKeys:()=>d,CreateChildProxy:()=>X,CreateDirective:()=>z,CreateDirectiveExpansionRule:()=>B,CreateDirectiveHandlerCallback:()=>At,CreateGlobal:()=>$e,CreateInplaceProxy:()=>Le,CreateLoop:()=>k,CreateMagicHandlerCallback:()=>Bt,CreateReadonlyProxy:()=>je,DeepCopy:()=>g,DefaultTransitionDelay:()=>ct,DefaultTransitionDuration:()=>at,DefaultTransitionRepeats:()=>ut,DeleteProxyProp:()=>Z,DirectiveManager:()=>fe,DisableProxyAction:()=>Je,DispatchDirective:()=>T,ElementScope:()=>ke,ElementScopeKey:()=>W,EndsWith:()=>b,EvaluateLater:()=>et,EvaluateMagicProperty:()=>Y,ExtractDuration:()=>Nt,FindComponentById:()=>F,FindComponentByName:()=>R,FindComponentByRoot:()=>$,FlattenDirective:()=>D,ForwardEvent:()=>Gt,Future:()=>r,GenerateFunctionFromString:()=>Xe,GenerateUniqueId:()=>le,GenerateValueReturningFunction:()=>Ye,GenerateVoidFunction:()=>Qe,GenericProxy:()=>ne,GetAttribute:()=>E,GetConfig:()=>M,GetDefaultUniqueMarkers:()=>re,GetDirectiveValue:()=>wt,GetElementContent:()=>_t,GetElementScopeId:()=>K,GetGlobal:()=>Te,GetLocal:()=>ot,GetOrCreateGlobal:()=>Ne,GetProxyProp:()=>ee,GetTarget:()=>p,GetTargets:()=>m,GlobalCreatedEvent:()=>De,IncrementUniqueMarkers:()=>oe,InferComponent:()=>V,InitComponentCache:()=>O,InitJITProxy:()=>Ue,InlineJSGlobalKey:()=>Re,InsertHtml:()=>pt,Interpolate:()=>yt,InterpolateText:()=>bt,IntersectionObserver:()=>$t,IsEqual:()=>x,IsObject:()=>v,JoinPath:()=>S,JoinUniqueMarkers:()=>se,JournalError:()=>o,JournalLog:()=>Ht,JournalTry:()=>s,JournalWarn:()=>N,LazyCheck:()=>Tt,Loop:()=>l,MagicManager:()=>Ge,MutationObserver:()=>Se,NativeFetchConcept:()=>Oe,NextTick:()=>mt,Nothing:()=>a,OnDirectiveExpansionRule:()=>Jt,PathToRelative:()=>A,PeekCurrentComponent:()=>ue,PeekCurrentScope:()=>ge,PopCurrentComponent:()=>ce,PopCurrentScope:()=>_e,ProcessDirectives:()=>q,ProxyKeys:()=>h,PushCurrentComponent:()=>ae,PushCurrentScope:()=>ve,QueryGlobalComponent:()=>lt,RemoveDirectiveExpansionRule:()=>j,RemoveOutsideEventListener:()=>Ce,ReplaceText:()=>gt,ResolveKeyValue:()=>Ot,ResolveOptions:()=>Dt,ResolveTransition:()=>dt,RootProxy:()=>ie,Scope:()=>Ie,SetAttributeUtil:()=>P,SetProxyProp:()=>te,SplitPath:()=>G,Stack:()=>i,StreamData:()=>tt,SubscribeToChanges:()=>it,SupportsAttributes:()=>y,TextContentInterpolator:()=>Et,TidyPath:()=>I,ToCamelCase:()=>u,ToString:()=>Be,TraverseDirectives:()=>U,UnbindOutsideEvent:()=>xe,UseEffect:()=>rt,WaitForGlobal:()=>Me,WaitPromise:()=>qe,WaitTransition:()=>ht,WaitWhile:()=>nt});class i{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}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}}class r{constructor(e){this.callback_=e}Get(){return this.callback_()}}function o(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function s(e,t,n){try{return e()}catch(e){o(e,t,n)}}class l{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===s((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>s((()=>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 a{}function c(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}function u(e,t,n){let[i="",...r]=e.trim().split(n||"-"),o=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?o(i):i)+(r||[]).map((e=>o(e))).join("")}const d={self:"self",event:"event",scope:"scope"},h={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function p(e){return(Array.isArray(e)||e&&"object"==typeof e)&&h.target in e?p(e[h.target]):e}function m(e){return e.map((e=>p(e)))}function f(e){return(e=p(e))&&"object"==typeof e&&(h.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function v(e){return!!f(e)}function _(e){return-1==e.findIndex((e=>!f(e)))}function g(e){if(e=p(e),!Array.isArray(e)&&!v(e))return e;if(Array.isArray(e))return e.map((e=>g(e)));let t={};return Object.entries(e).forEach((([e,n])=>t[e]=g(n))),t}function b(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function y(e){return(e=p(e))&&"getAttribute"in e&&"setAttribute"in e}function C(e,t){return t&&y(e)?e.getAttribute(t):null}function E(e,t){for(let n of Array.isArray(t)?t:[t]){let t=C(e,n);if(t)return t}return null}function x(e,t,n=!0){let[i,r]=n?m([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)=>!x(e,r[t],n)));if(_([i,r])){let e=Object.keys(i),t=Object.keys(r);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!x(i[e],r[e],n)))}return i==r}function k(e,t=1e3,n=0,i=0,r=!0){t=t||1;let o=e?Math.floor(e/t):-1,s=0,a=!1,c=0,u=(n,i)=>{if(r){let r=++c;requestAnimationFrame((()=>r==c&&i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})))}else i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})},d=(r,l,c)=>{if(a)return c();if(s+=1,o>=0&&s>=o){if(!n)return l({passes:o,elapsed:o*t,duration:e});setTimeout((()=>setTimeout(d.bind(null,r,l,c),t)),i),u(o,r),n>0&&(n-=1)}else setTimeout(d.bind(null,r,l,c),t),u(s,r)};return new l(((e,n,i)=>{setTimeout(d.bind(null,e,n,i),t)}))}function I(e){return(e=e?e.trim():"")?e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"").replace(/^[\/?&=]+/,"").split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),""):""}function A(e,t,n){return(e=I(e))===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 G(e,t,n){let i=(e=t?A(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function S({base:e,query:t},n,i,r){let o=`${I(e)}?${t}`;return o=n?A(o,n,i):I(o),o=r?I(`${n}/${o}`):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function P(e,t,n){t&&y(e)&&e.setAttribute(t,n)}const w="InlineJS_Comp_Cache";function O(){return globalThis[w]={id:"",component:null}}function F(e){let t=globalThis[w]=globalThis[w]||O();return e===t.id||(t.component=Te().FindComponentById(e),t.id=t.component?e:""),t.component}function R(e){return Te().FindComponentByName(e)}function $(e){return Te().FindComponentByRoot(e)}function N(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function D(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 T(e,t,n,i=0){let r="string"==typeof e?F(e):e;if(!r)return o(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=r.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++i),l=l||Te().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){let 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])}return l?(0!=i||a||r.CreateElementScope(t),s((()=>{l(Object.assign(Object.assign({},D(n)),{componentId:r.GetId(),component:r,contextElement:t}))}),"InlineJS.DispatchDirective",t),!0):(N(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1)}function M(){return Te().GetConfig()}function B(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function L(e){return Te().GetDirectiveManager().AddExpansionRule(e)}function j(e){Te().GetDirectiveManager().RemoveExpansionRule(e)}function J(e){return Te().GetDirectiveManager().Expand(e)}let H={};function z(e,t){if(!e||!(e=e.trim()))return null;if((t=t.trim())===e&&(t=""),e in H)return{meta:H[e],value:t};let n=J(e),i=n.match(M().GetDirectiveRegex());if(!i||3!=i.length||!i[2])return null;let r=i[2].indexOf(":"),o=-1==r?[i[2]]:[i[2].substring(0,r),i[2].substring(r+1)],s="",l="";o.length>1?[s,l]=o:[l]=o;let a=l.split("."),c="";s?c=a[0]:s=a[0],a.splice(0,1);let u=s.split("-"),d={view:{original:e,expanded:n},name:{value:s,joined:u.join("."),parts:u},arg:{key:c,options:a||[]}};return H[e]=d,{meta:d,value:t}}function U({element:e,callback:t,attributeCallback:n}){Array.from(e.attributes||[]).forEach((i=>{try{n&&n(i.name,i.value||"");let e=z(i.name,i.value||"");e&&t(e)}catch(t){o(t,"InlineJS.TraverseDirectives",e)}}))}function q({component:e,element:t,options:n={}}){var i;if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||e instanceof HTMLTemplateElement||!e.closest("template"))}(t,n))return;let r="string"==typeof e?F(e):e;if(!r)return o("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let s=0;U({element:t,callback:n=>{T(e,t,n,s)&&(t.removeAttribute(n.meta.view.original),++s)},attributeCallback:(e,n)=>Te().DispatchAttributeProcessing({name:e,value:n,componentId:r.GetId(),component:r,contextElement:t})}),Te().DispatchTextContentProcessing({componentId:r.GetId(),component:r,contextElement:t}),n.ignoreChildren||t instanceof HTMLTemplateElement||(null==r||r.PushSelectionScope(),Array.from(t.children).forEach((t=>q({component:e,options:n,element:t}))),null==r||r.PopSelectionScope()),null===(i=null==r?void 0:r.CreateElementScope(t))||void 0===i||i.ExecutePostProcessCallbacks()}const W="__InlineJS_ELSCOPE_KEY__";function K(e){let t="";for(;e;){if(t=W in(n=e)&&n[W],t||e===document.body)return t||"";e=e.parentElement}var n;return""}function V(e){let t=K(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?F(t[1]):null}function Y(e,t,n,i="",r=!0){let l="string"==typeof e?F(e):e;if(!l)return o(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),Te().CreateNothing();let a=Te().GetMagicManager().FindHandler(i&&n.startsWith(i)?n.substring(i.length):n,{contextElement:t,componentId:l.GetId(),component:l});if(!a){if(r&&i&&n.startsWith(`${i}${i}`)){let e=l.GetId();return t=>{let r=V(t)||F(e);if(!r)return null;let o=r.FindElementScope(t),s=o&&o.GetLocal(n.substring(i.length));return o&&!Te().IsNothing(s)?s:Y(r.GetId(),t,n,`${i}${i}`,!1)}}return Te().CreateNothing()}return s((()=>a({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Q(e,t,n,i,r=!0){if(!i)return;let o={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(o),!r)return;let s=t.split(".");for(;s.length>2;)s.pop(),i.Add({original:o,path:s.join(".")})}function Z(e,t,n,i){var r;if(!(i in t))return!1;let o=F(e);return null===(r=null==o?void 0:o.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==o||o.RemoveProxy(`${n}.${i}`),Q("delete",n,i,null==o?void 0:o.GetBackend().changes),!0}function X(e,t,n,i){if(!e)return null;let r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!v(n))return null;let o=Te().CreateChildProxy(e,t,n);return i&&i.AddProxy(o),o}function ee(e,t,n,i,r){var o;if(i===h.target)return t;if(i===h.componentId)return e;if(i===h.name)return n.split(".").at(-1);if(i===h.path)return n;if(i===h.parentPath)return n.split(".").slice(0,-1).join(".")||"";let s=i in t;if(!s&&r){let t=r(F(e)||void 0,i);if(!Te().IsNothing(t))return Te().IsFuture(t)?t.Get():t}if(s&&!t.hasOwnProperty(i))return t[i];let l=s?t[i]:null;if(Te().IsFuture(l))return l.Get();let a=F(e);return null==a||a.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(o=X((null==a?void 0:a.FindProxy(n))||null,i,l,a||void 0))||void 0===o?void 0:o.GetNative())||l}function te(e,t,n,i,r){var o;if(i in t&&r===t[i])return!0;let s=F(e);return null===(o=null==s?void 0:s.FindProxy(n))||void 0===o||o.RemoveChild(i),t[i]=r,null==s||s.RemoveProxy(`${n}.${i}`),Q("set",`${n}.${i}`,i,null==s?void 0:s.GetBackend().changes),!0}class ne{constructor(e,t,n,i){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);let r=this.componentId_,o=this.GetPath(),s=(e,t)=>{let{context:n}=null==e?void 0:e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){let e=n.Peek(t.substring(1),Te().CreateNothing());if(!Te().IsNothing(e))return e}let r=n.Peek(d.self),o=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!Te().IsNothing(o))return o;let s=i?Y(e,r,t,"$"):Te().CreateNothing();return Te().IsNothing(s)&&t&&t in globalThis&&(s=globalThis[t]),s},l=!this.parentPath_,a={get:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):ee(r,e,o,t.toString(),l?s:void 0),set:(e,t,n)=>"symbol"==typeof t||"prototype"===t?Reflect.set(e,t,n):te(r,e,o,t.toString(),n),deleteProperty:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):Z(r,e,o,t.toString()),has:(e,t)=>"symbol"!=typeof t||Reflect.has(e,t)};this.native_=new window.Proxy(this.target_,a)}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}}class ie extends ne{constructor(e,t){super(e,t,`Proxy<${e}>`)}}function re(){return{level0:0,level1:0,level2:0}}function oe(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?oe(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function se(e){return`${e.level2}_${e.level1}_${e.level0}`}function le(e,t,n,i){return oe(e),`${t||""}${n||""}${se(e)}${i||""}`}function ae(e){Te().PushCurrentComponent(e)}function ce(){return Te().PopCurrentComponent()}function ue(){return Te().PeekCurrentComponent()}class de{constructor(e){this.componentId_=e,this.nextTickHandlers_=new Array,this.isScheduled_=!1,this.list_=new Array,this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_=new i,this.origins_=new i}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e)}Schedule(){this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;let e=new Array;this.list_.splice(0).forEach((t=>{Object.values(this.subscribers_).filter((e=>e.path===t.path&&e.callback!==(e=>"original"in e?e.original.origin:e.origin)(t))).forEach((n=>((t,n)=>{let i=e.find((e=>e.callback===n));i?i.changes.push(t):e.push({callback:n,changes:new Array(t)})})(t,n.callback)))})),e.forEach((e=>e.callback(e.changes))),this.nextTickHandlers_.splice(0).forEach((e=>{try{e()}catch(e){o(e,`InlineJs.Region<${this.componentId_}>.NextTick`)}}))})))}Add(e){this.list_.push(e),this.Schedule()}AddComposed(e,t,n){let 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 g(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,r;let o=(null===(t=F(ue()||""))||void 0===t?void 0:t.GetBackend().changes)||this,s=e.lastIndexOf(".");this.lastAccessContext_=-1==s?"":e.substring(0,s);let l=o.getAccessStorages_.Peek();(null==l?void 0:l.details)&&(null===(n=l.details.raw)||void 0===n||n.entries.push({compnentId:this.componentId_,path:e}),l.details.optimized&&l.details.optimized.entries!==(null===(i=l.details.raw)||void 0===i?void 0:i.entries)&&0!=l.details.optimized.entries.length&&l.lastAccessPath&&l.lastAccessPath.length<e.length&&0==e.indexOf(`${l.lastAccessPath}.`)?l.details.optimized.entries.at(-1).path=e:l.details.optimized&&l.details.optimized.entries!==(null===(r=l.details.raw)||void 0===r?void 0:r.entries)&&l.details.optimized.entries.push({compnentId:this.componentId_,path:e}),l.lastAccessPath=e)}GetLastAccessContext(){return this.lastAccessContext_}ResetLastAccessContext(){this.lastAccessContext_=""}PushGetAccessStorage(e){var t;this.getAccessStorages_.Push({details:e||{optimized:"optimized"===(null===(t=F(this.componentId_))||void 0===t?void 0:t.GetReactiveState())?{entries:new Array,snapshots:new i}:void 0,raw:{entries:new Array,snapshots:new i}},lastAccessPath:""})}PopGetAccessStorage(){var e;return(null===(e=this.getAccessStorages_.Pop())||void 0===e?void 0:e.details)||null}SwapOptimizedGetAccessStorage(){let e=this.getAccessStorages_.Peek();(null==e?void 0:e.details.optimized)&&e.details.raw&&(e.details.optimized.entries=e.details.raw.entries)}RestoreOptimizedGetAccessStorage(){var e;let t=this.getAccessStorages_.Peek();(null==t?void 0:t.details.optimized)&&t.details.optimized.entries===(null===(e=t.details.raw)||void 0===e?void 0:e.entries)&&(t.details.optimized.entries=t.details.raw.entries.slice(0))}FlushRawGetAccessStorage(){var e,t;null===(t=null===(e=this.getAccessStorages_.Peek())||void 0===e?void 0:e.details.raw)||void 0===t||t.entries.splice(0)}PushGetAccessStorageSnapshot(){var e,t;let n=this.getAccessStorages_.Peek();null===(e=null==n?void 0:n.details.optimized)||void 0===e||e.snapshots.Push(n.details.optimized.entries.slice(0).map((e=>Object.assign({},e)))),null===(t=null==n?void 0:n.details.raw)||void 0===t||t.snapshots.Push(n.details.raw.entries.slice(0).map((e=>Object.assign({},e))))}PopGetAccessStorageSnapshot(e){var t,n,i,r;let o=this.getAccessStorages_.Peek(),s=null===(t=null==o?void 0:o.details.optimized)||void 0===t?void 0:t.snapshots.Pop();!e&&s&&(null===(n=null==o?void 0:o.details.optimized)||void 0===n?void 0:n.entries)&&(o.details.optimized.entries=s);let l=null===(i=null==o?void 0:o.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(r=null==o?void 0:o.details.raw)||void 0===r?void 0:r.entries)&&(o.details.raw.entries=l)}PopAllGetAccessStorageSnapshots(e){var t,n,i,r,o,s;let l=this.getAccessStorages_.Peek(),a=null===(t=null==l?void 0:l.details.optimized)||void 0===t?void 0:t.snapshots.Pop();for(;(null===(n=null==l?void 0:l.details.optimized)||void 0===n?void 0:n.snapshots)&&!l.details.optimized.snapshots.IsEmpty();)a=l.details.optimized.snapshots.Pop();!e&&a&&(null===(i=null==l?void 0:l.details.optimized)||void 0===i?void 0:i.entries)&&(l.details.optimized.entries=a);let c=null===(r=null==l?void 0:l.details.raw)||void 0===r?void 0:r.snapshots.Pop();for(;(null===(o=null==l?void 0:l.details.raw)||void 0===o?void 0:o.snapshots)&&!l.details.raw.snapshots.IsEmpty();)c=l.details.raw.snapshots.Pop();!e&&c&&(null===(s=null==l?void 0:l.details.raw)||void 0===s?void 0:s.entries)&&(l.details.raw.entries=c)}PushOrigin(e){this.origins_.Push(e)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){return this.origins_.Pop()}Subscribe(e,t){var n;let i=null===(n=F(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t}),i||""}Unsubscribe(e,t){"string"!=typeof e?Object.entries(this.subscribers_).filter((([n,i])=>e===i.callback&&(!t||t===i.path))).map((([e])=>e)).forEach((e=>{this.Unsubscribe_(e)})):e in this.subscribers_&&this.Unsubscribe_(e)}Unsubscribe_(e){delete this.subscribers_[e]}}class he{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new i).Push(t)}Pop(e,t){return e in this.record_?this.record_[e].Pop():t||null}Peek(e,t){return e in this.record_?this.record_[e].Peek():t||null}Get(e){return e in this.record_?this.record_[e]:null}}function pe(e,t,n){let i="function"==typeof e?function(e){return{handler(t){var{argKey:n}=t,i=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}(t,["argKey"]);this.extensions.hasOwnProperty(n)?this.extensions[n](Object.assign({argKey:n},i)):e(Object.assign({argKey:n},i))},extensions:{}}}(e):e;return i.extensions[t]=n,i}function me(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 fe{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){let t=Te().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(let t in this.expansionRules_){let n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){let{computedName:n,callback:i}=me(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;let t=this.handlers_[e];return"function"==typeof t?t:t.handler.bind(t)}AddHandlerExtension(e,t,n){let i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;let{computedName:r,callback:o}=me(t,n);r&&o&&(this.handlers_[e]=pe(i,r,o))}RemoveHandlerExtension(e,t){let 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)}}function ve(e,t){var n;null===(n="string"==typeof e?F(e):e)||void 0===n||n.PushCurrentScope(t)}function _e(e){var t;return(null===(t="string"==typeof e?F(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function ge(e){var t;return(null===(t="string"==typeof e?F(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function be(){return globalThis.InlineJS_OutsideEvent=globalThis.InlineJS_OutsideEvent||{targetScopes:new Array,eventCallbacks:{}}}function ye(e,t,n){let i=be(),r=i.targetScopes.find((t=>t.target===e));r||(r={target:e,listeners:{}},i.targetScopes.push(r)),(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners||(r.listeners[e]={handlers:new Array,excepts:null}),r.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=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function Ce(e,t,n){let i=be().targetScopes.find((t=>t.target===e));i&&(Array.isArray(t)?t:[t]).forEach((e=>{e in i.listeners&&(n?i.listeners[e].handlers=i.listeners[e].handlers.filter((e=>e.callback!==n)):delete i.listeners[e])}))}function Ee(e,t,n){let i=be().targetScopes.find((t=>t.target===e));i&&Object.keys(t).forEach((e=>{if(e in i.listeners)if(n){let r=i.listeners[e].handlers.find((e=>e.callback===n));r&&(r.excepts=r.excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((e=>{r.excepts.push(e)})))}else i.listeners[e].excepts=i.listeners[e].excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((t=>{i.listeners[e].excepts.push(t)}))}))}function xe(e){be().targetScopes=be().targetScopes.filter((t=>t.target!==e&&e.contains(t.target)))}class ke{constructor(e,t,n,i){this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.scopeId_="",this.key_="",this.locals_={},this.data_={},this.managers_={directive:null},this.callbacks_={post:new Array,uninit:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1},this.scopeId_=ge(this.componentId_)||""}GetComponentId(){return this.componentId_}GetScopeId(){return this.scopeId_}GetId(){return this.id_}SetKey(e){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)}DeleteLocal(e){delete this.locals_[e]}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:Te().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t)}GetData(e){return e in this.data_?this.data_[e]:Te().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||this.callbacks_.post.push(e)}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).forEach((e=>s(e,"ElementScope.ExecutePostProcessCallbacks")))}AddUninitCallback(e){this.state_.isMarked||this.callbacks_.uninit.push(e)}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e))}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e))}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>s((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;let n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(...t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]})}RemoveAttributeChangeCallback(e,t){let n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;let 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)}ExecuteAttributeChangeCallbacks(e){(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>s((()=>t.callback(e)))))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,!(this.element_ instanceof HTMLTemplateElement)&&"svg"!==this.element_.tagName.toLowerCase()){let t=F(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.callbacks_.uninit.splice(0).forEach((e=>{try{e()}catch(e){}})),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,xe(this.element_),Te().GetMutationObserver().Unobserve(this.element_);let t=F(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[W],this.isRoot_){let e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>Te().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new fe}DestroyChildren_(e,t,n){Array.from(t.children).forEach((t=>{let i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Ie{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_=""}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}}class Ae{constructor(e,t){this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.context_=new he,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new i,this.selectionScopes_=new i,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observers_={intersections:{}},this.changes_=new de(this.id_),this.rootProxy_=new ie(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,this.CreateElementScope(this.root_),Te().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{let r=F(e);if(!r)return;let o=new Array,s=Te().GetConfig().GetDirectiveRegex();null==i||i.filter((e=>e.target instanceof HTMLElement)).forEach((e=>{var t;s.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),o.forEach((e=>q({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));let l=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement){q({component:r,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=null==r?void 0:r.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!l.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=r.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}SetReactiveState(e){this.reactiveState_=e}GetReactiveState(){return"default"===this.reactiveState_?M().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){return le(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t)}SetName(e){this.name_=e}GetName(){return this.name_}CreateScope(e){let t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;let n=new Ie(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,n}RemoveScope(e){let t="string"==typeof e?e:e.GetId();t in this.scopes_&&delete this.scopes_[t]}FindScopeById(e){return e in this.scopes_?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)}PopCurrentScope(){return this.currentScope_.Pop()}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){var t;return this.FindScopeById((null===(t=this.FindElementScope(K(e)))||void 0===t?void 0:t.GetScopeId())||"")||null}PushSelectionScope(){let e={set:!1};return this.selectionScopes_.Push(e),e}PopSelectionScope(){return this.selectionScopes_.Pop()}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){let t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;let n=new ke(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);return this.elementScopes_[n.GetId()]=n,e[W]=n.GetId(),n}RemoveElementScope(e){delete this.elementScopes_[e]}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;let t=!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_;return t&&W in t&&t[W]in this.elementScopes_?this.elementScopes_[t[W]]:null}FindElementLocalValue(e,t,n){let i=this.FindElementScope(e),r=i?i.GetLocal(t):Te().CreateNothing();if(!Te().IsNothing(r)||!n||!i&&"string"==typeof e)return r;let o=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_);if(!o)return r;let s=this.FindAncestor(o);return s?this.FindElementLocalValue(s,t,!0):r}AddProxy(e){this.proxies_[e.GetPath()]=e}RemoveProxy(e){let t="string"==typeof e?e:e.GetPath();t in this.proxies_&&delete this.proxies_[t]}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e}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]}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return Te()}}class Ge{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&&r&&(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 Se{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{let t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t;let i=e.target instanceof HTMLElement?K((null===(t=V(e.target))||void 0===t?void 0:t.GetRoot())||null):"";if(i)if("childList"===(null==e?void 0:e.type)){let t=n(i);t.added.push(...Array.from(e.addedNodes)),t.removed.push(...Array.from(e.removedNodes))}else"attributes"===(null==e?void 0:e.type)&&e.attributeName&&n(i).attributes.push({name:e.attributeName,target:e.target})})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{let i=n.target instanceof HTMLElement?K(n.target):"";if(!i||!(i in t))return;let r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].attributes);(o||l||a)&&s((()=>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){let i=le(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]}}class Pe extends ne{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}class we{constructor({appName:e="",reactiveState:t="unoptimized",directivePrefix:n="x",directiveRegex:i,directiveNameBuilder:r}={}){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.appName_=e,this.reactiveState_=t,this.directiveRegex_=i||new RegExp(`^(data-)?${n||"x"}-(.+)$`),this.directiveNameBuilder_=r||((e,t=!1)=>t?`data-${n||"x"}-${e}`:`${n||"x"}-${e}`)}GetAppName(){return this.appName_}GetDirectiveRegex(){return this.directiveRegex_}GetDirectiveName(e,t){return this.directiveNameBuilder_(e,t)}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.reactiveState_=e}GetReactiveState(){return this.reactiveState_}}class Oe{Get(e,t){return fetch(e,t)}}class Fe{constructor(e,t=0){this.nothing_=new a,this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new i,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.managers_={directive:new fe,magic:new Ge},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new Se,this.nativeFetch_=new Oe,this.fetchConcept_=null,this.concepts_={},this.config_=new we(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.config_=e}GetConfig(){return this.config_}GenerateUniqueId(e,t){return le(this.uniqueMarkers_,"",e,t)}AddComponentMonitor(e){this.componentsMonitorList_.push(e)}RemoveComponentMonitor(e){this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e))}CreateComponent(e){let t=this.InferComponentFrom(e);if(t)return t;let n=new Ae(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.slice(0).forEach((e=>s((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),n}RemoveComponent(e){let t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){let e=this.components_[t];delete this.components_[t],this.componentsMonitorList_.slice(0).forEach((t=>s((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent")))}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&e in this.components_?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}PushCurrentComponent(e){this.currentComponent_.Push(e)}PopCurrentComponent(){return this.currentComponent_.Pop()}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}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e)}DispatchAttributeProcessing(e){this.attributeProcessors_.forEach((t=>s((()=>t(e)),"InlineJS.Global.DispatchAttribute",e.contextElement)))}AddTextContentProcessor(e){this.textContentProcessors_.push(e)}DispatchTextContentProcessing(e){this.textContentProcessors_.forEach((t=>s((()=>t(e)),"InlineJS.Global.DispatchTextContent",e.contextElement)))}GetMutationObserver(){return this.mutationObserver_}SetFetchConcept(e){this.fetchConcept_=e}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t}RemoveConcept(e){delete this.concepts_[e]}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}CreateChildProxy(e,t,n){return new Pe(e,t,n)}CreateFuture(e){return new r(e)}IsFuture(e){return e instanceof r}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof a}}const Re="__InlineJS_GLOBAL_KEY__";function $e(e,t=0){return O(),globalThis[Re]=new Fe(e,t),window.dispatchEvent(new CustomEvent(De)),globalThis[Re]}function Ne(e,t=0){return Te()||$e(e,t)}const De="inlinejs.global.created";function Te(){return globalThis[Re]}function Me(){return Te()?Promise.resolve():new Promise((e=>window.addEventListener(De,e)))}function Be(e){return e=p(e),Te().IsFuture(e)?Be(e.Get()):!e&&!1!==e&&0!==e||Te().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function Le({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:o}){let s={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);let r=t?t(n.toString(),e):e[n];return Te().IsNothing(r)?Reflect.get(e,n):(!o||o.list&&!(n in o.list)||null===(i=F(o.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${o.id}.${n}`),r)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?n(t.toString(),i,e):!!e[t]||!0,deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?i(t.toString(),e):!!delete e[t]||!0,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||{},s)}function je(e){return Le(ze({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function Je(){return!1}function He(e){var{setter:t,deleter:n,lookup:i}=e,r=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}(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||Je,deleter:n||Je,lookup:i||Je})}function ze(e){return He(e)}function Ue(e,t,n){let i=null==t?void 0:t.FindElementScope(n),r=null==i?void 0:i.GetId();if(!r)return["",null,null];let o=globalThis.InlineJS_ProxyGlobal=globalThis.InlineJS_ProxyGlobal||{},s=o[e]=o[e]||{};return r in s?[r,s[r],s]:(null==i||i.AddUninitCallback((()=>delete s[r])),[r,null,s])}function qe(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>qe(e,t,!0))):e.then(t)}const We="__InlineJS_Context__";let Ke={},Ve={};function Ye(e,t,n){if(Ke.hasOwnProperty(e))return Ke[e];if(Ve.hasOwnProperty(e))return null;try{let n=new Function(We,`\n with (__InlineJS_Context__){\n return (${e});\n };\n `).bind(t);return Ke[e]=n}catch(e){e instanceof SyntaxError||o(e,`InlineJs.Region<${n||"NIL"}>.GenerateValueReturningFunction`)}return null}function Qe(e,t,n){if(Ve.hasOwnProperty(e))return Ve[e];try{let n=new Function(We,`\n with (__InlineJS_Context__){\n ${e};\n };\n `).bind(t);return Ve[e]=n}catch(e){o(e,`InlineJs.Region<${n||"NIL"}>.GenerateVoidFunction`)}return null}function Ze(e,t,n,i=[]){var r;if("function"==typeof e){let o=F(n||""),s=null==o?void 0:o.FindProxy(null==o?void 0:o.GetBackend().changes.GetLastAccessContext()),l=e.apply((null===(r=s||(null==o?void 0:o.GetRootProxy()))||void 0===r?void 0:r.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function Xe({componentId:e,contextElement:t,expression:n,disableFunctionCall:i=!1,waitPromise:r="recursive"}){if(!(n=n.trim()))return e=>(e&&e(null),null);let s=(s,l,a,c,u=!0)=>{var h;let p=F(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(h=null==p?void 0:p.FindElementScope(t))||void 0===h?void 0:h.IsDestroyed()))return;let{context:f=null,changes:v=null}=(null==p?void 0:p.GetBackend())||{};null==f||f.Push(d.self,t),null==v||v.ResetLastAccessContext(),ae(e),Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Push(e,t)));try{let t=l(m);if(Te().IsFuture(t)&&(t=t.Get()),!s)return i?t:Ze(t,s,e,a);let n=e=>{"none"!==r?qe(e,s,"recursive"===r):s(e)};i?n(t):Ze(t,n,e,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;o(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Pop(e,t))),ce(),null==f||f.Pop(d.self)}},l=Ye(n,t,e),a=null;return l||(a=Qe(n,t,e)),(i,r=[],o)=>{if(!a&&l)try{return s(i,l,r||[],o||{})}catch(i){if(!(i instanceof SyntaxError))throw i;a=Qe(n,t,e)}return a?s(i,a,r||[],o||{},!1)||null:(i&&i(null),null)}}function et(e){return Xe(e)}function tt(e,t){let n=(e,t)=>qe(e,t,!0);return e instanceof l?new l(((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 l?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function it({componentId:e,changes:t,callback:n,subscriptionsCallback:i,contextElement:r}){var s,l,a,c;t.PopAllGetAccessStorageSnapshots(!1),t.RestoreOptimizedGetAccessStorage();let{optimized:u,raw:d}=t.PopGetAccessStorage();if(0==((null===(s=u||d)||void 0===s?void 0:s.entries.length)||0))return i&&i({}),null;let h={},p=()=>{Object.keys(h).map((e=>F(e))).filter((e=>!!e)).forEach((e=>{let{changes:t}=e.GetBackend();h[e.GetId()].forEach((e=>t.Unsubscribe(e)))})),h={}},m=!1,f=()=>{m=!0},v=t=>{let i=F(e);if(!i||m)return void p();let{changes:r}=i.GetBackend();r.PushOrigin(v);try{n({changes:t||[],cancel:f})}catch(t){o(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},_={};return null===(l=u||d)||void 0===l||l.entries.forEach((e=>(_[e.path]=_[e.path]||{})[e.compnentId]=!0)),Object.entries(_).forEach((([e,t])=>{Object.keys(t).map((e=>F(e))).filter((e=>!!e)).forEach((t=>{(h[t.GetId()]=h[t.GetId()]||[]).push(t.GetBackend().changes.Subscribe(e,v))}))})),r&&(null===(c=null===(a=F(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{f(),p()}))),i&&i(h),p}function rt({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r}){var s;let l=()=>{let i=F(e);if(!i)return;let{changes:s}=i.GetBackend(),l=!1,a=n?i.FindElementScope(n):null,c=()=>{l=!0},u=null==a?void 0:a.GetElement();try{s.PushGetAccessStorage(),t({changes:[],cancel:c})}catch(t){o(t,`InlineJS.Component<${e}>.UseEffect`,u)}if(l)return s.PopAllGetAccessStorageSnapshots(!1),s.RestoreOptimizedGetAccessStorage(),void s.PopGetAccessStorage();it({componentId:e,changes:s,callback:t,subscriptionsCallback:r,contextElement:u})};(null==i?void 0:i.nextTick)?null===(s=F(e))||void 0===s||s.GetBackend().changes.AddNextTickHandler(l):l()}function ot(e,t,n,i={}){var r;let o=null;if(o=e instanceof HTMLElement?(null===(r="string"==typeof n?F(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!o)return i;let s=o.GetLocal(t);return Te().IsNothing(s)&&o.SetLocal(t,s=i),s}const st="__InlineJS_GLOBAL_COMPONENT_KEY__";function lt(e){let t=globalThis[st];if(t||!1===e)return t.component;let n=document.createElement("template");return globalThis[st]={root:n,component:Te().CreateComponent(n)},globalThis[st]}const at=300,ct=0,ut=0;function dt(e,t){if(!e||Te().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;let n=Te().GetConcept("animation");return e.ease=e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,e.actor=e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,e.duration=e.duration||at,e.delay=e.delay||ct,e.repeats=e.repeats||ut,e}function ht({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:o,allowRepeats:l}){var a,c,u,d;let h=dt((null===(c=null===(a=F(e))||void 0===a?void 0:a.FindElementScope(t))||void 0===c?void 0:c.GetData("transition"))||null,o||!1);if(!h||!h.actor||!h.ease||"number"!=typeof h.duration||h.duration<=0)return i(!1),null;let p=e=>{var t;return"function"==typeof(null==h?void 0:h.actor)?null==h?void 0:h.actor(e):h&&(null===(t=h.actor)||void 0===t?void 0:t.Handle(e))},m=e=>{var t;return"function"==typeof h.ease?h.ease(e):h&&(null===(t=h.ease)||void 0===t?void 0:t.Handle(e))||0},f=!1,v=()=>f=!0,_=0,g=e=>o?1-e:e,b=()=>{var i,o;return null===(o=null===(i=F(e))||void 0===i?void 0:i.FindElementScope(t))||void 0===o||o.RemoveUninitCallback(v),(n||t).dispatchEvent(new CustomEvent("transition.canceled")),r&&r(),!1};return null===(d=null===(u=F(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===d||d.AddUninitCallback(v),k(h.duration,0,l?h.repeats:0,h.delay).While((({elapsed:e})=>{if(f)return b();0==_&&((n||t).style.transform="",(n||t).style.transformOrigin="50% 50%",(n||t).dispatchEvent(new CustomEvent("transition.enter"))),p({target:n||t,stage:0==_++?"start":"middle",fraction:m({duration:h.duration,elapsed:e,fraction:g(e/h.duration)})})})).Final((()=>{f?b():(p({target:n||t,stage:"end",fraction:m({duration:h.duration,elapsed:h.duration,fraction:g(1)})}),(n||t).dispatchEvent(new CustomEvent("transition.leave")),s((()=>i(!0))))})),v}function pt({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,afterInsert:o,afterTransitionCallback:l,transitionScope:a}){let c="string"==typeof i?i:(null==i?void 0:i.GetId())||"",u=()=>{let i=document.createElement("template");i.innerHTML=t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),o&&s(o,"InlineJS.InsertHtml",e);let u=F(c);r&&u&&Array.from(e.children).forEach((e=>q({component:u,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),l&&((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),ht({componentId:c,contextElement:a||e,target:e,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),l())}))};if("replace"===n){let t=e=>{let n=F(c);Array.from(e.children).forEach((e=>{let i=null==n?void 0:n.FindElementScope(e);i?i.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),u()};l?((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),ht({componentId:c,contextElement:a||e,target:e,reverse:!0,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n())})):n()}else u()}class mt{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;let n=()=>(this.setCallback_||e||this.callback_)&&(this.setCallback_||e||this.callback_)();!this.queued_&&this.initialized_?(this.queued_=!0,null===(t=F(this.componentId_))||void 0===t||t.GetBackend().changes.AddNextTickHandler((()=>{this.queued_=!1,n()}))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}}const ft=/\{\{\s*(.+?)\s*\}\}/g,vt=/\{\{.+?\}\}/;function _t(e){let t=e=>[...e.childNodes].reduce(((e,t)=>`${e}${3!=t.nodeType?n(t):t.textContent||""}`),""),n=e=>`${[...e.attributes].reduce(((e,t)=>`${e} ${t.name}="${t.value}"`),`<${e.tagName.toLowerCase()}`)+">"}${t(e)}</${e.tagName.toLowerCase()}>`;return t(e)}function gt({componentId:e,contextElement:t,text:n,handler:i}){var r;let o=et({componentId:e,contextElement:t,expression:"let output = "+JSON.stringify(n).replace(ft,'"+($1)+"')+"; return output;"});null===(r=F(e))||void 0===r||r.CreateElementScope(t),rt({componentId:e,contextElement:t,callback:()=>o(i)})}function bt(e){var{text:t}=e,n=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}(e,["text"]);vt.test(t)&>(Object.assign({text:t},n))}function yt({componentId:e,contextElement:t,text:n,handler:i}){if("string"==typeof n)return i&&bt({componentId:e,contextElement:t,text:n,handler:i});if(!vt.test(t.textContent||""))return;let r=new Array,o=new Array;[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&vt.test(n.textContent)){let i={text:n.textContent||"",evaluated:n.textContent||""};r.push(i),o.push((()=>gt({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;r.forEach((n=>{let i=n instanceof Element?n:document.createTextNode("string"==typeof n?n:n.evaluated);e?t.insertBefore(i,e):t.append(i),e=i}))})()}})))}else 3==n.nodeType?r.push(n.textContent||""):r.push(n)})),r.reverse(),o.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function Ct({componentId:e,contextElement:t,name:n,value:i}){yt({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e)})}function Et({componentId:e,contextElement:t}){yt({componentId:e,contextElement:t})}function xt(e){let t=Te(),n=t.GetConfig();[n.GetDirectiveName("data",!0),n.GetDirectiveName("data",!1)].forEach((n=>{(e||document).querySelectorAll(`[${n}]`).forEach((e=>{e.hasAttribute(n)&&document.contains(e)&&q({component:t.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function kt(e){Ne(),setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{xt(e)})):xt(e)}),0)}function It(e,t){let n="",i=null;if("function"==typeof e){let t=e();t?({name:n,callback:i}=t):(n=e("name"),i=e("callback"))}else v(e)?({name:n,callback:i}=e):Te().GetDirectiveManager().AddHandler(e);n&&i&&(t?Te().GetDirectiveManager().AddHandlerExtension(t,i,n):Te().GetDirectiveManager().AddHandler(i,n))}function At(e,t){return{name:e,callback:t}}function Gt(e,t,n,i,r){let o=Te().GetConfig().GetDirectiveName("on"),s=(r||[]).join("."),l=z(s?`${o}:${n}.${s}`:`${o}:${n}`,i||"");return!!l&&T(e,t,l)}const St=["bind","event","on"];function Pt({component:e,contextElement:t,key:n,event:i,expression:r,options:o,defaultEvent:s,eventWhitelist:l=[],optionBlacklist:a}){let c=()=>a?null==o?void 0:o.filter((e=>!a.includes(e))):o,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?Gt(e,t,u(i),r,c()):!(!s||i!==s&&!St.includes(i))&&Gt(e,t,u(s),r,c())}function wt(e,t,n){let i=Te().GetConfig().GetDirectiveName(t,!1),r=Te().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function Ot({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:o,useEffect:s=!0}){let l=0,a=et({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{tt(e,(e=>{t==l&&(n?r([n,e]):v(e)?Object.entries(e).forEach(r):o&&("string"==typeof e||Array.isArray(e))&&o("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};s?rt({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const Ft=Array.from(Array(100).keys()).map((e=>e/100));function Rt(e){let t={root:null,rootMargin:"0px",threshold:0};return v(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=Ft),t}class $t{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;let n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{s((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),Rt(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)}}function Nt(e,t=0){return e&&e.match(/^[0-9]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseInt(e):parseInt(e):t}function Dt({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){let o=Array.isArray(e)?e:[e],s=e=>("number"==typeof n?n:n&&n(e))||0;return t.forEach(((n,l)=>{let a=o.find((e=>e&&n in e));if(!a)return r&&r({options:e,list:t,option:n,index:l});i&&!0===i({options:e,list:t,option:n,index:l})||("number"==typeof a[n]?l<t.length-1?a[n]=Nt(t[l+1].trim(),s(n)):a[n]=s(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function Tt({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:o,options:s,defaultOptionValue:l,useEffect:a}){let c=et({componentId:e,contextElement:n,expression:i}),u=Dt({options:s||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===l?0:l||-1}),d=()=>c((e=>qe(e,o))),h=()=>!1===a?d():rt({componentId:e,contextElement:n,callback:d});if(u.lazy){let i=t||F(e),r={root:u.ancestor<0?null:null==i?void 0:i.FindAncestor(n,u.ancestor),threshold:u.threshold<0?0:u.threshold},o=i?new $t(i.GenerateUniqueId("intob_"),r):null;o?(null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:t,entry:n}={})=>{var i;(null==n?void 0:n.isIntersecting)&&(null===(i=F(e))||void 0===i||i.RemoveIntersectionObserver(t),h())}))):h()}else h()}function Mt(e){let t,n="",i=null;if("function"==typeof e){let r=e();r?({name:n,callback:i,onAccess:t}=r):(n=e("name"),i=e("callback"),t=e("access"))}else v(e)?({name:n,callback:i,onAccess:t}=e):Te().GetMagicManager().AddHandler(e);n&&i&&Te().GetMagicManager().AddHandler(i,n,t)}function Bt(e,t,n){return{name:e,callback:t,onAccess:n}}function Lt(e){return e.startsWith(":")?Te().GetConfig().GetDirectiveName("bind")+e:null}function jt(e){return e.startsWith(".")?e.replace(".",Te().GetConfig().GetDirectiveName("class:")):null}function Jt(e){return e.startsWith("@")?e.replace("@",Te().GetConfig().GetDirectiveName("on:")):null}function Ht(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}},694:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDirectiveHandlerCompact=t.StripeDirectiveHandler=void 0;const i=n(992),r=["submit","save","name","email","phone","address"],o={number:"cardNumber",expiry:"cardExpiry",cvc:"cardCvc",postal:"postalCode",zip:"postalCode"},s="stripe";let l="",a="https://js.stripe.com/v3/",c=null,u=null;t.StripeDirectiveHandler=(0,i.CreateDirectiveHandlerCallback)(s,(({componentId:e,component:t,contextElement:n,expression:d,argKey:h,argOptions:p})=>{if((0,i.BindEvent)({contextElement:n,expression:d,component:t||e,key:s,event:h,defaultEvent:"success",eventWhitelist:["error","before","after","ready","focus","complete"],options:p,optionBlacklist:["window","document","outside"]}))return;let m=t||(0,i.FindComponentById)(e),f=null==m?void 0:m.FindElementScope(n);if(!m||!f)return(0,i.JournalError)("Failed to retrieve element scope.","InlineJS.stripe",n);let v="$stripe",_="#stripe";if(v in(f.GetLocals()||{}))return;if(r.includes(h)){let t=m.FindElementLocalValue(n,_,!0);return void(t&&(t.specialMounts[h]=n,f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:t=>{var r;if("parent"===t)return n.parentElement?null===(r=(0,i.FindComponentById)(e))||void 0===r?void 0:r.FindElementLocalValue(n.parentElement,v,!0):null},lookup:["parent"]})))))}if(h in o){let t=m.FindElementLocalValue(n,_,!0);if(!t)return;let r=m.GenerateUniqueId("stripe_proxy_"),s={name:h,mount:n,element:t.elements.create(o[h],{style:c||void 0,classes:u||void 0}),ready:!1,complete:!1,error:void 0};if(!s.element)return;s.element.mount(n),t.fields.push(s),f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:t=>{var o,l,a,c;return"complete"===t?(null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.complete):"focused"===t?(null===(l=(0,i.FindComponentById)(e))||void 0===l||l.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.focused):"error"===t?(null===(a=(0,i.FindComponentById)(e))||void 0===a||a.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.error):"parent"===t?n.parentElement?null===(c=(0,i.FindComponentById)(e))||void 0===c?void 0:c.FindElementLocalValue(n.parentElement,v,!0):null:"clear"===t?()=>{s.element&&s.element.clear()}:"focus"===t?()=>{s.element&&s.element.focus()}:"blur"===t?()=>{s.element&&s.element.blur()}:void 0},lookup:["complete","focused","error","parent","clear","focus","blur"]})));let l=t.fields;return f.AddUninitCallback((()=>{var e;null===(e=s.element)||void 0===e||e.destroy(),l.splice(l.indexOf(s),1)})),s.element.on("ready",(()=>{s.ready||(s.ready=!0,s.mount.dispatchEvent(new CustomEvent("stripe.ready")),t.onReady())})),s.element.on("change",(n=>{var o,l;if((null==n?void 0:n.complete)!==s.complete){if(s.complete=null==n?void 0:n.complete,s.mount.dispatchEvent(new CustomEvent("stripe.complete",{detail:{completed:null==n?void 0:n.complete}})),s.complete){if(s.error&&(s.error=void 0,(0,i.AddChanges)("set",`${r}.error`,"error",null===(o=(0,i.FindComponentById)(e))||void 0===o?void 0:o.GetBackend().changes)),t.options.autofocus){let e=t.fields.indexOf(s);if(-1!=e&&e<t.fields.length-1){let n=t.fields[e+1];n.element?n.element.focus():"focus"in n.mount&&"function"==typeof n.mount.focus&&n.mount.focus()}else t.specialMounts.submit&&t.specialMounts.submit.focus()}}else(null==n?void 0:n.error)&&n.error.message!==s.error&&(s.error=n.error.message,(0,i.AddChanges)("set",`${r}.error`,"error",null===(l=(0,i.FindComponentById)(e))||void 0===l?void 0:l.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.error",{detail:{message:n.error.message}})));t.onChange()}})),s.element.on("focus",(()=>{var t;s.focused||(s.focused=!0,(0,i.AddChanges)("set",`${r}.focused`,"focused",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!0}})))})),void s.element.on("blur",(()=>{var t;s.focused&&(s.focused=!1,(0,i.AddChanges)("set",`${r}.focused`,"focused",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!1}})))}))}let g=null,b=null,y=new Array,C=()=>{(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d})((e=>(g=Stripe(e||l),g?(b=g.elements(),b?void y.splice(0).forEach((e=>(0,i.JournalTry)(e,"InlineJS.stripe.Init",n))):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n)):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n))))},E=new Array,x={submit:null,save:null,name:null,email:null,phone:null,address:null},k=m.GenerateUniqueId("stripe_proxy_"),I=(0,i.ResolveOptions)({options:{autofocus:!1,nexttick:!1,manual:!1},list:p}),A=!1,G=!1,S=0,P={fields:E,specialMounts:x,options:I,onReady:()=>{var t;return(0,i.AddChanges)("set",`${k}.readyCount`,"readyCount",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes)},onChange:()=>{var t;(t=>{var n;t!=G&&(G=t,(0,i.AddChanges)("set",`${k}.complete`,"complete",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))})(!E.find((e=>!e.complete)));let n=E.reduce(((e,t)=>e+(t.error?1:0)),0);n!=S&&(S=n,(0,i.AddChanges)("set",`${k}.errors`,"errors",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes))}},w=t=>{var n;t!=A&&(A=t,(0,i.AddChanges)("set",`${k}.active`,"active",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))},O=(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d}),F=t=>{var r;t.error?R(t.error.message||""):(n.dispatchEvent(new CustomEvent("stripe.success",{detail:{intent:t.paymentIntent}})),n.dispatchEvent(new CustomEvent("stripe.after")),w(!1),I.nexttick?null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddNextTickHandler((()=>O())):O())},R=e=>{n.dispatchEvent(new CustomEvent("stripe.error",{detail:{type:"host",message:e}})),$("host",e),n.dispatchEvent(new CustomEvent("stripe.after")),w(!1)},$=(e,t)=>{n.dispatchEvent(new CustomEvent("stripe.error",{detail:{type:e,message:t}}))},N=(e,t)=>{var n;if(e&&"string"==typeof e)return{payment_method:e,setup_future_usage:t?"off_session":void 0};let i=null===(n=E.find((e=>"number"===e.name)))||void 0===n?void 0:n.element;if(!i)return null;let r={},o=t=>e&&e[t]||(x[t]?x[t].value:void 0);return["name","email","phone","address"].forEach((e=>{"address"===e?r.address={line1:o(e)}:r[e]=o(e)})),!t&&x.save&&x.save instanceof HTMLInputElement&&(t=x.save.checked),{payment_method:{card:i,billing_details:r},setup_future_usage:t?"off_session":void 0}},D=(e,t=!1)=>{t||G&&!E.find((e=>!!e.error))?(w(!0),n.dispatchEvent(new CustomEvent("stripe.before")),e()):$("incomplete","Please fill in all required fields.")};f.SetLocal(_,P),f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildProxyOptions)({getter:t=>{var n,r,o,s;return"bind"===t?()=>{g||T()}:"active"===t?(null===(n=(0,i.FindComponentById)(e))||void 0===n||n.GetBackend().changes.AddGetAccess(`${k}.${t}`),A):"readyCount"===t?(null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddGetAccess(`${k}.${t}`),E.reduce(((e,t)=>e+(t.ready?1:0)),0)):"complete"===t?(null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${k}.${t}`),G):"errors"===t?(null===(s=(0,i.FindComponentById)(e))||void 0===s||s.GetBackend().changes.AddGetAccess(`${k}.${t}`),E.filter((e=>!!e.error)).map((e=>e.error))):"instance"===t?g:"publicKey"===t?l:"styles"===t?c:"classes"===t?u:"url"===t?a:"pay"===t?(e,t,n=!1)=>{D((()=>{let i=N(t,n);i&&(null==g||g.confirmCardPayment(e,i).then(F).catch(R))}),!!t&&"string"==typeof t)}:"setup"===t?(e,t,n=!1)=>{D((()=>{let i=N(t,n);i&&(null==g||g.confirmCardSetup(e,i).then(F).catch(R))}),!!t&&"string"==typeof t)}:void 0},setter:(e,t)=>("publicKey"===e?l=t:"styles"===e?c=t:"classes"===e?u=t:"url"===e&&(a=t),!0),lookup:["bind","active","readyCount","complete","errors","instance","publicKey","styles","classes","url","pay","setup"]})));let T=()=>{let e=(0,i.GetGlobal)().GetConcept("resource");a&&e?e.GetScript(a).then(C):C()};I.manual||T()})),t.StripeDirectiveHandlerCompact=function(){(0,i.AddDirectiveHandler)(t.StripeDirectiveHandler)}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.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})},(()=>{const e=n(992),t=n(694);(0,e.WaitForGlobal)().then((()=>(0,t.StripeDirectiveHandlerCompact)()))})()})();
|
1
|
+
(()=>{"use strict";var e={992:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Z,AddDirectiveExpansionRule:()=>j,AddDirectiveHandler:()=>It,AddMagicHandler:()=>Bt,AddOutsideEventExcept:()=>xe,AddOutsideEventListener:()=>Ce,ApplyDirectiveExpansionRules:()=>H,AreObjects:()=>_,AttributeInterpolator:()=>Et,AutoBootstrap:()=>At,BaseComponent:()=>Ge,BaseGlobal:()=>Re,BeginsWith:()=>c,BindDirectiveExpansionRule:()=>jt,BindEvent:()=>wt,BootstrapAndAttach:()=>kt,BuildGetterProxyOptions:()=>qe,BuildIntersectionOptions:()=>$t,BuildProxyOptions:()=>ze,CallIfFunction:()=>Xe,Changes:()=>he,ChildProxy:()=>we,ClassDirectiveExpansionRule:()=>Jt,Config:()=>Oe,Context:()=>pe,ContextKeys:()=>d,CreateAnimationLoop:()=>A,CreateChildProxy:()=>ee,CreateDirective:()=>q,CreateDirectiveExpansionRule:()=>L,CreateDirectiveHandlerCallback:()=>Gt,CreateGlobal:()=>Ne,CreateInplaceProxy:()=>je,CreateLoop:()=>k,CreateMagicHandlerCallback:()=>Lt,CreateReadonlyProxy:()=>Je,DeepCopy:()=>g,DefaultTransitionDelay:()=>ut,DefaultTransitionDuration:()=>ct,DefaultTransitionRepeats:()=>dt,DeleteProxyProp:()=>X,DirectiveManager:()=>ve,DisableProxyAction:()=>He,DispatchDirective:()=>M,ElementScope:()=>Ae,ElementScopeKey:()=>K,EndsWith:()=>b,EvaluateLater:()=>tt,EvaluateMagicProperty:()=>Q,ExtractDuration:()=>Dt,FindComponentById:()=>R,FindComponentByName:()=>$,FindComponentByRoot:()=>N,FlattenDirective:()=>T,ForwardEvent:()=>St,Future:()=>r,GenerateFunctionFromString:()=>et,GenerateUniqueId:()=>ae,GenerateValueReturningFunction:()=>Qe,GenerateVoidFunction:()=>Ze,GenericProxy:()=>ie,GetAttribute:()=>E,GetConfig:()=>B,GetDefaultUniqueMarkers:()=>oe,GetDirectiveValue:()=>Ot,GetElementContent:()=>gt,GetElementScopeId:()=>V,GetGlobal:()=>Me,GetLocal:()=>st,GetOrCreateGlobal:()=>De,GetProxyProp:()=>te,GetTarget:()=>p,GetTargets:()=>m,GlobalCreatedEvent:()=>Te,IncrementUniqueMarkers:()=>se,InferComponent:()=>Y,InitComponentCache:()=>F,InitJITProxy:()=>Ue,InlineJSGlobalKey:()=>$e,InsertHtml:()=>mt,Interpolate:()=>Ct,InterpolateText:()=>yt,IntersectionObserver:()=>Nt,IsEqual:()=>x,IsObject:()=>v,JoinPath:()=>P,JoinUniqueMarkers:()=>le,JournalError:()=>o,JournalLog:()=>zt,JournalTry:()=>s,JournalWarn:()=>D,LazyCheck:()=>Mt,Loop:()=>l,MagicManager:()=>Se,MutationObserver:()=>Pe,NativeFetchConcept:()=>Fe,NextTick:()=>ft,Nothing:()=>a,OnDirectiveExpansionRule:()=>Ht,PathToRelative:()=>G,PeekCurrentComponent:()=>de,PeekCurrentScope:()=>be,PopCurrentComponent:()=>ue,PopCurrentScope:()=>ge,ProcessDirectives:()=>W,ProxyKeys:()=>h,PushCurrentComponent:()=>ce,PushCurrentScope:()=>_e,QueryGlobalComponent:()=>at,RemoveDirectiveExpansionRule:()=>J,RemoveOutsideEventListener:()=>Ee,ReplaceText:()=>bt,ResolveKeyValue:()=>Ft,ResolveOptions:()=>Tt,ResolveTransition:()=>ht,RootProxy:()=>re,Scope:()=>Ie,SetAttributeUtil:()=>w,SetProxyProp:()=>ne,SplitPath:()=>S,Stack:()=>i,StreamData:()=>nt,SubscribeToChanges:()=>rt,SupportsAttributes:()=>y,TextContentInterpolator:()=>xt,TidyPath:()=>I,ToCamelCase:()=>u,ToString:()=>Le,TraverseDirectives:()=>U,UnbindOutsideEvent:()=>ke,UseEffect:()=>ot,WaitForGlobal:()=>Be,WaitPromise:()=>We,WaitTransition:()=>pt,WaitWhile:()=>it});class i{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}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}}class r{constructor(e){this.callback_=e}Get(){return this.callback_()}}function o(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function s(e,t,n){try{return e()}catch(e){o(e,t,n)}}class l{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===s((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>s((()=>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 a{}function c(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}function u(e,t,n){let[i="",...r]=e.trim().split(n||"-"),o=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?o(i):i)+(r||[]).map((e=>o(e))).join("")}const d={self:"self",event:"event",scope:"scope"},h={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function p(e){return(Array.isArray(e)||e&&"object"==typeof e)&&h.target in e?p(e[h.target]):e}function m(e){return e.map((e=>p(e)))}function f(e){return(e=p(e))&&"object"==typeof e&&(h.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function v(e){return!!f(e)}function _(e){return-1==e.findIndex((e=>!f(e)))}function g(e){if(e=p(e),!Array.isArray(e)&&!v(e))return e;if(Array.isArray(e))return e.map((e=>g(e)));let t={};return Object.entries(e).forEach((([e,n])=>t[e]=g(n))),t}function b(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function y(e){return(e=p(e))&&"getAttribute"in e&&"setAttribute"in e}function C(e,t){return t&&y(e)?e.getAttribute(t):null}function E(e,t){for(let n of Array.isArray(t)?t:[t]){let t=C(e,n);if(t)return t}return null}function x(e,t,n=!0){let[i,r]=n?m([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)=>!x(e,r[t],n)));if(_([i,r])){let e=Object.keys(i),t=Object.keys(r);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!x(i[e],r[e],n)))}return i==r}function k(e,t=1e3,n=0,i=0,r=!0){t=t||1;let o=e?Math.floor(e/t):-1,s=0,a=!1,c=0,u=(n,i)=>{if(r){let r=++c;requestAnimationFrame((()=>r==c&&i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})))}else i({passes:n,elapsed:n*t,duration:e,abort:()=>a=!0})},d=(r,l,c)=>{if(a)return c();if(s+=1,o>=0&&s>=o){if(!n)return l({passes:o,elapsed:o*t,duration:e});setTimeout((()=>setTimeout(d.bind(null,r,l,c),t)),i),u(o,r),n>0&&(n-=1)}else setTimeout(d.bind(null,r,l,c),t),u(s,r)};return new l(((e,n,i)=>{setTimeout(d.bind(null,e,n,i),t)}))}function A(e,t=1e3,n=0,i=0){let r=t,o=-1,s=-1,a=!1,c=0,u=(l,d,h)=>{if(a)return;-1==o&&(o=h);let p=h-o;if(e&&p>=e){if(!n)return d({passes:c,elapsed:p,duration:e});r=i,s=h,n>0&&(n-=1)}-1==s&&(s=h);let m=h-s;m>=r&&(s=h-(m-r),r=t,l({passes:++c,elapsed:p,duration:e,abort:()=>a=!0})),requestAnimationFrame(u.bind(null,l,d))};return new l(((e,t)=>{requestAnimationFrame(u.bind(null,e,t))}))}function I(e){return(e=e?e.trim():"")?e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"").replace(/^[\/?&=]+/,"").split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),""):""}function G(e,t,n){return(e=I(e))===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 S(e,t,n){let i=(e=t?G(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function P({base:e,query:t},n,i,r){let o=`${I(e)}?${t}`;return o=n?G(o,n,i):I(o),o=r?I(`${n}/${o}`):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function w(e,t,n){t&&y(e)&&e.setAttribute(t,n)}const O="InlineJS_Comp_Cache";function F(){return globalThis[O]={id:"",component:null}}function R(e){let t=globalThis[O]=globalThis[O]||F();return e===t.id||(t.component=Me().FindComponentById(e),t.id=t.component?e:""),t.component}function $(e){return Me().FindComponentByName(e)}function N(e){return Me().FindComponentByRoot(e)}function D(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function T(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 M(e,t,n,i=0){let r="string"==typeof e?R(e):e;if(!r)return o(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=r.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++i),l=l||Me().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){let 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])}return l?(0!=i||a||r.CreateElementScope(t),s((()=>{l(Object.assign(Object.assign({},T(n)),{componentId:r.GetId(),component:r,contextElement:t}))}),"InlineJS.DispatchDirective",t),!0):(D(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1)}function B(){return Me().GetConfig()}function L(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function j(e){return Me().GetDirectiveManager().AddExpansionRule(e)}function J(e){Me().GetDirectiveManager().RemoveExpansionRule(e)}function H(e){return Me().GetDirectiveManager().Expand(e)}let z={};function q(e,t){if(!e||!(e=e.trim()))return null;if((t=t.trim())===e&&(t=""),e in z)return{meta:z[e],value:t};let n=H(e),i=n.match(B().GetDirectiveRegex());if(!i||3!=i.length||!i[2])return null;let r=i[2].indexOf(":"),o=-1==r?[i[2]]:[i[2].substring(0,r),i[2].substring(r+1)],s="",l="";o.length>1?[s,l]=o:[l]=o;let a=l.split("."),c="";s?c=a[0]:s=a[0],a.splice(0,1);let u=s.split("-"),d={view:{original:e,expanded:n},name:{value:s,joined:u.join("."),parts:u},arg:{key:c,options:a||[]}};return z[e]=d,{meta:d,value:t}}function U({element:e,callback:t,attributeCallback:n}){Array.from(e.attributes||[]).forEach((i=>{try{n&&n(i.name,i.value||"");let e=q(i.name,i.value||"");e&&t(e)}catch(t){o(t,"InlineJS.TraverseDirectives",e)}}))}function W({component:e,element:t,options:n={}}){var i;if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||e instanceof HTMLTemplateElement||!e.closest("template"))}(t,n))return;let r="string"==typeof e?R(e):e;if(!r)return o("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let s=0;U({element:t,callback:n=>{M(e,t,n,s)&&(t.removeAttribute(n.meta.view.original),++s)},attributeCallback:(e,n)=>Me().DispatchAttributeProcessing({name:e,value:n,componentId:r.GetId(),component:r,contextElement:t})}),Me().DispatchTextContentProcessing({componentId:r.GetId(),component:r,contextElement:t}),n.ignoreChildren||t instanceof HTMLTemplateElement||(null==r||r.PushSelectionScope(),Array.from(t.children).forEach((t=>W({component:e,options:n,element:t}))),null==r||r.PopSelectionScope()),null===(i=null==r?void 0:r.CreateElementScope(t))||void 0===i||i.ExecutePostProcessCallbacks()}const K="__InlineJS_ELSCOPE_KEY__";function V(e){let t="";for(;e;){if(t=K in(n=e)&&n[K],t||e===document.body)return t||"";e=e.parentElement}var n;return""}function Y(e){let t=V(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?R(t[1]):null}function Q(e,t,n,i="",r=!0){let l="string"==typeof e?R(e):e;if(!l)return o(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),Me().CreateNothing();let a=Me().GetMagicManager().FindHandler(i&&n.startsWith(i)?n.substring(i.length):n,{contextElement:t,componentId:l.GetId(),component:l});if(!a){if(r&&i&&n.startsWith(`${i}${i}`)){let e=l.GetId();return t=>{let r=Y(t)||R(e);if(!r)return null;let o=r.FindElementScope(t),s=o&&o.GetLocal(n.substring(i.length));return o&&!Me().IsNothing(s)?s:Q(r.GetId(),t,n,`${i}${i}`,!1)}}return Me().CreateNothing()}return s((()=>a({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Z(e,t,n,i,r=!0){if(!i)return;let o={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(o),!r)return;let s=t.split(".");for(;s.length>2;)s.pop(),i.Add({original:o,path:s.join(".")})}function X(e,t,n,i){var r;if(!(i in t))return!1;let o=R(e);return null===(r=null==o?void 0:o.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==o||o.RemoveProxy(`${n}.${i}`),Z("delete",n,i,null==o?void 0:o.GetBackend().changes),!0}function ee(e,t,n,i){if(!e)return null;let r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!v(n))return null;let o=Me().CreateChildProxy(e,t,n);return i&&i.AddProxy(o),o}function te(e,t,n,i,r){var o;if(i===h.target)return t;if(i===h.componentId)return e;if(i===h.name)return n.split(".").at(-1);if(i===h.path)return n;if(i===h.parentPath)return n.split(".").slice(0,-1).join(".")||"";let s=i in t;if(!s&&r){let t=r(R(e)||void 0,i);if(!Me().IsNothing(t))return Me().IsFuture(t)?t.Get():t}if(s&&!t.hasOwnProperty(i))return t[i];let l=s?t[i]:null;if(Me().IsFuture(l))return l.Get();let a=R(e);return null==a||a.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(o=ee((null==a?void 0:a.FindProxy(n))||null,i,l,a||void 0))||void 0===o?void 0:o.GetNative())||l}function ne(e,t,n,i,r){var o;if(i in t&&r===t[i])return!0;let s=R(e);return null===(o=null==s?void 0:s.FindProxy(n))||void 0===o||o.RemoveChild(i),t[i]=r,null==s||s.RemoveProxy(`${n}.${i}`),Z("set",`${n}.${i}`,i,null==s?void 0:s.GetBackend().changes),!0}class ie{constructor(e,t,n,i){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);let r=this.componentId_,o=this.GetPath(),s=(e,t)=>{let{context:n}=null==e?void 0:e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){let e=n.Peek(t.substring(1),Me().CreateNothing());if(!Me().IsNothing(e))return e}let r=n.Peek(d.self),o=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!Me().IsNothing(o))return o;let s=i?Q(e,r,t,"$"):Me().CreateNothing();return Me().IsNothing(s)&&t&&t in globalThis&&(s=globalThis[t]),s},l=!this.parentPath_,a={get:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):te(r,e,o,t.toString(),l?s:void 0),set:(e,t,n)=>"symbol"==typeof t||"prototype"===t?Reflect.set(e,t,n):ne(r,e,o,t.toString(),n),deleteProperty:(e,t)=>"symbol"==typeof t||"prototype"===t?Reflect.get(e,t):X(r,e,o,t.toString()),has:(e,t)=>"symbol"!=typeof t||Reflect.has(e,t)};this.native_=new window.Proxy(this.target_,a)}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}}class re extends ie{constructor(e,t){super(e,t,`Proxy<${e}>`)}}function oe(){return{level0:0,level1:0,level2:0}}function se(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?se(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function le(e){return`${e.level2}_${e.level1}_${e.level0}`}function ae(e,t,n,i){return se(e),`${t||""}${n||""}${le(e)}${i||""}`}function ce(e){Me().PushCurrentComponent(e)}function ue(){return Me().PopCurrentComponent()}function de(){return Me().PeekCurrentComponent()}class he{constructor(e){this.componentId_=e,this.nextTickHandlers_=new Array,this.isScheduled_=!1,this.list_=new Array,this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_=new i,this.origins_=new i}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e)}Schedule(){this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;let e=new Array;this.list_.splice(0).forEach((t=>{Object.values(this.subscribers_).filter((e=>e.path===t.path&&e.callback!==(e=>"original"in e?e.original.origin:e.origin)(t))).forEach((n=>((t,n)=>{let i=e.find((e=>e.callback===n));i?i.changes.push(t):e.push({callback:n,changes:new Array(t)})})(t,n.callback)))})),e.forEach((e=>e.callback(e.changes))),this.nextTickHandlers_.splice(0).forEach((e=>{try{e()}catch(e){o(e,`InlineJs.Region<${this.componentId_}>.NextTick`)}}))})))}Add(e){this.list_.push(e),this.Schedule()}AddComposed(e,t,n){let 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 g(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,r;let o=(null===(t=R(de()||""))||void 0===t?void 0:t.GetBackend().changes)||this,s=e.lastIndexOf(".");this.lastAccessContext_=-1==s?"":e.substring(0,s);let l=o.getAccessStorages_.Peek();(null==l?void 0:l.details)&&(null===(n=l.details.raw)||void 0===n||n.entries.push({compnentId:this.componentId_,path:e}),l.details.optimized&&l.details.optimized.entries!==(null===(i=l.details.raw)||void 0===i?void 0:i.entries)&&0!=l.details.optimized.entries.length&&l.lastAccessPath&&l.lastAccessPath.length<e.length&&0==e.indexOf(`${l.lastAccessPath}.`)?l.details.optimized.entries.at(-1).path=e:l.details.optimized&&l.details.optimized.entries!==(null===(r=l.details.raw)||void 0===r?void 0:r.entries)&&l.details.optimized.entries.push({compnentId:this.componentId_,path:e}),l.lastAccessPath=e)}GetLastAccessContext(){return this.lastAccessContext_}ResetLastAccessContext(){this.lastAccessContext_=""}PushGetAccessStorage(e){var t;this.getAccessStorages_.Push({details:e||{optimized:"optimized"===(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetReactiveState())?{entries:new Array,snapshots:new i}:void 0,raw:{entries:new Array,snapshots:new i}},lastAccessPath:""})}PopGetAccessStorage(){var e;return(null===(e=this.getAccessStorages_.Pop())||void 0===e?void 0:e.details)||null}SwapOptimizedGetAccessStorage(){let e=this.getAccessStorages_.Peek();(null==e?void 0:e.details.optimized)&&e.details.raw&&(e.details.optimized.entries=e.details.raw.entries)}RestoreOptimizedGetAccessStorage(){var e;let t=this.getAccessStorages_.Peek();(null==t?void 0:t.details.optimized)&&t.details.optimized.entries===(null===(e=t.details.raw)||void 0===e?void 0:e.entries)&&(t.details.optimized.entries=t.details.raw.entries.slice(0))}FlushRawGetAccessStorage(){var e,t;null===(t=null===(e=this.getAccessStorages_.Peek())||void 0===e?void 0:e.details.raw)||void 0===t||t.entries.splice(0)}PushGetAccessStorageSnapshot(){var e,t;let n=this.getAccessStorages_.Peek();null===(e=null==n?void 0:n.details.optimized)||void 0===e||e.snapshots.Push(n.details.optimized.entries.slice(0).map((e=>Object.assign({},e)))),null===(t=null==n?void 0:n.details.raw)||void 0===t||t.snapshots.Push(n.details.raw.entries.slice(0).map((e=>Object.assign({},e))))}PopGetAccessStorageSnapshot(e){var t,n,i,r;let o=this.getAccessStorages_.Peek(),s=null===(t=null==o?void 0:o.details.optimized)||void 0===t?void 0:t.snapshots.Pop();!e&&s&&(null===(n=null==o?void 0:o.details.optimized)||void 0===n?void 0:n.entries)&&(o.details.optimized.entries=s);let l=null===(i=null==o?void 0:o.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(r=null==o?void 0:o.details.raw)||void 0===r?void 0:r.entries)&&(o.details.raw.entries=l)}PopAllGetAccessStorageSnapshots(e){var t,n,i,r,o,s;let l=this.getAccessStorages_.Peek(),a=null===(t=null==l?void 0:l.details.optimized)||void 0===t?void 0:t.snapshots.Pop();for(;(null===(n=null==l?void 0:l.details.optimized)||void 0===n?void 0:n.snapshots)&&!l.details.optimized.snapshots.IsEmpty();)a=l.details.optimized.snapshots.Pop();!e&&a&&(null===(i=null==l?void 0:l.details.optimized)||void 0===i?void 0:i.entries)&&(l.details.optimized.entries=a);let c=null===(r=null==l?void 0:l.details.raw)||void 0===r?void 0:r.snapshots.Pop();for(;(null===(o=null==l?void 0:l.details.raw)||void 0===o?void 0:o.snapshots)&&!l.details.raw.snapshots.IsEmpty();)c=l.details.raw.snapshots.Pop();!e&&c&&(null===(s=null==l?void 0:l.details.raw)||void 0===s?void 0:s.entries)&&(l.details.raw.entries=c)}PushOrigin(e){this.origins_.Push(e)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){return this.origins_.Pop()}Subscribe(e,t){var n;let i=null===(n=R(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t}),i||""}Unsubscribe(e,t){"string"!=typeof e?Object.entries(this.subscribers_).filter((([n,i])=>e===i.callback&&(!t||t===i.path))).map((([e])=>e)).forEach((e=>{this.Unsubscribe_(e)})):e in this.subscribers_&&this.Unsubscribe_(e)}Unsubscribe_(e){delete this.subscribers_[e]}}class pe{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new i).Push(t)}Pop(e,t){return e in this.record_?this.record_[e].Pop():t||null}Peek(e,t){return e in this.record_?this.record_[e].Peek():t||null}Get(e){return e in this.record_?this.record_[e]:null}}function me(e,t,n){let i="function"==typeof e?function(e){return{handler(t){var{argKey:n}=t,i=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}(t,["argKey"]);this.extensions.hasOwnProperty(n)?this.extensions[n](Object.assign({argKey:n},i)):e(Object.assign({argKey:n},i))},extensions:{}}}(e):e;return i.extensions[t]=n,i}function fe(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 ve{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){let t=Me().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(let t in this.expansionRules_){let n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){let{computedName:n,callback:i}=fe(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;let t=this.handlers_[e];return"function"==typeof t?t:t.handler.bind(t)}AddHandlerExtension(e,t,n){let i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;let{computedName:r,callback:o}=fe(t,n);r&&o&&(this.handlers_[e]=me(i,r,o))}RemoveHandlerExtension(e,t){let 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)}}function _e(e,t){var n;null===(n="string"==typeof e?R(e):e)||void 0===n||n.PushCurrentScope(t)}function ge(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function be(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function ye(){return globalThis.InlineJS_OutsideEvent=globalThis.InlineJS_OutsideEvent||{targetScopes:new Array,eventCallbacks:{}}}function Ce(e,t,n){let i=ye(),r=i.targetScopes.find((t=>t.target===e));r||(r={target:e,listeners:{}},i.targetScopes.push(r)),(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners||(r.listeners[e]={handlers:new Array,excepts:null}),r.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=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function Ee(e,t,n){let i=ye().targetScopes.find((t=>t.target===e));i&&(Array.isArray(t)?t:[t]).forEach((e=>{e in i.listeners&&(n?i.listeners[e].handlers=i.listeners[e].handlers.filter((e=>e.callback!==n)):delete i.listeners[e])}))}function xe(e,t,n){let i=ye().targetScopes.find((t=>t.target===e));i&&Object.keys(t).forEach((e=>{if(e in i.listeners)if(n){let r=i.listeners[e].handlers.find((e=>e.callback===n));r&&(r.excepts=r.excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((e=>{r.excepts.push(e)})))}else i.listeners[e].excepts=i.listeners[e].excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((t=>{i.listeners[e].excepts.push(t)}))}))}function ke(e){ye().targetScopes=ye().targetScopes.filter((t=>t.target!==e&&e.contains(t.target)))}class Ae{constructor(e,t,n,i){this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.scopeId_="",this.key_="",this.locals_={},this.data_={},this.managers_={directive:null},this.callbacks_={post:new Array,uninit:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1},this.scopeId_=be(this.componentId_)||""}GetComponentId(){return this.componentId_}GetScopeId(){return this.scopeId_}GetId(){return this.id_}SetKey(e){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)}DeleteLocal(e){delete this.locals_[e]}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:Me().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t)}GetData(e){return e in this.data_?this.data_[e]:Me().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||this.callbacks_.post.push(e)}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).forEach((e=>s(e,"ElementScope.ExecutePostProcessCallbacks")))}AddUninitCallback(e){this.state_.isMarked||this.callbacks_.uninit.push(e)}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e))}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e))}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>s((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;let n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(...t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]})}RemoveAttributeChangeCallback(e,t){let n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;let 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)}ExecuteAttributeChangeCallbacks(e){(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>s((()=>t.callback(e)))))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,!(this.element_ instanceof HTMLTemplateElement)&&"svg"!==this.element_.tagName.toLowerCase()){let t=R(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.callbacks_.uninit.splice(0).forEach((e=>{try{e()}catch(e){}})),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,ke(this.element_),Me().GetMutationObserver().Unobserve(this.element_);let t=R(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[K],this.isRoot_){let e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>Me().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new ve}DestroyChildren_(e,t,n){Array.from(t.children).forEach((t=>{let i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Ie{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_=""}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}}class Ge{constructor(e,t){this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.context_=new pe,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new i,this.selectionScopes_=new i,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observers_={intersections:{}},this.changes_=new he(this.id_),this.rootProxy_=new re(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,this.CreateElementScope(this.root_),Me().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{let r=R(e);if(!r)return;let o=new Array,s=Me().GetConfig().GetDirectiveRegex();null==i||i.filter((e=>e.target instanceof HTMLElement)).forEach((e=>{var t;s.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),o.forEach((e=>W({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));let l=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement){W({component:r,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=null==r?void 0:r.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!l.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=r.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}SetReactiveState(e){this.reactiveState_=e}GetReactiveState(){return"default"===this.reactiveState_?B().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){return ae(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t)}SetName(e){this.name_=e}GetName(){return this.name_}CreateScope(e){let t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;let n=new Ie(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,n}RemoveScope(e){let t="string"==typeof e?e:e.GetId();t in this.scopes_&&delete this.scopes_[t]}FindScopeById(e){return e in this.scopes_?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)}PopCurrentScope(){return this.currentScope_.Pop()}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){var t;return this.FindScopeById((null===(t=this.FindElementScope(V(e)))||void 0===t?void 0:t.GetScopeId())||"")||null}PushSelectionScope(){let e={set:!1};return this.selectionScopes_.Push(e),e}PopSelectionScope(){return this.selectionScopes_.Pop()}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){let t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;let n=new Ae(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);return this.elementScopes_[n.GetId()]=n,e[K]=n.GetId(),n}RemoveElementScope(e){delete this.elementScopes_[e]}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;let t=!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_;return t&&K in t&&t[K]in this.elementScopes_?this.elementScopes_[t[K]]:null}FindElementLocalValue(e,t,n){let i=this.FindElementScope(e),r=i?i.GetLocal(t):Me().CreateNothing();if(!Me().IsNothing(r)||!n||!i&&"string"==typeof e)return r;let o=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(d.self):e instanceof Node?e:this.root_);if(!o)return r;let s=this.FindAncestor(o);return s?this.FindElementLocalValue(s,t,!0):r}AddProxy(e){this.proxies_[e.GetPath()]=e}RemoveProxy(e){let t="string"==typeof e?e:e.GetPath();t in this.proxies_&&delete this.proxies_[t]}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e}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]}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return Me()}}class Se{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&&r&&(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 Pe{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{let t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t;let i=e.target instanceof HTMLElement?V((null===(t=Y(e.target))||void 0===t?void 0:t.GetRoot())||null):"";if(i)if("childList"===(null==e?void 0:e.type)){let t=n(i);t.added.push(...Array.from(e.addedNodes)),t.removed.push(...Array.from(e.removedNodes))}else"attributes"===(null==e?void 0:e.type)&&e.attributeName&&n(i).attributes.push({name:e.attributeName,target:e.target})})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{let i=n.target instanceof HTMLElement?V(n.target):"";if(!i||!(i in t))return;let r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].attributes);(o||l||a)&&s((()=>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){let i=ae(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]}}class we extends ie{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}class Oe{constructor({appName:e="",reactiveState:t="unoptimized",directivePrefix:n="x",directiveRegex:i,directiveNameBuilder:r}={}){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.appName_=e,this.reactiveState_=t,this.directiveRegex_=i||new RegExp(`^(data-)?${n||"x"}-(.+)$`),this.directiveNameBuilder_=r||((e,t=!1)=>t?`data-${n||"x"}-${e}`:`${n||"x"}-${e}`)}GetAppName(){return this.appName_}GetDirectiveRegex(){return this.directiveRegex_}GetDirectiveName(e,t){return this.directiveNameBuilder_(e,t)}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.reactiveState_=e}GetReactiveState(){return this.reactiveState_}}class Fe{Get(e,t){return fetch(e,t)}}class Re{constructor(e,t=0){this.nothing_=new a,this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new i,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.managers_={directive:new ve,magic:new Se},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new Pe,this.nativeFetch_=new Fe,this.fetchConcept_=null,this.concepts_={},this.config_=new Oe(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.config_=e}GetConfig(){return this.config_}GenerateUniqueId(e,t){return ae(this.uniqueMarkers_,"",e,t)}AddComponentMonitor(e){this.componentsMonitorList_.push(e)}RemoveComponentMonitor(e){this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e))}CreateComponent(e){let t=this.InferComponentFrom(e);if(t)return t;let n=new Ge(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.slice(0).forEach((e=>s((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),n}RemoveComponent(e){let t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){let e=this.components_[t];delete this.components_[t],this.componentsMonitorList_.slice(0).forEach((t=>s((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent")))}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&e in this.components_?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}PushCurrentComponent(e){this.currentComponent_.Push(e)}PopCurrentComponent(){return this.currentComponent_.Pop()}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}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e)}DispatchAttributeProcessing(e){this.attributeProcessors_.forEach((t=>s((()=>t(e)),"InlineJS.Global.DispatchAttribute",e.contextElement)))}AddTextContentProcessor(e){this.textContentProcessors_.push(e)}DispatchTextContentProcessing(e){this.textContentProcessors_.forEach((t=>s((()=>t(e)),"InlineJS.Global.DispatchTextContent",e.contextElement)))}GetMutationObserver(){return this.mutationObserver_}SetFetchConcept(e){this.fetchConcept_=e}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t}RemoveConcept(e){delete this.concepts_[e]}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}CreateChildProxy(e,t,n){return new we(e,t,n)}CreateFuture(e){return new r(e)}IsFuture(e){return e instanceof r}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof a}}const $e="__InlineJS_GLOBAL_KEY__";function Ne(e,t=0){return F(),globalThis[$e]=new Re(e,t),window.dispatchEvent(new CustomEvent(Te)),globalThis[$e]}function De(e,t=0){return Me()||Ne(e,t)}const Te="inlinejs.global.created";function Me(){return globalThis[$e]}function Be(){return Me()?Promise.resolve():new Promise((e=>window.addEventListener(Te,e)))}function Le(e){return e=p(e),Me().IsFuture(e)?Le(e.Get()):!e&&!1!==e&&0!==e||Me().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function je({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:o}){let s={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);let r=t?t(n.toString(),e):e[n];return Me().IsNothing(r)?Reflect.get(e,n):(!o||o.list&&!(n in o.list)||null===(i=R(o.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${o.id}.${n}`),r)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?n(t.toString(),i,e):!!e[t]||!0,deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?i(t.toString(),e):!!delete e[t]||!0,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||{},s)}function Je(e){return je(qe({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function He(){return!1}function ze(e){var{setter:t,deleter:n,lookup:i}=e,r=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}(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||He,deleter:n||He,lookup:i||He})}function qe(e){return ze(e)}function Ue(e,t,n){let i=null==t?void 0:t.FindElementScope(n),r=null==i?void 0:i.GetId();if(!r)return["",null,null];let o=globalThis.InlineJS_ProxyGlobal=globalThis.InlineJS_ProxyGlobal||{},s=o[e]=o[e]||{};return r in s?[r,s[r],s]:(null==i||i.AddUninitCallback((()=>delete s[r])),[r,null,s])}function We(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>We(e,t,!0))):e.then(t)}const Ke="__InlineJS_Context__";let Ve={},Ye={};function Qe(e,t,n){if(Ve.hasOwnProperty(e))return Ve[e];if(Ye.hasOwnProperty(e))return null;try{let n=new Function(Ke,`\n with (__InlineJS_Context__){\n return (${e});\n };\n `).bind(t);return Ve[e]=n}catch(e){e instanceof SyntaxError||o(e,`InlineJs.Region<${n||"NIL"}>.GenerateValueReturningFunction`)}return null}function Ze(e,t,n){if(Ye.hasOwnProperty(e))return Ye[e];try{let n=new Function(Ke,`\n with (__InlineJS_Context__){\n ${e};\n };\n `).bind(t);return Ye[e]=n}catch(e){o(e,`InlineJs.Region<${n||"NIL"}>.GenerateVoidFunction`)}return null}function Xe(e,t,n,i=[]){var r;if("function"==typeof e){let o=R(n||""),s=null==o?void 0:o.FindProxy(null==o?void 0:o.GetBackend().changes.GetLastAccessContext()),l=e.apply((null===(r=s||(null==o?void 0:o.GetRootProxy()))||void 0===r?void 0:r.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function et({componentId:e,contextElement:t,expression:n,disableFunctionCall:i=!1,waitPromise:r="recursive"}){if(!(n=n.trim()))return e=>(e&&e(null),null);let s=(s,l,a,c,u=!0)=>{var h;let p=R(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(h=null==p?void 0:p.FindElementScope(t))||void 0===h?void 0:h.IsDestroyed()))return;let{context:f=null,changes:v=null}=(null==p?void 0:p.GetBackend())||{};null==f||f.Push(d.self,t),null==v||v.ResetLastAccessContext(),ce(e),Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Push(e,t)));try{let t=l(m);if(Me().IsFuture(t)&&(t=t.Get()),!s)return i?t:Xe(t,s,e,a);let n=e=>{"none"!==r?We(e,s,"recursive"===r):s(e)};i?n(t):Xe(t,n,e,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;o(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(d.self)}},l=Qe(n,t,e),a=null;return l||(a=Ze(n,t,e)),(i,r=[],o)=>{if(!a&&l)try{return s(i,l,r||[],o||{})}catch(i){if(!(i instanceof SyntaxError))throw i;a=Ze(n,t,e)}return a?s(i,a,r||[],o||{},!1)||null:(i&&i(null),null)}}function tt(e){return et(e)}function nt(e,t){let n=(e,t)=>We(e,t,!0);return e instanceof l?new l(((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 it(e,t,n){e instanceof l?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function rt({componentId:e,changes:t,callback:n,subscriptionsCallback:i,contextElement:r}){var s,l,a,c;t.PopAllGetAccessStorageSnapshots(!1),t.RestoreOptimizedGetAccessStorage();let{optimized:u,raw:d}=t.PopGetAccessStorage();if(0==((null===(s=u||d)||void 0===s?void 0:s.entries.length)||0))return i&&i({}),null;let h={},p=()=>{Object.keys(h).map((e=>R(e))).filter((e=>!!e)).forEach((e=>{let{changes:t}=e.GetBackend();h[e.GetId()].forEach((e=>t.Unsubscribe(e)))})),h={}},m=!1,f=()=>{m=!0},v=t=>{let i=R(e);if(!i||m)return void p();let{changes:r}=i.GetBackend();r.PushOrigin(v);try{n({changes:t||[],cancel:f})}catch(t){o(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},_={};return null===(l=u||d)||void 0===l||l.entries.forEach((e=>(_[e.path]=_[e.path]||{})[e.compnentId]=!0)),Object.entries(_).forEach((([e,t])=>{Object.keys(t).map((e=>R(e))).filter((e=>!!e)).forEach((t=>{(h[t.GetId()]=h[t.GetId()]||[]).push(t.GetBackend().changes.Subscribe(e,v))}))})),r&&(null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{f(),p()}))),i&&i(h),p}function ot({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r}){var s;let l=()=>{let i=R(e);if(!i)return;let{changes:s}=i.GetBackend(),l=!1,a=n?i.FindElementScope(n):null,c=()=>{l=!0},u=null==a?void 0:a.GetElement();try{s.PushGetAccessStorage(),t({changes:[],cancel:c})}catch(t){o(t,`InlineJS.Component<${e}>.UseEffect`,u)}if(l)return s.PopAllGetAccessStorageSnapshots(!1),s.RestoreOptimizedGetAccessStorage(),void s.PopGetAccessStorage();rt({componentId:e,changes:s,callback:t,subscriptionsCallback:r,contextElement:u})};(null==i?void 0:i.nextTick)?null===(s=R(e))||void 0===s||s.GetBackend().changes.AddNextTickHandler(l):l()}function st(e,t,n,i={}){var r;let o=null;if(o=e instanceof HTMLElement?(null===(r="string"==typeof n?R(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!o)return i;let s=o.GetLocal(t);return Me().IsNothing(s)&&o.SetLocal(t,s=i),s}const lt="__InlineJS_GLOBAL_COMPONENT_KEY__";function at(e){let t=globalThis[lt];if(t||!1===e)return t.component;let n=document.createElement("template");return globalThis[lt]={root:n,component:Me().CreateComponent(n)},globalThis[lt]}const ct=300,ut=0,dt=0;function ht(e,t){if(!e||Me().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;let n=Me().GetConcept("animation");return e.ease=e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,e.actor=e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,e.duration=e.duration||ct,e.delay=e.delay||ut,e.repeats=e.repeats||dt,e}function pt({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:o,allowRepeats:l}){var a,c,u,d;let h=ht((null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(t))||void 0===c?void 0:c.GetData("transition"))||null,o||!1);if(!h||!h.actor||!h.ease||"number"!=typeof h.duration||h.duration<=0)return i(!1),null;let p=e=>{var t;return"function"==typeof(null==h?void 0:h.actor)?null==h?void 0:h.actor(e):h&&(null===(t=h.actor)||void 0===t?void 0:t.Handle(e))},m=e=>{var t;return"function"==typeof h.ease?h.ease(e):h&&(null===(t=h.ease)||void 0===t?void 0:t.Handle(e))||0},f=!1,v=()=>f=!0,_=0,g=e=>o?1-e:e,b=()=>{var i,o;return null===(o=null===(i=R(e))||void 0===i?void 0:i.FindElementScope(t))||void 0===o||o.RemoveUninitCallback(v),(n||t).dispatchEvent(new CustomEvent("transition.canceled")),r&&r(),!1};return null===(d=null===(u=R(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===d||d.AddUninitCallback(v),A(h.duration,0,l?h.repeats:0,h.delay).While((({elapsed:e})=>{if(f)return b();0==_&&((n||t).style.transform="",(n||t).style.transformOrigin="50% 50%",(n||t).dispatchEvent(new CustomEvent("transition.enter"))),p({target:n||t,stage:0==_++?"start":"middle",fraction:m({duration:h.duration,elapsed:e,fraction:g(e/h.duration)})})})).Final((()=>{f?b():(p({target:n||t,stage:"end",fraction:m({duration:h.duration,elapsed:h.duration,fraction:g(1)})}),(n||t).dispatchEvent(new CustomEvent("transition.leave")),s((()=>i(!0))))})),v}function mt({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,afterInsert:o,afterTransitionCallback:l,transitionScope:a}){let c="string"==typeof i?i:(null==i?void 0:i.GetId())||"",u=()=>{let i=document.createElement("template");i.innerHTML=t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),o&&s(o,"InlineJS.InsertHtml",e);let u=R(c);r&&u&&Array.from(e.children).forEach((e=>W({component:u,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),l&&((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),pt({componentId:c,contextElement:a||e,target:e,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),l())}))};if("replace"===n){let t=e=>{let n=R(c);Array.from(e.children).forEach((e=>{let i=null==n?void 0:n.FindElementScope(e);i?i.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),u()};l?((a||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),pt({componentId:c,contextElement:a||e,target:e,reverse:!0,callback:()=>((a||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n())})):n()}else u()}class ft{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;let n=()=>(this.setCallback_||e||this.callback_)&&(this.setCallback_||e||this.callback_)();!this.queued_&&this.initialized_?(this.queued_=!0,null===(t=R(this.componentId_))||void 0===t||t.GetBackend().changes.AddNextTickHandler((()=>{this.queued_=!1,n()}))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}}const vt=/\{\{\s*(.+?)\s*\}\}/g,_t=/\{\{.+?\}\}/;function gt(e){let t=e=>[...e.childNodes].reduce(((e,t)=>`${e}${3!=t.nodeType?n(t):t.textContent||""}`),""),n=e=>`${[...e.attributes].reduce(((e,t)=>`${e} ${t.name}="${t.value}"`),`<${e.tagName.toLowerCase()}`)+">"}${t(e)}</${e.tagName.toLowerCase()}>`;return t(e)}function bt({componentId:e,contextElement:t,text:n,handler:i}){var r;let o=tt({componentId:e,contextElement:t,expression:"let output = "+JSON.stringify(n).replace(vt,'"+($1)+"')+"; return output;"});null===(r=R(e))||void 0===r||r.CreateElementScope(t),ot({componentId:e,contextElement:t,callback:()=>o(i)})}function yt(e){var{text:t}=e,n=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}(e,["text"]);_t.test(t)&&bt(Object.assign({text:t},n))}function Ct({componentId:e,contextElement:t,text:n,handler:i}){if("string"==typeof n)return i&&yt({componentId:e,contextElement:t,text:n,handler:i});if(!_t.test(t.textContent||""))return;let r=new Array,o=new Array;[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&_t.test(n.textContent)){let i={text:n.textContent||"",evaluated:n.textContent||""};r.push(i),o.push((()=>bt({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;r.forEach((n=>{let i=n instanceof Element?n:document.createTextNode("string"==typeof n?n:n.evaluated);e?t.insertBefore(i,e):t.append(i),e=i}))})()}})))}else 3==n.nodeType?r.push(n.textContent||""):r.push(n)})),r.reverse(),o.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function Et({componentId:e,contextElement:t,name:n,value:i}){Ct({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e)})}function xt({componentId:e,contextElement:t}){Ct({componentId:e,contextElement:t})}function kt(e){let t=Me(),n=t.GetConfig();[n.GetDirectiveName("data",!0),n.GetDirectiveName("data",!1)].forEach((n=>{(e||document).querySelectorAll(`[${n}]`).forEach((e=>{e.hasAttribute(n)&&document.contains(e)&&W({component:t.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function At(e){De(),setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{kt(e)})):kt(e)}),0)}function It(e,t){let n="",i=null;if("function"==typeof e){let t=e();t?({name:n,callback:i}=t):(n=e("name"),i=e("callback"))}else v(e)?({name:n,callback:i}=e):Me().GetDirectiveManager().AddHandler(e);n&&i&&(t?Me().GetDirectiveManager().AddHandlerExtension(t,i,n):Me().GetDirectiveManager().AddHandler(i,n))}function Gt(e,t){return{name:e,callback:t}}function St(e,t,n,i,r){let o=Me().GetConfig().GetDirectiveName("on"),s=(r||[]).join("."),l=q(s?`${o}:${n}.${s}`:`${o}:${n}`,i||"");return!!l&&M(e,t,l)}const Pt=["bind","event","on"];function wt({component:e,contextElement:t,key:n,event:i,expression:r,options:o,defaultEvent:s,eventWhitelist:l=[],optionBlacklist:a}){let c=()=>a?null==o?void 0:o.filter((e=>!a.includes(e))):o,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?St(e,t,u(i),r,c()):!(!s||i!==s&&!Pt.includes(i))&&St(e,t,u(s),r,c())}function Ot(e,t,n){let i=Me().GetConfig().GetDirectiveName(t,!1),r=Me().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function Ft({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:o,useEffect:s=!0}){let l=0,a=tt({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{nt(e,(e=>{t==l&&(n?r([n,e]):v(e)?Object.entries(e).forEach(r):o&&("string"==typeof e||Array.isArray(e))&&o("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};s?ot({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const Rt=Array.from(Array(100).keys()).map((e=>e/100));function $t(e){let t={root:null,rootMargin:"0px",threshold:0};return v(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=Rt),t}class Nt{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;let n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{s((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),$t(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)}}function Dt(e,t=0){return e&&e.match(/^[0-9]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseInt(e):parseInt(e):t}function Tt({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){let o=Array.isArray(e)?e:[e],s=e=>("number"==typeof n?n:n&&n(e))||0;return t.forEach(((n,l)=>{let a=o.find((e=>e&&n in e));if(!a)return r&&r({options:e,list:t,option:n,index:l});i&&!0===i({options:e,list:t,option:n,index:l})||("number"==typeof a[n]?l<t.length-1?a[n]=Dt(t[l+1].trim(),s(n)):a[n]=s(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function Mt({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:o,options:s,defaultOptionValue:l,useEffect:a}){let c=tt({componentId:e,contextElement:n,expression:i}),u=Tt({options:s||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===l?0:l||-1}),d=()=>c((e=>We(e,o))),h=()=>!1===a?d():ot({componentId:e,contextElement:n,callback:d});if(u.lazy){let i=t||R(e),r={root:u.ancestor<0?null:null==i?void 0:i.FindAncestor(n,u.ancestor),threshold:u.threshold<0?0:u.threshold},o=i?new Nt(i.GenerateUniqueId("intob_"),r):null;o?(null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:t,entry:n}={})=>{var i;(null==n?void 0:n.isIntersecting)&&(null===(i=R(e))||void 0===i||i.RemoveIntersectionObserver(t),h())}))):h()}else h()}function Bt(e){let t,n="",i=null;if("function"==typeof e){let r=e();r?({name:n,callback:i,onAccess:t}=r):(n=e("name"),i=e("callback"),t=e("access"))}else v(e)?({name:n,callback:i,onAccess:t}=e):Me().GetMagicManager().AddHandler(e);n&&i&&Me().GetMagicManager().AddHandler(i,n,t)}function Lt(e,t,n){return{name:e,callback:t,onAccess:n}}function jt(e){return e.startsWith(":")?Me().GetConfig().GetDirectiveName("bind")+e:null}function Jt(e){return e.startsWith(".")?e.replace(".",Me().GetConfig().GetDirectiveName("class:")):null}function Ht(e){return e.startsWith("@")?e.replace("@",Me().GetConfig().GetDirectiveName("on:")):null}function zt(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}},694:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDirectiveHandlerCompact=t.StripeDirectiveHandler=void 0;const i=n(992),r=["submit","save","name","email","phone","address"],o={number:"cardNumber",expiry:"cardExpiry",cvc:"cardCvc",postal:"postalCode",zip:"postalCode"},s="stripe";let l="",a="https://js.stripe.com/v3/",c=null,u=null;t.StripeDirectiveHandler=(0,i.CreateDirectiveHandlerCallback)(s,(({componentId:e,component:t,contextElement:n,expression:d,argKey:h,argOptions:p})=>{if((0,i.BindEvent)({contextElement:n,expression:d,component:t||e,key:s,event:h,defaultEvent:"success",eventWhitelist:["error","before","after","ready","focus","complete"],options:p,optionBlacklist:["window","document","outside"]}))return;let m=t||(0,i.FindComponentById)(e),f=null==m?void 0:m.FindElementScope(n);if(!m||!f)return(0,i.JournalError)("Failed to retrieve element scope.","InlineJS.stripe",n);let v="$stripe",_="#stripe";if(v in(f.GetLocals()||{}))return;if(r.includes(h)){let t=m.FindElementLocalValue(n,_,!0);return void(t&&(t.specialMounts[h]=n,f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:t=>{var r;if("parent"===t)return n.parentElement?null===(r=(0,i.FindComponentById)(e))||void 0===r?void 0:r.FindElementLocalValue(n.parentElement,v,!0):null},lookup:["parent"]})))))}if(h in o){let t=m.FindElementLocalValue(n,_,!0);if(!t)return;let r=m.GenerateUniqueId("stripe_proxy_"),s={name:h,mount:n,element:t.elements.create(o[h],{style:c||void 0,classes:u||void 0}),ready:!1,complete:!1,error:void 0};if(!s.element)return;s.element.mount(n),t.fields.push(s),f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildGetterProxyOptions)({getter:t=>{var o,l,a,c;return"complete"===t?(null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.complete):"focused"===t?(null===(l=(0,i.FindComponentById)(e))||void 0===l||l.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.focused):"error"===t?(null===(a=(0,i.FindComponentById)(e))||void 0===a||a.GetBackend().changes.AddGetAccess(`${r}.${t}`),s.error):"parent"===t?n.parentElement?null===(c=(0,i.FindComponentById)(e))||void 0===c?void 0:c.FindElementLocalValue(n.parentElement,v,!0):null:"clear"===t?()=>{s.element&&s.element.clear()}:"focus"===t?()=>{s.element&&s.element.focus()}:"blur"===t?()=>{s.element&&s.element.blur()}:void 0},lookup:["complete","focused","error","parent","clear","focus","blur"]})));let l=t.fields;return f.AddUninitCallback((()=>{var e;null===(e=s.element)||void 0===e||e.destroy(),l.splice(l.indexOf(s),1)})),s.element.on("ready",(()=>{s.ready||(s.ready=!0,s.mount.dispatchEvent(new CustomEvent("stripe.ready")),t.onReady())})),s.element.on("change",(n=>{var o,l;if((null==n?void 0:n.complete)!==s.complete){if(s.complete=null==n?void 0:n.complete,s.mount.dispatchEvent(new CustomEvent("stripe.complete",{detail:{completed:null==n?void 0:n.complete}})),s.complete){if(s.error&&(s.error=void 0,(0,i.AddChanges)("set",`${r}.error`,"error",null===(o=(0,i.FindComponentById)(e))||void 0===o?void 0:o.GetBackend().changes)),t.options.autofocus){let e=t.fields.indexOf(s);if(-1!=e&&e<t.fields.length-1){let n=t.fields[e+1];n.element?n.element.focus():"focus"in n.mount&&"function"==typeof n.mount.focus&&n.mount.focus()}else t.specialMounts.submit&&t.specialMounts.submit.focus()}}else(null==n?void 0:n.error)&&n.error.message!==s.error&&(s.error=n.error.message,(0,i.AddChanges)("set",`${r}.error`,"error",null===(l=(0,i.FindComponentById)(e))||void 0===l?void 0:l.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.error",{detail:{message:n.error.message}})));t.onChange()}})),s.element.on("focus",(()=>{var t;s.focused||(s.focused=!0,(0,i.AddChanges)("set",`${r}.focused`,"focused",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!0}})))})),void s.element.on("blur",(()=>{var t;s.focused&&(s.focused=!1,(0,i.AddChanges)("set",`${r}.focused`,"focused",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes),s.mount.dispatchEvent(new CustomEvent("stripe.focus",{detail:{focused:!1}})))}))}let g=null,b=null,y=new Array,C=()=>{(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d})((e=>(g=Stripe(e||l),g?(b=g.elements(),b?void y.splice(0).forEach((e=>(0,i.JournalTry)(e,"InlineJS.stripe.Init",n))):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n)):(0,i.JournalError)("Failed to initialize stripe","InlineJS.stripe.Init",n))))},E=new Array,x={submit:null,save:null,name:null,email:null,phone:null,address:null},k=m.GenerateUniqueId("stripe_proxy_"),A=(0,i.ResolveOptions)({options:{autofocus:!1,nexttick:!1,manual:!1},list:p}),I=!1,G=!1,S=0,P={fields:E,specialMounts:x,options:A,onReady:()=>{var t;return(0,i.AddChanges)("set",`${k}.readyCount`,"readyCount",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes)},onChange:()=>{var t;(t=>{var n;t!=G&&(G=t,(0,i.AddChanges)("set",`${k}.complete`,"complete",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))})(!E.find((e=>!e.complete)));let n=E.reduce(((e,t)=>e+(t.error?1:0)),0);n!=S&&(S=n,(0,i.AddChanges)("set",`${k}.errors`,"errors",null===(t=(0,i.FindComponentById)(e))||void 0===t?void 0:t.GetBackend().changes))}},w=t=>{var n;t!=I&&(I=t,(0,i.AddChanges)("set",`${k}.active`,"active",null===(n=(0,i.FindComponentById)(e))||void 0===n?void 0:n.GetBackend().changes))},O=(0,i.EvaluateLater)({componentId:e,contextElement:n,expression:d}),F=t=>{var r;t.error?R(t.error.message||""):(n.dispatchEvent(new CustomEvent("stripe.success",{detail:{intent:t.paymentIntent}})),n.dispatchEvent(new CustomEvent("stripe.after")),w(!1),A.nexttick?null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddNextTickHandler((()=>O())):O())},R=e=>{n.dispatchEvent(new CustomEvent("stripe.error",{detail:{type:"host",message:e}})),$("host",e),n.dispatchEvent(new CustomEvent("stripe.after")),w(!1)},$=(e,t)=>{n.dispatchEvent(new CustomEvent("stripe.error",{detail:{type:e,message:t}}))},N=(e,t)=>{var n;if(e&&"string"==typeof e)return{payment_method:e,setup_future_usage:t?"off_session":void 0};let i=null===(n=E.find((e=>"number"===e.name)))||void 0===n?void 0:n.element;if(!i)return null;let r={},o=t=>e&&e[t]||(x[t]?x[t].value:void 0);return["name","email","phone","address"].forEach((e=>{"address"===e?r.address={line1:o(e)}:r[e]=o(e)})),!t&&x.save&&x.save instanceof HTMLInputElement&&(t=x.save.checked),{payment_method:{card:i,billing_details:r},setup_future_usage:t?"off_session":void 0}},D=(e,t=!1)=>{t||G&&!E.find((e=>!!e.error))?(w(!0),n.dispatchEvent(new CustomEvent("stripe.before")),e()):$("incomplete","Please fill in all required fields.")};f.SetLocal(_,P),f.SetLocal(v,(0,i.CreateInplaceProxy)((0,i.BuildProxyOptions)({getter:t=>{var n,r,o,s;return"bind"===t?()=>{g||T()}:"active"===t?(null===(n=(0,i.FindComponentById)(e))||void 0===n||n.GetBackend().changes.AddGetAccess(`${k}.${t}`),I):"readyCount"===t?(null===(r=(0,i.FindComponentById)(e))||void 0===r||r.GetBackend().changes.AddGetAccess(`${k}.${t}`),E.reduce(((e,t)=>e+(t.ready?1:0)),0)):"complete"===t?(null===(o=(0,i.FindComponentById)(e))||void 0===o||o.GetBackend().changes.AddGetAccess(`${k}.${t}`),G):"errors"===t?(null===(s=(0,i.FindComponentById)(e))||void 0===s||s.GetBackend().changes.AddGetAccess(`${k}.${t}`),E.filter((e=>!!e.error)).map((e=>e.error))):"instance"===t?g:"publicKey"===t?l:"styles"===t?c:"classes"===t?u:"url"===t?a:"pay"===t?(e,t,n=!1)=>{D((()=>{let i=N(t,n);i&&(null==g||g.confirmCardPayment(e,i).then(F).catch(R))}),!!t&&"string"==typeof t)}:"setup"===t?(e,t,n=!1)=>{D((()=>{let i=N(t,n);i&&(null==g||g.confirmCardSetup(e,i).then(F).catch(R))}),!!t&&"string"==typeof t)}:void 0},setter:(e,t)=>("publicKey"===e?l=t:"styles"===e?c=t:"classes"===e?u=t:"url"===e&&(a=t),!0),lookup:["bind","active","readyCount","complete","errors","instance","publicKey","styles","classes","url","pay","setup"]})));let T=()=>{let e=(0,i.GetGlobal)().GetConcept("resource");a&&e?e.GetScript(a).then(C):C()};A.manual||T()})),t.StripeDirectiveHandlerCompact=function(){(0,i.AddDirectiveHandler)(t.StripeDirectiveHandler)}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.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})},(()=>{const e=n(992),t=n(694);(0,e.WaitForGlobal)().then((()=>(0,t.StripeDirectiveHandlerCompact)()))})()})();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@benbraide/inlinejs-stripe",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.4",
|
4
4
|
"description": "Run javascript code by embedding them in your HTML using the element as context.",
|
5
5
|
"main": "./lib/common/index.js",
|
6
6
|
"module": "./lib/esm/index.js",
|
@@ -16,7 +16,8 @@
|
|
16
16
|
"compile": "tsc -p ./tsconfig.json && tsc -p ./tsconfig.esm.json",
|
17
17
|
"prepublishOnly": "npm run compile",
|
18
18
|
"build": "webpack -c ./webpack.config.js && webpack -c ./webpack2.config.js",
|
19
|
-
"upload": "npm run build && npm publish --access=public"
|
19
|
+
"upload": "npm run build && npm publish --access=public",
|
20
|
+
"push": "npm i @benbraide/inlinejs && npm run upload"
|
20
21
|
},
|
21
22
|
"repository": {
|
22
23
|
"type": "git",
|
@@ -51,7 +52,7 @@
|
|
51
52
|
"webpack": "^5.41.0"
|
52
53
|
},
|
53
54
|
"dependencies": {
|
54
|
-
"@benbraide/inlinejs": "^1.0.
|
55
|
+
"@benbraide/inlinejs": "^1.0.19",
|
55
56
|
"webpack-cli": "^4.7.2"
|
56
57
|
}
|
57
58
|
}
|