!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apprun=e():n.apprun=e()}(this,(()=>(()=>{"use strict";var n={320:(n,e,t)=>{t.d(e,{Fragment:()=>o.FK,createElement:()=>o.n,render:()=>o.cJ,safeHTML:()=>o.t_});var o=t(593)},593:(n,e,t)=>{t.d(e,{FK:()=>q,n:()=>Y,t_:()=>Q,cJ:()=>J});var o={};t.r(o),t.d(o,{boolean:()=>a,booleanish:()=>s,commaOrSpaceSeparated:()=>h,commaSeparated:()=>d,number:()=>c,overloadedBoolean:()=>u,spaceSeparated:()=>p});var l=t(741);class r{constructor(n,e){this.attribute=e,this.property=n}}r.prototype.attribute="",r.prototype.booleanish=!1,r.prototype.boolean=!1,r.prototype.commaOrSpaceSeparated=!1,r.prototype.commaSeparated=!1,r.prototype.defined=!1,r.prototype.mustUseProperty=!1,r.prototype.number=!1,r.prototype.overloadedBoolean=!1,r.prototype.property="",r.prototype.spaceSeparated=!1,r.prototype.space=void 0;let i=0;const a=f(),s=f(),u=f(),c=f(),p=f(),d=f(),h=f();function f(){return 2**++i}const m=Object.keys(o);class g extends r{constructor(n,e,t,l){let r=-1;if(super(n,e),y(this,"space",l),"number"==typeof t)for(;++r"role"===e?e:"aria-"+e.slice(4).toLowerCase()});function P(n,e){return e in n?n[e]:e}function O(n,e){return P(n,e.toLowerCase())}const M=C({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:d,acceptCharset:p,accessKey:p,action:null,allow:null,allowFullScreen:a,allowPaymentRequest:a,allowUserMedia:a,alt:null,as:null,async:a,autoCapitalize:null,autoComplete:p,autoFocus:a,autoPlay:a,blocking:p,capture:null,charSet:null,checked:a,cite:null,className:p,cols:c,colSpan:null,content:null,contentEditable:s,controls:a,controlsList:p,coords:c|d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:a,defer:a,dir:null,dirName:null,disabled:a,download:u,draggable:s,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:a,formTarget:null,headers:p,height:c,hidden:u,high:c,href:null,hrefLang:null,htmlFor:p,httpEquiv:p,id:null,imageSizes:null,imageSrcSet:null,inert:a,inputMode:null,integrity:null,is:null,isMap:a,itemId:null,itemProp:p,itemRef:p,itemScope:a,itemType:p,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:a,low:c,manifest:null,max:null,maxLength:c,media:null,method:null,min:null,minLength:c,multiple:a,muted:a,name:null,nonce:null,noModule:a,noValidate:a,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:a,optimum:c,pattern:null,ping:p,placeholder:null,playsInline:a,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:a,referrerPolicy:null,rel:p,required:a,reversed:a,rows:c,rowSpan:c,sandbox:p,scope:null,scoped:a,seamless:a,selected:a,shadowRootClonable:a,shadowRootDelegatesFocus:a,shadowRootMode:null,shape:null,size:c,sizes:null,slot:null,span:c,spellCheck:s,src:null,srcDoc:null,srcLang:null,srcSet:null,start:c,step:null,style:null,tabIndex:c,target:null,title:null,translate:null,type:null,typeMustMatch:a,useMap:null,value:s,width:c,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:p,axis:null,background:null,bgColor:null,border:c,borderColor:null,bottomMargin:c,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:a,declare:a,event:null,face:null,frame:null,frameBorder:null,hSpace:c,leftMargin:c,link:null,longDesc:null,lowSrc:null,marginHeight:c,marginWidth:c,noResize:a,noHref:a,noShade:a,noWrap:a,object:null,profile:null,prompt:null,rev:null,rightMargin:c,rules:null,scheme:null,scrolling:s,standby:null,summary:null,text:null,topMargin:c,valueType:null,version:null,vAlign:null,vLink:null,vSpace:c,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:a,disableRemotePlayback:a,prefix:null,property:null,results:c,security:null,unselectable:null},space:"html",transform:O}),L=C({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:h,accentHeight:c,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:c,amplitude:c,arabicForm:null,ascent:c,attributeName:null,attributeType:null,azimuth:c,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:c,by:null,calcMode:null,capHeight:c,className:p,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:c,diffuseConstant:c,direction:null,display:null,dur:null,divisor:c,dominantBaseline:null,download:a,dx:null,dy:null,edgeMode:null,editable:null,elevation:c,enableBackground:null,end:null,event:null,exponent:c,externalResourcesRequired:null,fill:null,fillOpacity:c,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:d,g2:d,glyphName:d,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:c,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:c,horizOriginX:c,horizOriginY:c,id:null,ideographic:c,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:c,k:c,k1:c,k2:c,k3:c,k4:c,kernelMatrix:h,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:c,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:c,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:c,overlineThickness:c,paintOrder:null,panose1:null,path:null,pathLength:c,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:p,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:c,pointsAtY:c,pointsAtZ:c,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:h,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:h,rev:h,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:h,requiredFeatures:h,requiredFonts:h,requiredFormats:h,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:c,specularExponent:c,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:c,strikethroughThickness:c,string:null,stroke:null,strokeDashArray:h,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:c,strokeOpacity:c,strokeWidth:null,style:null,surfaceScale:c,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:h,tabIndex:c,tableValues:null,target:null,targetX:c,targetY:c,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:h,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:c,underlineThickness:c,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:c,values:null,vAlphabetic:c,vMathematical:c,vectorEffect:null,vHanging:c,vIdeographic:c,version:null,vertAdvY:c,vertOriginX:c,vertOriginY:c,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:c,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:P}),T=C({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(n,e)=>"xlink:"+e.slice(5).toLowerCase()}),R=C({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:O}),D=C({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(n,e)=>"xml:"+e.slice(3).toLowerCase()}),j=A([E,M,T,R,D],"html"),U=A([E,L,T,R,D],"svg"),B="_props",N=new Map;function F(n,e,t){!function(n){return null!=n&&!1!==n&&""!==n&&(!0===n||("string"==typeof n?"false"!==n.toLowerCase()&&"0"!==n:Boolean(n)))}(t)?n.removeAttribute(e):n.setAttribute(e,e)}function I(n,e,t){try{n[e]=t}catch(o){z(n,e,t,!1)}}function z(n,e,t,o){if(null==t)return void n.removeAttribute(e);const l=String(t);if(o&&e.includes(":")){const[t]=e.split(":");"xlink"===t?n.setAttributeNS("http://www.w3.org/1999/xlink",e,l):n.setAttribute(e,l)}else n.setAttribute(e,l)}function H(n,e,t,o){if(l=n,i=e,document.activeElement===l?["selectionStart","selectionEnd","selectionDirection"].includes(i):"scrollTop"===i||"scrollLeft"===i||l instanceof HTMLMediaElement&&["currentTime","paused","playbackRate","volume"].includes(i))return;var l,i;if("style"===e){if(n.style.cssText&&(n.style.cssText=""),"string"==typeof t)n.style.cssText=t;else if(t&&"object"==typeof t)for(const e in t)n.style[e]!==t[e]&&(n.style[e]=t[e]);return}if("key"===e)return void(null!=t&&(n.key=t));if(e.startsWith("data-"))return void function(n,e,t){const o=(l=e.slice(5)).length<=1?l.toLowerCase():l.split("-").map(((n,e)=>0===e?n.toLowerCase():n.charAt(0).toUpperCase()+n.slice(1).toLowerCase())).join("");var l;null==t?delete n.dataset[o]:n.dataset[o]=String(t)}(n,e,t);if(e.startsWith("on"))return void function(n,e,t){e.startsWith("on")&&(t&&"function"!=typeof t?"string"==typeof t&&(t?n.setAttribute(e,t):n.removeAttribute(e)):n[e]=t)}(n,e,t);if(!("INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&"SELECT"!==n.tagName||"value"!==e&&"selected"!==e&&"selectedIndex"!==e))return void I(n,e,t);if("INPUT"===n.tagName&&"checked"===e)return I(n,e,t),void F(n,e,t);const a=function(n,e){const t=`${n}:${e}`;let o=N.get(t);return void 0===o&&(o=function(n,e){const t=v(e);let o=e,l=r;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&"data"===t.slice(0,4)&&k.test(e)){if("-"===e.charAt(4)){const n=e.slice(5).replace(w,x);o="data"+n.charAt(0).toUpperCase()+n.slice(1)}else{const n=e.slice(4);if(!w.test(n)){let t=n.replace(b,_);"-"!==t.charAt(0)&&(t="-"+t),e="data"+t}}l=g}return new l(o,e)}(e?U:j,n)||null,N.set(t,o)),o}(e,o);a?a.boolean||a.overloadedBoolean?F(n,a.attribute,t):a.mustUseProperty&&!o?I(n,a.property,t):z(n,a.attribute,t,o):e.startsWith("aria-")||"role"===e?z(n,e,t,o):e in n||void 0!==n[e]?I(n,e,t):z(n,e,t,o)}function W(n){return/^[a-zA-Z_:][\w\-:.]*$/.test(n)&&!n.includes("<")&&!n.includes(">")&&!n.includes('"')&&!n.includes("'")}function $(n,e,t){const o=function(n,e){if(e&&(e.class=e.class||e.className,delete e.className),!n||0===Object.keys(n).length)return e||{};if(!e||0===Object.keys(e).length){const e={};return Object.keys(n).forEach((n=>e[n]=null)),e}const t={};return Object.keys(n).forEach((n=>{n in e||(t[n]=null)})),Object.keys(e).forEach((n=>t[n]=e[n])),t}(n[B]||{},e);n[B]=e||{},function(n,e,t,o){for(const t in e)W(t)&&H(n,t,e[t],o);e&&"function"==typeof e.ref&&window.requestAnimationFrame((()=>e.ref(n)))}(n,o,0,t)}function q(n,...e){return V(e)}function V(n){const e=[],t=n=>{null!=n&&""!==n&&!1!==n&&e.push("function"==typeof n||"object"==typeof n?n:`${n}`)};return n&&n.forEach((n=>{Array.isArray(n)?n.forEach((n=>t(n))):t(n)})),e}const K={};let X=0;function Y(n,e,...t){const o=V(t);if("string"==typeof n)return{tag:n,props:e,children:o};if(Array.isArray(n))return n;if(void 0===n&&t)return o;if(Object.getPrototypeOf(n).__isAppRunComponent)return{tag:n,props:e,children:o};if("function"==typeof n)return n(e,o);throw new Error(`Unknown tag in vdom ${n}`)}const J=(n,e,t={})=>{null!=e&&!1!==e&&function(n,e,t={}){if(null==e||!1===e)return;if(e=tn(e,t),!n)return;const o="SVG"===n.nodeName;Array.isArray(e)?G(n,e,o):G(n,[e],o)}("string"==typeof n&&n?document.getElementById(n)||document.querySelector(n):n,e=(0,l.A)(e,t),t)};function Z(n,e,t){t=t||"svg"===e.tag,function(n,e){const t=n.nodeName,o=`${e.tag||""}`;return t.toUpperCase()===o.toUpperCase()}(n,e)?(G(n,e.children,t),$(n,e.props,t)):n.parentNode.replaceChild(en(e,t),n)}function G(n,e,t){const o=n.childNodes?.length||0,l=e?.length||0,r=Math.min(o,l);for(let o=0;or;)n.removeChild(n.lastChild),i--;if(l>r){const o=document.createDocumentFragment();for(let n=r;n{const e=document.createElement("section");return e.insertAdjacentHTML("afterbegin",n),Array.from(e.children)};function nn(n){if(0===n?.indexOf("_html:")){const e=document.createElement("div");return e.insertAdjacentHTML("afterbegin",n.substring(6)),e}return document.createTextNode(n??"")}function en(n,e){if(n instanceof HTMLElement||n instanceof SVGElement)return n;if("string"==typeof n)return nn(n);if(!n.tag||"function"==typeof n.tag)return nn(JSON.stringify(n));const t=(e=e||"svg"===n.tag)?document.createElementNS("http://www.w3.org/2000/svg",n.tag):document.createElement(n.tag);return $(t,n.props,e),n.children&&n.children.forEach((n=>t.appendChild(en(n,e)))),n.props&&void 0!==n.props.key&&(t.key=n.props.key,K[n.props.key]=t,++X>=500&&(function(){if(!(Object.keys(K).length<=1e3))for(const[n,e]of Object.entries(K))e.isConnected||delete K[n]}(),X=0)),t}function tn(n,e,t=0){if("string"==typeof n)return n;if(Array.isArray(n))return n.map((n=>tn(n,e,t++)));let o=n;if(n&&"function"==typeof n.tag&&Object.getPrototypeOf(n.tag).__isAppRunComponent&&(o=function(n,e,t){const{tag:o,props:l,children:r}=n;let i=`_${t}`,a=l&&l.id;a?i=a:a=`_${t}${Date.now()}`;let s="section";l&&l.as&&(s=l.as,delete l.as),e.__componentCache||(e.__componentCache={});let u=e.__componentCache[i];if(u&&u instanceof o&&u.element)u.renderState(u.state);else{const n=document.createElement(s);u=e.__componentCache[i]=new o({...l,children:r}).mount(n,{render:!0})}if(u.mounted){const n=u.mounted(l,r,u.state);void 0!==n&&u.setState(n)}return $(u.element,l,!1),u.element}(n,e,t)),o&&Array.isArray(o.children)){const n=o.props?._component;if(n){let e=0;o.children=o.children.map((t=>tn(t,n,e++)))}else o.children=o.children.map((n=>tn(n,e,t++)))}return o}},634:(n,e,t)=>{function o(n){return n?.target instanceof HTMLElement?n.target:null}function l(n,e=document){try{return e.querySelector(n)}catch(e){return console.warn(`Invalid selector: ${n}`,e),null}}function r(n){try{return document.getElementById(n)}catch(e){return console.warn(`Error getting element by id: ${n}`,e),null}}t.d(e,{PB:()=>o,bV:()=>l,oP:()=>r})},672:(n,e,t)=>{t.d(e,{C:()=>l,a:()=>o});const o="3.38.0",l=`AppRun-${o}`},741:(n,e,t)=>{t.d(e,{A:()=>u});var o=t(859),l=t(634);const r=n=>{if(!n)return[];const e=[];let t="",o=!1,l="";for(let r=0;r{if(!e)return n.state||"";const t=r(e),o=((n,e)=>{let t=n;for(const n of e){if(null==t)return;t=t[n]}return t})(n.state,t);return void 0!==o?o:""},a=(n,e,t)=>{if(!e)return void n.setState(t);const o=r(e),l=((n,e,t)=>{if(0===e.length)return t;const o={...n};let l=o;for(let n=0;n{if(Array.isArray(n))return n.map((n=>s(n,e)));{let{type:t,tag:r,props:u,children:c}=n;return r=r||t,c=c||u?.children,u&&Object.keys(u).forEach((n=>{n.startsWith("$")&&(((n,e,t,r)=>{if(n.startsWith("$on")){const t=e[n];if(n=n.substring(1),"boolean"==typeof t)e[n]=e=>r.run?r.run(n,e):o.A.run(n,e);else if("string"==typeof t)e[n]=n=>r.run?r.run(t,n):o.A.run(t,n);else if("function"==typeof t)e[n]=n=>r.setState(t(r.state,n));else if(Array.isArray(t)){const[l,...i]=t;"string"==typeof l?e[n]=n=>r.run?r.run(l,...i,n):o.A.run(l,...i,n):"function"==typeof l&&(e[n]=n=>r.setState(l(r.state,...i,n)))}}else if("$bind"===n){const o=e.type||"text",s="string"==typeof e[n]?e[n]:e.name;if("input"===t)switch(o){case"checkbox":e.checked=i(r,s),e.onclick=n=>{const e=(0,l.PB)(n);e&&a(r,s||e.name,e.checked)};break;case"radio":e.checked=i(r,s)===e.value,e.onclick=n=>{const e=(0,l.PB)(n);e&&a(r,s||e.name,e.value)};break;case"number":case"range":e.value=i(r,s),e.oninput=n=>{const e=(0,l.PB)(n);e&&a(r,s||e.name,Number(e.value))};break;default:e.value=i(r,s),e.oninput=n=>{const e=(0,l.PB)(n);e&&a(r,s||e.name,e.value)}}else"select"===t?(e.value=i(r,s),e.onchange=n=>{const e=(0,l.PB)(n);e&&!e.multiple&&a(r,s||e.name,e.value)}):"option"===t?(e.selected=i(r,s),e.onclick=n=>{const e=(0,l.PB)(n);e&&a(r,s||e.name,e.selected)}):"textarea"===t&&(e.innerHTML=i(r,s),e.oninput=n=>{const e=(0,l.PB)(n);e&&a(r,s||e.name,e.value)})}else o.A.run("$",{key:n,tag:t,props:e,component:r})})(n,u,r,e),delete u[n])})),c&&s(c,e),n}},u=s},859:(n,e,t)=>{t.d(e,{A:()=>s,q:()=>l});var o=t(672);class l{constructor(){this._events={}}on(n,e,t={}){this._events[n]=this._events[n]||[],this._events[n].push({fn:e,options:t})}off(n,e){const t=this._events[n]||[];this._events[n]=t.filter((n=>n.fn!==e))}find(n){return this._events[n]}run(n,...e){const t=this.getSubscribers(n,this._events);return console.assert(t&&t.length>0,"No subscriber for event: "+n),t.forEach((t=>{const{fn:o,options:l}=t;if(!o||"function"!=typeof o)return console.error(`AppRun event handler for '${n}' is not a function:`,o),!1;if(l.delay)this.delay(n,o,e,l);else try{Object.keys(l).length>0?o.apply(this,[...e,l]):o.apply(this,e)}catch(e){console.error(`Error in event handler for '${n}':`,e)}return!t.options.once})),t.length}once(n,e,t={}){this.on(n,e,{...t,once:!0})}delay(n,e,t,o){o._t&&clearTimeout(o._t),o._t=setTimeout((()=>{clearTimeout(o._t);try{Object.keys(o).length>0?e.apply(this,[...t,o]):e.apply(this,t)}catch(e){console.error(`Error in delayed event handler for '${n}':`,e)}}),o.delay)}runAsync(n,...e){const t=this.getSubscribers(n,this._events);console.assert(t&&t.length>0,"No subscriber for event: "+n);const o=t.map((t=>{const{fn:o,options:l}=t;if(!o||"function"!=typeof o)return console.error(`AppRun async event handler for '${n}' is not a function:`,o),Promise.resolve(null);try{return Object.keys(l).length>0?o.apply(this,[...e,l]):o.apply(this,e)}catch(e){return console.error(`Error in async event handler for '${n}':`,e),Promise.reject(e)}}));return Promise.all(o)}query(n,...e){return console.warn("app.query() is deprecated. Use app.runAsync() instead."),this.runAsync(n,...e)}getSubscribers(n,e){const t=e[n]||[];return e[n]=t.filter((n=>!n.options.once)),Object.keys(e).filter((e=>e.endsWith("*")&&n.startsWith(e.replace("*","")))).sort(((n,e)=>e.length-n.length)).forEach((o=>t.push(...e[o].map((e=>({...e,options:{...e.options,event:n}})))))),t}}const r=o.C;let i;const a="undefined"!=typeof window?window:void 0!==t.g?t.g:"undefined"!=typeof self?self:{};a.app&&a._AppRunVersions?i=a.app:(i=new l,a.app=i,a._AppRunVersions=r);const s=i},971:(n,e,t)=>{t.d(e,{Component:()=>d,app:()=>S});var o=t(859),l=t(320);const r=(n,e={})=>class extends HTMLElement{constructor(){super()}get component(){return this._component}get state(){return this._component.state}static get observedAttributes(){return(e.observedAttributes||[]).map((n=>n.toLowerCase()))}connectedCallback(){if(this.isConnected&&!this._component){const t=e||{};this._shadowRoot=t.shadow?this.attachShadow({mode:"open"}):this;const o=t.observedAttributes||[],l=o.reduce(((n,e)=>{const t=e.toLowerCase();return t!==e&&(n[t]=e),n}),{});this._attrMap=n=>l[n]||n;const r={};Array.from(this.attributes).forEach((n=>r[this._attrMap(n.name)]=n.value)),o.forEach((n=>{void 0!==this[n]&&(r[n]=this[n]),Object.defineProperty(this,n,{get:()=>r[n],set(e){this.attributeChangedCallback(n,r[n],e)},configurable:!0,enumerable:!0})})),requestAnimationFrame((()=>{const e=this.children?Array.from(this.children):[];if(this._component=new n({...r,children:e}).mount(this._shadowRoot,t),this._component._props=r,this._component.dispatchEvent=this.dispatchEvent.bind(this),this._component.mounted){const n=this._component.mounted(r,e,this._component.state);void 0!==n&&(this._component.state=n)}this.on=this._component.on.bind(this._component),this.run=this._component.run.bind(this._component),!1!==t.render&&this._component.run(".")}))}}disconnectedCallback(){this._component?.unload?.(),this._component?.unmount?.(),this._component=null}attributeChangedCallback(n,t,o){if(this._component){const l=this._attrMap(n);this._component._props[l]=o,this._component.run("attributeChanged",l,t,o),o!==t&&!1!==e.render&&window.requestAnimationFrame((()=>{this._component.run(".")}))}}},i=(n,e,t)=>{"undefined"!=typeof customElements&&customElements.define(n,r(e,t))},a={meta:new WeakMap,defineMetadata(n,e,t){this.meta.has(t)||this.meta.set(t,{}),this.meta.get(t)[n]=e},getMetadataKeys(n){return n=Object.getPrototypeOf(n),this.meta.get(n)?Object.keys(this.meta.get(n)):[]},getMetadata(n,e){return e=Object.getPrototypeOf(e),this.meta.get(e)?this.meta.get(e)[n]:null}};var s=t(741),u=t(634);const c=n=>n,p=o.A;class d{renderState(n,e=null){if(!this.view)return;let t=e||this.view(n);if(p.debug&&p.run("debug",{component:this,_:t?".":"-",state:n,vdom:t,el:this.element}),"object"!=typeof document)return;const o="string"==typeof this.element&&this.element?(0,u.oP)(this.element)||(0,u.bV)(this.element):this.element;if(!o)return void console.warn(`Component element not found: ${this.element}`);const l="_c";this.unload?o._component===this&&o.getAttribute(l)===this.tracking_id||(this.tracking_id=(new Date).valueOf().toString(),o.setAttribute(l,this.tracking_id),"undefined"!=typeof MutationObserver&&(this.observer||(this.observer=new MutationObserver((n=>{n[0].oldValue!==this.tracking_id&&document.body.contains(o)||(this.unload(this.state),this.observer.disconnect(),this.observer=null)}))),this.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:[l]}))):o.removeAttribute&&o.removeAttribute(l),o._component=this,!e&&t&&(t=(0,s.A)(t,this),this.options.transition&&document&&document.startViewTransition?document.startViewTransition((()=>p.render(o,t,this))):p.render(o,t,this)),this.rendered&&this.rendered(this.state)}setState(n,e={render:!0,history:!1}){const t=n;if(t?.[Symbol.asyncIterator])this.setState((async n=>{try{for(;;){const{value:t,done:o}=await n.next();if(o)break;this.setState(t,e)}}catch(n){console.error("Error in async iterator:",n)}})(t[Symbol.asyncIterator]()),e);else if(t?.[Symbol.iterator]&&"function"==typeof t.next)for(const n of t)this.setState(n,e);else if(n&&n instanceof Promise)Promise.resolve(n).then((t=>{this.setState(t,e),this._state=n}));else{if(this._state=n,null==n)return;this.state=n,!1!==e.render&&(e.transition&&document&&document.startViewTransition?document.startViewTransition((()=>this.renderState(n))):this.renderState(n)),!1!==e.history&&this.enable_history&&(this._history=[...this._history,n],this._history_idx=this._history.length-1),"function"==typeof e.callback&&e.callback(this.state)}}constructor(n,e,t,l){this.state=n,this.view=e,this.update=t,this.options=l,this._app=new o.q,this._actions=[],this._global_events=[],this._history=[],this._history_idx=-1,this._history_prev=()=>{this._history_idx--,this._history_idx>=0?this.setState(this._history[this._history_idx],{render:!0,history:!1}):this._history_idx=0},this._history_next=()=>{this._history_idx++,this._history_idx{if(this.mount(n,{render:!0,...e}),this.mounted&&"function"==typeof this.mounted){const n=this.mounted({},[],this.state);void 0!==n&&this.setState(n)}return this}}mount(n=null,e){return console.assert(!this.element,"Component already mounted."),this.options=e={...this.options,...e},this.element=n,this.global_event=e.global_event,this.enable_history=!!e.history,this.enable_history&&(this.on(e.history.prev||"history-prev",this._history_prev),this.on(e.history.next||"history-next",this._history_next)),e.route&&(this.update=this.update||{},this.update[e.route]||(this.update[e.route]=c)),this.add_actions(),this.state=this.state??this.model??{},"function"==typeof this.state&&(this.state=this.state()),this.setState(this.state,{render:!!e.render,history:!0}),p.debug&&p.find("debug-create-component")?.length&&p.run("debug-create-component",this),this}is_global_event(n){return n&&(this.global_event||this._global_events.indexOf(n)>=0||n.startsWith("#")||n.startsWith("/")||n.startsWith("@"))}add_action(n,e,t={}){e&&"function"==typeof e?(t.global&&this._global_events.push(n),this.on(n,((...o)=>{p.debug&&p.run("debug",{component:this,_:">",event:n,p:o,current_state:this.state,options:t});try{const l=e(this.state,...o);p.debug&&p.run("debug",{component:this,_:"<",event:n,p:o,newState:l,state:this.state,options:t}),this.setState(l,t)}catch(e){console.error(`Error in component action '${n}':`,e),p.debug&&p.run("debug",{component:this,_:"!",event:n,p:o,error:e,state:this.state,options:t})}}),t)):console.warn(`Component action for '${n}' is not a valid function:`,e)}add_actions(){const n=this.update||{};a.getMetadataKeys(this).forEach((e=>{if(e.startsWith("apprun-update:")){const t=a.getMetadata(e,this);n[t.name]=[this[t.key].bind(this),t.options]}}));const e={};Array.isArray(n)?n.forEach((n=>{const[t,o,l]=n;t.toString().split(",").forEach((n=>e[n.trim()]=[o,l]))})):Object.keys(n).forEach((t=>{const o=n[t];("function"==typeof o||Array.isArray(o))&&t.split(",").forEach((n=>e[n.trim()]=o))})),e["."]||(e["."]=c),Object.keys(e).forEach((n=>{const t=e[n];"function"==typeof t?this.add_action(n,t):Array.isArray(t)&&this.add_action(n,t[0],t[1])}))}run(n,...e){if(this.state instanceof Promise)return Promise.resolve(this.state).then((t=>{this.state=t,this.run(n,...e)}));{const t=n.toString();return this.is_global_event(t)?p.run(t,...e):this._app.run(t,...e)}}on(n,e,t){const o=n.toString();return this._actions.push({name:o,fn:e}),this.is_global_event(o)?p.on(o,e,t):this._app.on(o,e,t)}runAsync(n,...e){const t=n.toString();return this.is_global_event(t)?p.runAsync(t,...e):this._app.runAsync(t,...e)}query(n,...e){return console.warn("component.query() is deprecated. Use component.runAsync() instead."),this.runAsync(n,...e)}unmount(){this.observer?.disconnect(),this._actions.forEach((n=>{const{name:e,fn:t}=n;this.is_global_event(e)?p.off(e,t):this._app.off(e,t)}))}}function h(){const n=o.A.find("#");if(n&&n.length>0)return o.A.run("#"),void o.A.run(m,"#");const e=o.A.find("/");if(e&&e.length>0)return o.A.run("/"),void o.A.run(m,"/");const t=o.A.find("#/");if(t&&t.length>0)return o.A.run("#/"),void o.A.run(m,"#/");console.warn("No subscribers for event: "),o.A.run(g,""),o.A.run(m,"")}d.__isAppRunComponent=!0;const f=(n,...e)=>{if(!n||n===m||n===g)return;const t=o.A.find(n);t&&0!==t.length?o.A.run(n,...e):(console.warn(`No subscribers for event: ${n}`),o.A.run(g,n,...e)),o.A.run(m,n,...e)},m="//",g="///",y=n=>{o.A.lastUrl!==n&&(o.A.lastUrl=n,function(n){if(!n)return void h();n=function(n){return n&&"/"!==n&&"#"!==n&&"#/"!==n&&n.endsWith("/")?n.slice(0,-1):n}(n);const e=o.A.basePath;e&&(n=function(n,e){if(!e||"/"===e||""===e)return n;const t=e.startsWith("/")?e:"/"+e;if(n.startsWith(t)){const e=n.substring(t.length);return e.startsWith("/")?e:"/"+e}return n}(n,e));const t=function(n){return n?n.startsWith("#/")?n.substring(2).split("/"):n.startsWith("#")||n.startsWith("/")?n.substring(1).split("/"):n.split("/"):[]}(n);let l;!function(n){const e=n.filter(Boolean);e.length>11&&console.warn(`Deep route hierarchy detected: ${e.join("/")} (${e.length} levels)`)}(t),l=n.startsWith("#/")?"hash-slash":n.startsWith("#")?"hash":n.startsWith("/")?"path":"non-prefixed";const r=function(n,e){const t=[];for(let o=n.length;o>0;o--){const l=n.slice(0,o);let r="";switch(e){case"path":r="/"+l.join("/");break;case"hash":r="#"+l.join("/");break;case"hash-slash":r="#/"+l.join("/");break;case"non-prefixed":r=l.join("/")}t.push(r)}return t}(t,l),i=function(n,e){for(let t=0;t0){const o=n.length-t;return{eventName:l,parameters:e.slice(o)}}}return null}(r,t);if(i)f(i.eventName,...i.parameters);else if(r.length>0){const e=r[r.length-1];console.warn(`No subscribers for event: ${e}`),o.A.run(g,n),o.A.run(m,n)}else h()}(n))};function v(n){return n&&"object"==typeof n&&"function"==typeof n.mount}function b(n){return"function"==typeof n&&n.prototype&&n.prototype.constructor===n&&(void 0!==n.prototype.mount||void 0!==n.prototype.state||void 0!==n.prototype.view)}function w(n){return"function"==typeof n&&!b(n)}async function k(n,e=3){let t=n,o=0;for(;w(t)&&o{for(const[t,l]of Object.entries(e))if(l&&t)if(v(l)){const e={route:t};l.mount(n,e)}else if(b(l)){const e={route:t};(new l).mount(n,e)}else if(w(l)){let e=await k(l);if(v(e)){const o={route:t};e.mount(n,o);continue}if(b(e)){const o={route:t};(new e).mount(n,o);continue}o.A.on(t,((...e)=>{const t=l(...e);if("string"!=typeof n||(n=document.querySelector(n)))return o.A.render(n,t);console.error(`Element not found: ${n}`)}))}else console.error("Invalid component: component must be a class, instance, or function that returns a class/instance");else console.error(`Invalid component configuration: component=${l}, route=${t}`)};var x=t(672);const S=o.A;if(!S.start){S.version=x.a,S.h=S.createElement=l.createElement,S.render=l.render,S.Fragment=l.Fragment,S.webComponent=i,S.safeHTML=l.safeHTML,S.start=(n,e,t,o,l)=>{const r={render:!0,global_event:!0,...l},i=new d(e,t,o);return l&&l.rendered&&(i.rendered=l.rendered),l&&l.mounted&&(i.mounted=l.mounted),i.start(n,r),i},S.query=S.query||S.runAsync;const n=n=>{};if(S.on("/",n),S.on("debug",(e=>n)),S.on(m,n),S.on(g,n),S.route=y,S.on("route",(n=>S.route&&S.route(n))),"object"==typeof document&&document.addEventListener("DOMContentLoaded",(()=>{const n=document.body.hasAttribute("apprun-no-init")||S["no-init-route"]||!1,e=S.find("#")||S.find("#/")||!1;window.addEventListener("hashchange",(()=>y(location.hash))),window.addEventListener("popstate",(()=>y(location.pathname))),e?!n&&y(location.hash):(!n&&(()=>{const n=S.basePath||"";let e=location.pathname;n&&e.startsWith(n)&&(e=e.substring(n.length),e.startsWith("/")||(e="/"+e)),y(e)})(),document.body.addEventListener("click",(n=>{const e=n.target;if(!e)return;const t="A"===e.tagName?e:e.closest("a");if(t&&t.origin===location.origin&&t.pathname){n.preventDefault();const e=(S.basePath||"")+t.pathname;history.pushState(null,"",e),y(t.pathname)}})))})),"object"==typeof window){const n=window;n.Component=d,n._React=n.React,n.React=S,n.on=function(n,e={}){return function(t,o){const l=n?n.toString():o;a.defineMetadata(`apprun-update:${l}`,{name:l,key:o,options:e},t)}},n.customElement=function(n,e){return function(t){return i(n,t,e),t}},n.safeHTML=l.safeHTML}S.use_render=(n,e=0)=>{S.render=0===e?(e,t)=>n(t,e):(e,t)=>n(e,t)},S.use_react=(n,e)=>{if(n&&e)if("function"==typeof n.createElement)if(n.Fragment)if(S.h=S.createElement=n.createElement,S.Fragment=n.Fragment,n.version&&n.version.startsWith("18")){if(!e.createRoot||"function"!=typeof e.createRoot)return void console.error("AppRun use_react: ReactDOM.createRoot not found in React 18+");S.render=(n,t)=>{n&&void 0!==t&&(n._root||(n._root=e.createRoot(n)),n._root.render(t))}}else{if(!e.render||"function"!=typeof e.render)return void console.error("AppRun use_react: ReactDOM.render not found in legacy React");S.render=(n,t)=>e.render(t,n)}else console.error("AppRun use_react: Invalid React object - Fragment not found");else console.error("AppRun use_react: Invalid React object - createElement method not found");else console.error("AppRun use_react: React and ReactDOM parameters are required")},S.addComponents=_}}},e={};function t(o){var l=e[o];if(void 0!==l)return l.exports;var r=e[o]={exports:{}};return n[o](r,r.exports,t),r.exports}t.d=(n,e)=>{for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),t.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var o={};t.r(o);var l=t(971);const r=(n,e,t,o)=>{if(!e||!t)return;const l=n=>{const t=e.cloneNode();e.parentNode?.replaceChild(t,e),e=t;const o=e.contentWindow?.document;o&&(o.open(),n.indexOf("=0?o.write(n):o.write((n=>`\n\n\n \n \n \n AppRun Playground\n \n