From fd5a4e40ad5fef05795378f0274bbaba53d0edd8 Mon Sep 17 00:00:00 2001
From: admin
')}}),d.length>0&&e.jsx("div",{className:`flex items-center gap-8 ${a?"justify-center":""}`,children:d.map((l,c)=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-gray-900",children:l.value}),e.jsx("div",{className:"text-sm text-gray-600",children:l.label})]},c))})]}),k=()=>f==="centered"?n==="background"&&r?e.jsxs("div",{ref:o,className:"relative rounded-xl overflow-hidden mb-8 sm:mb-12 lg:mb-16",children:[e.jsx("img",{src:r,alt:"About Us",className:"w-full h-96 object-cover",style:i?{transform:`translateY(${m}px)`,transition:"transform 0.1s linear",height:"110%",top:"-5%",position:"relative"}:void 0}),e.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center p-8",children:e.jsxs("div",{className:"text-center text-white max-w-2xl",children:[e.jsx("h3",{className:"text-2xl font-bold mb-4",children:t.story_title||s("We are passionate about simplifying HR management for businesses of all sizes.")}),e.jsx("div",{className:"mb-6 leading-relaxed opacity-90",dangerouslySetInnerHTML:{__html:(t.story_content||s("Founded by HR and tech enthusiasts, HRMGo was created to replace cumbersome spreadsheets and manual processes with a modern, all-in-one HR platform.")).replace(/\n/g,'
')}}),d.length>0&&e.jsx("div",{className:"flex items-center justify-center gap-8",children:d.map((a,l)=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold",children:a.value}),e.jsx("div",{className:"text-sm opacity-80",children:a.label})]},l))})]})})]}):e.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-8 sm:mb-12 lg:mb-16",children:[e.jsx(u,{centered:!0}),(n==="left"||n==="right")&&e.jsx("div",{className:"mt-8",children:e.jsx(x,{})})]}):f==="image-left"?e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 sm:gap-12 lg:gap-16 items-center mb-8 sm:mb-12 lg:mb-16",children:[n==="background"&&r?e.jsxs("div",{ref:o,className:"relative rounded-xl overflow-hidden h-96",children:[e.jsx("img",{src:r,alt:"About Us",className:"w-full object-cover",style:i?{transform:`translateY(${m}px)`,transition:"transform 0.1s linear",height:"120%",top:"-10%",position:"relative"}:{height:"100%"}}),e.jsx("div",{className:"absolute inset-0 bg-black/30 rounded-xl"})]}):e.jsx(x,{}),e.jsx(u,{})]}):e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 sm:gap-12 lg:gap-16 items-center mb-8 sm:mb-12 lg:mb-16",children:[e.jsx(u,{}),n==="background"&&r?e.jsxs("div",{ref:o,className:"relative rounded-xl overflow-hidden h-96",children:[e.jsx("img",{src:r,alt:"About Us",className:"w-full object-cover",style:i?{transform:`translateY(${m}px)`,transition:"transform 0.1s linear",height:"120%",top:"-10%",position:"relative"}:{height:"100%"}}),e.jsx("div",{className:"absolute inset-0 bg-black/30 rounded-xl"})]}):e.jsx(x,{})]});return e.jsx("section",{id:"about",className:"py-12 sm:py-16 lg:py-20",style:{backgroundColor:v},ref:j,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:`text-center mb-8 sm:mb-12 lg:mb-16 transition-all duration-700 ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-4",children:t.title||s("About HRM SaaS")}),e.jsx("p",{className:"text-lg text-gray-600 max-w-3xl mx-auto leading-relaxed font-medium",children:t.description||s("We are passionate about simplifying HR management for businesses of all sizes.")})]}),k(),e.jsx("div",{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 sm:gap-8 transition-all duration-700 delay-500 ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:H.map((a,l)=>{const c=U[a.icon]||b;return e.jsxs("div",{className:"text-center bg-white p-6 rounded-xl border border-gray-200",children:[e.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center mx-auto mb-4",style:{backgroundColor:`${p}15`},children:e.jsx(c,{className:"w-6 h-6",style:{color:p}})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-3",children:a.title}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:a.description})]},l)})})]})})}export{X as default}; +import{r as g,j as e}from"./ui-Z445SNHD.js";import{u as R}from"./useScrollAnimation-B_bDsIuD.js";import{u as S,g as _}from"./app-sDOUnh17.js";import{Z as A}from"./zap-Ctg1ccsK.js";import{U as z}from"./users-CxIavEVE.js";import{S as M}from"./shield-BqrBIhc5.js";import{S as $}from"./star-CtzRKCrZ.js";import{L as E}from"./lightbulb-oXJOGzgJ.js";import{A as I}from"./award-BaptGUZ1.js";import{H as T}from"./heart-KpdhBjuF.js";import{T as b}from"./target-BuKzCkjr.js";/* empty css *//* empty css */import"./utils-BWxnHGCV.js";const U={target:b,heart:T,award:I,lightbulb:E,star:$,shield:M,users:z,zap:A};function X({settings:L,sectionData:t,brandColor:p="#3b82f6"}){const{t:s}=S(),{ref:j,isVisible:h}=R(),r=_(t.image),v=t.background_color||"#f9fafb",f=t.layout||"image-right",n=t.image_position||"right",i=t.parallax===!0,o=g.useRef(null),[m,y]=g.useState(0);g.useEffect(()=>{if(!i||!r)return;const a=()=>{if(!o.current)return;const l=o.current.getBoundingClientRect(),c=l.top+l.height/2-window.innerHeight/2;y(c*.2)};return window.addEventListener("scroll",a,{passive:!0}),a(),()=>window.removeEventListener("scroll",a)},[i,r]);const N=[{icon:"target",title:s("Our Mission"),description:s("To empower businesses with smart HR solutions that simplify employee management, payroll, attendance, and performance tracking.")},{icon:"heart",title:s("Our Values"),description:s("We prioritize innovation, efficiency, and creating a workplace ecosystem that nurtures growth and collaboration.")},{icon:"award",title:s("Our Commitment"),description:s("Providing reliable, intuitive HR tools backed by exceptional support to help organizations optimize their workforce.")},{icon:"lightbulb",title:s("Our Vision"),description:s("A future where HR management is fully automated, transparent, and enables organizations to focus on people, not paperwork.")}],w=[{value:s("3+ Years"),label:s("Experience"),color:"blue"},{value:"500+",label:s("Companies Served"),color:"green"},{value:"20K+",label:s("Employees Managed"),color:"purple"}],H=t.values&&t.values.length>0?t.values:N,d=t.stats&&t.stats.length>0?t.stats:w,x=()=>e.jsx("div",{className:"bg-white rounded-xl p-8 border border-gray-200 h-96 flex items-center justify-center overflow-hidden",children:r?e.jsx("img",{src:r,alt:"About Us",className:"max-w-full max-h-full object-contain rounded-lg",style:i?{transform:`translateY(${m}px)`,transition:"transform 0.1s linear"}:void 0}):e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-24 h-24 bg-gray-100 rounded-full mx-auto mb-6 flex items-center justify-center",children:e.jsx("span",{className:"text-3xl",children:t.image_icon||"🚀"})}),e.jsx("h4",{className:"text-xl font-semibold text-gray-900 mb-2",children:t.image_title||s("Innovation Driven")}),e.jsx("p",{className:"text-gray-600",children:t.image_subtitle||s("Building the future of networking")})]})}),u=({centered:a=!1})=>e.jsxs("div",{className:a?"text-center":"",children:[e.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-6",children:t.story_title||s("We are passionate about simplifying HR management for businesses of all sizes.")}),e.jsx("div",{className:"text-gray-600 mb-8 leading-relaxed",dangerouslySetInnerHTML:{__html:(t.story_content||s("Founded by HR and tech enthusiasts, HRMGo was created to replace cumbersome spreadsheets and manual processes with a modern, all-in-one HR platform.")).replace(/\n/g,'
')}}),d.length>0&&e.jsx("div",{className:`flex items-center gap-8 ${a?"justify-center":""}`,children:d.map((l,c)=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-gray-900",children:l.value}),e.jsx("div",{className:"text-sm text-gray-600",children:l.label})]},c))})]}),k=()=>f==="centered"?n==="background"&&r?e.jsxs("div",{ref:o,className:"relative rounded-xl overflow-hidden mb-8 sm:mb-12 lg:mb-16",children:[e.jsx("img",{src:r,alt:"About Us",className:"w-full h-96 object-cover",style:i?{transform:`translateY(${m}px)`,transition:"transform 0.1s linear",height:"110%",top:"-5%",position:"relative"}:void 0}),e.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center p-8",children:e.jsxs("div",{className:"text-center text-white max-w-2xl",children:[e.jsx("h3",{className:"text-2xl font-bold mb-4",children:t.story_title||s("We are passionate about simplifying HR management for businesses of all sizes.")}),e.jsx("div",{className:"mb-6 leading-relaxed opacity-90",dangerouslySetInnerHTML:{__html:(t.story_content||s("Founded by HR and tech enthusiasts, HRMGo was created to replace cumbersome spreadsheets and manual processes with a modern, all-in-one HR platform.")).replace(/\n/g,'
')}}),d.length>0&&e.jsx("div",{className:"flex items-center justify-center gap-8",children:d.map((a,l)=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold",children:a.value}),e.jsx("div",{className:"text-sm opacity-80",children:a.label})]},l))})]})})]}):e.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-8 sm:mb-12 lg:mb-16",children:[e.jsx(u,{centered:!0}),(n==="left"||n==="right")&&e.jsx("div",{className:"mt-8",children:e.jsx(x,{})})]}):f==="image-left"?e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 sm:gap-12 lg:gap-16 items-center mb-8 sm:mb-12 lg:mb-16",children:[n==="background"&&r?e.jsxs("div",{ref:o,className:"relative rounded-xl overflow-hidden h-96",children:[e.jsx("img",{src:r,alt:"About Us",className:"w-full object-cover",style:i?{transform:`translateY(${m}px)`,transition:"transform 0.1s linear",height:"120%",top:"-10%",position:"relative"}:{height:"100%"}}),e.jsx("div",{className:"absolute inset-0 bg-black/30 rounded-xl"})]}):e.jsx(x,{}),e.jsx(u,{})]}):e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 sm:gap-12 lg:gap-16 items-center mb-8 sm:mb-12 lg:mb-16",children:[e.jsx(u,{}),n==="background"&&r?e.jsxs("div",{ref:o,className:"relative rounded-xl overflow-hidden h-96",children:[e.jsx("img",{src:r,alt:"About Us",className:"w-full object-cover",style:i?{transform:`translateY(${m}px)`,transition:"transform 0.1s linear",height:"120%",top:"-10%",position:"relative"}:{height:"100%"}}),e.jsx("div",{className:"absolute inset-0 bg-black/30 rounded-xl"})]}):e.jsx(x,{})]});return e.jsx("section",{id:"about",className:"py-12 sm:py-16 lg:py-20",style:{backgroundColor:v},ref:j,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:`text-center mb-8 sm:mb-12 lg:mb-16 transition-all duration-700 ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-4",children:t.title||s("About HRM SaaS")}),e.jsx("p",{className:"text-lg text-gray-600 max-w-3xl mx-auto leading-relaxed font-medium",children:t.description||s("We are passionate about simplifying HR management for businesses of all sizes.")})]}),k(),e.jsx("div",{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 sm:gap-8 transition-all duration-700 delay-500 ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:H.map((a,l)=>{const c=U[a.icon]||b;return e.jsxs("div",{className:"text-center bg-white p-6 rounded-xl border border-gray-200",children:[e.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center mx-auto mb-4",style:{backgroundColor:`${p}15`},children:e.jsx(c,{className:"w-6 h-6",style:{color:p}})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-3",children:a.title}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:a.description})]},l)})})]})})}export{X as default};
diff --git a/public/build/assets/ContactSection-CkFTBtM_.js b/public/build/assets/ContactSection-icl9AjBi.js
similarity index 97%
rename from public/build/assets/ContactSection-CkFTBtM_.js
rename to public/build/assets/ContactSection-icl9AjBi.js
index 239b2cc5b..acd6bcc84 100644
--- a/public/build/assets/ContactSection-CkFTBtM_.js
+++ b/public/build/assets/ContactSection-icl9AjBi.js
@@ -1 +1 @@
-import{j as e}from"./ui-Z445SNHD.js";import{u as j,b as y,t as u}from"./app-BSYHJZwU.js";import{M as f}from"./mail-DxVHYF7N.js";import{P as N}from"./phone-C6oVC2rb.js";import{M as v}from"./map-pin-IdpREju-.js";import{S as w}from"./send-Bj7h8rUg.js";/* empty css *//* empty css */import"./utils-BWxnHGCV.js";function T({flash:S,settings:a,sectionData:s,brandColor:d="#3b82f6"}){const{t:r}=j(),{data:n,setData:c,post:g,processing:o,errors:t,reset:h}=y({name:"",email:"",subject:"",message:""}),b=l=>{l.preventDefault(),g(route("landing-page.contact"),{onSuccess:m=>{var x;h();const i=((x=m.props.flash)==null?void 0:x.success)||"Thank you for your message. We will get back to you soon!";u.success(i)},onError:m=>{const i=Object.values(m).join(", ");u.error(i||"Failed to send message. Please try again.")}})},p=[{icon:f,title:r("Email Us"),content:(a==null?void 0:a.contact_email)||"support@hrm.com"},{icon:N,title:r("Call Us"),content:(a==null?void 0:a.contact_phone)||"+1 (555) 123-4567"},{icon:v,title:r("Visit Us"),content:(a==null?void 0:a.contact_address)||"123 Business Ave, Suite 100"}].filter(l=>l.content);return e.jsx("section",{id:"contact",className:"py-12 sm:py-16 lg:py-20 bg-gray-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-8 sm:mb-12 lg:mb-16",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-4",children:(s==null?void 0:s.title)||r("Get in Touch")}),e.jsx("p",{className:"text-lg text-gray-600 max-w-3xl mx-auto leading-relaxed font-medium",children:(s==null?void 0:s.subtitle)||r("Have questions about HRM SaaS? We'd love to hear from you.. Send us a message and we'll respond as soon as possible.")})]}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 sm:gap-12 lg:gap-16",children:[e.jsx("div",{children:e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-8",children:[e.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-6",children:(s==null?void 0:s.form_title)||r("Send us a Message")}),e.jsxs("form",{onSubmit:b,className:"space-y-6",role:"form","aria-label":"Contact form",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Full Name")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("input",{type:"text",id:"name",value:n.name,onChange:l=>c("name",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("Your full name"),required:!0,disabled:o}),t.name&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.name})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Email Address")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("input",{type:"email",id:"email",value:n.email,onChange:l=>c("email",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("your@email.com"),required:!0,disabled:o}),t.email&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.email})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"subject",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Subject")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("input",{type:"text",id:"subject",value:n.subject,onChange:l=>c("subject",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("What's this about?"),required:!0,disabled:o}),t.subject&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.subject})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"message",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Message")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("textarea",{id:"message",rows:6,value:n.message,onChange:l=>c("message",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 resize-none disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("Tell us more about your inquiry..."),required:!0,disabled:o}),t.message&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.message})]}),e.jsx("button",{type:"submit",disabled:o,className:"cursor-pointer w-full text-white px-8 py-4 rounded-lg transition-colors font-semibold disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",style:{backgroundColor:d},"aria-label":o?"Sending message":"Send contact message",children:o?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),r("Sending...")]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"w-5 h-5"}),r("Send Message")]})})]})]})}),e.jsx("div",{children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-6",children:(s==null?void 0:s.info_title)||r("Contact Information")}),e.jsx("p",{className:"text-gray-600 mb-8",children:(s==null?void 0:s.info_description)||r("We're here to help and answer any questions you might have about managing your HR processes efficiently. We look forward to hearing from you.")})]}),e.jsx("div",{className:"space-y-6",children:p.map((l,m)=>{const i=l.icon;return e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:`${d}15`},children:e.jsx(i,{className:"w-6 h-6",style:{color:d}})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-1",children:l.title}),e.jsx("p",{className:"text-gray-900 font-medium mb-1",children:l.content}),e.jsx("p",{className:"text-gray-600 text-sm",children:l.description})]})]},m)})}),(s==null?void 0:s.faqs)&&s.faqs.length>0&&e.jsxs("div",{className:"bg-white rounded-xl p-6 border border-gray-200",children:[e.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-4",children:r("Frequently Asked Questions")}),e.jsx("div",{className:"space-y-4",children:s.faqs.map((l,m)=>e.jsxs("div",{children:[e.jsx("h5",{className:"font-medium text-gray-900 mb-1",children:l.question}),e.jsx("p",{className:"text-gray-600 text-sm",children:l.answer})]},m))})]})]})})]})]})})}export{T as default};
+import{j as e}from"./ui-Z445SNHD.js";import{u as j,b as y,t as u}from"./app-sDOUnh17.js";import{M as f}from"./mail-DeK8bIPR.js";import{P as N}from"./phone-CgD68jaL.js";import{M as v}from"./map-pin-M1W6OuY8.js";import{S as w}from"./send-D4zuFg21.js";/* empty css *//* empty css */import"./utils-BWxnHGCV.js";function T({flash:S,settings:a,sectionData:s,brandColor:d="#3b82f6"}){const{t:r}=j(),{data:n,setData:c,post:g,processing:o,errors:t,reset:h}=y({name:"",email:"",subject:"",message:""}),b=l=>{l.preventDefault(),g(route("landing-page.contact"),{onSuccess:m=>{var x;h();const i=((x=m.props.flash)==null?void 0:x.success)||"Thank you for your message. We will get back to you soon!";u.success(i)},onError:m=>{const i=Object.values(m).join(", ");u.error(i||"Failed to send message. Please try again.")}})},p=[{icon:f,title:r("Email Us"),content:(a==null?void 0:a.contact_email)||"support@hrm.com"},{icon:N,title:r("Call Us"),content:(a==null?void 0:a.contact_phone)||"+1 (555) 123-4567"},{icon:v,title:r("Visit Us"),content:(a==null?void 0:a.contact_address)||"123 Business Ave, Suite 100"}].filter(l=>l.content);return e.jsx("section",{id:"contact",className:"py-12 sm:py-16 lg:py-20 bg-gray-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-8 sm:mb-12 lg:mb-16",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-4",children:(s==null?void 0:s.title)||r("Get in Touch")}),e.jsx("p",{className:"text-lg text-gray-600 max-w-3xl mx-auto leading-relaxed font-medium",children:(s==null?void 0:s.subtitle)||r("Have questions about HRM SaaS? We'd love to hear from you.. Send us a message and we'll respond as soon as possible.")})]}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 sm:gap-12 lg:gap-16",children:[e.jsx("div",{children:e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-8",children:[e.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-6",children:(s==null?void 0:s.form_title)||r("Send us a Message")}),e.jsxs("form",{onSubmit:b,className:"space-y-6",role:"form","aria-label":"Contact form",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Full Name")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("input",{type:"text",id:"name",value:n.name,onChange:l=>c("name",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("Your full name"),required:!0,disabled:o}),t.name&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.name})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Email Address")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("input",{type:"email",id:"email",value:n.email,onChange:l=>c("email",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("your@email.com"),required:!0,disabled:o}),t.email&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.email})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"subject",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Subject")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("input",{type:"text",id:"subject",value:n.subject,onChange:l=>c("subject",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("What's this about?"),required:!0,disabled:o}),t.subject&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.subject})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"message",className:"block text-sm font-medium text-gray-700 mb-2",children:[r("Message")," ",e.jsx("span",{className:"text-red-500","aria-label":"required",children:"*"})]}),e.jsx("textarea",{id:"message",rows:6,value:n.message,onChange:l=>c("message",l.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 resize-none disabled:bg-gray-100 disabled:cursor-not-allowed",style:{"--tw-ring-color":d},placeholder:r("Tell us more about your inquiry..."),required:!0,disabled:o}),t.message&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:t.message})]}),e.jsx("button",{type:"submit",disabled:o,className:"cursor-pointer w-full text-white px-8 py-4 rounded-lg transition-colors font-semibold disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",style:{backgroundColor:d},"aria-label":o?"Sending message":"Send contact message",children:o?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),r("Sending...")]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"w-5 h-5"}),r("Send Message")]})})]})]})}),e.jsx("div",{children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-6",children:(s==null?void 0:s.info_title)||r("Contact Information")}),e.jsx("p",{className:"text-gray-600 mb-8",children:(s==null?void 0:s.info_description)||r("We're here to help and answer any questions you might have about managing your HR processes efficiently. We look forward to hearing from you.")})]}),e.jsx("div",{className:"space-y-6",children:p.map((l,m)=>{const i=l.icon;return e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:`${d}15`},children:e.jsx(i,{className:"w-6 h-6",style:{color:d}})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-1",children:l.title}),e.jsx("p",{className:"text-gray-900 font-medium mb-1",children:l.content}),e.jsx("p",{className:"text-gray-600 text-sm",children:l.description})]})]},m)})}),(s==null?void 0:s.faqs)&&s.faqs.length>0&&e.jsxs("div",{className:"bg-white rounded-xl p-6 border border-gray-200",children:[e.jsx("h4",{className:"text-lg font-semibold text-gray-900 mb-4",children:r("Frequently Asked Questions")}),e.jsx("div",{className:"space-y-4",children:s.faqs.map((l,m)=>e.jsxs("div",{children:[e.jsx("h5",{className:"font-medium text-gray-900 mb-1",children:l.question}),e.jsx("p",{className:"text-gray-600 text-sm",children:l.answer})]},m))})]})]})})]})]})})}export{T as default};
diff --git a/public/build/assets/CookieConsentBanner-Byo3zuPL.js b/public/build/assets/CookieConsentBanner-ClQ8u3uz.js
similarity index 98%
rename from public/build/assets/CookieConsentBanner-Byo3zuPL.js
rename to public/build/assets/CookieConsentBanner-ClQ8u3uz.js
index 9fe572a0d..1c9db32d4 100644
--- a/public/build/assets/CookieConsentBanner-Byo3zuPL.js
+++ b/public/build/assets/CookieConsentBanner-ClQ8u3uz.js
@@ -1 +1 @@
-import{r as v,j as e,z as B,B as $,E as K,F as V,I as W,S as Q,G as Y,L as Z}from"./ui-Z445SNHD.js";import{R as P}from"./react-country-flag.esm-Bs2jngHP.js";import{u as A,c as I,D as ee,h as te,j as se,k as ae,L as M,I as z,o as j,J as T,e as F,K as _,N as O,P as oe,O as U,Q as ne,r as q,R as J,a as re,C as G,X as H,T as ie,t as X}from"./app-BSYHJZwU.js";import{R as ce}from"./refresh-cw-gcM_kYqC.js";import{G as le}from"./globe-BV-V8u_6.js";import{S as de}from"./settings-CX6nvi-t.js";import{S as ue}from"./switch-DhleYvkr.js";function me({open:s,onOpenChange:l,onSuccess:c}){var o;const{t}=A(),{props:p}=I(),b=((o=p.globalSettings)==null?void 0:o.is_demo)||!1,[n,u]=v.useState({code:"",name:"",countryCode:""}),[x,D]=v.useState(!1),f=async d=>{var C;d.preventDefault(),D(!0);try{const y=await fetch(route("languages.create"),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":((C=document.querySelector('meta[name="csrf-token"]'))==null?void 0:C.getAttribute("content"))||"",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(n)}),h=await y.json();y.ok&&h.success?(T.success(h.message||t("Language created successfully")),u({code:"",name:"",countryCode:""}),l(!1),c==null||c(),window.location.reload()):(console.error("Create language error:",h),b&&h.message?T.error(h.message):T.error(h.error||t("Failed to create language")))}catch(y){console.error("Network error:",y),T.error(t("Failed to create language"))}finally{D(!1)}};return e.jsx(ee,{open:s,onOpenChange:l,children:e.jsxs(te,{className:"sm:max-w-md",children:[e.jsx(se,{children:e.jsx(ae,{children:t("Create Language")})}),e.jsxs("form",{onSubmit:f,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(M,{htmlFor:"code",children:t("Language Code")}),e.jsx(z,{id:"code",placeholder:t("e.g., fr, de, ja"),value:n.code,onChange:d=>u({...n,code:d.target.value}),required:!0})]}),e.jsxs("div",{children:[e.jsx(M,{htmlFor:"name",children:t("Language Name")}),e.jsx(z,{id:"name",placeholder:t("e.g., Français, Deutsch, 日本語"),value:n.name,onChange:d=>u({...n,name:d.target.value}),required:!0})]}),e.jsxs("div",{children:[e.jsx(M,{htmlFor:"countryCode",children:t("Country Code")}),e.jsx(z,{id:"countryCode",placeholder:t("e.g., FR, DE, JP"),maxLength:2,value:n.countryCode,onChange:d=>u({...n,countryCode:d.target.value.toUpperCase()}),required:!0})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(j,{type:"button",variant:"outline",onClick:()=>l(!1),children:t("Cancel")}),e.jsx(j,{type:"submit",disabled:x,children:x?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"h-4 w-4 animate-spin mr-2"}),t("Creating...")]}):t("Create Language")})]})]})]})})}function ge({...s}){return e.jsx(B,{"data-slot":"dropdown-menu",...s})}function fe({...s}){return e.jsx($,{"data-slot":"dropdown-menu-trigger",...s})}function pe({className:s,sideOffset:l=4,...c}){return e.jsx(K,{children:e.jsx(V,{"data-slot":"dropdown-menu-content",sideOffset:l,className:F("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",s),...c})})}function he({...s}){return e.jsx(Y,{"data-slot":"dropdown-menu-group",...s})}function R({className:s,inset:l,variant:c="default",...t}){return e.jsx(W,{"data-slot":"dropdown-menu-item","data-inset":l,"data-variant":c,className:F("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...t})}function Ne({className:s,inset:l,...c}){return e.jsx(Z,{"data-slot":"dropdown-menu-label","data-inset":l,className:F("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",s),...c})}function xe({className:s,...l}){return e.jsx(Q,{"data-slot":"dropdown-menu-separator",className:F("bg-border -mx-1 my-1 h-px",s),...l})}function De(){var g,N;const{i18n:s,t:l}=A(),{auth:c,globalSettings:t,userLanguage:p}=I().props,{setPosition:b}=_(),{updatePosition:n}=_(),[u,x]=v.useState(()=>{const a=((t==null?void 0:t.availableLanguages)||[]).filter(r=>r.enabled!==!1);if(p){const r=a.find(i=>i.code===p);if(r)return r}return a[0]||null}),[D,f]=v.useState(!1),o=(t==null?void 0:t.availableLanguages)||[],d=(t==null?void 0:t.is_saas)||!1,C=!!(c!=null&&c.user),y=((N=(g=c==null?void 0:c.user)==null?void 0:g.roles)==null?void 0:N.map(a=>a.name))||[],h=C&&O("superadmin",y),S=C&&O("company",y),m=d?h:S;v.useEffect(()=>{const a=(o||[]).filter(r=>r.enabled!==!1);if(p&&s.language!==p)s.changeLanguage(p,()=>{const r=a.find(i=>i.code===p)||a[0];x(r)});else{const r=a.find(i=>i.code===s.language)||a[0];x(r)}},[o,p]),v.useEffect(()=>{const a=(o||[]).filter(i=>i.enabled!==!1),r=a.find(i=>i.code===s.language)||a[0];x(r)},[s.language,o]);const k=["ar","he"],w=async a=>{const r=o.find(i=>i.code===a);if(r){x(r);try{await s.changeLanguage(a);const i=k.includes(a);let L;U()?L=i?"right":ne("layoutPosition")||"left":L=i?"right":(t==null?void 0:t.layoutDirection)||"left",document.documentElement.dir="ltr",document.documentElement.setAttribute("dir","ltr"),n(L),C&&!U()?q.post(route("languages.change"),{language:a},{preserveScroll:!0,onSuccess:()=>{(i||!i&&(t==null?void 0:t.layoutDirection)==="right")&&q.post(route("settings.brand.update"),{settings:{layoutDirection:L}},{preserveScroll:!0,onError:E=>{console.error("Failed to update layout direction:",E)}})},onError:E=>{console.error("Failed to change language:",E)}}):(J("app_language",a),J("layoutPosition",L)),window.dispatchEvent(new CustomEvent("languageChanged",{detail:{language:a,direction:L}})),window.dispatchEvent(new Event("resize"))}catch(i){console.error("Error changing language:",i)}}};return e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(fe,{asChild:!0,children:e.jsxs(j,{variant:"ghost",className:"flex items-center gap-2 rounded-md border shadow-sm bg-white",children:[e.jsx(le,{className:"h-4 w-4"}),u&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm font-medium hidden md:inline-block",children:u.name}),e.jsx(P,{countryCode:u.countryCode,svg:!0,style:{width:"1.2em",height:"1.2em"}})]})]})}),e.jsxs(pe,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(he,{children:e.jsx("div",{className:"max-h-48 overflow-y-auto",children:(o||[]).filter(a=>a.enabled!==!1).map(a=>e.jsxs(R,{onClick:()=>w(a.code),className:`flex items-center gap-2 ${(u==null?void 0:u.code)===a.code?"bg-accent":""}`,children:[e.jsx(P,{countryCode:a.countryCode,svg:!0,style:{width:"1.2em",height:"1.2em"}}),e.jsx("span",{children:a.name})]},a.code))})}),m&&e.jsxs(e.Fragment,{children:[e.jsx(xe,{}),e.jsxs(R,{onClick:()=>f(!0),className:"justify-center text-primary font-semibold cursor-pointer",children:[e.jsx(oe,{className:"h-4 w-4 mr-2"}),l("Create Language")]}),e.jsx(R,{asChild:!0,className:"justify-center text-primary font-semibold cursor-pointer",children:e.jsxs("a",{href:route("manage-language"),rel:"noopener noreferrer",children:[e.jsx(de,{className:"h-4 w-4 mr-2"}),l("Manage Language")]})})]})]})]}),e.jsx(me,{open:D,onOpenChange:f,onSuccess:()=>f(!1)})]})}function Le(){const{t:s}=A(),{props:l}=I(),[c,t]=v.useState(!1),[p,b]=v.useState(!1),[n,u]=v.useState(!1),{themeColor:x,customColor:D}=re(),f=x==="custom"?D:ie[x],o=l.globalSettings||{},d={cookieTitle:o.cookieTitle||"Cookie Consent",cookieDescription:o.cookieDescription||"We use cookies to enhance your browsing experience and provide personalized content.",strictlyCookieTitle:o.strictlyCookieTitle||"Strictly Necessary Cookies",strictlyCookieDescription:o.strictlyCookieDescription||"These cookies are essential for the website to function properly.",contactUsDescription:o.contactUsDescription||"If you have any questions about our cookie policy, please contact us.",contactUsUrl:o.contactUsUrl||"#"};v.useEffect(()=>{var N,a;const m=o.enableLogging==="1"||o.enableLogging===1||o.enableLogging===!0,k=o.is_demo==="1"||o.is_demo===1||o.is_demo===!0,w=window.location.pathname==="/dashboard"||window.location.pathname.includes("/dashboard"),g=(a=(N=l.auth)==null?void 0:N.user)==null?void 0:a.type;if(m){if(k&&(!w||g!=="company"))return;localStorage.getItem("cookie-consent")||t(!0)}},[]);const C=async()=>{try{const m=new AbortController,k=setTimeout(()=>m.abort(),5e3),w=await fetch("https://ipapi.co/json/",{signal:m.signal,headers:{Accept:"application/json"}});if(clearTimeout(k),!w.ok)throw new Error(`HTTP error! status: ${w.status}`);const g=await w.json();return{ip:g.ip||"unknown",country:g.country_name||"unknown",city:g.city||"unknown",region:g.region||"unknown",...g}}catch(m){return console.warn("Failed to get location data:",m.message),{ip:"unknown",country:"unknown",city:"unknown",region:"unknown",error:m.message||"Location fetch failed"}}},y=async(m,k)=>{var w;try{const g=await C(),N={...k,timestamp:new Date().toISOString(),consentType:m,userAgent:navigator.userAgent||"unknown",language:navigator.language||"unknown",url:window.location.href,...g};localStorage.setItem("cookie-consent",JSON.stringify({accepted:!0,timestamp:Date.now()}));const a=(w=document.querySelector('meta[name="csrf-token"]'))==null?void 0:w.getAttribute("content");if(!a){console.warn("CSRF token not found");return}const r=await fetch(route("cookie.consent.store"),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":a,Accept:"application/json"},body:JSON.stringify(N)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);if(!(await r.json()).success)throw new Error("Server returned error")}catch(g){throw console.error("Failed to save cookie consent:",g),localStorage.setItem("cookie-consent",JSON.stringify({accepted:!0,timestamp:Date.now()})),g}},h=async()=>{if(!n){u(!0);try{await y("accept_all",{necessary:!0,analytics:!0,marketing:!0}),t(!1)}catch{X.error(s("Failed to save cookie preferences"))}finally{u(!1)}}},S=async()=>{if(!n){u(!0);try{await y("necessary_only",{necessary:!0,analytics:!1,marketing:!1}),t(!1)}catch{X.error(s("Failed to save cookie preferences"))}finally{u(!1)}}};return c?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed bottom-4 left-1/2 transform -translate-x-1/2 z-50 max-w-md w-full mx-4",children:e.jsxs(G,{className:"p-4 shadow-lg border",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsx("h3",{className:"font-semibold text-sm",children:d.cookieTitle}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>t(!1),className:"h-6 w-6 p-0",children:e.jsx(H,{className:"h-4 w-4"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:d.cookieDescription}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{onClick:h,size:"sm",className:"flex-1 text-white hover:opacity-90",style:{backgroundColor:f},disabled:n,children:s(n?"Saving...":"Accept All")}),e.jsx(j,{onClick:S,variant:"outline",size:"sm",className:"flex-1",style:{borderColor:f,color:f},disabled:n,children:s(n?"Saving...":"Necessary Only")})]}),e.jsx(j,{onClick:()=>b(!0),variant:"ghost",size:"sm",className:"text-sm underline",children:s("Let me choose")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[d.contactUsDescription," ",e.jsx("a",{href:d.contactUsUrl,className:"underline",children:s("Contact us")})]})]})}),p&&e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:e.jsx(G,{className:"w-full max-w-md max-h-[80vh] overflow-y-auto",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:d.cookieTitle}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>b(!1),className:"h-6 w-6 p-0",children:e.jsx(H,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-medium text-sm",children:d.strictlyCookieTitle}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:d.strictlyCookieDescription})]}),e.jsx(ue,{checked:!0,disabled:!0})]})}),e.jsxs("div",{className:"flex gap-2 mt-6",children:[e.jsx(j,{onClick:async()=>{await S(),b(!1)},variant:"outline",size:"sm",className:"flex-1",style:{borderColor:f,color:f},disabled:n,children:s(n?"Saving...":"Save Preferences")}),e.jsx(j,{onClick:async()=>{await h(),b(!1)},size:"sm",className:"flex-1 text-white hover:opacity-90",style:{backgroundColor:f},disabled:n,children:s(n?"Saving...":"Accept All")})]})]})})})]}):null}export{Le as C,ge as D,De as L,fe as a,pe as b,R as c,xe as d,Ne as e,he as f};
+import{r as v,j as e,z as B,B as $,E as K,F as V,I as W,S as Q,G as Y,L as Z}from"./ui-Z445SNHD.js";import{R as P}from"./react-country-flag.esm-Bs2jngHP.js";import{u as A,c as I,D as ee,h as te,j as se,k as ae,L as M,I as z,o as j,J as T,e as F,K as _,N as O,P as oe,O as U,Q as ne,r as q,R as J,a as re,C as G,X as H,T as ie,t as X}from"./app-sDOUnh17.js";import{R as ce}from"./refresh-cw-iWo6guvA.js";import{G as le}from"./globe-Ceg_d9rk.js";import{S as de}from"./settings-I4rcMQaX.js";import{S as ue}from"./switch-BRQPJ0Pu.js";function me({open:s,onOpenChange:l,onSuccess:c}){var o;const{t}=A(),{props:p}=I(),b=((o=p.globalSettings)==null?void 0:o.is_demo)||!1,[n,u]=v.useState({code:"",name:"",countryCode:""}),[x,D]=v.useState(!1),f=async d=>{var C;d.preventDefault(),D(!0);try{const y=await fetch(route("languages.create"),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":((C=document.querySelector('meta[name="csrf-token"]'))==null?void 0:C.getAttribute("content"))||"",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(n)}),h=await y.json();y.ok&&h.success?(T.success(h.message||t("Language created successfully")),u({code:"",name:"",countryCode:""}),l(!1),c==null||c(),window.location.reload()):(console.error("Create language error:",h),b&&h.message?T.error(h.message):T.error(h.error||t("Failed to create language")))}catch(y){console.error("Network error:",y),T.error(t("Failed to create language"))}finally{D(!1)}};return e.jsx(ee,{open:s,onOpenChange:l,children:e.jsxs(te,{className:"sm:max-w-md",children:[e.jsx(se,{children:e.jsx(ae,{children:t("Create Language")})}),e.jsxs("form",{onSubmit:f,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(M,{htmlFor:"code",children:t("Language Code")}),e.jsx(z,{id:"code",placeholder:t("e.g., fr, de, ja"),value:n.code,onChange:d=>u({...n,code:d.target.value}),required:!0})]}),e.jsxs("div",{children:[e.jsx(M,{htmlFor:"name",children:t("Language Name")}),e.jsx(z,{id:"name",placeholder:t("e.g., Français, Deutsch, 日本語"),value:n.name,onChange:d=>u({...n,name:d.target.value}),required:!0})]}),e.jsxs("div",{children:[e.jsx(M,{htmlFor:"countryCode",children:t("Country Code")}),e.jsx(z,{id:"countryCode",placeholder:t("e.g., FR, DE, JP"),maxLength:2,value:n.countryCode,onChange:d=>u({...n,countryCode:d.target.value.toUpperCase()}),required:!0})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(j,{type:"button",variant:"outline",onClick:()=>l(!1),children:t("Cancel")}),e.jsx(j,{type:"submit",disabled:x,children:x?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"h-4 w-4 animate-spin mr-2"}),t("Creating...")]}):t("Create Language")})]})]})]})})}function ge({...s}){return e.jsx(B,{"data-slot":"dropdown-menu",...s})}function fe({...s}){return e.jsx($,{"data-slot":"dropdown-menu-trigger",...s})}function pe({className:s,sideOffset:l=4,...c}){return e.jsx(K,{children:e.jsx(V,{"data-slot":"dropdown-menu-content",sideOffset:l,className:F("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",s),...c})})}function he({...s}){return e.jsx(Y,{"data-slot":"dropdown-menu-group",...s})}function R({className:s,inset:l,variant:c="default",...t}){return e.jsx(W,{"data-slot":"dropdown-menu-item","data-inset":l,"data-variant":c,className:F("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...t})}function Ne({className:s,inset:l,...c}){return e.jsx(Z,{"data-slot":"dropdown-menu-label","data-inset":l,className:F("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",s),...c})}function xe({className:s,...l}){return e.jsx(Q,{"data-slot":"dropdown-menu-separator",className:F("bg-border -mx-1 my-1 h-px",s),...l})}function De(){var g,N;const{i18n:s,t:l}=A(),{auth:c,globalSettings:t,userLanguage:p}=I().props,{setPosition:b}=_(),{updatePosition:n}=_(),[u,x]=v.useState(()=>{const a=((t==null?void 0:t.availableLanguages)||[]).filter(r=>r.enabled!==!1);if(p){const r=a.find(i=>i.code===p);if(r)return r}return a[0]||null}),[D,f]=v.useState(!1),o=(t==null?void 0:t.availableLanguages)||[],d=(t==null?void 0:t.is_saas)||!1,C=!!(c!=null&&c.user),y=((N=(g=c==null?void 0:c.user)==null?void 0:g.roles)==null?void 0:N.map(a=>a.name))||[],h=C&&O("superadmin",y),S=C&&O("company",y),m=d?h:S;v.useEffect(()=>{const a=(o||[]).filter(r=>r.enabled!==!1);if(p&&s.language!==p)s.changeLanguage(p,()=>{const r=a.find(i=>i.code===p)||a[0];x(r)});else{const r=a.find(i=>i.code===s.language)||a[0];x(r)}},[o,p]),v.useEffect(()=>{const a=(o||[]).filter(i=>i.enabled!==!1),r=a.find(i=>i.code===s.language)||a[0];x(r)},[s.language,o]);const k=["ar","he"],w=async a=>{const r=o.find(i=>i.code===a);if(r){x(r);try{await s.changeLanguage(a);const i=k.includes(a);let L;U()?L=i?"right":ne("layoutPosition")||"left":L=i?"right":(t==null?void 0:t.layoutDirection)||"left",document.documentElement.dir="ltr",document.documentElement.setAttribute("dir","ltr"),n(L),C&&!U()?q.post(route("languages.change"),{language:a},{preserveScroll:!0,onSuccess:()=>{(i||!i&&(t==null?void 0:t.layoutDirection)==="right")&&q.post(route("settings.brand.update"),{settings:{layoutDirection:L}},{preserveScroll:!0,onError:E=>{console.error("Failed to update layout direction:",E)}})},onError:E=>{console.error("Failed to change language:",E)}}):(J("app_language",a),J("layoutPosition",L)),window.dispatchEvent(new CustomEvent("languageChanged",{detail:{language:a,direction:L}})),window.dispatchEvent(new Event("resize"))}catch(i){console.error("Error changing language:",i)}}};return e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(fe,{asChild:!0,children:e.jsxs(j,{variant:"ghost",className:"flex items-center gap-2 rounded-md border shadow-sm bg-white",children:[e.jsx(le,{className:"h-4 w-4"}),u&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm font-medium hidden md:inline-block",children:u.name}),e.jsx(P,{countryCode:u.countryCode,svg:!0,style:{width:"1.2em",height:"1.2em"}})]})]})}),e.jsxs(pe,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(he,{children:e.jsx("div",{className:"max-h-48 overflow-y-auto",children:(o||[]).filter(a=>a.enabled!==!1).map(a=>e.jsxs(R,{onClick:()=>w(a.code),className:`flex items-center gap-2 ${(u==null?void 0:u.code)===a.code?"bg-accent":""}`,children:[e.jsx(P,{countryCode:a.countryCode,svg:!0,style:{width:"1.2em",height:"1.2em"}}),e.jsx("span",{children:a.name})]},a.code))})}),m&&e.jsxs(e.Fragment,{children:[e.jsx(xe,{}),e.jsxs(R,{onClick:()=>f(!0),className:"justify-center text-primary font-semibold cursor-pointer",children:[e.jsx(oe,{className:"h-4 w-4 mr-2"}),l("Create Language")]}),e.jsx(R,{asChild:!0,className:"justify-center text-primary font-semibold cursor-pointer",children:e.jsxs("a",{href:route("manage-language"),rel:"noopener noreferrer",children:[e.jsx(de,{className:"h-4 w-4 mr-2"}),l("Manage Language")]})})]})]})]}),e.jsx(me,{open:D,onOpenChange:f,onSuccess:()=>f(!1)})]})}function Le(){const{t:s}=A(),{props:l}=I(),[c,t]=v.useState(!1),[p,b]=v.useState(!1),[n,u]=v.useState(!1),{themeColor:x,customColor:D}=re(),f=x==="custom"?D:ie[x],o=l.globalSettings||{},d={cookieTitle:o.cookieTitle||"Cookie Consent",cookieDescription:o.cookieDescription||"We use cookies to enhance your browsing experience and provide personalized content.",strictlyCookieTitle:o.strictlyCookieTitle||"Strictly Necessary Cookies",strictlyCookieDescription:o.strictlyCookieDescription||"These cookies are essential for the website to function properly.",contactUsDescription:o.contactUsDescription||"If you have any questions about our cookie policy, please contact us.",contactUsUrl:o.contactUsUrl||"#"};v.useEffect(()=>{var N,a;const m=o.enableLogging==="1"||o.enableLogging===1||o.enableLogging===!0,k=o.is_demo==="1"||o.is_demo===1||o.is_demo===!0,w=window.location.pathname==="/dashboard"||window.location.pathname.includes("/dashboard"),g=(a=(N=l.auth)==null?void 0:N.user)==null?void 0:a.type;if(m){if(k&&(!w||g!=="company"))return;localStorage.getItem("cookie-consent")||t(!0)}},[]);const C=async()=>{try{const m=new AbortController,k=setTimeout(()=>m.abort(),5e3),w=await fetch("https://ipapi.co/json/",{signal:m.signal,headers:{Accept:"application/json"}});if(clearTimeout(k),!w.ok)throw new Error(`HTTP error! status: ${w.status}`);const g=await w.json();return{ip:g.ip||"unknown",country:g.country_name||"unknown",city:g.city||"unknown",region:g.region||"unknown",...g}}catch(m){return console.warn("Failed to get location data:",m.message),{ip:"unknown",country:"unknown",city:"unknown",region:"unknown",error:m.message||"Location fetch failed"}}},y=async(m,k)=>{var w;try{const g=await C(),N={...k,timestamp:new Date().toISOString(),consentType:m,userAgent:navigator.userAgent||"unknown",language:navigator.language||"unknown",url:window.location.href,...g};localStorage.setItem("cookie-consent",JSON.stringify({accepted:!0,timestamp:Date.now()}));const a=(w=document.querySelector('meta[name="csrf-token"]'))==null?void 0:w.getAttribute("content");if(!a){console.warn("CSRF token not found");return}const r=await fetch(route("cookie.consent.store"),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":a,Accept:"application/json"},body:JSON.stringify(N)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);if(!(await r.json()).success)throw new Error("Server returned error")}catch(g){throw console.error("Failed to save cookie consent:",g),localStorage.setItem("cookie-consent",JSON.stringify({accepted:!0,timestamp:Date.now()})),g}},h=async()=>{if(!n){u(!0);try{await y("accept_all",{necessary:!0,analytics:!0,marketing:!0}),t(!1)}catch{X.error(s("Failed to save cookie preferences"))}finally{u(!1)}}},S=async()=>{if(!n){u(!0);try{await y("necessary_only",{necessary:!0,analytics:!1,marketing:!1}),t(!1)}catch{X.error(s("Failed to save cookie preferences"))}finally{u(!1)}}};return c?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed bottom-4 left-1/2 transform -translate-x-1/2 z-50 max-w-md w-full mx-4",children:e.jsxs(G,{className:"p-4 shadow-lg border",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsx("h3",{className:"font-semibold text-sm",children:d.cookieTitle}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>t(!1),className:"h-6 w-6 p-0",children:e.jsx(H,{className:"h-4 w-4"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:d.cookieDescription}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{onClick:h,size:"sm",className:"flex-1 text-white hover:opacity-90",style:{backgroundColor:f},disabled:n,children:s(n?"Saving...":"Accept All")}),e.jsx(j,{onClick:S,variant:"outline",size:"sm",className:"flex-1",style:{borderColor:f,color:f},disabled:n,children:s(n?"Saving...":"Necessary Only")})]}),e.jsx(j,{onClick:()=>b(!0),variant:"ghost",size:"sm",className:"text-sm underline",children:s("Let me choose")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[d.contactUsDescription," ",e.jsx("a",{href:d.contactUsUrl,className:"underline",children:s("Contact us")})]})]})}),p&&e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:e.jsx(G,{className:"w-full max-w-md max-h-[80vh] overflow-y-auto",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:d.cookieTitle}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>b(!1),className:"h-6 w-6 p-0",children:e.jsx(H,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-medium text-sm",children:d.strictlyCookieTitle}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:d.strictlyCookieDescription})]}),e.jsx(ue,{checked:!0,disabled:!0})]})}),e.jsxs("div",{className:"flex gap-2 mt-6",children:[e.jsx(j,{onClick:async()=>{await S(),b(!1)},variant:"outline",size:"sm",className:"flex-1",style:{borderColor:f,color:f},disabled:n,children:s(n?"Saving...":"Save Preferences")}),e.jsx(j,{onClick:async()=>{await h(),b(!1)},size:"sm",className:"flex-1 text-white hover:opacity-90",style:{backgroundColor:f},disabled:n,children:s(n?"Saving...":"Accept All")})]})]})})})]}):null}export{Le as C,ge as D,De as L,fe as a,pe as b,R as c,xe as d,Ne as e,he as f};
diff --git a/public/build/assets/CrudDeleteModal-DZYIfzYh.js b/public/build/assets/CrudDeleteModal-Cp7ocOVS.js
similarity index 90%
rename from public/build/assets/CrudDeleteModal-DZYIfzYh.js
rename to public/build/assets/CrudDeleteModal-Cp7ocOVS.js
index ae0341e03..f0b538d4e 100644
--- a/public/build/assets/CrudDeleteModal-DZYIfzYh.js
+++ b/public/build/assets/CrudDeleteModal-Cp7ocOVS.js
@@ -1 +1 @@
-import{j as e}from"./ui-Z445SNHD.js";import{u as r,D as c,h as d,j as u,k as h,p as j,q as x,o as a}from"./app-BSYHJZwU.js";function p({isOpen:o,onClose:n,onConfirm:i,itemName:l,entityName:t}){const{t:s}=r();return e.jsx(c,{open:o,onOpenChange:n,children:e.jsxs(d,{className:"sm:max-w-md",children:[e.jsxs(u,{children:[e.jsxs(h,{children:[s("Delete")," ",t]}),e.jsxs(j,{children:[s("Are you sure you want to delete")," ",l||`this ${t}`,"? ",s("This action cannot be undone.")]})]}),e.jsxs(x,{className:"sm:justify-end",children:[e.jsx(a,{type:"button",variant:"outline",onClick:n,children:s("Cancel")}),e.jsx(a,{type:"button",variant:"destructive",onClick:i,children:s("Delete")})]})]})})}export{p as C};
+import{j as e}from"./ui-Z445SNHD.js";import{u as r,D as c,h as d,j as u,k as h,p as j,q as x,o as a}from"./app-sDOUnh17.js";function p({isOpen:o,onClose:n,onConfirm:i,itemName:l,entityName:t}){const{t:s}=r();return e.jsx(c,{open:o,onOpenChange:n,children:e.jsxs(d,{className:"sm:max-w-md",children:[e.jsxs(u,{children:[e.jsxs(h,{children:[s("Delete")," ",t]}),e.jsxs(j,{children:[s("Are you sure you want to delete")," ",l||`this ${t}`,"? ",s("This action cannot be undone.")]})]}),e.jsxs(x,{className:"sm:justify-end",children:[e.jsx(a,{type:"button",variant:"outline",onClick:n,children:s("Cancel")}),e.jsx(a,{type:"button",variant:"destructive",onClick:i,children:s("Delete")})]})]})})}export{p as C};
diff --git a/public/build/assets/CrudFormModal-Bvh5mDoK.js b/public/build/assets/CrudFormModal-DCZgATgD.js
similarity index 97%
rename from public/build/assets/CrudFormModal-Bvh5mDoK.js
rename to public/build/assets/CrudFormModal-DCZgATgD.js
index fae6dd0bb..68fbb69d7 100644
--- a/public/build/assets/CrudFormModal-Bvh5mDoK.js
+++ b/public/build/assets/CrudFormModal-DCZgATgD.js
@@ -1 +1 @@
-import{r as O,j as a,R as ue}from"./ui-Z445SNHD.js";import{c as pe,u as de,D as xe,h as he,j as be,k as ye,p as ge,L as U,q as je,o as X,I as Z,M as ve}from"./app-BSYHJZwU.js";import{T as we}from"./textarea-B_SndWQW.js";import{S as Se,a as Ne,b as Fe,c as $e,d as te}from"./select-CbXk1R0B.js";import{R as Oe,a as qe}from"./radio-group-BQIr4fyd.js";import{C as Ae}from"./checkbox-CYQIGzbl.js";import{S as Ve}from"./switch-DhleYvkr.js";import{M as Me}from"./multi-select-field-Dvho_7PP.js";import{S as Ce}from"./scroll-area-9uHad1Z9.js";function Ee({fields:u,values:M,onChange:q,disabled:p=!1}){const{base_url:h}=pe().props,[N,i]=O.useState(()=>{const l={};return u.forEach((n,x)=>{x===0?l[n.name]=n.options||[]:l[n.name]=[]}),l}),[C,F]=O.useState({}),H=async(l,n)=>{var x;if(!l.apiEndpoint)return[];F(r=>({...r,[l.name]:!0}));try{let r=l.apiEndpoint;if(n){const d=encodeURIComponent(String(n)),m=(x=u[u.indexOf(l)-1])==null?void 0:x.name;m&&(r=r.replace(`{${m}}`,d))}const g=await fetch(`${h}${r}`);if(!g.ok)throw new Error(`HTTP error! status: ${g.status}`);const j=await g.json();return Array.isArray(j)?j.map(d=>({value:String(d.id||d.value||""),label:String(d.name||d.label||"Unknown")})):[]}catch{return[]}finally{F(r=>({...r,[l.name]:!1}))}};O.useEffect(()=>{(async()=>{const n={};for(let x=0;x =r||D<0||g&&P>=u}function C(){var U=Wf();if(E(U))return L(U);p=setTimeout(C,_(U))}function L(U){return p=void 0,S&&o?T(U):(o=l=void 0,f)}function z(){p!==void 0&&clearTimeout(p),h=0,o=m=l=p=void 0}function F(){return p===void 0?f:L(Wf())}function ee(){var U=Wf(),D=E(U);if(o=arguments,l=this,m=U,D){if(p===void 0)return b(m);if(g)return clearTimeout(p),p=setTimeout(C,r),T(m)}return p===void 0&&(p=setTimeout(C,r)),f}return ee.cancel=z,ee.flush=F,ee}function yp(t,r,a){(a!==void 0&&!_s(t[r],a)||a===void 0&&!(r in t))&&Qp(t,r,a)}function lC(t){return Er(t)&&Tu(t)}function vp(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}function uC(t){return gT(t,gx(t))}function cC(t,r,a,o,l,u,f){var p=vp(t,a),m=vp(r,a),h=f.get(m);if(h){yp(t,a,h);return}var y=u?u(p,m,a+"",t,r,f):void 0,g=y===void 0;if(g){var S=ir(m),T=!S&&ds(m),b=!S&&!T&&tm(m);y=m,S||T||b?ir(p)?y=p:lC(p)?y=rT(p):T?(g=!1,y=Sx(m,!0)):b?(g=!1,y=_x(m,!0)):y=[]:WA(m)||lu(m)?(y=p,lu(p)?y=uC(p):(!Ln(p)||Kp(p))&&(y=Ex(m))):g=!1}g&&(f.set(m,y),l(y,m,o,u,f),f.delete(m)),yp(t,a,y)}function Cx(t,r,a,o,l){t!==r&&rC(r,function(u,f){if(l||(l=new Sr),Ln(u))cC(t,r,f,a,Cx,o,l);else{var p=o?o(vp(t,f),u,f+"",t,r,l):void 0;p===void 0&&(p=u),yp(t,f,p)}},gx)}var fC={"&":"&","<":"<",">":">",'"':""","'":"'"},dC=eO(fC),Dx=/[&<>"']/g,pC=RegExp(Dx.source);function mC(t){return t=yx(t),t&&pC.test(t)?t.replace(Dx,dC):t}var hC=Object.prototype,gC=hC.hasOwnProperty;function yC(t,r){return t!=null&&gC.call(t,r)}function Nx(t,r){return t!=null&&tC(t,r,yC)}function Ea(t,r){return Rx(t,r)}var bp=ST(function(t,r,a){Cx(t,r,a)});function vC(t,r,a,o){if(!Ln(t))return t;r=rm(r,t);for(var l=-1,u=r.length,f=u-1,p=t;p!=null&&++l-1e3&&H<1e3||U.call(/e/,Z))return Z;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var ke=H<0?-ne(-H):ne(H);if(ke!==H){var We=String(ke),Le=L.call(Z,We.length+1);return z.call(We,Be,"$&_")+"."+z.call(z.call(Le,/([0-9]{3})/g,"$&_"),/_$/,"")}}return z.call(Z,Be,"$&_")}var Y=SC,le=Y.custom,de=Qe(le)?le:null,Q={__proto__:null,double:'"',single:"'"},J={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};td=function H(Z,Be,ke,We){var Le=Be||{};if(pt(Le,"quoteStyle")&&!pt(Q,Le.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(pt(Le,"maxStringLength")&&(typeof Le.maxStringLength=="number"?Le.maxStringLength<0&&Le.maxStringLength!==1/0:Le.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var sn=pt(Le,"customInspect")?Le.customInspect:!0;if(typeof sn!="boolean"&&sn!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(pt(Le,"indent")&&Le.indent!==null&&Le.indent!==" "&&!(parseInt(Le.indent,10)===Le.indent&&Le.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(pt(Le,"numericSeparator")&&typeof Le.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Yt=Le.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return _e(Z,Le);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var we=String(Z);return Yt?j(Z,we):we}if(typeof Z=="bigint"){var Ze=String(Z)+"n";return Yt?j(Z,Ze):Ze}var Rt=typeof Le.depth>"u"?5:Le.depth;if(typeof ke>"u"&&(ke=0),ke>=Rt&&Rt>0&&typeof Z=="object")return Oe(Z)?"[Array]":"[Object]";var At=Pn(Le,ke);if(typeof We>"u")We=[];else if(kt(We,Z)>=0)return"[Circular]";function Mt(wr,fr,io){if(fr&&(We=k.call(We),We.push(fr)),io){var Tr={depth:Le.depth};return pt(Le,"quoteStyle")&&(Tr.quoteStyle=Le.quoteStyle),H(wr,Tr,ke+1,We)}return H(wr,Le,ke+1,We)}if(typeof Z=="function"&&!Ae(Z)){var gt=it(Z),Wt=on(Z,Mt);return"[Function"+(gt?": "+gt:" (anonymous)")+"]"+(Wt.length>0?" { "+P.call(Wt,", ")+" }":"")}if(Qe(Z)){var ur=ae?z.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(Z);return typeof Z=="object"&&!ae?Ke(ur):ur}if(Pe(Z)){for(var zt="<"+ee.call(String(Z.nodeName)),Xt=Z.attributes||[],Kn=0;Kn =r||D<0||h&&P>=u}function C(){var U=Wf();if(E(U))return L(U);p=setTimeout(C,_(U))}function L(U){return p=void 0,S&&o?T(U):(o=l=void 0,f)}function z(){p!==void 0&&clearTimeout(p),g=0,o=m=l=p=void 0}function F(){return p===void 0?f:L(Wf())}function ee(){var U=Wf(),D=E(U);if(o=arguments,l=this,m=U,D){if(p===void 0)return b(m);if(h)return clearTimeout(p),p=setTimeout(C,r),T(m)}return p===void 0&&(p=setTimeout(C,r)),f}return ee.cancel=z,ee.flush=F,ee}function yp(t,r,a){(a!==void 0&&!_s(t[r],a)||a===void 0&&!(r in t))&&Qp(t,r,a)}function lC(t){return Er(t)&&Tu(t)}function vp(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}function uC(t){return gT(t,gx(t))}function cC(t,r,a,o,l,u,f){var p=vp(t,a),m=vp(r,a),g=f.get(m);if(g){yp(t,a,g);return}var y=u?u(p,m,a+"",t,r,f):void 0,h=y===void 0;if(h){var S=ir(m),T=!S&&ds(m),b=!S&&!T&&tm(m);y=m,S||T||b?ir(p)?y=p:lC(p)?y=rT(p):T?(h=!1,y=Sx(m,!0)):b?(h=!1,y=_x(m,!0)):y=[]:WA(m)||lu(m)?(y=p,lu(p)?y=uC(p):(!Ln(p)||Kp(p))&&(y=Ex(m))):h=!1}h&&(f.set(m,y),l(y,m,o,u,f),f.delete(m)),yp(t,a,y)}function Cx(t,r,a,o,l){t!==r&&rC(r,function(u,f){if(l||(l=new Sr),Ln(u))cC(t,r,f,a,Cx,o,l);else{var p=o?o(vp(t,f),u,f+"",t,r,l):void 0;p===void 0&&(p=u),yp(t,f,p)}},gx)}var fC={"&":"&","<":"<",">":">",'"':""","'":"'"},dC=eO(fC),Dx=/[&<>"']/g,pC=RegExp(Dx.source);function mC(t){return t=yx(t),t&&pC.test(t)?t.replace(Dx,dC):t}var hC=Object.prototype,gC=hC.hasOwnProperty;function yC(t,r){return t!=null&&gC.call(t,r)}function Nx(t,r){return t!=null&&tC(t,r,yC)}function Ea(t,r){return Rx(t,r)}var bp=ST(function(t,r,a){Cx(t,r,a)});function vC(t,r,a,o){if(!Ln(t))return t;r=rm(r,t);for(var l=-1,u=r.length,f=u-1,p=t;p!=null&&++l-1e3&&H<1e3||U.call(/e/,Z))return Z;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var ke=H<0?-ne(-H):ne(H);if(ke!==H){var We=String(ke),Le=L.call(Z,We.length+1);return z.call(We,Be,"$&_")+"."+z.call(z.call(Le,/([0-9]{3})/g,"$&_"),/_$/,"")}}return z.call(Z,Be,"$&_")}var Y=SC,le=Y.custom,de=Qe(le)?le:null,Q={__proto__:null,double:'"',single:"'"},J={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};td=function H(Z,Be,ke,We){var Le=Be||{};if(pt(Le,"quoteStyle")&&!pt(Q,Le.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(pt(Le,"maxStringLength")&&(typeof Le.maxStringLength=="number"?Le.maxStringLength<0&&Le.maxStringLength!==1/0:Le.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var sn=pt(Le,"customInspect")?Le.customInspect:!0;if(typeof sn!="boolean"&&sn!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(pt(Le,"indent")&&Le.indent!==null&&Le.indent!==" "&&!(parseInt(Le.indent,10)===Le.indent&&Le.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(pt(Le,"numericSeparator")&&typeof Le.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Yt=Le.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return _e(Z,Le);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var we=String(Z);return Yt?j(Z,we):we}if(typeof Z=="bigint"){var Ze=String(Z)+"n";return Yt?j(Z,Ze):Ze}var Rt=typeof Le.depth>"u"?5:Le.depth;if(typeof ke>"u"&&(ke=0),ke>=Rt&&Rt>0&&typeof Z=="object")return Oe(Z)?"[Array]":"[Object]";var At=Pn(Le,ke);if(typeof We>"u")We=[];else if(kt(We,Z)>=0)return"[Circular]";function Mt(wr,fr,io){if(fr&&(We=k.call(We),We.push(fr)),io){var Tr={depth:Le.depth};return pt(Le,"quoteStyle")&&(Tr.quoteStyle=Le.quoteStyle),H(wr,Tr,ke+1,We)}return H(wr,Le,ke+1,We)}if(typeof Z=="function"&&!Ae(Z)){var gt=it(Z),Wt=on(Z,Mt);return"[Function"+(gt?": "+gt:" (anonymous)")+"]"+(Wt.length>0?" { "+P.call(Wt,", ")+" }":"")}if(Qe(Z)){var ur=ae?z.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(Z);return typeof Z=="object"&&!ae?Ke(ur):ur}if(Pe(Z)){for(var zt="<"+ee.call(String(Z.nodeName)),Xt=Z.attributes||[],Kn=0;Kn{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](l);o._listeners=null}),this.promise.then=l=>{let u;const f=new Promise(p=>{o.subscribe(p),u=p}).then(l);return f.cancel=function(){o.unsubscribe(u)},f},r(function(u,f,p){o.reason||(o.reason=new Os(u,f,p),a(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const a=this._listeners.indexOf(r);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const r=new AbortController,a=o=>{r.abort(o)};return this.subscribe(a),r.signal.unsubscribe=()=>this.unsubscribe(a),r.signal}static source(){let r;return{token:new lS(function(l){r=l}),cancel:r}}};function wD(t){return function(a){return t.apply(null,a)}}function TD(t){return W.isObject(t)&&t.isAxiosError===!0}const Ep={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ep).forEach(([t,r])=>{Ep[r]=t});function uS(t){const r=new Ya(t),a=kx(Ya.prototype.request,r);return W.extend(a,Ya.prototype,r,{allOwnKeys:!0}),W.extend(a,r,null,{allOwnKeys:!0}),a.create=function(l){return uS(Za(t,l))},a}const dt=uS(As);dt.Axios=Ya;dt.CanceledError=Os;dt.CancelToken=ED;dt.isCancel=tS;dt.VERSION=sS;dt.toFormData=ju;dt.AxiosError=Ne;dt.Cancel=dt.CanceledError;dt.all=function(r){return Promise.all(r)};dt.spread=wD;dt.isAxiosError=TD;dt.mergeConfig=Za;dt.AxiosHeaders=wn;dt.formToJSON=t=>eS(W.isHTMLForm(t)?new FormData(t):t);dt.getAdapter=oS.getAdapter;dt.HttpStatusCode=Ep;dt.default=dt;const{Axios:c4,AxiosError:f4,CanceledError:d4,isCancel:cS,CancelToken:p4,VERSION:m4,all:h4,Cancel:g4,isAxiosError:fS,spread:y4,toFormData:v4,AxiosHeaders:b4,HttpStatusCode:x4,formToJSON:S4,getAdapter:_4,mergeConfig:AD}=dt;var OD=class{constructor(t){this.config={},this.defaults=t}extend(t){return t&&(this.defaults={...this.defaults,...t}),this}replace(t){this.config=t}get(t){return Nx(this.config,t)?or(this.config,t):or(this.defaults,t)}set(t,r){typeof t=="string"?ar(this.config,t,r):Object.entries(t).forEach(([a,o])=>{ar(this.config,a,o)})}},Ja=new OD({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0},future:{preserveEqualProps:!1,useDataInertiaHeadAttribute:!1,useDialogForErrorModal:!1,useScriptElementForInitialPage:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function hs(t,r){let a;return function(...o){clearTimeout(a),a=setTimeout(()=>t.apply(this,o),r)}}function jn(t,r){return document.dispatchEvent(new CustomEvent(`inertia:${t}`,r))}var e0=t=>jn("before",{cancelable:!0,detail:{visit:t}}),RD=t=>jn("error",{detail:{errors:t}}),CD=t=>jn("exception",{cancelable:!0,detail:{exception:t}}),DD=t=>jn("finish",{detail:{visit:t}}),ND=t=>jn("invalid",{cancelable:!0,detail:{response:t}}),LD=t=>jn("beforeUpdate",{detail:{page:t}}),ss=t=>jn("navigate",{detail:{page:t}}),jD=t=>jn("progress",{detail:{progress:t}}),PD=t=>jn("start",{detail:{visit:t}}),MD=t=>jn("success",{detail:{page:t}}),zD=(t,r)=>jn("prefetched",{detail:{fetchedAt:Date.now(),response:t.data,visit:r}}),UD=t=>jn("prefetching",{detail:{visit:t}}),du=t=>jn("flash",{detail:{flash:t}}),fn=class{static set(t,r){typeof window<"u"&&window.sessionStorage.setItem(t,JSON.stringify(r))}static get(t){if(typeof window<"u")return JSON.parse(window.sessionStorage.getItem(t)||"null")}static merge(t,r){const a=this.get(t);a===null?this.set(t,r):this.set(t,{...a,...r})}static remove(t){typeof window<"u"&&window.sessionStorage.removeItem(t)}static removeNested(t,r){const a=this.get(t);a!==null&&(delete a[r],this.set(t,a))}static exists(t){try{return this.get(t)!==null}catch{return!1}}static clear(){typeof window<"u"&&window.sessionStorage.clear()}};fn.locationVisitKey="inertiaLocationVisit";var VD=async t=>{if(typeof window>"u")throw new Error("Unable to encrypt history");const r=dS(),a=await pS(),o=await $D(a);if(!o)throw new Error("Unable to encrypt history");return await HD(r,o,t)},Qi={key:"historyKey",iv:"historyIv"},qD=async t=>{const r=dS(),a=await pS();if(!a)throw new Error("Unable to decrypt history");return await BD(r,a,t)},HD=async(t,r,a)=>{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(a);const o=new TextEncoder,l=JSON.stringify(a),u=new Uint8Array(l.length*3),f=o.encodeInto(l,u);return window.crypto.subtle.encrypt({name:"AES-GCM",iv:t},r,u.subarray(0,f.written))},BD=async(t,r,a)=>{if(typeof window.crypto.subtle>"u")return console.warn("Decryption is not supported in this environment. SSL is required."),Promise.resolve(a);const o=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:t},r,a);return JSON.parse(new TextDecoder().decode(o))},dS=()=>{const t=fn.get(Qi.iv);if(t)return new Uint8Array(t);const r=window.crypto.getRandomValues(new Uint8Array(12));return fn.set(Qi.iv,Array.from(r)),r},kD=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"]),ID=async t=>{if(typeof window.crypto.subtle>"u")return console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve();const r=await window.crypto.subtle.exportKey("raw",t);fn.set(Qi.key,Array.from(new Uint8Array(r)))},$D=async t=>{if(t)return t;const r=await kD();return r?(await ID(r),r):null},pS=async()=>{const t=fn.get(Qi.key);return t?await window.crypto.subtle.importKey("raw",new Uint8Array(t),{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]):null},mS=(t,r,a)=>{if(t===r)return!0;for(const o in t)if(!a.includes(o)&&t[o]!==r[o]&&!FD(t[o],r[o]))return!1;for(const o in r)if(!a.includes(o)&&!(o in t))return!1;return!0},FD=(t,r)=>{switch(typeof t){case"object":return mS(t,r,[]);case"function":return t.toString()===r.toString();default:return t===r}},GD={ms:1,s:1e3,m:1e3*60,h:1e3*60*60,d:1e3*60*60*24},t0=t=>{if(typeof t=="number")return t;for(const[r,a]of Object.entries(GD))if(t.endsWith(r))return parseFloat(t)*a;return parseInt(t)},YD=class{constructor(){this.cached=[],this.inFlightRequests=[],this.removalTimers=[],this.currentUseId=null}add(t,r,{cacheFor:a,cacheTags:o}){if(this.findInFlight(t))return Promise.resolve();const u=this.findCached(t);if(!t.fresh&&u&&u.staleTimestamp>Date.now())return Promise.resolve();const[f,p]=this.extractStaleValues(a),m=new Promise((h,y)=>{r({...t,onCancel:()=>{this.remove(t),t.onCancel(),y()},onError:g=>{this.remove(t),t.onError(g),y()},onPrefetching(g){t.onPrefetching(g)},onPrefetched(g,S){t.onPrefetched(g,S)},onPrefetchResponse(g){h(g)},onPrefetchError(g){yr.removeFromInFlight(t),y(g)}})}).then(h=>{this.remove(t);const y=h.getPageResponse();ge.mergeOncePropsIntoResponse(y),this.cached.push({params:{...t},staleTimestamp:Date.now()+f,expiresAt:Date.now()+p,response:m,singleUse:p===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(o)?o:[o]});const g=this.getShortestOncePropTtl(y);return this.scheduleForRemoval(t,g?Math.min(p,g):p),this.removeFromInFlight(t),h.handlePrefetch(),h});return this.inFlightRequests.push({params:{...t},response:m,staleTimestamp:null,inFlight:!0}),m}removeAll(){this.cached=[],this.removalTimers.forEach(t=>{clearTimeout(t.timer)}),this.removalTimers=[]}removeByTags(t){this.cached=this.cached.filter(r=>!r.tags.some(a=>t.includes(a)))}remove(t){this.cached=this.cached.filter(r=>!this.paramsAreEqual(r.params,t)),this.clearTimer(t)}removeFromInFlight(t){this.inFlightRequests=this.inFlightRequests.filter(r=>!this.paramsAreEqual(r.params,t))}extractStaleValues(t){const[r,a]=this.cacheForToStaleAndExpires(t);return[t0(r),t0(a)]}cacheForToStaleAndExpires(t){if(!Array.isArray(t))return[t,t];switch(t.length){case 0:return[0,0];case 1:return[t[0],t[0]];default:return[t[0],t[1]]}}clearTimer(t){const r=this.removalTimers.find(a=>this.paramsAreEqual(a.params,t));r&&(clearTimeout(r.timer),this.removalTimers=this.removalTimers.filter(a=>a!==r))}scheduleForRemoval(t,r){if(!(typeof window>"u")&&(this.clearTimer(t),r>0)){const a=window.setTimeout(()=>this.remove(t),r);this.removalTimers.push({params:t,timer:a})}}get(t){return this.findCached(t)||this.findInFlight(t)}use(t,r){const a=`${r.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=a,t.response.then(o=>{if(this.currentUseId===a)return o.mergeParams({...r,onPrefetched:()=>{}}),this.removeSingleUseItems(r),o.handle()})}removeSingleUseItems(t){this.cached=this.cached.filter(r=>this.paramsAreEqual(r.params,t)?!r.singleUse:!0)}findCached(t){return this.cached.find(r=>this.paramsAreEqual(r.params,t))||null}findInFlight(t){return this.inFlightRequests.find(r=>this.paramsAreEqual(r.params,t))||null}withoutPurposePrefetchHeader(t){const r=nr(t);return r.headers.Purpose==="prefetch"&&delete r.headers.Purpose,r}paramsAreEqual(t,r){return mS(this.withoutPurposePrefetchHeader(t),this.withoutPurposePrefetchHeader(r),["showProgress","replace","prefetch","preserveScroll","preserveState","onBefore","onBeforeUpdate","onStart","onProgress","onFinish","onCancel","onSuccess","onError","onFlash","onPrefetched","onCancelToken","onPrefetching","async","viewTransition"])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(t=>{t.response.then(r=>{const a=r.getPageResponse();ge.mergeOncePropsIntoResponse(a,{force:!0});for(const[f,p]of Object.entries(a.deferredProps??{})){const m=p.filter(h=>a.props[h]===void 0);m.length>0?a.deferredProps[f]=m:delete a.deferredProps[f]}const o=this.getShortestOncePropTtl(a);if(o===null)return;const l=t.expiresAt-Date.now(),u=Math.min(l,o);u>0?this.scheduleForRemoval(t.params,u):this.remove(t.params)})})}getShortestOncePropTtl(t){const r=Object.values(t.onceProps??{}).map(a=>a.expiresAt).filter(a=>!!a);return r.length===0?null:Math.min(...r)-Date.now()}},yr=new YD,Xd=t=>{if(t.offsetParent===null)return!1;const r=t.getBoundingClientRect(),a=r.top
${JSON.stringify(t)}`);const r=document.createElement("html");r.innerHTML=t,r.querySelectorAll("a").forEach(o=>o.setAttribute("target","_top"));const a=document.createElement("iframe");return a.style.backgroundColor="white",a.style.borderRadius="5px",a.style.width="100%",a.style.height="100%",{iframe:a,page:r}},show(t){const{iframe:r,page:a}=this.createIframeAndPage(t);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(r),document.body.prepend(this.modal),document.body.style.overflow="hidden",!r.contentWindow)throw new Error("iframe not yet ready.");r.contentWindow.document.open(),r.contentWindow.document.write(a.outerHTML),r.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(t){t.keyCode===27&&this.hide()}},lN={show(t){const{iframe:r,page:a}=xS.createIframeAndPage(t);r.style.boxSizing="border-box",r.style.display="block";const o=document.createElement("dialog");o.id="inertia-error-dialog",Object.assign(o.style,{width:"calc(100vw - 100px)",height:"calc(100vh - 100px)",padding:"0",margin:"auto",border:"none",backgroundColor:"transparent"});const l=document.createElement("style");if(l.textContent=`
+`+u):o.stack=u}catch{}}throw o}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=Za(this.defaults,a);const{transitional:o,paramsSerializer:l,headers:u}=a;o!==void 0&&tu.assertOptions(o,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean),legacyInterceptorReqResOrdering:Fn.transitional(Fn.boolean)},!1),l!=null&&(W.isFunction(l)?a.paramsSerializer={serialize:l}:tu.assertOptions(l,{encode:Fn.function,serialize:Fn.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),tu.assertOptions(a,{baseUrl:Fn.spelling("baseURL"),withXsrfToken:Fn.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let f=u&&W.merge(u.common,u[a.method]);u&&W.forEach(["delete","get","head","post","put","patch","common"],b=>{delete u[b]}),a.headers=wn.concat(f,u);const p=[];let m=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(a)===!1)return;m=m&&_.synchronous;const E=a.transitional||fm;E&&E.legacyInterceptorReqResOrdering?p.unshift(_.fulfilled,_.rejected):p.push(_.fulfilled,_.rejected)});const g=[];this.interceptors.response.forEach(function(_){g.push(_.fulfilled,_.rejected)});let y,h=0,S;if(!m){const b=[Jb.bind(this),void 0];for(b.unshift(...p),b.push(...g),S=b.length,y=Promise.resolve(a);h{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](l);o._listeners=null}),this.promise.then=l=>{let u;const f=new Promise(p=>{o.subscribe(p),u=p}).then(l);return f.cancel=function(){o.unsubscribe(u)},f},r(function(u,f,p){o.reason||(o.reason=new Os(u,f,p),a(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const a=this._listeners.indexOf(r);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const r=new AbortController,a=o=>{r.abort(o)};return this.subscribe(a),r.signal.unsubscribe=()=>this.unsubscribe(a),r.signal}static source(){let r;return{token:new lS(function(l){r=l}),cancel:r}}};function wD(t){return function(a){return t.apply(null,a)}}function TD(t){return W.isObject(t)&&t.isAxiosError===!0}const Ep={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ep).forEach(([t,r])=>{Ep[r]=t});function uS(t){const r=new Ya(t),a=kx(Ya.prototype.request,r);return W.extend(a,Ya.prototype,r,{allOwnKeys:!0}),W.extend(a,r,null,{allOwnKeys:!0}),a.create=function(l){return uS(Za(t,l))},a}const dt=uS(As);dt.Axios=Ya;dt.CanceledError=Os;dt.CancelToken=ED;dt.isCancel=tS;dt.VERSION=sS;dt.toFormData=ju;dt.AxiosError=Ne;dt.Cancel=dt.CanceledError;dt.all=function(r){return Promise.all(r)};dt.spread=wD;dt.isAxiosError=TD;dt.mergeConfig=Za;dt.AxiosHeaders=wn;dt.formToJSON=t=>eS(W.isHTMLForm(t)?new FormData(t):t);dt.getAdapter=oS.getAdapter;dt.HttpStatusCode=Ep;dt.default=dt;const{Axios:c4,AxiosError:f4,CanceledError:d4,isCancel:cS,CancelToken:p4,VERSION:m4,all:h4,Cancel:g4,isAxiosError:fS,spread:y4,toFormData:v4,AxiosHeaders:b4,HttpStatusCode:x4,formToJSON:S4,getAdapter:_4,mergeConfig:AD}=dt;var OD=class{constructor(t){this.config={},this.defaults=t}extend(t){return t&&(this.defaults={...this.defaults,...t}),this}replace(t){this.config=t}get(t){return Nx(this.config,t)?or(this.config,t):or(this.defaults,t)}set(t,r){typeof t=="string"?ar(this.config,t,r):Object.entries(t).forEach(([a,o])=>{ar(this.config,a,o)})}},Ja=new OD({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0},future:{preserveEqualProps:!1,useDataInertiaHeadAttribute:!1,useDialogForErrorModal:!1,useScriptElementForInitialPage:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function hs(t,r){let a;return function(...o){clearTimeout(a),a=setTimeout(()=>t.apply(this,o),r)}}function jn(t,r){return document.dispatchEvent(new CustomEvent(`inertia:${t}`,r))}var e0=t=>jn("before",{cancelable:!0,detail:{visit:t}}),RD=t=>jn("error",{detail:{errors:t}}),CD=t=>jn("exception",{cancelable:!0,detail:{exception:t}}),DD=t=>jn("finish",{detail:{visit:t}}),ND=t=>jn("invalid",{cancelable:!0,detail:{response:t}}),LD=t=>jn("beforeUpdate",{detail:{page:t}}),ss=t=>jn("navigate",{detail:{page:t}}),jD=t=>jn("progress",{detail:{progress:t}}),PD=t=>jn("start",{detail:{visit:t}}),MD=t=>jn("success",{detail:{page:t}}),zD=(t,r)=>jn("prefetched",{detail:{fetchedAt:Date.now(),response:t.data,visit:r}}),UD=t=>jn("prefetching",{detail:{visit:t}}),du=t=>jn("flash",{detail:{flash:t}}),fn=class{static set(t,r){typeof window<"u"&&window.sessionStorage.setItem(t,JSON.stringify(r))}static get(t){if(typeof window<"u")return JSON.parse(window.sessionStorage.getItem(t)||"null")}static merge(t,r){const a=this.get(t);a===null?this.set(t,r):this.set(t,{...a,...r})}static remove(t){typeof window<"u"&&window.sessionStorage.removeItem(t)}static removeNested(t,r){const a=this.get(t);a!==null&&(delete a[r],this.set(t,a))}static exists(t){try{return this.get(t)!==null}catch{return!1}}static clear(){typeof window<"u"&&window.sessionStorage.clear()}};fn.locationVisitKey="inertiaLocationVisit";var VD=async t=>{if(typeof window>"u")throw new Error("Unable to encrypt history");const r=dS(),a=await pS(),o=await $D(a);if(!o)throw new Error("Unable to encrypt history");return await HD(r,o,t)},Qi={key:"historyKey",iv:"historyIv"},qD=async t=>{const r=dS(),a=await pS();if(!a)throw new Error("Unable to decrypt history");return await BD(r,a,t)},HD=async(t,r,a)=>{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(a);const o=new TextEncoder,l=JSON.stringify(a),u=new Uint8Array(l.length*3),f=o.encodeInto(l,u);return window.crypto.subtle.encrypt({name:"AES-GCM",iv:t},r,u.subarray(0,f.written))},BD=async(t,r,a)=>{if(typeof window.crypto.subtle>"u")return console.warn("Decryption is not supported in this environment. SSL is required."),Promise.resolve(a);const o=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:t},r,a);return JSON.parse(new TextDecoder().decode(o))},dS=()=>{const t=fn.get(Qi.iv);if(t)return new Uint8Array(t);const r=window.crypto.getRandomValues(new Uint8Array(12));return fn.set(Qi.iv,Array.from(r)),r},kD=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"]),ID=async t=>{if(typeof window.crypto.subtle>"u")return console.warn("Encryption is not supported in this environment. SSL is required."),Promise.resolve();const r=await window.crypto.subtle.exportKey("raw",t);fn.set(Qi.key,Array.from(new Uint8Array(r)))},$D=async t=>{if(t)return t;const r=await kD();return r?(await ID(r),r):null},pS=async()=>{const t=fn.get(Qi.key);return t?await window.crypto.subtle.importKey("raw",new Uint8Array(t),{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]):null},mS=(t,r,a)=>{if(t===r)return!0;for(const o in t)if(!a.includes(o)&&t[o]!==r[o]&&!FD(t[o],r[o]))return!1;for(const o in r)if(!a.includes(o)&&!(o in t))return!1;return!0},FD=(t,r)=>{switch(typeof t){case"object":return mS(t,r,[]);case"function":return t.toString()===r.toString();default:return t===r}},GD={ms:1,s:1e3,m:1e3*60,h:1e3*60*60,d:1e3*60*60*24},t0=t=>{if(typeof t=="number")return t;for(const[r,a]of Object.entries(GD))if(t.endsWith(r))return parseFloat(t)*a;return parseInt(t)},YD=class{constructor(){this.cached=[],this.inFlightRequests=[],this.removalTimers=[],this.currentUseId=null}add(t,r,{cacheFor:a,cacheTags:o}){if(this.findInFlight(t))return Promise.resolve();const u=this.findCached(t);if(!t.fresh&&u&&u.staleTimestamp>Date.now())return Promise.resolve();const[f,p]=this.extractStaleValues(a),m=new Promise((g,y)=>{r({...t,onCancel:()=>{this.remove(t),t.onCancel(),y()},onError:h=>{this.remove(t),t.onError(h),y()},onPrefetching(h){t.onPrefetching(h)},onPrefetched(h,S){t.onPrefetched(h,S)},onPrefetchResponse(h){g(h)},onPrefetchError(h){yr.removeFromInFlight(t),y(h)}})}).then(g=>{this.remove(t);const y=g.getPageResponse();ge.mergeOncePropsIntoResponse(y),this.cached.push({params:{...t},staleTimestamp:Date.now()+f,expiresAt:Date.now()+p,response:m,singleUse:p===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(o)?o:[o]});const h=this.getShortestOncePropTtl(y);return this.scheduleForRemoval(t,h?Math.min(p,h):p),this.removeFromInFlight(t),g.handlePrefetch(),g});return this.inFlightRequests.push({params:{...t},response:m,staleTimestamp:null,inFlight:!0}),m}removeAll(){this.cached=[],this.removalTimers.forEach(t=>{clearTimeout(t.timer)}),this.removalTimers=[]}removeByTags(t){this.cached=this.cached.filter(r=>!r.tags.some(a=>t.includes(a)))}remove(t){this.cached=this.cached.filter(r=>!this.paramsAreEqual(r.params,t)),this.clearTimer(t)}removeFromInFlight(t){this.inFlightRequests=this.inFlightRequests.filter(r=>!this.paramsAreEqual(r.params,t))}extractStaleValues(t){const[r,a]=this.cacheForToStaleAndExpires(t);return[t0(r),t0(a)]}cacheForToStaleAndExpires(t){if(!Array.isArray(t))return[t,t];switch(t.length){case 0:return[0,0];case 1:return[t[0],t[0]];default:return[t[0],t[1]]}}clearTimer(t){const r=this.removalTimers.find(a=>this.paramsAreEqual(a.params,t));r&&(clearTimeout(r.timer),this.removalTimers=this.removalTimers.filter(a=>a!==r))}scheduleForRemoval(t,r){if(!(typeof window>"u")&&(this.clearTimer(t),r>0)){const a=window.setTimeout(()=>this.remove(t),r);this.removalTimers.push({params:t,timer:a})}}get(t){return this.findCached(t)||this.findInFlight(t)}use(t,r){const a=`${r.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=a,t.response.then(o=>{if(this.currentUseId===a)return o.mergeParams({...r,onPrefetched:()=>{}}),this.removeSingleUseItems(r),o.handle()})}removeSingleUseItems(t){this.cached=this.cached.filter(r=>this.paramsAreEqual(r.params,t)?!r.singleUse:!0)}findCached(t){return this.cached.find(r=>this.paramsAreEqual(r.params,t))||null}findInFlight(t){return this.inFlightRequests.find(r=>this.paramsAreEqual(r.params,t))||null}withoutPurposePrefetchHeader(t){const r=nr(t);return r.headers.Purpose==="prefetch"&&delete r.headers.Purpose,r}paramsAreEqual(t,r){return mS(this.withoutPurposePrefetchHeader(t),this.withoutPurposePrefetchHeader(r),["showProgress","replace","prefetch","preserveScroll","preserveState","onBefore","onBeforeUpdate","onStart","onProgress","onFinish","onCancel","onSuccess","onError","onFlash","onPrefetched","onCancelToken","onPrefetching","async","viewTransition"])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(t=>{t.response.then(r=>{const a=r.getPageResponse();ge.mergeOncePropsIntoResponse(a,{force:!0});for(const[f,p]of Object.entries(a.deferredProps??{})){const m=p.filter(g=>a.props[g]===void 0);m.length>0?a.deferredProps[f]=m:delete a.deferredProps[f]}const o=this.getShortestOncePropTtl(a);if(o===null)return;const l=t.expiresAt-Date.now(),u=Math.min(l,o);u>0?this.scheduleForRemoval(t.params,u):this.remove(t.params)})})}getShortestOncePropTtl(t){const r=Object.values(t.onceProps??{}).map(a=>a.expiresAt).filter(a=>!!a);return r.length===0?null:Math.min(...r)-Date.now()}},yr=new YD,Xd=t=>{if(t.offsetParent===null)return!1;const r=t.getBoundingClientRect(),a=r.top
${JSON.stringify(t)}`);const r=document.createElement("html");r.innerHTML=t,r.querySelectorAll("a").forEach(o=>o.setAttribute("target","_top"));const a=document.createElement("iframe");return a.style.backgroundColor="white",a.style.borderRadius="5px",a.style.width="100%",a.style.height="100%",{iframe:a,page:r}},show(t){const{iframe:r,page:a}=this.createIframeAndPage(t);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(r),document.body.prepend(this.modal),document.body.style.overflow="hidden",!r.contentWindow)throw new Error("iframe not yet ready.");r.contentWindow.document.open(),r.contentWindow.document.write(a.outerHTML),r.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(t){t.keyCode===27&&this.hide()}},lN={show(t){const{iframe:r,page:a}=xS.createIframeAndPage(t);r.style.boxSizing="border-box",r.style.display="block";const o=document.createElement("dialog");o.id="inertia-error-dialog",Object.assign(o.style,{width:"calc(100vw - 100px)",height:"calc(100vh - 100px)",padding:"0",margin:"auto",border:"none",backgroundColor:"transparent"});const l=document.createElement("style");if(l.textContent=`
dialog#inertia-error-dialog::backdrop {
background-color: rgba(0, 0, 0, 0.6);
}
@@ -15,7 +15,7 @@ import{g as rw,c as hv,r as A,R as fe,a as aw,b as iw,d as ow,j as x,e as sw,f a
dialog#inertia-error-dialog:focus {
outline: none;
}
- `,document.head.appendChild(l),o.addEventListener("click",u=>{u.target===o&&o.close()}),o.addEventListener("close",()=>{l.remove(),o.remove()}),o.appendChild(r),document.body.prepend(o),o.showModal(),o.focus(),!r.contentWindow)throw new Error("iframe not yet ready.");r.contentWindow.document.open(),r.contentWindow.document.write(a.outerHTML),r.contentWindow.document.close()}},uN=new Mu,a0=class SS{constructor(r,a,o){this.requestParams=r,this.response=a,this.originatingPage=o,this.wasPrefetched=!1}static create(r,a,o){return new SS(r,a,o)}async handlePrefetch(){mu(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return uN.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()),zD(this.response,this.requestParams.all()),Promise.resolve();if(this.requestParams.runCallbacks(),!this.isInertiaResponse())return this.handleNonInertiaResponse();await Je.processQueue(),Je.preserveUrl=this.requestParams.all().preserveUrl;const r=ge.get().flash;await this.setPage();const a=ge.get().props.errors||{};if(Object.keys(a).length>0){const l=this.getScopedErrors(a);return RD(l),this.requestParams.all().onError(l)}wt.flushByCacheTags(this.requestParams.all().invalidateCacheTags||[]),this.wasPrefetched||wt.flush(ge.get().url);const{flash:o}=ge.get();Object.keys(o).length>0&&(!this.requestParams.isPartial()||!Ea(o,r))&&(du(o),this.requestParams.all().onFlash(o)),MD(ge.get()),await this.requestParams.all().onSuccess(ge.get()),Je.preserveUrl=!1}mergeParams(r){this.requestParams.merge(r)}getPageResponse(){const r=this.getDataFromResponse(this.response.data);return typeof r=="object"?this.response.data={...r,flash:r.flash??{}}:this.response.data=r}async handleNonInertiaResponse(){if(this.isLocationVisit()){const a=Yn(this.getHeader("x-inertia-location"));return n0(this.requestParams.all().url,a),this.locationVisit(a)}const r={...this.response,data:this.getDataFromResponse(this.response.data)};if(ND(r))return Ja.get("future.useDialogForErrorModal")?lN.show(r.data):xS.show(r.data)}isInertiaResponse(){return this.hasHeader("x-inertia")}hasStatus(r){return this.response.status===r}getHeader(r){return this.response.headers[r]}hasHeader(r){return this.getHeader(r)!==void 0}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader("x-inertia-location")}locationVisit(r){try{if(fn.set(fn.locationVisitKey,{preserveScroll:this.requestParams.all().preserveScroll===!0}),typeof window>"u")return;mu(window.location,r)?window.location.reload():window.location.href=r.href}catch{return!1}}async setPage(){const r=this.getPageResponse();return this.shouldSetPage(r)?(this.mergeProps(r),ge.mergeOncePropsIntoResponse(r),this.preserveEqualProps(r),await this.setRememberedState(r),this.requestParams.setPreserveOptions(r),r.url=Je.preserveUrl?ge.get().url:this.pageUrl(r),this.requestParams.all().onBeforeUpdate(r),LD(r),ge.set(r,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState,viewTransition:this.requestParams.all().viewTransition})):Promise.resolve()}getDataFromResponse(r){if(typeof r!="string")return r;try{return JSON.parse(r)}catch{return r}}shouldSetPage(r){if(!this.requestParams.all().async||this.originatingPage.component!==r.component)return!0;if(this.originatingPage.component!==ge.get().component)return!1;const a=Yn(this.originatingPage.url),o=Yn(ge.get().url);return a.origin===o.origin&&a.pathname===o.pathname}pageUrl(r){const a=Yn(r.url);return n0(this.requestParams.all().url,a),a.pathname+a.search+a.hash}preserveEqualProps(r){if(r.component!==ge.get().component||Ja.get("future.preserveEqualProps")!==!0)return;const a=ge.get().props;Object.entries(r.props).forEach(([o,l])=>{Ea(l,a[o])&&(r.props[o]=a[o])})}mergeProps(r){if(!this.requestParams.isPartial()||r.component!==ge.get().component)return;const a=r.mergeProps||[],o=r.prependProps||[],l=r.deepMergeProps||[],u=r.matchPropsOn||[],f=(m,h)=>{const y=or(ge.get().props,m),g=or(r.props,m);if(Array.isArray(g)){const S=this.mergeOrMatchItems(y||[],g,m,u,h);ar(r.props,m,S)}else if(typeof g=="object"&&g!==null){const S={...y||{},...g};ar(r.props,m,S)}};if(a.forEach(m=>f(m,!0)),o.forEach(m=>f(m,!1)),l.forEach(m=>{const h=ge.get().props[m],y=r.props[m],g=(S,T,b)=>Array.isArray(T)?this.mergeOrMatchItems(S,T,b,u):typeof T=="object"&&T!==null?Object.keys(T).reduce((_,E)=>(_[E]=g(S?S[E]:void 0,T[E],`${b}.${E}`),_),{...S}):T;r.props[m]=g(h,y,m)}),r.props={...ge.get().props,...r.props},this.requestParams.isDeferredPropsRequest()){const m=ge.get().props.errors;m&&Object.keys(m).length>0&&(r.props.errors=m)}ge.get().scrollProps&&(r.scrollProps={...ge.get().scrollProps||{},...r.scrollProps||{}}),ge.hasOnceProps()&&(r.onceProps={...ge.get().onceProps||{},...r.onceProps||{}}),r.flash={...ge.get().flash,...this.requestParams.isDeferredPropsRequest()?{}:r.flash};const p=ge.get().initialDeferredProps;p&&Object.keys(p).length>0&&(r.initialDeferredProps=p)}mergeOrMatchItems(r,a,o,l,u=!0){const f=Array.isArray(r)?r:[],p=l.find(y=>y.split(".").slice(0,-1).join(".")===o);if(!p)return u?[...f,...a]:[...a,...f];const m=p.split(".").pop()||"",h=new Map;return a.forEach(y=>{this.hasUniqueProperty(y,m)&&h.set(y[m],y)}),u?this.appendWithMatching(f,a,h,m):this.prependWithMatching(f,a,h,m)}appendWithMatching(r,a,o,l){const u=r.map(p=>this.hasUniqueProperty(p,l)&&o.has(p[l])?o.get(p[l]):p),f=a.filter(p=>this.hasUniqueProperty(p,l)?!r.some(m=>this.hasUniqueProperty(m,l)&&m[l]===p[l]):!0);return[...u,...f]}prependWithMatching(r,a,o,l){const u=r.filter(f=>this.hasUniqueProperty(f,l)?!o.has(f[l]):!0);return[...a,...u]}hasUniqueProperty(r,a){return r&&typeof r=="object"&&a in r}async setRememberedState(r){const a=await Je.getState(Je.rememberedState,{});this.requestParams.all().preserveState&&a&&r.component===ge.get().component&&(r.rememberedState=a)}getScopedErrors(r){return this.requestParams.all().errorBag?r[this.requestParams.all().errorBag||""]||{}:r}},i0=class _S{constructor(r,a){this.page=a,this.requestHasFinished=!1,this.requestParams=Ap.create(r),this.cancelToken=new AbortController}static create(r,a){return new _S(r,a)}isPrefetch(){return this.requestParams.isPrefetch()}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),PD(this.requestParams.all()),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),UD(this.requestParams.all()));const r=this.requestParams.all().prefetch;return dt({method:this.requestParams.all().method,url:pu(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(a=>(this.response=a0.create(this.requestParams,a,this.page),this.response.handle())).catch(a=>a!=null&&a.response?(this.response=a0.create(this.requestParams,a.response,this.page),this.response.handle()):Promise.reject(a)).catch(a=>{if(!dt.isCancel(a)&&CD(a))return r&&this.requestParams.onPrefetchError(a),Promise.reject(a)}).finally(()=>{this.finish(),r&&this.response&&this.requestParams.onPrefetchResponse(this.response)})}finish(){this.requestParams.wasCancelledAtAll()||(this.requestParams.markAsFinished(),this.fireFinishEvents())}fireFinishEvents(){this.requestHasFinished||(this.requestHasFinished=!0,DD(this.requestParams.all()),this.requestParams.onFinish())}cancel({cancelled:r=!1,interrupted:a=!1}){this.requestHasFinished||(this.cancelToken.abort(),this.requestParams.markAsCancelled({cancelled:r,interrupted:a}),this.fireFinishEvents())}onProgress(r){this.requestParams.data()instanceof FormData&&(r.percentage=r.progress?Math.round(r.progress*100):0,jD(r),this.requestParams.all().onProgress(r))}getHeaders(){const r={...this.requestParams.headers(),Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},a=ge.get();a.version&&(r["X-Inertia-Version"]=a.version);const o=Object.entries(a.onceProps||{}).filter(([,l])=>a.props[l.prop]===void 0?!1:!l.expiresAt||l.expiresAt>Date.now()).map(([l])=>l);return o.length>0&&(r["X-Inertia-Except-Once-Props"]=o.join(",")),r}},o0=class{constructor({maxConcurrent:t,interruptible:r}){this.requests=[],this.maxConcurrent=t,this.interruptible=r}send(t){this.requests.push(t),t.send().then(()=>{this.requests=this.requests.filter(r=>r!==t)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight({prefetch:t=!0}={}){this.requests.filter(r=>t||!r.isPrefetch()).forEach(r=>r.cancel({cancelled:!0}))}cancel({cancelled:t=!1,interrupted:r=!1}={},a=!1){if(!a&&!this.shouldCancel())return;const o=this.requests.shift();o==null||o.cancel({cancelled:t,interrupted:r})}shouldCancel(){return this.interruptible&&this.requests.length>=this.maxConcurrent}},cN=class{constructor(){this.syncRequestStream=new o0({maxConcurrent:1,interruptible:!0}),this.asyncRequestStream=new o0({maxConcurrent:1/0,interruptible:!1}),this.clientVisitQueue=new Mu}init({initialPage:t,resolveComponent:r,swapComponent:a,onFlash:o}){ge.init({initialPage:t,resolveComponent:r,swapComponent:a,onFlash:o}),aN.handle(),br.init(),br.on("missingHistoryItem",()=>{typeof window<"u"&&this.visit(window.location.href,{preserveState:!0,preserveScroll:!0,replace:!0})}),br.on("loadDeferredProps",l=>{this.loadDeferredProps(l)}),br.on("historyQuotaExceeded",l=>{window.location.href=l})}get(t,r={},a={}){return this.visit(t,{...a,method:"get",data:r})}post(t,r={},a={}){return this.visit(t,{preserveState:!0,...a,method:"post",data:r})}put(t,r={},a={}){return this.visit(t,{preserveState:!0,...a,method:"put",data:r})}patch(t,r={},a={}){return this.visit(t,{preserveState:!0,...a,method:"patch",data:r})}delete(t,r={}){return this.visit(t,{preserveState:!0,...r,method:"delete"})}reload(t={}){return this.doReload(t)}doReload(t={}){if(!(typeof window>"u"))return this.visit(window.location.href,{...t,preserveScroll:!0,preserveState:!0,async:!0,headers:{...t.headers||{},"Cache-Control":"no-cache"}})}remember(t,r="default"){Je.remember(t,r)}restore(t="default"){return Je.restore(t)}on(t,r){return typeof window>"u"?()=>{}:br.onGlobalEvent(t,r)}cancel(){this.syncRequestStream.cancelInFlight()}cancelAll({async:t=!0,prefetch:r=!0,sync:a=!0}={}){t&&this.asyncRequestStream.cancelInFlight({prefetch:r}),a&&this.syncRequestStream.cancelInFlight()}poll(t,r={},a={}){return sN.add(t,()=>this.reload(r),{autoStart:a.autoStart??!0,keepAlive:a.keepAlive??!1})}visit(t,r={}){const a=this.getPendingVisit(t,{...r,showProgress:r.showProgress??!r.async}),o=this.getVisitEvents(r);if(o.onBefore(a)===!1||!e0(a))return;const l=Yn(ge.get().url);(a.only.length>0||a.except.length>0||a.reset.length>0?JD(a.url,l):mu(a.url,l))||this.asyncRequestStream.cancelInFlight({prefetch:!1}),a.async||this.syncRequestStream.interruptInFlight(),!ge.isCleared()&&!a.preserveUrl&&bn.save();const p={...a,...o},m=yr.get(p);m?(_n.reveal(m.inFlight),yr.use(m,p)):(_n.reveal(!0),(a.async?this.asyncRequestStream:this.syncRequestStream).send(i0.create(p,ge.get())))}getCached(t,r={}){return yr.findCached(this.getPrefetchParams(t,r))}flush(t,r={}){yr.remove(this.getPrefetchParams(t,r))}flushAll(){yr.removeAll()}flushByCacheTags(t){yr.removeByTags(Array.isArray(t)?t:[t])}getPrefetching(t,r={}){return yr.findInFlight(this.getPrefetchParams(t,r))}prefetch(t,r={},a={}){if((r.method??(Gr(t)?t.method:"get"))!=="get")throw new Error("Prefetch requests must use the GET method");const l=this.getPendingVisit(t,{...r,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),u=l.url.origin+l.url.pathname+l.url.search,f=window.location.origin+window.location.pathname+window.location.search;if(u===f)return;const p=this.getVisitEvents(r);if(p.onBefore(l)===!1||!e0(l))return;_n.hide(),this.asyncRequestStream.interruptInFlight();const m={...l,...p};new Promise(y=>{const g=()=>{ge.get()?y():setTimeout(g,50)};g()}).then(()=>{yr.add(m,y=>{this.asyncRequestStream.send(i0.create(y,ge.get()))},{cacheFor:Ja.get("prefetch.cacheFor"),cacheTags:[],...a})})}clearHistory(){Je.clear()}decryptHistory(){return Je.decrypt()}resolveComponent(t){return ge.resolve(t)}replace(t){this.clientVisit(t,{replace:!0})}replaceProp(t,r,a){this.replace({preserveScroll:!0,preserveState:!0,props(o){const l=typeof r=="function"?r(or(o,t),o):r;return ar(nr(o),t,l)},...a||{}})}appendToProp(t,r,a){this.replaceProp(t,(o,l)=>{const u=typeof r=="function"?r(o,l):r;return Array.isArray(o)||(o=o!==void 0?[o]:[]),[...o,u]},a)}prependToProp(t,r,a){this.replaceProp(t,(o,l)=>{const u=typeof r=="function"?r(o,l):r;return Array.isArray(o)||(o=o!==void 0?[o]:[]),[u,...o]},a)}push(t){this.clientVisit(t)}flash(t,r){const a=ge.get().flash;let o;if(typeof t=="function")o=t(a);else if(typeof t=="string")o={...a,[t]:r};else if(t&&Object.keys(t).length)o={...a,...t};else return;ge.setFlash(o),Object.keys(o).length&&du(o)}clientVisit(t,{replace:r=!1}={}){this.clientVisitQueue.add(()=>this.performClientVisit(t,{replace:r}))}performClientVisit(t,{replace:r=!1}={}){const a=ge.get(),o=typeof t.props=="function"?Object.fromEntries(Object.values(a.onceProps??{}).map(_=>[_.prop,a.props[_.prop]])):{},l=typeof t.props=="function"?t.props(a.props,o):t.props??a.props,u=typeof t.flash=="function"?t.flash(a.flash):t.flash,{viewTransition:f,onError:p,onFinish:m,onFlash:h,onSuccess:y,...g}=t,S={...a,...g,flash:u??{},props:l},T=Ap.resolvePreserveOption(t.preserveScroll??!1,S),b=Ap.resolvePreserveOption(t.preserveState??!1,S);return ge.set(S,{replace:r,preserveScroll:T,preserveState:b,viewTransition:f}).then(()=>{const _=ge.get().flash;Object.keys(_).length>0&&(du(_),h==null||h(_));const E=ge.get().props.errors||{};if(Object.keys(E).length===0){y==null||y(ge.get());return}const C=t.errorBag?E[t.errorBag||""]||{}:E;p==null||p(C)}).finally(()=>m==null?void 0:m(t))}getPrefetchParams(t,r){return{...this.getPendingVisit(t,{...r,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),...this.getVisitEvents(r)}}getPendingVisit(t,r,a={}){if(Gr(t)){const h=t;t=h.url,r.method=r.method??h.method}const o=Ja.get("visitOptions"),l=o?o(t.toString(),nr(r))||{}:{},u={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,...r,...l},[f,p]=ZD(t,u.data,u.method,u.forceFormData,u.queryStringArrayFormat),m={cancelled:!1,completed:!1,interrupted:!1,...u,...a,url:f,data:p};return m.prefetch&&(m.headers.Purpose="prefetch"),m}getVisitEvents(t){return{onCancelToken:t.onCancelToken||(()=>{}),onBefore:t.onBefore||(()=>{}),onBeforeUpdate:t.onBeforeUpdate||(()=>{}),onStart:t.onStart||(()=>{}),onProgress:t.onProgress||(()=>{}),onFinish:t.onFinish||(()=>{}),onCancel:t.onCancel||(()=>{}),onSuccess:t.onSuccess||(()=>{}),onError:t.onError||(()=>{}),onFlash:t.onFlash||(()=>{}),onPrefetched:t.onPrefetched||(()=>{}),onPrefetching:t.onPrefetching||(()=>{})}}loadDeferredProps(t){t&&Object.entries(t).forEach(([r,a])=>{this.doReload({only:a,deferredProps:!0})})}},ru=class{static createWayfinderCallback(...t){return()=>t.length===1?Gr(t[0])?t[0]:t[0]():{method:typeof t[0]=="function"?t[0]():t[0],url:typeof t[1]=="function"?t[1]():t[1]}}static parseUseFormArguments(...t){return t.length===0?{rememberKey:null,data:{},precognitionEndpoint:null}:t.length===1?{rememberKey:null,data:t[0],precognitionEndpoint:null}:t.length===2?typeof t[0]=="string"?{rememberKey:t[0],data:t[1],precognitionEndpoint:null}:{rememberKey:null,data:t[1],precognitionEndpoint:this.createWayfinderCallback(t[0])}:{rememberKey:null,data:t[2],precognitionEndpoint:this.createWayfinderCallback(t[0],t[1])}}static parseSubmitArguments(t,r){return t.length===3||t.length===2&&typeof t[0]=="string"?{method:t[0],url:t[1],options:t[2]??{}}:Gr(t[0])?{...t[0],options:t[1]??{}}:{...r(),options:t[0]??{}}}static mergeHeadersForValidation(t,r,a){const o=l=>(l.headers={...a??{},...l.headers??{}},l);return t&&typeof t=="object"&&!("target"in t)?t=o(t):r&&typeof r=="object"?r=o(r):typeof t=="string"?r=o(r??{}):t=o(t??{}),[t,r]}};function fN(t){if(!t.includes("."))return t;const r=a=>a.startsWith("[")&&a.endsWith("]")?a:a.split(".").reduce((o,l,u)=>u===0?l:`${o}[${l}]`);return t.replace(/\\\./g,"__ESCAPED_DOT__").split(/(\[[^\]]*\])/).filter(Boolean).map(r).join("").replace(/__ESCAPED_DOT__/g,".")}function dN(t){const r=[],a=/([^\[\]]+)|\[(\d*)\]/g;let o;for(;(o=a.exec(t))!==null;)o[1]!==void 0?r.push(o[1]):o[2]!==void 0&&r.push(o[2]===""?"":Number(o[2]));return r}function pN(t,r,a){let o=t;for(let l=0;l