1(()=>{var Ec=Object.defineProperty;var _e=(s,e)=>()=>(s&&(e=s(s=0)),e);var Os=(s,e)=>{for(var t in e)Ec(s,t,{get:e[t],enumerable:!0})};var Be,js=_e(()=>{Be={logger:typeof console<"u"?console:void 0,WebSocket:typeof WebSocket<"u"?WebSocket:void 0}});var M,Ct=_e(()=>{js();M={log(...s){this.enabled&&(s.push(Date.now()),Be.logger.log("[ActionCable]",...s))}}});var Qt,Ks,Jt,Us,bi=_e(()=>{Ct();Qt=()=>new Date().getTime(),Ks=s=>(Qt()-s)/1e3,Jt=class{constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=Qt(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),M.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=Qt(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),M.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordMessage(){this.pingedAt=Qt()}recordConnect(){this.reconnectAttempts=0,delete this.disconnectedAt,M.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=Qt(),M.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){let{staleThreshold:e,reconnectionBackoffRate:t}=this.constructor,r=Math.pow(1+t,Math.min(this.reconnectAttempts,10)),n=(this.reconnectAttempts===0?1:t)*Math.random();return e*1e3*r*(1+n)}reconnectIfStale(){this.connectionIsStale()&&(M.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${Ks(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?M.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${Ks(this.disconnectedAt)} s`):(M.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return Ks(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&Ks(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout(()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(M.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}};Jt.staleThreshold=6;Jt.reconnectionBackoffRate=.15;Us=Jt});var Zt,vi=_e(()=>{Zt={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]}});var es,Ei,Nl,Co,ts,zs,yi=_e(()=>{js();bi();vi();Ct();({message_types:es,protocols:Ei}=Zt),Nl=Ei.slice(0,Ei.length-1),Co=[].indexOf,ts=class{constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new Us(this),this.disconnected=!0}send(e){return this.isOpen()?(this.webSocket.send(JSON.stringify(e)),!0):!1}open(){if(this.isActive())return M.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{let e=[...Ei,...this.consumer.subprotocols||[]];return M.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${e}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new Be.WebSocket(this.consumer.url,e),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:e}={allowReconnect:!0}){if(e||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(M.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(e){M.log("Failed to reopen WebSocket",e)}finally{M.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}
1getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return Co.call(Nl,this.getProtocol())>=0}isState(...e){return Co.call(e,this.getState())>=0}getState(){if(this.webSocket){for(let e in Be.WebSocket)if(Be.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){let t=this.events[e].bind(this);this.webSocket[`on${e}`]=t}}uninstallEventHandlers(){for(let e in this.events)this.webSocket[`on${e}`]=function(){}}};ts.reopenDelay=500;ts.prototype.events={message(s){if(!this.isProtocolSupported())return;let{identifier:e,message:t,reason:r,reconnect:i,type:n}=JSON.parse(s.data);switch(this.monitor.recordMessage(),n){case es.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case es.disconnect:return M.log(`Disconnecting. Reason: ${r}`),this.close({allowReconnect:i});case es.ping:return null;case es.confirmation:return this.subscriptions.confirmSubscription(e),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(e,"connected",{reconnected:!0})):this.subscriptions.notify(e,"connected",{reconnected:!1});case es.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",t)}},open(){if(M.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return M.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(s){if(M.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){M.log("WebSocket onerror event")}};zs=ts});var Rl,et,_i=_e(()=>{Rl=function(s,e){if(e!=null)for(let t in e){let r=e[t];s[t]=r}return s},et=class{constructor(e,t={},r){this.consumer=e,this.identifier=JSON.stringify(t),Rl(this,r)}perform(e,t={}){return t.action=e,this.send(t)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}});var wi,Ys,Ai=_e(()=>{Ct();wi=class{constructor(e){this.subscriptions=e,this.pendingSubscriptions=[]}guarantee(e){this.pendingSubscriptions.indexOf(e)==-1?(M.log(`SubscriptionGuarantor guaranteeing ${e.identifier}`),this.pendingSubscriptions.push(e)):M.log(`SubscriptionGuarantor already guaranteeing ${e.identifier}`),this.startGuaranteeing()}forget(e){M.log(`SubscriptionGuarantor forgetting ${e.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(t=>t!==e)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map(e=>{M.log(`SubscriptionGuarantor resubscribing ${e.identifier}`),this.subscriptions.subscribe(e)})},500)}},Ys=wi});var tt,Si=_e(()=>{_i();Ai();Ct();tt=class{constructor(e){this.consumer=e,this.guarantor=new Ys(this),this.subscriptions=[]}create(e,t){let r=e,i=typeof r=="object"?r:{channel:r},n=new et(this.consumer,i,t);return this.add(n)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.subscribe(e),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map(t=>(this.forget(t),this.notify(t,"rejected"),t))}forget(e){return this.guarantor.forget(e),this.subscriptions=this.subscriptions.filter(t=>t!==e),e}findAll(e){return this.subscriptions.filter(t=>t.identifier===e)}reload(){return this.subscriptions.map(e=>this.subscribe(e))}notifyAll(e,...t){return this.subscriptions.map(r=>this.notify(r,e,...t))}notify(e,t,...r){let i;return typeof e=="string"?i=this.findAll(e):i=[e],i.map(n=>typeof n[t]=="function"?n[t](...r):void 0)}subscribe(e){this.sendCommand(e,"subscribe")&&this.guarantor.guarantee(e)}confirmSubscription(e){M.log(`Subscription confirmed ${e}`),this.findAll(e).map(t=>this.guarantor.forget(t))}sendCommand(e,t){let{identifier:r}=e;return this.consumer.send({command:t,identifier:r})}}});
1function Ti(s){if(typeof s=="function"&&(s=s()),s&&!/^wss?:/i.test(s)){let e=document.createElement("a");return e.href=s,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}else return s}var Ot,Oo=_e(()=>{yi();Si();Ot=class{constructor(e){this._url=e,this.subscriptions=new tt(this),this.connection=new zs(this),this.subprotocols=[]}get url(){return Ti(this._url)}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(e){this.subprotocols=[...this.subprotocols,e]}}});var Mo={};Os(Mo,{Connection:()=>zs,ConnectionMonitor:()=>Us,Consumer:()=>Ot,INTERNAL:()=>Zt,Subscription:()=>et,SubscriptionGuarantor:()=>Ys,Subscriptions:()=>tt,adapters:()=>Be,createConsumer:()=>Pl,createWebSocketURL:()=>Ti,getConfig:()=>Lo,logger:()=>M});function Pl(s=Lo("url")||Zt.default_mount_path){return new Ot(s)}function Lo(s){let e=document.head.querySelector(`meta[name='action-cable-${s}']`);if(e)return e.getAttribute("content")}var No=_e(()=>{yi();bi();Oo();vi();_i();Si();Ai();js();Ct()});var gi={};Os(gi,{FetchEnctype:()=>Ie,FetchMethod:()=>ae,FetchRequest:()=>$e,FetchResponse:()=>wt,FrameElement:()=>he,FrameLoadingStyle:()=>Qe,FrameRenderer:()=>St,PageRenderer:()=>Tt,PageSnapshot:()=>le,StreamActions:()=>pi,StreamElement:()=>Vs,StreamSourceElement:()=>Hs,cache:()=>bo,clearCache:()=>wo,config:()=>Y,connectStreamSource:()=>Gt,disconnectStreamSource:()=>Xt,fetch:()=>di,fetchEnctypeFromString:()=>uo,fetchMethodFromString:()=>qs,isSafe:()=>Ws,navigator:()=>vo,registerAdapter:()=>Eo,renderStreamMessage:()=>_o,session:()=>B,setConfirmMethod:()=>So,setFormMode:()=>To,setProgressBarDelay:()=>Ao,start:()=>mi,visit:()=>yo});(function(s){if(typeof s.requestSubmit=="function")return;s.requestSubmit=function(r){r?(e(r,this),r.click()):(r=document.createElement("input"),r.type="submit",r.hidden=!0,this.appendChild(r),r.click(),this.removeChild(r))};function e(r,i){r instanceof HTMLElement||t(TypeError,"parameter 1 is not of type 'HTMLElement'"),r.type=="submit"||t(TypeError,"The specified element is not a submit button"),r.form==i||t(DOMException,"The specified element is not owned by this form element","NotFoundError")}function t(r,i,n){throw new r("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+i+".",n)}})(HTMLFormElement.prototype);var Zn=new WeakMap;function yc(s){let e=s instanceof Element?s:s instanceof Node?s.parentElement:null,t=e?e.closest("input, button"):null;return t?.type=="submit"?t:null}function _c(s){let e=yc(s.target);e&&e.form&&Zn.set(e.form,e)}(function(){if("submitter"in Event.prototype)return;let s=window.Event.prototype;if("SubmitEvent"in window){let e=window.SubmitEvent.prototype;if(/Apple Computer/.test(navigator.vendor)&&!("submitter"in e))s=e;else return}addEventListener("click",_c,!0),Object.defineProperty(s,"submitter",{get(){if(this.type=="submit"&&this.target instanceof HTMLFormElement)return Zn.get(this.target)}})})();var Qe={eager:"eager",lazy:"lazy"},he=class s extends HTMLElement{static delegateConstructor=void 0;loaded=Promise.resolve();static get observedAttributes(){return["disabled","loading","src"]}constructor(){super(),this.delegate=new s.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){e=="loading"?this.delegate.loadingStyleChanged():e=="src"?this.delegate.sourceURLChanged():e=="disabled"&&this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get refresh(){return this.getAttribute("refresh")}set refresh(e){e?this.setAttribute("refresh",e):this.removeAttribute("refresh")}get shouldReloadWithMorph(){return this.src&&this.refresh==="morph"}get loading(){return wc(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){return this.ownerDocument?.documentElement?.hasAttribute("data-turbo-preview")}};function wc(s){switch(s.toLowerCase()){case"lazy":return Qe.lazy;default:return Qe.eager}}var Ac={enabled:!0,progressBarDelay:500,unvisitableExtensions:new Set([".7z",".aac",".apk",".avi",".bmp",".bz2",".css",".csv",".deb",".dmg",".doc",".docx",".exe",".gif",".gz",".heic",".heif",".ico",".iso",".jpeg",".jpg",".js",".json",".m4a",".mkv",".mov",".mp3",".mp4",".mpeg",".mpg",".msi",".ogg",".ogv",".pdf",".pkg",".png",".ppt",".pptx",".rar",".rtf",".svg",".tar",".tif",".tiff",".txt",".wav",".webm",".webp",".wma",".wmv",".xls",".xlsx",".xml",".zip"])};function Ut(s){if(s.getAttribute("data-turbo-eval")=="false")return s;{let e=document.createElement("script"),t=no();return t&&(e.nonce=t),e.textContent=s.textContent,e.async=!1,Sc(e,s),e}}function Sc(s,e){for(let{name:t,value:r}of e.attributes)s.setAttribute(t,r)}function Tc(s){let e=document.createElement("template");return e.innerHTML=s,e.content}
1function $(s,{target:e,cancelable:t,detail:r}={}){let i=new CustomEvent(s,{cancelable:t,bubbles:!0,composed:!0,detail:r});return e&&e.isConnected?e.dispatchEvent(i):document.documentElement.dispatchEvent(i),i}function Un(s){s.preventDefault(),s.stopImmediatePropagation()}function Kt(){return document.visibilityState==="hidden"?to():eo()}function eo(){return new Promise(s=>requestAnimationFrame(()=>s()))}function to(){return new Promise(s=>setTimeout(()=>s(),0))}function Cc(){return Promise.resolve()}function so(s=""){return new DOMParser().parseFromString(s,"text/html")}function ro(s,...e){let t=Oc(s,e).replace(/^\n/,"").split(` 2`),r=t[0].match(/^\s+/),i=r?r[0].length:0;return t.map(n=>n.slice(i)).join(` 3`)}function Oc(s,e){return s.reduce((t,r,i)=>{let n=e[i]==null?"":e[i];return t+r+n},"")}function xe(){return Array.from({length:36}).map((s,e)=>e==8||e==13||e==18||e==23?"-":e==14?"4":e==19?(Math.floor(Math.random()*4)+8).toString(16):Math.floor(Math.random()*15).toString(16)).join("")}function Ns(s,...e){for(let t of e.map(r=>r?.getAttribute(s)))if(typeof t=="string")return t;return null}function Lc(s,...e){return e.some(t=>t&&t.hasAttribute(s))}function Rs(...s){for(let e of s)e.localName=="turbo-frame"&&e.setAttribute("busy",""),e.setAttribute("aria-busy","true")}function Ps(...s){for(let e of s)e.localName=="turbo-frame"&&e.removeAttribute("busy"),e.removeAttribute("aria-busy")}function Mc(s,e=2e3){return new Promise(t=>{let r=()=>{s.removeEventListener("error",r),s.removeEventListener("load",r),t()};s.addEventListener("load",r,{once:!0}),s.addEventListener("error",r,{once:!0}),setTimeout(t,e)})}function io(s){switch(s){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function Nc(s){return s=="advance"||s=="replace"||s=="restore"}function Je(...s){let e=Ns("data-turbo-action",...s);return Nc(e)?e:null}function li(s){return document.querySelector(`meta[name="${s}"]`)}function Ds(s){let e=li(s);return e&&e.content}function no(){let s=li("csp-nonce");if(s){let{nonce:e,content:t}=s;return e==""?t:e}}
3function Rc(s,e){let t=li(s);return t||(t=document.createElement("meta"),t.setAttribute("name",s),document.head.appendChild(t)),t.setAttribute("content",e),t}function yt(s,e){if(s instanceof Element)return s.closest(e)||yt(s.assignedSlot||s.getRootNode()?.host,e)}function hi(s){return!!s&&s.closest("[inert], :disabled, [hidden], details:not([open]), dialog:not([open])")==null&&typeof s.focus=="function"}function oo(s){return Array.from(s.querySelectorAll("[autofocus]")).find(hi)}async function Pc(s,e){let t=e();s(),await eo();let r=e();return[t,r]}function ao(s){if(s==="_blank")return!1;if(s){for(let e of document.getElementsByName(s))if(e instanceof HTMLIFrameElement)return!1;return!0}else return!0}function co(s){return yt(s,"a[href]:not([target^=_]):not([download])")}function lo(s){return Q(s.getAttribute("href")||"")}function Dc(s,e){let t=null;return(...r)=>{let i=()=>s.apply(this,r);clearTimeout(t),t=setTimeout(i,e)}}var kc={"aria-disabled":{beforeSubmit:s=>{s.setAttribute("aria-disabled","true"),s.addEventListener("click",Un)},afterSubmit:s=>{s.removeAttribute("aria-disabled"),s.removeEventListener("click",Un)}},disabled:{beforeSubmit:s=>s.disabled=!0,afterSubmit:s=>s.disabled=!1}},Pr=class{#e=null;constructor(e){Object.assign(this,e)}get submitter(){return this.#e}set submitter(e){this.#e=kc[e]||e}},Ic=new Pr({mode:"on",submitter:"disabled"}),Y={drive:Ac,forms:Ic};function Q(s){return new URL(s.toString(),document.baseURI)}function Ze(s){let e;if(s.hash)return s.hash.slice(1);if(e=s.href.match(/#(.*)$/))return e[1]}function ui(s,e){let t=e?.getAttribute("formaction")||s.getAttribute("action")||s.action;return Q(t)}function xc(s){return(Vc(s).match(/\.[^.]*$/)||[])[0]||""}function $c(s,e){let t=Hc(e);return s.href===Q(t).href||s.href.startsWith(t)}function ke(s,e){return $c(s,e)&&!Y.drive.unvisitableExtensions.has(xc(s))}function Dr(s){let e=Ze(s);return e!=null?s.href.slice(0,-(e.length+1)):s.href}function Ls(s){return Dr(s)}function Fc(s,e){return Q(s).href==Q(e).href}function Bc(s){return s.pathname.split("/").slice(1)}function Vc(s){return Bc(s).slice(-1)[0]}function Hc(s){return qc(s.origin+s.pathname)}function qc(s){return s.endsWith("/")?s:s+"/"}var wt=class{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return Q(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}},kr=class extends Set{constructor(e){super(),this.maxSize=e}add(e){if(this.size>=this.maxSize){let r=this.values().next().value;this.delete(r)}super.add(e)}},ho=new kr(20),Wc=window.fetch;function di(s,e={}){let t=new Headers(e.headers||{}),r=xe();return ho.add(r),t.append("X-Turbo-Request-Id",r),Wc(s,{...e,headers:t})}function qs(s){switch(s.toLowerCase()){case"get":return ae.get;case"post":return ae.post;case"put":return ae.put;case"patch":return ae.patch;case"delete":return ae.delete}}var ae={get:"get",post:"post",put:"put",patch:"patch",delete:"delete"};function uo(s){switch(s.toLowerCase()){case Ie.multipart:return Ie.multipart;case Ie.plain:return Ie.plain;default:return Ie.urlEncoded}}var Ie={urlEncoded:"application/x-www-form-urlencoded",multipart:"multipart/form-data",plain:"text/plain"},$e=class{abortController=new AbortController;#e=e=>{};constructor(e,t,r,i=new URLSearchParams,n=null,o=Ie.urlEncoded){let[a,u]=zn(Q(r),t,i,o);this.delegate=e,this.url=a,this.target=n,this.fetchOptions={credentials:"same-origin",redirect:"follow",method:t.toUpperCase(),headers:{...this.defaultHeaders},body:u,signal:this.abortSignal,referrer:this.delegate.referrer?.href},this.enctype=o}get method(){return this.fetchOptions.method}set method(e){let t=this.isSafe?this.url.searchParams:this.fetchOptions.body||new FormData,r=qs(e)||ae.get;this.url.search="";let[i,n]=zn(this.url,r,t,this.enctype);this.url=i,this.fetchOptions.body=n,this.fetchOptions.method=r.toUpperCase()}get headers(){return this.fetchOptions.headers}set headers(e){this.fetchOptions.headers=e}get body(){return this.isSafe?this.url.searchParams:this.fetchOptions.body}set body(e){this.fetchOptions.body=e}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){let{fetchOptions:e}=this;this.delegate.prepareRequest(this);let t=await this.#t(e);try{this.delegate.requestStarted(this),t.detail.fetchRequest?this.response=t.detail.fetchRequest.response:this.response=di(this.url.href,e);let r=await this.response;return await this.receive(r)}catch(r){if(r.name!=="AbortError")throw this.#s(r)&&this.delegate.requestErrored(this,r),r}finally{this.delegate.requestFinished(this)}}async receive(e){let t=new wt(e);return $("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}
3get isSafe(){return Ws(this.method)}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async#t(e){let t=new Promise(i=>this.#e=i),r=$("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.#e},target:this.target});return this.url=r.detail.url,r.defaultPrevented&&await t,r}#s(e){return!$("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}};function Ws(s){return qs(s)==ae.get}function zn(s,e,t,r){let i=Array.from(t).length>0?new URLSearchParams(fo(t)):s.searchParams;return Ws(e)?[jc(s,i),null]:r==Ie.urlEncoded?[s,i]:[s,t]}function fo(s){let e=[];for(let[t,r]of s)r instanceof File||e.push([t,r]);return e}function jc(s,e){let t=new URLSearchParams(fo(e));return s.search=t.toString(),s}var Ir=class{started=!1;constructor(e,t){this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}intersect=e=>{e.slice(-1)[0]?.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)}},Fe=class{static contentType="text/vnd.turbo-stream.html";static wrap(e){return typeof e=="string"?new this(Tc(e)):e}constructor(e){this.fragment=Kc(e)}};function Kc(s){for(let e of s.querySelectorAll("turbo-stream")){let t=document.importNode(e,!0);for(let r of t.templateElement.content.querySelectorAll("script"))r.replaceWith(Ut(r));e.replaceWith(t)}return s}var Uc=100,xr=class{#e=null;#t=null;get(e){if(this.#t&&this.#t.url===e&&this.#t.expire>Date.now())return this.#t.request}setLater(e,t,r){this.clear(),this.#e=setTimeout(()=>{t.perform(),this.set(e,t,r),this.#e=null},Uc)}set(e,t,r){this.#t={url:e,request:t,expire:new Date(new Date().getTime()+r)}}clear(){this.#e&&clearTimeout(this.#e),this.#t=null}},zc=10*1e3,Et=new xr,vt={initialized:"initialized",requesting:"requesting",waiting:"waiting",receiving:"receiving",stopping:"stopping",stopped:"stopped"},ks=class s{state=vt.initialized;static confirmMethod(e){return Promise.resolve(confirm(e))}constructor(e,t,r,i=!1){let n=Zc(t,r),o=Jc(Qc(t,r),n),a=Yc(t,r),u=el(t,r);this.delegate=e,this.formElement=t,this.submitter=r,this.fetchRequest=new $e(this,n,o,a,t,u),this.mustRedirect=i}get method(){return this.fetchRequest.method}set method(e){this.fetchRequest.method=e}get action(){return this.fetchRequest.url.toString()}set action(e){this.fetchRequest.url=Q(e)}get body(){return this.fetchRequest.body}get enctype(){return this.fetchRequest.enctype}get isSafe(){return this.fetchRequest.isSafe}get location(){return this.fetchRequest.url}async start(){let{initialized:e,requesting:t}=vt,r=Ns("data-turbo-confirm",this.submitter,this.formElement);if(!(typeof r=="string"&&!await(typeof Y.forms.confirm=="function"?Y.forms.confirm:s.confirmMethod)(r,this.formElement,this.submitter))&&this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){let{stopping:e,stopped:t}=vt;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){let t=Gc(Ds("csrf-param"))||Ds("csrf-token");t&&(e.headers["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(Fe.contentType)}requestStarted(e){this.state=vt.waiting,this.submitter&&Y.forms.submitter.beforeSubmit(this.submitter),this.setSubmitsWith(),Rs(this.formElement),$("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){Et.clear(),this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError){this.delegate.formSubmissionFailedWithResponse(this,t);return}if(Et.clear(),this.requestMustRedirect(e)&&Xc(t)){let r=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,r)}else this.state=vt.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){this.state=vt.stopped,this.submitter&&Y.forms.submitter.afterSubmit(this.submitter),this.resetSubmitterText(),Ps(this.formElement),$("turbo:submit-end",{target:this.formElement,detail
3:{formSubmission:this,...this.result}}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(!(!this.submitter||!this.submitsWith)){if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){let e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}}resetSubmitterText(){if(!(!this.submitter||!this.originalSubmitText)){if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){let e=this.submitter;e.value=this.originalSubmitText}}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||Lc("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){return this.submitter?.getAttribute("data-turbo-submits-with")}};function Yc(s,e){let t=new FormData(s),r=e?.getAttribute("name"),i=e?.getAttribute("value");return r&&t.append(r,i||""),t}function Gc(s){if(s!=null){let t=(document.cookie?document.cookie.split("; "):[]).find(r=>r.startsWith(s));if(t){let r=t.split("=").slice(1).join("=");return r?decodeURIComponent(r):void 0}}}function Xc(s){return s.statusCode==200&&!s.redirected}function Qc(s,e){let t=typeof s.action=="string"?s.action:null;return e?.hasAttribute("formaction")?e.getAttribute("formaction")||"":s.getAttribute("action")||t||""}function Jc(s,e){let t=Q(s);return Ws(e)&&(t.search=""),t}function Zc(s,e){let t=e?.getAttribute("formmethod")||s.getAttribute("method")||"";return qs(t.toLowerCase())||ae.get}function el(s,e){return uo(e?.getAttribute("formenctype")||s.enctype)}var At=class{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return this.getElementForAnchor(e)!=null}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return oo(this.element)}get permanentElements(){return po(this.element)}getPermanentElementById(e){return mo(this.element,e)}getPermanentElementMapForSnapshot(e){let t={};for(let r of this.permanentElements){let{id:i}=r,n=e.getPermanentElementById(i);n&&(t[i]=[r,n])}return t}};function mo(s,e){return s.querySelector(`#${e}[data-turbo-permanent]`)}function po(s){return s.querySelectorAll("[id][data-turbo-permanent]")}var zt=class{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)};submitBubbled=e=>{if(!e.defaultPrevented){let t=e.target instanceof HTMLFormElement?e.target:void 0,r=e.submitter||void 0;t&&tl(t,r)&&sl(t,r)&&this.delegate.willSubmitForm(t,r)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(t,r))}}};function tl(s,e){return(e?.getAttribute("formmethod")||s.getAttribute("method"))!="dialog"}function sl(s,e){let t=e?.getAttribute("formtarget")||s.getAttribute("target");return ao(t)}var Is=class{#e=e=>{};#t=e=>{};constructor(e,t){this.delegate=e,this.element=t}scrollToAnchor(e){let t=this.snapshot.getElementForAnchor(e);t?(this.scrollToElement(t),this.focusElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(Ze(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){let{isPreview:t,shouldRender:r,willRender:i,newSnapshot:n}=e,o=i;if(r)try{this.renderPromise=new Promise(d=>this.#e=d),this.renderer=e,await this.prepareToRenderSnapshot(e);let a=new Promise(d=>this.#t=d),u={resume:this.#t,render:this.renderer.renderElement,renderMethod:this.renderer.renderMethod};this.delegate.allowsImmediateRender(n,u)||await a,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(n,t,this.renderer.renderMethod),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.#e(void 0),delete this.renderPromise}else o&&this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}markVisitDirection(e){this.element.setAttribute("data-turbo-visit-direction",e)}unmarkVisitDirection(){this.element.removeAttribute("data-turbo-visit-direction")}
3async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}},$r=class extends Is{missing(){this.element.innerHTML='<strong class="turbo-frame-error">Content missing</strong>'}get snapshot(){return new At(this.element)}},xs=class{constructor(e,t){this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}clickBubbled=e=>{this.clickEventIsSignificant(e)?this.clickEvent=e:delete this.clickEvent};linkClicked=e=>{this.clickEvent&&this.clickEventIsSignificant(e)&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent};willVisit=e=>{delete this.clickEvent};clickEventIsSignificant(e){let t=e.composed?e.target?.parentElement:e.target,r=co(t)||t;return r instanceof Element&&r.closest("turbo-frame, html")==this.element}},$s=class{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)};clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){let t=e.composedPath&&e.composedPath()[0]||e.target,r=co(t);if(r&&ao(r.target)){let i=lo(r);this.delegate.willFollowLinkToLocation(r,i,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(r,i))}}};clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}},Fs=class{constructor(e,t){this.delegate=e,this.linkInterceptor=new $s(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}canPrefetchRequestToLocation(e,t){return!1}prefetchAndCacheRequestToLocation(e,t){}willFollowLinkToLocation(e,t,r){return this.delegate.willSubmitFormLinkToLocation(e,t,r)&&(e.hasAttribute("data-turbo-method")||e.hasAttribute("data-turbo-stream"))}followedLinkToLocation(e,t){let r=document.createElement("form"),i="hidden";for(let[y,v]of t.searchParams)r.append(Object.assign(document.createElement("input"),{type:i,name:y,value:v}));let n=Object.assign(t,{search:""});r.setAttribute("data-turbo","true"),r.setAttribute("action",n.href),r.setAttribute("hidden","");let o=e.getAttribute("data-turbo-method");o&&r.setAttribute("method",o);let a=e.getAttribute("data-turbo-frame");a&&r.setAttribute("data-turbo-frame",a);let u=Je(e);u&&r.setAttribute("data-turbo-action",u);let m=e.getAttribute("data-turbo-confirm");m&&r.setAttribute("data-turbo-confirm",m),e.hasAttribute("data-turbo-stream")&&r.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,r),document.body.appendChild(r),r.addEventListener("turbo:submit-end",()=>r.remove(),{once:!0}),requestAnimationFrame(()=>r.requestSubmit())}},Bs=class{static async preservingPermanentElements(e,t,r){let i=new this(e,t);i.enter(),await r(),i.leave()}constructor(e,t){this.delegate=e,this.permanentElementMap=t}enter(){for(let e in this.permanentElementMap){let[t,r]=this.permanentElementMap[e];this.delegate.enteringBardo(t,r),this.replaceNewPermanentElementWithPlaceholder(r)}}leave(){for(let e in this.permanentElementMap){let[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){let t=rl(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){let t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){this.getPlaceholderById(e.id)?.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(t=>t.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}};function rl(s){let e=document.createElement("meta");return e.setAttribute("name","turbo-permanent-placeholder"),e.setAttribute("content",s.id),e}var Yt=class{#e=null;static renderElement(e,t){}
3constructor(e,t,r,i=!0){this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=r,this.willRender=i,this.renderElement=this.constructor.renderElement,this.promise=new Promise((n,o)=>this.resolvingFunctions={resolve:n,reject:o})}get shouldRender(){return!0}get shouldAutofocus(){return!0}get reloadReason(){}prepareToRender(){}render(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await Bs.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){if(this.shouldAutofocus){let e=this.connectedSnapshot.firstAutofocusableElement;e&&e.focus()}}enteringBardo(e){this.#e||e.contains(this.currentSnapshot.activeElement)&&(this.#e=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.#e)&&this.#e instanceof HTMLElement&&(this.#e.focus(),this.#e=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get renderMethod(){return"replace"}},St=class extends Yt{static renderElement(e,t){let r=document.createRange();r.selectNodeContents(e),r.deleteContents();let i=t,n=i.ownerDocument?.createRange();n&&(n.selectNodeContents(i),e.appendChild(n.extractContents()))}constructor(e,t,r,i,n,o=!0){super(t,r,i,n,o),this.delegate=e}get shouldRender(){return!0}async render(){await Kt(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await Kt(),this.focusFirstAutofocusableElement(),await Kt(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){let e=this.currentElement.firstElementChild,t=il(this.currentElement.getAttribute("data-autoscroll-block"),"end"),r=nl(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(e)return e.scrollIntoView({block:t,behavior:r}),!0}return!1}activateScriptElements(){for(let e of this.newScriptElements){let t=Ut(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}};function il(s,e){return s=="end"||s=="start"||s=="center"||s=="nearest"?s:e}function nl(s,e){return s=="auto"||s=="smooth"?s:e}var ol=function(){let s=new Set,e={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:v,afterNodeAdded:v,beforeNodeMorphed:v,afterNodeMorphed:v,beforeNodeRemoved:v,afterNodeRemoved:v,beforeAttributeUpdated:v},head:{style:"merge",shouldPreserve:function(c){return c.getAttribute("im-preserve")==="true"},shouldReAppend:function(c){return c.getAttribute("im-re-append")==="true"},shouldRemove:v,afterHeadMorphed:v}};function t(c,l,h={}){c instanceof Document&&(c=c.documentElement),typeof l=="string"&&(l=T(l));let p=O(l),g=C(c,p,h);return r(c,p,g)}function r(c,l,h){if(h.head.block){let p=c.querySelector("head"),g=l.querySelector("head");if(p&&g){let b=y(g,p,h);Promise.all(b).then(function(){r(c,l,Object.assign(h,{head:{block:!1,ignore:!0}}))});return}}if(h.morphStyle==="innerHTML")return o(l,c,h),c.children;if(h.morphStyle==="outerHTML"||h.morphStyle==null){let p=P(l,c,h),g=p?.previousSibling,b=p?.nextSibling,A=n(c,p,h);return p?L(g,A,b):[]}else throw"Do not understand how to morph style "+h.morphStyle}function i(c,l){return l.ignoreActiveValue&&c===document.activeElement&&c!==document.body}function n(c,l,h){if(!(h.ignoreActive&&c===document.activeElement))return l==null?h.callbacks.beforeNodeRemoved(c)===!1?c:(c.remove(),h.callbacks.afterNodeRemoved(c),null):S(c,l)?(h.callbacks.beforeNodeMorphed(c,l)===!1||(c instanceof HTMLHeadElement&&h.head.ignore||(c instanceof HTMLHeadElement&&h.head.style!=="morph"?y(l,c,h):(u(l,c,h),i(c,h)||o(l,c,h))),h.callbacks.afterNodeMorphed(c,l)),c):h.callbacks.beforeNodeRemoved(c)===!1||h.callbacks.beforeNodeAdded(l)===!1?c:(c.parentElement.replaceChild(l,c),h.callbacks.afterNodeAdded(l),h.callbacks.afterNodeRemoved(c),l)}function o(c,l,h){let p=c.firstChild,g=l.firstChild,b;for(;p;){if(b=p,p=b.nextSibling,g==null){if(h.callbacks.beforeNodeAdded(b)===!1)return;l.appendChild(b),h.callbacks.afterNodeAdded(b),z(h,b);continue}if(w(b,g,h)){n(g,b,h),g=g.nextSibling,z(h,b);continue}let A=I(c,l,b,g,h);if(A){g=N(g,A,h),n(A,b,h),z(h,b);continue}let D=x(c,l,b,g,h);
3if(D){g=N(g,D,h),n(D,b,h),z(h,b);continue}if(h.callbacks.beforeNodeAdded(b)===!1)return;l.insertBefore(b,g),h.callbacks.afterNodeAdded(b),z(h,b)}for(;g!==null;){let A=g;g=g.nextSibling,H(A,h)}}function a(c,l,h,p){return c==="value"&&p.ignoreActiveValue&&l===document.activeElement?!0:p.callbacks.beforeAttributeUpdated(c,l,h)===!1}function u(c,l,h){let p=c.nodeType;if(p===1){let g=c.attributes,b=l.attributes;for(let A of g)a(A.name,l,"update",h)||l.getAttribute(A.name)!==A.value&&l.setAttribute(A.name,A.value);for(let A=b.length-1;0<=A;A--){let D=b[A];a(D.name,l,"remove",h)||c.hasAttribute(D.name)||l.removeAttribute(D.name)}}(p===8||p===3)&&l.nodeValue!==c.nodeValue&&(l.nodeValue=c.nodeValue),i(l,h)||d(c,l,h)}function m(c,l,h,p){if(c[h]!==l[h]){let g=a(h,l,"update",p);g||(l[h]=c[h]),c[h]?g||l.setAttribute(h,c[h]):a(h,l,"remove",p)||l.removeAttribute(h)}}function d(c,l,h){if(c instanceof HTMLInputElement&&l instanceof HTMLInputElement&&c.type!=="file"){let p=c.value,g=l.value;m(c,l,"checked",h),m(c,l,"disabled",h),c.hasAttribute("value")?p!==g&&(a("value",l,"update",h)||(l.setAttribute("value",p),l.value=p)):a("value",l,"remove",h)||(l.value="",l.removeAttribute("value"))}else if(c instanceof HTMLOptionElement)m(c,l,"selected",h);else if(c instanceof HTMLTextAreaElement&&l instanceof HTMLTextAreaElement){let p=c.value,g=l.value;if(a("value",l,"update",h))return;p!==g&&(l.value=p),l.firstChild&&l.firstChild.nodeValue!==p&&(l.firstChild.nodeValue=p)}}function y(c,l,h){let p=[],g=[],b=[],A=[],D=h.head.style,re=new Map;for(let R of c.children)re.set(R.outerHTML,R);for(let R of l.children){let ie=re.has(R.outerHTML),oe=h.head.shouldReAppend(R),Ye=h.head.shouldPreserve(R);ie||Ye?oe?g.push(R):(re.delete(R.outerHTML),b.push(R)):D==="append"?oe&&(g.push(R),A.push(R)):h.head.shouldRemove(R)!==!1&&g.push(R)}A.push(...re.values());let be=[];for(let R of A){let ie=document.createRange().createContextualFragment(R.outerHTML).firstChild;if(h.callbacks.beforeNodeAdded(ie)!==!1){if(ie.href||ie.src){let oe=null,Ye=new Promise(function(Mr){oe=Mr});ie.addEventListener("load",function(){oe()}),be.push(Ye)}l.appendChild(ie),h.callbacks.afterNodeAdded(ie),p.push(ie)}}for(let R of g)h.callbacks.beforeNodeRemoved(R)!==!1&&(l.removeChild(R),h.callbacks.afterNodeRemoved(R));return h.head.afterHeadMorphed(l,{added:p,kept:b,removed:g}),be}function v(){}function _(c){let l={};return Object.assign(l,e),Object.assign(l,c),l.callbacks={},Object.assign(l.callbacks,e.callbacks),Object.assign(l.callbacks,c.callbacks),l.head={},Object.assign(l.head,e.head),Object.assign(l.head,c.head),l}function C(c,l,h){return h=_(h),{target:c,newContent:l,config:h,morphStyle:h.morphStyle,ignoreActive:h.ignoreActive,ignoreActiveValue:h.ignoreActiveValue,idMap:Ae(c,l),deadIds:new Set,callbacks:h.callbacks,head:h.head}}function w(c,l,h){return c==null||l==null?!1:c.nodeType===l.nodeType&&c.tagName===l.tagName?c.id!==""&&c.id===l.id?!0:W(h,c,l)>0:!1}function S(c,l){return c==null||l==null?!1:c.nodeType===l.nodeType&&c.tagName===l.tagName}function N(c,l,h){for(;c!==l;){let p=c;c=c.nextSibling,H(p,h)}return z(h,l),l.nextSibling}function I(c,l,h,p,g){let b=W(g,h,l),A=null;if(b>0){let D=p,re=0;for(;D!=null;){if(w(h,D,g))return D;if(re+=W(g,D,c),re>b)return null;D=D.nextSibling}}return A}function x(c,l,h,p,g){let b=p,A=h.nextSibling,D=0;for(;b!=null;){if(W(g,b,c)>0)return null;if(S(h,b))return b;if(S(A,b)&&(D++,A=A.nextSibling,D>=2))return null;b=b.nextSibling}return b}function T(c){let l=new DOMParser,h=c.replace(/<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,"");if(h.match(/<\/html>/)||h.match(/<\/head>/)||h.match(/<\/body>/)){let p=l.parseFromString(c,"text/html");if(h.match(/<\/html>/))return p.generatedByIdiomorph=!0,p;{let g=p.firstChild;return g?(g.generatedByIdiomorph=!0,g):null}}else{let g=l.parseFromString("<body><template>"+c+"</template></body>","text/html").body.querySelector("template").content;return g.generatedByIdiomorph=!0,g}}
3function O(c){if(c==null)return document.createElement("div");if(c.generatedByIdiomorph)return c;if(c instanceof Node){let l=document.createElement("div");return l.append(c),l}else{let l=document.createElement("div");for(let h of[...c])l.append(h);return l}}function L(c,l,h){let p=[],g=[];for(;c!=null;)p.push(c),c=c.previousSibling;for(;p.length>0;){let b=p.pop();g.push(b),l.parentElement.insertBefore(b,l)}for(g.push(l);h!=null;)p.push(h),g.push(h),h=h.nextSibling;for(;p.length>0;)l.parentElement.insertBefore(p.pop(),l.nextSibling);return g}function P(c,l,h){let p;p=c.firstChild;let g=p,b=0;for(;p;){let A=U(p,l,h);A>b&&(g=p,b=A),p=p.nextSibling}return g}function U(c,l,h){return S(c,l)?.5+W(h,c,l):0}function H(c,l){z(l,c),l.callbacks.beforeNodeRemoved(c)!==!1&&(c.remove(),l.callbacks.afterNodeRemoved(c))}function q(c,l){return!c.deadIds.has(l)}function X(c,l,h){return(c.idMap.get(h)||s).has(l)}function z(c,l){let h=c.idMap.get(l)||s;for(let p of h)c.deadIds.add(p)}function W(c,l,h){let p=c.idMap.get(l)||s,g=0;for(let b of p)q(c,b)&&X(c,b,h)&&++g;return g}function ye(c,l){let h=c.parentElement,p=c.querySelectorAll("[id]");for(let g of p){let b=g;for(;b!==h&&b!=null;){let A=l.get(b);A==null&&(A=new Set,l.set(b,A)),A.add(g.id),b=b.parentElement}}}function Ae(c,l){let h=new Map;return ye(c,h),ye(l,h),h}return{morph:t,defaults:e}}();function fi(s,e,{callbacks:t,...r}={}){ol.morph(s,e,{...r,callbacks:new Fr(t)})}function go(s,e){fi(s,e.children,{morphStyle:"innerHTML"})}var Fr=class{#e;constructor({beforeNodeMorphed:e}={}){this.#e=e||(()=>!0)}beforeNodeAdded=e=>!(e.id&&e.hasAttribute("data-turbo-permanent")&&document.getElementById(e.id));beforeNodeMorphed=(e,t)=>{if(e instanceof Element)return!e.hasAttribute("data-turbo-permanent")&&this.#e(e,t)?!$("turbo:before-morph-element",{cancelable:!0,target:e,detail:{currentElement:e,newElement:t}}).defaultPrevented:!1};beforeAttributeUpdated=(e,t,r)=>!$("turbo:before-morph-attribute",{cancelable:!0,target:t,detail:{attributeName:e,mutationType:r}}).defaultPrevented;beforeNodeRemoved=e=>this.beforeNodeMorphed(e);afterNodeMorphed=(e,t)=>{e instanceof Element&&$("turbo:morph-element",{target:e,detail:{currentElement:e,newElement:t}})}},Br=class extends St{static renderElement(e,t){$("turbo:before-frame-morph",{target:e,detail:{currentElement:e,newElement:t}}),go(e,t)}async preservingPermanentElements(e){return await e()}},Vr=class s{static animationDuration=300;static get defaultCSS(){return ro` 4 .turbo-progress-bar { 5 position: fixed; 6 display: block; 7 top: 0; 8 left: 0; 9 height: 3px; 10 background: #0076ff; 11 z-index: 2147483647; 12 transition: 13 width ${s.animationDuration}ms ease-out, 14 opacity ${s.animationDuration/2}ms ${s.animationDuration/2}ms ease-in; 15 transform: translate3d(0, 0, 0); 16 } 17 `}hiding=!1;value=0;visible=!1;constructor(){this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,s.animationDuration*1.5)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,s.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}trickle=()=>{this.setValue(this.value+Math.random()/100)};refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+this.value*90}%`})}createStylesheetElement(){let e=document.createElement("style");e.type="text/css",e.textContent=s.defaultCSS;let t=no();return t&&(e.nonce=t),e}createProgressElement(){let e=document.createElement("div");return e.className="turbo-progress-bar",e}},Hr=class extends At{detailsByOuterHTML=this.children.filter(e=>!hl(e)).map(e=>fl(e)).reduce((e,t)=>
17{let{outerHTML:r}=t,i=r in e?e[r]:{type:al(t),tracked:cl(t),elements:[]};return{...e,[r]:{...i,elements:[...i.elements,t]}}},{});get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter(r=>!(r in t.detailsByOuterHTML)).map(r=>this.detailsByOuterHTML[r]).filter(({type:r})=>r==e).map(({elements:[r]})=>r)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,t)=>{let{type:r,tracked:i,elements:n}=this.detailsByOuterHTML[t];return r==null&&!i?[...e,...n]:n.length>1?[...e,...n.slice(1)]:e},[])}getMetaValue(e){let t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((t,r)=>{let{elements:[i]}=this.detailsByOuterHTML[r];return dl(i,e)?i:t},void 0|void 0)}};function al(s){if(ll(s))return"script";if(ul(s))return"stylesheet"}function cl(s){return s.getAttribute("data-turbo-track")=="reload"}function ll(s){return s.localName=="script"}function hl(s){return s.localName=="noscript"}function ul(s){let e=s.localName;return e=="style"||e=="link"&&s.getAttribute("rel")=="stylesheet"}function dl(s,e){return s.localName=="meta"&&s.getAttribute("name")==e}function fl(s){return s.hasAttribute("nonce")&&s.setAttribute("nonce",""),s}var le=class s extends At{static fromHTMLString(e=""){return this.fromDocument(so(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({documentElement:e,body:t,head:r}){return new this(e,t,new Hr(r))}constructor(e,t,r){super(t),this.documentElement=e,this.headSnapshot=r}clone(){let e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),r=e.querySelectorAll("select");for(let[i,n]of t.entries()){let o=r[i];for(let a of o.selectedOptions)a.selected=!1;for(let a of n.selectedOptions)o.options[a.index].selected=!0}for(let i of e.querySelectorAll('input[type="password"]'))i.value="";return new s(this.documentElement,e,this.headSnapshot)}get lang(){return this.documentElement.getAttribute("lang")}get headElement(){return this.headSnapshot.element}get rootLocation(){let e=this.getSetting("root")??"/";return Q(e)}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return this.cacheControlValue!="no-preview"}get isCacheable(){return this.cacheControlValue!="no-cache"}get isVisitable(){return this.getSetting("visit-control")!="reload"}get prefersViewTransitions(){return this.headSnapshot.getMetaValue("view-transition")==="same-origin"}get shouldMorphPage(){return this.getSetting("refresh-method")==="morph"}get shouldPreserveScrollPosition(){return this.getSetting("refresh-scroll")==="preserve"}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}},qr=class{#e=!1;#t=Promise.resolve();renderChange(e,t){return e&&this.viewTransitionsAvailable&&!this.#e?(this.#e=!0,this.#t=this.#t.then(async()=>{await document.startViewTransition(t).finished})):this.#t=this.#t.then(t),this.#t}get viewTransitionsAvailable(){return document.startViewTransition}},ml={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1},Ms={visitStart:"visitStart",requestStart:"requestStart",requestEnd:"requestEnd",visitEnd:"visitEnd"},Se={initialized:"initialized",started:"started",canceled:"canceled",failed:"failed",completed:"completed"},_t={networkFailure:0,timeoutFailure:-1,contentTypeMismatch:-2},pl={advance:"forward",restore:"back",replace:"none"},Wr=class{identifier=xe();timingMetrics={};followedRedirect=!1;historyChanged=!1;scrolled=!1;shouldCacheSnapshot=!0;acceptsStreamResponse=!1;snapshotCached=!1;state=Se.initialized;viewTransitioner=new qr;constructor(e,t,r,i={}){this.delegate=e,this.location=t,this.restorationIdentifier=r||xe();let{action:n,historyChanged:o,referrer:a,snapshot:u,snapshotHTML:m,response:d,visitCachedSnapshot:y,willRender:v,updateHistory:_,shouldCacheSnapshot:C,acceptsStreamResponse:w,direction:S}={...ml,...i};this.action=n,this.historyChanged=o,this.referrer=a,this.snapshot=u,this.snapshotHTML=m,this.response=d,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.isPageRefresh=this.view.isPageRefresh(this),this.visitCachedSnapshot=y,this.willRender=v,this.updateHistory=_,this.scrolled=!v,this.shouldCacheSnapshot=C,this.acceptsStreamResponse=w,this.direction=S||pl[n]}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==Se.initialized&&(this.recordTimingMetric(Ms.visitStart),this.state=Se.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==Se.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=Se.canceled)}complete(){this.state==Se.started&&(this.recordTimingMetric(Ms.visitEnd),this.adapter.visitCompleted(this),this.state=Se.completed,this.followRedirect(),this.followedRedirect||this.delegate.visitCompleted(this))}fail(){this.state==Se.started&&(this.state=Se.failed,this.adapter.visitFailed(this),this.delegate.visitCompleted(this))}changeHistory(){if(!this.historyChanged&&this.updateHistory){let e=this.location.href===this.referrer?.href?"replace":this.action,t=io(e);this.history.update(t,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new $e(this,ae.get,this.location),this.request.perform())}
17simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(Ms.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){let{statusCode:t}=e;Yn(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(Ms.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){let{statusCode:e,responseHTML:t}=this.response;this.render(async()=>{if(this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,Yn(e)&&t!=null){let r=le.fromHTMLString(t);await this.renderPageSnapshot(r,!1),this.adapter.visitRendered(this),this.complete()}else await this.view.renderError(le.fromHTMLString(t),this),this.adapter.visitRendered(this),this.fail()})}}getCachedSnapshot(){let e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!Ze(this.location)||e.hasAnchor(Ze(this.location)))&&(this.action=="restore"||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return le.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return this.getCachedSnapshot()!=null}loadCachedSnapshot(){let e=this.getCachedSnapshot();if(e){let t=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isSamePage||this.isPageRefresh?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.renderPageSnapshot(e,t),this.adapter.visitRendered(this),t||this.complete())})}}followRedirect(){this.redirectedToLocation&&!this.followedRedirect&&this.response?.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(async()=>{this.cacheSnapshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendered(this)})}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(Fe.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){let r=await t.responseHTML,{redirected:i,statusCode:n}=t;r==null?this.recordResponse({statusCode:_t.contentTypeMismatch,redirected:i}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:n,responseHTML:r,redirected:i}))}async requestFailedWithResponse(e,t){let r=await t.responseHTML,{redirected:i,statusCode:n}=t;r==null?this.recordResponse({statusCode:_t.contentTypeMismatch,redirected:i}):this.recordResponse({statusCode:n,responseHTML:r,redirected:i})}requestErrored(e,t){this.recordResponse({statusCode:_t.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){!this.scrolled&&!this.view.forceReloaded&&!this.view.shouldPreserveScrollPosition(this)&&(this.action=="restore"?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){let{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){let e=Ze(this.location);if(e!=null)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=new Date().getTime()}getTimingMetrics(){return{...this.timingMetrics}}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return typeof this.response=="object"}shouldIssueRequest(){return this.isSamePage?!1:this.action=="restore"?!this.hasCachedSnapshot():this.willRender}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise(t=>{this.frame=document.visibilityState==="hidden"?setTimeout(()=>t(),0):requestAnimationFrame(()=>t())}),await e(),delete this.frame}async renderPageSnapshot(e,t){await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(e),async()=>{await this.view.renderPage(e,t,this.willRender,this),this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}};function Yn(s){return s>=200&&s<300}var jr=class{progressBar=new Vr;constructor(e){this.session=e}visitProposedToLocation(e,t){ke(e,this.navigator.rootLocation)?this.navigator.startVisit(e,t?.restorationIdentifier||xe(),t):window.location.href=e.toString()}visitStarted(e){this.location=e.location,e.loadCachedSnapshot(),e.issueRequest(),e.goToSamePageAnchor()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||e.action!="restore"?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,t){switch(t){case _t.networkFailure:case _t.timeoutFailure:case _t.contentTypeMismatch:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){}visitCompleted(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}pageInvalidated(e){this.reload(e)}visitFailed(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitRendered(e){}
17formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),this.visitProgressBarTimeout!=null&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){this.formProgressBarTimeout==null&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),this.formProgressBarTimeout!=null&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}showProgressBar=()=>{this.progressBar.show()};reload(e){$("turbo:reload",{detail:e}),window.location.href=this.location?.toString()||window.location.href}get navigator(){return this.session.navigator}},Kr=class{selector="[data-turbo-temporary]";deprecatedSelector="[data-turbo-cache=false]";started=!1;start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}removeTemporaryElements=e=>{for(let t of this.temporaryElements)t.remove()};get temporaryElements(){return[...document.querySelectorAll(this.selector),...this.temporaryElementsWithDeprecation]}get temporaryElementsWithDeprecation(){let e=document.querySelectorAll(this.deprecatedSelector);return e.length&&console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`),[...e]}},Ur=class{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new xs(this,t),this.formSubmitObserver=new zt(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,r){return this.#t(e)}linkClickIntercepted(e,t,r){let i=this.#s(e);i&&i.delegate.linkClickIntercepted(e,t,r)}willSubmitForm(e,t){return e.closest("turbo-frame")==null&&this.#e(e,t)&&this.#t(e,t)}formSubmitted(e,t){let r=this.#s(e,t);r&&r.delegate.formSubmitted(e,t)}#e(e,t){let r=ui(e,t),i=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),n=Q(i?.content??"/");return this.#t(e,t)&&ke(r,n)}#t(e,t){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)){let i=this.#s(e,t);return i?i!=e.closest("turbo-frame"):!1}else return!1}#s(e,t){let r=t?.getAttribute("data-turbo-frame")||e.getAttribute("data-turbo-frame");if(r&&r!="_top"){let i=this.element.querySelector(`#${r}:not([disabled])`);if(i instanceof he)return i}}},zr=class{location;restorationIdentifier=xe();restorationData={};started=!1;pageLoaded=!1;currentIndex=0;constructor(e){this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.currentIndex=history.state?.turbo?.restorationIndex||0,this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,r=xe()){e===history.pushState&&++this.currentIndex;let i={turbo:{restorationIdentifier:r,restorationIndex:this.currentIndex}};e.call(history,i,"",t.href),this.location=t,this.restorationIdentifier=r}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){let{restorationIdentifier:t}=this,r=this.restorationData[t];this.restorationData[t]={...r,...e}}assumeControlOfScrollRestoration(){this.previousScrollRestoration||(this.previousScrollRestoration=history.scrollRestoration??"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}onPopState=e=>{if(this.shouldHandlePopState()){let{turbo:t}=e.state||{};if(t){this.location=new URL(window.location.href);let{restorationIdentifier:r,restorationIndex:i}=t;this.restorationIdentifier=r;let n=i>this.currentIndex?"forward":"back";this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location,r,n),this.currentIndex=i}}};onPageLoad=async e=>{await Cc(),this.pageLoaded=!0};shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||document.readyState=="complete"}},Yr=class{started=!1;#e=null;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.readyState==="loading"?this.eventTarget.addEventListener("DOMContentLoaded",this.#t,{once:!0}):this.#t())}stop(){this.started&&(this.eventTarget.removeEventListener("mouseenter",this.#s,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("mouseleave",this.#n,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("turbo:before-fetch-request",this.#i,!0),this.started=!1)}#t=()=>{this.eventTarget.addEventListener("mouseenter",this.#s,{capture:!0,passive:!0}),this.eventTarget.addEventListener("mouseleave",this.#n,{capture:!0,passive:!0}),this.eventTarget.addEventListener("turbo:before-fetch-request",this.#i,!0),this.started=!0};#s=e=>{if(Ds("turbo-prefetch")==="false")return;let t=e.target;if(t.matches&&t.matches("a[href]:not([target^=_]):not([download])")&&this.#c(t)){let i=t,n=lo(i);if(this.delegate.canPrefetchRequestToLocation(i,n)){this.#e=i;let o=new $e(this,ae.get,n,new URLSearchParams,t);Et.setLater(n.toString(),o,this.#r)}}};#n=e=>{e.target===this.#e&&this.#o()};#o=()=>{Et.clear(),this.#e=null};#i=e=>{if(e.target.tagName!=="FORM"&&e.detail.fetchOptions.method==="GET"){let t=Et.get(e.detail.url.toString());t&&(e.detail.fetchRequest=t),Et.clear()}};prepareRequest(e){let t=e.target;e.headers["X-Sec-Purpose"]="prefetch";let r=t.closest("turbo-frame"),i=t.getAttribute("data-turbo-frame")||r?.getAttribute("target")||r?.id;i&&i!=="_top"&&(e.headers["Turbo-Frame"]=i)}requestSucceededWithResponse(){}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}get#r(){return Number(Ds("turbo-prefetch-cache-time"))||zc}#c(e){return!(!e.getAttribute("href")||gl(e)||bl(e)||vl(e)||El(e)||_l(e))}},gl=s=>s.origin!==document.location.origin||!["http:","https:"].includes(s.protocol)||s.hasAttribute("target"),bl=s=>s.pathname+s.search===document.location.pathname+document.location.search||s.href.startsWith("#"),vl=s=>{if(s.getAttribute("data-turbo-prefetch")==="false"||s.getAttribute("data-turbo")==="false")return!0;let e=yt(s,"[data-turbo-prefetch]");return!!(e&&e.getAttribute("data-turbo-prefetch")==="false")},El=s=>{let e=s.getAttribute("data-turbo-method");return!!(e&&e.toLowerCase()!=="get"||yl(s)||s.hasAttribute("data-turbo-confirm")||s.hasAttribute("data-turbo-stream"))},yl=s=>s.hasAttribute("data-remote")||s.hasAttribute("data-behavior")||s.hasAttribute("data-confirm")||s.hasAttribute("data-method"),_l=s=>$("turbo:before-prefetch",{target:s,cancelable:!0}).defaultPrevented,Gr=class{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&this.delegate.visitProposedToLocation(e,t)}startVisit(e,t,r={}){this.stop(),this.currentVisit=new Wr(this,Q(e),t,{referrer:this.location,...r}),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new ks(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get rootLocation(){return this.view.snapshot.rootLocation}get history(){return this.delegate.history}formSubmissionStarted(e){typeof this.adapter.formSubmissionStarted=="function"&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){let r=await t.responseHTML;if(r){let i=e.isSafe;i||this.view.clearSnapshotCache();let{statusCode:n,redirected:o}=t,u={action:this.#e(e,t),shouldCacheSnapshot:i,response:{statusCode:n,responseHTML:r,redirected:o}};this.proposeVisit(t.location,u)}}}async formSubmissionFailedWithResponse(e,t){let r=await t.responseHTML;if(r){let i=le.fromHTMLString(r);t.serverError?await this.view.renderError(i,this.currentVisit):await this.view.renderPage(i,!1,!0,this.currentVisit),i.shouldPreserveScrollPosition||this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){typeof this.adapter.formSubmissionFinished=="function"&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e),delete this.currentVisit}locationWithActionIsSamePage(e,t){let r=Ze(e),i=Ze(this.view.lastRenderedLocation),n=t==="restore"&&typeof r>"u";return t!=="replace"&&Dr(e)===Dr(this.view.lastRenderedLocation)&&(n||r!=null&&r!==i)}visitScrolledToSamePageLocation(e,t){this.delegate.visitScrolledToSamePageLocation(e,t)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}#e(e,t){let{submitter:r,formElement:i}=e;return Je(r,i)||this.#t(t)}#t(e){return e.redirected&&e.location.href===this.location?.href?"replace":"advance"}},Xe={initial:0,loading:1,interactive:2,complete:3},Xr=class{stage=Xe.initial;started=!1;constructor(e){this.delegate=e}start(){this.started||(this.stage==Xe.initial&&(this.stage=Xe.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}interpretReadyState=()=>{let{readyState:e}=this;
17e=="interactive"?this.pageIsInteractive():e=="complete"&&this.pageIsComplete()};pageIsInteractive(){this.stage==Xe.loading&&(this.stage=Xe.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==Xe.interactive&&(this.stage=Xe.complete,this.delegate.pageLoaded())}pageWillUnload=()=>{this.delegate.pageWillUnload()};get readyState(){return document.readyState}},Qr=class{started=!1;constructor(e){this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})};updatePosition(e){this.delegate.scrollPositionChanged(e)}},Jr=class{render({fragment:e}){Bs.preservingPermanentElements(this,wl(e),()=>{Al(e,()=>{Sl(()=>{document.documentElement.appendChild(e)})})})}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}};function wl(s){let e=po(document.documentElement),t={};for(let r of e){let{id:i}=r;for(let n of s.querySelectorAll("turbo-stream")){let o=mo(n.templateElement.content,i);
17o&&(t[i]=[r,o])}}return t}async function Al(s,e){let t=`turbo-stream-autofocus-${xe()}`,r=s.querySelectorAll("turbo-stream"),i=Tl(r),n=null;if(i&&(i.id?n=i.id:n=t,i.id=n),e(),await Kt(),(document.activeElement==null||document.activeElement==document.body)&&n){let a=document.getElementById(n);hi(a)&&a.focus(),a&&a.id==t&&a.removeAttribute("id")}}async function Sl(s){let[e,t]=await Pc(s,()=>document.activeElement),r=e&&e.id;if(r){let i=document.getElementById(r);hi(i)&&i!=t&&i.focus()}}function Tl(s){for(let e of s){let t=oo(e.templateElement.content);if(t)return t}return null}var Zr=class{sources=new Set;#e=!1;constructor(e){this.delegate=e}start(){this.#e||(this.#e=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.#e&&(this.#e=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}inspectFetchResponse=e=>{let t=Cl(e);t&&Ol(t)&&(e.preventDefault(),this.receiveMessageResponse(t))};receiveMessageEvent=e=>{this.#e&&typeof e.data=="string"&&this.receiveMessageHTML(e.data)};async receiveMessageResponse(e){let t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(Fe.wrap(e))}};function Cl(s){let e=s.detail?.fetchResponse;if(e instanceof wt)return e}function Ol(s){return(s.contentType??"").startsWith(Fe.contentType)}var ei=class extends Yt{static renderElement(e,t){let{documentElement:r,body:i}=document;r.replaceChild(t,i)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){let{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(let e of this.scriptElements){let t=e.parentNode;if(t){let r=Ut(e);t.replaceChild(r,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}},Tt=class extends Yt{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){if(!this.newSnapshot.isVisitable)return{reason:"turbo_visit_control_is_reload"};if(!this.trackedElementsAreIdentical)return{reason:"tracked_element_mismatch"}}async prepareToRender(){this.#e(),await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}#e(){let{documentElement:e}=this.currentSnapshot,{lang:t}=this.newSnapshot;t?e.setAttribute("lang",t):e.removeAttribute("lang")}async mergeHead(){let e=this.mergeProvisionalElements(),t=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await t,this.willRender&&this.removeUnusedDynamicStylesheetElements()}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){let e=[];for(let t of this.newHeadStylesheetElements)e.push(Mc(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(let e of this.newHeadScriptElements)document.head.appendChild(Ut(e))}removeUnusedDynamicStylesheetElements(){for(let e of this.unusedDynamicStylesheetElements)document.head.removeChild(e)}async mergeProvisionalElements(){let e=[...this.newHeadProvisionalElements];for(let t of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(t,e)||document.head.removeChild(t);for(let t of e)document.head.appendChild(t)}isCurrentElementInElementList(e,t){for(let[r,i]of t.entries()){if(e.tagName=="TITLE"){if(i.tagName!="TITLE")continue;if(e.innerHTML==i.innerHTML)return t.splice(r,1),!0}if(i.isEqualNode(e))return t.splice(r,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(let e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(let e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(let e of this.newBodyScriptElements){let t=Ut(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get unusedDynamicStylesheetElements(){return this.oldHeadStylesheetElements.filter(e=>e.getAttribute("data-turbo-track")==="dynamic")}get oldHeadStylesheetElements(){return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}},ti=class extends Tt{static renderElement(e,t){fi(e,t,{callbacks:{beforeNodeMorphed:r=>!Gn(r)}});for(let r of e.querySelectorAll("turbo-frame"))Gn(r)&&r.reload();$("turbo:morph",{detail:{currentElement:e,newElement:t}})}async preservingPermanentElements(e){return await e()}get renderMethod(){return"morph"}get shouldAutofocus(){return!1}};function Gn(s){return s instanceof he&&s.src&&s.refresh==="morph"&&!s.closest("[data-turbo-permanent]")}var si=class{keys=[];snapshots={};constructor(e){this.size=e}has(e){return Ls(e)in this.snapshots}get(e){if(this.has(e)){let t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){this.snapshots={}}read(e){return this.snapshots[Ls(e)]}write(e,t){this.snapshots[Ls(e)]=t}touch(e){let t=Ls(e),r=this.keys.indexOf(t);r>-1&&this.keys.splice(r,1),this.keys.unshift(t),this.trim()}trim(){for(let e of this.keys.splice(this.size))delete this.snapshots[e]}},ri=class extends Is{snapshotCache=new si(10);lastRenderedLocation=new URL(location.href);forceReloaded=!1;shouldTransitionTo(e){return this.snapshot.prefersViewTransitions&&e.prefersViewTransitions}renderPage(e,t=!1,r=!0,i){let o=this.isPageRefresh(i)&&this.snapshot.shouldMorphPage?ti:Tt,a=new o(this.snapshot,e,t,r);return a.shouldRender?i?.changeHistory():this.forceReloaded=!0,this.render(a)}renderError(e,t){t?.changeHistory();let r=new ei(this.snapshot,e,!1);return this.render(r)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();let{lastRenderedLocation:t}=this;await to();let r=e.clone();return this.snapshotCache.put(t,r),r}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}isPageRefresh(e){return!e||this.lastRenderedLocation.pathname===e.location.pathname&&e.action==="replace"}shouldPreserveScrollPosition(e){return this.isPageRefresh(e)&&this.snapshot.shouldPreserveScrollPosition}
17get snapshot(){return le.fromElement(this.element)}},ii=class{selector="a[data-turbo-preload]";constructor(e,t){this.delegate=e,this.snapshotCache=t}start(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this.#e):this.preloadOnLoadLinksForView(document.body)}stop(){document.removeEventListener("DOMContentLoaded",this.#e)}preloadOnLoadLinksForView(e){for(let t of e.querySelectorAll(this.selector))this.delegate.shouldPreloadLink(t)&&this.preloadURL(t)}async preloadURL(e){let t=new URL(e.href);if(this.snapshotCache.has(t))return;await new $e(this,ae.get,t,new URLSearchParams,e).perform()}prepareRequest(e){e.headers["X-Sec-Purpose"]="prefetch"}async requestSucceededWithResponse(e,t){try{let r=await t.responseHTML,i=le.fromHTMLString(r);this.snapshotCache.put(e.url,i)}catch{}}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}#e=()=>{this.preloadOnLoadLinksForView(document.body)}},ni=class{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.#e("")}exemptPageFromCache(){this.#e("no-cache")}exemptPageFromPreview(){this.#e("no-preview")}#e(e){Rc("turbo-cache-control",e)}},oi=class{navigator=new Gr(this);history=new zr(this);view=new ri(this,document.documentElement);adapter=new jr(this);pageObserver=new Xr(this);cacheObserver=new Kr;linkPrefetchObserver=new Yr(this,document);linkClickObserver=new $s(this,window);formSubmitObserver=new zt(this,document);scrollObserver=new Qr(this);streamObserver=new Zr(this);formLinkClickObserver=new Fs(this,document.documentElement);frameRedirector=new Ur(this,document.documentElement);streamMessageRenderer=new Jr;cache=new ni(this);enabled=!0;started=!1;#e=150;constructor(e){this.recentRequests=e,this.preloader=new ii(this,this.view.snapshotCache),this.debouncedRefresh=this.refresh,this.pageRefreshDebouncePeriod=this.pageRefreshDebouncePeriod}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkPrefetchObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkPrefetchObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.preloader.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){let r=t.frame?document.getElementById(t.frame):null;if(r instanceof he){let i=t.action||Je(r);r.delegate.proposeVisitIfNavigatedWithAction(r,i),r.src=e.toString()}else this.navigator.proposeVisit(Q(e),t)}refresh(e,t){!(t&&this.recentRequests.has(t))&&!this.navigator.currentVisit&&this.visit(e,{action:"replace",shouldCacheSnapshot:!1})}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(Fe.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){console.warn("Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`"),this.progressBarDelay=e}set progressBarDelay(e){Y.drive.progressBarDelay=e}get progressBarDelay(){return Y.drive.progressBarDelay}set drive(e){Y.drive.enabled=e}get drive(){return Y.drive.enabled}set formMode(e){Y.forms.mode=e}get formMode(){return Y.forms.mode}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}get pageRefreshDebouncePeriod(){return this.#e}set pageRefreshDebouncePeriod(e){this.refresh=Dc(this.debouncedRefresh.bind(this),e),this.#e=e}shouldPreloadLink(e){let t=e.hasAttribute("data-turbo-method"),r=e.hasAttribute("data-turbo-stream"),i=e.getAttribute("data-turbo-frame"),n=i=="_top"?null:d
17ocument.getElementById(i)||yt(e,"turbo-frame:not([disabled])");if(t||r||n instanceof he)return!1;{let o=new URL(e.href);return this.elementIsNavigatable(e)&&ke(o,this.snapshot.rootLocation)}}historyPoppedToLocationWithRestorationIdentifierAndDirection(e,t,r){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0,direction:r}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&ke(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}canPrefetchRequestToLocation(e,t){return this.elementIsNavigatable(e)&&ke(t,this.snapshot.rootLocation)}willFollowLinkToLocation(e,t,r){return this.elementIsNavigatable(e)&&ke(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,r)}followedLinkToLocation(e,t){let r=this.getActionForLink(e),i=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:r,acceptsStreamResponse:i})}allowsVisitingLocationWithAction(e,t){return this.locationWithActionIsSamePage(e,t)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){Xn(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||(Rs(document.documentElement),this.view.markVisitDirection(e.direction)),Xn(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.view.unmarkVisitDirection(),Ps(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,t){return this.navigator.locationWithActionIsSamePage(e,t)}visitScrolledToSamePageLocation(e,t){this.notifyApplicationAfterVisitingSamePageLocation(e,t)}willSubmitForm(e,t){let r=ui(e,t);return this.submissionIsNavigatable(e,t)&&ke(Q(r),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){this.navigator.currentVisit?.silent||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){let r=this.notifyApplicationBeforeRender(e,t),{defaultPrevented:i,detail:{render:n}}=r;return this.view.renderer&&n&&(this.view.renderer.renderElement=n),!i}viewRenderedSnapshot(e,t,r){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender(r)}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,r){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,r).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,r){return $("turbo:click",{target:e,detail:{url:t.href,originalEvent:r},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return $("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return $("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return $("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return $("turbo:before-render",{detail:{newBody:e,...t},cancelable:!0})}notifyApplicationAfterRender(e){return $("turbo:render",{detail:{renderMethod:e}})}notifyApplicationAfterPageLoad(e={}){return $("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,t){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:t.toString()}))}notifyApplicationAfterFrameLoad(e){return $("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return $("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if(Y.forms.mode=="off")return!1;{let r=t?this.elementIsNavigatable(t):!0;return Y.forms.mode=="optin"?r&&e.closest('[data-turbo="true"]')!=null:r&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){let t=yt(e,"[data-turbo]"),r=yt(e,"turbo-frame");return Y.drive.enabled||r?t?t.getAttribute("data-turbo")!="false":!0:t?t.getAttribute("data-turbo")=="true":!1}getActionForLink(e){return Je(e)||"advance"}get snapshot(){return this.view.snapshot}};function Xn(s){Object.defineProperties(s,Ll)}var Ll={absoluteURL:{get(){return this.toString()}}},B=new oi(ho),{cache:bo,navigator:vo}=B;function mi(){B.start()}function Eo(s){B.registerAdapter(s)}function yo(s,e){B.visit(s,e)}function Gt(s){B.connectStreamSource(s)}function Xt(s){B.disconnectStreamSource(s)}function _o(s){B.renderStreamMessage(s)}function wo(){console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),B.clearCache()}function Ao(s){console.warn("Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),Y.drive.progressBarDelay=s}function So(s){console.warn("Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),Y.forms.confirm=s}function To(s){console.warn("Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),Y.forms.mode=s}var Ml=Object.freeze({__proto__:null,navigator:vo,session:B,cache:bo,PageRenderer:Tt,PageSnapshot:le,FrameRenderer:St,fetch:di,config:Y,start:mi,registerAdapter
17:Eo,visit:yo,connectStreamSource:Gt,disconnectStreamSource:Xt,renderStreamMessage:_o,clearCache:wo,setProgressBarDelay:Ao,setConfirmMethod:So,setFormMode:To}),ai=class extends Error{},ci=class{fetchResponseLoaded=e=>Promise.resolve();#e=null;#t=()=>{};#s=!1;#n=!1;#o=new Set;#i=!1;action=null;constructor(e){this.element=e,this.view=new $r(this,this.element),this.appearanceObserver=new Ir(this,this.element),this.formLinkClickObserver=new Fs(this,this.element),this.linkInterceptor=new xs(this,this.element),this.restorationIdentifier=xe(),this.formSubmitObserver=new zt(this,this.element)}connect(){this.#s||(this.#s=!0,this.loadingStyle==Qe.lazy?this.appearanceObserver.start():this.#r(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.#s&&(this.#s=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop())}disabledChanged(){this.loadingStyle==Qe.eager&&this.#r()}sourceURLChanged(){this.#v("src")||(this.element.isConnected&&(this.complete=!1),(this.loadingStyle==Qe.eager||this.#n)&&this.#r())}sourceURLReloaded(){let{refresh:e,src:t}=this.element;return this.#i=t&&e==="morph",this.element.removeAttribute("complete"),this.element.src=null,this.element.src=t,this.element.loaded}loadingStyleChanged(){this.loadingStyle==Qe.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.#r())}async#r(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.#u(Q(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.#n=!0)}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{let t=await e.responseHTML;if(t){let r=so(t);le.fromDocument(r).isVisitable?await this.#c(e,r):await this.#f(e)}}finally{this.#i=!1,this.fetchResponseLoaded=()=>Promise.resolve()}}elementAppearedInViewport(e){this.proposeVisitIfNavigatedWithAction(e,Je(e)),this.#r()}willSubmitFormLinkToLocation(e){return this.#l(e)}submittedFormLinkToLocation(e,t,r){let i=this.#a(e);i&&r.setAttribute("data-turbo-frame",i.id)}shouldInterceptLinkClick(e,t,r){return this.#l(e)}linkClickIntercepted(e,t){this.#d(e,t)}willSubmitForm(e,t){return e.closest("turbo-frame")==this.element&&this.#l(e,t)}formSubmitted(e,t){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new ks(this,e,t);let{fetchRequest:r}=this.formSubmission;this.prepareRequest(r),this.formSubmission.start()}prepareRequest(e){e.headers["Turbo-Frame"]=this.id,this.currentNavigationElement?.hasAttribute("data-turbo-stream")&&e.acceptResponseType(Fe.contentType)}requestStarted(e){Rs(this.element)}requestPreventedHandlingResponse(e,t){this.#t()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this.#t()}async requestFailedWithResponse(e,t){await this.loadResponse(t),this.#t()}requestErrored(e,t){console.error(t),this.#t()}requestFinished(e){Ps(this.element)}formSubmissionStarted({formElement:e}){Rs(e,this.#a(e))}formSubmissionSucceededWithResponse(e,t){let r=this.#a(e.formElement,e.submitter);r.delegate.proposeVisitIfNavigatedWithAction(r,Je(e.submitter,e.formElement,r)),r.delegate.loadResponse(t),e.isSafe||B.clearCache()}formSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t),B.clearCache()}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formElement:e}){Ps(e,this.#a(e))}allowsImmediateRender({element:e},t){let r=$("turbo:before-frame-render",{target:this.element,detail:{newFrame:e,...t},cancelable:!0}),{defaultPrevented:i,detail:{render:n}}=r;return this.view.renderer&&n&&(this.view.renderer.renderElement=n),!i}viewRenderedSnapshot(e,t,r){}preloadOnLoadLinksForView(e){B.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame(e,t){this.previousFrameElement=e.cloneNode(!0)}visitCachedSnapshot=({element:e})=>{let t=e.querySelector("#"+this.element.id);t&&this.previousFrameElement&&t.replaceChildren(...this.previousFrameElement.children),delete this.previousFrameElement};async#c(e,t){let r=await this.extractForeignFrameElement(t.body),i=this.#i?Br:St;if(r){let n=new At(r),o=new i(this,this.view.snapshot,n,!1,!1);this.view.renderPromise&&await this.view.renderPromise,this.changeHistory(),await this.view.render(o),this.complete=!0,B.frameRendered(e,this.element),B.frameLoaded(this.element),await this.fetchResponseLoaded(e)}else this.#m(e)&&this.#p(e)}async#u(e){let t=new $e(this,ae.get,e,new URLSearchParams,this.element);return this.#e?.cancel(),this.#e=t,new Promise(r=>{this.#t=()=>{this.#t=()=>{},this.#e=null,r()},t.perform()})}#d(e,t,r){let i=this.#a(e,r);i.delegate.proposeVisitIfNavigatedWithAction(i,Je(r,e,i)),this.#y(e,()=>{i.src=t})}proposeVisitIfNavigatedWithAction(e,t=null){if(this.action=t,this.action){let r=le.fromElement(e).clone(),{visitCachedSnapshot:i}=e.delegate;e.delegate.fetchResponseLoaded=async n=>{if(e.src){let{statusCode:o,redirected:a}=n,u=await n.responseHTML,d={response:{statusCode:o,redirected:a,responseHTML:u},visitCachedSnapshot:i,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:r};this.action&&(d.action=this.action),B.visit(e.src,d)}}}}changeHistory(){if(this.action){let e=io(this.action);B.history.update(e,Q(this.element.src||""),this.restorationIdentifier)}}
17async#f(e){console.warn(`The response (${e.statusCode}) from <turbo-frame id="${this.element.id}"> is performing a full page visit due to turbo-visit-control.`),await this.#h(e.response)}#m(e){this.element.setAttribute("complete","");let t=e.response,r=async(n,o)=>{n instanceof Response?this.#h(n):B.visit(n,o)};return!$("turbo:frame-missing",{target:this.element,detail:{response:t,visit:r},cancelable:!0}).defaultPrevented}#p(e){this.view.missing(),this.#g(e)}#g(e){let t=`The response (${e.statusCode}) did not contain the expected <turbo-frame id="${this.element.id}"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new ai(t)}async#h(e){let t=new wt(e),r=await t.responseHTML,{location:i,redirected:n,statusCode:o}=t;return B.visit(i,{response:{redirected:n,statusCode:o,responseHTML:r}})}#a(e,t){let r=Ns("data-turbo-frame",t,e)||this.element.getAttribute("target");return Qn(r)??this.element}async extractForeignFrameElement(e){let t,r=CSS.escape(this.id);try{if(t=Jn(e.querySelector(`turbo-frame#${r}`),this.sourceURL),t)return t;if(t=Jn(e.querySelector(`turbo-frame[src][recurse~=${r}]`),this.sourceURL),t)return await t.loaded,await this.extractForeignFrameElement(t)}catch(i){return console.error(i),new he}return null}#b(e,t){let r=ui(e,t);return ke(Q(r),this.rootLocation)}#l(e,t){let r=Ns("data-turbo-frame",t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.#b(e,t)||!this.enabled||r=="_top")return!1;if(r){let i=Qn(r);if(i)return!i.disabled}return!(!B.elementIsNavigatable(e)||t&&!B.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.#E("src",()=>{this.element.src=e??null})}get loadingStyle(){return this.element.loading}get isLoading(){return this.formSubmission!==void 0||this.#t()!==void 0}get complete(){return this.element.hasAttribute("complete")}set complete(e){e?this.element.setAttribute("complete",""):this.element.removeAttribute("complete")}get isActive(){return this.element.isActive&&this.#s}get rootLocation(){let t=this.element.ownerDocument.querySelector('meta[name="turbo-root"]')?.content??"/";return Q(t)}#v(e){return this.#o.has(e)}#E(e,t){this.#o.add(e),t(),this.#o.delete(e)}#y(e,t){this.currentNavigationElement=e,t(),delete this.currentNavigationElement}};function Qn(s){if(s!=null){let e=document.getElementById(s);if(e instanceof he)return e}}function Jn(s,e){if(s){let t=s.getAttribute("src");if(t!=null&&e!=null&&Fc(t,e))throw new Error(`Matching <turbo-frame id="${s.id}"> element has a source URL which references itself`);if(s.ownerDocument!==document&&(s=document.importNode(s,!0)),s instanceof he)return s.connectedCallback(),s.disconnectedCallback(),s}}var pi={after(){this.targetElements.forEach(s=>s.parentElement?.insertBefore(this.templateContent,s.nextSibling))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(s=>s.append(this.templateContent))},before(){this.targetElements.forEach(s=>s.parentElement?.insertBefore(this.templateContent,s))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(s=>s.prepend(this.templateContent))},remove(){this.targetElements.forEach(s=>s.remove())},replace(){let s=this.getAttribute("method");this.targetElements.forEach(e=>{s==="morph"?fi(e,this.templateContent):e.replaceWith(this.templateContent)})},update(){let s=this.getAttribute("method");this.targetElements.forEach(e=>{s==="morph"?go(e,this.templateContent):(e.innerHTML="",e.append(this.templateContent))})},refresh(){B.refresh(this.baseURI,this.requestId)}},Vs=class s extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){return this.renderPromise??=(async()=>{let e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await Kt(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch{}}
17removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){let e=this.targetElements.flatMap(r=>[...r.children]).filter(r=>!!r.id),t=[...this.templateContent?.children||[]].filter(r=>!!r.id).map(r=>r.id);return e.filter(r=>t.includes(r.id))}get performAction(){if(this.action){let e=pi[this.action];if(e)return e;this.#e("unknown action")}this.#e("action attribute is missing")}get targetElements(){if(this.target)return this.targetElementsById;if(this.targets)return this.targetElementsByQuery;this.#e("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild===null){let e=this.ownerDocument.createElement("template");return this.appendChild(e),e}else if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.#e("first child element must be a <template> element")}get action(){return this.getAttribute("action")}get target(){return this.getAttribute("target")}get targets(){return this.getAttribute("targets")}get requestId(){return this.getAttribute("request-id")}#e(e){throw new Error(`${this.description}: ${e}`)}get description(){return(this.outerHTML.match(/<[^>]+>/)??[])[0]??"<turbo-stream>"}get beforeRenderEvent(){return new CustomEvent("turbo:before-stream-render",{bubbles:!0,cancelable:!0,detail:{newStream:this,render:s.renderElement}})}get targetElementsById(){let e=this.ownerDocument?.getElementById(this.target);return e!==null?[e]:[]}get targetElementsByQuery(){let e=this.ownerDocument?.querySelectorAll(this.targets);return e.length!==0?Array.prototype.slice.call(e):[]}},Hs=class extends HTMLElement{streamSource=null;connectedCallback(){this.streamSource=this.src.match(/^ws{1,2}:/)?new WebSocket(this.src):new EventSource(this.src),Gt(this.streamSource)}disconnectedCallback(){this.streamSource&&(this.streamSource.close(),Xt(this.streamSource))}get src(){return this.getAttribute("src")||""}};he.delegateConstructor=ci;customElements.get("turbo-frame")===void 0&&customElements.define("turbo-frame",he);customElements.get("turbo-stream")===void 0&&customElements.define("turbo-stream",Vs);customElements.get("turbo-stream-source")===void 0&&customElements.define("turbo-stream-source",Hs);(()=>{let s=document.currentScript;if(s&&!s.hasAttribute("data-turbo-suppress-warning"))for(s=s.parentElement;s;){if(s==document.body)return console.warn(ro` 18 You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do! 19 20 Load your applicationâs JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change. 21 22 For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements 23 24 ââ 25 Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s 26 `,s.outerHTML);s=s.parentElement}})();window.Turbo={...Ml,StreamActions:pi};mi();var Po;async function Dl(){return Po||Ro(kl().then(Ro))}function Ro(s){return Po=s}async function kl(){let{createConsumer:s}=await Promise.resolve().then(()=>(No(),Mo));return s()}async function Do(s,e){let{subscriptions:t}=await Dl();return t.create(s,e)}function ss(s){return!s||typeof s!="object"||s instanceof Date||s instanceof RegExp?s:Array.isArray(s)?s.map(ss):Object.keys(s).reduce(function(e,t){var r=t[0].toLowerCase()+t.slice(1).replace(/([A-Z]+)/g,function(i,n){return"_"+n.toLowerCase()});return e[r]=ss(s[t]),e},{})}var Ci=class extends HTMLElement{static observedAttributes=["channel","signed-stream-name"];async connectedCallback(){Gt(this),this.subscription=await Do(this.channel,{received:this.dispatchMessageEvent.bind(this),connected:this.subscriptionConnected.bind(this),disconnected:this.subscriptionDisconnected.bind(this)})}disconnectedCallback(){Xt(this),this.subscription&&this.subscription.unsubscribe(),this.subscriptionDisconnected()}attributeChangedCallback(){this.subscription&&(this.disconnectedCallback(),this.connectedCallback())}dispatchMessageEvent(e){let t=new MessageEvent("message",{data:e});return this.dispatchEvent(t)}subscriptionConnected(){this.setAttribute("connected","")}subscriptionDisconnected(){this.removeAttribute("connected")}get channel(){let e=this.getAttribute("channel"),t=this.getAttribute("signed-stream-name");return{channel:e,signed_stream_name:t,...ss({...this.dataset})}}};customElements.get("turbo-cable-stream-source")===void 0&&customElements.define("turbo-cable-stream-source",Ci);function ko(s){if(s.target instanceof HTMLFormElement){let{target:e,detail:{fetchOptions:t}}=s;
26e.addEventListener("turbo:submit-start",({detail:{formSubmission:{submitter:r}}})=>{let i=Fl(t.body)?t.body:new URLSearchParams,n=xl(r,i,e);/get/i.test(n)||(/post/i.test(n)?i.delete("_method"):i.set("_method",n),t.method="post")},{once:!0})}}function xl(s,e,t){let r=$l(s),i=e.get("_method"),n=t.getAttribute("method")||"get";return typeof r=="string"?r:typeof i=="string"?i:n}function $l(s){return s instanceof HTMLButtonElement||s instanceof HTMLInputElement?s.name==="_method"?s.value:s.hasAttribute("formmethod")?s.formMethod:null:null}function Fl(s){return s instanceof FormData||s instanceof URLSearchParams}window.Turbo=gi;addEventListener("turbo:before-fetch-request",ko);var dn={};Os(dn,{Alert:()=>ps,Button:()=>gs,Carousel:()=>Ht,Collapse:()=>bs,Dropdown:()=>Ne,Modal:()=>mt,Offcanvas:()=>Re,Popover:()=>vr,ScrollSpy:()=>Es,Tab:()=>qt,Toast:()=>ys,Tooltip:()=>pt});var ir={};Os(ir,{afterMain:()=>Vo,afterRead:()=>$o,afterWrite:()=>Wo,applyStyles:()=>Mt,arrow:()=>Xs,auto:()=>rs,basePlacements:()=>Te,beforeMain:()=>Fo,beforeRead:()=>Io,beforeWrite:()=>Ho,bottom:()=>K,clippingParents:()=>Oi,computeStyles:()=>Rt,createPopper:()=>ds,createPopperBase:()=>Jo,createPopperLite:()=>Zo,detectOverflow:()=>se,end:()=>Ve,eventListeners:()=>Pt,flip:()=>er,hide:()=>tr,left:()=>V,main:()=>Bo,modifierPhases:()=>Mi,offset:()=>sr,placements:()=>ns,popper:()=>st,popperGenerator:()=>ht,popperOffsets:()=>It,preventOverflow:()=>rr,read:()=>
vendor: 10,216 bytes, line 26
26xo,reference:()=>Li,right:()=>j,start:()=>we,top:()=>F,variationPlacements:()=>Gs,viewport:()=>is,write:()=>qo});var F="top",K="bottom",j="right",V="left",rs="auto",Te=[F,K,j,V],we="start",Ve="end",Oi="clippingParents",is="viewport",st="popper",Li="reference",Gs=Te.reduce(function(s,e){return s.concat([e+"-"+we,e+"-"+Ve])},[]),ns=[].concat(Te,[rs]).reduce(function(s,e){return s.concat([e,e+"-"+we,e+"-"+Ve])},[]),Io="beforeRead",xo="read",$o="afterRead",Fo="beforeMain",Bo="main",Vo="afterMain",Ho="beforeWrite",qo="write",Wo="afterWrite",Mi=[Io,xo,$o,Fo,Bo,Vo,Ho,qo,Wo];function J(s){return s?(s.nodeName||"").toLowerCase():null}function k(s){if(s==null)return window;if(s.toString()!=="[object Window]"){var e=s.ownerDocument;return e&&e.defaultView||window}return s}function ue(s){var e=k(s).Element;return s instanceof e||s instanceof Element}function G(s){var e=k(s).HTMLElement;return s instanceof e||s instanceof HTMLElement}function Lt(s){if(typeof ShadowRoot>"u")return!1;var e=k(s).ShadowRoot;return s instanceof e||s instanceof ShadowRoot}function Bl(s){var e=s.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},n=e.elements[t];!G(n)||!J(n)||(Object.assign(n.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?n.removeAttribute(o):n.setAttribute(o,a===!0?"":a)}))})}function Vl(s){var e=s.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],n=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),a=o.reduce(function(u,m){return u[m]="",u},{});!G(i)||!J(i)||(Object.assign(i.style,a),Object.keys(n).forEach(function(u){i.removeAttribute(u)}))})}}var Mt={name:"applyStyles",enabled:!0,phase:"write",fn:Bl,effect:Vl,requires:["computeStyles"]};function Z(s){return s.split("-")[0]}var ve=Math.max,rt=Math.min,Ce=Math.round;function Nt(){var s=navigator.userAgentData;return s!=null&&s.brands&&Array.isArray(s.brands)?s.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function os(){return!/^((?!chrome|android).)*safari/i.test(Nt())}function de(s,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=s.getBoundingClientRect(),i=1,n=1;e&&G(s)&&(i=s.offsetWidth>0&&Ce(r.width)/s.offsetWidth||1,n=s.offsetHeight>0&&Ce(r.height)/s.offsetHeight||1);var o=ue(s)?k(s):window,a=o.visualViewport,u=!os()&&t,m=(r.left+(u&&a?a.offsetLeft:0))/i,d=(r.top+(u&&a?a.offsetTop:0))/n,y=r.width/i,v=r.height/n;return{width:y,height:v,top:d,right:m+y,bottom:d+v,left:m,x:m,y:d}}function it(s){var e=de(s),t=s.offsetWidth,r=s.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:s.offsetLeft,y:s.offsetTop,width:t,height:r}}function as(s,e){var t=e.getRootNode&&e.getRootNode();if(s.contains(e))return!0;if(t&&Lt(t)){var r=e;do{if(r&&s.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function te(s){return k(s).getComputedStyle(s)}function Ni(s){return["table","td","th"].indexOf(J(s))>=0}function ee(s){return((ue(s)?s.ownerDocument:s.document)||window.document).documentElement}function Oe(s){return J(s)==="html"?s:s.assignedSlot||s.parentNode||(Lt(s)?s.host:null)||ee(s)}function jo(s){return!G(s)||te(s).position==="fixed"?null:s.offsetParent}function Hl(s){var e=/firefox/i.test(Nt()),t=/Trident/i.test(Nt());if(t&&G(s)){var r=te(s);if(r.position==="fixed")return null}var i=Oe(s);for(Lt(i)&&(i=i.host);G(i)&&["html","body"].indexOf(J(i))<0;){var n=te(i);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||e&&n.willChange==="filter"||e&&n.filter&&n.filter!=="none")return i;i=i.parentNode}return null}function Ee(s){for(var e=k(s),t=jo(s);t&&Ni(t)&&te(t).position==="static";)t=jo(t);return t&&(J(t)==="html"||J(t)==="body"&&te(t).position==="static")?e:t||Hl(s)||e}function nt(s){return["top","bottom"].indexOf(s)>=0?"x":"y"}function ot(s,e,t){return ve(s,rt(e,t))}function Ko(s,e,t){var r=ot(s,e,t);return r>t?t:r}function cs(){return{top:0,right:0,bottom:0,left:0}}function ls(s){return Object.assign({},cs(),s)}function hs(s,e){return e.reduce(function(t,r){return t[r]=s,t},{})}var ql=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ls(typeof e!="number"?e:hs(e,Te))};function Wl(s){var e,t=s.state,r=s.name,i=s.options,n=t.elements.arrow,o=t.modifiersData.popperOffsets,a=Z(t.placement),u=nt(a),m=[V,j].indexOf(a)>=0,d=m?"height":"width";if(!(!n||!o)){var y=ql(i.padding,t),v=it(n),_=u==="y"?F:V,C=u==="y"?K:j,w=t.rects.reference[d]+t.rects.reference[u]-o[u]-t.rects.popper[d],S=o[u]-t.rects.reference[u],N=Ee(n),I=N?u==="y"?N.clientHeight||0:N.clientWidth||0:0,x=w/2-S/2,T=y[_],O=I-v[d]-y[C],L=I/2-v[d]/2+x,P=ot(T,L,O),U=u;t.modifiersData[r]=(e={},e[U]=P,e.centerOffset=P-L,e)}}function jl(s){var e=s.state,t=s.options,r=t.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||as(e.elements.popper,i)&&(e.elements.arrow=i))}var Xs={name:"arrow",enabled:!0,phase:"main",fn:Wl,effect:jl,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fe(s){return s.split("-")[1]}var Kl={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ul(s,e){var t=s.x,r=s.y,i=e.devicePixelRatio||1;return{x:Ce(t*i)/i||0,y:Ce(r*i)/i||0}}function Uo(s){var e,t=s.popper,r=s.popperRect,i=s.placement,n=s.variation,o=s.offsets,a=s.position,u=s.gpuAcceleration,m=s.adaptive,d=s.roundOffsets,y=s.isFixed,v=o.x,_=v===void 0?0:v,C=o.y,w=C===void 0?0:C,S=typeof d=="function"?d({x:_,y:w}):{x:_,y:w};_=S.x,w=S.y;var N=o.hasOwnProperty("x"),I=o.hasOwnProperty("y"),x=V,T=F,O=window;if(m){var L=Ee(t),P="clientHeight",U="clientWidth";if(L===k(t)&&(L=ee(t),te(L).position!=="static"&&a==="absolute"&&(P="scrollHeight",U="scrollWidth")),L=L,i===F||(i===V||i===j)&&n===Ve){T=K;var H=y&&L===O&&O.visualViewport?O.visualViewport.height:L[P];w-=H-r.height,w*=u?1:-1}if(i===V||(i===F||i===K)&&n===Ve){x=j;var q=y&&L===O&&O.visualViewport?O.visualViewport.width:L[U];_-=q-r.width,_*=u?1:-1}}var X=Object.assign({position:a},m&&Kl),z=d===!0?Ul({x:_,y:w},k(t)):{x:_,y:w};if(_=z.x,w=z.y,u){var W;return Object.assign({},X,(W={},W[T]=I?"0":"",W[x]=N?"0":"",W.transform=(O.devicePixelRatio||1)<=1?"translate("+_+"px, "+w+"px)":"translate3d("+_+"px, "+w+"px, 0)",W))}return Object.assign({},X,(e={},e[T]=I?w+"px":"",e[x]=N?_+"px":"",e.transform="",e))}function zl(s){var e=s.state,t=s.options,r=t.gpuAcceleration,i=r===void 0?!0:r,n=t.adaptive,o=n===void 0?!0:n,a=t.roundOffsets,u=a===void 0?!0:a,m={placement:Z(e.placement),variation:fe(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Uo(Object.assign({},m,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Uo(Object.assign({},m,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Rt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zl,data:{}};var Qs={passive:!0};function Yl(s){var e=s.state,t=s.instance,r=s.options,i=r.scroll,n=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,u=k(e.elements.popper),m=[].concat(e.scrollParents.reference,e.scrollParents.popper);return n&&m.forEach(function(d){d.addEventListener("scroll",t.update,Qs)}),a&&u.addEventListener("resize",t.update,Qs),function(){n&&m.forEach(function(d){d.removeEventListener("scroll",t.update,Qs)}),a&&u.removeEventListener("resize",t.update,Qs)}}var Pt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yl,data:{}};var Gl={left:"right",right:"left",bottom:"top",top:"bottom"};function Dt(s){return s.replace(/left|right|bottom|top/g,function(e){return Gl[e]})}var Xl={start:"end",end:"start"};function Js(s){return s.replace(/start|end/g,function(e){return Xl[e]})}function at(s){var e=k(s),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function ct(s){return de(ee(s)).left+at(s).scrollLeft}function Ri(s,e){var t=k(s),r=ee(s),i=t.visualViewport,n=r.clientWidth,o=r.clientHeight,a=0,u=0;if(i){n=i.width,o=i.height;var m=os();(m||!m&&e==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:n,height:o,x:a+ct(s),y:u}}function Pi(s){var e,t=ee(s),r=at(s),i=(e=s.ownerDocument)==null?void 0:e.body,n=ve(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=ve(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+ct(s),u=-r.scrollTop;return te(i||t).direction==="rtl"&&(a+=ve(t.clientWidth,i?i.clientWidth:0)-n),{width:n,height:o,x:a,y:u}}function lt(s){var e=te(s),t=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+r)}function Zs(s){return["html","body","#document"].indexOf(J(s))>=0?s.ownerDocument.body:G(s)&<(s)?s:Zs(Oe(s))}function He(s,e){var t;e===void 0&&(e=[]);var r=Zs(s),i=r===((t=s.ownerDocument)==null?void 0:t.body),n=k(r),o=i?[n].concat(n.visualViewport||[],lt(r)?r:[]):r,a=e.concat(o);return i?a:a.concat(He(Oe(o)))}function kt(s){return Object.assign({},s,{left:s.x,top:s.y,right:s.x+s.width,bottom:s.y+s.height})}function Ql(s,e){var t=de(s,!1,e==="fixed");return t.top=t.top+s.clientTop,t.left=t.left+s.clientLeft,t.bottom=t.top+s.clientHeight,t.right=t.left+s.clientWidth,t.width=s.clientWidth,t.height=s.clientHeight,t.x=t.left,t.y=t.top,t}function zo(s,e,t){return e===is?kt(Ri(s,t)):ue(e)?Ql(e,t):kt(Pi(ee(s)))}function Jl(s){var e=He(Oe(s)),t=["absolute","fixed"].indexOf(te(s).position)>=0,r=t&&G(s)?Ee(s):s;return ue(r)?e.filter(function(i){return ue(i)&&as(i,r)&&J(i)!=="body"}):[]}function Di(s,e,t,r){var i=e==="clippingParents"?Jl(s):[].concat(e),n=[].concat(i,[t]),o=n[0],a=n.reduce(function(u,m){var d=zo(s,m,r);
vendor: 7,286 bytes, line 26
26return u.top=ve(d.top,u.top),u.right=rt(d.right,u.right),u.bottom=rt(d.bottom,u.bottom),u.left=ve(d.left,u.left),u},zo(s,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function us(s){var e=s.reference,t=s.element,r=s.placement,i=r?Z(r):null,n=r?fe(r):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,u;switch(i){case F:u={x:o,y:e.y-t.height};break;case K:u={x:o,y:e.y+e.height};break;case j:u={x:e.x+e.width,y:a};break;case V:u={x:e.x-t.width,y:a};break;default:u={x:e.x,y:e.y}}var m=i?nt(i):null;if(m!=null){var d=m==="y"?"height":"width";switch(n){case we:u[m]=u[m]-(e[d]/2-t[d]/2);break;case Ve:u[m]=u[m]+(e[d]/2-t[d]/2);break;default:}}return u}function se(s,e){e===void 0&&(e={});var t=e,r=t.placement,i=r===void 0?s.placement:r,n=t.strategy,o=n===void 0?s.strategy:n,a=t.boundary,u=a===void 0?Oi:a,m=t.rootBoundary,d=m===void 0?is:m,y=t.elementContext,v=y===void 0?st:y,_=t.altBoundary,C=_===void 0?!1:_,w=t.padding,S=w===void 0?0:w,N=ls(typeof S!="number"?S:hs(S,Te)),I=v===st?Li:st,x=s.rects.popper,T=s.elements[C?I:v],O=Di(ue(T)?T:T.contextElement||ee(s.elements.popper),u,d,o),L=de(s.elements.reference),P=us({reference:L,element:x,strategy:"absolute",placement:i}),U=kt(Object.assign({},x,P)),H=v===st?U:L,q={top:O.top-H.top+N.top,bottom:H.bottom-O.bottom+N.bottom,left:O.left-H.left+N.left,right:H.right-O.right+N.right},X=s.modifiersData.offset;if(v===st&&X){var z=X[i];Object.keys(q).forEach(function(W){var ye=[j,K].indexOf(W)>=0?1:-1,Ae=[F,K].indexOf(W)>=0?"y":"x";q[W]+=z[Ae]*ye})}return q}function ki(s,e){e===void 0&&(e={});var t=e,r=t.placement,i=t.boundary,n=t.rootBoundary,o=t.padding,a=t.flipVariations,u=t.allowedAutoPlacements,m=u===void 0?ns:u,d=fe(r),y=d?a?Gs:Gs.filter(function(C){return fe(C)===d}):Te,v=y.filter(function(C){return m.indexOf(C)>=0});v.length===0&&(v=y);var _=v.reduce(function(C,w){return C[w]=se(s,{placement:w,boundary:i,rootBoundary:n,padding:o})[Z(w)],C},{});return Object.keys(_).sort(function(C,w){return _[C]-_[w]})}function Zl(s){if(Z(s)===rs)return[];var e=Dt(s);return[Js(s),e,Js(e)]}function eh(s){var e=s.state,t=s.options,r=s.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,n=i===void 0?!0:i,o=t.altAxis,a=o===void 0?!0:o,u=t.fallbackPlacements,m=t.padding,d=t.boundary,y=t.rootBoundary,v=t.altBoundary,_=t.flipVariations,C=_===void 0?!0:_,w=t.allowedAutoPlacements,S=e.options.placement,N=Z(S),I=N===S,x=u||(I||!C?[Dt(S)]:Zl(S)),T=[S].concat(x).reduce(function(re,be){return re.concat(Z(be)===rs?ki(e,{placement:be,boundary:d,rootBoundary:y,padding:m,flipVariations:C,allowedAutoPlacements:w}):be)},[]),O=e.rects.reference,L=e.rects.popper,P=new Map,U=!0,H=T[0],q=0;q<T.length;q++){var X=T[q],z=Z(X),W=fe(X)===we,ye=[F,K].indexOf(z)>=0,Ae=ye?"width":"height",c=se(e,{placement:X,boundary:d,rootBoundary:y,altBoundary:v,padding:m}),l=ye?W?j:V:W?K:F;O[Ae]>L[Ae]&&(l=Dt(l));var h=Dt(l),p=[];if(n&&p.push(c[z]<=0),a&&p.push(c[l]<=0,c[h]<=0),p.every(function(re){return re})){H=X,U=!1;break}P.set(X,p)}if(U)for(var g=C?3:1,b=function(be){var R=T.find(function(ie){var oe=P.get(ie);if(oe)return oe.slice(0,be).every(function(Ye){return Ye})});if(R)return H=R,"break"},A=g;A>0;A--){var D=b(A);if(D==="break")break}e.placement!==H&&(e.modifiersData[r]._skip=!0,e.placement=H,e.reset=!0)}}var er={name:"flip",enabled:!0,phase:"main",fn:eh,requiresIfExists:["offset"],data:{_skip:!1}};function Yo(s,e,t){return t===void 0&&(t={x:0,y:0}),{top:s.top-e.height-t.y,right:s.right-e.width+t.x,bottom:s.bottom-e.height+t.y,left:s.left-e.width-t.x}}function Go(s){return[F,j,K,V].some(function(e){return s[e]>=0})}function th(s){var e=s.state,t=s.name,r=e.rects.reference,i=e.rects.popper,n=e.modifiersData.preventOverflow,o=se(e,{elementContext:"reference"}),a=se(e,{altBoundary:!0}),u=Yo(o,r),m=Yo(a,i,n),d=Go(u),y=Go(m);e.modifiersData[t]={referenceClippingOffsets:u,popperEscapeOffsets:m,isReferenceHidden:d,hasPopperEscaped:y},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":y})}var tr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:th};function sh(s,e,t){var r=Z(s),i=[V,F].indexOf(r)>=0?-1:1,n=typeof t=="function"?t(Object.assign({},e,{placement:s})):t,o=n[0],a=n[1];return o=o||0,a=(a||0)*i,[V,j].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function rh(s){var e=s.state,t=s.options,r=s.name,i=t.offset,n=i===void 0?[0,0]:i,o=ns.reduce(function(d,y){return d[y]=sh(y,e.rects,n),d},{}),a=o[e.placement],u=a.x,m=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=m),e.modifiersData[r]=o}var sr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rh};function ih(s){var e=s.state,t=s.name;e.modifiersData[t]=us({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var It={name:"popperOffsets",enabled:!0,phase:"read",fn:ih,data:{}};function Ii(s){return s==="x"?"y":"x"}function nh(s){var e=s.state,t=s.options,r=s.name,i=t.mainAxis,n=i===void 0?!0:i,o=t.altAxis,a=o===void 0?!1:o,u=t.boundary,m=t.rootBoundary,d=t.altBoundary,y=t.padding,v=t.tether,_=v===void 0?!0:v,C=t.tetherOffset,w=C===void 0?0:C,S=se(e,{boundary:u,rootBoundary:m,padding:y,altBoundary:d}),N=Z(e.placement),I=fe(e.placement),x=!I,T=nt(N),O=Ii(T),L=e.modifiersData.popperOffsets,P=e.rects.reference,U=e.rects.popper,H=typeof w=="function"?w(Object.assign({},e.rects,{placement:e.placement})):w,q=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),X=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,z={x:0,y:0};if(L){if(n){var W,ye=T==="y"?F:V,Ae=T==="y"?K:j,c=T==="y"?"height":"width",l=L[T],h=l+S[ye],p=l-S[Ae],g=_?-U[c]/2:0,b=I===we?P[c]:U[c],A=I===we?-U[c]:-P[c],D=e.elements.arrow,re=_&&D?it(D):{width:0,height:0},be=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:cs(),R=be[ye],ie=be[Ae],oe=ot(0,P[c],re[c]),Ye=x?P[c]/2-g-oe-R-q.mainAxis:b-oe-R-q.mainAxis,Mr=x?-P[c]/2+g+oe+ie+q.mainAxis:A+oe+ie+q.mainAxis,Nr=e.elements.arrow&&Ee(e.elements.arrow),mc=Nr?T==="y"?Nr.clientTop||0:Nr.clientLeft||0:0,$n=(W=X?.[T])!=null?W:0,pc=l+Ye-$n-mc,gc=l+Mr-$n,Fn=ot(_?rt(h,pc):h,l,_?ve(p,gc):p);L[T]=Fn,z[T]=Fn-l}if(a){var Bn,bc=T==="x"?F:V,vc=T==="x"?K:j,Ge=L[O],Cs=O==="y"?"height":"width",Vn=Ge+S[bc],Hn=Ge-S[vc],Rr=[F,V].indexOf(N)!==-1,qn=(Bn=X?.[O])!=null?Bn:0,Wn=Rr?Vn:Ge-P[Cs]-U[Cs]-qn+q.altAxis,jn=Rr?Ge+P[Cs]+U[Cs]-qn-q.altAxis:Hn,Kn=_&&Rr?Ko(Wn,Ge,jn):ot(_?Wn:Vn,Ge,_?jn:Hn);L[O]=Kn,z[O]=Kn-Ge}e.modifiersData[r]=z}}var rr={name:"preventOverflow",enabled:!0,phase:"main",fn:nh,requiresIfExists:["offset"]};function xi(s){return{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}}function $i(s){return s===k(s)||!G(s)?at(s):xi(s)}function oh(s){var e=s.getBoundingClientRect(),t=Ce(e.width)/s.offsetWidth||1,r=Ce(e.height)/s.offsetHeight||1;return t!==1||r!==1}function Fi(s,e,t){t===void 0&&(t=!1);var r=G(e),i=G(e)&&oh(e),n=ee(e),o=de(s,i,t),a={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!t)&&((J(e)!=="body"||lt(n))&&(a=$i(e)),G(e)?(u=de(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):n&&(u.x=ct(n))),{x:o.left+a.scrollLeft-u.x,y:o.top+a.scrollTop-u.y,width:o.width,height:o.height}}function ah(s){var e=new Map,t=new Set,r=[];
vendor: 13,007 bytes, line 26
26s.forEach(function(n){e.set(n.name,n)});function i(n){t.add(n.name);var o=[].concat(n.requires||[],n.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var u=e.get(a);u&&i(u)}}),r.push(n)}return s.forEach(function(n){t.has(n.name)||i(n)}),r}function Bi(s){var e=ah(s);return Mi.reduce(function(t,r){return t.concat(e.filter(function(i){return i.phase===r}))},[])}function Vi(s){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(s())})})),e}}function Hi(s){var e=s.reduce(function(t,r){var i=t[r.name];return t[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var Xo={placement:"bottom",modifiers:[],strategy:"absolute"};function Qo(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function ht(s){s===void 0&&(s={});var e=s,t=e.defaultModifiers,r=t===void 0?[]:t,i=e.defaultOptions,n=i===void 0?Xo:i;return function(a,u,m){m===void 0&&(m=n);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xo,n),modifiersData:{},elements:{reference:a,popper:u},attributes:{},styles:{}},y=[],v=!1,_={state:d,setOptions:function(N){var I=typeof N=="function"?N(d.options):N;w(),d.options=Object.assign({},n,d.options,I),d.scrollParents={reference:ue(a)?He(a):a.contextElement?He(a.contextElement):[],popper:He(u)};var x=Bi(Hi([].concat(r,d.options.modifiers)));return d.orderedModifiers=x.filter(function(T){return T.enabled}),C(),_.update()},forceUpdate:function(){if(!v){var N=d.elements,I=N.reference,x=N.popper;if(Qo(I,x)){d.rects={reference:Fi(I,Ee(x),d.options.strategy==="fixed"),popper:it(x)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(q){return d.modifiersData[q.name]=Object.assign({},q.data)});for(var T=0;T<d.orderedModifiers.length;T++){if(d.reset===!0){d.reset=!1,T=-1;continue}var O=d.orderedModifiers[T],L=O.fn,P=O.options,U=P===void 0?{}:P,H=O.name;typeof L=="function"&&(d=L({state:d,options:U,name:H,instance:_})||d)}}}},update:Vi(function(){return new Promise(function(S){_.forceUpdate(),S(d)})}),destroy:function(){w(),v=!0}};if(!Qo(a,u))return _;_.setOptions(m).then(function(S){!v&&m.onFirstUpdate&&m.onFirstUpdate(S)});function C(){d.orderedModifiers.forEach(function(S){var N=S.name,I=S.options,x=I===void 0?{}:I,T=S.effect;if(typeof T=="function"){var O=T({state:d,name:N,instance:_,options:x}),L=function(){};y.push(O||L)}})}function w(){y.forEach(function(S){return S()}),y=[]}return _}}var Jo=ht();var ch=[Pt,It,Rt,Mt],Zo=ht({defaultModifiers:ch});var lh=[Pt,It,Rt,Mt,sr,er,rr,Xs,tr],ds=ht({defaultModifiers:lh});var qe=new Map,qi={set(s,e,t){qe.has(s)||qe.set(s,new Map);let r=qe.get(s);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,t)},get(s,e){return qe.has(s)&&qe.get(s).get(e)||null},remove(s,e){if(!qe.has(s))return;let t=qe.get(s);t.delete(e),t.size===0&&qe.delete(s)}},hh=1e6,uh=1e3,rn="transitionend",La=s=>(s&&window.CSS&&window.CSS.escape&&(s=s.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),s),dh=s=>s==null?`${s}`:Object.prototype.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase(),fh=s=>{do s+=Math.floor(Math.random()*hh);while(document.getElementById(s));return s},mh=s=>{if(!s)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(s),r=Number.parseFloat(e),i=Number.parseFloat(t);return!r&&!i?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*uh)},Ma=s=>{s.dispatchEvent(new Event(rn))},Le=s=>!s||typeof s!="object"?!1:(typeof s.jquery<"u"&&(s=s[0]),typeof s.nodeType<"u"),We=s=>Le(s)?s.jquery?s[0]:s:typeof s=="string"&&s.length>0?document.querySelector(La(s)):null,Wt=s=>{if(!Le(s)||s.getClientRects().length===0)return!1;let e=getComputedStyle(s).getPropertyValue("visibility")==="visible",t=s.closest("details:not([open])");if(!t)return e;if(t!==s){let r=s.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},je=s=>!s||s.nodeType!==Node.ELEMENT_NODE||s.classList.contains("disabled")?!0:typeof s.disabled<"u"?s.disabled:s.hasAttribute("disabled")&&s.getAttribute("disabled")!=="false",Na=s=>{if(!document.documentElement.attachShadow)return null;if(typeof s.getRootNode=="function"){let e=s.getRootNode();return e instanceof ShadowRoot?e:null}return s instanceof ShadowRoot?s:s.parentNode?Na(s.parentNode):null},fr=()=>{},_s=s=>{s.offsetHeight},Ra=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Wi=[],ph=s=>{document.readyState==="loading"?(Wi.length||document.addEventListener("DOMContentLoaded",()=>{for(let e of Wi)e()}),Wi.push(s)):s()},me=()=>document.documentElement.dir==="rtl",ge=s=>{ph(()=>{let e=Ra();if(e){let t=s.NAME,r=e.fn[t];e.fn[t]=s.jQueryInterface,e.fn[t].Constructor=s,e.fn[t].noConflict=()=>(e.fn[t]=r,s.jQueryInterface)}})},ne=(s,e=[],t=s)=>typeof s=="function"?s(...e):t,Pa=(s,e,t=!0)=>{if(!t){ne(s);return}let i=mh(e)+5,n=!1,o=({target:a})=>{a===e&&(n=!0,e.removeEventListener(rn,o),ne(s))};e.addEventListener(rn,o),setTimeout(()=>{n||Ma(e)},i)},cn=(s,e,t,r)=>{let i=s.length,n=s.indexOf(e);return n===-1?!t&&r?s[i-1]:s[0]:(n+=t?1:-1,r&&(n=(n+i)%i),s[Math.max(0,Math.min(n,i-1))])},gh=/[^.]*(?=\..*)\.|.*/,bh=/\..*/,vh=/::\d+$/,ji={},ea=1,Da={mouseenter:"mouseover",mouseleave:"mouseout"},Eh=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ka(s,e){return e&&`${e}::${ea++}`||s.uidEvent||ea++}function Ia(s){let e=ka(s);return s.uidEvent=e,ji[e]=ji[e]||{},ji[e]}function yh(s,e){return function t(r){return ln(r,{delegateTarget:s}),t.oneOff&&f.off(s,r.type,e),e.apply(s,[r])}}function _h(s,e,t){return function r(i){let n=s.querySelectorAll(e);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(let a of n)if(a===o)return ln(i,{delegateTarget:o}),r.oneOff&&f.off(s,i.type,e,t),t.apply(o,[i])}}function xa(s,e,t=null){return Object.values(s).find(r=>r.callable===e&&r.delegationSelector===t)}function $a(s,e,t){let r=typeof e=="string",i=r?t:e||t,n=Fa(s);return Eh.has(n)||(n=s),[r,i,n]}function ta(s,e,t,r,i){if(typeof e!="string"||!s)return;let[n,o,a]=$a(e,t,r);e in Da&&(o=(C=>function(w){if(!w.relatedTarget||w.relatedTarget!==w.delegateTarget&&!w.delegateTarget.contains(w.relatedTarget))return C.call(this,w)})(o));let u=Ia(s),m=u[a]||(u[a]={}),d=xa(m,o,n?t:null);if(d){d.oneOff=d.oneOff&&i;return}let y=ka(o,e.replace(gh,"")),v=n?_h(s,t,o):yh(s,o);v.delegationSelector=n?t:null,v.callable=o,v.oneOff=i,v.uidEvent=y,m[y]=v,s.addEventListener(a,v,n)}function nn(s,e,t,r,i){let n=xa(e[t],r,i);n&&(s.removeEventListener(t,n,!!i),delete e[t][n.uidEvent])}function wh(s,e,t,r){let i=e[t]||{};for(let[n,o]of Object.entries(i))n.includes(r)&&nn(s,e,t,o.callable,o.delegationSelector)}function Fa(s){return s=s.replace(bh,""),Da[s]||s}var f={on(s,e,t,r){ta(s,e,t,r,!1)},one(s,e,t,r){ta(s,e,t,r,!0)},off(s,e,t,r){if(typeof e!="string"||!s)return;let[i,n,o]=$a(e,t,r),a=o!==e,u=Ia(s),m=u[o]||{},d=e.startsWith(".");if(typeof n<"u"){if(!Object.keys(m).length)return;nn(s,u,o,n,i?t:null);return}if(d)for(let y of Object.keys(u))wh(s,u,y,e.slice(1));for(let[y,v]of Object.entries(m)){let _=y.replace(vh,"");(!a||e.includes(_))&&nn(s,u,o,v.callable,v.delegationSelector)}},trigger(s,e,t){if(typeof e!="string"||!s)return null;let r=Ra(),i=Fa(e),n=e!==i,o=null,a=!0,u=!0,m=!1;n&&r&&(o=r.Event(e,t),r(s).trigger(o),a=!o.isPropagationStopped(),u=!o.isImmediatePropagationStopped(),m=o.isDefaultPrevented());let d=ln(new Event(e,{bubbles:a,cancelable:!0}),t);return m&&d.preventDefault(),u&&s.dispatchEvent(d),d.defaultPrevented&&o&&o.preventDefault(),d}};function ln(s,e={}){for(let[t,r]of Object.entries(e))try{s[t]=r}catch{Object.defineProperty(s,t,{configurable:!0,get(){return r}})}return s}function sa(s){if(s==="true")return!0;if(s==="false")return!1;if(s===Number(s).toString())return Number(s);if(s===""||s==="null")return null;if(typeof s!="string")return s;try{return JSON.parse(decodeURIComponent(s))}catch{return s}}function Ki(s){return s.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var Me={setDataAttribute(s,e,t){s.setAttribute(`data-bs-${Ki(e)}`,t)},removeDataAttribute(s,e){s.removeAttribute(`data-bs-${Ki(e)}`)},getDataAttributes(s){if(!s)return{};let e={},t=Object.keys(s.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(let r of t){let i=r.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=sa(s.dataset[r])}return e},getDataAttribute(s,e){return sa(s.getAttribute(`data-bs-${Ki(e)}`))}},ft=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){let r=Le(t)?Me.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...Le(t)?Me.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(let[r,i]of Object.entries(t)){let n=e[r],o=Le(n)?"element":dh(n);if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${i}".`)}}},Ah="5.3.3",ce=class extends ft{constructor(e,t){super(),e=We(e),e&&(this._element=e,this._config=this._getConfig(t),qi.set(this._element,this.constructor.DATA_KEY,this))}dispose(){qi.remove(this._element,this.constructor.DATA_KEY),f.off(this._element,this.constructor.EVENT_KEY);for(let e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){Pa(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return qi.get(We(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return Ah}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}},Ui=s=>{let e=s.getAttribute("data-bs-target");if(!e||e==="#"){let t=s.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return e?e.split(",").map(t=>La(t)).join(","):null},E={find(s,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,s))},findOne(s,e=document.documentElement){return Element.prototype.querySelector.call(e,s)},children(s,e){return[].concat(...s.children).filter(t=>t.matches(e))},parents(s,e){let t=[],r=s.parentNode.closest(e);for(;r;)t.push(r),r=r.parentNode.closest(e);return t},prev(s,e){let t=s.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(s,e){let t=s.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(s){let e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,s).filter(t=>!je(t)&&Wt(t))},getSelectorFromElement(s){let e=Ui(s);return e&&E.findOne(e)?e:null},getElementFromSelector(s){let e=Ui(s);return e?E.findOne(e):null},getMultipleElementsFromSelector(s){let e=Ui(s);return e?E.find(e):[]}},Er=(s,e="hide")=>{let t=`click.dismiss${s.EVENT_KEY}`,r=s.NAME;f.on(document,t,`[data-bs-dismiss="${r}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),je(this))return;let n=E.getElementFromSelector(this)||this.closest(`.${r}`);s.getOrCreateInstance(n)[e]()})},Sh="alert",Th="bs.alert",Ba=`.${Th}`,Ch=`close${Ba}`,Oh=`closed${Ba}`,Lh="fade",Mh="show",ps=class s extends ce{static get NAME(){return Sh}close(){if(f.trigger(this._element,Ch).defaultPrevented)return;this._element.classList.remove(Mh);let t=this._element.classList.contains(Lh);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),f.trigger(this._element,Oh),this.dispose()}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method n
26amed "${e}"`);t[e](this)}})}};Er(ps,"close");ge(ps);var Nh="button",Rh="bs.button",Ph=`.${Rh}`,Dh=".data-api",kh="active",ra='[data-bs-toggle="button"]',Ih=`click${Ph}${Dh}`,gs=class s extends ce{static get NAME(){return Nh}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(kh))}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this);e==="toggle"&&t[e]()})}};f.on(document,Ih,ra,s=>{s.preventDefault();let e=s.target.closest(ra);gs.getOrCreateInstance(e).toggle()});ge(gs);var xh="swipe",jt=".bs.swipe",$h=`touchstart${jt}`,Fh=`touchmove${jt}`,Bh=`touchend${jt}`,Vh=`pointerdown${jt}`,Hh=`pointerup${jt}`,qh="touch",Wh="pen",jh="pointer-event",Kh=40,Uh={endCallback:null,leftCallback:null,rightCallback:null},zh={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},mr=class s extends ft{constructor(e,t){super(),this._element=e,!(!e||!s.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Uh}static get DefaultType(){return zh}static get NAME(){return xh}dispose(){f.off(this._element,jt)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),ne(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){let e=Math.abs(this._deltaX);if(e<=Kh)return;let t=e/this._deltaX;this._deltaX=0,t&&ne(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(f.on(this._element,Vh,e=>this._start(e)),f.on(this._element,Hh,e=>this._end(e)),this._element.classList.add(jh)):(f.on(this._element,$h,e=>this._start(e)),f.on(this._element,Fh,e=>this._move(e)),f.on(this._element,Bh,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Wh||e.pointerType===qh)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}},Yh="carousel",Gh="bs.carousel",Ke=`.${Gh}`,Va=".data-api",Xh="ArrowLeft",Qh="ArrowRight",Jh=500,fs="next",xt="prev",Ft="left",ur="right",Zh=`slide${Ke}`,zi=`slid${Ke}`,eu=`keydown${Ke}`,tu=`mouseenter${Ke}`,su=`mouseleave${Ke}`,ru=`dragstart${Ke}`,iu=`load${Ke}${Va}`,nu=`click${Ke}${Va}`,Ha="carousel",nr="active",ou="slide",au="carousel-item-end",cu="carousel-item-start",lu="carousel-item-next",hu="carousel-item-prev",qa=".active",Wa=".carousel-item",uu=qa+Wa,du=".carousel-item img",fu=".carousel-indicators",mu="[data-bs-slide], [data-bs-slide-to]",pu='[data-bs-ride="carousel"]',gu={[Xh]:ur,[Qh]:Ft},bu={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},vu={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},Ht=class s extends ce{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=E.findOne(fu,this._element),this._addEventListeners(),this._config.ride===Ha&&this.cycle()}static get Default(){return bu}static get DefaultType(){return vu}static get NAME(){return Yh}next(){this._slide(fs)}nextWhenVisible(){!document.hidden&&Wt(this._element)&&this.next()}prev(){this._slide(xt)}pause(){this._isSliding&&Ma(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){f.one(this._element,zi,()=>this.cycle());return}this.cycle()}}to(e){let t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){f.one(this._element,zi,()=>this.to(e));return}let r=this._getItemIndex(this._getActive());if(r===e)return;let i=e>r?fs:xt;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&f.on(this._element,eu,e=>
vendor: 20,461 bytes, line 26
26this._keydown(e)),this._config.pause==="hover"&&(f.on(this._element,tu,()=>this.pause()),f.on(this._element,su,()=>this._maybeEnableCycle())),this._config.touch&&mr.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(let r of E.find(du,this._element))f.on(r,ru,i=>i.preventDefault());let t={leftCallback:()=>this._slide(this._directionToOrder(Ft)),rightCallback:()=>this._slide(this._directionToOrder(ur)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Jh+this._config.interval))}};this._swipeHelper=new mr(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;let t=gu[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;let t=E.findOne(qa,this._indicatorsElement);t.classList.remove(nr),t.removeAttribute("aria-current");let r=E.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(nr),r.setAttribute("aria-current","true"))}_updateInterval(){let e=this._activeElement||this._getActive();if(!e)return;let t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;let r=this._getActive(),i=e===fs,n=t||cn(this._getItems(),r,i,this._config.wrap);if(n===r)return;let o=this._getItemIndex(n),a=_=>f.trigger(this._element,_,{relatedTarget:n,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:o});if(a(Zh).defaultPrevented||!r||!n)return;let m=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;let d=i?cu:au,y=i?lu:hu;n.classList.add(y),_s(n),r.classList.add(d),n.classList.add(d);let v=()=>{n.classList.remove(d,y),n.classList.add(nr),r.classList.remove(nr,y,d),this._isSliding=!1,a(zi)};this._queueCallback(v,r,this._isAnimated()),m&&this.cycle()}_isAnimated(){return this._element.classList.contains(ou)}_getActive(){return E.findOne(uu,this._element)}_getItems(){return E.find(Wa,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return me()?e===Ft?xt:fs:e===Ft?fs:xt}_orderToDirection(e){return me()?e===xt?Ft:ur:e===xt?ur:Ft}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}};f.on(document,nu,mu,function(s){let e=E.getElementFromSelector(this);if(!e||!e.classList.contains(Ha))return;s.preventDefault();let t=Ht.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){t.to(r),t._maybeEnableCycle();return}if(Me.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});f.on(window,iu,()=>{let s=E.find(pu);for(let e of s)Ht.getOrCreateInstance(e)});ge(Ht);var Eu="collapse",yu="bs.collapse",ws=`.${yu}`,_u=".data-api",wu=`show${ws}`,Au=`shown${ws}`,Su=`hide${ws}`,Tu=`hidden${ws}`,Cu=`click${ws}${_u}`,Yi="show",Vt="collapse",or="collapsing",Ou="collapsed",Lu=`:scope .${Vt} .${Vt}`,Mu="collapse-horizontal",Nu="width",Ru="height",Pu=".collapse.show, .collapse.collapsing",on='[data-bs-toggle="collapse"]',Du={parent:null,toggle:!0},ku={parent:"(null|element)",toggle:"boolean"},bs=class s extends ce{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];let r=E.find(on);for(let i of r){let n=E.getSelectorFromElement(i),o=E.find(n).filter(a=>a===this._element);n!==null&&o.length&&this._triggerArray.push(i)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Du}static get DefaultType(){return ku}static get NAME(){return Eu}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(Pu).filter(a=>a!==this._element).map(a=>s.getOrCreateInstance(a,{toggle:!1}))),e.length&&e[0]._isTransitioning||f.trigger(this._element,wu).defaultPrevented)return;for(let a of e)a.hide();let r=this._getDimension();this._element.classList.remove(Vt),this._element.classList.add(or),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let i=()=>{this._isTransitioning=!1,this._element.classList.remove(or),this._element.classList.add(Vt,Yi),this._element.style[r]="",f.trigger(this._element,Au)},o=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[r]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||f.trigger(this._element,Su).defaultPrevented)return;let t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,_s(this._element),this._element.classList.add(or),this._element.classList.remove(Vt,Yi);for(let i of this._triggerArray){let n=E.getElementFromSelector(i);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([i],!1)}this._isTransitioning=!0;let r=()=>{this._isTransitioning=!1,this._element.classList.remove(or),this._element.classList.add(Vt),f.trigger(this._element,Tu)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Yi)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=We(e.parent),e}_getDimension(){return this._element.classList.contains(Mu)?Nu:Ru}_initializeChildren(){if(!this._config.parent)return;let e=this._getFirstLevelChildren(on);for(let t of e){let r=E.getElementFromSelector(t);r&&this._addAriaAndCollapsedClass([t],this._isShown(r))}}_getFirstLevelChildren(e){let t=E.find(Lu,this._config.parent);return E.find(e,this._config.parent).filter(r=>!t.includes(r))}_addAriaAndCollapsedClass(e,t){if(e.length)for(let r of e)r.classList.toggle(Ou,!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){let t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){let r=s.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}};f.on(document,Cu,on,function(s){(s.target.tagName==="A"||s.delegateTarget&&s.delegateTarget.tagName==="A")&&s.preventDefault();for(let e of E.getMultipleElementsFromSelector(this))bs.getOrCreateInstance(e,{toggle:!1}).toggle()});ge(bs);var ia="dropdown",Iu="bs.dropdown",gt=`.${Iu}`,hn=".data-api",xu="Escape",na="Tab",$u="ArrowUp",oa="ArrowDown",Fu=2,Bu=`hide${gt}`,Vu=`hidden${gt}`,Hu=`show${gt}`,qu=`shown${gt}`,ja=`click${gt}${hn}`,Ka=`keydown${gt}${hn}`,Wu=`keyup${gt}${hn}`,Bt="show",ju="dropup",Ku="dropend",Uu="dropstart",zu="dropup-center",Yu="dropdown-center",ut='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Gu=`${ut}.${Bt}`,dr=".dropdown-menu",Xu=".navbar",Qu=".navbar-nav",Ju=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Zu=me()?"top-end":"top-start",ed=me()?"top-start":"top-end",td=me()?"bottom-end":"bottom-start",sd=me()?"bottom-start":"bottom-end",rd=me()?"left-start":"right-start",id=me()?"right-start":"left-start",nd="top",od="bottom",ad={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},cd={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"},Ne=class s extends ce{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=E.next(this._element,dr)[0]||E.prev(this._element,dr)[0]||E.findOne(dr,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return ad}static get DefaultType(){return cd}static get NAME(){return ia}toggle(){return this._isShown()?this.hide():this.show()}show(){if(je(this._element)||this._isShown())return;let e={relatedTarget:this._element};if(!f.trigger(this._element,Hu,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Qu))for(let r of[].concat(...document.body.children))f.on(r,"mouseover",fr);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Bt),this._element.classList.add(Bt),f.trigger(this._element,qu,e)}}hide(){if(je(this._element)||!this._isShown())return;let e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!f.trigger(this._element,Bu,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(let r of[].concat(...document.body.children))f.off(r,"mouseover",fr);this._popper&&this._popper.destroy(),this._menu.classList.remove(Bt),this._element.classList.remove(Bt),this._element.setAttribute("aria-expanded","false"),Me.removeDataAttribute(this._menu,"popper"),f.trigger(this._element,Vu,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Le(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${ia.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof ir>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:Le(this._config.reference)?e=We(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);let t=this._getPopperConfig();this._popper=ds(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Bt)}_getPlacement(){let e=this._parent;if(e.classList.contains(Ku))return rd;if(e.classList.contains(Uu))return id;if(e.classList.contains(zu))return nd;if(e.classList.contains(Yu))return od;let t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(ju)?t?ed:Zu:t?sd:td}_detectNavbar(){return this._element.closest(Xu)!==null}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){let e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Me.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...ne(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){let r=E.find(Ju,this._menu).filter(i=>Wt(i));r.length&&cn(r,t,e===oa,!r.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===Fu||e.type==="keyup"&&e.key!==na)return;let t=E.find(Gu);for(let r of t){let i=s.getInstance(r);if(!i||i._config.autoClose===!1)continue;let n=e.composedPath(),o=n.includes(i._menu);if(n.includes(i._element)||i._config.autoClose==="inside"&&!o||i._config.autoClose==="outside"&&o||i._menu.contains(e.target)&&(e.type==="keyup"&&e.key===na||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;let a={relatedTarget:i._element};e.type==="click"&&(a.clickEvent=e),i._completeHide(a)}}static dataApiKeydownHandler(e){let t=/input|textarea/i.test(e.target.tagName),r=e.key===xu,i=[$u,oa].includes(e.key);if(!i&&!r||t&&!r)return;e.preventDefault();let n=this.matches(ut)?this:E.prev(this,ut)[0]||E.next(this,ut)[0]||E.findOne(ut,e.delegateTarget.parentNode),o=s.getOrCreateInstance(n);if(i){e.stopPropagation(),o.show(),o._selectMenuItem(e);return}o._isShown()&&(e.stopPropagation(),o.hide(),n.focus())}};f.on(document,Ka,ut,Ne.dataApiKeydownHandler);f.on(document,Ka,dr,Ne.dataApiKeydownHandler);f.on(document,ja,Ne.clearMenus);f.on(document,Wu,Ne.clearMenus);f.on(document,ja,ut,function(s){s.preventDefault(),Ne.getOrCreateInstance(this).toggle()});ge(Ne);var Ua="backdrop",ld="fade",aa="show",ca=`mousedown.bs.${Ua}`,hd={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ud={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"},pr=class extends ft{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return hd}static get DefaultType(){return ud}static get NAME(){return Ua}show(e){if(!this._config.isVisible){ne(e);return}this._append();let t=this._getElement();this._config.isAnimated&&_s(t),t.classList.add(aa),this._emulateAnimation(()=>{ne(e)})}hide(e){if(!this._config.isVisible){ne(e);return}this._getElement().classList.remove(aa),this._emulateAnimation(()=>{this.dispose(),ne(e)})}dispose(){this._isAppended&&(f.off(this._element,ca),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){let e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(ld),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=We(e.rootElement),e}_append(){if(this._isAppended)return;let e=this._getElement();this._config.rootElement.append(e),f.on(e,ca,()=>{ne(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Pa(e,this._getElement(),this._config.isAnimated)}},dd="focustrap",fd="bs.focustrap",gr=`.${fd}`,md=`focusin${gr}`,pd=`keydown.tab${gr}`,gd="Tab",bd="forward",la="backward",vd={autofocus:!0,trapElement:null},Ed={autofocus:"boolean",trapElement:"element"},br=class extends ft{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return vd}static get DefaultType(){return Ed}static get NAME(){return dd}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),f.off(document,gr),f.on(document,md,e=>this._handleFocusin(e)),f.on(document,pd,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,f.off(document,gr))}_handleFocusin(e){let{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;let r=E.focusableChildren(t);r.length===0?t.focus():this._lastTabNavDirection===la?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===gd&&(this._lastTabNavDirection=e.shiftKey?la:bd)}},ha=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ua=".sticky-top",ar="padding-right",da="margin-right",vs=class{constructor(){this._element=document.body}getWidth(){let e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){let e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ar,t=>t+e),this._setElementAttributes(ha,ar,t=>t+e),this._setElementAttributes(ua,da,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ar),this._resetElementAttributes(ha,ar),this._resetElementAttributes(ua,da)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){let i=this.getWidth(),n=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+i)return;this._saveInitialAttribute(o,t);let a=window.getComputedStyle(o).getPropertyValue(t);o.style.setProperty(t,`${r(Number.parseFloat(a))}px`)};this._applyManipulationCallback(e,n)}_saveInitialAttribute(e,t){let r=e.style.getPropertyValue(t);r&&Me.setDataAttribute(e,t,r)}_resetElementAttributes(e,t){let r=i=>{let n=Me.getDataAttribute(i,t);if(n===null){i.style.removeProperty(t);return}Me.removeDataAttribute(i,t),i.style.setProperty(t,n)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,t){if(Le(e)){t(e);return}for(let r of E.find(e,this._element))t(r)}},yd="modal",_d="bs.modal",pe=`.${_d}`,wd=".data-api",Ad="Escape",Sd=`hide${pe}`,Td=`hidePrevented${pe}`,za=`hidden${pe}`,Ya=`show${pe}`,Cd=`shown${pe}`,Od=`resize${pe}`,Ld=`click.dismiss${pe}`,Md=`mousedown.dismiss${pe}`,Nd=`keydown.dismiss${pe}`,Rd=`click${pe}${wd}`,fa="modal-open",Pd="fade",ma="show",Gi="modal-static",Dd=".modal.show",kd=".modal-dialog",Id=".modal-body",xd='[data-bs-toggle="modal"]',$d={backdrop:!0,focus:!0,keyboard:!0},Fd={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"},mt=class s extends ce{constructor(e,t){super(e,t),this._dialog=E.findOne(kd,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new vs,this._addEventListeners()}static get Default(){return $d}static get DefaultType(){return Fd}static get NAME(){return yd}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||f.trigger(this._element,Ya,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(fa),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||f.trigger(this._element,Sd).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(ma),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){f.off(window,pe),f.off(this._dialog,pe),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new pr({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new br({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;let t=E.findOne(Id,this._dialog);t&&(t.scrollTop=0),_s(this._element),this._element.classList.add(ma);let r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,f.trigger(this._element,Cd,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){f.on(this._element,Nd,e=>{if(e.key===Ad){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),f.on(window,Od,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),f.on(this._element,Md,e=>{f.one(this._element,Ld,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(fa),this._resetAdjustments(),this._scrollBar.reset(),f.trigger(this._element,za)})}_isAnimated(){return this._element.classList.contains(Pd)}_triggerBackdropTransition(){if(f.trigger(this._element,Td).defaultPrevented)return;let t=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(Gi)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Gi),this._queueCallback(()=>{this._element.classList.remove(Gi),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){let i=me()?"paddingLeft":"paddingRight";this._element.style[i]=`${t}px`}if(!r&&e){let i=me()?"paddingRight":"paddingLeft";this._element.style[i]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){let r=s.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>
26"u")throw new TypeError(`No method named "${e}"`);r[e](t)}})}};f.on(document,Rd,xd,function(s){let e=E.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&s.preventDefault(),f.one(e,Ya,i=>{i.defaultPrevented||f.one(e,za,()=>{Wt(this)&&this.focus()})});let t=E.findOne(Dd);t&&mt.getInstance(t).hide(),mt.getOrCreateInstance(e).toggle(this)});Er(mt);ge(mt);var Bd="offcanvas",Vd="bs.offcanvas",Pe=`.${Vd}`,Ga=".data-api",Hd=`load${Pe}${Ga}`,qd="Escape",pa="show",ga="showing",ba="hiding",Wd="offcanvas-backdrop",Xa=".offcanvas.show",jd=`show${Pe}`,Kd=`shown${Pe}`,Ud=`hide${Pe}`,va=`hidePrevented${Pe}`,Qa=`hidden${Pe}`,zd=`resize${Pe}`,Yd=`click${Pe}${Ga}`,Gd=`keydown.dismiss${Pe}`,Xd='[data-bs-toggle="offcanvas"]',Qd={backdrop:!0,keyboard:!0,scroll:!1},Jd={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"},Re=class s extends ce{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Qd}static get DefaultType(){return Jd}static get NAME(){return Bd}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||f.trigger(this._element,jd,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new vs().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ga);let r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(pa),this._element.classList.remove(ga),f.trigger(this._element,Kd,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||f.trigger(this._element,Ud).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ba),this._backdrop.hide();let t=()=>{this._element.classList.remove(pa,ba),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new vs().reset(),f.trigger(this._element,Qa)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){let e=()=>{if(this._config.backdrop==="static"){f.trigger(this._element,va);return}this.hide()},t=!!this._config.backdrop;return new pr({className:Wd,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new br({trapElement:this._element})}_addEventListeners(){f.on(this._element,Gd,e=>{if(e.key===qd){if(this._config.keyboard){this.hide();return}f.trigger(this._element,va)}})}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}};f.on(document,Yd,Xd,function(s){let e=E.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),je(this))return;f.one(e,Qa,()=>{Wt(this)&&this.focus()});let t=E.findOne(Xa);t&&t!==e&&Re.getInstance(t).hide(),Re.getOrCreateInstance(e).toggle(this)});f.on(window,Hd,()=>{for(let s of E.find(Xa))Re.getOrCreateInstance(s).show()});f.on(window,zd,()=>{for(let s of E.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(s).position!=="fixed"&&Re.getOrCreateInstance(s).hide()});Er(Re);ge(Re);var Zd=/^aria-[\w-]*$/i,Ja={"*":["class","dir","id","lang","role",Zd],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ef=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),tf=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,sf=(s,e)=>{let t=s.nodeName.toLowerCase();return e.includes(t)?ef.has(t)?!!tf.test(s.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(t))};function rf(s,e,t){if(!s.length)return s;if(t&&typeof t=="function")return t(s);let i=new window.DOMParser().parseFromString(s,"text/html"),n=[].concat(...i.body.querySelectorAll("*"));for(let o of n){let a=o.nodeName.toLowerCase();if(!Object.keys(e).includes(a)){o.remove();continue}let u=[].concat(...o.attributes),m=[].concat(e["*"]||[],e[a]||[]);for(let d of u)sf(d,m)||o.removeAttribute(d.nodeName)}return i.body.innerHTML}var nf="TemplateFactory",of={allowList:Ja,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},af={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},cf={entry:"(string|element|function|null)",selector:"(string|element)"},an=class extends ft{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return of}static get DefaultType(){return af}static get NAME(){return nf}getContent(){return Object.values(this._config.content).map(e=>
vendor: 14,016 bytes, line 26
26this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){let e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(let[i,n]of Object.entries(this._config.content))this._setContent(e,n,i);let t=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&t.classList.add(...r.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(let[t,r]of Object.entries(e))super._typeCheckConfig({selector:t,entry:r},cf)}_setContent(e,t,r){let i=E.findOne(r,e);if(i){if(t=this._resolvePossibleFunction(t),!t){i.remove();return}if(Le(t)){this._putElementInTemplate(We(t),i);return}if(this._config.html){i.innerHTML=this._maybeSanitize(t);return}i.textContent=t}}_maybeSanitize(e){return this._config.sanitize?rf(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return ne(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}},lf="tooltip",hf=new Set(["sanitize","allowList","sanitizeFn"]),Xi="fade",uf="modal",cr="show",df=".tooltip-inner",Ea=`.${uf}`,ya="hide.bs.modal",ms="hover",Qi="focus",ff="click",mf="manual",pf="hide",gf="hidden",bf="show",vf="shown",Ef="inserted",yf="click",_f="focusin",wf="focusout",Af="mouseenter",Sf="mouseleave",Tf={AUTO:"auto",TOP:"top",RIGHT:me()?"left":"right",BOTTOM:"bottom",LEFT:me()?"right":"left"},Cf={allowList:Ja,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Of={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},pt=class s extends ce{constructor(e,t){if(typeof ir>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Cf}static get DefaultType(){return Of}static get NAME(){return lf}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),f.off(this._element.closest(Ea),ya,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let e=f.trigger(this._element,this.constructor.eventName(bf)),r=(Na(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();let i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));let{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),f.trigger(this._element,this.constructor.eventName(Ef))),this._popper=this._createPopper(i),i.classList.add(cr),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))f.on(a,"mouseover",fr);let o=()=>{f.trigger(this._element,this.constructor.eventName(vf)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||f.trigger(this._element,this.constructor.eventName(pf)).defaultPrevented)return;if(this._getTipElement().classList.remove(cr),"ontouchstart"in document.documentElement)for(let i of[].concat(...document.body.children))f.off(i,"mouseover",fr);this._activeTrigger[ff]=!1,this._activeTrigger[Qi]=!1,this._activeTrigger[ms]=!1,this._isHovered=null;let r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),f.trigger(this._element,this.constructor.eventName(gf)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){let t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Xi,cr),t.classList.add(`bs-${this.constructor.NAME}-auto`);let r=fh(this.constructor.NAME).toString();return t.setAttribute("id",r),this._isAnimated()&&t.classList.add(Xi),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new an({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[df]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Xi)}_isShown(){return this.tip&&this.tip.classList.contains(cr)}_createPopper(e){let t=ne(this._config.placement,[this,e,this._element]),r=Tf[t.toUpperCase()];return ds(this._element,e,this._getPopperConfig(r))}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return ne(e,[this._element])}_getPopperConfig(e){let t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...t,...ne(this._config.popperConfig,[t])}}_setListeners(){let e=this._config.trigger.split(" ");for(let t of e)if(t==="click")f.on(this._element,this.constructor.eventName(yf),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(t!==mf){let r=t===ms?this.constructor.eventName(Af):this.constructor.eventName(_f),i=t===ms?this.constructor.eventName(Sf):this.constructor.eventName(wf);f.on(this._element,r,this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[n.type==="focusin"?Qi:ms]=!0,o._enter()}),f.on(this._element,i,this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[n.type==="focusout"?Qi:ms]=o._element.contains(n.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},f.on(this._element.closest(Ea),ya,this._hideModalHandler)}_fixTitle(){let e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){let t=Me.getDataAttributes(this._element);for(let r of Object.keys(t))hf.has(r)&&delete t[r];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:We(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){let e={};for(let[t,r]of Object.entries(this._config))this.constructor.Default[t]!==r&&(e[t]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ge(pt);var Lf="popover",Mf=".popover-header",Nf=".popover-body",Rf={...pt.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Pf={...pt.DefaultType,content:"(null|string|element|function)"},vr=class s extends pt{static get Default(){return Rf}static get DefaultType(){return Pf}static get NAME(){return Lf}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Mf]:this._getTitle(),[Nf]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ge(vr);var Df="scrollspy",kf="bs.scrollspy",un=`.${kf}`,If=".data-api",xf=`activate${un}`,_a=`click${un}`,$f=`load${un}${If}`,Ff="dropdown-item",$t="active",Bf='[data-bs-spy="scroll"]',Ji="[href]",Vf=".nav, .list-group",wa=".nav-link",Hf=".nav-item",qf=".list-group-item",Wf=`${wa}, ${Hf} > ${wa}, ${qf}`,jf=".dropdown",Kf=".dropdown-toggle",Uf={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},zf={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"},Es=class s extends ce{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Uf}static get DefaultType(){return zf}static get NAME(){return Df}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(let e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=We(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(f.off(this._config.target,_a),f.on(this._config.target,_a,Ji,e=>{let t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();let r=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:i,behavior:"smooth"});return}r.scrollTop=i}}))}_getNewObserver(){let e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){let t=o=>this._targetLinks.get(`#${o.target.id}`),r=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(t(o))},i=(this._rootElement||document.documentElement).scrollTop,n=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(let o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}let a=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&a){if(r(o),!i)return;continue}!n&&!a&&r(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;let e=E.find(Ji,this._config.target);for(let t of e){if(!t.hash||je(t))continue;let r=E.findOne(decodeURI(t.hash),this._element);Wt(r)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add($t),this._activateParents(e),f.trigger(this._element,xf,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(Ff)){E.findOne(Kf,e.closest(jf)).classList.add($t);return}for(let t of E.parents(e,Vf))for(let r of E.prev(t,Wf))r.classList.add($t)}_clearActiveClass(e){e.classList.remove($t);let t=E.find(`${Ji}.${$t}`,e);for(let r of t)r.classList.remove($t)}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method n
26amed "${e}"`);t[e]()}})}};f.on(window,$f,()=>{for(let s of E.find(Bf))Es.getOrCreateInstance(s)});ge(Es);var Yf="tab",Gf="bs.tab",bt=`.${Gf}`,Xf=`hide${bt}`,Qf=`hidden${bt}`,Jf=`show${bt}`,Zf=`shown${bt}`,em=`click${bt}`,tm=`keydown${bt}`,sm=`load${bt}`,rm="ArrowLeft",Aa="ArrowRight",im="ArrowUp",Sa="ArrowDown",Zi="Home",Ta="End",dt="active",Ca="fade",en="show",nm="dropdown",Za=".dropdown-toggle",om=".dropdown-menu",tn=`:not(${Za})`,am='.list-group, .nav, [role="tablist"]',cm=".nav-item, .list-group-item",lm=`.nav-link${tn}, .list-group-item${tn}, [role="tab"]${tn}`,ec='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',sn=`${lm}, ${ec}`,hm=`.${dt}[data-bs-toggle="tab"], .${dt}[data-bs-toggle="pill"], .${dt}[data-bs-toggle="list"]`,qt=class s extends ce{constructor(e){super(e),this._parent=this._element.closest(am),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),f.on(this._element,tm,t=>this._keydown(t)))}static get NAME(){return Yf}show(){let e=this._element;if(this._elemIsActive(e))return;let t=this._getActiveElem(),r=t?f.trigger(t,Xf,{relatedTarget:e}):null;f.trigger(e,Jf,{relatedTarget:t}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(dt),this._activate(E.getElementFromSelector(e));let r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(en);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),f.trigger(e,Zf,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(Ca))}_deactivate(e,t){if(!e)return;e.classList.remove(dt),e.blur(),this._deactivate(E.getElementFromSelector(e));let r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(en);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),f.trigger(e,Qf,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(Ca))}_keydown(e){if(![rm,Aa,im,Sa,Zi,Ta].includes(e.key))return;e.stopPropagation(),e.preventDefault();let t=this._getChildren().filter(i=>!je(i)),r;if([Zi,Ta].includes(e.key))r=t[e.key===Zi?0:t.length-1];else{let i=[Aa,Sa].includes(e.key);r=cn(t,e.target,i,!0)}r&&(r.focus({preventScroll:!0}),s.getOrCreateInstance(r).show())}_getChildren(){return E.find(sn,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(let r of t)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);let t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){let t=E.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){let r=this._getOuterElement(e);if(!r.classList.contains(nm))return;let i=(n,o)=>{let a=E.findOne(n,r);a&&a.classList.toggle(o,t)};i(Za,dt),i(om,en),r.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(dt)}_getInnerElement(e){return e.matches(sn)?e:E.findOne(sn,e)}_getOuterElement(e){return e.closest(cm)||e}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}};f.on(document,em,ec,function(s){["A","AREA"].includes(this.tagName)&&s.preventDefault(),!je(this)&&qt.getOrCreateInstance(this).show()});f.on(window,sm,()=>{for(let s of E.find(hm))qt.getOrCreateInstance(s)});ge(qt);var um="toast",dm="bs.toast",Ue=`.${dm}`,fm=`mouseover${Ue}`,mm=`mouseout${Ue}`,pm=`focusin${Ue}`,gm=`focusout${Ue}`,bm=`hide${Ue}`,vm=`hidden${Ue}`,Em=`show${Ue}`,ym=`shown${Ue}`,_m="fade",Oa="hide",lr="show",hr="showing",wm={animation:"boolean",autohide:"boolean",delay:"number"},Am={animation:!0,autohide:!0,delay:5e3},ys=class s extends ce{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Am}static get DefaultType(){return wm}static get NAME(){return um}show(){if(f.trigger(this._element,Em).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(_m);let t=()=>{this._element.classList.remove(hr),f.trigger(this._element,ym),this._maybeScheduleHide()};this._element.classList.remove(Oa),_s(this._element),this._element.classList.add(lr,hr),this._queueCallback(t,this._element,this._config.animation)}
26hide(){if(!this.isShown()||f.trigger(this._element,bm).defaultPrevented)return;let t=()=>{this._element.classList.add(Oa),this._element.classList.remove(hr,lr),f.trigger(this._element,vm)};this._element.classList.add(hr),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(lr),super.dispose()}isShown(){return this._element.classList.contains(lr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}let r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){f.on(this._element,fm,e=>this._onInteraction(e,!0)),f.on(this._element,mm,e=>this._onInteraction(e,!1)),f.on(this._element,pm,e=>this._onInteraction(e,!0)),f.on(this._element,gm,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){let t=s.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}};Er(ys);ge(ys);var fn=class{constructor(e,t,r){this.eventTarget=e,this.eventName=t,this.eventOptions=r,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){let t=Sm(e);for(let r of this.bindings){if(t.immediatePropagationStopped)break;r.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((e,t)=>{let r=e.index,i=t.index;return r<i?-1:r>i?1:0})}};function Sm(s){if("immediatePropagationStopped"in s)return s;{let{stopImmediatePropagation:e}=s;return Object.assign(s,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}var mn=class{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,t)=>e.concat(Array.from(t.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,r={}){this.application.handleError(e,`Error ${t}`,r)}clearEventListenersForBinding(e){let t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){let{eventTarget:t,eventName:r,eventOptions:i}=e,n=this.fetchEventListenerMapForEventTarget(t),o=this.cacheKey(r,i);n.delete(o),n.size==0&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){let{eventTarget:t,eventName:r,eventOptions:i}=e;return this.fetchEventListener(t,r,i)}fetchEventListener(e,t,r){let i=this.fetchEventListenerMapForEventTarget(e),n=this.cacheKey(t,r),o=i.get(n);return o||(o=this.createEventListener(e,t,r),i.set(n,o)),o}createEventListener(e,t,r){let i=new fn(e,t,r);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){let r=[e];return Object.keys(t).sort().forEach(i=>{r.push(`${t[i]?"":"!"}${i}`)}),r.join(":")}},Tm={stop({event:s,value:e}){return e&&s.stopPropagation(),!0},prevent({event:s,value:e}){return e&&s.preventDefault(),!0},self({event:s,value:e,element:t}){return e?t===s.target:!0}},Cm=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;
26function Om(s){let t=s.trim().match(Cm)||[],r=t[2],i=t[3];return i&&!["keydown","keyup","keypress"].includes(r)&&(r+=`.${i}`,i=""),{eventTarget:Lm(t[4]),eventName:r,eventOptions:t[7]?Mm(t[7]):{},identifier:t[5],methodName:t[6],keyFilter:t[1]||i}}function Lm(s){if(s=="window")return window;if(s=="document")return document}function Mm(s){return s.split(":").reduce((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)}),{})}function Nm(s){if(s==window)return"window";if(s==document)return"document"}function xn(s){return s.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function pn(s){return xn(s.replace(/--/g,"-").replace(/__/g,"_"))}function Ss(s){return s.charAt(0).toUpperCase()+s.slice(1)}function hc(s){return s.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function Rm(s){return s.match(/[^\s]+/g)||[]}function tc(s){return s!=null}function gn(s,e){return Object.prototype.hasOwnProperty.call(s,e)}var sc=["meta","ctrl","alt","shift"],bn=class{constructor(e,t,r,i){this.element=e,this.index=t,this.eventTarget=r.eventTarget||e,this.eventName=r.eventName||Pm(e)||yr("missing event name"),this.eventOptions=r.eventOptions||{},this.identifier=r.identifier||yr("missing identifier"),this.methodName=r.methodName||yr("missing method name"),this.keyFilter=r.keyFilter||"",this.schema=i}static forToken(e,t){return new this(e.element,e.index,Om(e.content),t)}toString(){let e=this.keyFilter?`.${this.keyFilter}`:"",t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return!1;let t=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,t))return!0;let r=t.filter(i=>!sc.includes(i))[0];return r?(gn(this.keyMappings,r)||yr(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[r].toLowerCase()!==e.key.toLowerCase()):!1}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return!1;let t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){let e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(let{name:r,value:i}of Array.from(this.element.attributes)){let n=r.match(t),o=n&&n[1];o&&(e[xn(o)]=Dm(i))}return e}get eventTargetName(){return Nm(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){let[r,i,n,o]=sc.map(a=>t.includes(a));return e.metaKey!==r||e.ctrlKey!==i||e.altKey!==n||e.shiftKey!==o}},rc={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:s=>s.getAttribute("type")=="submit"?"click":"input",select:()=>"change",textarea:()=>"input"};function Pm(s){let e=s.tagName.toLowerCase();if(e in rc)return rc[e](s)}function yr(s){throw new Error(s)}function Dm(s){try{return JSON.parse(s)}catch{return s}}var vn=class{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){let t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){let e=this.controller[this.methodName];if(typeof e=="function")return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){let{element:t}=this.action,{actionDescriptorFilters:r}=this.context.application,{controller:i}=this.context,n=!0;for(let[o,a]of Object.entries(this.eventOptions))if(o in r){let u=r[o];n=n&&u({name:o,value:a,event:e,element:t,controller:i})}else continue;return n}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){let{target:t,currentTarget:r}=e;try{this.method.call(this.controller,e),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:r,action:this.methodName})}catch(i){let{identifier:n,controller:o,element:a,index:u}=this,m={identifier:n,controller:o,element:a,index:u,event:e};this.context.handleError(i,`invoking action "${this.action}"`,m)}}willBeInvokedByEvent(e){let t=e.target;return e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e)||e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e)?!1:this.element===t?!0:t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element)}get controller(){return this.context.controller}get methodName(){return this.action.methodName}
26get element(){return this.scope.element}get scope(){return this.context.scope}},_r=class{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(r=>this.processMutations(r))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){let e=new Set(this.matchElementsInTree());for(let t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(let t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(let t of e)this.processMutation(t)}processMutation(e){e.type=="attributes"?this.processAttributeChange(e.target,e.attributeName):e.type=="childList"&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(let t of Array.from(e)){let r=this.elementFromNode(t);r&&this.processTree(r,this.removeElement)}}processAddedNodes(e){for(let t of Array.from(e)){let r=this.elementFromNode(t);r&&this.elementIsActive(r)&&this.processTree(r,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(let r of this.matchElementsInTree(e))t.call(this,r)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected!=this.element.isConnected?!1:this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}},wr=class{constructor(e,t,r){this.attributeName=t,this.delegate=r,this.elementObserver=new _r(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){let t=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(this.selector));return t.concat(r)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}};function km(s,e,t){uc(s,e).add(t)}function Im(s,e,t){uc(s,e).delete(t),xm(s,e)}function uc(s,e){let t=s.get(e);return t||(t=new Set,s.set(e,t)),t}function xm(s,e){let t=s.get(e);t!=null&&t.size==0&&s.delete(e)}var De=class{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((t,r)=>t.concat(Array.from(r)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((t,r)=>t+r.size,0)}add(e,t){km(this.valuesByKey,e,t)}delete(e,t){Im(this.valuesByKey,e,t)}has(e,t){let r=this.valuesByKey.get(e);return r!=null&&r.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(r=>r.has(e))}getValuesForKey(e){let t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([t,r])=>r.has(e)).map(([t,r])=>t)}};
26var En=class{constructor(e,t,r,i){this._selector=t,this.details=i,this.elementObserver=new _r(e,this),this.delegate=r,this.matchesByElement=new De}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e,this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){let{selector:t}=this;if(t){let r=e.matches(t);return this.delegate.selectorMatchElement?r&&this.delegate.selectorMatchElement(e,this.details):r}else return!1}matchElementsInTree(e){let{selector:t}=this;if(t){let r=this.matchElement(e)?[e]:[],i=Array.from(e.querySelectorAll(t)).filter(n=>this.matchElement(n));return r.concat(i)}else return[]}elementMatched(e){let{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){let t=this.matchesByElement.getKeysForValue(e);for(let r of t)this.selectorUnmatched(e,r)}elementAttributeChanged(e,t){let{selector:r}=this;if(r){let i=this.matchElement(e),n=this.matchesByElement.has(r,e);i&&!n?this.selectorMatched(e,r):!i&&n&&this.selectorUnmatched(e,r)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details),this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details),this.matchesByElement.delete(t,e)}},yn=class{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(r=>this.processMutations(r))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(let e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(let t of e)this.processMutation(t)}processMutation(e){let t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){let r=this.delegate.getStringMapKeyForAttribute(e);if(r!=null){this.stringMap.has(e)||this.stringMapKeyAdded(r,e);let i=this.element.getAttribute(e);if(this.stringMap.get(e)!=i&&this.stringMapValueChanged(i,r,t),i==null){let n=this.stringMap.get(e);this.stringMap.delete(e),n&&this.stringMapKeyRemoved(r,e,n)}else this.stringMap.set(e,i)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,r){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,r)}stringMapKeyRemoved(e,t,r){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,r)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}},Ar=class{constructor(e,t,r){this.attributeObserver=new wr(e,t,this),this.delegate=r,this.tokensByElement=new De}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){let[t,r]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(r)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(t=>this.tokenMatched(t))}tokensUnmatched(e){e.forEach(t=>this.tokenUnmatched(t))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){let t=this.tokensByElement.getValuesForKey(e),r=this.readTokensForElement(e),i=Fm(t,r).findIndex(([n,o])=>!Bm(n,o));return i==-1?[[],[]]:[t.slice(i),r.slice(i)]}readTokensForElement(e){let t=this.attributeName,r=e.getAttribute(t)||"";return $m(r,e,t)}};function $m(s,e,t){return s.trim().split(/\s+/).filter(r=>r.length).map((r,i)=>({element:e,attributeName:t,content:r,index:i}))}function Fm(s,e){let t=Math.max(s.length,e.length);return Array.from({length:t},(r,i)=>[s[i],e[i]])}function Bm(s,e){return s&&e&&s.index==e.index&&s.content==e.content}var Sr=class{constructor(e,t,r){this.tokenListObserver=new Ar(e,t,this),this.delegate=r,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}
26get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){let{element:t}=e,{value:r}=this.fetchParseResultForToken(e);r&&(this.fetchValuesByTokenForElement(t).set(e,r),this.delegate.elementMatchedValue(t,r))}tokenUnmatched(e){let{element:t}=e,{value:r}=this.fetchParseResultForToken(e);r&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,r))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(t){return{error:t}}}},_n=class{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new Sr(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){let t=new vn(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){let t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}
26disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e,!0)),this.bindingsByAction.clear()}parseValueForToken(e){let t=bn.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}},wn=class{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new yn(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){let r=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,r.writer(this.receiver[e]),r.writer(r.defaultValue))}stringMapValueChanged(e,t,r){let i=this.valueDescriptorNameMap[t];e!==null&&(r===null&&(r=i.writer(i.defaultValue)),this.invokeChangedCallback(t,e,r))}stringMapKeyRemoved(e,t,r){let i=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,i.writer(this.receiver[e]),r):this.invokeChangedCallback(e,i.writer(i.defaultValue),r)}invokeChangedCallbacksForDefaultValues(){for(let{key:e,name:t,defaultValue:r,writer:i}of this.valueDescriptors)r!=null&&!this.controller.data.has(e)&&this.invokeChangedCallback(t,i(r),void 0)}invokeChangedCallback(e,t,r){let i=`${e}Changed`,n=this.receiver[i];if(typeof n=="function"){let o=this.valueDescriptorNameMap[e];try{let a=o.reader(t),u=r;r&&(u=o.reader(r)),n.call(this.receiver,a,u)}catch(a){throw a instanceof TypeError&&(a.message=`Stimulus Value "${this.context.identifier}.${o.name}" - ${a.message}`),a}}}get valueDescriptors(){let{valueDescriptorMap:e}=this;return Object.keys(e).map(t=>e[t])}get valueDescriptorNameMap(){let e={};return Object.keys(this.valueDescriptorMap).forEach(t=>{let r=this.valueDescriptorMap[t];e[r.name]=r}),e}hasValue(e){let t=this.valueDescriptorNameMap[e],r=`has${Ss(t.name)}`;return this.receiver[r]}},An=class{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new De}start(){this.tokenListObserver||(this.tokenListObserver=new Ar(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var r;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),(r=this.tokenListObserver)===null||r===void 0||r.pause(()=>this.delegate.targetConnected(e,t)))}disconnectTarget(e,t){var r;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),(r=this.tokenListObserver)===null||r===void 0||r.pause(()=>this.delegate.targetDisconnected(e,t)))}disconnectAllTargets(){for(let e of this.targetsByName.keys)for(let t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}};function Ts(s,e){let t=dc(s);return Array.from(t.reduce((r,i)=>(Hm(i,e).forEach(n=>r.add(n)),r),new Set))}function Vm(s,e){return dc(s).reduce((r,i)=>(r.push(...qm(i,e)),r),[])}function dc(s){let e=[];for(;s;)e.push(s),s=Object.getPrototypeOf(s);return e.reverse()}function Hm(s,e){let t=s[e];return Array.isArray(t)?t:[]}function qm(s,e){let t=s[e];return t?Object.keys(t).map(r=>[r,t[r]]):[]}var Sn=class{constructor(e,t){this.started=!1,this.context=e,this.delegate=t,this.outletsByName=new De,this.outletElementsByName=new De,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(e=>{this.setupSelectorObserverForOutlet(e),this.setupAttributeObserverForOutlet(e)}
26),this.started=!0,this.dependentContexts.forEach(e=>e.refresh()))}refresh(){this.selectorObserverMap.forEach(e=>e.refresh()),this.attributeObserverMap.forEach(e=>e.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(e=>e.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(e=>e.stop()),this.attributeObserverMap.clear())}selectorMatched(e,t,{outletName:r}){let i=this.getOutlet(e,r);i&&this.connectOutlet(i,e,r)}selectorUnmatched(e,t,{outletName:r}){let i=this.getOutletFromMap(e,r);i&&this.disconnectOutlet(i,e,r)}selectorMatchElement(e,{outletName:t}){let r=this.selector(t),i=this.hasOutlet(e,t),n=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return r?i&&n&&e.matches(r):!1}elementMatchedAttribute(e,t){let r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}elementAttributeValueChanged(e,t){let r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}elementUnmatchedAttribute(e,t){let r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}connectOutlet(e,t,r){var i;this.outletElementsByName.has(r,t)||(this.outletsByName.add(r,e),this.outletElementsByName.add(r,t),(i=this.selectorObserverMap.get(r))===null||i===void 0||i.pause(()=>this.delegate.outletConnected(e,t,r)))}disconnectOutlet(e,t,r){var i;this.outletElementsByName.has(r,t)&&(this.outletsByName.delete(r,e),this.outletElementsByName.delete(r,t),(i=this.selectorObserverMap.get(r))===null||i===void 0||i.pause(()=>this.delegate.outletDisconnected(e,t,r)))}disconnectAllOutlets(){for(let e of this.outletElementsByName.keys)for(let t of this.outletElementsByName.getValuesForKey(e))for(let r of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(r,t,e)}updateSelectorObserverForOutlet(e){let t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){let t=this.selector(e),r=new En(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,r),r.start()}setupAttributeObserverForOutlet(e){let t=this.attributeNameForOutletName(e),r=new wr(this.scope.element,t,this);this.attributeObserverMap.set(e,r),r.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find(t=>this.attributeNameForOutletName(t)===e)}get outletDependencies(){let e=new De;return this.router.modules.forEach(t=>{let r=t.definition.controllerConstructor;Ts(r,"outlets").forEach(n=>e.add(n,t.identifier))}),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){let e=this.dependentControllerIdentifiers;return this.router.contexts.filter(t=>e.includes(t.identifier))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find(r=>r.element===e)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}},Tn=class{constructor(e,t){this.logDebugActivity=(r,i={})=>{let{identifier:n,controller:o,element:a}=this;i=Object.assign({identifier:n,controller:o,element:a},i),this.application.logDebugActivity(this.identifier,r,i)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new _n(this,this.dispatcher),this.valueObserver=new wn(this,this.controller),this.targetObserver=new An(this,this),this.outletObserver=new Sn(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(r){this.handleError(r,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}
26get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,r={}){let{identifier:i,controller:n,element:o}=this;r=Object.assign({identifier:i,controller:n,element:o},r),this.application.handleError(e,`Error ${t}`,r)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,r){this.invokeControllerMethod(`${pn(r)}OutletConnected`,e,t)}outletDisconnected(e,t,r){this.invokeControllerMethod(`${pn(r)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){let r=this.controller;typeof r[e]=="function"&&r[e](...t)}};function Wm(s){return jm(s,Km(s))}function jm(s,e){let t=Gm(s),r=Um(s.prototype,e);return Object.defineProperties(t.prototype,r),t}function Km(s){return Ts(s,"blessings").reduce((t,r)=>{let i=r(s);for(let n in i){let o=t[n]||{};t[n]=Object.assign(o,i[n])}return t},{})}function Um(s,e){return Ym(e).reduce((t,r)=>{let i=zm(s,e,r);return i&&Object.assign(t,{[r]:i}),t},{})}function zm(s,e,t){let r=Object.getOwnPropertyDescriptor(s,t);if(!(r&&"value"in r)){let n=Object.getOwnPropertyDescriptor(e,t).value;return r&&(n.get=r.get||n.get,n.set=r.set||n.set),n}}var Ym=typeof Object.getOwnPropertySymbols=="function"?s=>[...Object.getOwnPropertyNames(s),...Object.getOwnPropertySymbols(s)]:Object.getOwnPropertyNames,Gm=(()=>{function s(t){function r(){return Reflect.construct(t,arguments,new.target)}return r.prototype=Object.create(t.prototype,{constructor:{value:r}}),Reflect.setPrototypeOf(r,t),r}function e(){let r=s(function(){this.a.call(this)});return r.prototype.a=function(){},new r}try{return e(),s}catch{return r=>class extends r{}}})();function Xm(s){return{identifier:s.identifier,controllerConstructor:Wm(s.controllerConstructor)}}var Cn=class{constructor(e,t){this.application=e,this.definition=Xm(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){let t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){let t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new Tn(this,e),this.contextsByScope.set(e,t)),t}},On=class{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){let t=this.data.get(this.getDataKey(e))||"";return Rm(t)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}},Ln=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){let t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){let r=this.getAttributeNameForKey(e);return this.element.setAttribute(r,t),this.get(e)}has(e){let t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){let t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}else return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${hc(e)}`}},Mn=class{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,r){let i=this.warnedKeysByObject.get(e);i||(i=new Set,this.warnedKeysByObject.set(e,i)),i.has(t)||(i.add(t),this.logger.warn(r,e))}};function Nn(s,e){return`[${s}~="${e}"]`}var Rn=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((t,r)=>t||this.findTarget(r)||this.findLegacyTarget(r),void 0)}findAll(...e){return e.reduce((t,r)=>[...t,...this.findAllTargets(r),...this.findAllLegacyTargets(r)],[])}findTarget(e){let t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){let t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){let t=this.schema.targetAttributeForScope(this.identifier);return Nn(t,e)}findLegacyTarget(e){let t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){let t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map(r=>this.deprecate(r,e))}getLegacySelectorForTargetName(e){let t=`${this.identifier}.${e}`;return Nn(this.schema.targetAttribute,t)}deprecate(e,t){if(e){let{identifier:r}=this,i=this.schema.targetAttribute,n=this.schema.targetAttributeForScope(r);this.guide.warn(e,`target:${t}`,`Please replace ${i}="${r}.${t}" with ${n}="${t}". The ${i} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}},Pn=class{constructor(e,t){this.scope=e,this.controllerElement=t}
26get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((t,r)=>t||this.findOutlet(r),void 0)}findAll(...e){return e.reduce((t,r)=>[...t,...this.findAllOutlets(r)],[])}getSelectorForOutletName(e){let t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){let t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){let t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter(i=>this.matchesElement(i,e,t))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter(i=>this.matchesElement(i,e,t))}matchesElement(e,t,r){let i=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&i.split(" ").includes(r)}},Dn=class s{constructor(e,t,r,i){this.targets=new Rn(this),this.classes=new On(this),this.data=new Ln(this),this.containsElement=n=>n.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=r,this.guide=new Mn(i),this.outlets=new Pn(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return Nn(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new s(this.schema,document.documentElement,this.identifier,this.guide.logger)}},kn=class{constructor(e,t,r){this.element=e,this.schema=t,this.delegate=r,this.valueListObserver=new Sr(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){let{element:t,content:r}=e;return this.parseValueForElementAndIdentifier(t,r)}parseValueForElementAndIdentifier(e,t){let r=this.fetchScopesByIdentifierForElement(e),i=r.get(t);return i||(i=this.delegate.createScopeForElementAndIdentifier(e,t),r.set(t,i)),i}elementMatchedValue(e,t){let r=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,r),r==1&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){let r=this.scopeReferenceCounts.get(t);r&&(this.scopeReferenceCounts.set(t,r-1),r==1&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}},In=class{constructor(e){this.application=e,this.scopeObserver=new kn(this.element,this.schema,this),this.scopesByIdentifier=new De,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,t)=>e.concat(t.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);let t=new Cn(this.application,e);this.connectModule(t);let r=e.controllerConstructor.afterLoad;r&&r.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){let t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){let r=this.modulesByIdentifier.get(t);if(r)return r.contexts.find(i=>i.element==e)}proposeToConnectScopeForElementAndIdentifier(e,t){let r=this.scopeObserver.parseValueForElementAndIdentifier(e,t);r?this.scopeObserver.elementMatchedValue(r.element,r):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,r){this.application.handleError(e,t,r)}createScopeForElementAndIdentifier(e,t){return new Dn(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);let t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);let t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(r=>e.connectContextForScope(r))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(r=>e.disconnectContextForScope(r))}},Qm={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:s=>`data-${s}-target`,outletAttributeForScope:(s,e)=>`data-${s}-${e}
26-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},ic("abcdefghijklmnopqrstuvwxyz".split("").map(s=>[s,s]))),ic("0123456789".split("").map(s=>[s,s])))};function ic(s){return s.reduce((e,[t,r])=>Object.assign(Object.assign({},e),{[t]:r}),{})}var Tr=class{constructor(e=document.documentElement,t=Qm){this.logger=console,this.debug=!1,this.logDebugActivity=(r,i,n={})=>{this.debug&&this.logFormattedMessage(r,i,n)},this.element=e,this.schema=t,this.dispatcher=new mn(this),this.router=new In(this),this.actionDescriptorFilters=Object.assign({},Tm)}static start(e,t){let r=new this(e,t);return r.start(),r}async start(){await Jm(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(i=>{i.controllerConstructor.shouldLoad&&this.router.loadDefinition(i)})}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(i=>this.router.unloadIdentifier(i))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,t){let r=this.router.getContextForElementAndIdentifier(e,t);return r?r.controller:null}handleError(e,t,r){var i;this.logger.error(`%s 27 28%o 29 30%o`,t,e,r),(i=window.onerror)===null||i===void 0||i.call(window,t,"",0,0,e)}logFormattedMessage(e,t,r={}){r=Object.assign({application:this},r),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},r)),this.logger.groupEnd()}};function Jm(){return new Promise(s=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>s()):s()})}function Zm(s){return Ts(s,"classes").reduce((t,r)=>Object.assign(t,ep(r)),{})}function ep(s){return{[`${s}Class`]:{get(){let{classes:e}=this;if(e.has(s))return e.get(s);{let t=e.getAttributeName(s);throw new Error(`Missing attribute "${t}"`)}}},[`${s}Classes`]:{get(){return this.classes.getAll(s)}},[`has${Ss(s)}Class`]:{get(){return this.classes.has(s)}}}}function tp(s){return Ts(s,"outlets").reduce((t,r)=>Object.assign(t,sp(r)),{})}function nc(s,e,t){return s.application.getControllerForElementAndIdentifier(e,t)}function oc(s,e,t){let r=nc(s,e,t);if(r||(s.application.router.proposeToConnectScopeForElementAndIdentifier(e,t),r=nc(s,e,t),r))return r}function sp(s){let e=pn(s);return{[`${e}Outlet`]:{get(){let t=this.outlets.find(s),r=this.outlets.getSelectorForOutletName(s);if(t){let i=oc(this,t,s);if(i)return i;throw new Error(`The provided outlet element is missing an outlet controller "${s}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${s}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${r}".`)}},[`${e}Outlets`]:{get(){let t=this.outlets.findAll(s);return t.length>0?t.map(r=>{let i=oc(this,r,s);if(i)return i;console.warn(`The provided outlet element is missing an outlet controller "${s}" instance for host controller "${this.identifier}"`,r)}).filter(r=>r):[]}},[`${e}OutletElement`]:{get(){let t=this.outlets.find(s),r=this.outlets.getSelectorForOutletName(s);if(t)return t;throw new Error(`Missing outlet element "${s}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${r}".`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(s)}},[`has${Ss(e)}Outlet`]:{get(){return this.outlets.has(s)}}}}function rp(s){return Ts(s,"targets").reduce((t,r)=>Object.assign(t,ip(r)),{})}function ip(s){return{[`${s}Target`]:{get(){let e=this.targets.find(s);if(e)return e;throw new Error(`Missing target element "${s}" for "${this.identifier}" controller`)}},[`${s}Targets`]:{get(){return this.targets.findAll(s)}},[`has${Ss(s)}Target`]:{get(){return this.targets.has(s)}}}}function np(s){let e=Vm(s,"values"),t={valueDescriptorMap:{get(){return e.reduce((r,i)=>{let n=fc(i,this.identifier),o=this.data.getAttributeNameForKey(n.key);return Object.assign(r,{[o]:n})},{})}}};return e.reduce((r,i)=>Object.assign(r,op(i)),t)}function op(s,e){let t=fc(s,e),{key:r,name:i,reader:n,writer:o}=t;return{[i]:{get(){let a=this.data.get(r);return a!==null?n(a):t.defaultValue},set(a){a===void 0?this.data.delete(r):this.data.set(r,o(a))}},[`has${Ss(i)}
30`]:{get(){return this.data.has(r)||t.hasCustomDefaultValue}}}}function fc([s,e],t){return hp({controller:t,token:s,typeDefinition:e})}function Cr(s){switch(s){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function As(s){switch(typeof s){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(s))return"array";if(Object.prototype.toString.call(s)==="[object Object]")return"object"}function ap(s){let{controller:e,token:t,typeObject:r}=s,i=tc(r.type),n=tc(r.default),o=i&&n,a=i&&!n,u=!i&&n,m=Cr(r.type),d=As(s.typeObject.default);if(a)return m;if(u)return d;if(m!==d){let y=e?`${e}.${t}`:t;throw new Error(`The specified default value for the Stimulus Value "${y}" must match the defined type "${m}". The provided default value of "${r.default}" is of type "${d}".`)}if(o)return m}function cp(s){let{controller:e,token:t,typeDefinition:r}=s,n=ap({controller:e,token:t,typeObject:r}),o=As(r),a=Cr(r),u=n||o||a;if(u)return u;let m=e?`${e}.${r}`:t;throw new Error(`Unknown value type "${m}" for "${t}" value`)}function lp(s){let e=Cr(s);if(e)return ac[e];let t=gn(s,"default"),r=gn(s,"type"),i=s;if(t)return i.default;if(r){let{type:n}=i,o=Cr(n);if(o)return ac[o]}return s}function hp(s){let{token:e,typeDefinition:t}=s,r=`${hc(e)}-value`,i=cp(s);return{type:i,key:r,name:xn(r),get defaultValue(){return lp(t)},get hasCustomDefaultValue(){return As(t)!==void 0},reader:up[i],writer:cc[i]||cc.default}}var ac={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},up={array(s){let e=JSON.parse(s);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${s}" of type "${As(e)}"`);return e},boolean(s){return!(s=="0"||String(s).toLowerCase()=="false")},number(s){return Number(s.replace(/_/g,""))},object(s){let e=JSON.parse(s);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${s}" of type "${As(e)}"`);return e},string(s){return s}},cc={default:dp,array:lc,object:lc};function lc(s){return JSON.stringify(s)}function dp(s){return`${s}`}var ze=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:r={},prefix:i=this.identifier,bubbles:n=!0,cancelable:o=!0}={}){let a=i?`${i}:${e}`:e,u=new CustomEvent(a,{detail:r,bubbles:n,cancelable:o});return t.dispatchEvent(u),u}};ze.blessings=[Zm,rp,np,tp];ze.targets=[];ze.outlets=[];ze.values={};var Or=Tr.start();Or.debug=!1;window.Stimulus=Or;var Lr=class extends ze{initialize(){this.scroll=this.scroll.bind(this)}connect(){this.element.addEventListener("click",this.scroll)}disconnect(){this.element.removeEventListener("click",this.scroll)}scroll(s){s.preventDefault();let e=this.element.getAttribute("href").replace(/^#/,""),r=document.getElementById(e).getBoundingClientRect().top+window.pageYOffset;window.scrollTo({top:r})}};Or.register("scroll-to",Lr);window.bootstrap=dn;})(); 31/*! Bundled license information: 32 33@hotwired/turbo/dist/turbo.es2017-esm.js: 34 (*! 35 Turbo 8.0.12 36 Copyright © 2024 37signals LLC 37 *) 38 39bootstrap/dist/js/bootstrap.esm.js: 40 (*! 41 * Bootstrap v5.3.3 (https://getbootstrap.com/) 42 * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 43 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 44 *) 45*/ 46;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.