// Generated by Construct, the game and animation creation tool
// Visit: https://www.construct.net

// workers/domHandler.js
"use strict";window.DOMHandler=class{constructor(t,i){this._iRuntime=t,this._componentId=i,this._hasTickCallback=!1,this._tickCallback=()=>this.Tick()}Attach(){}PostToRuntime(t,i,e,s){this._iRuntime.PostToRuntimeComponent(this._componentId,t,i,e,s)}PostToRuntimeAsync(t,i,e,s){return this._iRuntime.PostToRuntimeComponentAsync(this._componentId,t,i,e,s)}_PostToRuntimeMaybeSync(t,i,e){this._iRuntime.UsesWorker()?this.PostToRuntime(t,i,e):this._iRuntime._GetLocalRuntime()["_OnMessageFromDOM"]({"type":"event","component":this._componentId,"handler":t,"dispatchOpts":e||null,"data":i,"responseId":null})}AddRuntimeMessageHandler(t,i){this._iRuntime.AddRuntimeComponentMessageHandler(this._componentId,t,i)}AddRuntimeMessageHandlers(t){for(const[i,e]of t)this.AddRuntimeMessageHandler(i,e)}GetRuntimeInterface(){return this._iRuntime}GetComponentID(){return this._componentId}_StartTicking(){this._hasTickCallback||(this._iRuntime._AddRAFCallback(this._tickCallback),this._hasTickCallback=!0)}_StopTicking(){this._hasTickCallback&&(this._iRuntime._RemoveRAFCallback(this._tickCallback),this._hasTickCallback=!1)}Tick(){}},window.RateLimiter=class{constructor(t,i){this._callback=t,this._interval=i,this._timerId=-1,this._lastCallTime=-1/0,this._timerCallFunc=()=>this._OnTimer(),this._ignoreReset=!1,this._canRunImmediate=!1}SetCanRunImmediate(t){this._canRunImmediate=!!t}Call(){if(-1===this._timerId){const t=Date.now(),i=t-this._lastCallTime,e=this._interval;e<=i&&this._canRunImmediate?(this._lastCallTime=t,this._RunCallback()):this._timerId=self.setTimeout(this._timerCallFunc,Math.max(e-i,4))}}_RunCallback(){this._ignoreReset=!0,this._callback(),this._ignoreReset=!1}Reset(){this._ignoreReset||(this._CancelTimer(),this._lastCallTime=Date.now())}_OnTimer(){this._timerId=-1,this._lastCallTime=Date.now(),this._RunCallback()}_CancelTimer(){-1!==this._timerId&&(self.clearTimeout(this._timerId),this._timerId=-1)}Release(){this._CancelTimer(),this._callback=null,this._timerCallFunc=null}};

// workers/domElementHandler.js
"use strict";{class a{constructor(e){this._elem=e,this._hadFirstUpdate=!1,this._isVisibleFlag=!0,this._wantHtmlIndex=-1,this._actualHtmlIndex=-1,this._htmlZIndex=-1}SetVisibleFlag(e){this._isVisibleFlag=!!e}GetVisibleFlag(){return this._isVisibleFlag}HadFirstUpdate(){return this._hadFirstUpdate}SetHadFirstUpdate(){this._hadFirstUpdate=!0}GetWantHTMLIndex(){return this._wantHtmlIndex}SetWantHTMLIndex(e){this._wantHtmlIndex=e}GetActualHTMLIndex(){return this._actualHtmlIndex}SetActualHTMLIndex(e){this._actualHtmlIndex=e}SetHTMLZIndex(e){this._htmlZIndex=e}GetHTMLZIndex(){return this._htmlZIndex}GetElement(){return this._elem}}window.DOMElementHandler=class extends self.DOMHandler{constructor(e,t){super(e,t),this._elementMap=new Map,this._autoAttach=!0,this.AddRuntimeMessageHandlers([["create",e=>this._OnCreate(e)],["destroy",e=>this._OnDestroy(e)],["set-visible",e=>this._OnSetVisible(e)],["update-position",e=>this._OnUpdatePosition(e)],["update-state",e=>this._OnUpdateState(e)],["focus",e=>this._OnSetFocus(e)],["set-css-style",e=>this._OnSetCssStyle(e)],["set-attribute",e=>this._OnSetAttribute(e)],["remove-attribute",e=>this._OnRemoveAttribute(e)]]),this.AddDOMElementMessageHandler("get-element",e=>e)}SetAutoAttach(e){this._autoAttach=!!e}AddDOMElementMessageHandler(e,s){this.AddRuntimeMessageHandler(e,e=>{const t=e["elementId"],n=this.GetElementById(t);return s(n,e)})}AddDOMElementMessageHandlers(e){for(const[t,n]of e)this.AddDOMElementMessageHandler(t,n)}_OnCreate(e){const t=e["elementId"],n=this.CreateElement(t,e),s=new a(n),i=(this._elementMap.set(t,s),n.style.boxSizing="border-box",n.style.display="none",s.SetVisibleFlag(e["isVisible"]),this._GetFocusElement(n)),l=(i.addEventListener("focus",e=>this._OnFocus(t)),i.addEventListener("blur",e=>this._OnBlur(t)),e["htmlIndex"]);if(s.SetWantHTMLIndex(l),s.SetHTMLZIndex(e["htmlZIndex"]),this._autoAttach){const d=this.GetRuntimeInterface().GetAvailableHTMLIndex(l),r=(s.SetActualHTMLIndex(d),this.GetRuntimeInterface().GetHTMLWrapElement(d));r.appendChild(n)}}CreateElement(e,t){throw new Error("required override")}DestroyElement(e){}_OnDestroy(e){const t=e["elementId"],n=this.GetElementById(t);this.DestroyElement(n),this._autoAttach&&n.parentElement.removeChild(n),this._elementMap.delete(t)}PostToRuntimeElement(e,t,n){(n=n||{})["elementId"]=t,this.PostToRuntime(e,n)}_PostToRuntimeElementMaybeSync(e,t,n){(n=n||{})["elementId"]=t,this._PostToRuntimeMaybeSync(e,n)}_OnSetVisible(e){if(this._autoAttach){const t=this._elementMap.get(e["elementId"]),n=t.GetElement();t.HadFirstUpdate()?n.style.display=e["isVisible"]?"":"none":t.SetVisibleFlag(e["isVisible"])}}_OnUpdatePosition(e){if(this._autoAttach){const t=this._elementMap.get(e["elementId"]),n=t.GetElement(),s=this.GetRuntimeInterface(),i=(n.style.left=e["left"]+"px",n.style.top=e["top"]+"px",n.style.width=e["width"]+"px",n.style.height=e["height"]+"px",e["fontSize"]),l=(null!==i&&(n.style.fontSize=i+"em"),e["htmlIndex"]),a=(t.SetWantHTMLIndex(l),s.GetAvailableHTMLIndex(l));if(a!==t.GetActualHTMLIndex()){n.remove();const r=s.GetHTMLWrapElement(a);r.appendChild(n),t.SetActualHTMLIndex(a),s._UpdateHTMLElementsZOrder()}const d=e["htmlZIndex"];d!==t.GetHTMLZIndex()&&(t.SetHTMLZIndex(d),s._UpdateHTMLElementsZOrder()),t.HadFirstUpdate()||(t.SetHadFirstUpdate(),t.GetVisibleFlag()&&(n.style.display=""))}}_OnHTMLLayersChanged(){if(this._autoAttach)for(const e of this._elementMap.values()){const t=this.GetRuntimeInterface().GetAvailableHTMLIndex(e.GetWantHTMLIndex()),n=e.GetActualHTMLIndex();if(-1!==t&&-1!==n&&t!==n){const s=e.GetElement(),i=(s.remove(),this.GetRuntimeInterface().GetHTMLWrapElement(t));i.appendChild(s),e.SetActualHTMLIndex(t)}}}_GetAllElementStatesForZOrderUpdate(){return this._autoAttach?[...this._elementMap.values()]:null}_OnUpdateState(e){const t=this.GetElementById(e["elementId"]);this.UpdateState(t,e)}UpdateState(e,t){throw new Error("required override")}_GetFocusElement(e){return e}_OnFocus(e){this.PostToRuntimeElement("elem-focused",e)}_OnBlur(e){this.PostToRuntimeElement("elem-blurred",e)}_OnSetFocus(e){const t=this._GetFocusElement(this.GetElementById(e["elementId"]));e["focus"]?t.focus():t.blur()}_OnSetCssStyle(e){const t=this.GetElementById(e["elementId"]),n=e["prop"],s=e["val"];n.startsWith("--")?t.style.setProperty(n,s):t.style[n]=s}_OnSetAttribute(e){const t=this.GetElementById(e["elementId"]);t.setAttribute(e["name"],e["val"])}_OnRemoveAttribute(e){const t=this.GetElementById(e["elementId"]);t.removeAttribute(e["name"])}GetElementById(e){const t=this._elementMap.get(e);if(t)return t.GetElement();throw new Error("no element with id "+e)}}}

// workers/domSide.js
"use strict";{const a=/(iphone|ipod|ipad|macos|macintosh|mac os x)/i.test(navigator.userAgent),b=/android/i.test(navigator.userAgent),c=/safari/i.test(navigator.userAgent)&&!/(chrome|chromium|edg\/|OPR\/|nwjs)/i.test(navigator.userAgent);let d=0;function AddScript(s){const r=document.createElement("script");return r.async=!1,r.type="module",s.isStringSrc?new Promise(e=>{const t="c3_resolve_"+d;++d,self[t]=e,r.textContent=s.str+`

self["${t}"]();`,document.head.appendChild(r)}):new Promise((e,t)=>{r.onload=e,r.onerror=t,r.src=s,document.head.appendChild(r)})}async function CheckSupportsWorkerMode(){if(!navigator["userActivation"]||"undefined"==typeof OffscreenCanvas)return!1;try{let e=!1;const t=new Blob([`
	self.addEventListener("message", () =>
	{
		try {
			const offscreenCanvas = new OffscreenCanvas(32, 32);
			const gl = offscreenCanvas.getContext("webgl");
			self.postMessage(!!gl);
		}
		catch (err)
		{
			console.warn("Feature detection worker error:", err);
			self.postMessage(false);
		}
	});`],{"type":"text/javascript"}),s=new Worker(URL.createObjectURL(t),{get type(){e=!0}}),r=await new Promise(t=>{s.addEventListener("message",e=>{s.terminate(),t(e.data)}),s.postMessage("")});return e&&r}catch(e){return console.warn("Error feature detecting worker mode: ",e),!1}}let e=new Audio;const f={"audio/webm; codecs=opus":!!e.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!e.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!e.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!e.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!e.canPlayType("audio/mp4"),"audio/mpeg":!!e.canPlayType("audio/mpeg")};async function BlobToString(e){const t=await BlobToArrayBuffer(e),s=new TextDecoder("utf-8");return s.decode(t)}function BlobToArrayBuffer(r){return new Promise((t,s)=>{const e=new FileReader;e.onload=e=>t(e.target.result),e.onerror=e=>s(e),e.readAsArrayBuffer(r)})}e=null;const g=[];let r=0;const i=8,j=(window["RealFile"]=window["File"],[]),k=new Map,l=new Map;let h=0;const n=[],o=(self.runOnStartup=function(e){if("function"!=typeof e)throw new Error("runOnStartup called without a function");n.push(e)},new Set(["cordova","playable-ad-single-file","playable-ad-zip","instant-games"]));function IsWebViewExportType(e){return o.has(e)}let t=!1;window.RuntimeInterface=class Q{constructor(e){if(this._useWorker=e.useWorker,this._messageChannelPort=null,this._runtimeBaseUrl="",this._scriptFolder=e.scriptFolder,this._worker=null,this._localRuntime=null,this._domHandlers=[],this._runtimeDomHandler=null,this._isFirstSizeUpdate=!0,this._canvasLayers=[],this._pendingRemoveElements=[],this._pendingUpdateHTMLZOrder=!1,this._updateHTMLZOrderRAFCallback=()=>this._DoUpdateHTMLElementsZOrder(),this._isExportingToVideo=!1,this._exportToVideoDuration=0,this._jobScheduler=null,this._rafId=-1,this._rafFunc=()=>this._OnRAFCallback(),this._rafCallbacks=new Set,this._wrapperInitResolve=null,this._wrapperComponentIds=[],this._exportType=e.exportType,this._isFileProtocol="file"===location.protocol.substr(0,4),this._directoryHandles=[],"playable-ad-single-file"!==this._exportType&&"playable-ad-zip"!==this._exportType&&"instant-games"!==this._exportType||(this._useWorker=!1),c&&(this._useWorker=!1),"cordova"===this._exportType&&this._useWorker&&b){const t=/Chrome\/(\d+)/i.exec(navigator.userAgent);t&&90<=parseInt(t[1],10)||(this._useWorker=!1)}this.IsAnyWebView2Wrapper()?self["chrome"]["webview"].addEventListener("message",e=>this._OnWrapperMessage(e.data,e["additionalObjects"])):"macos-wkwebview"===this._exportType?self["C3WrapperOnMessage"]=e=>this._OnWrapperMessage(e):"linux-cef"===this._exportType&&self["c3_linux_cef_set_message_callback"](e=>this._OnWrapperMessage(JSON.parse(e))),this._localFileBlobs=null,this._localFileStrings=null,"html5"!==this._exportType||window.isSecureContext||console.warn("[Construct] Warning: the browser indicates this is not a secure context. Some features may be unavailable. Use secure (HTTPS) hosting to ensure all features are available."),this.AddRuntimeComponentMessageHandler("canvas","update-size",e=>this._OnUpdateCanvasSize(e)),this.AddRuntimeComponentMessageHandler("canvas","set-html-layer-count",e=>this["_OnSetHTMLLayerCount"](e)),this.AddRuntimeComponentMessageHandler("canvas","cleanup-html-layers",()=>this._OnCleanUpHTMLLayers()),this.AddRuntimeComponentMessageHandler("canvas","update-html-layer-dom-state",e=>this._UpdateHTMLLayerDOMProperties(e["layersDomState"])),this.AddRuntimeComponentMessageHandler("runtime","cordova-fetch-local-file",e=>this._OnCordovaFetchLocalFile(e)),this.AddRuntimeComponentMessageHandler("runtime","create-job-worker",e=>this._OnCreateJobWorker(e)),this.AddRuntimeComponentMessageHandler("runtime","send-wrapper-extension-message",e=>this._OnSendWrapperExtensionMessage(e)),"cordova"===this._exportType?document.addEventListener("deviceready",()=>this._Init(e)):this._Init(e),this._skipAndroidVirtualKeyboardDetection=0}Release(){this._CancelAnimationFrame(),this._messageChannelPort&&(this._messageChannelPort.onmessage=null,this._messageChannelPort=null),this._worker&&(this._worker.terminate(),this._worker=null),this._localRuntime&&(this._localRuntime.Release(),this._localRuntime=null);for(const{canvas:e,htmlWrap:t}of this._canvasLayers)e.remove(),t.remove();this._canvasLayers.length=0}GetMainCanvas(){return this._canvasLayers[0].canvas}GetAvailableHTMLIndex(e){return Math.min(e,this._canvasLayers.length-1)}GetHTMLWrapElement(e){if(e<0||e>=this._canvasLayers.length)throw new RangeError("invalid canvas layer");return this._canvasLayers[e].htmlWrap}["_GetHTMLWrapElement"](e){return this.GetHTMLWrapElement(e)}GetRuntimeBaseURL(){return this._runtimeBaseUrl}UsesWorker(){return this._useWorker}GetExportType(){return this._exportType}IsFileProtocol(){return this._isFileProtocol}GetScriptFolder(){return this._scriptFolder}IsiOSCordova(){return a&&"cordova"===this._exportType}IsiOSWebView(){const e=navigator.userAgent;return a&&IsWebViewExportType(this._exportType)||navigator["standalone"]||/crios\/|fxios\/|edgios\//i.test(e)}IsAndroid(){return b}IsAndroidWebView(){return b&&IsWebViewExportType(this._exportType)}IsWindowsWebView2(){return"windows-webview2"===this._exportType||!!("preview"===this._exportType&&window["chrome"]&&window["chrome"]["webview"]&&window["chrome"]["webview"]["postMessage"])}IsAnyWebView2Wrapper(){return this.IsWindowsWebView2()||"xbox-uwp-webview2"===this._exportType}SkipNextAndroidVirtualKeyboardDetection(){this.IsAndroidWebView()&&this._skipAndroidVirtualKeyboardDetection++}CanDoAndroidVirtualKeyboardDetection(){return this._CanDoAndroidVirtualKeyboardDetection().next().value}*_CanDoAndroidVirtualKeyboardDetection(){if(!this.IsAndroidWebView())return!0;yield 0===this._skipAndroidVirtualKeyboardDetection,0<this._skipAndroidVirtualKeyboardDetection&&this._skipAndroidVirtualKeyboardDetection--}async _Init(e){if(this._useWorker){const s=await CheckSupportsWorkerMode();s||(this._useWorker=!1)}if("macos-wkwebview"===this._exportType)this._SendWrapperMessage({"type":"ready"});else if(this.IsAnyWebView2Wrapper()||"linux-cef"===this._exportType){this._SetupDesktopWrapperPolyfills();const r=await this._InitWrapper();this._wrapperComponentIds=r["registeredComponentIds"]}if("playable-ad-single-file"===this._exportType&&(this._localFileBlobs=self["c3_base64files"],this._localFileStrings={},await this._ConvertDataUrisToBlobs()),"nwjs"===this._exportType&&self["nw"]){const i=self["nw"]["Window"]["get"]();if(i["on"]("close",()=>self["nw"]["App"]["quit"]()),self["nw"]["App"]["manifest"]["c3-steam-mode"]){let e=0;this._AddRAFCallback(()=>{e++,document.documentElement.style.opacity=e%2==0?"1":"0.999"})}}if(e.runtimeBaseUrl)this._runtimeBaseUrl=e.runtimeBaseUrl;else{const n=location.origin,a=(this._runtimeBaseUrl=("null"===n?"file:///":n)+location.pathname,this._runtimeBaseUrl.lastIndexOf("/"));-1!==a&&(this._runtimeBaseUrl=this._runtimeBaseUrl.substr(0,a+1))}const t=new MessageChannel;if(this._messageChannelPort=t.port1,this._messageChannelPort.onmessage=e=>this["_OnMessageFromRuntime"](e.data),window["c3_addPortMessageHandler"]&&window["c3_addPortMessageHandler"](e=>this._OnMessageFromDebugger(e)),this._jobScheduler=new self.JobSchedulerDOM(this),await this._jobScheduler.Init(),"object"==typeof window["StatusBar"]&&window["StatusBar"]["hide"](),"object"==typeof window["AndroidFullScreen"])try{await new Promise((e,t)=>{window["AndroidFullScreen"]["immersiveMode"](e,t)})}catch(e){console.error("Failed to enter Android immersive mode: ",e)}this._useWorker?await this._InitWorker(e,t.port2):await this._InitDOM(e,t.port2)}_GetCommonRuntimeOptions(e){return{"runtimeBaseUrl":this._runtimeBaseUrl,"previewUrl":location.href,"windowInnerWidth":this._GetWindowInnerWidth(),"windowInnerHeight":this._GetWindowInnerHeight(),"cssDisplayMode":this.GetCssDisplayMode(),"devicePixelRatio":window.devicePixelRatio,"isFullscreen":Q.IsDocumentFullscreen(),"swClientId":window["cr_swClientId"]||"","exportType":e.exportType,"isNWjs":"undefined"!=typeof nw,"fileMap":globalThis.c3_swFileMap??new Map(Object.entries(this._localFileBlobs??{})),"scriptFolder":this._scriptFolder,"isDebug":new URLSearchParams(self.location.search).has("debug"),"ife":!!self.ife,"jobScheduler":this._jobScheduler.GetPortData(),"supportedAudioFormats":f,"isFileProtocol":this._isFileProtocol,"isiOSCordova":this.IsiOSCordova(),"isiOSWebView":this.IsiOSWebView(),"isWindowsWebView2":this.IsWindowsWebView2(),"isAnyWebView2Wrapper":this.IsAnyWebView2Wrapper(),"wrapperComponentIds":this._wrapperComponentIds,"isFBInstantAvailable":void 0!==self["FBInstant"]}}async _InitWorker(e,t){const i=e.workerMainUrl,s=("preview"===this._exportType?(this._worker=new Worker("previewworker.js",{type:"module",name:"Runtime"}),await new Promise((t,s)=>{const r=e=>{this._worker.removeEventListener("message",r),(e.data&&"ok"===e.data["type"]?t:s)()};this._worker.addEventListener("message",r),this._worker.postMessage({"type":"construct-worker-init","import":new URL(i,this._runtimeBaseUrl).toString()})})):this._worker=await this.CreateWorker(i,{type:"module",name:"Runtime"}),document.createElement("canvas")),r=(s.style.display="none",s["transferControlToOffscreen"]()),n=(document.body.appendChild(s),document.createElement("div"));n.className="c3htmlwrap",n.setAttribute("interactive",""),document.body.appendChild(n),this._canvasLayers.push({canvas:s,htmlWrap:n,lastHtmlLayerDomState:{isVisible:!0,opacity:1,isInteractive:!0}}),window["c3canvas"]=s,self["C3_InsertHTMLPlaceholders"]&&self["C3_InsertHTMLPlaceholders"](),this._worker.postMessage(Object.assign(this._GetCommonRuntimeOptions(e),{"type":"init-runtime","isInWorker":!0,"messagePort":t,"canvas":r,"runtimeScriptList":e.runtimeScriptList,"projectMainScriptPath":e.projectMainScriptPath,"scriptsInEventsPath":e.scriptsInEventsPath}),[t,r,...this._jobScheduler.GetPortTransferables()]),this._domHandlers=j.map(e=>new e(this)),this._FindRuntimeDOMHandler(),this._runtimeDomHandler._AddDefaultCanvasEventHandlers(s),this._runtimeDomHandler._AddDefaultHTMLWrapEventHandlers(n),this._runtimeDomHandler._EnableWindowResizeEvent(),self["c3_callFunction"]=(e,t)=>this._runtimeDomHandler._InvokeFunctionFromJS(e,t),"preview"===this._exportType&&(self["goToLastErrorScript"]=()=>this.PostToRuntimeComponent("runtime","go-to-last-error-script"))}async _InitDOM(e,t){const s=document.createElement("canvas"),r=(s.style.display="none",document.body.appendChild(s),document.createElement("div")),i=(r.className="c3htmlwrap",r.setAttribute("interactive",""),document.body.appendChild(r),this._canvasLayers.push({canvas:s,htmlWrap:r,lastHtmlLayerDomState:{isVisible:!0,opacity:1,isInteractive:!0}}),window["c3canvas"]=s,self["C3_InsertHTMLPlaceholders"]&&self["C3_InsertHTMLPlaceholders"](),this._domHandlers=j.map(e=>new e(this)),this._FindRuntimeDOMHandler(),this._runtimeDomHandler._AddDefaultCanvasEventHandlers(s),this._runtimeDomHandler._AddDefaultHTMLWrapEventHandlers(r),await Promise.all(e.runtimeScriptList.map(e=>this._MaybeGetPlatformSpecificScriptURL(e)))),a=(await Promise.all(i.map(e=>AddScript(e))),e.projectMainScriptPath),o=e.scriptsInEventsPath;if(a)try{if(await AddScript(a),"preview"===this._exportType&&!globalThis.C3_ProjectMainScriptOK)throw new Error("main script did not run to completion")}catch(e){this._RemoveLoadingMessage(),console.error("Error loading project main script: ",e),alert(`Failed to load the project main script (${a}). Check all your JavaScript code has valid syntax, all imports are written correctly, and that an exception was not thrown running the script. Press F12 and check the console for error details.`)}if(o)try{if(await AddScript(o),"preview"===this._exportType&&!globalThis.C3.ScriptsInEvents)throw new Error("scripts in events did not run to completion")}catch(e){this._RemoveLoadingMessage(),console.error("Error loading scripts in events: ",e),alert("Failed to load scripts in events. Check all your JavaScript code has valid syntax, all imports are written correctly, and that an exception was not thrown running the 'Imports for events' script. Press F12 and check the console for error details.")}const l=Object.assign(this._GetCommonRuntimeOptions(e),{"isInWorker":!1,"messagePort":t,"canvas":s,"runOnStartupFunctions":n});this._runtimeDomHandler._EnableWindowResizeEvent(),this._OnBeforeCreateRuntime(),this._localRuntime=self["C3_CreateRuntime"](l),await self["C3_InitRuntime"](this._localRuntime,l)}async CreateWorker(e,t){if(e.startsWith("blob:"))return new Worker(e,t);if("cordova"===this._exportType&&this._isFileProtocol){const i=await this.CordovaFetchLocalFileAsArrayBuffer(e),n=new Blob([i],{type:"application/javascript"});return new Worker(URL.createObjectURL(n),t)}if("playable-ad-single-file"===this._exportType){const a=this._localFileBlobs[e];if(a)return new Worker(URL.createObjectURL(a),t);throw new Error("missing script: "+e)}const s=new URL(e,location.href),r=location.origin!==s.origin;if(r){const o=await fetch(s);if(!o.ok)throw new Error("failed to fetch worker script");const l=await o.blob();return new Worker(URL.createObjectURL(l),t)}return new Worker(s,t)}_GetWindowInnerWidth(){return Math.max(window.innerWidth,1)}_GetWindowInnerHeight(){return Math.max(window.innerHeight,1)}GetCssDisplayMode(){if(this.IsAnyWebView2Wrapper())return"standalone";const e=this.GetExportType(),t=new Set(["cordova","nwjs","macos-wkwebview","linux-cef"]);return t.has(e)?"standalone":window.matchMedia("(display-mode: fullscreen)").matches?"fullscreen":window.matchMedia("(display-mode: standalone)").matches?"standalone":window.matchMedia("(display-mode: minimal-ui)").matches?"minimal-ui":navigator["standalone"]?"standalone":"browser"}_OnBeforeCreateRuntime(){this._RemoveLoadingMessage()}_RemoveLoadingMessage(){const e=window["cr_previewLoadingElem"];e&&(e.parentElement.removeChild(e),window["cr_previewLoadingElem"]=null)}async _OnCreateJobWorker(e){const t=await this._jobScheduler._CreateJobWorker();return{"outputPort":t,"transferables":[t]}}_OnUpdateCanvasSize(e){if(!this.IsExportingToVideo()){const t=e["styleWidth"]+"px",s=e["styleHeight"]+"px",r=e["marginLeft"]+"px",i=e["marginTop"]+"px";for(const{canvas:n,htmlWrap:a}of this._canvasLayers)n.style.width=t,n.style.height=s,n.style.marginLeft=r,n.style.marginTop=i,a.style.width=t,a.style.height=s,a.style.marginLeft=r,a.style.marginTop=i,this._isFirstSizeUpdate&&(n.style.display="",a.style.display="");document.documentElement.style.setProperty("--construct-scale",e["displayScale"]),this._isFirstSizeUpdate=!1}}["_OnSetHTMLLayerCount"](e){const s=e["count"],t=e["layersDomState"],r=e["immediate"],i=e["styleWidth"]+"px",n=e["styleHeight"]+"px",a=e["marginLeft"]+"px",o=e["marginTop"]+"px",l=[],c=[];if(s<this._canvasLayers.length)for(;this._canvasLayers.length>s;){const{canvas:d,htmlWrap:h}=this._canvasLayers.pop();h.remove(),this._useWorker&&!r?this._pendingRemoveElements.push(d):d.remove()}else if(s>this._canvasLayers.length)for(let e=0,t=s-this._canvasLayers.length;e<t;++e){const p=document.createElement("canvas");if(p.classList.add("c3overlay"),this._useWorker){const u=p["transferControlToOffscreen"]();l.push(u),c.push(u)}else l.push(p);document.body.appendChild(p);const m=document.createElement("div");m.classList.add("c3htmlwrap","c3overlay"),m.setAttribute("interactive",""),document.body.appendChild(m),p.style.width=i,p.style.height=n,p.style.marginLeft=a,p.style.marginTop=o,m.style.width=i,m.style.height=n,m.style.marginLeft=a,m.style.marginTop=o,this._runtimeDomHandler._AddDefaultCanvasEventHandlers(p),this._runtimeDomHandler._AddDefaultHTMLWrapEventHandlers(m),this._canvasLayers.push({canvas:p,htmlWrap:m,lastHtmlLayerDomState:{isVisible:!0,opacity:1,isInteractive:!0}})}this._UpdateHTMLLayerDOMProperties(t);for(const _ of this._domHandlers)_ instanceof window.DOMElementHandler&&_._OnHTMLLayersChanged();return this._UpdateHTMLElementsZOrder(),{"addedCanvases":l,"transferables":c}}_UpdateHTMLLayerDOMProperties(s){for(let e=0,t=Math.min(this._canvasLayers.length,s.length);e<t;++e){const{htmlWrap:r,lastHtmlLayerDomState:i}=this._canvasLayers[e],n=s[e],a=n["isVisible"],o=n["opacity"],l=n["isInteractive"];a!==i.isVisible&&(r.style.display=a?"":"none",i.isVisible=a),o!==i.opacity&&(r.style.opacity=1===o?"":String(o),i.opacity=o),l!==i.isInteractive&&(r.style.pointerEvents=l?"":"none",l?r.setAttribute("interactive",""):r.removeAttribute("interactive"),i.isInteractive=l)}}_OnCleanUpHTMLLayers(){for(const e of this._pendingRemoveElements)e.remove();this._pendingRemoveElements.length=0}_UpdateHTMLElementsZOrder(){this._pendingUpdateHTMLZOrder||(this._pendingUpdateHTMLZOrder=!0,this._AddRAFCallback(this._updateHTMLZOrderRAFCallback))}_DoUpdateHTMLElementsZOrder(){this._RemoveRAFCallback(this._updateHTMLZOrderRAFCallback),this._pendingUpdateHTMLZOrder=!1;let e=[];for(const n of this._domHandlers)if(n instanceof window.DOMElementHandler){const a=n._GetAllElementStatesForZOrderUpdate();a&&e.push(...a)}e.sort((e,t)=>{const s=e.GetActualHTMLIndex(),r=t.GetActualHTMLIndex();if(s!==r)return s-r;const i=e.GetHTMLZIndex(),n=t.GetHTMLZIndex();return i-n});let t=0,s=0,r=0,i=e.length;for(;r<i;++r){const o=e[r];o.GetActualHTMLIndex()!==t&&(this._DoUpdateHTMLElementsZOrderOnHTMLLayer(t,e.slice(s,r)),t=o.GetActualHTMLIndex(),s=r)}s<r&&this._DoUpdateHTMLElementsZOrderOnHTMLLayer(t,e.slice(s,r))}_DoUpdateHTMLElementsZOrderOnHTMLLayer(e,t){if(!(t.length<=1||e>=this._canvasLayers.length)){const r=t.map(e=>e.GetElement()),s=new Set(r),i=this.GetHTMLWrapElement(e),n=Array.from(i.children).filter(e=>s.has(e));for(let e=0,t=0,s=r.length;e<s;++e){const a=r[e],o=n[t];a===o?++t:i.insertBefore(a,o)}}}_GetLocalRuntime(){if(this._useWorker)throw new Error("not available in worker mode");return this._localRuntime}PostToRuntimeComponent(e,t,s,r,i){this._messageChannelPort.postMessage({"type":"event","component":e,"handler":t,"dispatchOpts":r||null,"data":s,"responseId":null},i)}PostToRuntimeComponentAsync(e,t,s,r,i){const n=h++,a=new Promise((e,t)=>{l.set(n,{resolve:e,reject:t})});return this._messageChannelPort.postMessage({"type":"event","component":e,"handler":t,"dispatchOpts":r||null,"data":s,"responseId":n},i),a}["_OnMessageFromRuntime"](e){const t=e["type"];if("event"===t)return this._OnEventFromRuntime(e);if("result"===t)this._OnResultFromRuntime(e);else if("runtime-ready"===t)this._OnRuntimeReady();else if("alert-error"===t)this._RemoveLoadingMessage(),alert(e["message"]);else{if("creating-runtime"!==t)throw new Error(`unknown message '${t}'`);this._OnBeforeCreateRuntime()}}_OnEventFromRuntime(e){const t=e["component"],s=e["handler"],r=e["data"],i=e["responseId"],n=k.get(t);if(n){const a=n.get(s);if(a){let e=null;try{e=a(r)}catch(e){return console.error(`Exception in '${t}' handler '${s}':`,e),void(null!==i&&this._PostResultToRuntime(i,!1,""+e))}if(null===i)return e;e&&e.then?e.then(e=>this._PostResultToRuntime(i,!0,e)).catch(e=>{console.error(`Rejection from '${t}' handler '${s}':`,e),this._PostResultToRuntime(i,!1,""+e)}):this._PostResultToRuntime(i,!0,e)}else console.warn(`[DOM] No handler '${s}' for component '${t}'`)}else console.warn(`[DOM] No event handlers for component '${t}'`)}_PostResultToRuntime(e,t,s){let r;s&&s["transferables"]&&(r=s["transferables"]),this._messageChannelPort.postMessage({"type":"result","responseId":e,"isOk":t,"result":s},r)}_OnResultFromRuntime(e){const t=e["responseId"],s=e["isOk"],r=e["result"],i=l.get(t);s?i.resolve(r):i.reject(r),l.delete(t)}AddRuntimeComponentMessageHandler(e,t,s){let r=k.get(e);if(r||(r=new Map,k.set(e,r)),r.has(t))throw new Error(`[DOM] Component '${e}' already has handler '${t}'`);r.set(t,s)}static AddDOMHandlerClass(e){if(j.includes(e))throw new Error("DOM handler already added");j.push(e)}_FindRuntimeDOMHandler(){for(const e of this._domHandlers)if("runtime"===e.GetComponentID())return void(this._runtimeDomHandler=e);throw new Error("cannot find runtime DOM handler")}_OnMessageFromDebugger(e){this.PostToRuntimeComponent("debugger","message",e)}_OnRuntimeReady(){for(const e of this._domHandlers)e.Attach()}static IsDocumentFullscreen(){return!!(document["fullscreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||t)}static _SetWrapperIsFullscreenFlag(e){t=!!e}async GetRemotePreviewStatusInfo(){return this.PostToRuntimeComponentAsync("runtime","get-remote-preview-status-info")}_AddRAFCallback(e){this._rafCallbacks.add(e),this._RequestAnimationFrame()}_RemoveRAFCallback(e){this._rafCallbacks.delete(e),0===this._rafCallbacks.size&&this._CancelAnimationFrame()}_RequestAnimationFrame(){-1===this._rafId&&0<this._rafCallbacks.size&&(this._rafId=requestAnimationFrame(this._rafFunc))}_CancelAnimationFrame(){-1!==this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=-1)}_OnRAFCallback(){this._rafId=-1;for(const e of this._rafCallbacks)e();this._RequestAnimationFrame()}TryPlayMedia(e){this._runtimeDomHandler.TryPlayMedia(e)}RemovePendingPlay(e){this._runtimeDomHandler.RemovePendingPlay(e)}_PlayPendingMedia(){this._runtimeDomHandler._PlayPendingMedia()}SetSilent(e){this._runtimeDomHandler.SetSilent(e)}IsAudioFormatSupported(e){return!!f[e]}async _WasmDecodeWebMOpus(e){const t=await this.PostToRuntimeComponentAsync("runtime","opus-decode",{"arrayBuffer":e},null,[e]);return new Float32Array(t)}SetIsExportingToVideo(e){this._isExportingToVideo=!0,this._exportToVideoDuration=e}IsExportingToVideo(){return this._isExportingToVideo}GetExportToVideoDuration(){return this._exportToVideoDuration}IsAbsoluteURL(e){return/^(?:[a-z\-]+:)?\/\//.test(e)||"data:"===e.substr(0,5)||"blob:"===e.substr(0,5)}IsRelativeURL(e){return!this.IsAbsoluteURL(e)}async _MaybeGetPlatformSpecificScriptURL(t){if("cordova"===this._exportType&&(t.startsWith("file:")||this._isFileProtocol&&this.IsRelativeURL(t))){let e=t;e.startsWith(this._runtimeBaseUrl)&&(e=e.substr(this._runtimeBaseUrl.length));const s=await this.CordovaFetchLocalFileAsArrayBuffer(e),r=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(r)}if("playable-ad-single-file"!==this._exportType)return t;if(this._localFileStrings.hasOwnProperty(t))return{isStringSrc:!0,str:this._localFileStrings[t]};if(this._localFileBlobs.hasOwnProperty(t))return URL.createObjectURL(this._localFileBlobs[t]);throw new Error("missing script: "+t)}async _OnCordovaFetchLocalFile(e){const t=e["filename"];switch(e["as"]){case"text":return this.CordovaFetchLocalFileAsText(t);case"buffer":return this.CordovaFetchLocalFileAsArrayBuffer(t);default:throw new Error("unsupported type")}}CordovaFetchLocalFile(e){const r=window["cordova"]["file"]["applicationDirectory"]+"www/"+e;return new Promise((t,s)=>{window["resolveLocalFileSystemURL"](r,e=>{e["file"](t,s)},s)})}async CordovaFetchLocalFileAsText(e){const t=await this.CordovaFetchLocalFile(e);return BlobToString(t)}_CordovaMaybeStartNextArrayBufferRead(){if(g.length&&!(r>=i)){r++;const e=g.shift();this._CordovaDoFetchLocalFileAsAsArrayBuffer(e.filename,e.successCallback,e.errorCallback)}}CordovaFetchLocalFileAsArrayBuffer(e){return new Promise((t,s)=>{g.push({filename:e,successCallback:e=>{r--,this._CordovaMaybeStartNextArrayBufferRead(),t(e)},errorCallback:e=>{r--,this._CordovaMaybeStartNextArrayBufferRead(),s(e)}}),this._CordovaMaybeStartNextArrayBufferRead()})}async _CordovaDoFetchLocalFileAsAsArrayBuffer(e,t,s){try{const r=await this.CordovaFetchLocalFile(e),i=await BlobToArrayBuffer(r);t(i)}catch(e){s(e)}}["_PlayableAdFetchBlob"](e){if(this._localFileBlobs.hasOwnProperty(e))return this._localFileBlobs[e];throw new Error("missing file: "+e)}_GetPermissionAPI(){const e=window["cordova"]&&window["cordova"]["plugins"]&&window["cordova"]["plugins"]["permissions"];if("object"!=typeof e)throw new Error("Permission API is not loaded");return e}_MapPermissionID(e,t){const s=e[t];if("string"!=typeof s)throw new Error("Invalid permission name");return s}_HasPermission(s){const r=this._GetPermissionAPI();return new Promise((t,e)=>r["checkPermission"](this._MapPermissionID(r,s),e=>t(!!e["hasPermission"]),e))}_RequestPermission(s){const r=this._GetPermissionAPI();return new Promise((t,e)=>r["requestPermission"](this._MapPermissionID(r,s),e=>t(!!e["hasPermission"]),e))}async RequestPermissions(e){if("cordova"===this.GetExportType()&&!this.IsiOSCordova())for(const t of e){const s=await this._HasPermission(t);if(!s){const r=await this._RequestPermission(t);if(!1===r)return!1}}return!0}async RequirePermissions(...e){if(!1===await this.RequestPermissions(e))throw new Error("Permission not granted")}_OnWrapperMessage(e,t){if("entered-fullscreen"===e)Q._SetWrapperIsFullscreenFlag(!0),this._runtimeDomHandler._OnFullscreenChange();else if("exited-fullscreen"===e)Q._SetWrapperIsFullscreenFlag(!1),this._runtimeDomHandler._OnFullscreenChange();else if("object"==typeof e){const s=e["type"];"directory-handles"===s?this._directoryHandles=t:"wrapper-init-response"===s?(this._wrapperInitResolve(e),this._wrapperInitResolve=null):"extension-message"===s?this.PostToRuntimeComponent("runtime","wrapper-extension-message",e):console.warn("Unknown wrapper message: ",e)}else console.warn("Unknown wrapper message: ",e)}_OnSendWrapperExtensionMessage(e){this._SendWrapperMessage({"type":"extension-message","componentId":e["componentId"],"messageId":e["messageId"],"params":e["params"]||[],"asyncId":e["asyncId"]})}_SendWrapperMessage(e){this.IsAnyWebView2Wrapper()?window["chrome"]["webview"]["postMessage"](JSON.stringify(e)):"macos-wkwebview"===this._exportType?window["webkit"]["messageHandlers"]["C3Wrapper"]["postMessage"](JSON.stringify(e)):"linux-cef"===this._exportType&&window["c3_linux_cef_sendmessage"](JSON.stringify(e))}_SetupDesktopWrapperPolyfills(){window.moveTo=(e,t)=>{this._SendWrapperMessage({"type":"set-window-position","windowX":Math.ceil(e),"windowY":Math.ceil(t)})},window.resizeTo=(e,t)=>{this._SendWrapperMessage({"type":"set-window-size","windowWidth":Math.ceil(e),"windowHeight":Math.ceil(t)})}}_InitWrapper(){return new Promise(e=>{this._wrapperInitResolve=e,this._SendWrapperMessage({"type":"wrapper-init"})})}_GetDirectoryHandles(){return this._directoryHandles}async _ConvertDataUrisToBlobs(){const e=[];for(const[t,s]of Object.entries(this._localFileBlobs))e.push(this._ConvertDataUriToBlobs(t,s));await Promise.all(e)}async _ConvertDataUriToBlobs(t,s){if("object"==typeof s)this._localFileBlobs[t]=new Blob([s["str"]],{"type":s["type"]}),this._localFileStrings[t]=s["str"];else{let e=await this._FetchDataUri(s);e=e||this._DataURIToBinaryBlobSync(s),this._localFileBlobs[t]=e}}async _FetchDataUri(e){try{const t=await fetch(e);return await t.blob()}catch(e){return console.warn("Failed to fetch a data: URI. Falling back to a slower workaround. This is probably because the Content Security Policy unnecessarily blocked it. Allow data: URIs in your CSP to avoid this.",e),null}}_DataURIToBinaryBlobSync(e){const t=this._ParseDataURI(e);return this._BinaryStringToBlob(t.data,t.mime_type)}_ParseDataURI(e){const t=e.indexOf(",");if(t<0)throw new URIError("expected comma in data: uri");const s=e.substring(5,t),r=e.substring(t+1),i=s.split(";"),n=i[0]||"",a=i[1],o=i[2];let l;return{mime_type:n,data:l=("base64"===a||"base64"===o?atob:decodeURIComponent)(r)}}_BinaryStringToBlob(e,t){let s=e.length,r=s>>2,i=new Uint8Array(s),n=new Uint32Array(i.buffer,0,r),a,o;for(a=0,o=0;a<r;++a)n[a]=e.charCodeAt(o++)|e.charCodeAt(o++)<<8|e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<24;let l=3&s;for(;l--;)i[o]=e.charCodeAt(o),++o;return new Blob([i],{"type":t})}}}

// workers/runtimeDomEvents.js
"use strict";{const a=self.RuntimeInterface;function IsCompatibilityMouseEvent(e){return e["sourceCapabilities"]&&e["sourceCapabilities"]["firesTouchEvents"]||e["originalEvent"]&&e["originalEvent"]["sourceCapabilities"]&&e["originalEvent"]["sourceCapabilities"]["firesTouchEvents"]}const b=new Map([["OSLeft","MetaLeft"],["OSRight","MetaRight"]]),c={"dispatchRuntimeEvent":!0,"dispatchUserScriptEvent":!0},d={"dispatchUserScriptEvent":!0},e={"dispatchRuntimeEvent":!0};function AddStyleSheet(i){return new Promise((e,t)=>{const n=document.createElement("link");n.onload=()=>e(n),n.onerror=e=>t(e),n.rel="stylesheet",n.href=i,document.head.appendChild(n)})}function FetchImage(i){return new Promise((e,t)=>{const n=new Image;n.onload=()=>e(n),n.onerror=e=>t(e),n.src=i})}async function BlobToImage(e){const t=URL.createObjectURL(e);try{return await FetchImage(t)}finally{URL.revokeObjectURL(t)}}function BlobToString(i){return new Promise((t,n)=>{let e=new FileReader;e.onload=e=>t(e.target.result),e.onerror=e=>n(e),e.readAsText(i)})}function IsInContentEditable(e){do{if(e.parentNode&&e.hasAttribute("contenteditable"))return!0}while(e=e.parentNode);return!1}const f=new Set(["input","textarea","datalist","select"]);function IsKeyboardInputElement(e){return f.has(e.tagName.toLowerCase())||IsInContentEditable(e)}const g=new Set(["canvas","body","html"]);function PreventDefaultOnCanvasOrDoc(e){if(e.target.tagName){const t=e.target.tagName.toLowerCase();g.has(t)&&e.preventDefault()}}function PreventDefaultOnHTMLWrap(e){e.target.tagName&&e.target.classList.contains("c3htmlwrap")&&e.preventDefault()}function BlockWheelZoom(e){(e.metaKey||e.ctrlKey)&&e.preventDefault()}self["C3_GetSvgImageSize"]=async function(e){const t=await BlobToImage(e);if(0<t.width&&0<t.height)return[t.width,t.height];{t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.visibility="hidden",document.body.appendChild(t);const n=t.getBoundingClientRect();return document.body.removeChild(t),[n.width,n.height]}};let t=!(self["C3_RasterSvgImageBlob"]=async function(e,t,n,i,o){const s=await BlobToImage(e),a=document.createElement("canvas"),r=(a.width=i,a.height=o,a.getContext("2d"));return r.drawImage(s,0,0,t,n),a});function ParentHasFocus(){try{return window.parent&&window.parent.document.hasFocus()}catch(e){return!1}}document.addEventListener("pause",()=>t=!0),document.addEventListener("resume",()=>t=!1);const i="runtime",j=class extends self.DOMHandler{constructor(e){super(e,i),this._enableWindowResizeEvent=!1,this._simulatedResizeTimerId=-1,this._targetOrientation="any",this._attachedDeviceOrientationEvent=!1,this._attachedDeviceMotionEvent=!1,this._pageVisibilityIsHidden=!1,this._screenReaderTextWrap=document.createElement("div"),this._screenReaderTextWrap.className="c3-screen-reader-text",this._screenReaderTextWrap.setAttribute("aria-live","polite"),document.body.appendChild(this._screenReaderTextWrap),this._debugHighlightElem=null,this._isExportToVideo=!1,this._exportVideoProgressMessage="",this._exportVideoUpdateTimerId=-1,this._enableAndroidVKDetection=!1,this._lastWindowWidth=e._GetWindowInnerWidth(),this._lastWindowHeight=e._GetWindowInnerHeight(),this._virtualKeyboardHeight=0,this._vkTranslateYOffset=0,e.AddRuntimeComponentMessageHandler("runtime","invoke-download",e=>this._OnInvokeDownload(e)),e.AddRuntimeComponentMessageHandler("runtime","load-webfonts",e=>this._OnLoadWebFonts(e)),e.AddRuntimeComponentMessageHandler("runtime","raster-svg-image",e=>this._OnRasterSvgImage(e)),e.AddRuntimeComponentMessageHandler("runtime","get-svg-image-size",e=>this._OnGetSvgImageSize(e)),e.AddRuntimeComponentMessageHandler("runtime","set-target-orientation",e=>this._OnSetTargetOrientation(e)),e.AddRuntimeComponentMessageHandler("runtime","register-sw",()=>this._OnRegisterSW()),e.AddRuntimeComponentMessageHandler("runtime","post-to-debugger",e=>this._OnPostToDebugger(e)),e.AddRuntimeComponentMessageHandler("runtime","go-to-script",e=>this._OnPostToDebugger(e)),e.AddRuntimeComponentMessageHandler("runtime","before-start-ticking",()=>this._OnBeforeStartTicking()),e.AddRuntimeComponentMessageHandler("runtime","debug-highlight",e=>this._OnDebugHighlight(e)),e.AddRuntimeComponentMessageHandler("runtime","enable-device-orientation",()=>this._AttachDeviceOrientationEvent()),e.AddRuntimeComponentMessageHandler("runtime","enable-device-motion",()=>this._AttachDeviceMotionEvent()),e.AddRuntimeComponentMessageHandler("runtime","add-stylesheet",e=>this._OnAddStylesheet(e)),e.AddRuntimeComponentMessageHandler("runtime","script-create-worker",e=>this._OnScriptCreateWorker(e)),e.AddRuntimeComponentMessageHandler("runtime","alert",e=>this._OnAlert(e)),e.AddRuntimeComponentMessageHandler("runtime","screen-reader-text",e=>this._OnScreenReaderTextEvent(e)),e.AddRuntimeComponentMessageHandler("runtime","hide-cordova-splash",()=>this._OnHideCordovaSplash()),e.AddRuntimeComponentMessageHandler("runtime","set-exporting-to-video",e=>this._SetExportingToVideo(e)),e.AddRuntimeComponentMessageHandler("runtime","export-to-video-progress",e=>this._OnExportVideoProgress(e)),e.AddRuntimeComponentMessageHandler("runtime","exported-to-video",e=>this._OnExportedToVideo(e)),e.AddRuntimeComponentMessageHandler("runtime","exported-to-image-sequence",e=>this._OnExportedToImageSequence(e));const o=new Set(["input","textarea","datalist"]);if(window.addEventListener("contextmenu",e=>{const t=e.target,n=t.tagName.toLowerCase();o.has(n)||IsInContentEditable(t)||e.preventDefault()}),window.addEventListener("selectstart",PreventDefaultOnCanvasOrDoc),window.addEventListener("gesturehold",PreventDefaultOnCanvasOrDoc),window.addEventListener("touchstart",PreventDefaultOnCanvasOrDoc,{"passive":!1}),window.addEventListener("pointerdown",PreventDefaultOnCanvasOrDoc,{"passive":!1}),this._mousePointerLastButtons=0,window.addEventListener("mousedown",e=>{1===e.button&&e.preventDefault()}),window.addEventListener("mousewheel",BlockWheelZoom,{"passive":!1}),window.addEventListener("wheel",BlockWheelZoom,{"passive":!1}),window.addEventListener("resize",()=>this._OnWindowResize()),window.addEventListener("fullscreenchange",()=>this._OnFullscreenChange()),window.addEventListener("webkitfullscreenchange",()=>this._OnFullscreenChange()),window.addEventListener("mozfullscreenchange",()=>this._OnFullscreenChange()),window.addEventListener("fullscreenerror",e=>this._OnFullscreenError(e)),window.addEventListener("webkitfullscreenerror",e=>this._OnFullscreenError(e)),window.addEventListener("mozfullscreenerror",e=>this._OnFullscreenError(e)),e.IsiOSWebView()){let t=1/0;window["visualViewport"].addEventListener("resize",()=>{const e=window["visualViewport"].height;e>t&&(document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0),t=e}),document.documentElement.setAttribute("ioswebview","")}this._mediaPendingPlay=new Set,this._mediaRemovedPendingPlay=new WeakSet,this._isSilent=!1}_AddDefaultCanvasEventHandlers(e){e.addEventListener("selectstart",PreventDefaultOnCanvasOrDoc),e.addEventListener("gesturehold",PreventDefaultOnCanvasOrDoc),e.addEventListener("pointerdown",PreventDefaultOnCanvasOrDoc)}_AddDefaultHTMLWrapEventHandlers(e){e.addEventListener("selectstart",PreventDefaultOnHTMLWrap),e.addEventListener("gesturehold",PreventDefaultOnHTMLWrap),e.addEventListener("touchstart",PreventDefaultOnHTMLWrap)}_OnBeforeStartTicking(){return self.setTimeout(()=>{this._enableAndroidVKDetection=!0},1e3),"cordova"===this._iRuntime.GetExportType()?(document.addEventListener("pause",()=>this._OnVisibilityChange(!0)),document.addEventListener("resume",()=>this._OnVisibilityChange(!1))):document.addEventListener("visibilitychange",()=>this._OnVisibilityChange("hidden"===document.visibilityState)),this._pageVisibilityIsHidden=!("hidden"!==document.visibilityState&&!t),{"isSuspended":this._pageVisibilityIsHidden}}Attach(){window.addEventListener("focus",()=>this._PostRuntimeEvent("window-focus")),window.addEventListener("blur",()=>{this._PostRuntimeEvent("window-blur",{"parentHasFocus":ParentHasFocus()}),this._mousePointerLastButtons=0}),window.addEventListener("focusin",e=>{IsKeyboardInputElement(e.target)&&this._PostRuntimeEvent("keyboard-blur")}),window.addEventListener("keydown",e=>this._OnKeyEvent("keydown",e)),window.addEventListener("keyup",e=>this._OnKeyEvent("keyup",e)),window.addEventListener("mousedown",e=>this._OnMouseEvent("mousedown",e,d)),window.addEventListener("mousemove",e=>this._OnMouseEvent("mousemove",e,d)),window.addEventListener("mouseup",e=>this._OnMouseEvent("mouseup",e,d)),window.addEventListener("dblclick",e=>this._OnMouseEvent("dblclick",e,c)),window.addEventListener("wheel",e=>this._OnMouseWheelEvent("wheel",e,c)),window.addEventListener("pointerdown",e=>{this._HandlePointerDownFocus(e),this._OnPointerEvent("pointerdown",e)}),this._iRuntime.UsesWorker()&&void 0!==window["onpointerrawupdate"]&&self===self.top?window.addEventListener("pointerrawupdate",e=>this._OnPointerRawUpdate(e)):window.addEventListener("pointermove",e=>this._OnPointerEvent("pointermove",e)),window.addEventListener("pointerup",e=>this._OnPointerEvent("pointerup",e)),window.addEventListener("pointercancel",e=>this._OnPointerEvent("pointercancel",e));const e=()=>this._PlayPendingMedia();window.addEventListener("pointerup",e,!0),window.addEventListener("touchend",e,!0),window.addEventListener("click",e,!0),window.addEventListener("keydown",e,!0),window.addEventListener("gamepadconnected",e,!0),this._iRuntime.IsAndroid()&&!this._iRuntime.IsAndroidWebView()&&navigator["virtualKeyboard"]&&(navigator["virtualKeyboard"]["overlaysContent"]=!0,navigator["virtualKeyboard"].addEventListener("geometrychange",()=>{this._OnAndroidVirtualKeyboardChange(this._GetWindowInnerHeight(),navigator["virtualKeyboard"]["boundingRect"]["height"])})),this._iRuntime.IsiOSWebView()&&(document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0)}_OnAndroidVirtualKeyboardChange(t,n){if(document.body.style.position="",document.body.style.overflow="",document.body.style.transform="",(this._vkTranslateYOffset=0)<n){const i=document.activeElement;if(i){const o=i.getBoundingClientRect(),s=(o.top+o.bottom)/2,a=(t-n)/2;let e=s-a;0<(e=(e=e>n?n:e)<0?0:e)&&(document.body.style.position="absolute",document.body.style.overflow="visible",document.body.style.transform=`translateY(${-e}px)`,this._vkTranslateYOffset=e)}}}_PostRuntimeEvent(t,n){this.PostToRuntime(t,n||null,e)}_GetWindowInnerWidth(){return this._iRuntime._GetWindowInnerWidth()}_GetWindowInnerHeight(){return this._iRuntime._GetWindowInnerHeight()}_EnableWindowResizeEvent(){this._enableWindowResizeEvent=!0,this._lastWindowWidth=this._iRuntime._GetWindowInnerWidth(),this._lastWindowHeight=this._iRuntime._GetWindowInnerHeight()}_OnWindowResize(){if(!this._isExportToVideo&&this._enableWindowResizeEvent){const e=this._GetWindowInnerWidth(),t=this._GetWindowInnerHeight();if(this._iRuntime.IsAndroidWebView()){if(this._enableAndroidVKDetection){const n=this._iRuntime.CanDoAndroidVirtualKeyboardDetection();if(n&&this._lastWindowWidth===e&&t<this._lastWindowHeight)return this._virtualKeyboardHeight=this._lastWindowHeight-t,void this._OnAndroidVirtualKeyboardChange(this._lastWindowHeight,this._virtualKeyboardHeight);0<this._virtualKeyboardHeight&&(this._virtualKeyboardHeight=0,this._OnAndroidVirtualKeyboardChange(t,this._virtualKeyboardHeight))}this._lastWindowWidth=e,this._lastWindowHeight=t}this.PostToRuntime("window-resize",{"innerWidth":e,"innerHeight":t,"devicePixelRatio":window.devicePixelRatio,"isFullscreen":a.IsDocumentFullscreen(),"cssDisplayMode":this._iRuntime.GetCssDisplayMode()}),this._iRuntime.IsiOSWebView()&&(-1!==this._simulatedResizeTimerId&&clearTimeout(this._simulatedResizeTimerId),this._OnSimulatedResize(e,t,0))}}_ScheduleSimulatedResize(e,t,n){-1!==this._simulatedResizeTimerId&&clearTimeout(this._simulatedResizeTimerId),this._simulatedResizeTimerId=setTimeout(()=>this._OnSimulatedResize(e,t,n),48)}_OnSimulatedResize(e,t,n){const i=this._GetWindowInnerWidth(),o=this._GetWindowInnerHeight();this._simulatedResizeTimerId=-1,i!=e||o!=t?this.PostToRuntime("window-resize",{"innerWidth":i,"innerHeight":o,"devicePixelRatio":window.devicePixelRatio,"isFullscreen":a.IsDocumentFullscreen(),"cssDisplayMode":this._iRuntime.GetCssDisplayMode()}):n<10&&this._ScheduleSimulatedResize(i,o,n+1)}_OnSetTargetOrientation(e){this._targetOrientation=e["targetOrientation"]}_TrySetTargetOrientation(){const t=this._targetOrientation;if(screen["orientation"]&&screen["orientation"]["lock"])screen["orientation"]["lock"](t).catch(e=>console.warn("[Construct] Failed to lock orientation: ",e));else try{let e=!1;screen["lockOrientation"]?e=screen["lockOrientation"](t):screen["webkitLockOrientation"]?e=screen["webkitLockOrientation"](t):screen["mozLockOrientation"]?e=screen["mozLockOrientation"](t):screen["msLockOrientation"]&&(e=screen["msLockOrientation"](t)),e||console.warn("[Construct] Failed to lock orientation")}catch(e){console.warn("[Construct] Failed to lock orientation: ",e)}}_OnFullscreenChange(){if(!this._isExportToVideo){const e=a.IsDocumentFullscreen();e&&"any"!==this._targetOrientation&&this._TrySetTargetOrientation(),this.PostToRuntime("fullscreenchange",{"isFullscreen":e,"innerWidth":this._GetWindowInnerWidth(),"innerHeight":this._GetWindowInnerHeight()})}}_OnFullscreenError(e){console.warn("[Construct] Fullscreen request failed: ",e),this.PostToRuntime("fullscreenerror",{"isFullscreen":a.IsDocumentFullscreen(),"innerWidth":this._GetWindowInnerWidth(),"innerHeight":this._GetWindowInnerHeight()})}_OnVisibilityChange(e){if(this._pageVisibilityIsHidden!==e&&((this._pageVisibilityIsHidden=e)?this._iRuntime._CancelAnimationFrame():this._iRuntime._RequestAnimationFrame(),this.PostToRuntime("visibilitychange",{"hidden":e}),!e)&&this._iRuntime.IsiOSWebView()){const t=()=>{document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0};setTimeout(t,50),setTimeout(t,100),setTimeout(t,250),setTimeout(t,500)}}_OnKeyEvent(e,t){if(void 0!==t.key&&("Backspace"===t.key&&PreventDefaultOnCanvasOrDoc(t),"nwjs"===this._iRuntime.GetExportType()&&"u"===t.key&&(t.ctrlKey||t.metaKey)&&t.preventDefault(),!this._isExportToVideo)){const n=b.get(t.code)||t.code;this._PostToRuntimeMaybeSync(e,{"code":n,"key":t.key,"which":t.which,"repeat":t.repeat,"altKey":t.altKey,"ctrlKey":t.ctrlKey,"metaKey":t.metaKey,"shiftKey":t.shiftKey,"timeStamp":t.timeStamp},c)}}_OnMouseWheelEvent(e,t,n){this._isExportToVideo||this.PostToRuntime(e,{"clientX":t.clientX,"clientY":t.clientY+this._vkTranslateYOffset,"pageX":t.pageX,"pageY":t.pageY+this._vkTranslateYOffset,"deltaX":t.deltaX,"deltaY":t.deltaY,"deltaZ":t.deltaZ,"deltaMode":t.deltaMode,"timeStamp":t.timeStamp},n)}_OnMouseEvent(e,t,n){this._isExportToVideo||IsCompatibilityMouseEvent(t)||this._PostToRuntimeMaybeSync(e,{"button":t.button,"buttons":t.buttons,"clientX":t.clientX,"clientY":t.clientY+this._vkTranslateYOffset,"pageX":t.pageX,"pageY":t.pageY+this._vkTranslateYOffset,"movementX":t.movementX||0,"movementY":t.movementY||0,"timeStamp":t.timeStamp},n)}_OnPointerEvent(t,n){if(!this._isExportToVideo){let e=0;"mouse"===n.pointerType&&(e=this._mousePointerLastButtons),this._PostToRuntimeMaybeSync(t,{"pointerId":n.pointerId,"pointerType":n.pointerType,"button":n.button,"buttons":n.buttons,"lastButtons":e,"clientX":n.clientX,"clientY":n.clientY+this._vkTranslateYOffset,"pageX":n.pageX,"pageY":n.pageY+this._vkTranslateYOffset,"movementX":n.movementX||0,"movementY":n.movementY||0,"width":n.width||0,"height":n.height||0,"pressure":n.pressure||0,"tangentialPressure":n["tangentialPressure"]||0,"tiltX":n.tiltX||0,"tiltY":n.tiltY||0,"twist":n["twist"]||0,"timeStamp":n.timeStamp},c),"mouse"===n.pointerType&&(this._mousePointerLastButtons=n.buttons)}}_OnPointerRawUpdate(e){this._OnPointerEvent("pointermove",e)}_OnTouchEvent(n,i){if(!this._isExportToVideo)for(let e=0,t=i.changedTouches.length;e<t;++e){const o=i.changedTouches[e];this._PostToRuntimeMaybeSync(n,{"pointerId":o.identifier,"pointerType":"touch","button":0,"buttons":0,"lastButtons":0,"clientX":o.clientX,"clientY":o.clientY+this._vkTranslateYOffset,"pageX":o.pageX,"pageY":o.pageY+this._vkTranslateYOffset,"movementX":i.movementX||0,"movementY":i.movementY||0,"width":2*(o["radiusX"]||o["webkitRadiusX"]||0),"height":2*(o["radiusY"]||o["webkitRadiusY"]||0),"pressure":o["force"]||o["webkitForce"]||0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":o["rotationAngle"]||0,"timeStamp":i.timeStamp},c)}}_HandlePointerDownFocus(e){window!==window.top&&window.focus(),this._IsElementCanvasOrDocument(e.target)&&document.activeElement&&!this._IsElementCanvasOrDocument(document.activeElement)&&document.activeElement.blur()}_IsElementCanvasOrDocument(e){return!e||e===document||e===window||e===document.body||"canvas"===e.tagName.toLowerCase()}_AttachDeviceOrientationEvent(){this._attachedDeviceOrientationEvent||(this._attachedDeviceOrientationEvent=!0,window.addEventListener("deviceorientation",e=>this._OnDeviceOrientation(e)),window.addEventListener("deviceorientationabsolute",e=>this._OnDeviceOrientationAbsolute(e)))}_AttachDeviceMotionEvent(){this._attachedDeviceMotionEvent||(this._attachedDeviceMotionEvent=!0,window.addEventListener("devicemotion",e=>this._OnDeviceMotion(e)))}_OnDeviceOrientation(e){this._isExportToVideo||this.PostToRuntime("deviceorientation",{"absolute":!!e["absolute"],"alpha":e["alpha"]||0,"beta":e["beta"]||0,"gamma":e["gamma"]||0,"timeStamp":e.timeStamp,"webkitCompassHeading":e["webkitCompassHeading"],"webkitCompassAccuracy":e["webkitCompassAccuracy"]},c)}_OnDeviceOrientationAbsolute(e){this._isExportToVideo||this.PostToRuntime("deviceorientationabsolute",{"absolute":!!e["absolute"],"alpha":e["alpha"]||0,"beta":e["beta"]||0,"gamma":e["gamma"]||0,"timeStamp":e.timeStamp},c)}_OnDeviceMotion(i){if(!this._isExportToVideo){let e=null;const o=i["acceleration"];o&&(e={"x":o["x"]||0,"y":o["y"]||0,"z":o["z"]||0});let t=null;const s=i["accelerationIncludingGravity"];s&&(t={"x":s["x"]||0,"y":s["y"]||0,"z":s["z"]||0});let n=null;const a=i["rotationRate"];a&&(n={"alpha":a["alpha"]||0,"beta":a["beta"]||0,"gamma":a["gamma"]||0}),this.PostToRuntime("devicemotion",{"acceleration":e,"accelerationIncludingGravity":t,"rotationRate":n,"interval":i["interval"],"timeStamp":i.timeStamp},c)}}_OnInvokeDownload(e){const t=e["url"],n=e["filename"],i=document.createElement("a"),o=document.body;i.textContent=n,i.href=t,i.download=n,o.appendChild(i),i.click(),o.removeChild(i)}async _OnLoadWebFonts(e){const t=e["webfonts"];await Promise.all(t.map(async e=>{const t=new FontFace(e.name,`url('${e.url}')`);document.fonts.add(t),await t.load()}))}async _OnRasterSvgImage(e){const t=e["blob"],n=e["imageWidth"],i=e["imageHeight"],o=e["surfaceWidth"],s=e["surfaceHeight"],a=e["imageBitmapOpts"],r=await self["C3_RasterSvgImageBlob"](t,n,i,o,s);let d;return{"imageBitmap":d=a?await createImageBitmap(r,a):await createImageBitmap(r),"transferables":[d]}}async _OnGetSvgImageSize(e){return self["C3_GetSvgImageSize"](e["blob"])}async _OnAddStylesheet(e){await AddStyleSheet(e["url"])}_PlayPendingMedia(){const e=[...this._mediaPendingPlay];if(this._mediaPendingPlay.clear(),!this._isSilent)for(const t of e){const n=t.play();n&&n.catch(e=>{this._mediaRemovedPendingPlay.has(t)||this._mediaPendingPlay.add(t)})}}TryPlayMedia(t){if("function"!=typeof t.play)throw new Error("missing play function");this._mediaRemovedPendingPlay.delete(t);let e;try{e=t.play()}catch(e){return void this._mediaPendingPlay.add(t)}e&&e.catch(e=>{this._mediaRemovedPendingPlay.has(t)||this._mediaPendingPlay.add(t)})}RemovePendingPlay(e){this._mediaPendingPlay.delete(e),this._mediaRemovedPendingPlay.add(e)}SetSilent(e){this._isSilent=!!e}_OnHideCordovaSplash(){navigator["splashscreen"]&&navigator["splashscreen"]["hide"]&&navigator["splashscreen"]["hide"]()}_OnDebugHighlight(e){const t=e["show"];if(t){this._debugHighlightElem||(this._debugHighlightElem=document.createElement("div"),this._debugHighlightElem.id="inspectOutline",document.body.appendChild(this._debugHighlightElem));const n=this._debugHighlightElem;n.style.display="",n.style.left=e["left"]-1+"px",n.style.top=e["top"]-1+"px",n.style.width=e["width"]+2+"px",n.style.height=e["height"]+2+"px",n.textContent=e["name"]}else this._debugHighlightElem&&(this._debugHighlightElem.style.display="none")}_OnRegisterSW(){window["C3_RegisterSW"]&&window["C3_RegisterSW"]()}_OnPostToDebugger(e){window["c3_postToMessagePort"]&&(e["from"]="runtime",window["c3_postToMessagePort"](e))}_InvokeFunctionFromJS(e,t){return this.PostToRuntimeAsync("js-invoke-function",{"name":e,"params":t})}_OnScriptCreateWorker(e){const t=e["url"],n=e["opts"],i=e["port2"],o=new Worker(t,n);o.postMessage({"type":"construct-worker-init","port2":i},[i])}_OnAlert(e){alert(e["message"])}_OnScreenReaderTextEvent(e){const t=e["type"];if("create"===t){const n=document.createElement("p");n.id="c3-sr-"+e["id"],n.textContent=e["text"],this._screenReaderTextWrap.appendChild(n)}else if("update"===t){const i=document.getElementById("c3-sr-"+e["id"]);i?i.textContent=e["text"]:console.warn("[Construct] Missing screen reader text with id "+e["id"])}else if("release"===t){const o=document.getElementById("c3-sr-"+e["id"]);o?o.remove():console.warn("[Construct] Missing screen reader text with id "+e["id"])}else console.warn(`[Construct] Unknown screen reader text update '${t}'`)}_SetExportingToVideo(e){this._isExportToVideo=!0;const t=document.createElement("h1");t.id="exportToVideoMessage",t.textContent=e["message"],document.body.prepend(t),document.body.classList.add("exportingToVideo"),this.GetRuntimeInterface().GetMainCanvas().style.display="",this._iRuntime.SetIsExportingToVideo(e["duration"])}_OnExportVideoProgress(e){this._exportVideoProgressMessage=e["message"],-1===this._exportVideoUpdateTimerId&&(this._exportVideoUpdateTimerId=setTimeout(()=>this._DoUpdateExportVideoProgressMessage(),250))}_DoUpdateExportVideoProgressMessage(){this._exportVideoUpdateTimerId=-1;const e=document.getElementById("exportToVideoMessage");e&&(e.textContent=this._exportVideoProgressMessage)}_OnExportedToVideo(e){window.c3_postToMessagePort({"type":"exported-video","arrayBuffer":e["arrayBuffer"],"contentType":e["contentType"],"time":e["time"]})}_OnExportedToImageSequence(e){window.c3_postToMessagePort({"type":"exported-image-sequence","blobArr":e["blobArr"],"time":e["time"],"gif":e["gif"]})}};a.AddDOMHandlerClass(j)}

// workers/jobSchedulerDom.js
"use strict";{const a="dispatchworker.js",b="jobworker.js";self.JobSchedulerDOM=class{constructor(t){this._runtimeInterface=t,this._maxNumWorkers=Math.min(navigator.hardwareConcurrency||2,16),this._dispatchWorker=null,this._jobWorkers=[],this._inputPort=null,this._outputPort=null}async Init(){if(this._hasInitialised)throw new Error("already initialised");this._hasInitialised=!0;const t=this._runtimeInterface.GetScriptFolder()+a,r=(this._dispatchWorker=await this._runtimeInterface.CreateWorker(t,{name:"DispatchWorker"}),new MessageChannel);this._inputPort=r.port1,this._dispatchWorker.postMessage({"type":"_init","in-port":r.port2},[r.port2]),this._outputPort=await this._CreateJobWorker()}async _CreateJobWorker(){const t=this._jobWorkers.length,r=this._runtimeInterface.GetScriptFolder()+b,e=await this._runtimeInterface.CreateWorker(r,{name:"JobWorker"+t}),o=new MessageChannel,s=new MessageChannel;return this._dispatchWorker.postMessage({"type":"_addJobWorker","port":o.port1},[o.port1]),e.postMessage({"type":"init","number":t,"dispatch-port":o.port2,"output-port":s.port2},[o.port2,s.port2]),this._jobWorkers.push(e),s.port1}GetPortData(){return{"inputPort":this._inputPort,"outputPort":this._outputPort,"maxNumWorkers":this._maxNumWorkers}}GetPortTransferables(){return[this._inputPort,this._outputPort]}}}

// scripts/plugins/TextBox/dom/domSide.js
"use strict";{const a="text-input";function StopPropagation(t){t.stopPropagation()}function StopKeyPropagation(t){13!==t.which&&27!==t.which&&t.stopPropagation()}const b=class extends self.DOMElementHandler{constructor(t){super(t,a),this.AddDOMElementMessageHandler("scroll-to-bottom",t=>this._OnScrollToBottom(t))}CreateElement(e,t){let o;const n=t["type"];return"textarea"===n?(o=document.createElement("textarea")).style.resize="none":(o=document.createElement("input")).type=n,o.style.position="absolute",o.autocomplete="off",o.addEventListener("pointerdown",StopPropagation),o.addEventListener("pointermove",StopPropagation),o.addEventListener("pointerrawupdate",StopPropagation),o.addEventListener("pointerup",StopPropagation),o.addEventListener("mousedown",StopPropagation),o.addEventListener("mouseup",StopPropagation),o.addEventListener("keydown",StopKeyPropagation),o.addEventListener("keyup",StopKeyPropagation),o.addEventListener("click",t=>{t.stopPropagation(),this._PostToRuntimeElementMaybeSync("click",e)}),o.addEventListener("dblclick",t=>{t.stopPropagation(),this._PostToRuntimeElementMaybeSync("dblclick",e)}),o.addEventListener("input",()=>this.PostToRuntimeElement("change",e,{"text":o.value})),t["id"]&&(o.id=t["id"]),t["className"]&&(o.className=t["className"]),this.UpdateState(o,t),o}UpdateState(t,e){t.value=e["text"],t.placeholder=e["placeholder"],t.title=e["title"],t.disabled=!e["isEnabled"],t.readOnly=e["isReadOnly"],t.spellcheck=e["spellCheck"];const o=e["maxLength"];o<0?t.removeAttribute("maxlength"):t.setAttribute("maxlength",o)}_OnScrollToBottom(t){t.scrollTop=t.scrollHeight}};self.RuntimeInterface.AddDOMHandlerClass(b)}

// start-export.js
"use strict";if(window["C3_Is_Supported"]){const a=true;window["c3_runtimeInterface"]=new self.RuntimeInterface({useWorker:a,workerMainUrl:"workermain.js",runtimeScriptList:["scripts/c3main.js"],scriptFolder:"scripts/",exportType:"windows-webview2"})}
