PageSourceSearch

https://nagap0k3r88.com/build/assets/@inertiajs-7zqq8wgj.js

js nagap0k3r88.com collected 2026-09-28 01:32:05 UTC 67,623 bytes, 74 lines download raw bytes

1import{l as Ee}from"./qs-C7saBnVC.js";import{a as Ce}from"./axios-DjWHqwoD.js";import{g as M,s as L,c as A,i as _,h as Ue,e as nt}from"./lodash-es-DY0-vtN4.js";import{c as it,d as Se,r as je,w as ot,a as Z,h as V,m as Te,s as at,b,o as lt,e as ct}from"./@vue-4474Gfnj.js";import{c as ut,t as ht,r as Fe}from"./laravel-precognition-BqdyoEeO.js";var dt=class{constructor(e){this.config={},this.defaults=e}extend(e){return e&&(this.defaults={...this.defaults,...e}),this}replace(e){this.config=e}get(e){return Ue(this.config,e)?M(this.config,e):M(this.defaults,e)}set(e,t){typeof e=="string"?L(this.config,e,t):Object.entries(e).forEach(([r,s])=>{L(this.config,r,s)})}},W=new dt({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0},future:{preserveEqualProps:!1,useDataInertiaHeadAttribute:!1,useDialogForErrorModal:!1,useScriptElementForInitialPage:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function ge(e,t){let r;return function(...s){clearTimeout(r),r=setTimeout(()=>e.apply(this,s),t)}}function R(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var Ae=e=>R("before",{cancelable:!0,detail:{visit:e}}),ft=e=>R("error",{detail:{errors:e}}),pt=e=>R("exception",{cancelable:!0,detail:{exception:e}}),mt=e=>R("finish",{detail:{visit:e}}),gt=e=>R("invalid",{cancelable:!0,detail:{response:e}}),vt=e=>R("beforeUpdate",{detail:{page:e}}),Y=e=>R("navigate",{detail:{page:e}}),yt=e=>R("progress",{detail:{progress:e}}),wt=e=>R("start",{detail:{visit:e}}),Pt=e=>R("success",{detail:{page:e}}),St=(e,t)=>R("prefetched",{detail:{fetchedAt:Date.now(),response:e.data,visit:t}}),bt=e=>R("prefetching",{detail:{visit:e}}),ie=e=>R("flash",{detail:{flash:e}}),x=class{static set(e,t){typeof window<"u"&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if(typeof window<"u")return JSON.parse(window.sessionStorage.getItem(e)||"null")}static merge(e,t){const r=this.get(e);r===null?this.set(e,t):this.set(e,{...r,...t})}static remove(e){typeof window<"u"&&window.sessionStorage.removeItem(e)}static removeNested(e,t){const r=this.get(e);r!==null&&(delete r[t],this.set(e,r))}static exists(e){try{return this.get(e)!==null}catch{return!1}}static clear(){typeof window<"u"&&window.sessionStorage.clear()}};x.locationVisitKey="inertiaLocationVisit";var Et=async e=>{if(typeof window>"u")throw new Error("Unable to encrypt history");const t=Me(),r=await Le(),s=await xt(r);if(!s)throw new Error("Unable to encrypt history");return await Tt(t,s,e)},J={key:"historyKey",iv:"historyIv"},Ct=async e=>{const t=Me(),r=await Le();if(!r)throw new Error("Unable to decrypt history");return await Ft(t,r,e)},Tt=async(e,t,r)=>{if(typeof window>"u")throw new Error("Unable to encrypt history");if(typeof window.crypto.subtle>"u")return console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve(r);const s=new TextEncoder,n=JSON.stringify(r),i=new Uint8Array(n.length*3),l=s.encodeInto(n,i);return window.crypto.subtle.encrypt({name:"AES-GCM",iv:e},t,i.subarray(0,l.written))},Ft=async(e,t,r)=>{if(typeof window.crypto.subtle>"u")return console.warn("Decryption is not supported in this environment. SSL is required."),Promise.resolve(r);const s=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,r);return JSON.parse(new TextDecoder().decode(s))},Me=()=>{const e=x.get(J.iv);if(e)return new Uint8Array(e);const t=window.crypto.getRandomValues(new Uint8Array(12));return x.set(J.iv,Array.from(t)),t},At=async()=>typeof window.crypto.subtle>"u"?(console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve(null)):window.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"]),qt=async e=>{if(typeof window.crypto.subtle>"u")return console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve();const t=await window.crypto.subtle.exportKey("raw",e);x.set(J.key,Array.from(new Uint8Array(t)))},xt=async e=>{if(e)return e;const t=await At();return t?(await qt(t),t):null},Le=async()=>{const e=x.get(J.key);return e?await window.crypto.subtle.importKey("raw",new Uint8Array(e),{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]):null},Be=(e,t,r)=>{if(e===t)return!0;for(const s in e)if(!r.includes(s)&&e[s]!==t[s]&&!It(e[s],t[s]))return!1;for(const s in t)if(!r.includes(s)&&!(s in e))return!1;return!0},It=(e,t)=>
1{switch(typeof e){case"object":return Be(e,t,[]);case"function":return e.toString()===t.toString();default:return e===t}},Ot={ms:1,s:1e3,m:1e3*60,h:1e3*60*60,d:1e3*60*60*24},qe=e=>{if(typeof e=="number")return e;for(const[t,r]of Object.entries(Ot))if(e.endsWith(t))return parseFloat(e)*r;return parseInt(e)},kt=class{constructor(){this.cached=[],this.inFlightRequests=[],this.removalTimers=[],this.currentUseId=null}add(e,t,{cacheFor:r,cacheTags:s}){if(this.findInFlight(e))return Promise.resolve();const i=this.findCached(e);if(!e.fresh&&i&&i.staleTimestamp>Date.now())return Promise.resolve();const[l,h]=this.extractStaleValues(r),a=new Promise((p,m)=>{t({...e,onCancel:()=>{this.remove(e),e.onCancel(),m()},onError:c=>{this.remove(e),e.onError(c),m()},onPrefetching(c){e.onPrefetching(c)},onPrefetched(c,P){e.onPrefetched(c,P)},onPrefetchResponse(c){p(c)},onPrefetchError(c){U.removeFromInFlight(e),m(c)}})}).then(p=>{this.remove(e);const m=p.getPageResponse();d.mergeOncePropsIntoResponse(m),this.cached.push({params:{...e},staleTimestamp:Date.now()+l,expiresAt:Date.now()+h,response:a,singleUse:h===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(s)?s:[s]});const c=this.getShortestOncePropTtl(m);return this.scheduleForRemoval(e,c?Math.min(h,c):h),this.removeFromInFlight(e),p.handlePrefetch(),p});return this.inFlightRequests.push({params:{...e},response:a,staleTimestamp:null,inFlight:!0}),a}removeAll(){this.cached=[],this.removalTimers.forEach(e=>{clearTimeout(e.timer)}),this.removalTimers=[]}removeByTags(e){this.cached=this.cached.filter(t=>!t.tags.some(r=>e.includes(r)))}remove(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)),this.clearTimer(e)}removeFromInFlight(e){this.inFlightRequests=this.inFlightRequests.filter(t=>!this.paramsAreEqual(t.params,e))}extractStaleValues(e){const[t,r]=this.cacheForToStaleAndExpires(e);return[qe(t),qe(r)]}cacheForToStaleAndExpires(e){if(!Array.isArray(e))return[e,e];switch(e.length){case 0:return[0,0];case 1:return[e[0],e[0]];default:return[e[0],e[1]]}}clearTimer(e){const t=this.removalTimers.find(r=>this.paramsAreEqual(r.params,e));t&&(clearTimeout(t.timer),this.removalTimers=this.removalTimers.filter(r=>r!==t))}scheduleForRemoval(e,t){if(!(typeof window>"u")&&(this.clearTimer(e),t>0)){const r=window.setTimeout(()=>this.remove(e),t);this.removalTimers.push({params:e,timer:r})}}get(e){return this.findCached(e)||this.findInFlight(e)}use(e,t){const r=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=r,e.response.then(s=>{if(this.currentUseId===r)return s.mergeParams({...t,onPrefetched:()=>{}}),this.removeSingleUseItems(t),s.handle()})}removeSingleUseItems(e){this.cached=this.cached.filter(t=>this.paramsAreEqual(t.params,e)?!t.singleUse:!0)}findCached(e){return this.cached.find(t=>this.paramsAreEqual(t.params,e))||null}findInFlight(e){return this.inFlightRequests.find(t=>this.paramsAreEqual(t.params,e))||null}withoutPurposePrefetchHeader(e){const t=A(e);return t.headers.Purpose==="prefetch"&&delete t.headers.Purpose,t}paramsAreEqual(e,t){return Be(this.withoutPurposePrefetchHeader(e),this.withoutPurposePrefetchHeader(t),["showProgress","replace","prefetch","preserveScroll","preserveState","onBefore","onBeforeUpdate","onStart","onProgress","onFinish","onCancel","onSuccess","onError","onFlash","onPrefetched","onCancelToken","onPrefetching","async","viewTransition"])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(e=>{e.response.then(t=>{const r=t.getPageResponse();d.mergeOncePropsIntoResponse(r,{force:!0});for(const[l,h]of Object.entries(r.deferredProps??{})){const a=h.filter(p=>r.props[p]===void 0);a.length>0?r.deferredProps[l]=a:delete r.deferredProps[l]}const s=this.getShortestOncePropTtl(r);if(s===null)return;const n=e.expiresAt-Date.now(),i=Math.min(n,s);i>0?this.scheduleForRemoval(e.params,i):this.remove(e.params)})})}getShortestOncePropTtl(e){const t=Object.values(e.onceProps??{}).map(r=>r.expiresAt).filter(r=>!!r);return t.length===0?null:Math.min(...t)-Date.now()}},U=new kt,Ne=(e,t=1)=>{window.requestAnimationFrame(()=>{t>1?Ne(e,t-1):e()})},Dt=(e,t=!1)=>
1{if(typeof window>"u")return null;if(!t){const s=document.getElementById(e);if(s!=null&&s.dataset.page)return JSON.parse(s.dataset.page)}const r=document.querySelector(`script[data-page="${e}"][type="application/json"]`);return r!=null&&r.textContent?JSON.parse(r.textContent):null},G=typeof window>"u",Rt=!G&&/Firefox/i.test(window.navigator.userAgent),I=class{static save(){y.saveScrollPositions(this.getScrollRegions())}static getScrollRegions(){return Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))}static regions(){return document.querySelectorAll("[scroll-region]")}static scrollToTop(){if(Rt&&getComputedStyle(document.documentElement).scrollBehavior==="smooth")return Ne(()=>window.scrollTo(0,0),2);window.scrollTo(0,0)}static reset(){(G?null:window.location.hash)||this.scrollToTop(),this.regions().forEach(t=>{typeof t.scrollTo=="function"?t.scrollTo(0,0):(t.scrollTop=0,t.scrollLeft=0)}),this.save(),this.scrollToAnchor()}static scrollToAnchor(){const e=G?null:window.location.hash;e&&setTimeout(()=>{const t=document.getElementById(e.slice(1));t?t.scrollIntoView():this.scrollToTop()})}static restore(e){G||window.requestAnimationFrame(()=>{this.restoreDocument(),this.restoreScrollRegions(e)})}static restoreScrollRegions(e){G||this.regions().forEach((t,r)=>{const s=e[r];s&&(typeof t.scrollTo=="function"?t.scrollTo(s.left,s.top):(t.scrollTop=s.top,t.scrollLeft=s.left))})}static restoreDocument(){const e=y.getDocumentScrollPosition();window.scrollTo(e.left,e.top)}static onScroll(e){const t=e.target;typeof t.hasAttribute=="function"&&t.hasAttribute("scroll-region")&&this.save()}static onWindowScroll(){y.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}},$t=e=>typeof File<"u"&&e instanceof File||e instanceof Blob||typeof FileList<"u"&&e instanceof FileList&&e.length>0;function ve(e){return $t(e)||e instanceof FormData&&Array.from(e.values()).some(t=>ve(t))||typeof e=="object"&&e!==null&&Object.values(e).some(t=>ve(t))}var ye=e=>e instanceof FormData;function _e(e,t=new FormData,r=null,s="brackets"){e=e||{};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&We(t,Ve(r,n,"indices"),e[n],s);return t}function Ve(e,t,r){return e?r==="brackets"?`${e}[]`:`${e}[${t}]`:t}function We(e,t,r,s){if(Array.isArray(r))return Array.from(r.keys()).forEach(n=>We(e,Ve(t,n.toString(),s),r[n],s));if(r instanceof Date)return e.append(t,r.toISOString());if(r instanceof File)return e.append(t,r,r.name);if(r instanceof Blob)return e.append(t,r);if(typeof r=="boolean")return e.append(t,r?"1":"0");if(typeof r=="string")return e.append(t,r);if(typeof r=="number")return e.append(t,`${r}`);if(r==null)return e.append(t,"");_e(r,e,t,s)}function B(e){return new URL(e.toString(),typeof window>"u"?void 0:window.location.toString())}var Ht=(e,t,r,s,n)=>{let i=typeof e=="string"?B(e):e;if((ve(t)||s)&&!ye(t)&&(W.get("form.forceIndicesArrayFormatInFormData")&&(n="indices"),t=_e(t,new FormData,null,n)),ye(t))return[i,t];const[l,h]=Ke(r,i,t,n);return[B(l),h]};function Ke(e,t,r,s="brackets"){const n=e==="get"&&!ye(r)&&Object.keys(r).length>0,i=jt(t.toString()),l=i||t.toString().startsWith("/")||t.toString()==="",h=!l&&!t.toString().startsWith("#")&&!t.toString().startsWith("?"),a=/^[.]{1,2}([/]|$)/.test(t.toString()),p=t.toString().includes("?")||n,m=t.toString().includes("#"),c=new URL(t.toString(),typeof window>"u"?"http://localhost":window.location.toString());if(n){const P=/\[\d+\]/.test(decodeURIComponent(c.search)),S={ignoreQueryPrefix:!0,allowSparse:!0};c.search=Ee.stringify({...Ee.parse(c.search,S),...r},{encodeValuesOnly:!0,arrayFormat:P?"indices":s})}return[[i?`${c.protocol}//${c.host}`:"",l?c.pathname:"",h?c.pathname.substring(a?0:1):"",p?c.search:"",m?c.hash:""].join(""),n?{}:r]}function oe(e){return e=new URL(e.href),e.hash="",e}var xe=(e,t)=>{e.hash&&!t.hash&&oe(e).href===t.href&&(t.hash=e.hash)},ae=(e,t)=>oe(e).href===oe(t).href,Ut=(e,t)=>e.origin===t.origin&&e.pathname===t.pathname;function X(e){return e!==null&&typeof e=="object"&&e!==void 0&&"url"in e&&"method"in e}function jt(e){return/^([a-z][a-z0-9+.-]*:)?\/\/[^/]/i.test(e)}var Mt=class{constructor(){this.componentId={},this.listeners=[],this.isFirstPageLoad=!0,this.cleared=!1,this.pendingDeferredProps=null,this.historyQuotaExceeded=!1}
1init({initialPage:e,swapComponent:t,resolveComponent:r,onFlash:s}){return this.page={...e,flash:e.flash??{}},this.swapComponent=t,this.resolveComponent=r,this.onFlashCallback=s,j.on("historyQuotaExceeded",()=>{this.historyQuotaExceeded=!0}),this}set(e,{replace:t=!1,preserveScroll:r=!1,preserveState:s=!1,viewTransition:n=!1}={}){Object.keys(e.deferredProps||{}).length&&(this.pendingDeferredProps={deferredProps:e.deferredProps,component:e.component,url:e.url},e.initialDeferredProps===void 0&&(e.initialDeferredProps=e.deferredProps)),this.componentId={};const i=this.componentId;return e.clearHistory&&y.clear(),this.resolve(e.component).then(l=>{if(i!==this.componentId)return;e.rememberedState??(e.rememberedState={});const h=typeof window>"u",a=h?new URL(e.url):window.location,p=!h&&r?I.getScrollRegions():[];t=t||ae(B(e.url),a);const m={...e,flash:{}};return new Promise(c=>t?y.replaceState(m,c):y.pushState(m,c)).then(()=>{const c=!this.isTheSame(e);if(!c&&Object.keys(e.props.errors||{}).length>0&&(n=!1),this.page=e,this.cleared=!1,this.hasOnceProps()&&U.updateCachedOncePropsFromCurrentPage(),c&&this.fireEventsFor("newComponent"),this.isFirstPageLoad&&this.fireEventsFor("firstLoad"),this.isFirstPageLoad=!1,this.historyQuotaExceeded){this.historyQuotaExceeded=!1;return}return this.swap({component:l,page:e,preserveState:s,viewTransition:n}).then(()=>{r?window.requestAnimationFrame(()=>I.restoreScrollRegions(p)):I.reset(),this.pendingDeferredProps&&this.pendingDeferredProps.component===e.component&&this.pendingDeferredProps.url===e.url&&j.fireInternalEvent("loadDeferredProps",this.pendingDeferredProps.deferredProps),this.pendingDeferredProps=null,t||Y(e)})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component).then(r=>(this.page=e,this.cleared=!1,y.setCurrent(e),this.swap({component:r,page:e,preserveState:t,viewTransition:!1})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}getWithoutFlashData(){return{...this.page,flash:{}}}hasOnceProps(){return Object.keys(this.page.onceProps??{}).length>0}merge(e){this.page={...this.page,...e}}setFlash(e){var t;this.page={...this.page,flash:e},(t=this.onFlashCallback)==null||t.call(this,e)}setUrlHash(e){this.page.url.includes(e)||(this.page.url+=e)}remember(e){this.page.rememberedState=e}swap({component:e,page:t,preserveState:r,viewTransition:s}){const n=()=>this.swapComponent({component:e,page:t,preserveState:r});if(!s||!(document!=null&&document.startViewTransition))return n();const i=typeof s=="boolean"?()=>null:s;return new Promise(l=>{const h=document.startViewTransition(()=>n().then(l));i(h)})}resolve(e){return Promise.resolve(this.resolveComponent(e))}isTheSame(e){return this.page.component===e.component}on(e,t){return this.listeners.push({event:e,callback:t}),()=>{this.listeners=this.listeners.filter(r=>r.event!==e&&r.callback!==t)}}fireEventsFor(e){this.listeners.filter(t=>t.event===e).forEach(t=>t.callback())}mergeOncePropsIntoResponse(e,{force:t=!1}={}){Object.entries(e.onceProps??{}).forEach(([r,s])=>{var i;const n=(i=this.page.onceProps)==null?void 0:i[r];n!==void 0&&(t||e.props[s.prop]===void 0)&&(e.props[s.prop]=this.page.props[n.prop],e.onceProps[r].expiresAt=n.expiresAt)})}},d=new Mt,be=class{constructor(){this.items=[],this.processingPromise=null}add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??(this.processingPromise=this.processNext().finally(()=>{this.processingPromise=null})),this.processingPromise}processNext(){const e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}},Q=typeof window>"u",z=new be,Ie=!Q&&/CriOS/.test(window.navigator.userAgent),Lt=class{constructor(){this.rememberedState="rememberedState",this.scrollRegions="scrollRegions",this.preserveUrl=!1,this.current={},this.initialState=null}remember(e,t){var r;this.replaceState({...d.getWithoutFlashData(),rememberedState:{...((r=d.get())==null?void 0:r.rememberedState)??{},[t]:e}})}restore(e){var t,r,s,n;if(!Q)return((t=this.current[this.rememberedState])==null?void 0:t[e])!==void 0?(r=this.current[this.rememberedState])==null?void 0:r[e]:(n=(s=this.initialState)==null?void 0:s[this.rememberedState])==null?void 0:n[e]}pushState(e,t=null){if(!Q){if(this.preserveUrl){t&&t();return}this.current=e,z.add(()=>this.getPageData(e).then(r=>{const s=()=>this.doPushState({page:r},e.url).then(()=>t==null?void 0:t());return Ie?new Promise(n=>{setTimeout(()=>s().then(n))}):s()}))}}clonePageProps(e){try{return structuredClone(e.props),e}catch{return{...e,props:A(e.props)}}}getPageData(e){const t=this.clonePageProps(e);return new Promise(r=>e.encryptHistory?Et(t).then(r):r(t))}processQueue(){return z.process()}decrypt(e=null){var r;if(Q)return Promise.resolve(e??d.get());const t=e??((r=window.history.state)==null?void 0:r.page);return this.decryptPageData(t).then(s=>{if(!s)throw new Error("Unable to decrypt history");return this.initialState===null?this.initialState=s??void 0:this.current=s??{},s})}decryptPageData(e){return e instanceof ArrayBuffer?Ct(e):Promise.resolve(e)}saveScrollPositions(e){z.add(()=>Promise.resolve().then(()=>{var t;if((t=window.history.state)!=null&&t.page&&!_(this.getScrollRegions(),e))return this.doReplaceState({page:window.history.state.page,scrollRegions:e})}))}saveDocumentScrollPosition(e){z.add(()=>Promise.resolve().then(()=>{var t;if((t=window.history.state)!=null&&t.page&&!_(this.getDocumentScrollPosition(),e))return this.doReplaceState({page:window.history.state.page,documentScrollPosition:e})}))}getScrollRegions(){var e;return((e=window.history.state)==null?void 0:e.scrollRegions)||[]}getDocumentScrollPosition(){var e;return((e=window.history.state)==null?void 0:e.documentScrollPosition)||{top:0,left:0}}replaceState(e,t=null){if(_(this.current,e)){t&&t();return}if(d.merge(e),!Q){if(this.preserveUrl){t&&t();return}this.current=e,z.add(()=>this.getPageData(e).then(r=>{const s=()=>this.doReplaceState({page:r},e.url).then(()=>t==null?void 0:t());return Ie?new Promise(n=>{setTimeout(()=>s().then(n))}):s()}))}}isHistoryThrottleError(e){return e instanceof Error&&e.name==="SecurityError"&&(e.message.includes("history.pushState")||e.message.includes("history.replaceState"))}isQuotaExceededError(e){return e instanceof Error&&e.name==="QuotaExceededError"}withThrottleProtection(e){return Promise.resolve().then(()=>{try{return e()}catch(t){if(!this.isHistoryThrottleError(t))throw t;console.error(t.message)}})}doReplaceState(e,t){return this.withThrottleProtection(()=>{var r,s;window.history.replaceState({...e,scrollRegions:e.scrollRegions??((r=window.history.state)==null?void 0:r.scrollRegions),documentScrollPosition:e.documentScrollPosition??((s=window.history.state)==null?void 0:s.documentScrollPosition)},"",t)})}doPushState(e,t){return this.withThrottleProtection(()=>{try{window.history.pushState(e,"",t)}catch(r){if(!this.isQuotaExceededError(r))throw r;j.fireInternalEvent("historyQuotaExceeded",t)}})}getState(e,t){var r;return((r=this.current)==null?void 0:r[e])??t}deleteState(e){this.current[e]!==void 0&&(delete this.current[e],this.replaceState(this.current))}clearInitialState(e){this.initialState&&this.initialState[e]!==void 0&&delete this.initialState[e]}browserHasHistoryEntry(){var e;return!Q&&!!((e=window.history.state)!=null&&e.page)}clear(){x.remove(J.key),x.remove(J.iv)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}};typeof window<"u"&&window.history.scrollRestoration&&(window.history.scrollRestoration="manual");var y=new Lt,Bt=class{constructor(){this.internalListeners=[]}init(){typeof window<"u"&&(window.addEventListener("popstate",this.handlePopstateEvent.bind(this)),window.addEventListener("scroll",ge(I.onWindowScroll.bind(I),100),!0)),typeof document<"u"&&document.addEventListener("scroll",ge(I.onScroll.bind(I),100),!0)}onGlobalEvent(e,t){const r=(s=>{const n=t(s);s.cancelable&&!s.defaultPrevented&&n===!1&&s.preventDefault()});return this.registerListener(`inertia:${e}`,r)}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(r=>r.listener!==t)}}onMissingHistoryItem(){d.clear(),this.fireInternalEvent("missingHistoryItem")}fireInternalEvent(e,...t){this.internalListeners.filter(r=>r.event===e).forEach(r=>r.listener(...t))}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePopstateEvent(e){const t=e.state||null;if(t===null){const r=B(d.get().url);r.hash=window.location.hash,y.replaceState({...d.getWithoutFlashData(),url:r.href}),I.reset();return}if(!y.isValidState(t))return this.onMissingHistoryItem();y.decrypt(t.page).then(r=>{if(d.get().version!==r.version){this.onMissingHistoryItem();return}T.cancelAll({prefetch:!1}),d.setQuietly(r,{preserveState:!1}).then(()=>{I.restore(y.getScrollRegions()),Y(d.get());const s={},n=d.get().props;for(const[i,l]of Object.entries(r.initialDeferredProps??r.deferredProps??{})){const h=l.filter(a=>n[a]===void 0);h.length>0&&(s[i]=h)}Object.keys(s).length>0&&this.fireInternalEvent("loadDeferredProps",s)})}).catch(()=>{this.onMissingHistoryItem()})}},j=new Bt,Nt=class{constructor(){this.type=this.resolveType()}resolveType(){return typeof window>
1"u"?"navigate":window.performance&&window.performance.getEntriesByType&&window.performance.getEntriesByType("navigation").length>0?window.performance.getEntriesByType("navigation")[0].type:"navigate"}get(){return this.type}isBackForward(){return this.type==="back_forward"}isReload(){return this.type==="reload"}},ue=new Nt,_t=class{static handle(){this.clearRememberedStateOnReload(),[this.handleBackForward,this.handleLocation,this.handleDefault].find(t=>t.bind(this)())}static clearRememberedStateOnReload(){ue.isReload()&&(y.deleteState(y.rememberedState),y.clearInitialState(y.rememberedState))}static handleBackForward(){if(!ue.isBackForward()||!y.browserHasHistoryEntry())return!1;const e=y.getScrollRegions();return y.decrypt().then(t=>{d.set(t,{preserveScroll:!0,preserveState:!0}).then(()=>{I.restore(e),Y(d.get())})}).catch(()=>{j.onMissingHistoryItem()}),!0}static handleLocation(){if(!x.exists(x.locationVisitKey))return!1;const e=x.get(x.locationVisitKey)||{};return x.remove(x.locationVisitKey),typeof window<"u"&&d.setUrlHash(window.location.hash),y.decrypt(d.get()).then(()=>{const t=y.getState(y.rememberedState,{}),r=y.getScrollRegions();d.remember(t),d.set(d.get(),{preserveScroll:e.preserveScroll,preserveState:!0}).then(()=>{e.preserveScroll&&I.restore(r),Y(d.get())})}).catch(()=>{j.onMissingHistoryItem()}),!0}static handleDefault(){typeof window<"u"&&d.setUrlHash(window.location.hash),d.set(d.get(),{preserveScroll:!0,preserveState:!0}).then(()=>{ue.isReload()?I.restore(y.getScrollRegions()):I.scrollToAnchor();const e=d.get();Y(e);const t=e.flash;Object.keys(t).length>0&&queueMicrotask(()=>ie(t))})}},Vt=class{constructor(e,t,r){this.id=null,this.throttle=!1,this.keepAlive=!1,this.cbCount=0,this.keepAlive=r.keepAlive??!1,this.cb=t,this.interval=e,(r.autoStart??!0)&&this.start()}stop(){this.id&&clearInterval(this.id)}start(){typeof window>"u"||(this.stop(),this.id=window.setInterval(()=>{(!this.throttle||this.cbCount%10===0)&&this.cb(),this.throttle&&this.cbCount++},this.interval))}isInBackground(e){this.throttle=this.keepAlive?!1:e,this.throttle&&(this.cbCount=0)}},Wt=class{constructor(){this.polls=[],this.setupVisibilityListener()}add(e,t,r){const s=new Vt(e,t,r);return this.polls.push(s),{stop:()=>s.stop(),start:()=>s.start()}}clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){typeof document>"u"||document.addEventListener("visibilitychange",()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},Kt=new Wt,we=class se{constructor(t){if(this.callbacks=[],!t.prefetch)this.params=t;else{const r={onBefore:this.wrapCallback(t,"onBefore"),onBeforeUpdate:this.wrapCallback(t,"onBeforeUpdate"),onStart:this.wrapCallback(t,"onStart"),onProgress:this.wrapCallback(t,"onProgress"),onFinish:this.wrapCallback(t,"onFinish"),onCancel:this.wrapCallback(t,"onCancel"),onSuccess:this.wrapCallback(t,"onSuccess"),onError:this.wrapCallback(t,"onError"),onFlash:this.wrapCallback(t,"onFlash"),onCancelToken:this.wrapCallback(t,"onCancelToken"),onPrefetched:this.wrapCallback(t,"onPrefetched"),onPrefetching:this.wrapCallback(t,"onPrefetching")};this.params={...t,...r,onPrefetchResponse:t.onPrefetchResponse||(()=>{}),onPrefetchError:t.onPrefetchError||(()=>{})}}}static create(t){return new se(t)}data(){return this.params.method==="get"?null:this.params.data}queryParams(){return this.params.method==="get"?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}isPrefetch(){return this.params.prefetch===!0}isDeferredPropsRequest(){return this.params.deferredProps===!0}onCancelToken(t){this.params.onCancelToken({cancel:t})}markAsFinished(){this.params.completed=!0,this.params.cancelled=!1,this.params.interrupted=!1}markAsCancelled({cancelled:t=!0,interrupted:r=!1}){this.params.onCancel(),this.params.completed=!1,this.params.cancelled=t,this.params.interrupted=r}wasCancelledAtAll(){return this.params.cancelled||this.params.interrupted}onFinish(){this.params.onFinish(this.params)}onStart(){this.params.onStart(this.params)}onPrefetching(){this.params.onPrefetching(this.params)}onPrefetchResponse(t){this.params.onPrefetchResponse&&this.params.onPrefetchResponse(t)}onPrefetchError(t){this.params.onPrefetchError&&this.params.onPrefetchError(t)}all(){return this.params}headers(){const t={...this.params.headers};this.isPartial()&&(t["X-Inertia-Partial-Component"]=d.get().component);const r=this.params.only.concat(this.params.reset);return r.length>0&&(t["X-Inertia-Partial-Data"]=r.join(",")),this.params.except.length>0&&(t["X-Inertia-Partial-Except"]=this.params.except.join(",")),this.params.reset.length>0&&(t["X-Inertia-Reset"]=this.params.reset.join(",")),this.params.errorBag&&this.params.errorBag.length>0&&(t["X-Inertia-Error-Bag"]=this.params.errorBag),t}setPreserveOptions(t){this.params.preserveScroll=se.resolvePreserveOption(this.params.preserveScroll,t),this.params.preserveState=se.resolvePreserveOption(this.params.preserveState,t)}runCallbacks(){this.callbacks.forEach(({name:t,args:r})=>{this.params[t](...r)})}merge(t){this.params={...this.params,...t}}wrapCallback(t,r){return(...s)=>{this.recordCallback(r,s),t[r](...s)}}recordCallback(t,r){this.callbacks.push({name:t,args:r})}static resolvePreserveOption(t,r){return typeof t=="function"?t(r):t==="errors"?Object.keys(r.props.errors||{}).length>0:t}},Qe={modal:null,listener:null,createIframeAndPage(e){typeof e=="object"&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.<hr>${JSON.stringify(e)}`);const t=document.createElement("html");t.innerHTML=e,t.querySelectorAll("a").forEach(s=>s.setAttribute("target","_top"));const r=document.createElement("iframe");return r.style.backgroundColor="white",r.style.borderRadius="5px",r.style.width="100%",r.style.height="100%",{iframe:r,page:t}},show(e){const{iframe:t,page:r}=this.createIframeAndPage(e);if(this.modal=document.createElement("div"),this.modal.style.position="fixed",this.modal.style.width="100vw",this.modal.style.height="100vh",this.modal.style.padding="50px",this.modal.style.boxSizing="border-box",this.modal.style.backgroundColor="rgba(0, 0, 0, .6)",this.modal.style.zIndex=2e5,this.modal.addEventListener("click",()=>this.hide()),this.modal.appendChild(t),document.body.prepend(this.modal),document.body.style.overflow="hidden",!t.contentWindow)throw new Error("iframe not yet ready.");t.contentWindow.document.open(),t.contentWindow.document.write(r.outerHTML),t.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener("keydown",this.listener)},hide(){this.modal.outerHTML="",this.modal=null,document.body.style.overflow="visible",document.removeEventListener("keydown",this.listener)},hideOnEscape(e){e.keyCode===27&&this.hide()}},Qt={show(e){const{iframe:t,page:r}=Qe.createIframeAndPage(e);t.style.boxSizing="border-box",t.style.display="block";const s=document.createElement("dialog");s.id="inertia-error-dialog",Object.assign(s.style,{width:"calc(100vw - 100px)",height:"calc(100vh - 100px)",padding:"0",margin:"auto",border:"none",backgroundColor:"transparent"});const n=document.createElement("style");if(n.textContent=`
2      dialog#inertia-error-dialog::backdrop {
3        background-color: rgba(0, 0, 0, 0.6);
4      }
5
6      dialog#inertia-error-dialog:focus {
7        outline: none;
8      }
9    `,document.head.appendChild(n),s.addEventListener("click",i=>{i.target===s&&s.close()}),s.addEventListener("close",()=>{n.remove(),s.remove()}),s.appendChild(t),document.body.prepend(s),s.showModal(),s.focus(),!t.contentWindow)throw new Error("iframe not yet ready.");t.contentWindow.document.open(),t.contentWindow.document.write(r.outerHTML),t.contentWindow.document.close()}}
9,Jt=new be,Oe=class Je{constructor(t,r,s){this.requestParams=t,this.response=r,this.originatingPage=s,this.wasPrefetched=!1}static create(t,r,s){return new Je(t,r,s)}async handlePrefetch(){ae(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return Jt.add(()=>this.process())}async process(){if(this.requestParams.all().prefetch)return this.wasPrefetched=!0,this.requestParams.all().prefetch=!1,this.requestParams.all().onPrefetched(this.response,this.requestParams.all()),St(this.response,this.requestParams.all()),Promise.resolve();if(this.requestParams.runCallbacks(),!this.isInertiaResponse())return this.handleNonInertiaResponse();await y.processQueue(),y.preserveUrl=this.requestParams.all().preserveUrl;const t=d.get().flash;await this.setPage();const r=d.get().props.errors||{};if(Object.keys(r).length>0){const n=this.getScopedErrors(r);return ft(n),this.requestParams.all().onError(n)}T.flushByCacheTags(this.requestParams.all().invalidateCacheTags||[]),this.wasPrefetched||T.flush(d.get().url);const{flash:s}=d.get();Object.keys(s).length>0&&(!this.requestParams.isPartial()||!_(s,t))&&(ie(s),this.requestParams.all().onFlash(s)),Pt(d.get()),await this.requestParams.all().onSuccess(d.get()),y.preserveUrl=!1}mergeParams(t){this.requestParams.merge(t)}getPageResponse(){const t=this.getDataFromResponse(this.response.data);return typeof t=="object"?this.response.data={...t,flash:t.flash??{}}:this.response.data=t}async handleNonInertiaResponse(){if(this.isLocationVisit()){const r=B(this.getHeader("x-inertia-location"));return xe(this.requestParams.all().url,r),this.locationVisit(r)}const t={...this.response,data:this.getDataFromResponse(this.response.data)};if(gt(t))return W.get("future.useDialogForErrorModal")?Qt.show(t.data):Qe.show(t.data)}isInertiaResponse(){return this.hasHeader("x-inertia")}hasStatus(t){return this.response.status===t}getHeader(t){return this.response.headers[t]}hasHeader(t){return this.getHeader(t)!==void 0}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader("x-inertia-location")}locationVisit(t){try{if(x.set(x.locationVisitKey,{preserveScroll:this.requestParams.all().preserveScroll===!0}),typeof window>"u")return;ae(window.location,t)?window.location.reload():window.location.href=t.href}catch{return!1}}async setPage(){const t=this.getPageResponse();return this.shouldSetPage(t)?(this.mergeProps(t),d.mergeOncePropsIntoResponse(t),this.preserveEqualProps(t),await this.setRememberedState(t),this.requestParams.setPreserveOptions(t),t.url=y.preserveUrl?d.get().url:this.pageUrl(t),this.requestParams.all().onBeforeUpdate(t),vt(t),d.set(t,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState,viewTransition:this.requestParams.all().viewTransition})):Promise.resolve()}getDataFromResponse(t){if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}}shouldSetPage(t){if(!this.requestParams.all().async||this.originatingPage.component!==t.component)return!0;if(this.originatingPage.component!==d.get().component)return!1;const r=B(this.originatingPage.url),s=B(d.get().url);return r.origin===s.origin&&r.pathname===s.pathname}pageUrl(t){const r=B(t.url);return xe(this.requestParams.all().url,r),r.pathname+r.search+r.hash}preserveEqualProps(t){if(t.component!==d.get().component||W.get("future.preserveEqualProps")!==!0)return;const r=d.get().props;Object.entries(t.props).forEach(([s,n])=>{_(n,r[s])&&(t.props[s]=r[s])})}mergeProps(t){if(!this.requestParams.isPartial()||t.component!==d.get().component)return;const r=t.mergeProps||[],s=t.prependProps||[],n=t.deepMergeProps||[],i=t.matchPropsOn||[],l=(a,p)=>{const m=M(d.get().props,a),c=M(t.props,a);if(Array.isArray(c)){const P=this.mergeOrMatchItems(m||[],c,a,i,p);L(t.props,a,P)}else if(typeof c=="object"&&c!==null){const P={...m||{},...c};L(t.props,a,P)}};if(r.forEach(a=>l(a,!0)),s.forEach(a=>l(a,!1)),n.forEach(a=>{const p=d.get().props[a],m=t.props[a],c=(P,S,u)=>Array.isArray(S)?this.mergeOrMatchItems(P,S,u,i):typeof S=="object"&&S!==null?Ob
9ject.keys(S).reduce((o,v)=>(o[v]=c(P?P[v]:void 0,S[v],`${u}.${v}`),o),{...P}):S;t.props[a]=c(p,m,a)}),t.props={...d.get().props,...t.props},this.requestParams.isDeferredPropsRequest()){const a=d.get().props.errors;a&&Object.keys(a).length>0&&(t.props.errors=a)}d.get().scrollProps&&(t.scrollProps={...d.get().scrollProps||{},...t.scrollProps||{}}),d.hasOnceProps()&&(t.onceProps={...d.get().onceProps||{},...t.onceProps||{}}),t.flash={...d.get().flash,...this.requestParams.isDeferredPropsRequest()?{}:t.flash};const h=d.get().initialDeferredProps;h&&Object.keys(h).length>0&&(t.initialDeferredProps=h)}mergeOrMatchItems(t,r,s,n,i=!0){const l=Array.isArray(t)?t:[],h=n.find(m=>m.split(".").slice(0,-1).join(".")===s);if(!h)return i?[...l,...r]:[...r,...l];const a=h.split(".").pop()||"",p=new Map;return r.forEach(m=>{this.hasUniqueProperty(m,a)&&p.set(m[a],m)}),i?this.appendWithMatching(l,r,p,a):this.prependWithMatching(l,r,p,a)}appendWithMatching(t,r,s,n){const i=t.map(h=>this.hasUniqueProperty(h,n)&&s.has(h[n])?s.get(h[n]):h),l=r.filter(h=>this.hasUniqueProperty(h,n)?!t.some(a=>this.hasUniqueProperty(a,n)&&a[n]===h[n]):!0);return[...i,...l]}prependWithMatching(t,r,s,n){const i=t.filter(l=>this.hasUniqueProperty(l,n)?!s.has(l[n]):!0);return[...r,...i]}hasUniqueProperty(t,r){return t&&typeof t=="object"&&r in t}async setRememberedState(t){const r=await y.getState(y.rememberedState,{});this.requestParams.all().preserveState&&r&&t.component===d.get().component&&(t.rememberedState=r)}getScopedErrors(t){return this.requestParams.all().errorBag?t[this.requestParams.all().errorBag||""]||{}:t}},ke=class Xe{constructor(t,r){this.page=r,this.requestHasFinished=!1,this.requestParams=we.create(t),this.cancelToken=new AbortController}static create(t,r){return new Xe(t,r)}isPrefetch(){return this.requestParams.isPrefetch()}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),wt(this.requestParams.all()),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),bt(this.requestParams.all()));const t=this.requestParams.all().prefetch;return Ce({method:this.requestParams.all().method,url:oe(this.requestParams.all().url).href,data:this.requestParams.data(),params:this.requestParams.queryParams(),signal:this.cancelToken.signal,headers:this.getHeaders(),onUploadProgress:this.onProgress.bind(this),responseType:"text"}).then(r=>(this.response=Oe.create(this.requestParams,r,this.page),this.response.handle())).catch(r=>r!=null&&r.response?(this.response=Oe.create(this.requestParams,r.response,this.page),this.response.handle()):Promise.reject(r)).catch(r=>{if(!Ce.isCancel(r)&&pt(r))return t&&this.requestParams.onPrefetchError(r),Promise.reject(r)}).finally(()=>{this.finish(),t&&this.response&&this.requestParams.onPrefetchResponse(this.response)})}finish(){this.requestParams.wasCancelledAtAll()||(this.requestParams.markAsFinished(),this.fireFinishEvents())}fireFinishEvents(){this.requestHasFinished||(this.requestHasFinished=!0,mt(this.requestParams.all()),this.requestParams.onFinish())}cancel({cancelled:t=!1,interrupted:r=!1}){this.requestHasFinished||(this.cancelToken.abort(),this.requestParams.markAsCancelled({cancelled:t,interrupted:r}),this.fireFinishEvents())}onProgress(t){this.requestParams.data()instanceof FormData&&(t.percentage=t.progress?Math.round(t.progress*100):0,yt(t),this.requestParams.all().onProgress(t))}getHeaders(){const t={...this.requestParams.headers(),Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},r=d.get();r.version&&(t["X-Inertia-Version"]=r.version);const s=Object.entries(r.onceProps||{}).filter(([,n])=>r.props[n.prop]===void 0?!1:!n.expiresAt||n.expiresAt>Date.now()).map(([n])=>n);return s.length>0&&(t["X-Inertia-Except-Once-Props"]=s.join(",")),t}},De=class{constructor({maxConcurrent:e,interruptible:t}){this.requests=[],this.maxConcurrent=e,this.interruptible=t}send(e){this.requests.push(e),e.send().then(()=>{this.requests=this.requests.filter(t=>t!==e)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight({prefetch:e=!0}={}){this.requests.filter(t=>
9e||!t.isPrefetch()).forEach(t=>t.cancel({cancelled:!0}))}cancel({cancelled:e=!1,interrupted:t=!1}={},r=!1){if(!r&&!this.shouldCancel())return;const s=this.requests.shift();s==null||s.cancel({cancelled:e,interrupted:t})}shouldCancel(){return this.interruptible&&this.requests.length>=this.maxConcurrent}},Xt=class{constructor(){this.syncRequestStream=new De({maxConcurrent:1,interruptible:!0}),this.asyncRequestStream=new De({maxConcurrent:1/0,interruptible:!1}),this.clientVisitQueue=new be}init({initialPage:e,resolveComponent:t,swapComponent:r,onFlash:s}){d.init({initialPage:e,resolveComponent:t,swapComponent:r,onFlash:s}),_t.handle(),j.init(),j.on("missingHistoryItem",()=>{typeof window<"u"&&this.visit(window.location.href,{preserveState:!0,preserveScroll:!0,replace:!0})}),j.on("loadDeferredProps",n=>{this.loadDeferredProps(n)}),j.on("historyQuotaExceeded",n=>{window.location.href=n})}get(e,t={},r={}){return this.visit(e,{...r,method:"get",data:t})}post(e,t={},r={}){return this.visit(e,{preserveState:!0,...r,method:"post",data:t})}put(e,t={},r={}){return this.visit(e,{preserveState:!0,...r,method:"put",data:t})}patch(e,t={},r={}){return this.visit(e,{preserveState:!0,...r,method:"patch",data:t})}delete(e,t={}){return this.visit(e,{preserveState:!0,...t,method:"delete"})}reload(e={}){return this.doReload(e)}doReload(e={}){if(!(typeof window>"u"))return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0,async:!0,headers:{...e.headers||{},"Cache-Control":"no-cache"}})}remember(e,t="default"){y.remember(e,t)}restore(e="default"){return y.restore(e)}on(e,t){return typeof window>"u"?()=>{}:j.onGlobalEvent(e,t)}cancel(){this.syncRequestStream.cancelInFlight()}cancelAll({async:e=!0,prefetch:t=!0,sync:r=!0}={}){e&&this.asyncRequestStream.cancelInFlight({prefetch:t}),r&&this.syncRequestStream.cancelInFlight()}poll(e,t={},r={}){return Kt.add(e,()=>this.reload(t),{autoStart:r.autoStart??!0,keepAlive:r.keepAlive??!1})}visit(e,t={}){const r=this.getPendingVisit(e,{...t,showProgress:t.showProgress??!t.async}),s=this.getVisitEvents(t);if(s.onBefore(r)===!1||!Ae(r))return;const n=B(d.get().url);(r.only.length>0||r.except.length>0||r.reset.length>0?Ut(r.url,n):ae(r.url,n))||this.asyncRequestStream.cancelInFlight({prefetch:!1}),r.async||this.syncRequestStream.interruptInFlight(),!d.isCleared()&&!r.preserveUrl&&I.save();const h={...r,...s},a=U.get(h);a?(k.reveal(a.inFlight),U.use(a,h)):(k.reveal(!0),(r.async?this.asyncRequestStream:this.syncRequestStream).send(ke.create(h,d.get())))}getCached(e,t={}){return U.findCached(this.getPrefetchParams(e,t))}flush(e,t={}){U.remove(this.getPrefetchParams(e,t))}flushAll(){U.removeAll()}flushByCacheTags(e){U.removeByTags(Array.isArray(e)?e:[e])}getPrefetching(e,t={}){return U.findInFlight(this.getPrefetchParams(e,t))}prefetch(e,t={},r={}){if((t.method??(X(e)?e.method:"get"))!=="get")throw new Error("Prefetch requests must use the GET method");const n=this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),i=n.url.origin+n.url.pathname+n.url.search,l=window.location.origin+window.location.pathname+window.location.search;if(i===l)return;const h=this.getVisitEvents(t);if(h.onBefore(n)===!1||!Ae(n))return;k.hide(),this.asyncRequestStream.interruptInFlight();const a={...n,...h};new Promise(m=>{const c=()=>{d.get()?m():setTimeout(c,50)};c()}).then(()=>{U.add(a,m=>{this.asyncRequestStream.send(ke.create(m,d.get()))},{cacheFor:W.get("prefetch.cacheFor"),cacheTags:[],...r})})}clearHistory(){y.clear()}decryptHistory(){return y.decrypt()}resolveComponent(e){return d.resolve(e)}replace(e){this.clientVisit(e,{replace:!0})}replaceProp(e,t,r){this.replace({preserveScroll:!0,preserveState:!0,props(s){const n=typeof t=="function"?t(M(s,e),s):t;return L(A(s),e,n)},...r||{}})}appendToProp(e,t,r){this.replaceProp(e,(s,n)=>{const i=typeof t=="function"?t(s,n):t;return Array.isArray(s)||(s=s!==void 0?[s]:[]),[...s,i]},r)}prependToProp(e,t,r){this.replaceProp(e,(s,n)=>{const i=typeof t=="function"?t(s,n):t;return Array.isArray(s)||(s=s!==void 0?[s]:[]),[i,...s]},r)}push(e){this.clientVisit(e)}flash(e,t){const r=d.get().flash;let s;if(typeof e=="function")s=e(r);else if(typeof e=="string")s={...r,[e]:t};else if(e&&Object.keys(e).length)s={...r,...e};else return;
9d.setFlash(s),Object.keys(s).length&&ie(s)}clientVisit(e,{replace:t=!1}={}){this.clientVisitQueue.add(()=>this.performClientVisit(e,{replace:t}))}performClientVisit(e,{replace:t=!1}={}){const r=d.get(),s=typeof e.props=="function"?Object.fromEntries(Object.values(r.onceProps??{}).map(o=>[o.prop,r.props[o.prop]])):{},n=typeof e.props=="function"?e.props(r.props,s):e.props??r.props,i=typeof e.flash=="function"?e.flash(r.flash):e.flash,{viewTransition:l,onError:h,onFinish:a,onFlash:p,onSuccess:m,...c}=e,P={...r,...c,flash:i??{},props:n},S=we.resolvePreserveOption(e.preserveScroll??!1,P),u=we.resolvePreserveOption(e.preserveState??!1,P);return d.set(P,{replace:t,preserveScroll:S,preserveState:u,viewTransition:l}).then(()=>{const o=d.get().flash;Object.keys(o).length>0&&(ie(o),p==null||p(o));const v=d.get().props.errors||{};if(Object.keys(v).length===0){m==null||m(d.get());return}const g=e.errorBag?v[e.errorBag||""]||{}:v;h==null||h(g)}).finally(()=>a==null?void 0:a(e))}getPrefetchParams(e,t){return{...this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),...this.getVisitEvents(t)}}getPendingVisit(e,t,r={}){if(X(e)){const p=e;e=p.url,t.method=t.method??p.method}const s=W.get("visitOptions"),n=s?s(e.toString(),A(t))||{}:{},i={method:"get",data:{},replace:!1,preserveScroll:!1,preserveState:!1,only:[],except:[],headers:{},errorBag:"",forceFormData:!1,queryStringArrayFormat:"brackets",async:!1,showProgress:!0,fresh:!1,reset:[],preserveUrl:!1,prefetch:!1,invalidateCacheTags:[],viewTransition:!1,...t,...n},[l,h]=Ht(e,i.data,i.method,i.forceFormData,i.queryStringArrayFormat),a={cancelled:!1,completed:!1,interrupted:!1,...i,...r,url:l,data:h};return a.prefetch&&(a.headers.Purpose="prefetch"),a}getVisitEvents(e){return{onCancelToken:e.onCancelToken||(()=>{}),onBefore:e.onBefore||(()=>{}),onBeforeUpdate:e.onBeforeUpdate||(()=>{}),onStart:e.onStart||(()=>{}),onProgress:e.onProgress||(()=>{}),onFinish:e.onFinish||(()=>{}),onCancel:e.onCancel||(()=>{}),onSuccess:e.onSuccess||(()=>{}),onError:e.onError||(()=>{}),onFlash:e.onFlash||(()=>{}),onPrefetched:e.onPrefetched||(()=>{}),onPrefetching:e.onPrefetching||(()=>{})}}loadDeferredProps(e){e&&Object.entries(e).forEach(([t,r])=>{this.doReload({only:r,deferredProps:!0})})}},he=class{static createWayfinderCallback(...e){return()=>e.length===1?X(e[0])?e[0]:e[0]():{method:typeof e[0]=="function"?e[0]():e[0],url:typeof e[1]=="function"?e[1]():e[1]}}static parseUseFormArguments(...e){return e.length===0?{rememberKey:null,data:{},precognitionEndpoint:null}:e.length===1?{rememberKey:null,data:e[0],precognitionEndpoint:null}:e.length===2?typeof e[0]=="string"?{rememberKey:e[0],data:e[1],precognitionEndpoint:null}:{rememberKey:null,data:e[1],precognitionEndpoint:this.createWayfinderCallback(e[0])}:{rememberKey:null,data:e[2],precognitionEndpoint:this.createWayfinderCallback(e[0],e[1])}}static parseSubmitArguments(e,t){return e.length===3||e.length===2&&typeof e[0]=="string"?{method:e[0],url:e[1],options:e[2]??{}}:X(e[0])?{...e[0],options:e[1]??{}}:{...t(),options:e[0]??{}}}static mergeHeadersForValidation(e,t,r){const s=n=>(n.headers={...r??{},...n.headers??{}},n);return e&&typeof e=="object"&&!("target"in e)?e=s(e):t&&typeof t=="object"?t=s(t):typeof e=="string"?t=s(t??{}):e=s(e??{}),[e,t]}},de={preferredAttribute(){return W.get("future.useDataInertiaHeadAttribute")?"data-inertia":"inertia"},buildDOMElement(e){const t=document.createElement("template");t.innerHTML=e;const r=t.content.firstChild;if(!e.startsWith("<script "))return r;const s=document.createElement("script");return s.innerHTML=r.innerHTML,r.getAttributeNames().forEach(n=>{s.setAttribute(n,r.getAttribute(n)||"")}),s},isInertiaManagedElement(e){return e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(this.preferredAttribute())!==null},findMatchingElementIndex(e,t){const r=this.preferredAttribute(),s=e.getAttribute(r);return s!==null?t.findIndex(n=>n.getAttribute(r)===s):-1},update:ge(function(e){const t=e.map(s=>this.buildDOMElement(s));Array.from(document.head.childNodes).filter(s=>
9this.isInertiaManagedElement(s)).forEach(s=>{var l,h;const n=this.findMatchingElementIndex(s,t);if(n===-1){(l=s==null?void 0:s.parentNode)==null||l.removeChild(s);return}const i=t.splice(n,1)[0];i&&!s.isEqualNode(i)&&((h=s==null?void 0:s.parentNode)==null||h.replaceChild(i,s))}),t.forEach(s=>document.head.appendChild(s))},1)};function zt(e,t,r){const s={};let n=0;function i(){const c=n+=1;return s[c]=[],c.toString()}function l(c){c===null||Object.keys(s).indexOf(c)===-1||(delete s[c],m())}function h(c){Object.keys(s).indexOf(c)===-1&&(s[c]=[])}function a(c,P=[]){c!==null&&Object.keys(s).indexOf(c)>-1&&(s[c]=P),m()}function p(){const c=t(""),P=de.preferredAttribute(),S={...c?{title:`<title ${P}="">${c}</title>`}:{}},u=Object.values(s).reduce((o,v)=>o.concat(v),[]).reduce((o,v)=>{if(v.indexOf("<")===-1)return o;if(v.indexOf("<title ")===0){const F=v.match(/(<title [^>]+>)(.*?)(<\/title>)/);return o.title=F?`${F[1]}${t(F[2])}${F[3]}`:v,o}const g=v.match(P==="inertia"?/ inertia="[^"]+"/:/ data-inertia="[^"]+"/);return g?o[g[0]]=v:o[Object.keys(o).length]=v,o},S);return Object.values(u)}function m(){e?r(p()):de.update(p())}return m(),{forceUpdate:m,createProvider:function(){const c=i();return{preferredAttribute:de.preferredAttribute,reconnect:()=>h(c),update:P=>a(c,P),disconnect:()=>l(c)}}}}function ze(e){return e.target instanceof HTMLElement&&e.target.isContentEditable||e.defaultPrevented}function te(e){const t=e.currentTarget.tagName.toLowerCase()==="a";return!(ze(e)||t&&e.altKey||t&&e.ctrlKey||t&&e.metaKey||t&&e.shiftKey||t&&"button"in e&&e.button!==0)}function Re(e){const t=e.currentTarget.tagName.toLowerCase()==="button";return!ze(e)&&(e.key==="Enter"||t&&e.key===" ")}var C="nprogress",O,q={minimum:.08,easing:"linear",positionUsing:"translate3d",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",color:"#29d",includeCSS:!0,template:['<div class="bar" role="bar">','<div class="peg"></div>',"</div>",'<div class="spinner" role="spinner">','<div class="spinner-icon"></div>',"</div>"].join("")},N=null,Gt=e=>{Object.assign(q,e),q.includeCSS&&sr(q.color),O=document.createElement("div"),O.id=C,O.innerHTML=q.template},le=e=>
9{const t=Ge();e=rt(e,q.minimum,1),N=e===1?null:e;const r=Zt(!t),s=r.querySelector(q.barSelector),n=q.speed,i=q.easing;r.offsetWidth,rr(l=>{const h=q.positionUsing==="translate3d"?{transition:`all ${n}ms ${i}`,transform:`translate3d(${ne(e)}%,0,0)`}:q.positionUsing==="translate"?{transition:`all ${n}ms ${i}`,transform:`translate(${ne(e)}%,0)`}:{marginLeft:`${ne(e)}%`};for(const a in h)s.style[a]=h[a];if(e!==1)return setTimeout(l,n);r.style.transition="none",r.style.opacity="1",r.offsetWidth,setTimeout(()=>{r.style.transition=`all ${n}ms linear`,r.style.opacity="0",setTimeout(()=>{tt(),r.style.transition="",r.style.opacity="",l()},n)},n)})},Ge=()=>typeof N=="number",Ye=()=>{N||le(0);const e=function(){setTimeout(function(){N&&(Ze(),e())},q.trickleSpeed)};q.trickle&&e()},Yt=e=>{!e&&!N||(Ze(.3+.5*Math.random()),le(1))},Ze=e=>{const t=N;if(t===null)return Ye();if(!(t>1))return e=typeof e=="number"?e:(()=>{const r={.1:[0,.2],.04:[.2,.5],.02:[.5,.8],.005:[.8,.99]};for(const s in r)if(t>=r[s][0]&&t<r[s][1])return parseFloat(s);return 0})(),le(rt(t+e,0,.994))},Zt=e=>{var n;if(er())return document.getElementById(C);document.documentElement.classList.add(`${C}-busy`);const t=O.querySelector(q.barSelector),r=e?"-100":ne(N||0),s=et();return t.style.transition="all 0 linear",t.style.transform=`translate3d(${r}%,0,0)`,q.showSpinner||(n=O.querySelector(q.spinnerSelector))==null||n.remove(),s!==document.body&&s.classList.add(`${C}-custom-parent`),s.appendChild(O),O},et=()=>tr(q.parent)?q.parent:document.querySelector(q.parent),tt=()=>{document.documentElement.classList.remove(`${C}-busy`),et().classList.remove(`${C}-custom-parent`),O==null||O.remove()},er=()=>document.getElementById(C)!==null,tr=e=>typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string";function rt(e,t,r){return e<t?t:e>r?r:e}var ne=e=>(-1+e)*100,rr=(()=>{const e=[],t=()=>{const r=e.shift();r&&r(t)};return r=>{e.push(r),e.length===1&&t()}})(),sr=e=>{const t=document.createElement("style");t.textContent=`
10    #${C} {
11      pointer-events: none;
12    }
13
14    #${C} .bar {
15      background: ${e};
16
17      position: fixed;
18      z-index: 1031;
19      top: 0;
20      left: 0;
21
22      width: 100%;
23      height: 2px;
24    }
25
26    #${C} .peg {
27      display: block;
28      position: absolute;
29      right: 0px;
30      width: 100px;
31      height: 100%;
32      box-shadow: 0 0 10px ${e}, 0 0 5px ${e};
33      opacity: 1.0;
34
35      transform: rotate(3deg) translate(0px, -4px);
36    }
37
38    #${C} .spinner {
39      display: block;
40      position: fixed;
41      z-index: 1031;
42      top: 15px;
43      right: 15px;
44    }
45
46    #${C} .spinner-icon {
47      width: 18px;
48      height: 18px;
49      box-sizing: border-box;
50
51      border: solid 2px transparent;
52      border-top-color: ${e};
53      border-left-color: ${e};
54      border-radius: 50%;
55
56      animation: ${C}-spinner 400ms linear infinite;
57    }
58
59    .${C}-custom-parent {
60      overflow: hidden;
61      position: relative;
62    }
63
64    .${C}-custom-parent #${C} .spinner,
65    .${C}-custom-parent #${C} .bar {
66      position: absolute;
67    }
68
69    @keyframes ${C}-spinner {
70      0%   { transform: rotate(0deg); }
71      100% { transform: rotate(360deg); }
72    }
73  `,document.head.appendChild(t)},nr=()=>{O&&(O.style.display="")},ir=()=>{O&&(O.style.display="none")},$={configure:Gt,isStarted:Ge,done:Yt,set:le,remove:tt,start:Ye,status:N,show:nr,hide:ir},or=class{constructor(){this.hideCount=0}start(){$.start()}reveal(e=!1){this.hideCount=Math.max(0,this.hideCount-1),(e||this.hideCount===0)&&$.show()}hide(){this.hideCount++,$.hide()}set(e){$.set(Math.max(0,Math.min(1,e)))}finish(){$.done()}reset(){$.set(0)}remove(){$.done(),$.remove()}isStarted(){return $.isStarted()}getStatus(){return $.status}},k=new or;k.reveal;k.hide;function ar(e){document.addEventListener("inertia:start",t=>lr(t,e)),document.addEventListener("inertia:progress",cr)}function lr(e,t){e.detail.visit.showProgress||k.hide();const r=setTimeout(()=>k.start(),t);document.addEventListener("inertia:finish",s=>ur(s,r),{once:!0})}function cr(e){var t;k.isStarted()&&((t=e.detail.progress)!=null&&t.percentage)&&k.set(Math.max(k.getStatus(),e.detail.progress.percentage/100*.9))}function ur(e,t){clearTimeout(t),k.isStarted()&&(e.detail.visit.completed?k.finish():e.detail.visit.interrupted?k.reset():e.detail.visit.cancelled&&k.remove())}function hr({delay:e=250,color:t="#29d",includeCSS:r=!0,showSpinner:s=!1}={}){ar(e),$.configure({showSpinner:s,includeCSS:r,color:t})}var T=new Xt;/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
74 * @license MIT */var dr={created(){if(!this.$options.remember)return;Array.isArray(this.$options.remember)&&(this.$options.remember={data:this.$options.remember}),typeof this.$options.remember=="string"&&(this.$options.remember={data:[this.$options.remember]}
74),typeof this.$options.remember.data=="string"&&(this.$options.remember={data:[this.$options.remember.data]});const e=this.$options.remember.key instanceof Function?this.$options.remember.key.call(this):this.$options.remember.key,t=T.restore(e),r=this.$options.remember.data.filter(n=>!(this[n]!==null&&typeof this[n]=="object"&&this[n].__rememberable===!1)),s=n=>this[n]!==null&&typeof this[n]=="object"&&typeof this[n].__remember=="function"&&typeof this[n].__restore=="function";r.forEach(n=>{this[n]!==void 0&&t!==void 0&&t[n]!==void 0&&(s(n)?this[n].__restore(t[n]):this[n]=t[n]),this.$watch(n,()=>{T.remember(r.reduce((i,l)=>({...i,[l]:A(s(l)?this[l].__remember():this[l])}),{}),e)},{immediate:!0,deep:!0})})}},fr=dr,fe=null,pe=!1;function pr(e){if(pe)return;fe===null&&(pe=!0,fe=new Set(Object.keys(st({}))),pe=!1);const t=Object.keys(e).filter(r=>fe.has(r));t.length>0&&console.error(`[Inertia] useForm() data contains field(s) that conflict with form properties: ${t.map(r=>`"${r}"`).join(", ")}. These fields will be overwritten by form methods/properties. Please rename these fields.`)}function st(...e){let{rememberKey:t,data:r,precognitionEndpoint:s}=he.parseUseFormArguments(...e);const n=t?T.restore(t):null;let i=typeof r=="function"?A(r()):A(r);pr(i);let l=null,h,a=u=>u,p=null,m=[],c=!1;const S=je({...n?n.data:A(i),isDirty:!1,errors:n?n.errors:{},hasErrors:!1,processing:!1,progress:null,wasSuccessful:!1,recentlySuccessful:!1,withPrecognition(...u){s=he.createWayfinderCallback(...u);const o=this;let v=!1;const g=ut(f=>{const{method:w,url:K}=s(),ce=A(a(this.data()));return f[w](K,ce)},A(i));p=g,g.on("validatingChanged",()=>{o.validating=g.validating()}).on("validatedChanged",()=>{o.__valid=g.valid()}).on("touchedChanged",()=>{o.__touched=g.touched()}).on("errorsChanged",()=>{const f=v?g.errors():ht(g.errors());this.errors={},this.setError(f),o.__valid=g.valid()});const F=(f,w)=>(w(f),f);return Object.assign(o,{__touched:[],__valid:[],validating:!1,validator:()=>g,withAllErrors:()=>F(o,()=>v=!0),valid:f=>o.__valid.includes(f),invalid:f=>f in this.errors,setValidationTimeout:f=>F(o,()=>g.setTimeout(f)),validateFiles:()=>F(o,()=>g.validateFiles()),withoutFileValidation:()=>F(o,()=>g.withoutFileValidation()),touch:(f,...w)=>(Array.isArray(f)?g.touch(f):typeof f=="string"?g.touch([f,...w]):g.touch(f),o),touched:f=>typeof f=="string"?o.__touched.includes(f):o.__touched.length>0,validate:(f,w)=>{if(typeof f=="object"&&!("target"in f)&&(w=f,f=void 0),f===void 0)g.validate(w);else{const K=Fe(f),ce=a(this.data());g.validate(K,M(ce,K),w)}return o},setErrors:f=>F(o,()=>this.setError(f)),forgetError:f=>F(o,()=>this.clearErrors(Fe(f)))}),o},data(){return Object.keys(i).reduce((u,o)=>L(u,o,M(this,o)),{})},transform(u){return a=u,this},defaults(u,o){if(typeof r=="function")throw new Error("You cannot call `defaults()` when using a function to define your form data.");return c=!0,typeof u>"u"?(i=A(this.data()),this.isDirty=!1):i=typeof u=="string"?L(A(i),u,o):Object.assign({},A(i),u),p==null||p.defaults(i),this},reset(...u){const o=typeof r=="function"?A(r()):A(i),v=A(o);return u.length===0?(i=v,Object.assign(this,o)):u.filter(g=>Ue(v,g)).forEach(g=>{L(i,g,M(v,g)),L(this,g,M(o,g))}),p==null||p.reset(...u),this},setError(u,o){const v=typeof u=="string"?{[u]:o}:u;return Object.assign(this.errors,v),this.hasErrors=Object.keys(this.errors).length>0,p==null||p.setErrors(v),this},clearErrors(...u){return this.errors=Object.keys(this.errors).reduce((o,v)=>({...o,...u.length>0&&!u.includes(v)?{[v]:this.errors[v]}:{}}),{}),this.hasErrors=Object.keys(this.errors).length>0,p&&(u.length===0?p.setErrors({}):u.forEach(p.forgetError)),this},resetAndClearErrors(...u){return this.reset(...u),this.clearErrors(...u),this},submit(...u){const{method:o,url:v,options:g}=he.parseSubmitArguments(u,s);c=!1;const F={...g,onCancelToken:w=>{if(l=w,g.onCancelToken)return g.onCancelToken(w)},onBefore:w=>{if(this.wasSuccessful=!1,this.recentlySuccessful=!1,clearTimeout(h),g.onBefore)return g.onBefore(w)},onStart:w=>{if(this.processing=!0,g.onStart)return g.onStart(w)},onProgress:w=>{if(this.progress=w??null,g.onProgress)return g.onProgress(w)},onSuccess:async w=>{this.processing=!1,this.progress=null,this.clearErrors(),this.wasSuccessful=!0,this.recentlySuccessful=!0,h=setTimeout(()=>this.recentlySuccessful=!1,ee.get("form.recentlySuccessfulDuration"));const K=g.onSuccess?await g.onSuccess(w):null;return c||(i=A(this.data()),this.isDirty=!1),K},onError:w=>{if(this.processing=!1,this.progress=null,this.clearErrors().setError(w),g.onError)return g.onError(w)},onCancel:()=>{if(this.processing=!1,this.progress=null,g.onCancel)return g.onCancel()},onFinish:w=>{if(this.processing=!1,this.progress=null,l=null,g.onFinish)return g.onFinish(w)}},f=a(this.data());o==="delete"?T.delete(v,{...F,data:f}):T[o](v,f,F)},get(u,o){this.submit("get",u,o)},post(u,o){this.submit("post",u,o)},put(u,o){this.submit("put",u,o)},patch(u,o){this.submit("patch",u,o)},delete(u,o){this.submit("delete",u,o)},cancel(){l&&l.cancel()},dontRemember(...u){return m=u,this},__rememberable:t===null,__remember(){const u=this.data();if(m.length>0){const o={...u};return m.forEach(v=>delete o[v]),{data:o,errors:this.errors}}return{data:u,errors:this.errors}},__restore(u){Object.assign(this,u.data),this.setError(u.errors)}});return ot(S,u=>{S.isDirty=!_(S.data(),i);const o=T.restore(t),v=A(u.__remember());t&&!_(o,v)&&T.remember(v,t)},{immediate:!0,deep:!0}),s?S.withPrecognition(s):S}var D=Z(void 0),E=Z(),me=at(null),re=Z(void 0),Pe,mr=Se({name:"Inertia",props:{initialPage:{type:Object,required:!0},initialComponent:{type:Object,required:!1},resolveComponent:{type:Function,required:!1},titleCallback:{type:Function,required:!1,default:e=>e},onHeadUpdate:{type:Function,required:!1,default:()=>()=>{}}}
74,setup({initialPage:e,initialComponent:t,resolveComponent:r,titleCallback:s,onHeadUpdate:n}){D.value=t?Te(t):void 0,E.value={...e,flash:e.flash??{}},re.value=void 0;const i=typeof window>"u";return Pe=zt(i,s||(l=>l),n||(()=>{})),i||(T.init({initialPage:e,resolveComponent:r,swapComponent:async l=>{D.value=Te(l.component),E.value=l.page,re.value=l.preserveState?re.value:Date.now()},onFlash:l=>{E.value={...E.value,flash:l}}}),T.on("navigate",()=>Pe.forceUpdate())),()=>{if(D.value){D.value.inheritAttrs=!!D.value.inheritAttrs;const l=V(D.value,{...E.value.props,key:re.value});return me.value&&(D.value.layout=me.value,me.value=null),D.value.layout?typeof D.value.layout=="function"?D.value.layout(V,l):(Array.isArray(D.value.layout)?D.value.layout:[D.value.layout]).concat(l).reverse().reduce((h,a)=>(a.inheritAttrs=!!a.inheritAttrs,V(a,{...E.value.props},()=>h))):l}}}}),$e=mr,He={install(e){T.form=st,Object.defineProperty(e.config.globalProperties,"$inertia",{get:()=>T}),Object.defineProperty(e.config.globalProperties,"$page",{get:()=>E.value}),Object.defineProperty(e.config.globalProperties,"$headManager",{get:()=>Pe}),e.mixin(fr)}};function Er(){return je({props:b(()=>{var e;return(e=E.value)==null?void 0:e.props}),url:b(()=>{var e;return(e=E.value)==null?void 0:e.url}),component:b(()=>{var e;return(e=E.value)==null?void 0:e.component}),version:b(()=>{var e;return(e=E.value)==null?void 0:e.version}),clearHistory:b(()=>{var e;return(e=E.value)==null?void 0:e.clearHistory}),deferredProps:b(()=>{var e;return(e=E.value)==null?void 0:e.deferredProps}),mergeProps:b(()=>{var e;return(e=E.value)==null?void 0:e.mergeProps}),prependProps:b(()=>{var e;return(e=E.value)==null?void 0:e.prependProps}),deepMergeProps:b(()=>{var e;return(e=E.value)==null?void 0:e.deepMergeProps}),matchPropsOn:b(()=>{var e;return(e=E.value)==null?void 0:e.matchPropsOn}),rememberedState:b(()=>{var e;return(e=E.value)==null?void 0:e.rememberedState}),encryptHistory:b(()=>{var e;return(e=E.value)==null?void 0:e.encryptHistory}),flash:b(()=>{var e;return(e=E.value)==null?void 0:e.flash})})}async function Cr({id:e="app",resolve:t,setup:r,title:s,progress:n={},page:i,render:l,defaults:h={}}){ee.replace(h);const a=typeof window>"u",p=ee.get("future.useScriptElementForInitialPage"),m=i||Dt(e,p),c=u=>Promise.resolve(t(u)).then(o=>o.default||o);let P=[];const S=await Promise.all([c(m.component),T.decryptHistory().catch(()=>{})]).then(([u])=>{const o={initialPage:m,initialComponent:u,resolveComponent:c,titleCallback:s};return r(a?{el:null,App:$e,props:{...o,onHeadUpdate:F=>P=F},plugin:He}:{el:document.getElementById(e),App:$e,props:o,plugin:He})});if(!a&&n&&hr(n),a&&l){const u=()=>p?[V("script",{"data-page":e,type:"application/json",innerHTML:JSON.stringify(m).replace(/\//g,"\\/")}),V("div",{id:e,innerHTML:S?l(S):""})]:V("div",{id:e,"data-page":JSON.stringify(m),innerHTML:S?l(S):""}),o=await l(it({render:()=>u()}));return{head:P,body:o}}}var gr=Se({props:{title:{type:String,required:!1}},data(){return{provider:this.$headManager.createProvider()}},beforeUnmount(){this.provider.disconnect()},methods:{isUnaryTag(e){return typeof e.type=="string"&&["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"].indexOf(e.type)>-1},renderTagStart(e){e.props=e.props||{},e.props[this.provider.preferredAttribute()]=e.props["head-key"]!==void 0?e.props["head-key"]:"";const t=Object.keys(e.props).reduce((r,s)=>{const n=String(e.props[s]);return["key","head-key"].includes(s)?r:n===""?r+` ${s}`:r+` ${s}="${nt(n)}"`},"");return`<${String(e.type)}${t}>`},renderTagChildren(e){const{children:t}=e;return typeof t=="string"?t:Array.isArray(t)?t.reduce((r,s)=>r+this.renderTag(s),""):""},isFunctionNode(e){return typeof e.type=="function"},isComponentNode(e){return typeof e.type=="object"},isCommentNode(e){return/(comment|cmt)/i.test(e.type.toString())},isFragmentNode(e){return/(fragment|fgt|symbol\(\))/i.test(e.type.toString())},isTextNode(e){return/(text|txt)/i.test(e.type.toString())},renderTag(e){if(this.isTextNode(e))return String(e.children);if(this.isFragmentNode(e))return"";if(this.isCommentNode(e))return"";let t=this.renderTagStart(e);return e.children&&(t+=this.renderTagChildren(e)),this.isUnaryTag(e)||(t+=`</${String(e.type)}>`),t},addTitleElement(e){return this.title&&!e.find(t=>t.startsWith("<title"))&&e.push(`<title ${this.provider.preferredAttribute()}>${this.title}</title>`),e},renderNodes(e){const t=e.flatMap(r=>this.resolveNode(r)).map(r=>this.renderTag(r)).filter(r=>r);return this.addTitleElement(t)},resolveNode(e){return this.isFunctionNode(e)?this.resolveNode(e.type()):this.isComponentNode(e)?(console.warn("Using components in the <Head> component is not supported."),[]):this.isTextNode(e)&&e.children?e:this.isFragmentNode(e)&&e.children?e.children.flatMap(t=>this.resolveNode(t)):this.isCommentNode(e)?[]:e}},render(){this.provider.update(this.renderNodes(this.$slots.default?this.$slots.default():[]))}}),Tr=gr,H=()=>{},vr=Se({name:"Link",props:{as:{type:[String,Object],default:"a"},data:{type:Object,default:()=>({})},href:{type:[String,Object],default:""},method:{type:String,default:"get"},replace:{type:Boolean,default:!1},preserveScroll:{type:[Boolean,String,Function],default:!1},preserveState:{type:[Boolean,String,Function],default:null},preserveUrl:{type:Boolean,default:!1},only:{type:Array,default:()=>[]},except:{type:Array,default:()=>[]},headers:{type:Object,default:()=>({})},queryStringArrayFormat:{type:String,default:"brackets"},async:{type:Boolean,default:!1},prefetch:{type:[Boolean,String,Array],default:!1},cacheFor:{type:[Number,String,Array],default:0},onStart:{type:Function,default:H},onProgress:{type:Function,default:H},onFinish:{type:Function,default:H},onBefore:{type:Function,default:H},onCancel:{type:Function,default:H},onSuccess:{type:Function,default:H},onError:{type:Function,default:H},onCancelToken:{type:Function,default:H},onPrefetching:{type:Function,default:H},onPrefetched:{type:Function,default:H},cacheTags:{type:[String,Array],default:()=>[]},viewTransition:{type:[Boolean,Object],default:!1}},setup(e,{slots:t,attrs:r}){const s=Z(0),n=Z(),i=b(()=>e.prefetch===!0?["hover"]:e.prefetch===!1?[]:Array.isArray(e.prefetch)?e.prefetch:[e.prefetch]),l=b(()=>e.cacheFor!==0?e.cacheFor:i.value.length===1&&i.value[0]==="click"?0:ee.get("prefetch.cacheFor"));lt(()=>{i.value.includes("mount")&&o()}),ct(()=>{clearTimeout(n.value)});const h=b(()=>X(e.href)?e.href.method:(e.method??"get").toLowerCase()),a=b(()=>typeof e.as!="string"||e.as.toLowerCase()!=="a"?e.as:h.value!=="get"?"button":e.as.toLowerCase()),p=b(()=>Ke(h.value,X(e.href)?e.href.url:e.href,e.data||{},e.queryStringArrayFormat)),m=b(()=>p.value[0]),c=b(()=>p.value[1]),P=b(()=>a.value==="button"?{type:"button"}:a.value==="a"||typeof a.value!="string"?{href:m.value}:{}),S=b(()=>({data:c.value,method:h.value,replace:e.replace,preserveScroll:e.preserveScroll,preserveState:e.preserveState??h.value!=="get",preserveUrl:e.preserveUrl,only:e.only,except:e.except,headers:e.headers,async:e.async})),u=b(()=>({...S.value,viewTransition:e.viewTransition,onCancelToken:e.onCancelToken,onBefore:e.onBefore,onStart:f=>{var w;s.value++,(w=e.onStart)==null||w.call(e,f)},onProgress:e.onProgress,onFinish:f=>{var w;s.value--,(w=e.onFinish)==null||w.call(e,f)},onCancel:e.onCancel,onSuccess:e.onSuccess,onError:e.onError})),o=()=>{T.prefetch(m.value,{...S.value,onPrefetching:e.onPrefetching,onPrefetched:e.onPrefetched},{cacheFor:l.value,cacheTags:e.cacheTags})},v={onClick:f=>{te(f)&&(f.preventDefault(),T.visit(m.value,u.value))}},g={onMouseenter:()=>{n.value=setTimeout(()=>{o()},ee.get("prefetch.hoverDelay"))},onMouseleave:()=>{clearTimeout(n.value)},onClick:v.onClick},F={onMousedown:f=>{te(f)&&(f.preventDefault(),o())},onKeydown:f=>{Re(f)&&(f.preventDefault(),o())},onMouseup:f=>{te(f)&&(f.preventDefault(),T.visit(m.value,u.value))},onKeyup:f=>{Re(f)&&(f.preventDefault(),T.visit(m.value,u.value))},onClick:f=>{te(f)&&f.preventDefault()}};return()=>V(a.value,{...r,...P.value,"data-loading":s.value>0?"":void 0,...i.value.includes("hover")?g:i.value.includes("click")?F:v},t)}}),Fr=vr,ee=W.extend({});export{st as a,Cr as c,Tr as h,Fr as l,T as r,Er as u};

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.