From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED, WEIRD_QUOTING autolearn=no autolearn_force=no version=3.4.6 Received: from zxce3.. (unknown [68.183.184.174]) by gnuweeb.org (Postfix) with ESMTPSA id 27E5B82EFF; Sat, 28 Jan 2023 14:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1674914837; bh=BvMANfCtkQULfHxNzYOLc+AbeIBVkVTCZeB87m8ta60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JYaZeTnq9z3I82LQ0v+gZvbgZzR7Upym1n79iza9IVh3E7jLxe0PUdCycCXT39Ia4 StUei/kkya6uZ4usaxsqgFw6OX9i+LPFkuPwpGivW8CPmtTN5+noKvTXVhTzOAcvB8 FvzpdZYXV9Hf1P4280T1/KCyFniMKUQhD9oUHlzphRJiJr+2vlHIquCcP5HzC8C0RS 2SEmOFBCYObfIUhYEUwjx1QVwq8jsnciGNS9Zn0Fb2nGrrPKV3r+u8SxDEmYQUX9Lw Tbaexr9vwrpQnBoL9HttiIZx833zDEf6PHuNYickqBT6k748kMw96iei46PwSCMUTn 7ejZdqgTPc9TA== From: Memet Zx To: GNU/Weeb Mailing List Cc: Ammar Faizi , Irvan Malik , Memet Zx Subject: [PATCH Add Turbo v1 2/2] turbo.js: add compressed script Date: Sat, 28 Jan 2023 21:06:33 +0700 Message-Id: <20230128140633.40344-3-zxce3@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230128140633.40344-1-zxce3@gnuweeb.org> References: <20230128140633.40344-1-zxce3@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: From: Memet Zx this is module for drive accelerates sites Signed-off-by: Memet Zx --- public/assets/js/turbo.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 public/assets/js/turbo.js diff --git a/public/assets/js/turbo.js b/public/assets/js/turbo.js new file mode 100644 index 0000000..a5d8ea8 --- /dev/null +++ b/public/assets/js/turbo.js @@ -0,0 +1,25 @@ +// Source https://cdn.skypack.dev/@hotwired/turbo +!function(){if(void 0=3D=3D=3Dwindow.Reflect||void 0=3D=3D=3Dwindow.custom= Elements||window.customElements.polyfillWrapFlushCallback)return;const e=3D= HTMLElement,t=3Dfunction(){return Reflect.construct(e,[],this.constructor)}= ;window.HTMLElement=3Dt,HTMLElement.prototype=3De.prototype,HTMLElement.pro= totype.constructor=3DHTMLElement,Object.setPrototypeOf(HTMLElement,e)}(),fu= nction(e){function t(e,t,s){throw new e("Failed to execute 'requestSubmit' = on 'HTMLFormElement': "+t+".",s)}"function"!=3Dtypeof e.requestSubmit&&(e.r= equestSubmit=3Dfunction(e){e?(!function(e,s){e instanceof HTMLElement||t(Ty= peError,"parameter 1 is not of type 'HTMLElement'"),"submit"=3D=3De.type||t= (TypeError,"The specified element is not a submit button"),e.form=3D=3Ds||t= (DOMException,"The specified element is not owned by this form element","No= tFoundError")}(e,this),e.click()):((e=3Ddocument.createElement("input")).ty= pe=3D"submit",e.hidden=3D!0,this.appendChild(e),e.click(),this.removeChild(= e))})}(HTMLFormElement.prototype);const submittersByForm=3Dnew WeakMap;func= tion findSubmitterFromClickTarget(e){const t=3De instanceof Element?e:e ins= tanceof Node?e.parentElement:null,s=3Dt?t.closest("input, button"):null;ret= urn"submit"=3D=3D(null=3D=3Ds?void 0:s.type)?s:null}function clickCaptured(= e){const t=3DfindSubmitterFromClickTarget(e.target);t&&t.form&&submittersBy= Form.set(t.form,t)}var FrameLoadingStyle,FetchMethod,FormSubmissionState,Fo= rmEnctype,TimingMetric,VisitState;!function(){if("submitter"in Event.protot= ype)return;let e;if("SubmitEvent"in window&&/Apple Computer/.test(navigator= .vendor))e=3Dwindow.SubmitEvent.prototype;else{if("SubmitEvent"in window)re= turn;e=3Dwindow.Event.prototype}addEventListener("click",clickCaptured,!0),= Object.defineProperty(e,"submitter",{get(){if("submit"=3D=3Dthis.type&&this= .target instanceof HTMLFormElement)return submittersByForm.get(this.target)= }})}(),function(e){e.eager=3D"eager",e.lazy=3D"lazy"}(FrameLoadingStyle||(F= rameLoadingStyle=3D{}));class FrameElement extends HTMLElement{constructor(= ){super(),this.loaded=3DPromise.resolve(),this.delegate=3Dnew FrameElement.= delegateConstructor(this)}static get observedAttributes(){return["disabled"= ,"complete","loading","src"]}connectedCallback(){this.delegate.connect()}di= sconnectedCallback(){this.delegate.disconnect()}reload(){return this.delega= te.sourceURLReloaded()}attributeChangedCallback(e){"loading"=3D=3De?this.de= legate.loadingStyleChanged():"complete"=3D=3De?this.delegate.completeChange= d():"src"=3D=3De?this.delegate.sourceURLChanged():this.delegate.disabledCha= nged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttri= bute("src",e):this.removeAttribute("src")}get loading(){return frameLoading= StyleFromString(this.getAttribute("loading")||"")}set loading(e){e?this.set= Attribute("loading",e):this.removeAttribute("loading")}get disabled(){retur= n this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabl= ed",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAt= tribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""= ):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.is= Loading}get isActive(){return this.ownerDocument=3D=3D=3Ddocument&&!this.is= Preview}get isPreview(){var e,t;return null=3D=3D=3D(t=3Dnull=3D=3D=3D(e=3D= this.ownerDocument)||void 0=3D=3D=3De?void 0:e.documentElement)||void 0=3D= =3D=3Dt?void 0:t.hasAttribute("data-turbo-preview")}}function frameLoadingS= tyleFromString(e){return"lazy"=3D=3D=3De.toLowerCase()?FrameLoadingStyle.la= zy:FrameLoadingStyle.eager}function expandURL(e){return new URL(e.toString(= ),document.baseURI)}function getAnchor(e){let t;return e.hash?e.hash.slice(= 1):(t=3De.href.match(/#(.*)$/))?t[1]:void 0}function getAction(e,t){return = expandURL((null=3D=3Dt?void 0:t.getAttribute("formaction"))||e.getAttribute= ("action")||e.action)}function getExtension(e){return(getLastPathComponent(= e).match(/\.[^.]*$/)||[])[0]||""}function isHTML(e){return!!getExtension(e)= .match(/^(?:|\.(?:htm|html|xhtml|php))$/)}function isPrefixedBy(e,t){const = s=3DgetPrefix(t);return e.href=3D=3D=3DexpandURL(s).href||e.href.startsWith= (s)}function locationIsVisitable(e,t){return isPrefixedBy(e,t)&&isHTML(e)}f= unction getRequestURL(e){const t=3DgetAnchor(e);return null!=3Dt?e.href.sli= ce(0,-(t.length+1)):e.href}function toCacheKey(e){return getRequestURL(e)}f= unction urlsAreEqual(e,t){return expandURL(e).href=3D=3DexpandURL(t).href}f= unction getPathComponents(e){return e.pathname.split("/").slice(1)}function= getLastPathComponent(e){return getPathComponents(e).slice(-1)[0]}function = getPrefix(e){return addTrailingSlash(e.origin+e.pathname)}function addTrail= ingSlash(e){return e.endsWith("/")?e:e+"/"}class FetchResponse{constructor(= e){this.response=3De}get succeeded(){return this.response.ok}get failed(){r= eturn!this.succeeded}get clientError(){return this.statusCode>=3D400&&this.= statusCode<=3D499}get serverError(){return this.statusCode>=3D500&&this.sta= tusCode<=3D599}get redirected(){return this.response.redirected}get locatio= n(){return expandURL(this.response.url)}get isHTML(){return this.contentTyp= e&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+= xml)\b/)}get statusCode(){return this.response.status}get contentType(){ret= urn this.header("Content-Type")}get responseText(){return this.response.clo= ne().text()}get responseHTML(){return this.isHTML?this.response.clone().tex= t():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}= function isAction(e){return"advance"=3D=3De||"replace"=3D=3De||"restore"=3D= =3De}function activateScriptElement(e){if("false"=3D=3De.getAttribute("data= -turbo-eval"))return e;{const t=3Ddocument.createElement("script"),s=3DgetM= etaContent("csp-nonce");return s&&(t.nonce=3Ds),t.textContent=3De.textConte= nt,t.async=3D!1,copyElementAttributes(t,e),t}}function copyElementAttribute= s(e,t){for(const{name:s,value:i}of t.attributes)e.setAttribute(s,i)}functio= n createDocumentFragment(e){const t=3Ddocument.createElement("template");re= turn t.innerHTML=3De,t.content}function dispatch(e,{target:t,cancelable:s,d= etail:i}=3D{}){const r=3Dnew CustomEvent(e,{cancelable:s,bubbles:!0,detail:= i});return t&&t.isConnected?t.dispatchEvent(r):document.documentElement.dis= patchEvent(r),r}function nextAnimationFrame(){return new Promise((e=3D>requ= estAnimationFrame((()=3D>e()))))}function nextEventLoopTick(){return new Pr= omise((e=3D>setTimeout((()=3D>e()),0)))}function nextMicrotask(){return Pro= mise.resolve()}function parseHTMLDocument(e=3D""){return(new DOMParser).par= seFromString(e,"text/html")}function unindent(e,...t){const s=3Dinterpolate= (e,t).replace(/^\n/,"").split("\n"),i=3Ds[0].match(/^\s+/),r=3Di?i[0].lengt= h:0;return s.map((e=3D>e.slice(r))).join("\n")}function interpolate(e,t){re= turn e.reduce(((e,s,i)=3D>e+s+(null=3D=3Dt[i]?"":t[i])),"")}function uuid()= {return Array.from({length:36}).map(((e,t)=3D>8=3D=3Dt||13=3D=3Dt||18=3D=3D= t||23=3D=3Dt?"-":14=3D=3Dt?"4":19=3D=3Dt?(Math.floor(4*Math.random())+8).to= String(16):Math.floor(15*Math.random()).toString(16))).join("")}function ge= tAttribute(e,...t){for(const s of t.map((t=3D>null=3D=3Dt?void 0:t.getAttri= bute(e))))if("string"=3D=3Dtypeof s)return s;return null}function hasAttrib= ute(e,...t){return t.some((t=3D>t&&t.hasAttribute(e)))}function markAsBusy(= ...e){for(const t of e)"turbo-frame"=3D=3Dt.localName&&t.setAttribute("busy= ",""),t.setAttribute("aria-busy","true")}function clearBusyState(...e){for(= const t of e)"turbo-frame"=3D=3Dt.localName&&t.removeAttribute("busy"),t.re= moveAttribute("aria-busy")}function waitForLoad(e,t=3D2e3){return new Promi= se((s=3D>{const i=3D()=3D>{e.removeEventListener("error",i),e.removeEventLi= stener("load",i),s()};e.addEventListener("load",i,{once:!0}),e.addEventList= ener("error",i,{once:!0}),setTimeout(s,t)}))}function getHistoryMethodForAc= tion(e){switch(e){case"replace":return history.replaceState;case"advance":c= ase"restore":return history.pushState}}function getVisitAction(...e){const = t=3DgetAttribute("data-turbo-action",...e);return isAction(t)?t:null}functi= on getMetaElement(e){return document.querySelector(`meta[name=3D"${e}"]`)}f= unction getMetaContent(e){const t=3DgetMetaElement(e);return t&&t.content}f= unction setMetaContent(e,t){let s=3DgetMetaElement(e);return s||(s=3Ddocume= nt.createElement("meta"),s.setAttribute("name",e),document.head.appendChild= (s)),s.setAttribute("content",t),s}function fetchMethodFromString(e){switch= (e.toLowerCase()){case"get":return FetchMethod.get;case"post":return FetchM= ethod.post;case"put":return FetchMethod.put;case"patch":return FetchMethod.= patch;case"delete":return FetchMethod.delete}}!function(e){e[e.get=3D0]=3D"= get",e[e.post=3D1]=3D"post",e[e.put=3D2]=3D"put",e[e.patch=3D3]=3D"patch",e= [e.delete=3D4]=3D"delete"}(FetchMethod||(FetchMethod=3D{}));class FetchRequ= est{constructor(e,t,s,i=3Dnew URLSearchParams,r=3Dnull){this.abortControlle= r=3Dnew AbortController,this.resolveRequestPromise=3De=3D>{},this.delegate= =3De,this.method=3Dt,this.headers=3Dthis.defaultHeaders,this.body=3Di,this.= url=3Ds,this.target=3Dr}get location(){return this.url}get params(){return = this.url.searchParams}get entries(){return this.body?Array.from(this.body.e= ntries()):[]}cancel(){this.abortController.abort()}async perform(){var e,t;= const{fetchOptions:s}=3Dthis;null=3D=3D=3D(t=3D(e=3Dthis.delegate).prepareH= eadersForRequest)||void 0=3D=3D=3Dt||t.call(e,this.headers,this),await this= .allowRequestToBeIntercepted(s);try{this.delegate.requestStarted(this);cons= t e=3Dawait fetch(this.url.href,s);return await this.receive(e)}catch(e){if= ("AbortError"!=3D=3De.name)throw this.willDelegateErrorHandling(e)&&this.de= legate.requestErrored(this,e),e}finally{this.delegate.requestFinished(this)= }}async receive(e){const t=3Dnew FetchResponse(e);return dispatch("turbo:be= fore-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.ta= rget}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this= ,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.del= egate.requestFailedWithResponse(this,t),t}get fetchOptions(){var e;return{m= ethod:FetchMethod[this.method].toUpperCase(),credentials:"same-origin",head= ers:this.headers,redirect:"follow",body:this.isIdempotent?null:this.body,si= gnal:this.abortSignal,referrer:null=3D=3D=3D(e=3Dthis.delegate.referrer)||v= oid 0=3D=3D=3De?void 0:e.href}}get defaultHeaders(){return{Accept:"text/htm= l, application/xhtml+xml"}}get isIdempotent(){return this.method=3D=3DFetch= Method.get}get abortSignal(){return this.abortController.signal}acceptRespo= nseType(e){this.headers.Accept=3D[e,this.headers.Accept].join(", ")}async a= llowRequestToBeIntercepted(e){const t=3Dnew Promise((e=3D>this.resolveReque= stPromise=3De));dispatch("turbo:before-fetch-request",{cancelable:!0,detail= :{fetchOptions:e,url:this.url,resume:this.resolveRequestPromise},target:thi= s.target}).defaultPrevented&&await t}willDelegateErrorHandling(e){return!di= spatch("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail= :{request:this,error:e}}).defaultPrevented}}class AppearanceObserver{constr= uctor(e,t){this.started=3D!1,this.intersect=3De=3D>{const t=3De.slice(-1)[0= ];(null=3D=3Dt?void 0:t.isIntersecting)&&this.delegate.elementAppearedInVie= wport(this.element)},this.delegate=3De,this.element=3Dt,this.intersectionOb= server=3Dnew IntersectionObserver(this.intersect)}start(){this.started||(th= is.started=3D!0,this.intersectionObserver.observe(this.element))}stop(){thi= s.started&&(this.started=3D!1,this.intersectionObserver.unobserve(this.elem= ent))}}class StreamMessage{constructor(e){this.fragment=3DimportStreamEleme= nts(e)}static wrap(e){return"string"=3D=3Dtypeof e?new this(createDocumentF= ragment(e)):e}}function importStreamElements(e){for(const t of e.querySelec= torAll("turbo-stream")){const e=3Ddocument.importNode(t,!0);for(const t of = e.templateElement.content.querySelectorAll("script"))t.replaceWith(activate= ScriptElement(t));t.replaceWith(e)}return e}function formEnctypeFromString(= e){switch(e.toLowerCase()){case FormEnctype.multipart:return FormEnctype.mu= ltipart;case FormEnctype.plain:return FormEnctype.plain;default:return Form= Enctype.urlEncoded}}StreamMessage.contentType=3D"text/vnd.turbo-stream.html= ",function(e){e[e.initialized=3D0]=3D"initialized",e[e.requesting=3D1]=3D"r= equesting",e[e.waiting=3D2]=3D"waiting",e[e.receiving=3D3]=3D"receiving",e[= e.stopping=3D4]=3D"stopping",e[e.stopped=3D5]=3D"stopped"}(FormSubmissionSt= ate||(FormSubmissionState=3D{})),function(e){e.urlEncoded=3D"application/x-= www-form-urlencoded",e.multipart=3D"multipart/form-data",e.plain=3D"text/pl= ain"}(FormEnctype||(FormEnctype=3D{}));class FormSubmission{constructor(e,t= ,s,i=3D!1){this.state=3DFormSubmissionState.initialized,this.delegate=3De,t= his.formElement=3Dt,this.submitter=3Ds,this.formData=3DbuildFormData(t,s),t= his.location=3DexpandURL(this.action),this.method=3D=3DFetchMethod.get&&mer= geFormDataEntries(this.location,[...this.body.entries()]),this.fetchRequest= =3Dnew FetchRequest(this,this.method,this.location,this.body,this.formEleme= nt),this.mustRedirect=3Di}static confirmMethod(e,t,s){return Promise.resolv= e(confirm(e))}get method(){var e;return fetchMethodFromString(((null=3D=3D= =3D(e=3Dthis.submitter)||void 0=3D=3D=3De?void 0:e.getAttribute("formmethod= "))||this.formElement.getAttribute("method")||"").toLowerCase())||FetchMeth= od.get}get action(){var e;const t=3D"string"=3D=3Dtypeof this.formElement.a= ction?this.formElement.action:null;return(null=3D=3D=3D(e=3Dthis.submitter)= ||void 0=3D=3D=3De?void 0:e.hasAttribute("formaction"))?this.submitter.getA= ttribute("formaction")||"":this.formElement.getAttribute("action")||t||""}g= et body(){return this.enctype=3D=3DFormEnctype.urlEncoded||this.method=3D= =3DFetchMethod.get?new URLSearchParams(this.stringFormData):this.formData}g= et enctype(){var e;return formEnctypeFromString((null=3D=3D=3D(e=3Dthis.sub= mitter)||void 0=3D=3D=3De?void 0:e.getAttribute("formenctype"))||this.formE= lement.enctype)}get isIdempotent(){return this.fetchRequest.isIdempotent}ge= t stringFormData(){return[...this.formData].reduce(((e,[t,s])=3D>e.concat("= string"=3D=3Dtypeof s?[[t,s]]:[])),[])}async start(){const{initialized:e,re= questing:t}=3DFormSubmissionState,s=3DgetAttribute("data-turbo-confirm",thi= s.submitter,this.formElement);if("string"=3D=3Dtypeof s){if(!await FormSubm= ission.confirmMethod(s,this.formElement,this.submitter))return}if(this.stat= e=3D=3De)return this.state=3Dt,this.fetchRequest.perform()}stop(){const{sto= pping:e,stopped:t}=3DFormSubmissionState;if(this.state!=3De&&this.state!=3D= t)return this.state=3De,this.fetchRequest.cancel(),!0}prepareHeadersForRequ= est(e,t){if(!t.isIdempotent){const t=3DgetCookieValue(getMetaContent("csrf-= param"))||getMetaContent("csrf-token");t&&(e["X-CSRF-Token"]=3Dt)}this.requ= estAcceptsTurboStreamResponse(t)&&t.acceptResponseType(StreamMessage.conten= tType)}requestStarted(e){var t;this.state=3DFormSubmissionState.waiting,nul= l=3D=3D=3D(t=3Dthis.submitter)||void 0=3D=3D=3Dt||t.setAttribute("disabled"= ,""),dispatch("turbo:submit-start",{target:this.formElement,detail:{formSub= mission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedH= andlingResponse(e,t){this.result=3D{success:t.succeeded,fetchResponse:t}}re= questSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delega= te.formSubmissionFailedWithResponse(this,t);else if(this.requestMustRedirec= t(e)&&responseSucceededWithoutRedirect(t)){const e=3Dnew Error("Form respon= ses must redirect to another location");this.delegate.formSubmissionErrored= (this,e)}else this.state=3DFormSubmissionState.receiving,this.result=3D{suc= cess:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(= this,t)}requestFailedWithResponse(e,t){this.result=3D{success:!1,fetchRespo= nse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrore= d(e,t){this.result=3D{success:!1,error:t},this.delegate.formSubmissionError= ed(this,t)}requestFinished(e){var t;this.state=3DFormSubmissionState.stoppe= d,null=3D=3D=3D(t=3Dthis.submitter)||void 0=3D=3D=3Dt||t.removeAttribute("d= isabled"),dispatch("turbo:submit-end",{target:this.formElement,detail:Objec= t.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionF= inished(this)}requestMustRedirect(e){return!e.isIdempotent&&this.mustRedire= ct}requestAcceptsTurboStreamResponse(e){return!e.isIdempotent||hasAttribute= ("data-turbo-stream",this.submitter,this.formElement)}}function buildFormDa= ta(e,t){const s=3Dnew FormData(e),i=3Dnull=3D=3Dt?void 0:t.getAttribute("na= me"),r=3Dnull=3D=3Dt?void 0:t.getAttribute("value");return i&&s.append(i,r|= |""),s}function getCookieValue(e){if(null!=3De){const t=3D(document.cookie?= document.cookie.split("; "):[]).find((t=3D>t.startsWith(e)));if(t){const e= =3Dt.split("=3D").slice(1).join("=3D");return e?decodeURIComponent(e):void = 0}}}function responseSucceededWithoutRedirect(e){return 200=3D=3De.statusCo= de&&!e.redirected}function mergeFormDataEntries(e,t){const s=3Dnew URLSearc= hParams;for(const[e,i]of t)i instanceof File||s.append(e,i);return e.search= =3Ds.toString(),e}class Snapshot{constructor(e){this.element=3De}get active= Element(){return this.element.ownerDocument.activeElement}get children(){re= turn[...this.element.children]}hasAnchor(e){return null!=3Dthis.getElementF= orAnchor(e)}getElementForAnchor(e){return e?this.element.querySelector(`[id= =3D'${e}'], a[name=3D'${e}']`):null}get isConnected(){return this.element.i= sConnected}get firstAutofocusableElement(){for(const e of this.element.quer= ySelectorAll("[autofocus]"))if(null=3D=3De.closest("[inert], :disabled, [hi= dden], details:not([open]), dialog:not([open])"))return e;return null}get p= ermanentElements(){return queryPermanentElementsAll(this.element)}getPerman= entElementById(e){return getPermanentElementById(this.element,e)}getPermane= ntElementMapForSnapshot(e){const t=3D{};for(const s of this.permanentElemen= ts){const{id:i}=3Ds,r=3De.getPermanentElementById(i);r&&(t[i]=3D[s,r])}retu= rn t}}function getPermanentElementById(e,t){return e.querySelector(`#${t}[d= ata-turbo-permanent]`)}function queryPermanentElementsAll(e){return e.query= SelectorAll("[id][data-turbo-permanent]")}class FormSubmitObserver{construc= tor(e,t){this.started=3D!1,this.submitCaptured=3D()=3D>{this.eventTarget.re= moveEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEvent= Listener("submit",this.submitBubbled,!1)},this.submitBubbled=3De=3D>{if(!e.= defaultPrevented){const t=3De.target instanceof HTMLFormElement?e.target:vo= id 0,s=3De.submitter||void 0;t&&submissionDoesNotDismissDialog(t,s)&&submis= sionDoesNotTargetIFrame(t,s)&&this.delegate.willSubmitForm(t,s)&&(e.prevent= Default(),e.stopImmediatePropagation(),this.delegate.formSubmitted(t,s))}},= this.delegate=3De,this.eventTarget=3Dt}start(){this.started||(this.eventTar= get.addEventListener("submit",this.submitCaptured,!0),this.started=3D!0)}st= op(){this.started&&(this.eventTarget.removeEventListener("submit",this.subm= itCaptured,!0),this.started=3D!1)}}function submissionDoesNotDismissDialog(= e,t){return"dialog"!=3D((null=3D=3Dt?void 0:t.getAttribute("formmethod"))||= e.getAttribute("method"))}function submissionDoesNotTargetIFrame(e,t){const= s=3D(null=3D=3Dt?void 0:t.getAttribute("formtarget"))||e.target;for(const = e of document.getElementsByName(s))if(e instanceof HTMLIFrameElement)return= !1;return!0}class View{constructor(e,t){this.resolveRenderPromise=3De=3D>{}= ,this.resolveInterceptionPromise=3De=3D>{},this.delegate=3De,this.element= =3Dt}scrollToAnchor(e){const t=3Dthis.snapshot.getElementForAnchor(e);t?(th= is.scrollToElement(t),this.focusElement(t)):this.scrollToPosition({x:0,y:0}= )}scrollToAnchorFromLocation(e){this.scrollToAnchor(getAnchor(e))}scrollToE= lement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.h= asAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(= ),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRo= ot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollR= oot(){return window}async render(e){const{isPreview:t,shouldRender:s,newSna= pshot:i}=3De;if(s)try{this.renderPromise=3Dnew Promise((e=3D>this.resolveRe= nderPromise=3De)),this.renderer=3De,await this.prepareToRenderSnapshot(e);c= onst s=3Dnew Promise((e=3D>this.resolveInterceptionPromise=3De)),r=3D{resum= e:this.resolveInterceptionPromise,render:this.renderer.renderElement};this.= delegate.allowsImmediateRender(i,r)||await s,await this.renderSnapshot(e),t= his.delegate.viewRenderedSnapshot(i,t),this.delegate.preloadOnLoadLinksForV= iew(this.element),this.finishRenderingSnapshot(e)}finally{delete this.rende= rer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.i= nvalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}as= ync prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prep= areToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-prev= iew",""):this.element.removeAttribute("data-turbo-preview")}async renderSna= pshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}c= lass FrameView extends View{invalidate(){this.element.innerHTML=3D""}get sn= apshot(){return new Snapshot(this.element)}}class LinkInterceptor{construct= or(e,t){this.clickBubbled=3De=3D>{this.respondsToEventTarget(e.target)?this= .clickEvent=3De:delete this.clickEvent},this.linkClicked=3De=3D>{this.click= Event&&this.respondsToEventTarget(e.target)&&e.target instanceof Element&&t= his.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.origin= alEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegat= e.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delet= e this.clickEvent},this.willVisit=3De=3D>{delete this.clickEvent},this.dele= gate=3De,this.element=3Dt}start(){this.element.addEventListener("click",thi= s.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),d= ocument.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.e= lement.removeEventListener("click",this.clickBubbled),document.removeEventL= istener("turbo:click",this.linkClicked),document.removeEventListener("turbo= :before-visit",this.willVisit)}respondsToEventTarget(e){const t=3De instanc= eof Element?e:e instanceof Node?e.parentElement:null;return t&&t.closest("t= urbo-frame, html")=3D=3Dthis.element}}class LinkClickObserver{constructor(e= ,t){this.started=3D!1,this.clickCaptured=3D()=3D>{this.eventTarget.removeEv= entListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener= ("click",this.clickBubbled,!1)},this.clickBubbled=3De=3D>{if(e instanceof M= ouseEvent&&this.clickEventIsSignificant(e)){const t=3De.composedPath&&e.com= posedPath()[0]||e.target,s=3Dthis.findLinkFromClickTarget(t);if(s&&doesNotT= argetIFrame(s)){const t=3Dthis.getLocationForLink(s);this.delegate.willFoll= owLinkToLocation(s,t,e)&&(e.preventDefault(),this.delegate.followedLinkToLo= cation(s,t))}}},this.delegate=3De,this.eventTarget=3Dt}start(){this.started= ||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.st= arted=3D!0)}stop(){this.started&&(this.eventTarget.removeEventListener("cli= ck",this.clickCaptured,!0),this.started=3D!1)}clickEventIsSignificant(e){re= turn!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||= e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}findLinkFromClickTarget(e){if(e= instanceof Element)return e.closest("a[href]:not([target^=3D_]):not([downl= oad])")}getLocationForLink(e){return expandURL(e.getAttribute("href")||"")}= }function doesNotTargetIFrame(e){for(const t of document.getElementsByName(= e.target))if(t instanceof HTMLIFrameElement)return!1;return!0}class FormLin= kClickObserver{constructor(e,t){this.delegate=3De,this.linkInterceptor=3Dne= w LinkClickObserver(this,t)}start(){this.linkInterceptor.start()}stop(){thi= s.linkInterceptor.stop()}willFollowLinkToLocation(e,t,s){return this.delega= te.willSubmitFormLinkToLocation(e,t,s)&&e.hasAttribute("data-turbo-method")= }followedLinkToLocation(e,t){const s=3Dt.href,i=3Ddocument.createElement("f= orm");i.setAttribute("data-turbo","true"),i.setAttribute("action",s),i.setA= ttribute("hidden","");const r=3De.getAttribute("data-turbo-method");r&&i.se= tAttribute("method",r);const n=3De.getAttribute("data-turbo-frame");n&&i.se= tAttribute("data-turbo-frame",n);const o=3De.getAttribute("data-turbo-actio= n");o&&i.setAttribute("data-turbo-action",o);const a=3De.getAttribute("data= -turbo-confirm");a&&i.setAttribute("data-turbo-confirm",a);e.hasAttribute("= data-turbo-stream")&&i.setAttribute("data-turbo-stream",""),this.delegate.s= ubmittedFormLinkToLocation(e,t,i),document.body.appendChild(i),i.addEventLi= stener("turbo:submit-end",(()=3D>i.remove()),{once:!0}),requestAnimationFra= me((()=3D>i.requestSubmit()))}}class Bardo{constructor(e,t){this.delegate= =3De,this.permanentElementMap=3Dt}static preservingPermanentElements(e,t,s)= {const i=3Dnew this(e,t);i.enter(),s(),i.leave()}enter(){for(const e in thi= s.permanentElementMap){const[t,s]=3Dthis.permanentElementMap[e];this.delega= te.enteringBardo(t,s),this.replaceNewPermanentElementWithPlaceholder(s)}}le= ave(){for(const e in this.permanentElementMap){const[t]=3Dthis.permanentEle= mentMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlac= eholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPer= manentElementWithPlaceholder(e){const t=3DcreatePlaceholderForPermanentElem= ent(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){const t= =3De.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(= e){const t=3Dthis.getPlaceholderById(e.id);null=3D=3Dt||t.replaceWith(e)}ge= tPlaceholderById(e){return this.placeholders.find((t=3D>t.content=3D=3De))}= get placeholders(){return[...document.querySelectorAll("meta[name=3Dturbo-p= ermanent-placeholder][content]")]}}function createPlaceholderForPermanentEl= ement(e){const t=3Ddocument.createElement("meta");return t.setAttribute("na= me","turbo-permanent-placeholder"),t.setAttribute("content",e.id),t}class R= enderer{constructor(e,t,s,i,r=3D!0){this.activeElement=3Dnull,this.currentS= napshot=3De,this.newSnapshot=3Dt,this.isPreview=3Di,this.willRender=3Dr,thi= s.renderElement=3Ds,this.promise=3Dnew Promise(((e,t)=3D>this.resolvingFunc= tions=3D{resolve:e,reject:t}))}get shouldRender(){return!0}get reloadReason= (){}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.res= olvingFunctions.resolve(),delete this.resolvingFunctions)}preservingPermane= ntElements(e){Bardo.preservingPermanentElements(this,this.permanentElementM= ap,e)}focusFirstAutofocusableElement(){const e=3Dthis.connectedSnapshot.fir= stAutofocusableElement;elementIsFocusable(e)&&e.focus()}enteringBardo(e){th= is.activeElement||e.contains(this.currentSnapshot.activeElement)&&(this.act= iveElement=3Dthis.currentSnapshot.activeElement)}leavingBardo(e){e.contains= (this.activeElement)&&this.activeElement instanceof HTMLElement&&(this.acti= veElement.focus(),this.activeElement=3Dnull)}get connectedSnapshot(){return= this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get cur= rentElement(){return this.currentSnapshot.element}get newElement(){return t= his.newSnapshot.element}get permanentElementMap(){return this.currentSnapsh= ot.getPermanentElementMapForSnapshot(this.newSnapshot)}}function elementIsF= ocusable(e){return e&&"function"=3D=3Dtypeof e.focus}class FrameRenderer ex= tends Renderer{constructor(e,t,s,i,r,n=3D!0){super(t,s,i,r,n),this.delegate= =3De}static renderElement(e,t){var s;const i=3Ddocument.createRange();i.sel= ectNodeContents(e),i.deleteContents();const r=3Dt,n=3Dnull=3D=3D=3D(s=3Dr.o= wnerDocument)||void 0=3D=3D=3Ds?void 0:s.createRange();n&&(n.selectNodeCont= ents(r),e.appendChild(n.extractContents()))}get shouldRender(){return!0}asy= nc render(){await nextAnimationFrame(),this.preservingPermanentElements((()= =3D>{this.loadFrameElement()})),this.scrollFrameIntoView(),await nextAnimat= ionFrame(),this.focusFirstAutofocusableElement(),await nextAnimationFrame()= ,this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderF= rame(this.currentElement,this.newElement),this.renderElement(this.currentEl= ement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscr= oll||this.newElement.autoscroll){const e=3Dthis.currentElement.firstElement= Child,t=3DreadScrollLogicalPosition(this.currentElement.getAttribute("data-= autoscroll-block"),"end"),s=3DreadScrollBehavior(this.currentElement.getAtt= ribute("data-autoscroll-behavior"),"auto");if(e)return e.scrollIntoView({bl= ock:t,behavior:s}),!0}return!1}activateScriptElements(){for(const e of this= .newScriptElements){const t=3DactivateScriptElement(e);e.replaceWith(t)}}ge= t newScriptElements(){return this.currentElement.querySelectorAll("script")= }}function readScrollLogicalPosition(e,t){return"end"=3D=3De||"start"=3D=3D= e||"center"=3D=3De||"nearest"=3D=3De?e:t}function readScrollBehavior(e,t){r= eturn"auto"=3D=3De||"smooth"=3D=3De?e:t}class ProgressBar{constructor(){thi= s.hiding=3D!1,this.value=3D0,this.visible=3D!1,this.trickle=3D()=3D>{this.s= etValue(this.value+Math.random()/100)},this.stylesheetElement=3Dthis.create= StylesheetElement(),this.progressElement=3Dthis.createProgressElement(),thi= s.installStylesheetElement(),this.setValue(0)}static get defaultCSS(){retur= n unindent` + .turbo-progress-bar { + position: fixed; + display: block; + top: 0; + left: 0; + height: 3px; + background: #0076ff; + z-index: 2147483647; + transition: + width ${ProgressBar.animationDuration}ms ease-out, + opacity ${ProgressBar.animationDuration/2}ms ${ProgressBar.anima= tionDuration/2}ms ease-in; + transform: translate3d(0, 0, 0); + } + `}show(){this.visible||(this.visible=3D!0,this.installProgressElement(= ),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=3D= !0,this.fadeProgressElement((()=3D>{this.uninstallProgressElement(),this.st= opTrickling(),this.visible=3D!1,this.hiding=3D!1})))}setValue(e){this.value= =3De,this.refresh()}installStylesheetElement(){document.head.insertBefore(t= his.stylesheetElement,document.head.firstChild)}installProgressElement(){th= is.progressElement.style.width=3D"0",this.progressElement.style.opacity=3D"= 1",document.documentElement.insertBefore(this.progressElement,document.body= ),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity= =3D"0",setTimeout(e,1.5*ProgressBar.animationDuration)}uninstallProgressEle= ment(){this.progressElement.parentNode&&document.documentElement.removeChil= d(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickl= eInterval=3Dwindow.setInterval(this.trickle,ProgressBar.animationDuration))= }stopTrickling(){window.clearInterval(this.trickleInterval),delete this.tri= ckleInterval}refresh(){requestAnimationFrame((()=3D>{this.progressElement.s= tyle.width=3D10+90*this.value+"%"}))}createStylesheetElement(){const e=3Ddo= cument.createElement("style");return e.type=3D"text/css",e.textContent=3DPr= ogressBar.defaultCSS,this.cspNonce&&(e.nonce=3Dthis.cspNonce),e}createProgr= essElement(){const e=3Ddocument.createElement("div");return e.className=3D"= turbo-progress-bar",e}get cspNonce(){return getMetaContent("csp-nonce")}}Pr= ogressBar.animationDuration=3D300;class HeadSnapshot extends Snapshot{const= ructor(){super(...arguments),this.detailsByOuterHTML=3Dthis.children.filter= ((e=3D>!elementIsNoscript(e))).map((e=3D>elementWithoutNonce(e))).reduce(((= e,t)=3D>{const{outerHTML:s}=3Dt,i=3Ds in e?e[s]:{type:elementType(t),tracke= d:elementIsTracked(t),elements:[]};return Object.assign(Object.assign({},e)= ,{[s]:Object.assign(Object.assign({},i),{elements:[...i.elements,t]})})}),{= })}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML= ).filter((e=3D>this.detailsByOuterHTML[e].tracked)).join("")}getScriptEleme= ntsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("scrip= t",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatching= TypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t)= {return Object.keys(this.detailsByOuterHTML).filter((e=3D>!(e in t.detailsB= yOuterHTML))).map((e=3D>this.detailsByOuterHTML[e])).filter((({type:t})=3D>= t=3D=3De)).map((({elements:[e]})=3D>e))}get provisionalElements(){return Ob= ject.keys(this.detailsByOuterHTML).reduce(((e,t)=3D>{const{type:s,tracked:i= ,elements:r}=3Dthis.detailsByOuterHTML[t];return null!=3Ds||i?r.length>1?[.= ..e,...r.slice(1)]:e:[...e,...r]}),[])}getMetaValue(e){const t=3Dthis.findM= etaElementByName(e);return t?t.getAttribute("content"):null}findMetaElement= ByName(e){return Object.keys(this.detailsByOuterHTML).reduce(((t,s)=3D>{con= st{elements:[i]}=3Dthis.detailsByOuterHTML[s];return elementIsMetaElementWi= thName(i,e)?i:t}),void 0)}}function elementType(e){return elementIsScript(e= )?"script":elementIsStylesheet(e)?"stylesheet":void 0}function elementIsTra= cked(e){return"reload"=3D=3De.getAttribute("data-turbo-track")}function ele= mentIsScript(e){return"script"=3D=3De.localName}function elementIsNoscript(= e){return"noscript"=3D=3De.localName}function elementIsStylesheet(e){const = t=3De.localName;return"style"=3D=3Dt||"link"=3D=3Dt&&"stylesheet"=3D=3De.ge= tAttribute("rel")}function elementIsMetaElementWithName(e,t){return"meta"= =3D=3De.localName&&e.getAttribute("name")=3D=3Dt}function elementWithoutNon= ce(e){return e.hasAttribute("nonce")&&e.setAttribute("nonce",""),e}class Pa= geSnapshot extends Snapshot{constructor(e,t){super(e),this.headSnapshot=3Dt= }static fromHTMLString(e=3D""){return this.fromDocument(parseHTMLDocument(e= ))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static f= romDocument({head:e,body:t}){return new this(t,new HeadSnapshot(e))}clone()= {const e=3Dthis.element.cloneNode(!0),t=3Dthis.element.querySelectorAll("se= lect"),s=3De.querySelectorAll("select");for(const[e,i]of t.entries()){const= t=3Ds[e];for(const e of t.selectedOptions)e.selected=3D!1;for(const e of i= .selectedOptions)t.options[e.index].selected=3D!0}for(const t of e.querySel= ectorAll('input[type=3D"password"]'))t.value=3D"";return new PageSnapshot(e= ,this.headSnapshot)}get headElement(){return this.headSnapshot.element}get = rootLocation(){var e;return expandURL(null!=3D=3D(e=3Dthis.getSetting("root= "))&&void 0!=3D=3De?e:"/")}get cacheControlValue(){return this.getSetting("= cache-control")}get isPreviewable(){return"no-preview"!=3Dthis.cacheControl= Value}get isCacheable(){return"no-cache"!=3Dthis.cacheControlValue}get isVi= sitable(){return"reload"!=3Dthis.getSetting("visit-control")}getSetting(e){= return this.headSnapshot.getMetaValue(`turbo-${e}`)}}!function(e){e.visitSt= art=3D"visitStart",e.requestStart=3D"requestStart",e.requestEnd=3D"requestE= nd",e.visitEnd=3D"visitEnd"}(TimingMetric||(TimingMetric=3D{})),function(e)= {e.initialized=3D"initialized",e.started=3D"started",e.canceled=3D"canceled= ",e.failed=3D"failed",e.completed=3D"completed"}(VisitState||(VisitState=3D= {}));const defaultOptions=3D{action:"advance",historyChanged:!1,visitCached= Snapshot:()=3D>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acc= eptsStreamResponse:!1};var SystemStatusCode,PageStage;!function(e){e[e.netw= orkFailure=3D0]=3D"networkFailure",e[e.timeoutFailure=3D-1]=3D"timeoutFailu= re",e[e.contentTypeMismatch=3D-2]=3D"contentTypeMismatch"}(SystemStatusCode= ||(SystemStatusCode=3D{}));class Visit{constructor(e,t,s,i=3D{}){this.ident= ifier=3Duuid(),this.timingMetrics=3D{},this.followedRedirect=3D!1,this.hist= oryChanged=3D!1,this.scrolled=3D!1,this.shouldCacheSnapshot=3D!0,this.accep= tsStreamResponse=3D!1,this.snapshotCached=3D!1,this.state=3DVisitState.init= ialized,this.delegate=3De,this.location=3Dt,this.restorationIdentifier=3Ds|= |uuid();const{action:r,historyChanged:n,referrer:o,snapshot:a,snapshotHTML:= c,response:l,visitCachedSnapshot:h,willRender:d,updateHistory:u,shouldCache= Snapshot:m,acceptsStreamResponse:p}=3DObject.assign(Object.assign({},defaul= tOptions),i);this.action=3Dr,this.historyChanged=3Dn,this.referrer=3Do,this= .snapshot=3Da,this.snapshotHTML=3Dc,this.response=3Dl,this.isSamePage=3Dthi= s.delegate.locationWithActionIsSamePage(this.location,this.action),this.vis= itCachedSnapshot=3Dh,this.willRender=3Dd,this.updateHistory=3Du,this.scroll= ed=3D!d,this.shouldCacheSnapshot=3Dm,this.acceptsStreamResponse=3Dp}get ada= pter(){return this.delegate.adapter}get view(){return this.delegate.view}ge= t history(){return this.delegate.history}get restorationData(){return this.= history.getRestorationDataForIdentifier(this.restorationIdentifier)}get sil= ent(){return this.isSamePage}start(){this.state=3D=3DVisitState.initialized= &&(this.recordTimingMetric(TimingMetric.visitStart),this.state=3DVisitState= .started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}= cancel(){this.state=3D=3DVisitState.started&&(this.request&&this.request.ca= ncel(),this.cancelRender(),this.state=3DVisitState.canceled)}complete(){thi= s.state=3D=3DVisitState.started&&(this.recordTimingMetric(TimingMetric.visi= tEnd),this.state=3DVisitState.completed,this.followRedirect(),this.followed= Redirect||(this.adapter.visitCompleted(this),this.delegate.visitCompleted(t= his)))}fail(){this.state=3D=3DVisitState.started&&(this.state=3DVisitState.= failed,this.adapter.visitFailed(this))}changeHistory(){var e;if(!this.histo= ryChanged&&this.updateHistory){const t=3DgetHistoryMethodForAction(this.loc= ation.href=3D=3D=3D(null=3D=3D=3D(e=3Dthis.referrer)||void 0=3D=3D=3De?void= 0:e.href)?"replace":this.action);this.history.update(t,this.location,this.= restorationIdentifier),this.historyChanged=3D!0}}issueRequest(){this.hasPre= loadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.re= quest&&(this.request=3Dnew FetchRequest(this,FetchMethod.get,this.location)= ,this.request.perform())}simulateRequest(){this.response&&(this.startReques= t(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordT= imingMetric(TimingMetric.requestStart),this.adapter.visitRequestStarted(thi= s)}recordResponse(e=3Dthis.response){if(this.response=3De,e){const{statusCo= de:t}=3De;isSuccessful(t)?this.adapter.visitRequestCompleted(this):this.ada= pter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordT= imingMetric(TimingMetric.requestEnd),this.adapter.visitRequestFinished(this= )}loadResponse(){if(this.response){const{statusCode:e,responseHTML:t}=3Dthi= s.response;this.render((async()=3D>{this.shouldCacheSnapshot&&this.cacheSna= pshot(),this.view.renderPromise&&await this.view.renderPromise,isSuccessful= (e)&&null!=3Dt?(await this.view.renderPage(PageSnapshot.fromHTMLString(t),!= 1,this.willRender,this),this.performScroll(),this.adapter.visitRendered(thi= s),this.complete()):(await this.view.renderError(PageSnapshot.fromHTMLStrin= g(t),this),this.adapter.visitRendered(this),this.fail())}))}}getCachedSnaps= hot(){const e=3Dthis.view.getCachedSnapshotForLocation(this.location)||this= .getPreloadedSnapshot();if(e&&(!getAnchor(this.location)||e.hasAnchor(getAn= chor(this.location)))&&("restore"=3D=3Dthis.action||e.isPreviewable))return= e}getPreloadedSnapshot(){if(this.snapshotHTML)return PageSnapshot.fromHTML= String(this.snapshotHTML)}hasCachedSnapshot(){return null!=3Dthis.getCached= Snapshot()}loadCachedSnapshot(){const e=3Dthis.getCachedSnapshot();if(e){co= nst t=3Dthis.shouldIssueRequest();this.render((async()=3D>{this.cacheSnapsh= ot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderProm= ise&&await this.view.renderPromise,await this.view.renderPage(e,t,this.will= Render,this),this.performScroll(),this.adapter.visitRendered(this),t||this.= complete())}))}}followRedirect(){var e;this.redirectedToLocation&&!this.fol= lowedRedirect&&(null=3D=3D=3D(e=3Dthis.response)||void 0=3D=3D=3De?void 0:e= .redirected)&&(this.adapter.visitProposedToLocation(this.redirectedToLocati= on,{action:"replace",response:this.response}),this.followedRedirect=3D!0)}g= oToSamePageAnchor(){this.isSamePage&&this.render((async()=3D>{this.cacheSna= pshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendere= d(this)}))}prepareHeadersForRequest(e,t){this.acceptsStreamResponse&&t.acce= ptResponseType(StreamMessage.contentType)}requestStarted(){this.startReques= t()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithRespon= se(e,t){const s=3Dawait t.responseHTML,{redirected:i,statusCode:r}=3Dt;null= =3D=3Ds?this.recordResponse({statusCode:SystemStatusCode.contentTypeMismatc= h,redirected:i}):(this.redirectedToLocation=3Dt.redirected?t.location:void = 0,this.recordResponse({statusCode:r,responseHTML:s,redirected:i}))}async re= questFailedWithResponse(e,t){const s=3Dawait t.responseHTML,{redirected:i,s= tatusCode:r}=3Dt;null=3D=3Ds?this.recordResponse({statusCode:SystemStatusCo= de.contentTypeMismatch,redirected:i}):this.recordResponse({statusCode:r,res= ponseHTML:s,redirected:i})}requestErrored(e,t){this.recordResponse({statusC= ode:SystemStatusCode.networkFailure,redirected:!1})}requestFinished(){this.= finishRequest()}performScroll(){this.scrolled||this.view.forceReloaded||("r= estore"=3D=3Dthis.action?this.scrollToRestoredPosition()||this.scrollToAnch= or()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(= ),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.= lastRenderedLocation,this.location),this.scrolled=3D!0)}scrollToRestoredPos= ition(){const{scrollPosition:e}=3Dthis.restorationData;if(e)return this.vie= w.scrollToPosition(e),!0}scrollToAnchor(){const e=3DgetAnchor(this.location= );if(null!=3De)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){= this.timingMetrics[e]=3D(new Date).getTime()}getTimingMetrics(){return Obje= ct.assign({},this.timingMetrics)}getHistoryMethodForAction(e){switch(e){cas= e"replace":return history.replaceState;case"advance":case"restore":return h= istory.pushState}}hasPreloadedResponse(){return"object"=3D=3Dtypeof this.re= sponse}shouldIssueRequest(){return!this.isSamePage&&("restore"=3D=3Dthis.ac= tion?!this.hasCachedSnapshot():this.willRender)}cacheSnapshot(){this.snapsh= otCached||(this.view.cacheSnapshot(this.snapshot).then((e=3D>e&&this.visitC= achedSnapshot(e))),this.snapshotCached=3D!0)}async render(e){this.cancelRen= der(),await new Promise((e=3D>{this.frame=3DrequestAnimationFrame((()=3D>e(= )))})),await e(),delete this.frame}cancelRender(){this.frame&&(cancelAnimat= ionFrame(this.frame),delete this.frame)}}function isSuccessful(e){return e>= =3D200&&e<300}class BrowserAdapter{constructor(e){this.progressBar=3Dnew Pr= ogressBar,this.showProgressBar=3D()=3D>{this.progressBar.show()},this.sessi= on=3De}visitProposedToLocation(e,t){this.navigator.startVisit(e,(null=3D=3D= t?void 0:t.restorationIdentifier)||uuid(),t)}visitStarted(e){this.location= =3De.location,e.loadCachedSnapshot(),e.issueRequest(),e.goToSamePageAnchor(= )}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()= ||"restore"!=3De.action?this.showVisitProgressBarAfterDelay():this.showProg= ressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithS= tatusCode(e,t){switch(t){case SystemStatusCode.networkFailure:case SystemSt= atusCode.timeoutFailure:case SystemStatusCode.contentTypeMismatch:return th= is.reload({reason:"request_failed",context:{statusCode:t}});default:return = e.loadResponse()}}visitRequestFinished(e){this.progressBar.setValue(1),this= .hideVisitProgressBar()}visitCompleted(e){}pageInvalidated(e){this.reload(e= )}visitFailed(e){}visitRendered(e){}formSubmissionStarted(e){this.progressB= ar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(= e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgres= sBarAfterDelay(){this.visitProgressBarTimeout=3Dwindow.setTimeout(this.show= ProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.prog= ressBar.hide(),null!=3Dthis.visitProgressBarTimeout&&(window.clearTimeout(t= his.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormP= rogressBarAfterDelay(){null=3D=3Dthis.formProgressBarTimeout&&(this.formPro= gressBarTimeout=3Dwindow.setTimeout(this.showProgressBar,this.session.progr= essBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=3Dthis.fo= rmProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),del= ete this.formProgressBarTimeout)}reload(e){var t;dispatch("turbo:reload",{d= etail:e}),window.location.href=3D(null=3D=3D=3D(t=3Dthis.location)||void 0= =3D=3D=3Dt?void 0:t.toString())||window.location.href}get navigator(){retur= n this.session.navigator}}class CacheObserver{constructor(){this.started=3D= !1,this.removeStaleElements=3De=3D>{const t=3D[...document.querySelectorAll= ('[data-turbo-cache=3D"false"]')];for(const e of t)e.remove()}}start(){this= .started||(this.started=3D!0,addEventListener("turbo:before-cache",this.rem= oveStaleElements,!1))}stop(){this.started&&(this.started=3D!1,removeEventLi= stener("turbo:before-cache",this.removeStaleElements,!1))}}class FrameRedir= ector{constructor(e,t){this.session=3De,this.element=3Dt,this.linkIntercept= or=3Dnew LinkInterceptor(this,t),this.formSubmitObserver=3Dnew FormSubmitOb= server(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver= .start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}= shouldInterceptLinkClick(e,t,s){return this.shouldRedirect(e)}linkClickInte= rcepted(e,t,s){const i=3Dthis.findFrameElement(e);i&&i.delegate.linkClickIn= tercepted(e,t,s)}willSubmitForm(e,t){return null=3D=3De.closest("turbo-fram= e")&&this.shouldSubmit(e,t)&&this.shouldRedirect(e,t)}formSubmitted(e,t){co= nst s=3Dthis.findFrameElement(e,t);s&&s.delegate.formSubmitted(e,t)}shouldS= ubmit(e,t){var s;const i=3DgetAction(e,t),r=3Dthis.element.ownerDocument.qu= erySelector('meta[name=3D"turbo-root"]'),n=3DexpandURL(null!=3D=3D(s=3Dnull= =3D=3Dr?void 0:r.content)&&void 0!=3D=3Ds?s:"/");return this.shouldRedirect= (e,t)&&locationIsVisitable(i,n)}shouldRedirect(e,t){if(e instanceof HTMLFor= mElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNa= vigatable(e)){const s=3Dthis.findFrameElement(e,t);return!!s&&s!=3De.closes= t("turbo-frame")}return!1}findFrameElement(e,t){const s=3D(null=3D=3Dt?void= 0:t.getAttribute("data-turbo-frame"))||e.getAttribute("data-turbo-frame");= if(s&&"_top"!=3Ds){const e=3Dthis.element.querySelector(`#${s}:not([disable= d])`);if(e instanceof FrameElement)return e}}}class History{constructor(e){= this.restorationIdentifier=3Duuid(),this.restorationData=3D{},this.started= =3D!1,this.pageLoaded=3D!1,this.onPopState=3De=3D>{if(this.shouldHandlePopS= tate()){const{turbo:t}=3De.state||{};if(t){this.location=3Dnew URL(window.l= ocation.href);const{restorationIdentifier:e}=3Dt;this.restorationIdentifier= =3De,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.lo= cation,e)}}},this.onPageLoad=3Dasync e=3D>{await nextMicrotask(),this.pageL= oaded=3D!0},this.delegate=3De}start(){this.started||(addEventListener("pops= tate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.= started=3D!0,this.replace(new URL(window.location.href)))}stop(){this.start= ed&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener= ("load",this.onPageLoad,!1),this.started=3D!1)}push(e,t){this.update(histor= y.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(= e,t,s=3Duuid()){const i=3D{turbo:{restorationIdentifier:s}};e.call(history,= i,"",t.href),this.location=3Dt,this.restorationIdentifier=3Ds}getRestoratio= nDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationD= ata(e){const{restorationIdentifier:t}=3Dthis,s=3Dthis.restorationData[t];th= is.restorationData[t]=3DObject.assign(Object.assign({},s),e)}assumeControlO= fScrollRestoration(){var e;this.previousScrollRestoration||(this.previousSc= rollRestoration=3Dnull!=3D=3D(e=3Dhistory.scrollRestoration)&&void 0!=3D=3D= e?e:"auto",history.scrollRestoration=3D"manual")}relinquishControlOfScrollR= estoration(){this.previousScrollRestoration&&(history.scrollRestoration=3Dt= his.previousScrollRestoration,delete this.previousScrollRestoration)}should= HandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.page= Loaded||"complete"=3D=3Ddocument.readyState}}class Navigator{constructor(e)= {this.delegate=3De}proposeVisit(e,t=3D{}){this.delegate.allowsVisitingLocat= ionWithAction(e,t.action)&&(locationIsVisitable(e,this.view.snapshot.rootLo= cation)?this.delegate.visitProposedToLocation(e,t):window.location.href=3De= .toString())}startVisit(e,t,s=3D{}){this.stop(),this.currentVisit=3Dnew Vis= it(this,expandURL(e),t,Object.assign({referrer:this.location},s)),this.curr= entVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=3Dnew Form= Submission(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmiss= ion&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVi= sit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){re= turn this.delegate.adapter}get view(){return this.delegate.view}get history= (){return this.delegate.history}formSubmissionStarted(e){"function"=3D=3Dty= peof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted= (e)}async formSubmissionSucceededWithResponse(e,t){if(e=3D=3Dthis.formSubmi= ssion){const s=3Dawait t.responseHTML;if(s){const i=3De.method=3D=3DFetchMe= thod.get;i||this.view.clearSnapshotCache();const{statusCode:r,redirected:n}= =3Dt,o=3D{action:this.getActionForFormSubmission(e),shouldCacheSnapshot:i,r= esponse:{statusCode:r,responseHTML:s,redirected:n}};this.proposeVisit(t.loc= ation,o)}}}async formSubmissionFailedWithResponse(e,t){const s=3Dawait t.re= sponseHTML;if(s){const e=3DPageSnapshot.fromHTMLString(s);t.serverError?awa= it this.view.renderError(e,this.currentVisit):await this.view.renderPage(e,= !1,!0,this.currentVisit),this.view.scrollToTop(),this.view.clearSnapshotCac= he()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e)= {"function"=3D=3Dtypeof this.adapter.formSubmissionFinished&&this.adapter.f= ormSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visi= tCompleted(e){this.delegate.visitCompleted(e)}locationWithActionIsSamePage(= e,t){const s=3DgetAnchor(e),i=3DgetAnchor(this.view.lastRenderedLocation),r= =3D"restore"=3D=3D=3Dt&&void 0=3D=3D=3Ds;return"replace"!=3D=3Dt&&getReques= tURL(e)=3D=3D=3DgetRequestURL(this.view.lastRenderedLocation)&&(r||null!=3D= s&&s!=3D=3Di)}visitScrolledToSamePageLocation(e,t){this.delegate.visitScrol= ledToSamePageLocation(e,t)}get location(){return this.history.location}get = restorationIdentifier(){return this.history.restorationIdentifier}getAction= ForFormSubmission(e){const{formElement:t,submitter:s}=3De,i=3DgetAttribute(= "data-turbo-action",s,t);return isAction(i)?i:"advance"}}!function(e){e[e.i= nitial=3D0]=3D"initial",e[e.loading=3D1]=3D"loading",e[e.interactive=3D2]= =3D"interactive",e[e.complete=3D3]=3D"complete"}(PageStage||(PageStage=3D{}= ));class PageObserver{constructor(e){this.stage=3DPageStage.initial,this.st= arted=3D!1,this.interpretReadyState=3D()=3D>{const{readyState:e}=3Dthis;"in= teractive"=3D=3De?this.pageIsInteractive():"complete"=3D=3De&&this.pageIsCo= mplete()},this.pageWillUnload=3D()=3D>{this.delegate.pageWillUnload()},this= .delegate=3De}start(){this.started||(this.stage=3D=3DPageStage.initial&&(th= is.stage=3DPageStage.loading),document.addEventListener("readystatechange",= this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnloa= d,!1),this.started=3D!0)}stop(){this.started&&(document.removeEventListener= ("readystatechange",this.interpretReadyState,!1),removeEventListener("pageh= ide",this.pageWillUnload,!1),this.started=3D!1)}pageIsInteractive(){this.st= age=3D=3DPageStage.loading&&(this.stage=3DPageStage.interactive,this.delega= te.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.= stage=3D=3DPageStage.interactive&&(this.stage=3DPageStage.complete,this.del= egate.pageLoaded())}get readyState(){return document.readyState}}class Scro= llObserver{constructor(e){this.started=3D!1,this.onScroll=3D()=3D>{this.upd= atePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=3De= }start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.on= Scroll(),this.started=3D!0)}stop(){this.started&&(removeEventListener("scro= ll",this.onScroll,!1),this.started=3D!1)}updatePosition(e){this.delegate.sc= rollPositionChanged(e)}}class StreamMessageRenderer{render({fragment:e}){Ba= rdo.preservingPermanentElements(this,getPermanentElementMapForFragment(e),(= ()=3D>document.documentElement.appendChild(e)))}enteringBardo(e,t){t.replac= eWith(e.cloneNode(!0))}leavingBardo(){}}function getPermanentElementMapForF= ragment(e){const t=3DqueryPermanentElementsAll(document.documentElement),s= =3D{};for(const i of t){const{id:t}=3Di;for(const r of e.querySelectorAll("= turbo-stream")){const e=3DgetPermanentElementById(r.templateElement.content= ,t);e&&(s[t]=3D[i,e])}}return s}class StreamObserver{constructor(e){this.so= urces=3Dnew Set,this.started=3D!1,this.inspectFetchResponse=3De=3D>{const t= =3DfetchResponseFromEvent(e);t&&fetchResponseIsStream(t)&&(e.preventDefault= (),this.receiveMessageResponse(t))},this.receiveMessageEvent=3De=3D>{this.s= tarted&&"string"=3D=3Dtypeof e.data&&this.receiveMessageHTML(e.data)},this.= delegate=3De}start(){this.started||(this.started=3D!0,addEventListener("tur= bo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.starte= d&&(this.started=3D!1,removeEventListener("turbo:before-fetch-response",thi= s.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConne= cted(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMess= ageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(t= his.sources.delete(e),e.removeEventListener("message",this.receiveMessageEv= ent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}async receiv= eMessageResponse(e){const t=3Dawait e.responseHTML;t&&this.receiveMessageHT= ML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(StreamM= essage.wrap(e))}}function fetchResponseFromEvent(e){var t;const s=3Dnull=3D= =3D=3D(t=3De.detail)||void 0=3D=3D=3Dt?void 0:t.fetchResponse;if(s instance= of FetchResponse)return s}function fetchResponseIsStream(e){var t;return(nu= ll!=3D=3D(t=3De.contentType)&&void 0!=3D=3Dt?t:"").startsWith(StreamMessage= .contentType)}class ErrorRenderer extends Renderer{static renderElement(e,t= ){const{documentElement:s,body:i}=3Ddocument;s.replaceChild(t,i)}async rend= er(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAnd= Body(){const{documentElement:e,head:t}=3Ddocument;e.replaceChild(this.newHe= ad,t),this.renderElement(this.currentElement,this.newElement)}activateScrip= tElements(){for(const e of this.scriptElements){const t=3De.parentNode;if(t= ){const s=3DactivateScriptElement(e);t.replaceChild(s,e)}}}get newHead(){re= turn this.newSnapshot.headSnapshot.element}get scriptElements(){return docu= ment.documentElement.querySelectorAll("script")}}class PageRenderer extends= Renderer{static renderElement(e,t){document.body&&t instanceof HTMLBodyEle= ment?document.body.replaceWith(t):document.documentElement.appendChild(t)}g= et shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElements= AreIdentical}get reloadReason(){return this.newSnapshot.isVisitable?this.tr= ackedElementsAreIdentical?void 0:{reason:"tracked_element_mismatch"}:{reaso= n:"turbo_visit_control_is_reload"}}async prepareToRender(){await this.merge= Head()}async render(){this.willRender&&this.replaceBody()}finishRendering()= {super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElemen= t()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get = newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){ret= urn this.newSnapshot.element}async mergeHead(){const e=3Dthis.copyNewHeadSt= ylesheetElements();this.copyNewHeadScriptElements(),this.removeCurrentHeadP= rovisionalElements(),this.copyNewHeadProvisionalElements(),await e}replaceB= ody(){this.preservingPermanentElements((()=3D>{this.activateNewBody(),this.= assignNewBody()}))}get trackedElementsAreIdentical(){return this.currentHea= dSnapshot.trackedElementSignature=3D=3Dthis.newHeadSnapshot.trackedElementS= ignature}async copyNewHeadStylesheetElements(){const e=3D[];for(const t of = this.newHeadStylesheetElements)e.push(waitForLoad(t)),document.head.appendC= hild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(const e of thi= s.newHeadScriptElements)document.head.appendChild(activateScriptElement(e))= }removeCurrentHeadProvisionalElements(){for(const e of this.currentHeadProv= isionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements= (){for(const e of this.newHeadProvisionalElements)document.head.appendChild= (e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewB= odyScriptElements()}activateNewBodyScriptElements(){for(const e of this.new= BodyScriptElements){const t=3DactivateScriptElement(e);e.replaceWith(t)}}as= signNewBody(){this.renderElement(this.currentElement,this.newElement)}get n= ewHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElement= sNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return= this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapsh= ot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.pr= ovisionalElements}get newHeadProvisionalElements(){return this.newHeadSnaps= hot.provisionalElements}get newBodyScriptElements(){return this.newElement.= querySelectorAll("script")}}class SnapshotCache{constructor(e){this.keys=3D= [],this.snapshots=3D{},this.size=3De}has(e){return toCacheKey(e)in this.sna= pshots}get(e){if(this.has(e)){const t=3Dthis.read(e);return this.touch(e),t= }}put(e,t){return this.write(e,t),this.touch(e),t}clear(){this.snapshots=3D= {}}read(e){return this.snapshots[toCacheKey(e)]}write(e,t){this.snapshots[t= oCacheKey(e)]=3Dt}touch(e){const t=3DtoCacheKey(e),s=3Dthis.keys.indexOf(t)= ;s>-1&&this.keys.splice(s,1),this.keys.unshift(t),this.trim()}trim(){for(co= nst e of this.keys.splice(this.size))delete this.snapshots[e]}}class PageVi= ew extends View{constructor(){super(...arguments),this.snapshotCache=3Dnew = SnapshotCache(10),this.lastRenderedLocation=3Dnew URL(location.href),this.f= orceReloaded=3D!1}renderPage(e,t=3D!1,s=3D!0,i){const r=3Dnew PageRenderer(= this.snapshot,e,PageRenderer.renderElement,t,s);return r.shouldRender?null= =3D=3Di||i.changeHistory():this.forceReloaded=3D!0,this.render(r)}renderErr= or(e,t){null=3D=3Dt||t.changeHistory();const s=3Dnew ErrorRenderer(this.sna= pshot,e,ErrorRenderer.renderElement,!1);return this.render(s)}clearSnapshot= Cache(){this.snapshotCache.clear()}async cacheSnapshot(e=3Dthis.snapshot){i= f(e.isCacheable){this.delegate.viewWillCacheSnapshot();const{lastRenderedLo= cation:t}=3Dthis;await nextEventLoopTick();const s=3De.clone();return this.= snapshotCache.put(t,s),s}}getCachedSnapshotForLocation(e){return this.snaps= hotCache.get(e)}get snapshot(){return PageSnapshot.fromElement(this.element= )}}class Preloader{constructor(e){this.selector=3D"a[data-turbo-preload]",t= his.delegate=3De}get snapshotCache(){return this.delegate.navigator.view.sn= apshotCache}start(){if("loading"=3D=3D=3Ddocument.readyState)return documen= t.addEventListener("DOMContentLoaded",(()=3D>{this.preloadOnLoadLinksForVie= w(document.body)}));this.preloadOnLoadLinksForView(document.body)}preloadOn= LoadLinksForView(e){for(const t of e.querySelectorAll(this.selector))this.p= reloadURL(t)}async preloadURL(e){const t=3Dnew URL(e.href);if(!this.snapsho= tCache.has(t))try{const e=3Dawait fetch(t.toString(),{headers:{"VND.PREFETC= H":"true",Accept:"text/html"}}),s=3Dawait e.text(),i=3DPageSnapshot.fromHTM= LString(s);this.snapshotCache.put(t,i)}catch(e){}}}class Session{constructo= r(){this.navigator=3Dnew Navigator(this),this.history=3Dnew History(this),t= his.preloader=3Dnew Preloader(this),this.view=3Dnew PageView(this,document.= documentElement),this.adapter=3Dnew BrowserAdapter(this),this.pageObserver= =3Dnew PageObserver(this),this.cacheObserver=3Dnew CacheObserver,this.linkC= lickObserver=3Dnew LinkClickObserver(this,window),this.formSubmitObserver= =3Dnew FormSubmitObserver(this,document),this.scrollObserver=3Dnew ScrollOb= server(this),this.streamObserver=3Dnew StreamObserver(this),this.formLinkCl= ickObserver=3Dnew FormLinkClickObserver(this,document.documentElement),this= .frameRedirector=3Dnew FrameRedirector(this,document.documentElement),this.= streamMessageRenderer=3Dnew StreamMessageRenderer,this.drive=3D!0,this.enab= led=3D!0,this.progressBarDelay=3D500,this.started=3D!1,this.formMode=3D"on"= }start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(= ),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.fo= rmSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.st= art(),this.frameRedirector.start(),this.history.start(),this.preloader.star= t(),this.started=3D!0,this.enabled=3D!0)}disable(){this.enabled=3D!1}stop()= {this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.for= mLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObse= rver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.fram= eRedirector.stop(),this.history.stop(),this.started=3D!1)}registerAdapter(e= ){this.adapter=3De}visit(e,t=3D{}){const s=3Dt.frame?document.getElementByI= d(t.frame):null;s instanceof FrameElement?(s.src=3De.toString(),s.loaded):t= his.navigator.proposeVisit(expandURL(e),t)}connectStreamSource(e){this.stre= amObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObse= rver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRen= derer.render(StreamMessage.wrap(e))}clearCache(){this.view.clearSnapshotCac= he()}setProgressBarDelay(e){this.progressBarDelay=3De}setFormMode(e){this.f= ormMode=3De}get location(){return this.history.location}get restorationIden= tifier(){return this.history.restorationIdentifier}historyPoppedToLocationW= ithRestorationIdentifier(e,t){this.enabled?this.navigator.startVisit(e,t,{a= ction:"restore",historyChanged:!0}):this.adapter.pageInvalidated({reason:"t= urbo_disabled"})}scrollPositionChanged(e){this.history.updateRestorationDat= a({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.element= IsNavigatable(e)&&locationIsVisitable(t,this.snapshot.rootLocation)}submitt= edFormLinkToLocation(){}willFollowLinkToLocation(e,t,s){return this.element= IsNavigatable(e)&&locationIsVisitable(t,this.snapshot.rootLocation)&&this.a= pplicationAllowsFollowingLinkToLocation(e,t,s)}followedLinkToLocation(e,t){= const s=3Dthis.getActionForLink(e),i=3De.hasAttribute("data-turbo-stream");= this.visit(t.href,{action:s,acceptsStreamResponse:i})}allowsVisitingLocatio= nWithAction(e,t){return this.locationWithActionIsSamePage(e,t)||this.applic= ationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){extendURLWithDe= precatedProperties(e),this.adapter.visitProposedToLocation(e,t)}visitStarte= d(e){e.acceptsStreamResponse||markAsBusy(document.documentElement),extendUR= LWithDeprecatedProperties(e.location),e.silent||this.notifyApplicationAfter= VisitingLocation(e.location,e.action)}visitCompleted(e){clearBusyState(docu= ment.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetric= s())}locationWithActionIsSamePage(e,t){return this.navigator.locationWithAc= tionIsSamePage(e,t)}visitScrolledToSamePageLocation(e,t){this.notifyApplica= tionAfterVisitingSamePageLocation(e,t)}willSubmitForm(e,t){const s=3DgetAct= ion(e,t);return this.submissionIsNavigatable(e,t)&&locationIsVisitable(expa= ndURL(s),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.subm= itForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=3Dthis.l= ocation,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.ass= umeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishCon= trolOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMes= sage(e)}viewWillCacheSnapshot(){var e;(null=3D=3D=3D(e=3Dthis.navigator.cur= rentVisit)||void 0=3D=3D=3De?void 0:e.silent)||this.notifyApplicationBefore= CachingSnapshot()}allowsImmediateRender({element:e},t){const s=3Dthis.notif= yApplicationBeforeRender(e,t),{defaultPrevented:i,detail:{render:r}}=3Ds;re= turn this.view.renderer&&r&&(this.view.renderer.renderElement=3Dr),!i}viewR= enderedSnapshot(e,t){this.view.lastRenderedLocation=3Dthis.history.location= ,this.notifyApplicationAfterRender()}preloadOnLoadLinksForView(e){this.prel= oader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInva= lidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRend= ered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFoll= owingLinkToLocation(e,t,s){return!this.notifyApplicationAfterClickingLinkTo= Location(e,t,s).defaultPrevented}applicationAllowsVisitingLocation(e){retur= n!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyAp= plicationAfterClickingLinkToLocation(e,t,s){return dispatch("turbo:click",{= target:e,detail:{url:t.href,originalEvent:s},cancelable:!0})}notifyApplicat= ionBeforeVisitingLocation(e){return dispatch("turbo:before-visit",{detail:{= url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){ret= urn dispatch("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicatio= nBeforeCachingSnapshot(){return dispatch("turbo:before-cache")}notifyApplic= ationBeforeRender(e,t){return dispatch("turbo:before-render",{detail:Object= .assign({newBody:e},t),cancelable:!0})}notifyApplicationAfterRender(){retur= n dispatch("turbo:render")}notifyApplicationAfterPageLoad(e=3D{}){return di= spatch("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyAppli= cationAfterVisitingSamePageLocation(e,t){dispatchEvent(new HashChangeEvent(= "hashchange",{oldURL:e.toString(),newURL:t.toString()}))}notifyApplicationA= fterFrameLoad(e){return dispatch("turbo:frame-load",{target:e})}notifyAppli= cationAfterFrameRender(e,t){return dispatch("turbo:frame-render",{detail:{f= etchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if("o= ff"=3D=3Dthis.formMode)return!1;{const s=3D!t||this.elementIsNavigatable(t)= ;return"optin"=3D=3Dthis.formMode?s&&null!=3De.closest('[data-turbo=3D"true= "]'):s&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){const t=3De.c= losest("[data-turbo]"),s=3De.closest("turbo-frame");return this.drive||s?!t= ||"false"!=3Dt.getAttribute("data-turbo"):!!t&&"true"=3D=3Dt.getAttribute("= data-turbo")}getActionForLink(e){const t=3De.getAttribute("data-turbo-actio= n");return isAction(t)?t:"advance"}get snapshot(){return this.view.snapshot= }}function extendURLWithDeprecatedProperties(e){Object.defineProperties(e,d= eprecatedLocationPropertyDescriptors)}const deprecatedLocationPropertyDescr= iptors=3D{absoluteURL:{get(){return this.toString()}}};class Cache{construc= tor(e){this.session=3De}clear(){this.session.clearCache()}resetCacheControl= (){this.setCacheControl("")}exemptPageFromCache(){this.setCacheControl("no-= cache")}exemptPageFromPreview(){this.setCacheControl("no-preview")}setCache= Control(e){setMetaContent("turbo-cache-control",e)}}const StreamActions=3D{= after(){this.targetElements.forEach((e=3D>{var t;return null=3D=3D=3D(t=3De= .parentElement)||void 0=3D=3D=3Dt?void 0:t.insertBefore(this.templateConten= t,e.nextSibling)}))},append(){this.removeDuplicateTargetChildren(),this.tar= getElements.forEach((e=3D>e.append(this.templateContent)))},before(){this.t= argetElements.forEach((e=3D>{var t;return null=3D=3D=3D(t=3De.parentElement= )||void 0=3D=3D=3Dt?void 0:t.insertBefore(this.templateContent,e)}))},prepe= nd(){this.removeDuplicateTargetChildren(),this.targetElements.forEach((e=3D= >e.prepend(this.templateContent)))},remove(){this.targetElements.forEach((e= =3D>e.remove()))},replace(){this.targetElements.forEach((e=3D>e.replaceWith= (this.templateContent)))},update(){this.targetElements.forEach((e=3D>e.repl= aceChildren(this.templateContent)))}},session=3Dnew Session,cache=3Dnew Cac= he(session),{navigator:navigator$1}=3Dsession;function start(){session.star= t()}function registerAdapter(e){session.registerAdapter(e)}function visit(e= ,t){session.visit(e,t)}function connectStreamSource(e){session.connectStrea= mSource(e)}function disconnectStreamSource(e){session.disconnectStreamSourc= e(e)}function renderStreamMessage(e){session.renderStreamMessage(e)}functio= n clearCache(){console.warn("Please replace `Turbo.clearCache()` with `Turb= o.cache.clear()`. The top-level function is deprecated and will be removed = in a future version of Turbo.`"),session.clearCache()}function setProgressB= arDelay(e){session.setProgressBarDelay(e)}function setConfirmMethod(e){Form= Submission.confirmMethod=3De}function setFormMode(e){session.setFormMode(e)= }var Turbo=3DObject.freeze({__proto__:null,navigator:navigator$1,session:se= ssion,cache:cache,PageRenderer:PageRenderer,PageSnapshot:PageSnapshot,Frame= Renderer:FrameRenderer,start:start,registerAdapter:registerAdapter,visit:vi= sit,connectStreamSource:connectStreamSource,disconnectStreamSource:disconne= ctStreamSource,renderStreamMessage:renderStreamMessage,clearCache:clearCach= e,setProgressBarDelay:setProgressBarDelay,setConfirmMethod:setConfirmMethod= ,setFormMode:setFormMode,StreamActions:StreamActions});class FrameControlle= r{constructor(e){this.fetchResponseLoaded=3De=3D>{},this.currentFetchReques= t=3Dnull,this.resolveVisitPromise=3D()=3D>{},this.connected=3D!1,this.hasBe= enLoaded=3D!1,this.ignoredAttributes=3Dnew Set,this.action=3Dnull,this.visi= tCachedSnapshot=3D({element:e})=3D>{const t=3De.querySelector("#"+this.elem= ent.id);t&&this.previousFrameElement&&t.replaceChildren(...this.previousFra= meElement.children),delete this.previousFrameElement},this.element=3De,this= .view=3Dnew FrameView(this,this.element),this.appearanceObserver=3Dnew Appe= aranceObserver(this,this.element),this.formLinkClickObserver=3Dnew FormLink= ClickObserver(this,this.element),this.linkInterceptor=3Dnew LinkInterceptor= (this,this.element),this.restorationIdentifier=3Duuid(),this.formSubmitObse= rver=3Dnew FormSubmitObserver(this,this.element)}connect(){this.connected||= (this.connected=3D!0,this.loadingStyle=3D=3DFrameLoadingStyle.lazy?this.app= earanceObserver.start():this.loadSourceURL(),this.formLinkClickObserver.sta= rt(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconne= ct(){this.connected&&(this.connected=3D!1,this.appearanceObserver.stop(),th= is.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmit= Observer.stop())}disabledChanged(){this.loadingStyle=3D=3DFrameLoadingStyle= .eager&&this.loadSourceURL()}sourceURLChanged(){this.isIgnoringChangesTo("s= rc")||(this.element.isConnected&&(this.complete=3D!1),(this.loadingStyle=3D= =3DFrameLoadingStyle.eager||this.hasBeenLoaded)&&this.loadSourceURL())}sour= ceURLReloaded(){const{src:e}=3Dthis.element;return this.ignoringChangesToAt= tribute("complete",(()=3D>{this.element.removeAttribute("complete")})),this= .element.src=3Dnull,this.element.src=3De,this.element.loaded}completeChange= d(){this.isIgnoringChangesTo("complete")||this.loadSourceURL()}loadingStyle= Changed(){this.loadingStyle=3D=3DFrameLoadingStyle.lazy?this.appearanceObse= rver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}async lo= adSourceURL(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&= (this.element.loaded=3Dthis.visit(expandURL(this.sourceURL)),this.appearanc= eObserver.stop(),await this.element.loaded,this.hasBeenLoaded=3D!0)}async l= oadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=3De.r= esponse.url);try{const t=3Dawait e.responseHTML;if(t){const{body:s}=3Dparse= HTMLDocument(t),i=3Dawait this.extractForeignFrameElement(s);if(i){const t= =3Dnew Snapshot(i),s=3Dnew FrameRenderer(this,this.view.snapshot,t,FrameRen= derer.renderElement,!1,!1);this.view.renderPromise&&await this.view.renderP= romise,this.changeHistory(),await this.view.render(s),this.complete=3D!0,se= ssion.frameRendered(e,this.element),session.frameLoaded(this.element),this.= fetchResponseLoaded(e)}else this.willHandleFrameMissingFromResponse(e)&&(co= nsole.warn(`A matching frame for #${this.element.id} was missing from the r= esponse, transforming into full-page Visit.`),this.visitResponse(e.response= ))}}catch(e){console.error(e),this.view.invalidate()}finally{this.fetchResp= onseLoaded=3D()=3D>{}}}elementAppearedInViewport(e){this.loadSourceURL()}wi= llSubmitFormLinkToLocation(e){return this.shouldInterceptNavigation(e)}subm= ittedFormLinkToLocation(e,t,s){const i=3Dthis.findFrameElement(e);i&&s.setA= ttribute("data-turbo-frame",i.id)}shouldInterceptLinkClick(e,t,s){return th= is.shouldInterceptNavigation(e)}linkClickIntercepted(e,t){this.navigateFram= e(e,t)}willSubmitForm(e,t){return e.closest("turbo-frame")=3D=3Dthis.elemen= t&&this.shouldInterceptNavigation(e,t)}formSubmitted(e,t){this.formSubmissi= on&&this.formSubmission.stop(),this.formSubmission=3Dnew FormSubmission(thi= s,e,t);const{fetchRequest:s}=3Dthis.formSubmission;this.prepareHeadersForRe= quest(s.headers,s),this.formSubmission.start()}prepareHeadersForRequest(e,t= ){var s;e["Turbo-Frame"]=3Dthis.id,(null=3D=3D=3D(s=3Dthis.currentNavigatio= nElement)||void 0=3D=3D=3Ds?void 0:s.hasAttribute("data-turbo-stream"))&&t.= acceptResponseType(StreamMessage.contentType)}requestStarted(e){markAsBusy(= this.element)}requestPreventedHandlingResponse(e,t){this.resolveVisitPromis= e()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this= .resolveVisitPromise()}async requestFailedWithResponse(e,t){console.error(t= ),await this.loadResponse(t),this.resolveVisitPromise()}requestErrored(e,t)= {console.error(t),this.resolveVisitPromise()}requestFinished(e){clearBusySt= ate(this.element)}formSubmissionStarted({formElement:e}){markAsBusy(e,this.= findFrameElement(e))}formSubmissionSucceededWithResponse(e,t){const s=3Dthi= s.findFrameElement(e.formElement,e.submitter);s.delegate.proposeVisitIfNavi= gatedWithAction(s,e.formElement,e.submitter),s.delegate.loadResponse(t)}for= mSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t)}fo= rmSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formEleme= nt:e}){clearBusyState(e,this.findFrameElement(e))}allowsImmediateRender({el= ement:e},t){const s=3Ddispatch("turbo:before-frame-render",{target:this.ele= ment,detail:Object.assign({newFrame:e},t),cancelable:!0}),{defaultPrevented= :i,detail:{render:r}}=3Ds;return this.view.renderer&&r&&(this.view.renderer= .renderElement=3Dr),!i}viewRenderedSnapshot(e,t){}preloadOnLoadLinksForView= (e){session.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame= (e,t){this.previousFrameElement=3De.cloneNode(!0)}async visit(e){var t;cons= t s=3Dnew FetchRequest(this,FetchMethod.get,e,new URLSearchParams,this.elem= ent);return null=3D=3D=3D(t=3Dthis.currentFetchRequest)||void 0=3D=3D=3Dt||= t.cancel(),this.currentFetchRequest=3Ds,new Promise((e=3D>{this.resolveVisi= tPromise=3D()=3D>{this.resolveVisitPromise=3D()=3D>{},this.currentFetchRequ= est=3Dnull,e()},s.perform()}))}navigateFrame(e,t,s){const i=3Dthis.findFram= eElement(e,s);this.pageSnapshot=3DPageSnapshot.fromElement(i).clone(),i.del= egate.proposeVisitIfNavigatedWithAction(i,e,s),this.withCurrentNavigationEl= ement(e,(()=3D>{i.src=3Dt}))}proposeVisitIfNavigatedWithAction(e,t,s){if(th= is.action=3DgetVisitAction(s,t,e),isAction(this.action)){const{visitCachedS= napshot:t}=3De.delegate;e.delegate.fetchResponseLoaded=3Ds=3D>{if(e.src){co= nst{statusCode:i,redirected:r}=3Ds,n=3D{response:{statusCode:i,redirected:r= ,responseHTML:e.ownerDocument.documentElement.outerHTML},visitCachedSnapsho= t:t,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationId= entifier,snapshot:this.pageSnapshot};this.action&&(n.action=3Dthis.action),= session.visit(e.src,n)}}}}changeHistory(){if(this.action){const e=3DgetHist= oryMethodForAction(this.action);session.history.update(e,expandURL(this.ele= ment.src||""),this.restorationIdentifier)}}willHandleFrameMissingFromRespon= se(e){this.element.setAttribute("complete","");const t=3De.response;return!= dispatch("turbo:frame-missing",{target:this.element,detail:{response:t,visi= t:async(e,t=3D{})=3D>{e instanceof Response?this.visitResponse(e):session.v= isit(e,t)}},cancelable:!0}).defaultPrevented}async visitResponse(e){const t= =3Dnew FetchResponse(e),s=3Dawait t.responseHTML,{location:i,redirected:r,s= tatusCode:n}=3Dt;return session.visit(i,{response:{redirected:r,statusCode:= n,responseHTML:s}})}findFrameElement(e,t){var s;return null!=3D=3D(s=3DgetF= rameElementById(getAttribute("data-turbo-frame",t,e)||this.element.getAttri= bute("target")))&&void 0!=3D=3Ds?s:this.element}async extractForeignFrameEl= ement(e){let t;const s=3DCSS.escape(this.id);try{if(t=3DactivateElement(e.q= uerySelector(`turbo-frame#${s}`),this.sourceURL),t)return t;if(t=3Dactivate= Element(e.querySelector(`turbo-frame[src][recurse~=3D${s}]`),this.sourceURL= ),t)return await t.loaded,await this.extractForeignFrameElement(t)}catch(e)= {return console.error(e),new FrameElement}return null}formActionIsVisitable= (e,t){return locationIsVisitable(expandURL(getAction(e,t)),this.rootLocatio= n)}shouldInterceptNavigation(e,t){const s=3DgetAttribute("data-turbo-frame"= ,t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&= &!this.formActionIsVisitable(e,t))return!1;if(!this.enabled||"_top"=3D=3Ds)= return!1;if(s){const e=3DgetFrameElementById(s);if(e)return!e.disabled}retu= rn!!session.elementIsNavigatable(e)&&!(t&&!session.elementIsNavigatable(t))= }get id(){return this.element.id}get enabled(){return!this.element.disabled= }get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(= e){this.ignoringChangesToAttribute("src",(()=3D>{this.element.src=3Dnull!= =3De?e:null}))}get loadingStyle(){return this.element.loading}get isLoading= (){return void 0!=3D=3Dthis.formSubmission||void 0!=3D=3Dthis.resolveVisitP= romise()}get complete(){return this.element.hasAttribute("complete")}set co= mplete(e){this.ignoringChangesToAttribute("complete",(()=3D>{e?this.element= .setAttribute("complete",""):this.element.removeAttribute("complete")}))}ge= t isActive(){return this.element.isActive&&this.connected}get rootLocation(= ){var e;const t=3Dthis.element.ownerDocument.querySelector('meta[name=3D"tu= rbo-root"]');return expandURL(null!=3D=3D(e=3Dnull=3D=3Dt?void 0:t.content)= &&void 0!=3D=3De?e:"/")}isIgnoringChangesTo(e){return this.ignoredAttribute= s.has(e)}ignoringChangesToAttribute(e,t){this.ignoredAttributes.add(e),t(),= this.ignoredAttributes.delete(e)}withCurrentNavigationElement(e,t){this.cur= rentNavigationElement=3De,t(),delete this.currentNavigationElement}}functio= n getFrameElementById(e){if(null!=3De){const t=3Ddocument.getElementById(e)= ;if(t instanceof FrameElement)return t}}function activateElement(e,t){if(e)= {const s=3De.getAttribute("src");if(null!=3Ds&&null!=3Dt&&urlsAreEqual(s,t)= )throw new Error(`Matching element has a sourc= e URL which references itself`);if(e.ownerDocument!=3D=3Ddocument&&(e=3Ddoc= ument.importNode(e,!0)),e instanceof FrameElement)return e.connectedCallbac= k(),e.disconnectedCallback(),e}}class StreamElement extends HTMLElement{sta= tic async renderElement(e){await e.performAction()}async connectedCallback(= ){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect= ()}}async render(){var e;return null!=3D=3D(e=3Dthis.renderPromise)&&void 0= !=3D=3De?e:this.renderPromise=3D(async()=3D>{const e=3Dthis.beforeRenderEve= nt;this.dispatchEvent(e)&&(await nextAnimationFrame(),await e.detail.render= (this))})()}disconnect(){try{this.remove()}catch(e){}}removeDuplicateTarget= Children(){this.duplicateChildren.forEach((e=3D>e.remove()))}get duplicateC= hildren(){var e;const t=3Dthis.targetElements.flatMap((e=3D>[...e.children]= )).filter((e=3D>!!e.id)),s=3D[...(null=3D=3D=3D(e=3Dthis.templateContent)||= void 0=3D=3D=3De?void 0:e.children)||[]].filter((e=3D>!!e.id)).map((e=3D>e.= id));return t.filter((e=3D>s.includes(e.id)))}get performAction(){if(this.a= ction){const e=3DStreamActions[this.action];if(e)return e;this.raise("unkno= wn action")}this.raise("action attribute is missing")}get targetElements(){= return this.target?this.targetElementsById:this.targets?this.targetElements= ByQuery:void this.raise("target or targets attribute is missing")}get templ= ateContent(){return this.templateElement.content.cloneNode(!0)}get template= Element(){if(null=3D=3D=3Dthis.firstElementChild){const e=3Dthis.ownerDocum= ent.createElement("template");return this.appendChild(e),e}if(this.firstEle= mentChild instanceof HTMLTemplateElement)return this.firstElementChild;this= .raise("first child element must be a