diff --git a/frontend/src/pages/ExplorePage/ExplorePage.tsx b/frontend/src/pages/ExplorePage/ExplorePage.tsx index 58287bca768637c271ec90afbccc82a4ea0194a3..841f488a09d4c639a16e04f1d97b451c5766a196 100644 --- a/frontend/src/pages/ExplorePage/ExplorePage.tsx +++ b/frontend/src/pages/ExplorePage/ExplorePage.tsx @@ -145,10 +145,8 @@ export default function ExplorePage() { // Reset to first page when filters change (but not when currentPage changes) useEffect(() => { - if (currentPage !== 1) { - setCurrentPage(1); - } - }, [currentPage]); + setCurrentPage(1); + }, [search, srcFilter, catFilter, regionFilter, countryFilter, imageTypeFilter, uploadTypeFilter, showReferenceExamples]); useEffect(() => { const handleVisibilityChange = () => { diff --git a/py_backend/static/assets/AdminPage-Cm0ZXhfF.js b/py_backend/static/assets/AdminPage-Cm0ZXhfF.js new file mode 100644 index 0000000000000000000000000000000000000000..d5feafab57d5fb92faedb2cd322ad6149cda7b77 --- /dev/null +++ b/py_backend/static/assets/AdminPage-Cm0ZXhfF.js @@ -0,0 +1,35 @@ +import{r as i,j as a,N as K,H as Je,O as h,z as j,I as re,_ as Ge,n as d,J as y}from"./index-DuuohOak.js";import{u as Ve}from"./useAdmin-Cd7hRYKP.js";const We="_adminContainer_j11pf_5",qe="_adminHeader_j11pf_13",Ke="_adminSection_j11pf_20",Ye="_modelSelectionArea_j11pf_29",Qe="_modelSelectionRow_j11pf_36",Xe="_modelsTable_j11pf_89",Ze="_promptSubsection_j11pf_97",ea="_promptSubsectionTitle_j11pf_109",aa="_modelCode_j11pf_152",la="_modelId_j11pf_157",sa="_modelActions_j11pf_163",oa="_addModelButtonContainer_j11pf_169",ta="_addModelForm_j11pf_177",ia="_addModelFormTitle_j11pf_185",da="_addModelFormGrid_j11pf_193",na="_addModelFormField_j11pf_206",ra="_addModelFormCheckbox_j11pf_250",ca="_addModelFormActions_j11pf_268",ma="_modalOverlay_j11pf_277",ha="_modalContent_j11pf_291",pa="_modalBody_j11pf_302",_a="_modalTitle_j11pf_312",xa="_modalText_j11pf_320",ua="_modalTextLeft_j11pf_332",ja="_modalButtons_j11pf_355",va="_modalForm_j11pf_363",ga="_formField_j11pf_372",fa="_formLabel_j11pf_376",ba="_formInput_j11pf_385",ya="_textarea_j11pf_407",l={adminContainer:We,adminHeader:qe,adminSection:Ke,modelSelectionArea:Ye,modelSelectionRow:Qe,modelsTable:Xe,promptSubsection:Ze,promptSubsectionTitle:ea,modelCode:aa,modelId:la,modelActions:sa,addModelButtonContainer:oa,addModelForm:ta,addModelFormTitle:ia,addModelFormGrid:da,addModelFormField:na,addModelFormCheckbox:ra,addModelFormActions:ca,modalOverlay:ma,modalContent:ha,modalBody:pa,modalTitle:_a,modalText:xa,modalTextLeft:ua,modalButtons:ja,modalForm:va,formField:ga,formLabel:fa,formInput:ba,textarea:ya},I="selectedVlmModel";function Ca(){const{isAuthenticated:v,isLoading:ce,login:me,logout:he,verifyToken:Y}=Ve(),[E,Q]=i.useState(""),[X,g]=i.useState(""),[Z,ee]=i.useState(!1),[N,S]=i.useState([]),[pe,C]=i.useState(""),[_e,M]=i.useState(""),[ae,P]=i.useState([]),[xe,L]=i.useState([]),[ue,B]=i.useState([]),[je,k]=i.useState(!1),[O,D]=i.useState(null),[U,f]=i.useState({schema_id:"",title:"",version:"",schema:{}}),[ve,w]=i.useState(!1),[ge,T]=i.useState(!1),[fe,z]=i.useState(null),[F,R]=i.useState(null),[n,c]=i.useState({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1}),[le,H]=i.useState(!1),[be,J]=i.useState(!1),[G,V]=i.useState(null),[t,m]=i.useState({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1}),[ye,A]=i.useState(!1),[Ne,W]=i.useState(!1),[Se,_]=i.useState(!1),[se,oe]=i.useState(""),[Ce,Me]=i.useState(""),[ke,x]=i.useState(""),[we,$]=i.useState(""),u=i.useCallback(()=>{fetch("/api/models").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{if(console.log("Models data received:",e),e&&Array.isArray(e.models)){S(e.models);const s=localStorage.getItem(I);if(e.models.length>0)if(s==="random")C("random");else if(s&&e.models.find(o=>o.m_code===s&&o.is_available))C(s);else{const o=e.models.find(r=>r.is_available)||e.models[0];C(o.m_code),localStorage.setItem(I,o.m_code)}fetch("/api/admin/fallback-model",{headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}}).then(o=>{if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return o.json()}).then(o=>{if(console.log("Fallback model data received:",o),o.fallback_model)M(o.fallback_model.m_code);else{const r=e.models.find(p=>p.m_code==="STUB_MODEL"&&p.is_available);M(r?"STUB_MODEL":"")}}).catch(o=>{console.error("Error fetching fallback model:",o);const r=e.models.find(p=>p.m_code==="STUB_MODEL"&&p.is_available);M(r?"STUB_MODEL":"")})}else console.error("Expected models object but got:",e),S([])}).catch(e=>{console.error("Error fetching models:",e),S([])})},[]),b=i.useCallback(()=>{console.log("=== fetchPrompts called ==="),fetch("/api/prompts").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{console.log("Prompts data received:",e),Array.isArray(e)?P(e):(console.error("Expected array but got:",e),P([])),console.log("State update triggered with:",e||[])}).catch(e=>{console.error("Error fetching prompts:",e),P([])})},[]),te=i.useCallback(()=>{fetch("/api/image-types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{console.log("Image types data received:",e),Array.isArray(e)?L(e):(console.error("Expected array but got:",e),L([]))}).catch(e=>{console.error("Error fetching image types:",e),L([])})},[]),q=i.useCallback(()=>{console.log("=== fetchSchemas called ==="),fetch("/api/schemas",{headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}}).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{console.log("Schemas data received:",e),Array.isArray(e)?B(e):(console.error("Expected array but got:",e),B([]))}).catch(e=>{console.error("Error fetching schemas:",e),B([])})},[]);i.useEffect(()=>{v&&(u(),b(),te(),q())},[v,u,b,te,q]),i.useEffect(()=>{v&&Y()},[v,Y]);const ie=e=>{R(e),c({p_code:e.p_code,label:e.label||"",metadata_instructions:e.metadata_instructions||"",image_type:e.image_type||"crisis_map",is_active:e.is_active||!1}),w(!0)},Te=async()=>{try{if(!F){alert("No prompt selected for editing");return}const e=await fetch(`/api/prompts/${F.p_code}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:n.label,metadata_instructions:n.metadata_instructions,image_type:n.image_type,is_active:n.is_active})});if(e.ok)b(),w(!1),R(null),c({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1});else{const s=await e.json();alert(`Failed to update prompt: ${s.error||"Unknown error"}`)}}catch{alert("Error updating prompt")}},de=async(e,s)=>{try{const o=await fetch(`/api/prompts/${e}/toggle-active?image_type=${s}`,{method:"POST",headers:{"Content-Type":"application/json"}});if(o.ok)b();else{const r=await o.json();alert(`Failed to toggle prompt active status: ${r.detail||"Unknown error"}`)}}catch{alert("Error toggling prompt active status")}},ne=e=>{z(e),c({p_code:"",label:"",metadata_instructions:"",image_type:e,is_active:!1}),T(!0)},Fe=async()=>{try{const e=await fetch("/api/prompts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(e.ok)b(),T(!1),z(null),c({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1});else{const s=await e.json();alert(`Failed to create prompt: ${s.detail||"Unknown error"}`)}}catch{alert("Error creating prompt")}},Ae=e=>{D(e),f({schema_id:e.schema_id,title:e.title,version:e.version,schema:e.schema}),k(!0)},$e=async()=>{try{if(!O){alert("No schema selected for editing");return}const e=await fetch(`/api/schemas/${O.schema_id}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(U)});if(e.ok)q(),k(!1),D(null),f({schema_id:"",title:"",version:"",schema:{}});else{const s=await e.json();alert(`Failed to save schema: ${s.detail||"Unknown error"}`)}}catch(e){console.error("Error saving schema:",e),alert("Error saving schema")}},Ie=()=>{k(!1),D(null),f({schema_id:"",title:"",version:"",schema:{}})},Ee=async(e,s)=>{try{const o=await fetch(`/api/models/${e}/toggle`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_available:!s})});if(o.ok)S(r=>(r||[]).map(p=>p.m_code===e?{...p,is_available:!s}:p));else{const r=await o.json();alert(`Failed to toggle model availability: ${r.error||"Unknown error"}`)}}catch{alert("Error toggling model availability")}},Pe=e=>{C(e),e==="random"?localStorage.setItem(I,"random"):localStorage.setItem(I,e)},Le=async e=>{try{const s=await fetch(`/api/admin/models/${e}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify({is_fallback:!0})});if(s.ok)M(e),u();else{const o=await s.json();alert(`Failed to set fallback model: ${o.detail||"Unknown error"}`)}}catch{alert("Error setting fallback model")}},Be=async()=>{try{const e=await fetch("/api/admin/models",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(t)});if(e.ok){const s=` +Model "${t.label}" added successfully! + +⚠️ IMPORTANT: Model will NOT work until you complete these steps: + +1. 🔑 Ensure API key is set and valid. + +2. 📝 Verify model_id format. + +3. 📚 Check model specific documentation for details. + `;Me(s),W(!0),H(!1),m({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1}),u()}else{const s=await e.json();alert(`Failed to add model: ${s.detail||"Unknown error"}`)}}catch{alert("Error adding model")}},Oe=e=>{V(e),m({m_code:e.m_code,label:e.label,model_type:e.model_type||"custom",provider:e.provider||e.config?.provider||"huggingface",model_id:e.model_id||e.config?.model_id||e.m_code,is_available:e.is_available,is_fallback:e.is_fallback}),J(!0)},De=async()=>{try{console.log("Updating model with data:",t);const e={label:t.label,model_type:t.model_type,provider:t.provider,model_id:t.model_id,is_available:t.is_available};if(console.log("Update payload:",e),!G){alert("No model selected for editing");return}const s=await fetch(`/api/admin/models/${G.m_code}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(e)});if(console.log("Update response status:",s.status),s.ok){const o=await s.json();console.log("Update successful:",o),J(!1),V(null),m({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1}),console.log("Refreshing models..."),u()}else{const o=await s.json();console.error("Update failed:",o),alert(`Failed to update model: ${o.detail||"Unknown error"}`)}}catch(e){console.error("Update error:",e),alert("Error updating model")}},Ue=async e=>{oe(e),A(!0)},ze=async()=>{try{const e=await fetch(`/api/admin/models/${se}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}});if(e.ok)A(!1),oe(""),u();else{const s=await e.json();alert(`Failed to delete model: ${s.detail||"Unknown error"}`)}}catch{alert("Error deleting model")}},Re=async e=>{if(e.preventDefault(),!E.trim()){g("Please enter a password");return}ee(!0),g("");try{await me(E)||g("Invalid password")}catch{g("Login failed. Please try again.")}finally{ee(!1)}},He=()=>{he(),Q(""),g("")};return ce?a.jsx(K,{children:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-ifrcRed mx-auto mb-4"}),a.jsx("p",{className:"text-gray-600",children:"Loading..."})]})})}):v?a.jsxs(K,{children:[a.jsxs("div",{className:l.adminContainer,children:[a.jsx("div",{className:l.adminHeader,children:a.jsx(d,{name:"logout",variant:"secondary",onClick:He,children:"Logout"})}),a.jsxs("div",{className:l.adminSection,children:[a.jsx(j,{heading:"VLM Model Selection",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelSelectionArea,children:[a.jsx("p",{className:"text-gray-700",children:"Select which Vision Language Model to use for caption generation."}),a.jsxs("div",{className:l.modelSelectionRow,children:[a.jsx(y,{label:"Model",name:"selected-model",value:pe,onChange:e=>{const s=e||N.find(o=>o.m_code==="STUB_MODEL"&&o.is_available)?.m_code||"STUB_MODEL";Pe(s)},options:[{value:"random",label:"Random"},...(N||[]).filter(e=>e.is_available).map(e=>({value:e.m_code,label:e.label}))],keySelector:e=>e.value,labelSelector:e=>e.label}),a.jsx(y,{label:"Fallback",name:"fallback-model",value:_e,onChange:e=>Le(e||"STUB_MODEL"),options:(N||[]).filter(e=>e.is_available).map(e=>({value:e.m_code,label:e.label})),keySelector:e=>e.value,labelSelector:e=>e.label})]})]})}),a.jsx(j,{heading:"Model Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelManagementArea,children:[a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Provider"}),a.jsx("th",{children:"Model ID"}),a.jsx("th",{children:"Available"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(N||[]).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.m_code}),a.jsx("td",{children:e.label}),a.jsx("td",{children:e.provider||e.config?.provider||"huggingface"}),a.jsx("td",{className:l.modelId,children:e.model_id||e.config?.model_id||e.m_code||"N/A"}),a.jsx("td",{children:a.jsx(d,{name:`toggle-${e.m_code}`,variant:e.is_available?"primary":"secondary",size:1,onClick:()=>Ee(e.m_code,e.is_available),children:e.is_available?"Enabled":"Disabled"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(d,{name:`edit-${e.m_code}`,variant:"secondary",size:1,onClick:()=>Oe(e),children:"Edit"}),a.jsx(d,{name:`delete-${e.m_code}`,variant:"secondary",size:1,onClick:()=>Ue(e.m_code),children:"Delete"})]})})]},e.m_code))})]})}),!le&&a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(d,{name:"show-add-form",variant:"primary",onClick:()=>H(!0),children:"Add New Model"})}),le&&a.jsxs("div",{className:l.addModelForm,children:[a.jsx("h4",{className:l.addModelFormTitle,children:"Add New Model"}),a.jsxs("div",{className:l.addModelFormGrid,children:[a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model Code",name:"model-code",value:t.m_code,onChange:e=>m({...t,m_code:e||""}),placeholder:"e.g., NEW_MODEL_123"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Label",name:"model-label",value:t.label,onChange:e=>m({...t,label:e||""}),placeholder:"e.g., New Model Name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(y,{label:"Provider",name:"model-provider",value:t.provider,onChange:e=>m({...t,provider:e||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:e=>e.value,labelSelector:e=>e.label})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model ID",name:"model-id",value:t.model_id,onChange:e=>m({...t,model_id:e||""}),placeholder:"e.g., org/model-name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:t.is_available,onChange:e=>m({...t,is_available:e.target.checked})}),a.jsx("span",{children:"Available for use"})]})})]}),a.jsxs("div",{className:l.addModelFormActions,children:[a.jsx(d,{name:"save-model",variant:"primary",onClick:Be,disabled:!t.m_code||!t.label||!t.model_id,children:"Save Model"}),a.jsx(d,{name:"cancel-add",variant:"secondary",onClick:()=>H(!1),children:"Cancel"})]})]}),be&&a.jsxs("div",{className:l.addModelForm,children:[a.jsxs("h4",{className:l.addModelFormTitle,children:["Edit Model: ",G?.label]}),a.jsxs("div",{className:l.addModelFormGrid,children:[a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model Code",name:"model-code",value:t.m_code,onChange:e=>m({...t,m_code:e||""}),placeholder:"e.g., NEW_MODEL_123",disabled:!0})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Label",name:"model-label",value:t.label,onChange:e=>m({...t,label:e||""}),placeholder:"e.g., New Model Name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(y,{label:"Provider",name:"model-provider",value:t.provider,onChange:e=>m({...t,provider:e||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:e=>e.value,labelSelector:e=>e.label})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model ID",name:"model-id",value:t.model_id,onChange:e=>m({...t,model_id:e||""}),placeholder:"e.g., org/model-name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:t.is_available,onChange:e=>m({...t,is_available:e.target.checked})}),a.jsx("span",{children:"Available for use"})]})})]}),a.jsxs("div",{className:l.addModelFormActions,children:[a.jsx(d,{name:"update-model",variant:"primary",onClick:De,disabled:!t.m_code||!t.label||!t.model_id,children:"Update Model"}),a.jsx(d,{name:"cancel-edit",variant:"secondary",onClick:()=>{J(!1),V(null),m({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1})},children:"Cancel"})]})]})]})}),a.jsx(j,{heading:"Prompt Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelManagementArea,children:[a.jsxs("div",{className:l.promptSubsection,children:[a.jsx("h4",{className:l.promptSubsectionTitle,children:"Crisis Maps"}),a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Status"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(ae||[]).filter(e=>e.image_type==="crisis_map").sort((e,s)=>e.p_code.localeCompare(s.p_code)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.p_code}),a.jsx("td",{className:l.promptLabel,children:e.label||"No label"}),a.jsx("td",{children:a.jsx(d,{name:`toggle-crisis-${e.p_code}`,variant:e.is_active?"primary":"secondary",size:1,onClick:()=>de(e.p_code,"crisis_map"),children:e.is_active?"Active":"Inactive"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(d,{name:`view-${e.p_code}`,variant:"secondary",size:1,onClick:()=>{x(`=== Prompt Details === +Code: ${e.p_code} +Label: ${e.label} +Image Type: ${e.image_type} +Active: ${e.is_active} + +Metadata Instructions: +${e.metadata_instructions||"No instructions available"}`),$(`Prompt: ${e.p_code}`),_(!0)},children:"View"}),a.jsx(d,{name:`edit-${e.p_code}`,variant:"secondary",size:1,onClick:()=>ie(e),children:"Edit"})]})})]},e.p_code))})]})}),a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(d,{name:"add-crisis-prompt",variant:"primary",onClick:()=>ne("crisis_map"),children:"Add New Crisis Map Prompt"})})]}),a.jsxs("div",{className:l.promptSubsection,children:[a.jsx("h4",{className:l.promptSubsectionTitle,children:"Drone Images"}),a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Status"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(ae||[]).filter(e=>e.image_type==="drone_image").sort((e,s)=>e.p_code.localeCompare(s.p_code)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.p_code}),a.jsx("td",{className:l.promptLabel,children:e.label||"No label"}),a.jsx("td",{children:a.jsx(d,{name:`toggle-drone-${e.p_code}`,variant:e.is_active?"primary":"secondary",size:1,onClick:()=>de(e.p_code,"drone_image"),children:e.is_active?"Active":"Inactive"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(d,{name:`view-${e.p_code}`,variant:"secondary",size:1,onClick:()=>{x(`=== Prompt Details === +Code: ${e.p_code} +Label: ${e.label} +Image Type: ${e.image_type} +Active: ${e.is_active} + +Metadata Instructions: +${e.metadata_instructions||"No instructions available"}`),$(`Prompt: ${e.p_code}`),_(!0)},children:"View"}),a.jsx(d,{name:`edit-${e.p_code}`,variant:"secondary",size:1,onClick:()=>ie(e),children:"Edit"})]})})]},e.p_code))})]})}),a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(d,{name:"add-drone-prompt",variant:"primary",onClick:()=>ne("drone_image"),children:"Add New Drone Image Prompt"})})]})]})}),a.jsx(j,{heading:"Schema Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsx("div",{className:l.modelManagementArea,children:a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Schema ID"}),a.jsx("th",{children:"Schema Content"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(ue||[]).sort((e,s)=>e.schema_id.localeCompare(s.schema_id)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.schema_id}),a.jsx("td",{className:l.promptLabel,style:{maxWidth:"400px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:JSON.stringify(e.schema)}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(d,{name:`view-schema-${e.schema_id}`,variant:"secondary",size:1,onClick:()=>{x(`=== Schema Details === +Schema ID: ${e.schema_id} + +Schema Definition: +${JSON.stringify(e.schema,null,2)}`),$(`Schema: ${e.schema_id}`),_(!0)},children:"View"}),a.jsx(d,{name:`edit-schema-${e.schema_id}`,variant:"secondary",size:1,onClick:()=>Ae(e),children:"Edit"})]})})]},e.schema_id))})]})})})}),a.jsx(j,{heading:"Utilities",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsx("div",{className:"flex flex-wrap gap-4",children:a.jsx(d,{name:"test-connection",variant:"secondary",onClick:async()=>{x("Testing API connection..."),$("Connection Test Results");try{const e=await fetch("/api/models");if(e.ok){const s=await e.json(),o=`✅ API connection successful! + +Found ${s.models?.length||0} models in database. + +Available models: +${(s.models||[]).filter(r=>r.is_available).map(r=>`- ${r.label} (${r.m_code})`).join(` +`)||"None"}`;x(o)}else{const s=`❌ API connection failed: HTTP ${e.status}`;x(s)}_(!0)}catch(e){const s=`❌ Connection error: ${e}`;x(s),_(!0)}},children:"Test Connection"})})})]})]}),ye&&a.jsx("div",{className:l.modalOverlay,onClick:()=>A(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:"Delete Model"}),a.jsxs("p",{className:l.modalText,children:["Are you sure you want to delete model ",a.jsx("span",{className:l.modelCode,children:se}),"? This action cannot be undone."]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(d,{name:"cancel-delete",variant:"tertiary",onClick:()=>A(!1),children:"Cancel"}),a.jsx(d,{name:"confirm-delete",variant:"secondary",onClick:ze,children:"Delete"})]})]})})}),Ne&&a.jsx("div",{className:l.modalOverlay,onClick:()=>W(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:"Model Added Successfully!"}),a.jsx("div",{className:`${l.modalText} ${l.modalTextLeft}`,children:Ce}),a.jsx("div",{className:l.modalButtons,children:a.jsx(d,{name:"close-setup-instructions",variant:"secondary",onClick:()=>W(!1),children:"Got it!"})})]})})}),Se&&a.jsx("div",{className:l.modalOverlay,onClick:()=>_(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:we}),a.jsx("div",{className:`${l.modalText} ${l.modalTextLeft}`,children:a.jsx("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:ke})}),a.jsx("div",{className:l.modalButtons,children:a.jsx(d,{name:"close-test-results",variant:"secondary",onClick:()=>_(!1),children:"Close"})})]})})}),ve&&a.jsx("div",{className:l.modalOverlay,onClick:()=>w(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Edit Prompt: ",F?.p_code]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Code:"}),a.jsx(h,{name:"prompt-code",value:F?.p_code,onChange:()=>{},disabled:!0,className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Label:"}),a.jsx(h,{name:"prompt-label",value:n.label,onChange:e=>c(s=>({...s,label:e||""})),className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Image Type:"}),a.jsx(y,{name:"prompt-image-type",value:n.image_type,onChange:e=>c(s=>({...s,image_type:e||"crisis_map"})),options:xe||[],keySelector:e=>e.image_type,labelSelector:e=>e.label})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Active Status:"}),a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:n.is_active,onChange:e=>c(s=>({...s,is_active:e.target.checked}))}),a.jsx("span",{children:"Active for this image type"})]})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Metadata Instructions:"}),a.jsx("textarea",{name:"prompt-instructions",value:n.metadata_instructions,onChange:e=>c(s=>({...s,metadata_instructions:e.target.value})),className:`${l.formInput} ${l.textarea}`,rows:8})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(d,{name:"cancel-edit-prompt",variant:"tertiary",onClick:()=>{w(!1),R(null),c({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1})},children:"Cancel"}),a.jsx(d,{name:"save-prompt",variant:"primary",onClick:Te,children:"Save Changes"})]})]})})}),ge&&a.jsx("div",{className:l.modalOverlay,onClick:()=>T(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Add New ",fe==="crisis_map"?"Crisis Map":"Drone Image"," Prompt"]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Code:"}),a.jsx(h,{name:"prompt-code",value:n.p_code,onChange:e=>c(s=>({...s,p_code:e||""})),placeholder:"e.g., CUSTOM_CRISIS_MAP_001",className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Label:"}),a.jsx(h,{name:"prompt-label",value:n.label,onChange:e=>c(s=>({...s,label:e||""})),placeholder:"Enter prompt description...",className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Image Type:"}),a.jsx(h,{name:"prompt-image-type",value:n.image_type,onChange:()=>{},disabled:!0,className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Active Status:"}),a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:n.is_active,onChange:e=>c(s=>({...s,is_active:e.target.checked}))}),a.jsx("span",{children:"Active for this image type"})]})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Metadata Instructions:"}),a.jsx("textarea",{name:"prompt-instructions",value:n.metadata_instructions,onChange:e=>c(s=>({...s,metadata_instructions:e.target.value})),placeholder:"Enter metadata extraction instructions...",className:`${l.formInput} ${l.textarea}`,rows:8})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(d,{name:"cancel-add-prompt",variant:"tertiary",onClick:()=>{T(!1),z(null),c({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1})},children:"Cancel"}),a.jsx(d,{name:"save-new-prompt",variant:"primary",onClick:Fe,disabled:!n.p_code||!n.label,children:"Create Prompt"})]})]})})}),je&&a.jsx("div",{className:l.modalOverlay,onClick:()=>k(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Edit Schema: ",O?.schema_id]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Schema ID:"}),a.jsx(h,{name:"schema-id",value:U.schema_id,onChange:e=>f(s=>({...s,schema_id:e||""})),className:l.formInput,disabled:!0})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Schema Definition (JSON):"}),a.jsx("textarea",{name:"schema-definition",value:JSON.stringify(U.schema,null,2),onChange:e=>{try{const s=JSON.parse(e.target.value);f(o=>({...o,schema:s}))}catch{}},className:`${l.formInput} ${l.textarea}`,rows:20,style:{fontFamily:"monospace"}})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(d,{name:"cancel-edit-schema",variant:"tertiary",onClick:Ie,children:"Cancel"}),a.jsx(d,{name:"save-schema",variant:"primary",onClick:$e,children:"Save Changes"})]})]})})})]}):a.jsx(K,{children:a.jsxs("div",{className:"mx-auto max-w-md px-4 sm:px-6 lg:px-8 py-6 sm:py-10",children:[a.jsx("div",{className:"text-center mb-8",children:a.jsx(Je,{level:2,children:"Admin Login"})}),a.jsxs("form",{onSubmit:Re,className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),a.jsx(h,{id:"password",name:"password",type:"password",value:E,onChange:e=>Q(e||""),placeholder:"Enter admin password",required:!0,className:"w-full",disabled:Z})]}),X&&a.jsx("div",{children:a.jsx("p",{className:"text-sm text-ifrcRed font-medium",children:X})}),a.jsx("div",{className:"flex justify-center",children:a.jsx(j,{withInternalPadding:!0,className:"p-2",children:Z?a.jsxs("div",{className:re.loadingContainer,children:[a.jsx(Ge,{className:"text-ifrcRed"}),a.jsx("p",{className:re.loadingText,children:"Logging in..."})]}):a.jsx(d,{name:"login",type:"submit",variant:"primary",size:2,children:"Login"})})})]})]})})}export{Ca as default}; diff --git a/py_backend/static/assets/AdminPage-DLWomD88.js b/py_backend/static/assets/AdminPage-DLWomD88.js deleted file mode 100644 index cb71cd25b8df5eae55b24b66140083cdcbf4bc9a..0000000000000000000000000000000000000000 --- a/py_backend/static/assets/AdminPage-DLWomD88.js +++ /dev/null @@ -1,35 +0,0 @@ -import{r as t,j as a,N as K,H as Je,O as m,z as j,I as re,_ as Ge,n as i,J as b}from"./index-w0OOMPwN.js";import{u as Ve}from"./useAdmin-avReXN15.js";const We="_adminContainer_j11pf_5",qe="_adminHeader_j11pf_13",Ke="_adminSection_j11pf_20",Ye="_modelSelectionArea_j11pf_29",Qe="_modelSelectionRow_j11pf_36",Xe="_modelsTable_j11pf_89",Ze="_promptSubsection_j11pf_97",ea="_promptSubsectionTitle_j11pf_109",aa="_modelCode_j11pf_152",la="_modelId_j11pf_157",sa="_modelActions_j11pf_163",oa="_addModelButtonContainer_j11pf_169",ta="_addModelForm_j11pf_177",ia="_addModelFormTitle_j11pf_185",da="_addModelFormGrid_j11pf_193",na="_addModelFormField_j11pf_206",ra="_addModelFormCheckbox_j11pf_250",ca="_addModelFormActions_j11pf_268",ma="_modalOverlay_j11pf_277",ha="_modalContent_j11pf_291",pa="_modalBody_j11pf_302",xa="_modalTitle_j11pf_312",ua="_modalText_j11pf_320",ja="_modalTextLeft_j11pf_332",_a="_modalButtons_j11pf_355",va="_modalForm_j11pf_363",ga="_formField_j11pf_372",fa="_formLabel_j11pf_376",ba="_formInput_j11pf_385",ya="_textarea_j11pf_407",l={adminContainer:We,adminHeader:qe,adminSection:Ke,modelSelectionArea:Ye,modelSelectionRow:Qe,modelsTable:Xe,promptSubsection:Ze,promptSubsectionTitle:ea,modelCode:aa,modelId:la,modelActions:sa,addModelButtonContainer:oa,addModelForm:ta,addModelFormTitle:ia,addModelFormGrid:da,addModelFormField:na,addModelFormCheckbox:ra,addModelFormActions:ca,modalOverlay:ma,modalContent:ha,modalBody:pa,modalTitle:xa,modalText:ua,modalTextLeft:ja,modalButtons:_a,modalForm:va,formField:ga,formLabel:fa,formInput:ba,textarea:ya},A="selectedVlmModel";function Sa(){const{isAuthenticated:_,isLoading:ce,login:me,logout:he,verifyToken:Y}=Ve(),[$,Q]=t.useState(""),[X,v]=t.useState(""),[Z,ee]=t.useState(!1),[I,y]=t.useState([]),[pe,N]=t.useState(""),[xe,C]=t.useState(""),[ae,P]=t.useState([]),[ue,E]=t.useState([]),[je,L]=t.useState([]),[_e,S]=t.useState(!1),[B,O]=t.useState(null),[D,g]=t.useState({schema_id:"",title:"",version:"",schema:{}}),[ve,k]=t.useState(!1),[ge,w]=t.useState(!1),[fe,U]=t.useState(null),[M,z]=t.useState(null),[n,r]=t.useState({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1}),[le,R]=t.useState(!1),[be,H]=t.useState(!1),[J,G]=t.useState(null),[o,c]=t.useState({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1}),[ye,T]=t.useState(!1),[Ne,V]=t.useState(!1),[Ce,p]=t.useState(!1),[se,oe]=t.useState(""),[Se,ke]=t.useState(""),[we,x]=t.useState(""),[Me,F]=t.useState(""),u=t.useCallback(()=>{fetch("/api/models").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{if(console.log("Models data received:",e),e&&Array.isArray(e.models)){y(e.models);const s=localStorage.getItem(A);if(e.models.length>0)if(s==="random")N("random");else if(s&&e.models.find(d=>d.m_code===s&&d.is_available))N(s);else{const d=e.models.find(h=>h.is_available)||e.models[0];N(d.m_code),localStorage.setItem(A,d.m_code)}}else console.error("Expected models object but got:",e),y([])}).catch(e=>{console.error("Error fetching models:",e),y([])}),fetch("/api/admin/fallback-model",{headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}}).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{console.log("Fallback model data received:",e),e.fallback_model?C(e.fallback_model.m_code):C("")}).catch(e=>{console.error("Error fetching fallback model:",e),C("")})},[]),f=t.useCallback(()=>{console.log("=== fetchPrompts called ==="),fetch("/api/prompts").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{console.log("Prompts data received:",e),Array.isArray(e)?P(e):(console.error("Expected array but got:",e),P([])),console.log("State update triggered with:",e||[])}).catch(e=>{console.error("Error fetching prompts:",e),P([])})},[]),te=t.useCallback(()=>{fetch("/api/image-types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{console.log("Image types data received:",e),Array.isArray(e)?E(e):(console.error("Expected array but got:",e),E([]))}).catch(e=>{console.error("Error fetching image types:",e),E([])})},[]),W=t.useCallback(()=>{console.log("=== fetchSchemas called ==="),fetch("/api/schemas",{headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}}).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(e=>{console.log("Schemas data received:",e),Array.isArray(e)?L(e):(console.error("Expected array but got:",e),L([]))}).catch(e=>{console.error("Error fetching schemas:",e),L([])})},[]);t.useEffect(()=>{_&&(u(),f(),te(),W())},[_,u,f,te,W]),t.useEffect(()=>{_&&Y()},[_,Y]);const ie=e=>{z(e),r({p_code:e.p_code,label:e.label||"",metadata_instructions:e.metadata_instructions||"",image_type:e.image_type||"crisis_map",is_active:e.is_active||!1}),k(!0)},Te=async()=>{try{if(!M){alert("No prompt selected for editing");return}const e=await fetch(`/api/prompts/${M.p_code}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:n.label,metadata_instructions:n.metadata_instructions,image_type:n.image_type,is_active:n.is_active})});if(e.ok)f(),k(!1),z(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1});else{const s=await e.json();alert(`Failed to update prompt: ${s.error||"Unknown error"}`)}}catch{alert("Error updating prompt")}},de=async(e,s)=>{try{const d=await fetch(`/api/prompts/${e}/toggle-active?image_type=${s}`,{method:"POST",headers:{"Content-Type":"application/json"}});if(d.ok)f();else{const h=await d.json();alert(`Failed to toggle prompt active status: ${h.detail||"Unknown error"}`)}}catch{alert("Error toggling prompt active status")}},ne=e=>{U(e),r({p_code:"",label:"",metadata_instructions:"",image_type:e,is_active:!1}),w(!0)},Fe=async()=>{try{const e=await fetch("/api/prompts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(e.ok)f(),w(!1),U(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1});else{const s=await e.json();alert(`Failed to create prompt: ${s.detail||"Unknown error"}`)}}catch{alert("Error creating prompt")}},Ae=e=>{O(e),g({schema_id:e.schema_id,title:e.title,version:e.version,schema:e.schema}),S(!0)},$e=async()=>{try{if(!B){alert("No schema selected for editing");return}const e=await fetch(`/api/schemas/${B.schema_id}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(D)});if(e.ok)W(),S(!1),O(null),g({schema_id:"",title:"",version:"",schema:{}});else{const s=await e.json();alert(`Failed to save schema: ${s.detail||"Unknown error"}`)}}catch(e){console.error("Error saving schema:",e),alert("Error saving schema")}},Ie=()=>{S(!1),O(null),g({schema_id:"",title:"",version:"",schema:{}})},Pe=async(e,s)=>{try{const d=await fetch(`/api/models/${e}/toggle`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_available:!s})});if(d.ok)y(h=>(h||[]).map(q=>q.m_code===e?{...q,is_available:!s}:q));else{const h=await d.json();alert(`Failed to toggle model availability: ${h.error||"Unknown error"}`)}}catch{alert("Error toggling model availability")}},Ee=e=>{N(e),e==="random"?localStorage.setItem(A,"random"):localStorage.setItem(A,e)},Le=async e=>{try{const s=await fetch(`/api/admin/models/${e}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify({is_fallback:!0})});if(s.ok)C(e),u();else{const d=await s.json();alert(`Failed to set fallback model: ${d.detail||"Unknown error"}`)}}catch{alert("Error setting fallback model")}},Be=async()=>{try{const e=await fetch("/api/admin/models",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(o)});if(e.ok){const s=` -Model "${o.label}" added successfully! - -⚠️ IMPORTANT: Model will NOT work until you complete these steps: - -1. 🔑 Ensure API key is set and valid. - -2. 📝 Verify model_id format. - -3. 📚 Check model specific documentation for details. - `;ke(s),V(!0),R(!1),c({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1}),u()}else{const s=await e.json();alert(`Failed to add model: ${s.detail||"Unknown error"}`)}}catch{alert("Error adding model")}},Oe=e=>{G(e),c({m_code:e.m_code,label:e.label,model_type:e.model_type||"custom",provider:e.provider||e.config?.provider||"huggingface",model_id:e.model_id||e.config?.model_id||e.m_code,is_available:e.is_available,is_fallback:e.is_fallback}),H(!0)},De=async()=>{try{console.log("Updating model with data:",o);const e={label:o.label,model_type:o.model_type,provider:o.provider,model_id:o.model_id,is_available:o.is_available};if(console.log("Update payload:",e),!J){alert("No model selected for editing");return}const s=await fetch(`/api/admin/models/${J.m_code}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(e)});if(console.log("Update response status:",s.status),s.ok){const d=await s.json();console.log("Update successful:",d),H(!1),G(null),c({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1}),console.log("Refreshing models..."),u()}else{const d=await s.json();console.error("Update failed:",d),alert(`Failed to update model: ${d.detail||"Unknown error"}`)}}catch(e){console.error("Update error:",e),alert("Error updating model")}},Ue=async e=>{oe(e),T(!0)},ze=async()=>{try{const e=await fetch(`/api/admin/models/${se}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}});if(e.ok)T(!1),oe(""),u();else{const s=await e.json();alert(`Failed to delete model: ${s.detail||"Unknown error"}`)}}catch{alert("Error deleting model")}},Re=async e=>{if(e.preventDefault(),!$.trim()){v("Please enter a password");return}ee(!0),v("");try{await me($)||v("Invalid password")}catch{v("Login failed. Please try again.")}finally{ee(!1)}},He=()=>{he(),Q(""),v("")};return ce?a.jsx(K,{children:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-ifrcRed mx-auto mb-4"}),a.jsx("p",{className:"text-gray-600",children:"Loading..."})]})})}):_?a.jsxs(K,{children:[a.jsxs("div",{className:l.adminContainer,children:[a.jsx("div",{className:l.adminHeader,children:a.jsx(i,{name:"logout",variant:"secondary",onClick:He,children:"Logout"})}),a.jsxs("div",{className:l.adminSection,children:[a.jsx(j,{heading:"VLM Model Selection",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelSelectionArea,children:[a.jsx("p",{className:"text-gray-700",children:"Select which Vision Language Model to use for caption generation."}),a.jsxs("div",{className:l.modelSelectionRow,children:[a.jsx(b,{label:"Model",name:"selected-model",value:pe,onChange:e=>Ee(e||""),options:[{value:"random",label:"Random"},...(I||[]).filter(e=>e.is_available).map(e=>({value:e.m_code,label:e.label}))],keySelector:e=>e.value,labelSelector:e=>e.label}),a.jsx(b,{label:"Fallback",name:"fallback-model",value:xe,onChange:e=>Le(e||""),options:[{value:"",label:"No fallback (use STUB_MODEL)"},...(I||[]).filter(e=>e.is_available).map(e=>({value:e.m_code,label:e.label}))],keySelector:e=>e.value,labelSelector:e=>e.label})]})]})}),a.jsx(j,{heading:"Model Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelManagementArea,children:[a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Provider"}),a.jsx("th",{children:"Model ID"}),a.jsx("th",{children:"Available"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(I||[]).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.m_code}),a.jsx("td",{children:e.label}),a.jsx("td",{children:e.provider||e.config?.provider||"huggingface"}),a.jsx("td",{className:l.modelId,children:e.model_id||e.config?.model_id||e.m_code||"N/A"}),a.jsx("td",{children:a.jsx(i,{name:`toggle-${e.m_code}`,variant:e.is_available?"primary":"secondary",size:1,onClick:()=>Pe(e.m_code,e.is_available),children:e.is_available?"Enabled":"Disabled"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(i,{name:`edit-${e.m_code}`,variant:"secondary",size:1,onClick:()=>Oe(e),children:"Edit"}),a.jsx(i,{name:`delete-${e.m_code}`,variant:"secondary",size:1,onClick:()=>Ue(e.m_code),children:"Delete"})]})})]},e.m_code))})]})}),!le&&a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(i,{name:"show-add-form",variant:"primary",onClick:()=>R(!0),children:"Add New Model"})}),le&&a.jsxs("div",{className:l.addModelForm,children:[a.jsx("h4",{className:l.addModelFormTitle,children:"Add New Model"}),a.jsxs("div",{className:l.addModelFormGrid,children:[a.jsx("div",{className:l.addModelFormField,children:a.jsx(m,{label:"Model Code",name:"model-code",value:o.m_code,onChange:e=>c({...o,m_code:e||""}),placeholder:"e.g., NEW_MODEL_123"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(m,{label:"Label",name:"model-label",value:o.label,onChange:e=>c({...o,label:e||""}),placeholder:"e.g., New Model Name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(b,{label:"Provider",name:"model-provider",value:o.provider,onChange:e=>c({...o,provider:e||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:e=>e.value,labelSelector:e=>e.label})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(m,{label:"Model ID",name:"model-id",value:o.model_id,onChange:e=>c({...o,model_id:e||""}),placeholder:"e.g., org/model-name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:o.is_available,onChange:e=>c({...o,is_available:e.target.checked})}),a.jsx("span",{children:"Available for use"})]})})]}),a.jsxs("div",{className:l.addModelFormActions,children:[a.jsx(i,{name:"save-model",variant:"primary",onClick:Be,disabled:!o.m_code||!o.label||!o.model_id,children:"Save Model"}),a.jsx(i,{name:"cancel-add",variant:"secondary",onClick:()=>R(!1),children:"Cancel"})]})]}),be&&a.jsxs("div",{className:l.addModelForm,children:[a.jsxs("h4",{className:l.addModelFormTitle,children:["Edit Model: ",J?.label]}),a.jsxs("div",{className:l.addModelFormGrid,children:[a.jsx("div",{className:l.addModelFormField,children:a.jsx(m,{label:"Model Code",name:"model-code",value:o.m_code,onChange:e=>c({...o,m_code:e||""}),placeholder:"e.g., NEW_MODEL_123",disabled:!0})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(m,{label:"Label",name:"model-label",value:o.label,onChange:e=>c({...o,label:e||""}),placeholder:"e.g., New Model Name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(b,{label:"Provider",name:"model-provider",value:o.provider,onChange:e=>c({...o,provider:e||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:e=>e.value,labelSelector:e=>e.label})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(m,{label:"Model ID",name:"model-id",value:o.model_id,onChange:e=>c({...o,model_id:e||""}),placeholder:"e.g., org/model-name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:o.is_available,onChange:e=>c({...o,is_available:e.target.checked})}),a.jsx("span",{children:"Available for use"})]})})]}),a.jsxs("div",{className:l.addModelFormActions,children:[a.jsx(i,{name:"update-model",variant:"primary",onClick:De,disabled:!o.m_code||!o.label||!o.model_id,children:"Update Model"}),a.jsx(i,{name:"cancel-edit",variant:"secondary",onClick:()=>{H(!1),G(null),c({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1,is_fallback:!1})},children:"Cancel"})]})]})]})}),a.jsx(j,{heading:"Prompt Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelManagementArea,children:[a.jsxs("div",{className:l.promptSubsection,children:[a.jsx("h4",{className:l.promptSubsectionTitle,children:"Crisis Maps"}),a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Status"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(ae||[]).filter(e=>e.image_type==="crisis_map").sort((e,s)=>e.p_code.localeCompare(s.p_code)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.p_code}),a.jsx("td",{className:l.promptLabel,children:e.label||"No label"}),a.jsx("td",{children:a.jsx(i,{name:`toggle-crisis-${e.p_code}`,variant:e.is_active?"primary":"secondary",size:1,onClick:()=>de(e.p_code,"crisis_map"),children:e.is_active?"Active":"Inactive"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(i,{name:`view-${e.p_code}`,variant:"secondary",size:1,onClick:()=>{x(`=== Prompt Details === -Code: ${e.p_code} -Label: ${e.label} -Image Type: ${e.image_type} -Active: ${e.is_active} - -Metadata Instructions: -${e.metadata_instructions||"No instructions available"}`),F(`Prompt: ${e.p_code}`),p(!0)},children:"View"}),a.jsx(i,{name:`edit-${e.p_code}`,variant:"secondary",size:1,onClick:()=>ie(e),children:"Edit"})]})})]},e.p_code))})]})}),a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(i,{name:"add-crisis-prompt",variant:"primary",onClick:()=>ne("crisis_map"),children:"Add New Crisis Map Prompt"})})]}),a.jsxs("div",{className:l.promptSubsection,children:[a.jsx("h4",{className:l.promptSubsectionTitle,children:"Drone Images"}),a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Status"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(ae||[]).filter(e=>e.image_type==="drone_image").sort((e,s)=>e.p_code.localeCompare(s.p_code)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.p_code}),a.jsx("td",{className:l.promptLabel,children:e.label||"No label"}),a.jsx("td",{children:a.jsx(i,{name:`toggle-drone-${e.p_code}`,variant:e.is_active?"primary":"secondary",size:1,onClick:()=>de(e.p_code,"drone_image"),children:e.is_active?"Active":"Inactive"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(i,{name:`view-${e.p_code}`,variant:"secondary",size:1,onClick:()=>{x(`=== Prompt Details === -Code: ${e.p_code} -Label: ${e.label} -Image Type: ${e.image_type} -Active: ${e.is_active} - -Metadata Instructions: -${e.metadata_instructions||"No instructions available"}`),F(`Prompt: ${e.p_code}`),p(!0)},children:"View"}),a.jsx(i,{name:`edit-${e.p_code}`,variant:"secondary",size:1,onClick:()=>ie(e),children:"Edit"})]})})]},e.p_code))})]})}),a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(i,{name:"add-drone-prompt",variant:"primary",onClick:()=>ne("drone_image"),children:"Add New Drone Image Prompt"})})]})]})}),a.jsx(j,{heading:"Schema Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsx("div",{className:l.modelManagementArea,children:a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Schema ID"}),a.jsx("th",{children:"Schema Content"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:(je||[]).sort((e,s)=>e.schema_id.localeCompare(s.schema_id)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.schema_id}),a.jsx("td",{className:l.promptLabel,style:{maxWidth:"400px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:JSON.stringify(e.schema)}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(i,{name:`view-schema-${e.schema_id}`,variant:"secondary",size:1,onClick:()=>{x(`=== Schema Details === -Schema ID: ${e.schema_id} - -Schema Definition: -${JSON.stringify(e.schema,null,2)}`),F(`Schema: ${e.schema_id}`),p(!0)},children:"View"}),a.jsx(i,{name:`edit-schema-${e.schema_id}`,variant:"secondary",size:1,onClick:()=>Ae(e),children:"Edit"})]})})]},e.schema_id))})]})})})}),a.jsx(j,{heading:"Utilities",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsx("div",{className:"flex flex-wrap gap-4",children:a.jsx(i,{name:"test-connection",variant:"secondary",onClick:async()=>{x("Testing API connection..."),F("Connection Test Results");try{const e=await fetch("/api/models");if(e.ok){const s=await e.json(),d=`✅ API connection successful! - -Found ${s.models?.length||0} models in database. - -Available models: -${(s.models||[]).filter(h=>h.is_available).map(h=>`- ${h.label} (${h.m_code})`).join(` -`)||"None"}`;x(d)}else{const s=`❌ API connection failed: HTTP ${e.status}`;x(s)}p(!0)}catch(e){const s=`❌ Connection error: ${e}`;x(s),p(!0)}},children:"Test Connection"})})})]})]}),ye&&a.jsx("div",{className:l.modalOverlay,onClick:()=>T(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:"Delete Model"}),a.jsxs("p",{className:l.modalText,children:["Are you sure you want to delete model ",a.jsx("span",{className:l.modelCode,children:se}),"? This action cannot be undone."]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(i,{name:"cancel-delete",variant:"tertiary",onClick:()=>T(!1),children:"Cancel"}),a.jsx(i,{name:"confirm-delete",variant:"secondary",onClick:ze,children:"Delete"})]})]})})}),Ne&&a.jsx("div",{className:l.modalOverlay,onClick:()=>V(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:"Model Added Successfully!"}),a.jsx("div",{className:`${l.modalText} ${l.modalTextLeft}`,children:Se}),a.jsx("div",{className:l.modalButtons,children:a.jsx(i,{name:"close-setup-instructions",variant:"secondary",onClick:()=>V(!1),children:"Got it!"})})]})})}),Ce&&a.jsx("div",{className:l.modalOverlay,onClick:()=>p(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:Me}),a.jsx("div",{className:`${l.modalText} ${l.modalTextLeft}`,children:a.jsx("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:we})}),a.jsx("div",{className:l.modalButtons,children:a.jsx(i,{name:"close-test-results",variant:"secondary",onClick:()=>p(!1),children:"Close"})})]})})}),ve&&a.jsx("div",{className:l.modalOverlay,onClick:()=>k(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Edit Prompt: ",M?.p_code]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Code:"}),a.jsx(m,{name:"prompt-code",value:M?.p_code,onChange:()=>{},disabled:!0,className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Label:"}),a.jsx(m,{name:"prompt-label",value:n.label,onChange:e=>r(s=>({...s,label:e||""})),className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Image Type:"}),a.jsx(b,{name:"prompt-image-type",value:n.image_type,onChange:e=>r(s=>({...s,image_type:e||"crisis_map"})),options:ue||[],keySelector:e=>e.image_type,labelSelector:e=>e.label})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Active Status:"}),a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:n.is_active,onChange:e=>r(s=>({...s,is_active:e.target.checked}))}),a.jsx("span",{children:"Active for this image type"})]})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Metadata Instructions:"}),a.jsx("textarea",{name:"prompt-instructions",value:n.metadata_instructions,onChange:e=>r(s=>({...s,metadata_instructions:e.target.value})),className:`${l.formInput} ${l.textarea}`,rows:8})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(i,{name:"cancel-edit-prompt",variant:"tertiary",onClick:()=>{k(!1),z(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1})},children:"Cancel"}),a.jsx(i,{name:"save-prompt",variant:"primary",onClick:Te,children:"Save Changes"})]})]})})}),ge&&a.jsx("div",{className:l.modalOverlay,onClick:()=>w(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Add New ",fe==="crisis_map"?"Crisis Map":"Drone Image"," Prompt"]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Code:"}),a.jsx(m,{name:"prompt-code",value:n.p_code,onChange:e=>r(s=>({...s,p_code:e||""})),placeholder:"e.g., CUSTOM_CRISIS_MAP_001",className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Label:"}),a.jsx(m,{name:"prompt-label",value:n.label,onChange:e=>r(s=>({...s,label:e||""})),placeholder:"Enter prompt description...",className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Image Type:"}),a.jsx(m,{name:"prompt-image-type",value:n.image_type,onChange:()=>{},disabled:!0,className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Active Status:"}),a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:n.is_active,onChange:e=>r(s=>({...s,is_active:e.target.checked}))}),a.jsx("span",{children:"Active for this image type"})]})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Metadata Instructions:"}),a.jsx("textarea",{name:"prompt-instructions",value:n.metadata_instructions,onChange:e=>r(s=>({...s,metadata_instructions:e.target.value})),placeholder:"Enter metadata extraction instructions...",className:`${l.formInput} ${l.textarea}`,rows:8})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(i,{name:"cancel-add-prompt",variant:"tertiary",onClick:()=>{w(!1),U(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1})},children:"Cancel"}),a.jsx(i,{name:"save-new-prompt",variant:"primary",onClick:Fe,disabled:!n.p_code||!n.label,children:"Create Prompt"})]})]})})}),_e&&a.jsx("div",{className:l.modalOverlay,onClick:()=>S(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Edit Schema: ",B?.schema_id]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Schema ID:"}),a.jsx(m,{name:"schema-id",value:D.schema_id,onChange:e=>g(s=>({...s,schema_id:e||""})),className:l.formInput,disabled:!0})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Schema Definition (JSON):"}),a.jsx("textarea",{name:"schema-definition",value:JSON.stringify(D.schema,null,2),onChange:e=>{try{const s=JSON.parse(e.target.value);g(d=>({...d,schema:s}))}catch{}},className:`${l.formInput} ${l.textarea}`,rows:20,style:{fontFamily:"monospace"}})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(i,{name:"cancel-edit-schema",variant:"tertiary",onClick:Ie,children:"Cancel"}),a.jsx(i,{name:"save-schema",variant:"primary",onClick:$e,children:"Save Changes"})]})]})})})]}):a.jsx(K,{children:a.jsxs("div",{className:"mx-auto max-w-md px-4 sm:px-6 lg:px-8 py-6 sm:py-10",children:[a.jsx("div",{className:"text-center mb-8",children:a.jsx(Je,{level:2,children:"Admin Login"})}),a.jsxs("form",{onSubmit:Re,className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),a.jsx(m,{id:"password",name:"password",type:"password",value:$,onChange:e=>Q(e||""),placeholder:"Enter admin password",required:!0,className:"w-full",disabled:Z})]}),X&&a.jsx("div",{children:a.jsx("p",{className:"text-sm text-ifrcRed font-medium",children:X})}),a.jsx("div",{className:"flex justify-center",children:a.jsx(j,{withInternalPadding:!0,className:"p-2",children:Z?a.jsxs("div",{className:re.loadingContainer,children:[a.jsx(Ge,{className:"text-ifrcRed"}),a.jsx("p",{className:re.loadingText,children:"Logging in..."})]}):a.jsx(i,{name:"login",type:"submit",variant:"primary",size:2,children:"Login"})})})]})]})})}export{Sa as default}; diff --git a/py_backend/static/assets/ExportModal-C5df6JIW.js b/py_backend/static/assets/ExportModal-B89pVxH6.js similarity index 99% rename from py_backend/static/assets/ExportModal-C5df6JIW.js rename to py_backend/static/assets/ExportModal-B89pVxH6.js index ed4b2fb3765157dae76b28195e3544ff3b2d6b73..6a725437353eb27b0ca50b591ffac254a556a043 100644 --- a/py_backend/static/assets/ExportModal-C5df6JIW.js +++ b/py_backend/static/assets/ExportModal-B89pVxH6.js @@ -1 +1 @@ -import{r as n,j as e,P,S as W,o as F,T as V,D as A,z as g,n as b,O as H,J as M,V as q,_ as O,L as D}from"./index-w0OOMPwN.js";const G=({title:c,titleId:i,...r})=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":i},r),c?n.createElement("title",{id:i},c):null,n.createElement("g",{clipPath:"url(#checkbox-indeterminate-line_svg__a)"},n.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm2 6h10v2H7v-2Z"})),n.createElement("defs",null,n.createElement("clipPath",{id:"checkbox-indeterminate-line_svg__a"},n.createElement("path",{d:"M0 0h24v24H0z"})))),$=({title:c,titleId:i,...r})=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":i},r),c?n.createElement("title",{id:i},c):null,n.createElement("g",{clipPath:"url(#filter-line_svg__a)"},n.createElement("path",{d:"M9 13.5 4 6H3V4h18v2h-1l-5 7.5V22H9v-8.5ZM6.404 6 11 12.894V20h2v-7.106L17.596 6H6.404Z"})),n.createElement("defs",null,n.createElement("clipPath",{id:"filter-line_svg__a"},n.createElement("path",{d:"M0 0h24v24H0z"}))));function R(c){const{className:i,indeterminate:r,value:v}=c;return e.jsxs(e.Fragment,{children:[r&&e.jsx(G,{className:i}),v&&!r&&e.jsx(P,{className:i}),!v&&!r&&e.jsx(W,{className:i})]})}const U="_checkbox_12g7n_1",Z="_with-background_12g7n_7",Y="_checkmark-container_12g7n_12",J="_input_12g7n_18",K="_content_12g7n_33",Q="_description_12g7n_40",X="_checked_12g7n_45",L="_checkmark_12g7n_12",ee="_disabled-checkbox_12g7n_58",m={checkbox:U,withBackground:Z,checkmarkContainer:Y,input:J,content:K,description:Q,checked:X,checkmark:L,disabledCheckbox:ee};function B(c){const{className:i,checkmark:r=R,checkmarkClassName:v,checkmarkContainerClassName:T,disabled:s,error:h,indeterminate:y,inputClassName:w,invertedLogic:d=!1,label:j,labelContainerClassName:_,name:I,onChange:f,readOnly:x,tooltip:k,value:C,description:u,withBackground:E,...S}=c,z=n.useCallback(t=>{const o=t.currentTarget.checked;f(d?!o:o,I)},[I,f,d]),N=d?!C:C,p=F(m.checkbox,i,!y&&N&&m.checked,E&&m.withBackground,s&&m.disabledCheckbox,x&&m.readOnly);return e.jsxs("label",{className:p,title:k,children:[e.jsxs("div",{className:F(m.checkmarkContainer,T),children:[e.jsx("input",{onChange:z,className:F(m.input,w),type:"checkbox",checked:N??!1,disabled:s||x,readOnly:x,...S}),e.jsx(r,{className:F(m.checkmark,v),value:N??!1,indeterminate:y,"aria-hidden":"true"})]}),(j||u)&&e.jsxs("div",{className:m.content,children:[j&&e.jsx("div",{className:_,children:j}),u&&e.jsx("div",{className:m.description,children:u})]}),h&&e.jsx(V,{children:h})]})}function _e({sources:c,types:i,regions:r,countries:v,imageTypes:T,isLoadingFilters:s=!1}){const[h,y]=n.useState(!1),[w,d]=n.useState(""),{search:j,setSearch:_,srcFilter:I,setSrcFilter:f,catFilter:x,setCatFilter:k,regionFilter:C,setRegionFilter:u,countryFilter:E,setCountryFilter:S,imageTypeFilter:z,setImageTypeFilter:N,uploadTypeFilter:p,setUploadTypeFilter:t,clearAllFilters:o}=A();return n.useEffect(()=>{d(j)},[j]),e.jsxs("div",{className:"mb-6 space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsx(g,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:e.jsx(b,{name:"toggle-filters",variant:"secondary",onClick:()=>y(!h),className:"whitespace-nowrap",title:h?"Hide Filters":"Show Filters",children:e.jsx($,{className:"w-4 h-4"})})}),e.jsx(g,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:e.jsx(H,{name:"search",placeholder:"Search",value:w,onChange:a=>d(a||""),onKeyDown:a=>{a.key==="Enter"&&_(w)}})}),e.jsx(g,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:e.jsx(b,{name:"clear-filters",variant:"secondary",onClick:o,children:"Clear Filters"})})]}),h&&e.jsx("div",{className:"bg-white/20 backdrop-blur-sm rounded-md p-4",children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"source",placeholder:s?"Loading...":"All Sources",options:c,value:I||null,onChange:a=>f(a||""),keySelector:a=>a.s_code,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"category",placeholder:s?"Loading...":"All Categories",options:i,value:x||null,onChange:a=>k(a||""),keySelector:a=>a.t_code,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"region",placeholder:s?"Loading...":"All Regions",options:r,value:C||null,onChange:a=>u(a||""),keySelector:a=>a.r_code,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(q,{name:"country",placeholder:s?"Loading...":"All Countries",options:v,value:E?[E]:[],onChange:a=>S(a[0]||""),keySelector:a=>a.c_code,labelSelector:a=>a.label,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"imageType",placeholder:s?"Loading...":"All Image Types",options:T,value:z||null,onChange:a=>N(a||""),keySelector:a=>a.image_type,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"uploadType",placeholder:"All Upload Types",options:[{key:"single",label:"Single Upload"},{key:"multiple",label:"Multiple Upload"}],value:p||null,onChange:a=>t(a||""),keySelector:a=>a.key,labelSelector:a=>a.label,required:!1,disabled:!1})})]})})]})}const ae="_fullSizeModalOverlay_cyz3b_1",le="_fullSizeModalContent_cyz3b_29",te="_ratingWarningContent_cyz3b_53",se="_ratingWarningTitle_cyz3b_65",ne="_exportModeSection_cyz3b_133",ie="_splitConfigSection_cyz3b_143",re="_splitConfigTitle_cyz3b_153",ce="_splitInputsContainer_cyz3b_167",oe="_splitInputGroup_cyz3b_183",de="_splitInputLabel_cyz3b_197",pe="_splitInput_cyz3b_167",me="_splitTotal_cyz3b_247",he="_splitTotalError_cyz3b_261",xe="_checkboxesContainer_cyz3b_271",ue="_ratingWarningButtons_cyz3b_289",ge="_singleExportMessage_cyz3b_309",be="_navigateButtonContainer_cyz3b_333",ve="_loadingOverlay_cyz3b_349",l={fullSizeModalOverlay:ae,fullSizeModalContent:le,ratingWarningContent:te,ratingWarningTitle:se,exportModeSection:ne,splitConfigSection:ie,splitConfigTitle:re,splitInputsContainer:ce,splitInputGroup:oe,splitInputLabel:de,splitInput:pe,splitTotal:me,splitTotalError:he,checkboxesContainer:xe,ratingWarningButtons:ue,singleExportMessage:ge,navigateButtonContainer:be,loadingOverlay:ve};function fe({isOpen:c,onClose:i,onExport:r,crisisMapsCount:v,droneImagesCount:T,isLoading:s=!1,exportSuccess:h=!1,variant:y="bulk",onNavigateAndExport:w}){const[d,j]=n.useState("standard"),[_,I]=n.useState(80),[f,x]=n.useState(10),[k,C]=n.useState(10),[u,E]=n.useState(!0),[S,z]=n.useState(!0),N=()=>{if(y==="single"){r(d,["crisis_map","drone_image"]);return}if(!u&&!S){alert("Please select at least one image type to export.");return}const t=[];u&&t.push("crisis_map"),S&&t.push("drone_image"),r(d,t)},p=()=>{i()};return c?y==="single"?e.jsx("div",{className:l.fullSizeModalOverlay,onClick:p,children:e.jsxs("div",{className:l.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:[s&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(O,{className:"text-ifrcRed"}),e.jsx("div",{className:"text-lg font-medium",children:"Exporting..."}),e.jsx("div",{className:"text-sm text-gray-600",children:"This might take a few seconds"})]})}),h&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("div",{className:"text-lg font-medium",children:"Export Successful!"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Your dataset has been downloaded"}),e.jsx(b,{name:"close-export-success",onClick:p,className:"mt-4",children:"Close"})]})}),e.jsxs("div",{className:l.ratingWarningContent,children:[e.jsx("h3",{className:l.ratingWarningTitle,children:"Export Single Item"}),e.jsxs("div",{className:l.singleExportMessage,children:[e.jsx("p",{children:"This only exports the 1 item currently on display."}),e.jsx("p",{children:'You may export the entire dataset from the "list view" here:'})]}),e.jsx("div",{className:l.navigateButtonContainer,children:e.jsx(b,{name:"navigate-to-list",variant:"secondary",onClick:w,children:"Navigate to List View"})}),e.jsxs("div",{className:l.ratingWarningButtons,children:[e.jsx(b,{name:"continue-export",onClick:N,disabled:s,children:s?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"text-white"}),"Exporting..."]}):"Continue"}),e.jsx(b,{name:"cancel-export",variant:"tertiary",onClick:p,disabled:s,children:"Cancel"})]})]})]})}):e.jsx("div",{className:l.fullSizeModalOverlay,onClick:p,children:e.jsxs("div",{className:l.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:[s&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(O,{className:"text-ifrcRed"}),e.jsx("div",{className:"text-lg font-medium",children:"Exporting..."}),e.jsx("div",{className:"text-sm text-gray-600",children:"This might take a few seconds"})]})}),h&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("div",{className:"text-lg font-medium",children:"Export Successful!"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Your dataset has been downloaded"}),e.jsx(b,{name:"close-export-success",onClick:p,className:"mt-4",children:"Close"})]})}),e.jsxs("div",{className:l.ratingWarningContent,children:[e.jsx("h3",{className:l.ratingWarningTitle,children:"Export Dataset"}),e.jsx("div",{className:l.exportModeSection,children:e.jsx(D,{name:"export-mode",value:d,onChange:t=>{(t==="standard"||t==="fine-tuning")&&j(t)},options:[{key:"standard",label:"Standard"},{key:"fine-tuning",label:"Fine-tuning"}],keySelector:t=>t.key,labelSelector:t=>t.label,disabled:s})}),d==="fine-tuning"&&e.jsxs("div",{className:l.splitConfigSection,children:[e.jsx("div",{className:l.splitConfigTitle,children:"Dataset Split Configuration"}),e.jsxs("div",{className:l.splitInputsContainer,children:[e.jsxs("div",{className:l.splitInputGroup,children:[e.jsx("label",{htmlFor:"train-split",className:l.splitInputLabel,children:"Train (%)"}),e.jsx("input",{id:"train-split",type:"number",min:"0",max:"100",value:_,onChange:t=>{const o=parseInt(t.target.value)||0,a=100-o;a>=0&&(I(o),f+k>a&&(x(Math.floor(a/2)),C(a-Math.floor(a/2))))},className:l.splitInput,disabled:s})]}),e.jsxs("div",{className:l.splitInputGroup,children:[e.jsx("label",{htmlFor:"test-split",className:l.splitInputLabel,children:"Test (%)"}),e.jsx("input",{id:"test-split",type:"number",min:"0",max:"100",value:f,onChange:t=>{const o=parseInt(t.target.value)||0,a=100-_-o;a>=0&&(x(o),C(a))},className:l.splitInput,disabled:s})]}),e.jsxs("div",{className:l.splitInputGroup,children:[e.jsx("label",{htmlFor:"val-split",className:l.splitInputLabel,children:"Val (%)"}),e.jsx("input",{id:"val-split",type:"number",min:"0",max:"100",value:k,onChange:t=>{const o=parseInt(t.target.value)||0,a=100-_-o;a>=0&&(C(o),x(a))},className:l.splitInput,disabled:s})]})]}),_+f+k!==100&&e.jsx("div",{className:l.splitTotal,children:e.jsx("span",{className:l.splitTotalError,children:"Must equal 100%"})})]}),e.jsxs("div",{className:l.checkboxesContainer,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(B,{name:"crisis-maps",label:`Crisis Maps (${v} images)`,value:u,onChange:t=>E(t),disabled:s})}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(B,{name:"drone-images",label:`Drone Images (${T} images)`,value:S,onChange:t=>z(t),disabled:s})})]}),e.jsxs("div",{className:l.ratingWarningButtons,children:[e.jsx(b,{name:"confirm-export",onClick:N,disabled:s,children:s?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"text-white"}),"Exporting..."]}):"Export Selected"}),e.jsx(b,{name:"cancel-export",variant:"tertiary",onClick:p,disabled:s,children:"Cancel"})]})]})]})}):null}export{fe as E,_e as F}; +import{r as n,j as e,P,S as W,o as F,T as V,D as A,z as g,n as b,O as H,J as M,V as q,_ as O,L as D}from"./index-DuuohOak.js";const G=({title:c,titleId:i,...r})=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":i},r),c?n.createElement("title",{id:i},c):null,n.createElement("g",{clipPath:"url(#checkbox-indeterminate-line_svg__a)"},n.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm2 6h10v2H7v-2Z"})),n.createElement("defs",null,n.createElement("clipPath",{id:"checkbox-indeterminate-line_svg__a"},n.createElement("path",{d:"M0 0h24v24H0z"})))),$=({title:c,titleId:i,...r})=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":i},r),c?n.createElement("title",{id:i},c):null,n.createElement("g",{clipPath:"url(#filter-line_svg__a)"},n.createElement("path",{d:"M9 13.5 4 6H3V4h18v2h-1l-5 7.5V22H9v-8.5ZM6.404 6 11 12.894V20h2v-7.106L17.596 6H6.404Z"})),n.createElement("defs",null,n.createElement("clipPath",{id:"filter-line_svg__a"},n.createElement("path",{d:"M0 0h24v24H0z"}))));function R(c){const{className:i,indeterminate:r,value:v}=c;return e.jsxs(e.Fragment,{children:[r&&e.jsx(G,{className:i}),v&&!r&&e.jsx(P,{className:i}),!v&&!r&&e.jsx(W,{className:i})]})}const U="_checkbox_12g7n_1",Z="_with-background_12g7n_7",Y="_checkmark-container_12g7n_12",J="_input_12g7n_18",K="_content_12g7n_33",Q="_description_12g7n_40",X="_checked_12g7n_45",L="_checkmark_12g7n_12",ee="_disabled-checkbox_12g7n_58",m={checkbox:U,withBackground:Z,checkmarkContainer:Y,input:J,content:K,description:Q,checked:X,checkmark:L,disabledCheckbox:ee};function B(c){const{className:i,checkmark:r=R,checkmarkClassName:v,checkmarkContainerClassName:T,disabled:s,error:h,indeterminate:y,inputClassName:w,invertedLogic:d=!1,label:j,labelContainerClassName:_,name:I,onChange:f,readOnly:x,tooltip:k,value:C,description:u,withBackground:E,...S}=c,z=n.useCallback(t=>{const o=t.currentTarget.checked;f(d?!o:o,I)},[I,f,d]),N=d?!C:C,p=F(m.checkbox,i,!y&&N&&m.checked,E&&m.withBackground,s&&m.disabledCheckbox,x&&m.readOnly);return e.jsxs("label",{className:p,title:k,children:[e.jsxs("div",{className:F(m.checkmarkContainer,T),children:[e.jsx("input",{onChange:z,className:F(m.input,w),type:"checkbox",checked:N??!1,disabled:s||x,readOnly:x,...S}),e.jsx(r,{className:F(m.checkmark,v),value:N??!1,indeterminate:y,"aria-hidden":"true"})]}),(j||u)&&e.jsxs("div",{className:m.content,children:[j&&e.jsx("div",{className:_,children:j}),u&&e.jsx("div",{className:m.description,children:u})]}),h&&e.jsx(V,{children:h})]})}function _e({sources:c,types:i,regions:r,countries:v,imageTypes:T,isLoadingFilters:s=!1}){const[h,y]=n.useState(!1),[w,d]=n.useState(""),{search:j,setSearch:_,srcFilter:I,setSrcFilter:f,catFilter:x,setCatFilter:k,regionFilter:C,setRegionFilter:u,countryFilter:E,setCountryFilter:S,imageTypeFilter:z,setImageTypeFilter:N,uploadTypeFilter:p,setUploadTypeFilter:t,clearAllFilters:o}=A();return n.useEffect(()=>{d(j)},[j]),e.jsxs("div",{className:"mb-6 space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsx(g,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:e.jsx(b,{name:"toggle-filters",variant:"secondary",onClick:()=>y(!h),className:"whitespace-nowrap",title:h?"Hide Filters":"Show Filters",children:e.jsx($,{className:"w-4 h-4"})})}),e.jsx(g,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:e.jsx(H,{name:"search",placeholder:"Search",value:w,onChange:a=>d(a||""),onKeyDown:a=>{a.key==="Enter"&&_(w)}})}),e.jsx(g,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:e.jsx(b,{name:"clear-filters",variant:"secondary",onClick:o,children:"Clear Filters"})})]}),h&&e.jsx("div",{className:"bg-white/20 backdrop-blur-sm rounded-md p-4",children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"source",placeholder:s?"Loading...":"All Sources",options:c,value:I||null,onChange:a=>f(a||""),keySelector:a=>a.s_code,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"category",placeholder:s?"Loading...":"All Categories",options:i,value:x||null,onChange:a=>k(a||""),keySelector:a=>a.t_code,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"region",placeholder:s?"Loading...":"All Regions",options:r,value:C||null,onChange:a=>u(a||""),keySelector:a=>a.r_code,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(q,{name:"country",placeholder:s?"Loading...":"All Countries",options:v,value:E?[E]:[],onChange:a=>S(a[0]||""),keySelector:a=>a.c_code,labelSelector:a=>a.label,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"imageType",placeholder:s?"Loading...":"All Image Types",options:T,value:z||null,onChange:a=>N(a||""),keySelector:a=>a.image_type,labelSelector:a=>a.label,required:!1,disabled:s})}),e.jsx(g,{withInternalPadding:!0,className:"p-2",children:e.jsx(M,{name:"uploadType",placeholder:"All Upload Types",options:[{key:"single",label:"Single Upload"},{key:"multiple",label:"Multiple Upload"}],value:p||null,onChange:a=>t(a||""),keySelector:a=>a.key,labelSelector:a=>a.label,required:!1,disabled:!1})})]})})]})}const ae="_fullSizeModalOverlay_cyz3b_1",le="_fullSizeModalContent_cyz3b_29",te="_ratingWarningContent_cyz3b_53",se="_ratingWarningTitle_cyz3b_65",ne="_exportModeSection_cyz3b_133",ie="_splitConfigSection_cyz3b_143",re="_splitConfigTitle_cyz3b_153",ce="_splitInputsContainer_cyz3b_167",oe="_splitInputGroup_cyz3b_183",de="_splitInputLabel_cyz3b_197",pe="_splitInput_cyz3b_167",me="_splitTotal_cyz3b_247",he="_splitTotalError_cyz3b_261",xe="_checkboxesContainer_cyz3b_271",ue="_ratingWarningButtons_cyz3b_289",ge="_singleExportMessage_cyz3b_309",be="_navigateButtonContainer_cyz3b_333",ve="_loadingOverlay_cyz3b_349",l={fullSizeModalOverlay:ae,fullSizeModalContent:le,ratingWarningContent:te,ratingWarningTitle:se,exportModeSection:ne,splitConfigSection:ie,splitConfigTitle:re,splitInputsContainer:ce,splitInputGroup:oe,splitInputLabel:de,splitInput:pe,splitTotal:me,splitTotalError:he,checkboxesContainer:xe,ratingWarningButtons:ue,singleExportMessage:ge,navigateButtonContainer:be,loadingOverlay:ve};function fe({isOpen:c,onClose:i,onExport:r,crisisMapsCount:v,droneImagesCount:T,isLoading:s=!1,exportSuccess:h=!1,variant:y="bulk",onNavigateAndExport:w}){const[d,j]=n.useState("standard"),[_,I]=n.useState(80),[f,x]=n.useState(10),[k,C]=n.useState(10),[u,E]=n.useState(!0),[S,z]=n.useState(!0),N=()=>{if(y==="single"){r(d,["crisis_map","drone_image"]);return}if(!u&&!S){alert("Please select at least one image type to export.");return}const t=[];u&&t.push("crisis_map"),S&&t.push("drone_image"),r(d,t)},p=()=>{i()};return c?y==="single"?e.jsx("div",{className:l.fullSizeModalOverlay,onClick:p,children:e.jsxs("div",{className:l.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:[s&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(O,{className:"text-ifrcRed"}),e.jsx("div",{className:"text-lg font-medium",children:"Exporting..."}),e.jsx("div",{className:"text-sm text-gray-600",children:"This might take a few seconds"})]})}),h&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("div",{className:"text-lg font-medium",children:"Export Successful!"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Your dataset has been downloaded"}),e.jsx(b,{name:"close-export-success",onClick:p,className:"mt-4",children:"Close"})]})}),e.jsxs("div",{className:l.ratingWarningContent,children:[e.jsx("h3",{className:l.ratingWarningTitle,children:"Export Single Item"}),e.jsxs("div",{className:l.singleExportMessage,children:[e.jsx("p",{children:"This only exports the 1 item currently on display."}),e.jsx("p",{children:'You may export the entire dataset from the "list view" here:'})]}),e.jsx("div",{className:l.navigateButtonContainer,children:e.jsx(b,{name:"navigate-to-list",variant:"secondary",onClick:w,children:"Navigate to List View"})}),e.jsxs("div",{className:l.ratingWarningButtons,children:[e.jsx(b,{name:"continue-export",onClick:N,disabled:s,children:s?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"text-white"}),"Exporting..."]}):"Continue"}),e.jsx(b,{name:"cancel-export",variant:"tertiary",onClick:p,disabled:s,children:"Cancel"})]})]})]})}):e.jsx("div",{className:l.fullSizeModalOverlay,onClick:p,children:e.jsxs("div",{className:l.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:[s&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(O,{className:"text-ifrcRed"}),e.jsx("div",{className:"text-lg font-medium",children:"Exporting..."}),e.jsx("div",{className:"text-sm text-gray-600",children:"This might take a few seconds"})]})}),h&&e.jsx("div",{className:l.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("div",{className:"text-lg font-medium",children:"Export Successful!"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Your dataset has been downloaded"}),e.jsx(b,{name:"close-export-success",onClick:p,className:"mt-4",children:"Close"})]})}),e.jsxs("div",{className:l.ratingWarningContent,children:[e.jsx("h3",{className:l.ratingWarningTitle,children:"Export Dataset"}),e.jsx("div",{className:l.exportModeSection,children:e.jsx(D,{name:"export-mode",value:d,onChange:t=>{(t==="standard"||t==="fine-tuning")&&j(t)},options:[{key:"standard",label:"Standard"},{key:"fine-tuning",label:"Fine-tuning"}],keySelector:t=>t.key,labelSelector:t=>t.label,disabled:s})}),d==="fine-tuning"&&e.jsxs("div",{className:l.splitConfigSection,children:[e.jsx("div",{className:l.splitConfigTitle,children:"Dataset Split Configuration"}),e.jsxs("div",{className:l.splitInputsContainer,children:[e.jsxs("div",{className:l.splitInputGroup,children:[e.jsx("label",{htmlFor:"train-split",className:l.splitInputLabel,children:"Train (%)"}),e.jsx("input",{id:"train-split",type:"number",min:"0",max:"100",value:_,onChange:t=>{const o=parseInt(t.target.value)||0,a=100-o;a>=0&&(I(o),f+k>a&&(x(Math.floor(a/2)),C(a-Math.floor(a/2))))},className:l.splitInput,disabled:s})]}),e.jsxs("div",{className:l.splitInputGroup,children:[e.jsx("label",{htmlFor:"test-split",className:l.splitInputLabel,children:"Test (%)"}),e.jsx("input",{id:"test-split",type:"number",min:"0",max:"100",value:f,onChange:t=>{const o=parseInt(t.target.value)||0,a=100-_-o;a>=0&&(x(o),C(a))},className:l.splitInput,disabled:s})]}),e.jsxs("div",{className:l.splitInputGroup,children:[e.jsx("label",{htmlFor:"val-split",className:l.splitInputLabel,children:"Val (%)"}),e.jsx("input",{id:"val-split",type:"number",min:"0",max:"100",value:k,onChange:t=>{const o=parseInt(t.target.value)||0,a=100-_-o;a>=0&&(C(o),x(a))},className:l.splitInput,disabled:s})]})]}),_+f+k!==100&&e.jsx("div",{className:l.splitTotal,children:e.jsx("span",{className:l.splitTotalError,children:"Must equal 100%"})})]}),e.jsxs("div",{className:l.checkboxesContainer,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(B,{name:"crisis-maps",label:`Crisis Maps (${v} images)`,value:u,onChange:t=>E(t),disabled:s})}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(B,{name:"drone-images",label:`Drone Images (${T} images)`,value:S,onChange:t=>z(t),disabled:s})})]}),e.jsxs("div",{className:l.ratingWarningButtons,children:[e.jsx(b,{name:"confirm-export",onClick:N,disabled:s,children:s?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"text-white"}),"Exporting..."]}):"Export Selected"}),e.jsx(b,{name:"cancel-export",variant:"tertiary",onClick:p,disabled:s,children:"Cancel"})]})]})]})}):null}export{fe as E,_e as F}; diff --git a/py_backend/static/assets/index-D3L5y9N7.js b/py_backend/static/assets/index--kE6PMOO.js similarity index 99% rename from py_backend/static/assets/index-D3L5y9N7.js rename to py_backend/static/assets/index--kE6PMOO.js index 1c7586f996414927ba4d338e957bccc72249c84d..940e9df81694febaebc441e32232dd94092e9ccc 100644 --- a/py_backend/static/assets/index-D3L5y9N7.js +++ b/py_backend/static/assets/index--kE6PMOO.js @@ -1 +1 @@ -import{r as s,y as nt,t as ht,a as q,c as gt,j as e,o as N,b as re,R as st,z,g as rt,d as ft,m as vt,e as pt,n as Z,A as xt,f as _t,h as Ct,i as yt,k as he,l as bt,p as ye,q as jt,s as Nt,E as wt,C as St,U as Mt,Q as It,u as Dt,N as je,_ as Et,L as Tt}from"./index-w0OOMPwN.js";const kt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("g",{clipPath:"url(#arrow-drop-down-line_svg__a)"},s.createElement("path",{d:"m12 15-4.243-4.243 1.415-1.414L12 12.172l2.828-2.83 1.415 1.415L12 15Z"})),s.createElement("defs",null,s.createElement("clipPath",{id:"arrow-drop-down-line_svg__a"},s.createElement("path",{d:"M0 0h24v24H0z"})))),Lt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("g",{clipPath:"url(#arrow-drop-up-line_svg__a)"},s.createElement("path",{d:"m12 11.828-2.828 2.829-1.415-1.414L12 9l4.243 4.243-1.415 1.414L12 11.828Z"})),s.createElement("defs",null,s.createElement("clipPath",{id:"arrow-drop-up-line_svg__a"},s.createElement("path",{d:"M0 0h24v24H0z"})))),Pt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("g",{clipPath:"url(#information-line_svg__a)"},s.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20ZM11 7h2v2h-2V7Zm0 4h2v6h-2v-6Z"})),s.createElement("defs",null,s.createElement("clipPath",{id:"information-line_svg__a"},s.createElement("path",{d:"M0 0h24v24H0z"})))),Rt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"}),s.createElement("mask",{id:"table-sorting-line_svg__a",width:8,height:5,x:8,y:12,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},s.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"})),s.createElement("g",{mask:"url(#table-sorting-line_svg__a)"},s.createElement("path",{d:"M-24-22h72v72h-72z"})),s.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"}),s.createElement("mask",{id:"table-sorting-line_svg__b",width:8,height:5,x:8,y:6,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},s.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"})),s.createElement("g",{mask:"url(#table-sorting-line_svg__b)"},s.createElement("path",{d:"M48 45h-72v-72h72z"}))),$t="_number-output_1blvi_1",Bt={numberOutput:$t};function we(m){const{className:a,invalidText:h=nt,separatorHidden:r,compact:f,currency:g,value:b,tooltip:_,unit:y,prefix:x,suffix:w,maximumFractionDigits:C=1}=m,{currentLanguage:j}=s.useContext(ht),v=s.useMemo(()=>{if(q(b))return h;const S=gt(b,{currency:g,compact:f,separatorHidden:r,maximumFractionDigits:C,unit:y,language:j});return e.jsxs(e.Fragment,{children:[x,S,w]})},[h,b,f,r,g,y,C,x,j,w]);return e.jsx("div",{className:N(Bt.numberOutput,a),title:re(_)?String(_):void 0,children:v})}const At="_tooltip-dummy_rbf3f_1",Ft="_tooltip-content_rbf3f_7",Ot="_pointer_rbf3f_14",Ne={tooltipDummy:At,tooltipContent:Ft,pointer:Ot};function Ht(m){const{className:a,title:h,description:r,preferredWidth:f}=m,[g,b]=s.useState(!1),[_,y]=s.useState(!1),x=s.useRef(),w=s.useRef(null);return s.useEffect(()=>{const C=()=>{y(!0)},j=()=>{y(!1)};if(q(w.current))return;const{current:{parentNode:v}}=w;if(!q(v))return x.current=v,v.addEventListener("mouseover",C),v.addEventListener("mouseout",j),b(!0),()=>{v.removeEventListener("mouseover",C),v.removeEventListener("mouseout",j)}},[]),e.jsxs(e.Fragment,{children:[!g&&e.jsx("div",{className:Ne.tooltipDummy,ref:w}),_&&e.jsx(st,{className:N(Ne.tooltipContent,a),parentRef:x,pointerClassName:Ne.pointer,preferredWidth:f,children:e.jsx(z,{heading:h,withInternalPadding:!0,contentViewType:"vertical",children:r})})]})}function $(m){return m.id}const Vt="common",zt={booleanYesLabel:"Yes",booleanNoLabel:"No"},Ut={namespace:Vt,strings:zt},Wt="_boolean-output_kg1uq_1",Qt={booleanOutput:Wt};function Zt(m){const{className:a,invalidText:h,value:r}=m,f=rt(Ut);let g;return r===!0?g=f.booleanYesLabel:r===!1?g=f.booleanNoLabel:g=h,e.jsx("div",{className:N(Qt.booleanOutput,a),children:g})}const qt="_date-output_4jzjo_1",Gt={dateOutput:qt};function Yt(m){const{value:a,format:h,className:r,invalidText:f}=m,g=s.useMemo(()=>ft(a,h),[a,h]);return e.jsx("div",{className:N(Gt.dateOutput,r),children:g??f})}const Kt="_dropdown-menu_16hml_1",Xt="_icons_16hml_4",Jt="_content_16hml_5",ea="_actions_16hml_6",ta="_dropdown-icon_16hml_10",aa="_dropdown-content_16hml_16",le={dropdownMenu:Kt,icons:Xt,content:Jt,actions:ea,dropdownIcon:ta,dropdownContent:aa};function na(m){const a=s.useRef(null),{className:h,popupClassName:r,children:f,label:g,activeClassName:b,icons:_,variant:y="secondary",actions:x,withoutDropdownIcon:w,componentRef:C,elementRef:j=a,persistent:v,preferredPopupWidth:S}=m,p=s.useRef(null),[k,I]=s.useState(!1);s.useEffect(()=>{C&&(C.current={setShowDropdown:I})},[C,I]);const R=s.useCallback(()=>{I(ie=>!ie)},[I]),T=s.useCallback((ie,ae)=>{ae||ie&&v||I(!1)},[I,v]);vt(k,T,p,j);const G=s.useMemo(()=>({setShowDropdown:I}),[I]),U=!!x||!w;return e.jsxs(pt.Provider,{value:G,children:[e.jsx(Z,{name:void 0,className:N(le.dropdownMenu,k&&b,h),elementRef:j,onClick:R,variant:y,actionsContainerClassName:le.actions,iconsContainerClassName:le.icons,childrenContainerClassName:le.content,actions:U?e.jsxs(e.Fragment,{children:[x,!w&&(k?e.jsx(xt,{className:le.dropdownIcon}):e.jsx(_t,{className:le.dropdownIcon}))]}):void 0,icons:_,children:g}),k&&e.jsx(st,{elementRef:p,className:N(le.dropdownContent,r),parentRef:j,preferredWidth:S,children:f})]})}const sa="_info-popup_i3rna_1",ra="_label_i3rna_2",ia="_icon_i3rna_7",oa="_dropdown-container_i3rna_15",la="_content_i3rna_20",ge={infoPopup:sa,label:ra,icon:ia,dropdownContainer:oa,content:la};function ca(m){const{className:a,icon:h=e.jsx(Pt,{}),infoLabel:r,title:f,description:g,withoutIcon:b,popupClassName:_,descriptionClassName:y}=m;return e.jsx(na,{label:e.jsxs("div",{className:ge.label,children:[r,!b&&h&&e.jsx("div",{className:ge.icon,children:h})]}),popupClassName:N(ge.dropdownContainer,_),className:N(ge.infoPopup,a),variant:"tertiary",withoutDropdownIcon:!0,children:e.jsx(z,{heading:f,childrenContainerClassName:N(y,ge.content),withInternalPadding:!0,children:g})})}const da="_progress-wrapper_x340w_1",ua="_title_x340w_7",ma="_total_x340w_11",ha="_progress_x340w_1",fe={progressWrapper:da,title:ua,total:ma,progress:ha};function Ye(m){const{className:a,title:h,description:r,totalValue:f,value:g,showPercentageInTitle:b,children:_,color:y="var(--go-ui-color-primary-red)"}=m,x=re(g)?g:0,w=re(f)?f:0;let C;return w===0?C=0:C=x/w*100,e.jsxs("div",{className:N(fe.progressWrapper,a),children:[(h||b)&&e.jsxs("div",{className:fe.title,children:[h,b&&e.jsx(we,{value:C,suffix:"%"})]}),e.jsx("div",{className:fe.total,children:e.jsx("div",{className:fe.progress,style:{width:`${C}%`,backgroundColor:y}})}),r&&e.jsx("div",{className:fe.description,children:r}),_]})}const ga="_legend-element_1a9ic_1",fa="_color_1a9ic_7",va="_icon-container_1a9ic_14",pa="_icon_1a9ic_14",xa="_label_1a9ic_31",ve={legendElement:ga,color:fa,iconContainer:va,icon:pa,label:xa};function _a(m){const{className:a,colorClassName:h,iconClassName:r,color:f,label:g,iconSrc:b}=m;return e.jsxs("div",{className:N(ve.legendElement,a),children:[b?e.jsx("div",{style:{backgroundColor:f},className:ve.iconContainer,children:e.jsx("img",{className:N(ve.icon,r),src:b,alt:""})}):e.jsx("div",{style:{backgroundColor:f},className:N(ve.color,h)}),e.jsx("div",{className:ve.label,children:g})]})}const Ca="_text-output_10oza_1",ya="_with-background_10oza_6",ba="_label_10oza_11",ja="_with-colon_10oza_12",Na="_value_10oza_17",wa="_text-type_10oza_18",Sa="_strong_10oza_24",ee={textOutput:Ca,withBackground:ya,label:ba,withColon:ja,value:Na,textType:wa,strong:Sa};function Ke(m){const{className:a,label:h,icon:r,description:f,labelClassName:g,descriptionClassName:b,valueClassName:_,strongLabel:y,strongValue:x,strongDescription:w,withoutLabelColon:C,withBackground:j,invalidText:v=nt,...S}=m,{value:p}=m;let k=v;return S.valueType==="number"?k=e.jsx(we,{...S,invalidText:v}):S.valueType==="date"?k=e.jsx(Yt,{...S,invalidText:v}):S.valueType==="boolean"?k=e.jsx(Zt,{...S,invalidText:v}):p instanceof Date||(k=p||v),e.jsxs("div",{className:N(ee.textOutput,j&&ee.withBackground,a),children:[r,h&&e.jsx("div",{className:N(ee.label,y&&ee.strong,g,!C&&ee.withColon),children:h}),e.jsx("div",{className:N(ee.value,x&&ee.strong,S.valueType==="text"&&ee.textType,_),children:k}),f&&e.jsx("div",{className:N(ee.description,w&&ee.strong,b),children:f})]})}const Ma="_pie-chart_pyr7m_1",Ia="_legend_pyr7m_7",Da="_legend-item_pyr7m_13",pe={pieChart:Ma,legend:Ia,legendItem:Da},Ea=70,Ta=40;function Xe(m,a=1){return Math.round(m*10**a)/10**a}function Je(m,a){const h=(a-90)*Math.PI/180;return{x:Xe(m+m*Math.cos(h)),y:Xe(m+m*Math.sin(h))}}function ka(m,a,h){let r=h;const f=r-a===360;f&&(r-=1);const g=Je(m,a),b=Je(m,r),_=r-a<=180?0:1,y=["M",g.x,g.y,"A",m,m,0,_,1,b.x,b.y];return f?y.push("Z"):y.push("L",m,m,"L",g.x,g.y,"Z"),y.join(" ")}function xe(m){const{className:a,data:h,valueSelector:r,labelSelector:f,keySelector:g,colorSelector:b,colors:_,pieRadius:y=Ea,chartPadding:x=Ta,legendClassName:w,showPercentageInLegend:C}=m,j=Ct(h?.map(p=>r(p))),v=q(j)||j===0?1:j,S=s.useMemo(()=>{let p=0;const k=h?.map(I=>{const R=r(I);if(q(R))return;const T=360*(R/v);return p+=T,{key:g(I),value:R,label:f(I),startAngle:p-T,percentage:yt(R,v),endAngle:p,datum:I}}).filter(re)??[];return b?k.map(({datum:I,...R})=>({...R,color:b(I)})):k.map(({datum:I,...R},T)=>({...R,color:_[T%_.length]}))},[h,g,r,f,v,b,_]);return e.jsxs("div",{className:N(pe.pieChart,a),children:[e.jsx("svg",{className:pe.svg,style:{width:`${x+y*2}px`,height:`${x+y*2}px`},children:e.jsx("g",{style:{transform:`translate(${x/2}px, ${x/2}px)`},children:S.map(p=>e.jsx("path",{className:pe.path,d:ka(y,p.startAngle,p.endAngle),fill:p.color,children:e.jsx(Ht,{description:e.jsx(Ke,{label:p.label,value:p.value})})},p.key))})}),e.jsx("div",{className:N(pe.legend,w),children:S.map(p=>e.jsx(_a,{className:pe.legendItem,label:C?e.jsx(Ke,{label:p.label,value:p.percentage,valueType:"number",prefix:"(",suffix:"%)",withoutLabelColon:!0}):p.label,color:p.color},p.key))})]})}const La="_td_1k4cn_1",Pa={td:La};function Ra(m){const{className:a,children:h,...r}=m;return e.jsx("td",{className:N(a,Pa.td),...r,children:h})}function it(m){const{className:a,children:h,...r}=m;return e.jsx("tr",{className:a,...r,children:h})}const $a="_row_1829z_1",Ba="_cell_1829z_2",et={row:$a,cell:Ba};function Aa(m){const{data:a,keySelector:h,columns:r,rowClassName:f,cellClassName:g,rowModifier:b}=m;return e.jsx(e.Fragment,{children:a?.map((_,y)=>{const x=h(_,y),w=r.map(v=>{const{id:S,cellRenderer:p,cellRendererClassName:k,cellRendererParams:I,cellContainerClassName:R}=v,T=I(x,_,y,a),G=e.jsx(p,{className:k,...T,name:S});return e.jsx(Ra,{className:N(et.cell,R,typeof g=="function"?g(x,_,S):g),children:G},S)}),C=e.jsx(it,{className:N(et.row,typeof f=="function"?f(x,_):f),children:w});let j=C;return b&&(j=b({rowKey:x,row:C,cells:w,columns:r,datum:_})),e.jsx(s.Fragment,{children:j},x)})})}const Fa="_th_cdv41_1",Oa="_resize-handle_cdv41_8",tt={th:Fa,resizeHandle:Oa};function Ha(m){const{className:a,children:h,onResize:r,onResizeComplete:f,name:g,...b}=m,_=s.useRef(null),y=s.useRef(),x=s.useRef(),w=s.useRef(),C=s.useCallback(v=>{var S;if(re(y.current)&&_.current&&r){v.preventDefault(),v.stopPropagation();const p=v.clientX-y.current;if(re(x.current)){const k=x.current+p;w.current=k,r(k,g)}else x.current=(S=_.current)==null?void 0:S.offsetWidth}},[r,g]),j=s.useCallback(v=>{var S;v.preventDefault(),y.current=v.clientX,x.current=(S=_.current)==null?void 0:S.offsetWidth,window.addEventListener("mousemove",C,!0)},[C]);return s.useEffect(()=>{const v=()=>{y.current=void 0,x.current=void 0,f&&re(w.current)&&f(w.current,g),window.removeEventListener("mousemove",C,!0)};return window.addEventListener("mouseup",v,!0),()=>{window.removeEventListener("mouseup",v,!0),window.removeEventListener("mousemove",C,!0)}},[C,g,f]),e.jsxs("th",{ref:_,className:N(a,tt.th),...b,children:[r&&e.jsx("div",{role:"presentation",className:tt.resizeHandle,onMouseDown:j}),h]})}const Va="_table_nilhy_1",za="_table-overflow-wrapper_nilhy_8",Ua="_table-element_nilhy_13",Wa="_header-row_nilhy_23",Qa="_header-element_nilhy_24",Za="_header-component_nilhy_29",ce={table:Va,tableOverflowWrapper:za,tableElement:Ua,headerRow:Wa,headerElement:Qa,headerComponent:Za};function qa(m,a){return a??m.columnWidth??wt}function B(m){const{data:a,keySelector:h,columns:r,caption:f,className:g,captionClassName:b,headerRowClassName:_,headerCellClassName:y,rowClassName:x,cellClassName:w,rowModifier:C,fixedColumnWidth:j,resizableColumn:v,headersHidden:S,pending:p,filtered:k,errored:I=!1}=m,R=s.useRef(null),[T]=he.useState(()=>bt()),[G,U]=he.useState({});s.useEffect(()=>{U(W=>{if(q(R.current))return W;const E=R.current.getBoundingClientRect(),{width:O}=E;let A=r.map(M=>({id:M.id,stretch:!!M.columnStretch,width:qa(M,W[M.id])}));const X=ye(A.filter(M=>M.stretch).map(M=>M.width)),ne=ye(A.filter(M=>!M.stretch).map(M=>M.width)),Y=(O-ne)/X;return Y>1&&(A=A.map(M=>({...M,width:M.stretch?M.width*Y:M.width}))),jt(A,M=>M.id,M=>M.width)})},[r]);const ie=he.useCallback((W,E)=>{const O=document.getElementById(`${T}-${E}`),A=Math.max(W,80);if(q(O)||(O.style.width=`${A}px`,!j))return;const X=document.getElementById(T);if(q(X))return;const ne=ye(r.map(Y=>Y.id===E?A:G[Y.id]));X.style.width=`${ne}px`},[T,G,r,j]),ae=he.useCallback((W,E)=>{re(E)&&U(O=>({...O,[E]:Math.max(W,80)}))},[U]),be=he.useMemo(()=>ye(r.map(W=>G[W.id])),[G,r]),K=q(a)||a.length===0||Object.keys(G).length===0;return e.jsxs("div",{ref:R,className:N(ce.table,g),children:[!K&&e.jsx("div",{className:ce.tableOverflowWrapper,children:e.jsxs("table",{className:ce.tableElement,style:j?{width:`${be}px`}:void 0,id:T,children:[f&&e.jsx("caption",{className:b,children:f}),e.jsx("colgroup",{children:r.map(W=>{const{id:E,columnClassName:O}=W,A=G[E],X=j?{width:`${A}px`}:void 0;return e.jsx("col",{id:`${T}-${E}`,style:X,className:N(ce.column,O)},E)})}),!S&&e.jsx("thead",{children:e.jsx(it,{className:N(ce.headerRow,_),children:r.map((W,E)=>{const{id:O,title:A,headerCellRenderer:X,headerCellRendererClassName:ne,headerCellRendererParams:Y,headerContainerClassName:M}=W,se=e.jsx(X,{...Y,name:O,title:A,index:E,className:N(ne,ce.headerComponent)});return e.jsx(Ha,{scope:"col",name:O,onResize:v?ie:void 0,onResizeComplete:v?ae:void 0,className:N(ce.headerElement,typeof y=="function"?y(O):y,M),children:se},O)})})}),e.jsx("tbody",{children:e.jsx(Aa,{data:a,keySelector:h,columns:r,rowClassName:x,cellClassName:w,rowModifier:C})})]})}),e.jsx(Nt,{filtered:k,empty:K,errored:I,pending:p,overlayPending:!0})]})}function Ga(m){const{className:a,value:h}=m;return q(h)?null:e.jsx("div",{className:a,children:h})}const Ya="common",Ka={sortTableButtonTitle:"Sort Table"},Xa={namespace:Ya,strings:Ka},Ja="_header-cell_vn24d_1",en="_sort-button_vn24d_8",tn="_icon_vn24d_12",an="_info-popup-icon_vn24d_17",de={headerCell:Ja,sortButton:en,icon:tn,infoPopupIcon:an};function ot(m){const{className:a,titleClassName:h,title:r,name:f,sortable:g,defaultSortDirection:b="asc",infoTitle:_,infoDescription:y}=m,{sorting:x,setSorting:w}=s.useContext(St),C=rt(Xa),j=x?.name===f?x.direction:void 0,v=s.useRef(null),S=s.useCallback(()=>{if(q(w))return;let p;q(j)?p=b:j==="asc"?p="dsc":j==="dsc"&&(p="asc"),w(p?{name:f,direction:p}:void 0)},[f,w,j,b]);return e.jsxs("div",{ref:v,className:N(a,de.headerCell),children:[g&&e.jsxs(Z,{name:void 0,variant:"tertiary",onClick:S,title:C.sortTableButtonTitle,className:de.sortButton,children:[q(j)&&e.jsx(Rt,{className:de.icon}),j==="asc"&&e.jsx(Lt,{className:de.icon}),j==="dsc"&&e.jsx(kt,{className:de.icon})]}),e.jsx("div",{className:N(h,de.title),children:r}),_&&y&&e.jsx(ca,{className:de.infoPopupIcon,title:_,description:y})]})}const at={};function Q(m,a,h,r){return{id:m,title:a,columnClassName:r?.columnClassName,headerCellRenderer:ot,headerCellRendererClassName:r?.headerCellRendererClassName,headerContainerClassName:r?.headerContainerClassName,headerCellRendererParams:{sortable:r?.sortable,infoTitle:r?.headerInfoTitle,infoDescription:r?.headerInfoDescription},cellRendererClassName:r?.cellRendererClassName,cellContainerClassName:r?.cellContainerClassName,cellRenderer:Ga,cellRendererParams:(f,g)=>({value:h(g)||"--"}),valueSelector:h,valueComparator:(f,g)=>Mt(h(f),h(g)),columnWidth:r?.columnWidth,columnStretch:r?.columnStretch,columnStyle:r?.columnStyle}}function D(m,a,h,r){return{id:m,title:a,columnClassName:r?.columnClassName,headerCellRenderer:ot,headerCellRendererClassName:N(at.numberCellHeader,r?.headerCellRendererClassName),headerContainerClassName:r?.headerContainerClassName,headerCellRendererParams:{sortable:r?.sortable,infoTitle:r?.headerInfoTitle,infoDescription:r?.headerInfoDescription},cellRendererClassName:N(at.numberCell,r?.cellRendererClassName),cellContainerClassName:r?.cellContainerClassName,cellRenderer:we,cellRendererParams:(f,g)=>({value:h(g),suffix:r?.suffix,maximumFractionDigits:r?.maximumFractionDigits,invalidText:"--"}),valueSelector:h,valueComparator:(f,g)=>It(h(f),h(g)),columnWidth:r?.columnWidth,columnStretch:r?.columnStretch,columnStyle:r?.columnStyle}}const nn="_tabSelector_vlxoe_1",sn="_progressSection_vlxoe_14",rn="_progressLabel_vlxoe_20",on="_chartGrid_vlxoe_28",ln="_chartContainer_vlxoe_40",cn="_tableContainer_vlxoe_51",dn="_modelPerformance_vlxoe_59",un="_loadingContainer_vlxoe_67",mn="_errorContainer_vlxoe_77",hn="_userInteractionCards_vlxoe_96",gn="_userInteractionCard_vlxoe_96",fn="_userInteractionCardValue_vlxoe_116",vn="_userInteractionCardLabel_vlxoe_123",pn="_userInteractionCardButton_vlxoe_130",xn="_summaryStatsCards_vlxoe_148",_n="_summaryStatsCard_vlxoe_148",Cn="_summaryStatsCardValue_vlxoe_169",yn="_summaryStatsCardLabel_vlxoe_176",c={tabSelector:nn,progressSection:sn,progressLabel:rn,chartGrid:on,chartContainer:ln,tableContainer:cn,modelPerformance:dn,loadingContainer:un,errorContainer:mn,userInteractionCards:hn,userInteractionCard:gn,userInteractionCardValue:fn,userInteractionCardLabel:vn,userInteractionCardButton:pn,summaryStatsCards:xn,summaryStatsCard:_n,summaryStatsCardValue:Cn,summaryStatsCardLabel:yn};function jn(){const[m]=Dt(),[a,h]=s.useState(null),[r,f]=s.useState(!0),[g,b]=s.useState("crisis_maps"),[_,y]=s.useState([]),[x,w]=s.useState([]),[C,j]=s.useState([]),[v,S]=s.useState([]),[p,k]=s.useState(!1),[I,R]=s.useState(!1),[T,G]=s.useState(!1),[U,ie]=s.useState(!1),[ae,be]=s.useState(!1),[K,W]=s.useState(!1),E=t=>{k(t==="editTime"),R(t==="percentage"),G(t==="delete"),ie(t==="regions"),be(t==="sources"),W(t==="types")},O=[{key:"crisis_maps",label:"Crisis Maps"},{key:"drone_images",label:"Drone Images"}],A=s.useCallback((t,l)=>{if(!t||!l)return 0;const i=t.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(u=>u.length>0),n=l.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(u=>u.length>0);if(i.length===0&&n.length===0)return 1;if(i.length===0||n.length===0)return 0;const o=new Set(i),d=new Set(n),P=new Set([...o].filter(u=>d.has(u))),F=new Set([...o,...d]);return P.size/F.size},[]),X=s.useCallback(async()=>{f(!0);try{const l=await(await fetch("/api/images")).json(),i={},n=l.filter(u=>u.image_type==="crisis_map"),o=l.filter(u=>u.image_type==="drone_image"),d={totalCaptions:l.length,sources:{},types:{},regions:{},models:{},modelEditTimes:i,percentageModified:0,modelPercentageData:{},totalDeleteCount:0,deleteRate:0,crisisMaps:n,droneImages:o};l.forEach(u=>{if(u.source&&(d.sources[u.source]=(d.sources[u.source]||0)+1),u.event_type&&(d.types[u.event_type]=(d.types[u.event_type]||0)+1),u.countries&&u.countries.forEach(L=>{L.r_code&&(d.regions[L.r_code]=(d.regions[L.r_code]||0)+1)}),u.model){const L=u.model,V=d.models[L]||={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0};if(V.count++,u.accuracy!=null&&(V.avgAccuracy+=u.accuracy),u.context!=null&&(V.avgContext+=u.context),u.usability!=null&&(V.avgUsability+=u.usability),u.created_at&&u.updated_at){const te=new Date(u.created_at).getTime(),Ce=new Date(u.updated_at).getTime()-te;Ce>0&&(i[L]||(i[L]=[]),i[L].push(Ce))}}}),_.forEach(u=>{u.s_code&&!d.sources[u.s_code]&&(d.sources[u.s_code]=0)}),x.forEach(u=>{u.t_code&&!d.types[u.t_code]&&(d.types[u.t_code]=0)}),C.forEach(u=>{u.r_code&&!d.regions[u.r_code]&&(d.regions[u.r_code]=0)}),["GPT-4","Claude","Gemini","Llama","Other"].forEach(u=>{d.models[u]||(d.models[u]={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0})}),Object.values(d.models).forEach(u=>{u.count>0&&(u.avgAccuracy=Math.round(u.avgAccuracy/u.count),u.avgContext=Math.round(u.avgContext/u.count),u.avgUsability=Math.round(u.avgUsability/u.count),u.totalScore=Math.round((u.avgAccuracy+u.avgContext+u.avgUsability)/3))});const F=l.filter(u=>u.generated&&u.edited);if(F.length>0){const L=[...F.map(oe=>A(oe.generated,oe.edited))].sort((oe,Ce)=>oe-Ce),V=Math.floor(L.length/2),te=L.length%2===0?(L[V-1]+L[V])/2:L[V];d.percentageModified=Math.round((1-te)*100)}const H={};l.forEach(u=>{if(u.model&&u.generated&&u.edited){const L=A(u.generated,u.edited),V=Math.round((1-L)*100);H[u.model]||(H[u.model]=[]),H[u.model].push(V)}}),d.modelPercentageData=H;try{const u=await fetch("/api/models");if(u.ok){const L=await u.json();if(L.models){L.models.forEach(te=>{d.models[te.m_code]&&(d.models[te.m_code].deleteCount=te.delete_count||0)});const V=L.models.reduce((te,oe)=>te+(oe.delete_count||0),0);d.totalDeleteCount=V,d.deleteRate=V>0?Math.round(V/(V+l.length)*100):0}}}catch(u){console.log("Could not fetch model delete counts:",u)}h(d)}catch{h(null)}finally{f(!1)}},[_,x,C,A]),ne=s.useCallback(async()=>{try{const[t,l,i,n]=await Promise.all([fetch("/api/sources"),fetch("/api/types"),fetch("/api/regions"),fetch("/api/models")]),o=await t.json(),d=await l.json(),P=await i.json(),F=await n.json();y(o),w(d),j(P),S(F.models||[])}catch(t){console.log("Could not fetch lookup data:",t)}},[]);s.useEffect(()=>{const t=m.get("view");(t==="crisis_maps"||t==="drone_images")&&b(t)},[m]),s.useEffect(()=>{ne()},[ne]),s.useEffect(()=>{_.length>0&&x.length>0&&C.length>0&&v.length>0&&X()},[_,x,C,v,X]);const Y=s.useCallback(t=>{const l=_.find(i=>i.s_code===t);return l?l.label:t},[_]),M=s.useCallback(t=>{if(t.length===0)return 0;const l=[...t].sort((n,o)=>n-o),i=Math.floor(l.length/2);return l.length%2===0?Math.round((l[i-1]+l[i])/2):l[i]},[]),se=s.useCallback(t=>{const l=Math.floor(t/1e3),i=Math.floor(l/60),n=Math.floor(i/60);return n>0?`${n}h ${i%60}m`:i>0?`${i}m ${l%60}s`:`${l}s`},[]),_e=s.useCallback(t=>{const l=x.find(i=>i.t_code===t);return l?l.label:t},[x]),J=s.useCallback(t=>{const l=v.find(i=>i.m_code===t);return l?l.label:t},[v]),Se=s.useMemo(()=>a?Object.entries(a.modelEditTimes||{}).filter(([,t])=>t.length>0).sort(([,t],[,l])=>M(l)-M(t)).map(([t,l],i)=>({id:i+1,name:J(t),count:l.length,avgEditTime:M(l),minEditTime:Math.min(...l),maxEditTime:Math.max(...l)})):[],[a,M,J]),Me=s.useMemo(()=>a?Object.entries(a.modelPercentageData||{}).filter(([,t])=>t.length>0).sort(([,t],[,l])=>{const i=[...t].sort((H,u)=>H-u),n=[...l].sort((H,u)=>H-u),o=Math.floor(i.length/2),d=Math.floor(n.length/2),P=i.length%2===0?(i[o-1]+i[o])/2:i[o];return(n.length%2===0?(n[d-1]+n[d])/2:n[d])-P}).map(([t,l],i)=>{const n=[...l].sort((P,F)=>P-F),o=Math.floor(n.length/2),d=n.length%2===0?Math.round((n[o-1]+n[o])/2):n[o];return{id:i+1,name:J(t),count:l.length,avgPercentageModified:d,minPercentageModified:Math.min(...l),maxPercentageModified:Math.max(...l)}}):[],[a,J]),Ie=s.useMemo(()=>a?Object.entries(a.models).filter(([,t])=>t.count>0).map(([t,l],i)=>{const n=[l.avgAccuracy,l.avgContext,l.avgUsability],o=n.reduce((F,H)=>F+H,0)/n.length,d=n.reduce((F,H)=>F+Math.pow(H-o,2),0)/n.length,P=Math.round(100-Math.sqrt(d));return{id:i+1,name:J(t),consistency:Math.max(0,P),avgScore:Math.round(o),count:l.count}}).sort((t,l)=>l.consistency-t.consistency):[],[a,J]),De=s.useMemo(()=>[Q("name","Region",t=>t.name),D("count","Count",t=>t.count),D("percentage","% of Total",t=>t.percentage,{suffix:"%",maximumFractionDigits:0})],[]),Ee=s.useMemo(()=>[Q("name","Type",t=>t.name),D("count","Count",t=>t.count),D("percentage","% of Total",t=>t.percentage,{suffix:"%",maximumFractionDigits:0})],[]),lt=s.useMemo(()=>[Q("name","Source",t=>t.name),D("count","Count",t=>t.count),D("percentage","% of Total",t=>t.percentage,{suffix:"%",maximumFractionDigits:0})],[]),Te=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Count",t=>t.count),D("accuracy","Accuracy",t=>t.accuracy,{suffix:"%",maximumFractionDigits:0}),D("context","Context",t=>t.context,{suffix:"%",maximumFractionDigits:0}),D("usability","Usability",t=>t.usability,{suffix:"%",maximumFractionDigits:0}),D("totalScore","Total Score",t=>t.totalScore,{suffix:"%",maximumFractionDigits:0})],[]),ke=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Count",t=>t.count),Q("avgEditTime","Median Edit Time",t=>se(t.avgEditTime)),Q("minEditTime","Min Edit Time",t=>se(t.minEditTime)),Q("maxEditTime","Max Edit Time",t=>se(t.maxEditTime))],[se]),Le=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Count",t=>t.count),D("avgPercentageModified","Median % Modified",t=>t.avgPercentageModified,{suffix:"%",maximumFractionDigits:0}),D("minPercentageModified","Min % Modified",t=>t.minPercentageModified,{suffix:"%",maximumFractionDigits:0}),D("maxPercentageModified","Max % Modified",t=>t.maxPercentageModified,{suffix:"%",maximumFractionDigits:0})],[]),Pe=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Total Count",t=>t.count),D("deleteCount","Delete Count",t=>t.deleteCount),D("deleteRate","Delete Rate",t=>t.deleteRate,{suffix:"%",maximumFractionDigits:1})],[]),ct=s.useMemo(()=>[Q("source","Source",t=>t.source),D("avgQuality","Average Quality",t=>t.avgQuality,{suffix:"%",maximumFractionDigits:0}),D("count","Count",t=>t.count)],[]),Re=s.useMemo(()=>[Q("eventType","Event Type",t=>t.eventType),D("avgQuality","Average Quality",t=>t.avgQuality,{suffix:"%",maximumFractionDigits:0}),D("count","Count",t=>t.count)],[]),$e=s.useMemo(()=>[Q("name","Model",t=>t.name),D("consistency","Consistency",t=>t.consistency,{suffix:"%",maximumFractionDigits:0}),D("avgScore","Average Score",t=>t.avgScore,{suffix:"%",maximumFractionDigits:0}),D("count","Count",t=>t.count)],[]),ue=s.useCallback(t=>a?t==="crisis_map"?a.crisisMaps.length:t==="drone_image"?a.droneImages.length:0:0,[a]),Be=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.countries&&n.countries.forEach(o=>{o.r_code&&(i[o.r_code]=(i[o.r_code]||0)+1)})}),Object.entries(i).filter(([,n])=>n>0).map(([n,o])=>({name:C.find(d=>d.r_code===n)?.label||n,value:o}))},[a,C]),Ae=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};l.forEach(o=>{o.countries&&o.countries.forEach(d=>{d.r_code&&(i[d.r_code]=(i[d.r_code]||0)+1)})});const n=C.reduce((o,d)=>(d.r_code&&(o[d.r_code]={name:d.label,count:i[d.r_code]||0}),o),{});return Object.entries(n).sort(([,o],[,d])=>d.count-o.count).map(([,{name:o,count:d}],P)=>({id:P+1,name:o,count:d,percentage:l.length>0?Math.round(d/l.length*100):0}))},[a,C]),dt=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.source&&(i[n.source]=(i[n.source]||0)+1)}),Object.entries(i).filter(([,n])=>n>0).map(([n,o])=>({name:_.find(d=>d.s_code===n)?.label||n,value:o}))},[a,_]),ut=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.source&&(i[n.source]=(i[n.source]||0)+1)}),Object.entries(i).sort(([,n],[,o])=>o-n).map(([n,o],d)=>({id:d+1,name:Y(n),count:o,percentage:l.length>0?Math.round(o/l.length*100):0}))},[a,Y]),Fe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.event_type&&(i[n.event_type]=(i[n.event_type]||0)+1)}),Object.entries(i).filter(([,n])=>n>0).map(([n,o])=>({name:x.find(d=>d.t_code===n)?.label||n,value:o}))},[a,x]),Oe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.event_type&&(i[n.event_type]=(i[n.event_type]||0)+1)}),Object.entries(i).sort(([,n],[,o])=>o-n).map(([n,o],d)=>({id:d+1,name:_e(n),count:o,percentage:l.length>0?Math.round(o/l.length*100):0}))},[a,_e]),He=s.useCallback(t=>{if(!a)return"No data available";const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;l.forEach(d=>{d.model&&i.add(d.model)}),console.log(`Debug ${t}:`,{totalImages:l.length,usedModels:Array.from(i),availableEditTimes:Object.keys(a.modelEditTimes),modelEditTimesData:a.modelEditTimes});const o=Object.entries(a.modelEditTimes).filter(([d])=>i.has(d)).flatMap(([,d])=>d);return o.length===0?"No data available":se(M(o))},[a,se,M]),Ve=s.useCallback(()=>{if(!a)return"No data available";const t=a.totalCaptions||0,l=a.percentageModified||0;return t>0?Math.round(l/t*100):0},[a]),ze=s.useCallback(()=>a&&a.deleteRate>=0?`${a.deleteRate}%`:"No data available",[a]),Ue=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;return l.forEach(o=>{o.model&&i.add(o.model)}),Se.filter(o=>{const d=v.find(P=>P.label===o.name)?.m_code;return d&&i.has(d)})},[a,Se,v]),We=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;return l.forEach(o=>{o.model&&i.add(o.model)}),Me.filter(o=>{const d=v.find(P=>P.label===o.name)?.m_code;return d&&i.has(d)})},[a,Me,v]),Qe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.model&&(i[n.model]||(i[n.model]={count:0,deleteCount:0}),i[n.model].count++)}),Object.entries(i).map(([n,o],d)=>{const F=a.models?.[n]?.deleteCount||0,H=o.count>0?Math.round(F/o.count*100*10)/10:0;return{id:d+1,name:J(n),count:o.count,deleteCount:F,deleteRate:H}}).sort((n,o)=>o.count-n.count)},[a,J]),Ze=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.model&&(i[n.model]||(i[n.model]={count:0,totalAccuracy:0,totalContext:0,totalUsability:0}),i[n.model].count++,n.accuracy!=null&&(i[n.model].totalAccuracy+=n.accuracy),n.context!=null&&(i[n.model].totalContext+=n.context),n.usability!=null&&(i[n.model].totalUsability+=n.usability))}),Object.entries(i).map(([n,o],d)=>({id:d+1,name:J(n),count:o.count,accuracy:o.count>0?Math.round(o.totalAccuracy/o.count):0,context:o.count>0?Math.round(o.totalContext/o.count):0,usability:o.count>0?Math.round(o.totalUsability/o.count):0,totalScore:o.count>0?Math.round((o.totalAccuracy+o.totalContext+o.totalUsability)/(3*o.count)):0})).sort((n,o)=>o.totalScore-n.totalScore)},[a,J]),mt=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.source&&(i[n.source]||(i[n.source]={total:0,count:0,totalImages:0}),i[n.source].totalImages+=1,n.accuracy!=null&&(i[n.source].total+=n.accuracy,i[n.source].count+=1))}),Object.entries(i).map(([n,o],d)=>({id:d+1,source:Y(n),avgQuality:o.count>0?Math.round(o.total/o.count):0,count:o.totalImages}))},[a,Y]),qe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.event_type&&(i[n.event_type]||(i[n.event_type]={total:0,count:0,totalImages:0}),i[n.event_type].totalImages+=1,n.accuracy!=null&&(i[n.event_type].total+=n.accuracy,i[n.event_type].count+=1))}),Object.entries(i).map(([n,o],d)=>({id:d+1,eventType:_e(n),avgQuality:o.count>0?Math.round(o.total/o.count):0,count:o.totalImages}))},[a,_e]),Ge=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;return l.forEach(o=>{o.model&&i.add(o.model)}),Ie.filter(o=>{const d=v.find(P=>P.label===o.name)?.m_code;return d&&i.has(d)})},[a,Ie,v]);if(r)return e.jsx(je,{children:e.jsx("div",{className:c.loadingContainer,children:e.jsx(Et,{})})});if(!a)return e.jsx(je,{children:e.jsx("div",{className:c.errorContainer,children:e.jsx("div",{className:"text-red-500",children:"Failed to load analytics data. Please try again."})})});const me=["#F5333F","#F64752","#F75C65","#F87079","#F9858C","#FA999F","#FBADB2","#FCC2C5"];return e.jsx(je,{children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsx("div",{className:c.tabSelector,children:e.jsx(Tt,{name:"analytics-view",value:g,onChange:t=>{(t==="crisis_maps"||t==="drone_images")&&b(t)},options:O,keySelector:t=>t.key,labelSelector:t=>t.label})}),g==="crisis_maps"?e.jsxs("div",{className:c.chartGrid,children:[e.jsxs(z,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.summaryStatsCards,children:[e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:ue("crisis_map")}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Total Crisis Maps"})]}),e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:"2000"}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Target Amount"})]})]}),e.jsxs("div",{className:c.progressSection,children:[e.jsxs("div",{className:c.progressLabel,children:[e.jsx("span",{children:"Progress towards target"}),e.jsxs("span",{children:[Math.round(ue("crisis_map")/2e3*100),"%"]})]}),e.jsx(Ye,{value:ue("crisis_map"),totalValue:2e3})]})]}),e.jsxs(z,{heading:"Distribution Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Regions Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Be("crisis_map"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-regions-details",variant:U?"primary":"secondary",onClick:()=>E(U?"none":"regions"),className:c.userInteractionCardButton,children:U?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Sources Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:dt("crisis_map"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-sources-details",variant:ae?"primary":"secondary",onClick:()=>E(ae?"none":"sources"),className:c.userInteractionCardButton,children:ae?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Types Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Fe("crisis_map"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-types-details",variant:K?"primary":"secondary",onClick:()=>E(K?"none":"types"),className:c.userInteractionCardButton,children:K?"Hide Details":"View Details"})]})]}),U&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ae("crisis_map"),columns:De,keySelector:$,filtered:!1,pending:!1})}),ae&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:ut("crisis_map"),columns:lt,keySelector:$,filtered:!1,pending:!1})}),K&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Oe("crisis_map"),columns:Ee,keySelector:$,filtered:!1,pending:!1})})]}),e.jsxs(z,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:He("crisis_map")}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median Edit Time"}),e.jsx(Z,{name:"view-edit-time-details",variant:p?"primary":"secondary",onClick:()=>E(p?"none":"editTime"),className:c.userInteractionCardButton,children:p?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:Ve()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median % Modified"}),e.jsx(Z,{name:"view-percentage-details",variant:I?"primary":"secondary",onClick:()=>E(I?"none":"percentage"),className:c.userInteractionCardButton,children:I?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:ze()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Delete Rate"}),e.jsx(Z,{name:"view-delete-details",variant:T?"primary":"secondary",onClick:()=>E(T?"none":"delete"),className:c.userInteractionCardButton,children:T?"Hide Details":"View Details"})]})]}),p&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ue("crisis_map"),columns:ke,keySelector:$,filtered:!1,pending:!1})}),I&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:We("crisis_map"),columns:Le,keySelector:$,filtered:!1,pending:!1})}),T&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Qe("crisis_map"),columns:Pe,keySelector:$,filtered:!1,pending:!1})})]}),e.jsx(z,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ze("crisis_map"),columns:Te,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Quality-Source Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:mt("crisis_map"),columns:ct,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Quality-Event Type Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:qe("crisis_map"),columns:Re,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:Ge("crisis_map"),columns:$e,keySelector:$,filtered:!1,pending:!1})})})]}):e.jsxs("div",{className:c.chartGrid,children:[e.jsxs(z,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.summaryStatsCards,children:[e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:ue("drone_image")}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Total Drone Images"})]}),e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:"2000"}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Target Amount"})]})]}),e.jsxs("div",{className:c.progressSection,children:[e.jsxs("div",{className:c.progressLabel,children:[e.jsx("span",{children:"Progress towards target"}),e.jsxs("span",{children:[Math.round(ue("drone_image")/2e3*100),"%"]})]}),e.jsx(Ye,{value:ue("drone_image"),totalValue:2e3})]})]}),e.jsxs(z,{heading:"Distribution Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Regions Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Be("drone_image"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-regions-details",variant:U?"primary":"secondary",onClick:()=>E(U?"none":"regions"),className:c.userInteractionCardButton,children:U?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Types Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Fe("drone_image"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-types-details",variant:K?"primary":"secondary",onClick:()=>E(K?"none":"types"),className:c.userInteractionCardButton,children:K?"Hide Details":"View Details"})]})]}),U&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ae("drone_image"),columns:De,keySelector:$,filtered:!1,pending:!1})}),K&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Oe("drone_image"),columns:Ee,keySelector:$,filtered:!1,pending:!1})})]}),e.jsxs(z,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:He("drone_image")}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median Edit Time"}),e.jsx(Z,{name:"view-edit-time-details",variant:p?"primary":"secondary",onClick:()=>E(p?"none":"editTime"),className:c.userInteractionCardButton,children:p?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:Ve()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median % Modified"}),e.jsx(Z,{name:"view-percentage-details",variant:I?"primary":"secondary",onClick:()=>E(I?"none":"percentage"),className:c.userInteractionCardButton,children:I?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:ze()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Delete Rate"}),e.jsx(Z,{name:"view-delete-details",variant:T?"primary":"secondary",onClick:()=>E(T?"none":"delete"),className:c.userInteractionCardButton,children:T?"Hide Details":"View Details"})]})]}),p&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ue("drone_image"),columns:ke,keySelector:$,filtered:!1,pending:!1})}),I&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:We("drone_image"),columns:Le,keySelector:$,filtered:!1,pending:!1})}),T&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Qe("drone_image"),columns:Pe,keySelector:$,filtered:!1,pending:!1})})]}),e.jsx(z,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ze("drone_image"),columns:Te,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Quality-Event Type Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:qe("drone_image"),columns:Re,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:Ge("drone_image"),columns:$e,keySelector:$,filtered:!1,pending:!1})})})]})]})})}export{jn as default}; +import{r as s,y as nt,t as ht,a as q,c as gt,j as e,o as N,b as re,R as st,z,g as rt,d as ft,m as vt,e as pt,n as Z,A as xt,f as _t,h as Ct,i as yt,k as he,l as bt,p as ye,q as jt,s as Nt,E as wt,C as St,U as Mt,Q as It,u as Dt,N as je,_ as Et,L as Tt}from"./index-DuuohOak.js";const kt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("g",{clipPath:"url(#arrow-drop-down-line_svg__a)"},s.createElement("path",{d:"m12 15-4.243-4.243 1.415-1.414L12 12.172l2.828-2.83 1.415 1.415L12 15Z"})),s.createElement("defs",null,s.createElement("clipPath",{id:"arrow-drop-down-line_svg__a"},s.createElement("path",{d:"M0 0h24v24H0z"})))),Lt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("g",{clipPath:"url(#arrow-drop-up-line_svg__a)"},s.createElement("path",{d:"m12 11.828-2.828 2.829-1.415-1.414L12 9l4.243 4.243-1.415 1.414L12 11.828Z"})),s.createElement("defs",null,s.createElement("clipPath",{id:"arrow-drop-up-line_svg__a"},s.createElement("path",{d:"M0 0h24v24H0z"})))),Pt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("g",{clipPath:"url(#information-line_svg__a)"},s.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20ZM11 7h2v2h-2V7Zm0 4h2v6h-2v-6Z"})),s.createElement("defs",null,s.createElement("clipPath",{id:"information-line_svg__a"},s.createElement("path",{d:"M0 0h24v24H0z"})))),Rt=({title:m,titleId:a,...h})=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":a},h),m?s.createElement("title",{id:a},m):null,s.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"}),s.createElement("mask",{id:"table-sorting-line_svg__a",width:8,height:5,x:8,y:12,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},s.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"})),s.createElement("g",{mask:"url(#table-sorting-line_svg__a)"},s.createElement("path",{d:"M-24-22h72v72h-72z"})),s.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"}),s.createElement("mask",{id:"table-sorting-line_svg__b",width:8,height:5,x:8,y:6,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},s.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"})),s.createElement("g",{mask:"url(#table-sorting-line_svg__b)"},s.createElement("path",{d:"M48 45h-72v-72h72z"}))),$t="_number-output_1blvi_1",Bt={numberOutput:$t};function we(m){const{className:a,invalidText:h=nt,separatorHidden:r,compact:f,currency:g,value:b,tooltip:_,unit:y,prefix:x,suffix:w,maximumFractionDigits:C=1}=m,{currentLanguage:j}=s.useContext(ht),v=s.useMemo(()=>{if(q(b))return h;const S=gt(b,{currency:g,compact:f,separatorHidden:r,maximumFractionDigits:C,unit:y,language:j});return e.jsxs(e.Fragment,{children:[x,S,w]})},[h,b,f,r,g,y,C,x,j,w]);return e.jsx("div",{className:N(Bt.numberOutput,a),title:re(_)?String(_):void 0,children:v})}const At="_tooltip-dummy_rbf3f_1",Ft="_tooltip-content_rbf3f_7",Ot="_pointer_rbf3f_14",Ne={tooltipDummy:At,tooltipContent:Ft,pointer:Ot};function Ht(m){const{className:a,title:h,description:r,preferredWidth:f}=m,[g,b]=s.useState(!1),[_,y]=s.useState(!1),x=s.useRef(),w=s.useRef(null);return s.useEffect(()=>{const C=()=>{y(!0)},j=()=>{y(!1)};if(q(w.current))return;const{current:{parentNode:v}}=w;if(!q(v))return x.current=v,v.addEventListener("mouseover",C),v.addEventListener("mouseout",j),b(!0),()=>{v.removeEventListener("mouseover",C),v.removeEventListener("mouseout",j)}},[]),e.jsxs(e.Fragment,{children:[!g&&e.jsx("div",{className:Ne.tooltipDummy,ref:w}),_&&e.jsx(st,{className:N(Ne.tooltipContent,a),parentRef:x,pointerClassName:Ne.pointer,preferredWidth:f,children:e.jsx(z,{heading:h,withInternalPadding:!0,contentViewType:"vertical",children:r})})]})}function $(m){return m.id}const Vt="common",zt={booleanYesLabel:"Yes",booleanNoLabel:"No"},Ut={namespace:Vt,strings:zt},Wt="_boolean-output_kg1uq_1",Qt={booleanOutput:Wt};function Zt(m){const{className:a,invalidText:h,value:r}=m,f=rt(Ut);let g;return r===!0?g=f.booleanYesLabel:r===!1?g=f.booleanNoLabel:g=h,e.jsx("div",{className:N(Qt.booleanOutput,a),children:g})}const qt="_date-output_4jzjo_1",Gt={dateOutput:qt};function Yt(m){const{value:a,format:h,className:r,invalidText:f}=m,g=s.useMemo(()=>ft(a,h),[a,h]);return e.jsx("div",{className:N(Gt.dateOutput,r),children:g??f})}const Kt="_dropdown-menu_16hml_1",Xt="_icons_16hml_4",Jt="_content_16hml_5",ea="_actions_16hml_6",ta="_dropdown-icon_16hml_10",aa="_dropdown-content_16hml_16",le={dropdownMenu:Kt,icons:Xt,content:Jt,actions:ea,dropdownIcon:ta,dropdownContent:aa};function na(m){const a=s.useRef(null),{className:h,popupClassName:r,children:f,label:g,activeClassName:b,icons:_,variant:y="secondary",actions:x,withoutDropdownIcon:w,componentRef:C,elementRef:j=a,persistent:v,preferredPopupWidth:S}=m,p=s.useRef(null),[k,I]=s.useState(!1);s.useEffect(()=>{C&&(C.current={setShowDropdown:I})},[C,I]);const R=s.useCallback(()=>{I(ie=>!ie)},[I]),T=s.useCallback((ie,ae)=>{ae||ie&&v||I(!1)},[I,v]);vt(k,T,p,j);const G=s.useMemo(()=>({setShowDropdown:I}),[I]),U=!!x||!w;return e.jsxs(pt.Provider,{value:G,children:[e.jsx(Z,{name:void 0,className:N(le.dropdownMenu,k&&b,h),elementRef:j,onClick:R,variant:y,actionsContainerClassName:le.actions,iconsContainerClassName:le.icons,childrenContainerClassName:le.content,actions:U?e.jsxs(e.Fragment,{children:[x,!w&&(k?e.jsx(xt,{className:le.dropdownIcon}):e.jsx(_t,{className:le.dropdownIcon}))]}):void 0,icons:_,children:g}),k&&e.jsx(st,{elementRef:p,className:N(le.dropdownContent,r),parentRef:j,preferredWidth:S,children:f})]})}const sa="_info-popup_i3rna_1",ra="_label_i3rna_2",ia="_icon_i3rna_7",oa="_dropdown-container_i3rna_15",la="_content_i3rna_20",ge={infoPopup:sa,label:ra,icon:ia,dropdownContainer:oa,content:la};function ca(m){const{className:a,icon:h=e.jsx(Pt,{}),infoLabel:r,title:f,description:g,withoutIcon:b,popupClassName:_,descriptionClassName:y}=m;return e.jsx(na,{label:e.jsxs("div",{className:ge.label,children:[r,!b&&h&&e.jsx("div",{className:ge.icon,children:h})]}),popupClassName:N(ge.dropdownContainer,_),className:N(ge.infoPopup,a),variant:"tertiary",withoutDropdownIcon:!0,children:e.jsx(z,{heading:f,childrenContainerClassName:N(y,ge.content),withInternalPadding:!0,children:g})})}const da="_progress-wrapper_x340w_1",ua="_title_x340w_7",ma="_total_x340w_11",ha="_progress_x340w_1",fe={progressWrapper:da,title:ua,total:ma,progress:ha};function Ye(m){const{className:a,title:h,description:r,totalValue:f,value:g,showPercentageInTitle:b,children:_,color:y="var(--go-ui-color-primary-red)"}=m,x=re(g)?g:0,w=re(f)?f:0;let C;return w===0?C=0:C=x/w*100,e.jsxs("div",{className:N(fe.progressWrapper,a),children:[(h||b)&&e.jsxs("div",{className:fe.title,children:[h,b&&e.jsx(we,{value:C,suffix:"%"})]}),e.jsx("div",{className:fe.total,children:e.jsx("div",{className:fe.progress,style:{width:`${C}%`,backgroundColor:y}})}),r&&e.jsx("div",{className:fe.description,children:r}),_]})}const ga="_legend-element_1a9ic_1",fa="_color_1a9ic_7",va="_icon-container_1a9ic_14",pa="_icon_1a9ic_14",xa="_label_1a9ic_31",ve={legendElement:ga,color:fa,iconContainer:va,icon:pa,label:xa};function _a(m){const{className:a,colorClassName:h,iconClassName:r,color:f,label:g,iconSrc:b}=m;return e.jsxs("div",{className:N(ve.legendElement,a),children:[b?e.jsx("div",{style:{backgroundColor:f},className:ve.iconContainer,children:e.jsx("img",{className:N(ve.icon,r),src:b,alt:""})}):e.jsx("div",{style:{backgroundColor:f},className:N(ve.color,h)}),e.jsx("div",{className:ve.label,children:g})]})}const Ca="_text-output_10oza_1",ya="_with-background_10oza_6",ba="_label_10oza_11",ja="_with-colon_10oza_12",Na="_value_10oza_17",wa="_text-type_10oza_18",Sa="_strong_10oza_24",ee={textOutput:Ca,withBackground:ya,label:ba,withColon:ja,value:Na,textType:wa,strong:Sa};function Ke(m){const{className:a,label:h,icon:r,description:f,labelClassName:g,descriptionClassName:b,valueClassName:_,strongLabel:y,strongValue:x,strongDescription:w,withoutLabelColon:C,withBackground:j,invalidText:v=nt,...S}=m,{value:p}=m;let k=v;return S.valueType==="number"?k=e.jsx(we,{...S,invalidText:v}):S.valueType==="date"?k=e.jsx(Yt,{...S,invalidText:v}):S.valueType==="boolean"?k=e.jsx(Zt,{...S,invalidText:v}):p instanceof Date||(k=p||v),e.jsxs("div",{className:N(ee.textOutput,j&&ee.withBackground,a),children:[r,h&&e.jsx("div",{className:N(ee.label,y&&ee.strong,g,!C&&ee.withColon),children:h}),e.jsx("div",{className:N(ee.value,x&&ee.strong,S.valueType==="text"&&ee.textType,_),children:k}),f&&e.jsx("div",{className:N(ee.description,w&&ee.strong,b),children:f})]})}const Ma="_pie-chart_pyr7m_1",Ia="_legend_pyr7m_7",Da="_legend-item_pyr7m_13",pe={pieChart:Ma,legend:Ia,legendItem:Da},Ea=70,Ta=40;function Xe(m,a=1){return Math.round(m*10**a)/10**a}function Je(m,a){const h=(a-90)*Math.PI/180;return{x:Xe(m+m*Math.cos(h)),y:Xe(m+m*Math.sin(h))}}function ka(m,a,h){let r=h;const f=r-a===360;f&&(r-=1);const g=Je(m,a),b=Je(m,r),_=r-a<=180?0:1,y=["M",g.x,g.y,"A",m,m,0,_,1,b.x,b.y];return f?y.push("Z"):y.push("L",m,m,"L",g.x,g.y,"Z"),y.join(" ")}function xe(m){const{className:a,data:h,valueSelector:r,labelSelector:f,keySelector:g,colorSelector:b,colors:_,pieRadius:y=Ea,chartPadding:x=Ta,legendClassName:w,showPercentageInLegend:C}=m,j=Ct(h?.map(p=>r(p))),v=q(j)||j===0?1:j,S=s.useMemo(()=>{let p=0;const k=h?.map(I=>{const R=r(I);if(q(R))return;const T=360*(R/v);return p+=T,{key:g(I),value:R,label:f(I),startAngle:p-T,percentage:yt(R,v),endAngle:p,datum:I}}).filter(re)??[];return b?k.map(({datum:I,...R})=>({...R,color:b(I)})):k.map(({datum:I,...R},T)=>({...R,color:_[T%_.length]}))},[h,g,r,f,v,b,_]);return e.jsxs("div",{className:N(pe.pieChart,a),children:[e.jsx("svg",{className:pe.svg,style:{width:`${x+y*2}px`,height:`${x+y*2}px`},children:e.jsx("g",{style:{transform:`translate(${x/2}px, ${x/2}px)`},children:S.map(p=>e.jsx("path",{className:pe.path,d:ka(y,p.startAngle,p.endAngle),fill:p.color,children:e.jsx(Ht,{description:e.jsx(Ke,{label:p.label,value:p.value})})},p.key))})}),e.jsx("div",{className:N(pe.legend,w),children:S.map(p=>e.jsx(_a,{className:pe.legendItem,label:C?e.jsx(Ke,{label:p.label,value:p.percentage,valueType:"number",prefix:"(",suffix:"%)",withoutLabelColon:!0}):p.label,color:p.color},p.key))})]})}const La="_td_1k4cn_1",Pa={td:La};function Ra(m){const{className:a,children:h,...r}=m;return e.jsx("td",{className:N(a,Pa.td),...r,children:h})}function it(m){const{className:a,children:h,...r}=m;return e.jsx("tr",{className:a,...r,children:h})}const $a="_row_1829z_1",Ba="_cell_1829z_2",et={row:$a,cell:Ba};function Aa(m){const{data:a,keySelector:h,columns:r,rowClassName:f,cellClassName:g,rowModifier:b}=m;return e.jsx(e.Fragment,{children:a?.map((_,y)=>{const x=h(_,y),w=r.map(v=>{const{id:S,cellRenderer:p,cellRendererClassName:k,cellRendererParams:I,cellContainerClassName:R}=v,T=I(x,_,y,a),G=e.jsx(p,{className:k,...T,name:S});return e.jsx(Ra,{className:N(et.cell,R,typeof g=="function"?g(x,_,S):g),children:G},S)}),C=e.jsx(it,{className:N(et.row,typeof f=="function"?f(x,_):f),children:w});let j=C;return b&&(j=b({rowKey:x,row:C,cells:w,columns:r,datum:_})),e.jsx(s.Fragment,{children:j},x)})})}const Fa="_th_cdv41_1",Oa="_resize-handle_cdv41_8",tt={th:Fa,resizeHandle:Oa};function Ha(m){const{className:a,children:h,onResize:r,onResizeComplete:f,name:g,...b}=m,_=s.useRef(null),y=s.useRef(),x=s.useRef(),w=s.useRef(),C=s.useCallback(v=>{var S;if(re(y.current)&&_.current&&r){v.preventDefault(),v.stopPropagation();const p=v.clientX-y.current;if(re(x.current)){const k=x.current+p;w.current=k,r(k,g)}else x.current=(S=_.current)==null?void 0:S.offsetWidth}},[r,g]),j=s.useCallback(v=>{var S;v.preventDefault(),y.current=v.clientX,x.current=(S=_.current)==null?void 0:S.offsetWidth,window.addEventListener("mousemove",C,!0)},[C]);return s.useEffect(()=>{const v=()=>{y.current=void 0,x.current=void 0,f&&re(w.current)&&f(w.current,g),window.removeEventListener("mousemove",C,!0)};return window.addEventListener("mouseup",v,!0),()=>{window.removeEventListener("mouseup",v,!0),window.removeEventListener("mousemove",C,!0)}},[C,g,f]),e.jsxs("th",{ref:_,className:N(a,tt.th),...b,children:[r&&e.jsx("div",{role:"presentation",className:tt.resizeHandle,onMouseDown:j}),h]})}const Va="_table_nilhy_1",za="_table-overflow-wrapper_nilhy_8",Ua="_table-element_nilhy_13",Wa="_header-row_nilhy_23",Qa="_header-element_nilhy_24",Za="_header-component_nilhy_29",ce={table:Va,tableOverflowWrapper:za,tableElement:Ua,headerRow:Wa,headerElement:Qa,headerComponent:Za};function qa(m,a){return a??m.columnWidth??wt}function B(m){const{data:a,keySelector:h,columns:r,caption:f,className:g,captionClassName:b,headerRowClassName:_,headerCellClassName:y,rowClassName:x,cellClassName:w,rowModifier:C,fixedColumnWidth:j,resizableColumn:v,headersHidden:S,pending:p,filtered:k,errored:I=!1}=m,R=s.useRef(null),[T]=he.useState(()=>bt()),[G,U]=he.useState({});s.useEffect(()=>{U(W=>{if(q(R.current))return W;const E=R.current.getBoundingClientRect(),{width:O}=E;let A=r.map(M=>({id:M.id,stretch:!!M.columnStretch,width:qa(M,W[M.id])}));const X=ye(A.filter(M=>M.stretch).map(M=>M.width)),ne=ye(A.filter(M=>!M.stretch).map(M=>M.width)),Y=(O-ne)/X;return Y>1&&(A=A.map(M=>({...M,width:M.stretch?M.width*Y:M.width}))),jt(A,M=>M.id,M=>M.width)})},[r]);const ie=he.useCallback((W,E)=>{const O=document.getElementById(`${T}-${E}`),A=Math.max(W,80);if(q(O)||(O.style.width=`${A}px`,!j))return;const X=document.getElementById(T);if(q(X))return;const ne=ye(r.map(Y=>Y.id===E?A:G[Y.id]));X.style.width=`${ne}px`},[T,G,r,j]),ae=he.useCallback((W,E)=>{re(E)&&U(O=>({...O,[E]:Math.max(W,80)}))},[U]),be=he.useMemo(()=>ye(r.map(W=>G[W.id])),[G,r]),K=q(a)||a.length===0||Object.keys(G).length===0;return e.jsxs("div",{ref:R,className:N(ce.table,g),children:[!K&&e.jsx("div",{className:ce.tableOverflowWrapper,children:e.jsxs("table",{className:ce.tableElement,style:j?{width:`${be}px`}:void 0,id:T,children:[f&&e.jsx("caption",{className:b,children:f}),e.jsx("colgroup",{children:r.map(W=>{const{id:E,columnClassName:O}=W,A=G[E],X=j?{width:`${A}px`}:void 0;return e.jsx("col",{id:`${T}-${E}`,style:X,className:N(ce.column,O)},E)})}),!S&&e.jsx("thead",{children:e.jsx(it,{className:N(ce.headerRow,_),children:r.map((W,E)=>{const{id:O,title:A,headerCellRenderer:X,headerCellRendererClassName:ne,headerCellRendererParams:Y,headerContainerClassName:M}=W,se=e.jsx(X,{...Y,name:O,title:A,index:E,className:N(ne,ce.headerComponent)});return e.jsx(Ha,{scope:"col",name:O,onResize:v?ie:void 0,onResizeComplete:v?ae:void 0,className:N(ce.headerElement,typeof y=="function"?y(O):y,M),children:se},O)})})}),e.jsx("tbody",{children:e.jsx(Aa,{data:a,keySelector:h,columns:r,rowClassName:x,cellClassName:w,rowModifier:C})})]})}),e.jsx(Nt,{filtered:k,empty:K,errored:I,pending:p,overlayPending:!0})]})}function Ga(m){const{className:a,value:h}=m;return q(h)?null:e.jsx("div",{className:a,children:h})}const Ya="common",Ka={sortTableButtonTitle:"Sort Table"},Xa={namespace:Ya,strings:Ka},Ja="_header-cell_vn24d_1",en="_sort-button_vn24d_8",tn="_icon_vn24d_12",an="_info-popup-icon_vn24d_17",de={headerCell:Ja,sortButton:en,icon:tn,infoPopupIcon:an};function ot(m){const{className:a,titleClassName:h,title:r,name:f,sortable:g,defaultSortDirection:b="asc",infoTitle:_,infoDescription:y}=m,{sorting:x,setSorting:w}=s.useContext(St),C=rt(Xa),j=x?.name===f?x.direction:void 0,v=s.useRef(null),S=s.useCallback(()=>{if(q(w))return;let p;q(j)?p=b:j==="asc"?p="dsc":j==="dsc"&&(p="asc"),w(p?{name:f,direction:p}:void 0)},[f,w,j,b]);return e.jsxs("div",{ref:v,className:N(a,de.headerCell),children:[g&&e.jsxs(Z,{name:void 0,variant:"tertiary",onClick:S,title:C.sortTableButtonTitle,className:de.sortButton,children:[q(j)&&e.jsx(Rt,{className:de.icon}),j==="asc"&&e.jsx(Lt,{className:de.icon}),j==="dsc"&&e.jsx(kt,{className:de.icon})]}),e.jsx("div",{className:N(h,de.title),children:r}),_&&y&&e.jsx(ca,{className:de.infoPopupIcon,title:_,description:y})]})}const at={};function Q(m,a,h,r){return{id:m,title:a,columnClassName:r?.columnClassName,headerCellRenderer:ot,headerCellRendererClassName:r?.headerCellRendererClassName,headerContainerClassName:r?.headerContainerClassName,headerCellRendererParams:{sortable:r?.sortable,infoTitle:r?.headerInfoTitle,infoDescription:r?.headerInfoDescription},cellRendererClassName:r?.cellRendererClassName,cellContainerClassName:r?.cellContainerClassName,cellRenderer:Ga,cellRendererParams:(f,g)=>({value:h(g)||"--"}),valueSelector:h,valueComparator:(f,g)=>Mt(h(f),h(g)),columnWidth:r?.columnWidth,columnStretch:r?.columnStretch,columnStyle:r?.columnStyle}}function D(m,a,h,r){return{id:m,title:a,columnClassName:r?.columnClassName,headerCellRenderer:ot,headerCellRendererClassName:N(at.numberCellHeader,r?.headerCellRendererClassName),headerContainerClassName:r?.headerContainerClassName,headerCellRendererParams:{sortable:r?.sortable,infoTitle:r?.headerInfoTitle,infoDescription:r?.headerInfoDescription},cellRendererClassName:N(at.numberCell,r?.cellRendererClassName),cellContainerClassName:r?.cellContainerClassName,cellRenderer:we,cellRendererParams:(f,g)=>({value:h(g),suffix:r?.suffix,maximumFractionDigits:r?.maximumFractionDigits,invalidText:"--"}),valueSelector:h,valueComparator:(f,g)=>It(h(f),h(g)),columnWidth:r?.columnWidth,columnStretch:r?.columnStretch,columnStyle:r?.columnStyle}}const nn="_tabSelector_vlxoe_1",sn="_progressSection_vlxoe_14",rn="_progressLabel_vlxoe_20",on="_chartGrid_vlxoe_28",ln="_chartContainer_vlxoe_40",cn="_tableContainer_vlxoe_51",dn="_modelPerformance_vlxoe_59",un="_loadingContainer_vlxoe_67",mn="_errorContainer_vlxoe_77",hn="_userInteractionCards_vlxoe_96",gn="_userInteractionCard_vlxoe_96",fn="_userInteractionCardValue_vlxoe_116",vn="_userInteractionCardLabel_vlxoe_123",pn="_userInteractionCardButton_vlxoe_130",xn="_summaryStatsCards_vlxoe_148",_n="_summaryStatsCard_vlxoe_148",Cn="_summaryStatsCardValue_vlxoe_169",yn="_summaryStatsCardLabel_vlxoe_176",c={tabSelector:nn,progressSection:sn,progressLabel:rn,chartGrid:on,chartContainer:ln,tableContainer:cn,modelPerformance:dn,loadingContainer:un,errorContainer:mn,userInteractionCards:hn,userInteractionCard:gn,userInteractionCardValue:fn,userInteractionCardLabel:vn,userInteractionCardButton:pn,summaryStatsCards:xn,summaryStatsCard:_n,summaryStatsCardValue:Cn,summaryStatsCardLabel:yn};function jn(){const[m]=Dt(),[a,h]=s.useState(null),[r,f]=s.useState(!0),[g,b]=s.useState("crisis_maps"),[_,y]=s.useState([]),[x,w]=s.useState([]),[C,j]=s.useState([]),[v,S]=s.useState([]),[p,k]=s.useState(!1),[I,R]=s.useState(!1),[T,G]=s.useState(!1),[U,ie]=s.useState(!1),[ae,be]=s.useState(!1),[K,W]=s.useState(!1),E=t=>{k(t==="editTime"),R(t==="percentage"),G(t==="delete"),ie(t==="regions"),be(t==="sources"),W(t==="types")},O=[{key:"crisis_maps",label:"Crisis Maps"},{key:"drone_images",label:"Drone Images"}],A=s.useCallback((t,l)=>{if(!t||!l)return 0;const i=t.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(u=>u.length>0),n=l.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(u=>u.length>0);if(i.length===0&&n.length===0)return 1;if(i.length===0||n.length===0)return 0;const o=new Set(i),d=new Set(n),P=new Set([...o].filter(u=>d.has(u))),F=new Set([...o,...d]);return P.size/F.size},[]),X=s.useCallback(async()=>{f(!0);try{const l=await(await fetch("/api/images")).json(),i={},n=l.filter(u=>u.image_type==="crisis_map"),o=l.filter(u=>u.image_type==="drone_image"),d={totalCaptions:l.length,sources:{},types:{},regions:{},models:{},modelEditTimes:i,percentageModified:0,modelPercentageData:{},totalDeleteCount:0,deleteRate:0,crisisMaps:n,droneImages:o};l.forEach(u=>{if(u.source&&(d.sources[u.source]=(d.sources[u.source]||0)+1),u.event_type&&(d.types[u.event_type]=(d.types[u.event_type]||0)+1),u.countries&&u.countries.forEach(L=>{L.r_code&&(d.regions[L.r_code]=(d.regions[L.r_code]||0)+1)}),u.model){const L=u.model,V=d.models[L]||={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0};if(V.count++,u.accuracy!=null&&(V.avgAccuracy+=u.accuracy),u.context!=null&&(V.avgContext+=u.context),u.usability!=null&&(V.avgUsability+=u.usability),u.created_at&&u.updated_at){const te=new Date(u.created_at).getTime(),Ce=new Date(u.updated_at).getTime()-te;Ce>0&&(i[L]||(i[L]=[]),i[L].push(Ce))}}}),_.forEach(u=>{u.s_code&&!d.sources[u.s_code]&&(d.sources[u.s_code]=0)}),x.forEach(u=>{u.t_code&&!d.types[u.t_code]&&(d.types[u.t_code]=0)}),C.forEach(u=>{u.r_code&&!d.regions[u.r_code]&&(d.regions[u.r_code]=0)}),["GPT-4","Claude","Gemini","Llama","Other"].forEach(u=>{d.models[u]||(d.models[u]={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0})}),Object.values(d.models).forEach(u=>{u.count>0&&(u.avgAccuracy=Math.round(u.avgAccuracy/u.count),u.avgContext=Math.round(u.avgContext/u.count),u.avgUsability=Math.round(u.avgUsability/u.count),u.totalScore=Math.round((u.avgAccuracy+u.avgContext+u.avgUsability)/3))});const F=l.filter(u=>u.generated&&u.edited);if(F.length>0){const L=[...F.map(oe=>A(oe.generated,oe.edited))].sort((oe,Ce)=>oe-Ce),V=Math.floor(L.length/2),te=L.length%2===0?(L[V-1]+L[V])/2:L[V];d.percentageModified=Math.round((1-te)*100)}const H={};l.forEach(u=>{if(u.model&&u.generated&&u.edited){const L=A(u.generated,u.edited),V=Math.round((1-L)*100);H[u.model]||(H[u.model]=[]),H[u.model].push(V)}}),d.modelPercentageData=H;try{const u=await fetch("/api/models");if(u.ok){const L=await u.json();if(L.models){L.models.forEach(te=>{d.models[te.m_code]&&(d.models[te.m_code].deleteCount=te.delete_count||0)});const V=L.models.reduce((te,oe)=>te+(oe.delete_count||0),0);d.totalDeleteCount=V,d.deleteRate=V>0?Math.round(V/(V+l.length)*100):0}}}catch(u){console.log("Could not fetch model delete counts:",u)}h(d)}catch{h(null)}finally{f(!1)}},[_,x,C,A]),ne=s.useCallback(async()=>{try{const[t,l,i,n]=await Promise.all([fetch("/api/sources"),fetch("/api/types"),fetch("/api/regions"),fetch("/api/models")]),o=await t.json(),d=await l.json(),P=await i.json(),F=await n.json();y(o),w(d),j(P),S(F.models||[])}catch(t){console.log("Could not fetch lookup data:",t)}},[]);s.useEffect(()=>{const t=m.get("view");(t==="crisis_maps"||t==="drone_images")&&b(t)},[m]),s.useEffect(()=>{ne()},[ne]),s.useEffect(()=>{_.length>0&&x.length>0&&C.length>0&&v.length>0&&X()},[_,x,C,v,X]);const Y=s.useCallback(t=>{const l=_.find(i=>i.s_code===t);return l?l.label:t},[_]),M=s.useCallback(t=>{if(t.length===0)return 0;const l=[...t].sort((n,o)=>n-o),i=Math.floor(l.length/2);return l.length%2===0?Math.round((l[i-1]+l[i])/2):l[i]},[]),se=s.useCallback(t=>{const l=Math.floor(t/1e3),i=Math.floor(l/60),n=Math.floor(i/60);return n>0?`${n}h ${i%60}m`:i>0?`${i}m ${l%60}s`:`${l}s`},[]),_e=s.useCallback(t=>{const l=x.find(i=>i.t_code===t);return l?l.label:t},[x]),J=s.useCallback(t=>{const l=v.find(i=>i.m_code===t);return l?l.label:t},[v]),Se=s.useMemo(()=>a?Object.entries(a.modelEditTimes||{}).filter(([,t])=>t.length>0).sort(([,t],[,l])=>M(l)-M(t)).map(([t,l],i)=>({id:i+1,name:J(t),count:l.length,avgEditTime:M(l),minEditTime:Math.min(...l),maxEditTime:Math.max(...l)})):[],[a,M,J]),Me=s.useMemo(()=>a?Object.entries(a.modelPercentageData||{}).filter(([,t])=>t.length>0).sort(([,t],[,l])=>{const i=[...t].sort((H,u)=>H-u),n=[...l].sort((H,u)=>H-u),o=Math.floor(i.length/2),d=Math.floor(n.length/2),P=i.length%2===0?(i[o-1]+i[o])/2:i[o];return(n.length%2===0?(n[d-1]+n[d])/2:n[d])-P}).map(([t,l],i)=>{const n=[...l].sort((P,F)=>P-F),o=Math.floor(n.length/2),d=n.length%2===0?Math.round((n[o-1]+n[o])/2):n[o];return{id:i+1,name:J(t),count:l.length,avgPercentageModified:d,minPercentageModified:Math.min(...l),maxPercentageModified:Math.max(...l)}}):[],[a,J]),Ie=s.useMemo(()=>a?Object.entries(a.models).filter(([,t])=>t.count>0).map(([t,l],i)=>{const n=[l.avgAccuracy,l.avgContext,l.avgUsability],o=n.reduce((F,H)=>F+H,0)/n.length,d=n.reduce((F,H)=>F+Math.pow(H-o,2),0)/n.length,P=Math.round(100-Math.sqrt(d));return{id:i+1,name:J(t),consistency:Math.max(0,P),avgScore:Math.round(o),count:l.count}}).sort((t,l)=>l.consistency-t.consistency):[],[a,J]),De=s.useMemo(()=>[Q("name","Region",t=>t.name),D("count","Count",t=>t.count),D("percentage","% of Total",t=>t.percentage,{suffix:"%",maximumFractionDigits:0})],[]),Ee=s.useMemo(()=>[Q("name","Type",t=>t.name),D("count","Count",t=>t.count),D("percentage","% of Total",t=>t.percentage,{suffix:"%",maximumFractionDigits:0})],[]),lt=s.useMemo(()=>[Q("name","Source",t=>t.name),D("count","Count",t=>t.count),D("percentage","% of Total",t=>t.percentage,{suffix:"%",maximumFractionDigits:0})],[]),Te=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Count",t=>t.count),D("accuracy","Accuracy",t=>t.accuracy,{suffix:"%",maximumFractionDigits:0}),D("context","Context",t=>t.context,{suffix:"%",maximumFractionDigits:0}),D("usability","Usability",t=>t.usability,{suffix:"%",maximumFractionDigits:0}),D("totalScore","Total Score",t=>t.totalScore,{suffix:"%",maximumFractionDigits:0})],[]),ke=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Count",t=>t.count),Q("avgEditTime","Median Edit Time",t=>se(t.avgEditTime)),Q("minEditTime","Min Edit Time",t=>se(t.minEditTime)),Q("maxEditTime","Max Edit Time",t=>se(t.maxEditTime))],[se]),Le=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Count",t=>t.count),D("avgPercentageModified","Median % Modified",t=>t.avgPercentageModified,{suffix:"%",maximumFractionDigits:0}),D("minPercentageModified","Min % Modified",t=>t.minPercentageModified,{suffix:"%",maximumFractionDigits:0}),D("maxPercentageModified","Max % Modified",t=>t.maxPercentageModified,{suffix:"%",maximumFractionDigits:0})],[]),Pe=s.useMemo(()=>[Q("name","Model",t=>t.name),D("count","Total Count",t=>t.count),D("deleteCount","Delete Count",t=>t.deleteCount),D("deleteRate","Delete Rate",t=>t.deleteRate,{suffix:"%",maximumFractionDigits:1})],[]),ct=s.useMemo(()=>[Q("source","Source",t=>t.source),D("avgQuality","Average Quality",t=>t.avgQuality,{suffix:"%",maximumFractionDigits:0}),D("count","Count",t=>t.count)],[]),Re=s.useMemo(()=>[Q("eventType","Event Type",t=>t.eventType),D("avgQuality","Average Quality",t=>t.avgQuality,{suffix:"%",maximumFractionDigits:0}),D("count","Count",t=>t.count)],[]),$e=s.useMemo(()=>[Q("name","Model",t=>t.name),D("consistency","Consistency",t=>t.consistency,{suffix:"%",maximumFractionDigits:0}),D("avgScore","Average Score",t=>t.avgScore,{suffix:"%",maximumFractionDigits:0}),D("count","Count",t=>t.count)],[]),ue=s.useCallback(t=>a?t==="crisis_map"?a.crisisMaps.length:t==="drone_image"?a.droneImages.length:0:0,[a]),Be=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.countries&&n.countries.forEach(o=>{o.r_code&&(i[o.r_code]=(i[o.r_code]||0)+1)})}),Object.entries(i).filter(([,n])=>n>0).map(([n,o])=>({name:C.find(d=>d.r_code===n)?.label||n,value:o}))},[a,C]),Ae=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};l.forEach(o=>{o.countries&&o.countries.forEach(d=>{d.r_code&&(i[d.r_code]=(i[d.r_code]||0)+1)})});const n=C.reduce((o,d)=>(d.r_code&&(o[d.r_code]={name:d.label,count:i[d.r_code]||0}),o),{});return Object.entries(n).sort(([,o],[,d])=>d.count-o.count).map(([,{name:o,count:d}],P)=>({id:P+1,name:o,count:d,percentage:l.length>0?Math.round(d/l.length*100):0}))},[a,C]),dt=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.source&&(i[n.source]=(i[n.source]||0)+1)}),Object.entries(i).filter(([,n])=>n>0).map(([n,o])=>({name:_.find(d=>d.s_code===n)?.label||n,value:o}))},[a,_]),ut=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.source&&(i[n.source]=(i[n.source]||0)+1)}),Object.entries(i).sort(([,n],[,o])=>o-n).map(([n,o],d)=>({id:d+1,name:Y(n),count:o,percentage:l.length>0?Math.round(o/l.length*100):0}))},[a,Y]),Fe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.event_type&&(i[n.event_type]=(i[n.event_type]||0)+1)}),Object.entries(i).filter(([,n])=>n>0).map(([n,o])=>({name:x.find(d=>d.t_code===n)?.label||n,value:o}))},[a,x]),Oe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.event_type&&(i[n.event_type]=(i[n.event_type]||0)+1)}),Object.entries(i).sort(([,n],[,o])=>o-n).map(([n,o],d)=>({id:d+1,name:_e(n),count:o,percentage:l.length>0?Math.round(o/l.length*100):0}))},[a,_e]),He=s.useCallback(t=>{if(!a)return"No data available";const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;l.forEach(d=>{d.model&&i.add(d.model)}),console.log(`Debug ${t}:`,{totalImages:l.length,usedModels:Array.from(i),availableEditTimes:Object.keys(a.modelEditTimes),modelEditTimesData:a.modelEditTimes});const o=Object.entries(a.modelEditTimes).filter(([d])=>i.has(d)).flatMap(([,d])=>d);return o.length===0?"No data available":se(M(o))},[a,se,M]),Ve=s.useCallback(()=>{if(!a)return"No data available";const t=a.totalCaptions||0,l=a.percentageModified||0;return t>0?Math.round(l/t*100):0},[a]),ze=s.useCallback(()=>a&&a.deleteRate>=0?`${a.deleteRate}%`:"No data available",[a]),Ue=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;return l.forEach(o=>{o.model&&i.add(o.model)}),Se.filter(o=>{const d=v.find(P=>P.label===o.name)?.m_code;return d&&i.has(d)})},[a,Se,v]),We=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;return l.forEach(o=>{o.model&&i.add(o.model)}),Me.filter(o=>{const d=v.find(P=>P.label===o.name)?.m_code;return d&&i.has(d)})},[a,Me,v]),Qe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.model&&(i[n.model]||(i[n.model]={count:0,deleteCount:0}),i[n.model].count++)}),Object.entries(i).map(([n,o],d)=>{const F=a.models?.[n]?.deleteCount||0,H=o.count>0?Math.round(F/o.count*100*10)/10:0;return{id:d+1,name:J(n),count:o.count,deleteCount:F,deleteRate:H}}).sort((n,o)=>o.count-n.count)},[a,J]),Ze=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.model&&(i[n.model]||(i[n.model]={count:0,totalAccuracy:0,totalContext:0,totalUsability:0}),i[n.model].count++,n.accuracy!=null&&(i[n.model].totalAccuracy+=n.accuracy),n.context!=null&&(i[n.model].totalContext+=n.context),n.usability!=null&&(i[n.model].totalUsability+=n.usability))}),Object.entries(i).map(([n,o],d)=>({id:d+1,name:J(n),count:o.count,accuracy:o.count>0?Math.round(o.totalAccuracy/o.count):0,context:o.count>0?Math.round(o.totalContext/o.count):0,usability:o.count>0?Math.round(o.totalUsability/o.count):0,totalScore:o.count>0?Math.round((o.totalAccuracy+o.totalContext+o.totalUsability)/(3*o.count)):0})).sort((n,o)=>o.totalScore-n.totalScore)},[a,J]),mt=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.source&&(i[n.source]||(i[n.source]={total:0,count:0,totalImages:0}),i[n.source].totalImages+=1,n.accuracy!=null&&(i[n.source].total+=n.accuracy,i[n.source].count+=1))}),Object.entries(i).map(([n,o],d)=>({id:d+1,source:Y(n),avgQuality:o.count>0?Math.round(o.total/o.count):0,count:o.totalImages}))},[a,Y]),qe=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i={};return l.forEach(n=>{n.event_type&&(i[n.event_type]||(i[n.event_type]={total:0,count:0,totalImages:0}),i[n.event_type].totalImages+=1,n.accuracy!=null&&(i[n.event_type].total+=n.accuracy,i[n.event_type].count+=1))}),Object.entries(i).map(([n,o],d)=>({id:d+1,eventType:_e(n),avgQuality:o.count>0?Math.round(o.total/o.count):0,count:o.totalImages}))},[a,_e]),Ge=s.useCallback(t=>{if(!a)return[];const l=t==="crisis_map"?a.crisisMaps:a.droneImages,i=new Set;return l.forEach(o=>{o.model&&i.add(o.model)}),Ie.filter(o=>{const d=v.find(P=>P.label===o.name)?.m_code;return d&&i.has(d)})},[a,Ie,v]);if(r)return e.jsx(je,{children:e.jsx("div",{className:c.loadingContainer,children:e.jsx(Et,{})})});if(!a)return e.jsx(je,{children:e.jsx("div",{className:c.errorContainer,children:e.jsx("div",{className:"text-red-500",children:"Failed to load analytics data. Please try again."})})});const me=["#F5333F","#F64752","#F75C65","#F87079","#F9858C","#FA999F","#FBADB2","#FCC2C5"];return e.jsx(je,{children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsx("div",{className:c.tabSelector,children:e.jsx(Tt,{name:"analytics-view",value:g,onChange:t=>{(t==="crisis_maps"||t==="drone_images")&&b(t)},options:O,keySelector:t=>t.key,labelSelector:t=>t.label})}),g==="crisis_maps"?e.jsxs("div",{className:c.chartGrid,children:[e.jsxs(z,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.summaryStatsCards,children:[e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:ue("crisis_map")}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Total Crisis Maps"})]}),e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:"2000"}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Target Amount"})]})]}),e.jsxs("div",{className:c.progressSection,children:[e.jsxs("div",{className:c.progressLabel,children:[e.jsx("span",{children:"Progress towards target"}),e.jsxs("span",{children:[Math.round(ue("crisis_map")/2e3*100),"%"]})]}),e.jsx(Ye,{value:ue("crisis_map"),totalValue:2e3})]})]}),e.jsxs(z,{heading:"Distribution Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Regions Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Be("crisis_map"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-regions-details",variant:U?"primary":"secondary",onClick:()=>E(U?"none":"regions"),className:c.userInteractionCardButton,children:U?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Sources Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:dt("crisis_map"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-sources-details",variant:ae?"primary":"secondary",onClick:()=>E(ae?"none":"sources"),className:c.userInteractionCardButton,children:ae?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Types Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Fe("crisis_map"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-types-details",variant:K?"primary":"secondary",onClick:()=>E(K?"none":"types"),className:c.userInteractionCardButton,children:K?"Hide Details":"View Details"})]})]}),U&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ae("crisis_map"),columns:De,keySelector:$,filtered:!1,pending:!1})}),ae&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:ut("crisis_map"),columns:lt,keySelector:$,filtered:!1,pending:!1})}),K&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Oe("crisis_map"),columns:Ee,keySelector:$,filtered:!1,pending:!1})})]}),e.jsxs(z,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:He("crisis_map")}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median Edit Time"}),e.jsx(Z,{name:"view-edit-time-details",variant:p?"primary":"secondary",onClick:()=>E(p?"none":"editTime"),className:c.userInteractionCardButton,children:p?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:Ve()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median % Modified"}),e.jsx(Z,{name:"view-percentage-details",variant:I?"primary":"secondary",onClick:()=>E(I?"none":"percentage"),className:c.userInteractionCardButton,children:I?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:ze()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Delete Rate"}),e.jsx(Z,{name:"view-delete-details",variant:T?"primary":"secondary",onClick:()=>E(T?"none":"delete"),className:c.userInteractionCardButton,children:T?"Hide Details":"View Details"})]})]}),p&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ue("crisis_map"),columns:ke,keySelector:$,filtered:!1,pending:!1})}),I&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:We("crisis_map"),columns:Le,keySelector:$,filtered:!1,pending:!1})}),T&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Qe("crisis_map"),columns:Pe,keySelector:$,filtered:!1,pending:!1})})]}),e.jsx(z,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ze("crisis_map"),columns:Te,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Quality-Source Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:mt("crisis_map"),columns:ct,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Quality-Event Type Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:qe("crisis_map"),columns:Re,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:Ge("crisis_map"),columns:$e,keySelector:$,filtered:!1,pending:!1})})})]}):e.jsxs("div",{className:c.chartGrid,children:[e.jsxs(z,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.summaryStatsCards,children:[e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:ue("drone_image")}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Total Drone Images"})]}),e.jsxs("div",{className:c.summaryStatsCard,children:[e.jsx("div",{className:c.summaryStatsCardValue,children:"2000"}),e.jsx("div",{className:c.summaryStatsCardLabel,children:"Target Amount"})]})]}),e.jsxs("div",{className:c.progressSection,children:[e.jsxs("div",{className:c.progressLabel,children:[e.jsx("span",{children:"Progress towards target"}),e.jsxs("span",{children:[Math.round(ue("drone_image")/2e3*100),"%"]})]}),e.jsx(Ye,{value:ue("drone_image"),totalValue:2e3})]})]}),e.jsxs(z,{heading:"Distribution Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Regions Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Be("drone_image"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-regions-details",variant:U?"primary":"secondary",onClick:()=>E(U?"none":"regions"),className:c.userInteractionCardButton,children:U?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardLabel,children:"Types Distribution"}),e.jsx("div",{className:c.chartContainer,children:e.jsx(xe,{data:Fe("drone_image"),valueSelector:t=>t.value,labelSelector:t=>t.name,keySelector:t=>t.name,colors:me,showPercentageInLegend:!0})}),e.jsx(Z,{name:"view-types-details",variant:K?"primary":"secondary",onClick:()=>E(K?"none":"types"),className:c.userInteractionCardButton,children:K?"Hide Details":"View Details"})]})]}),U&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ae("drone_image"),columns:De,keySelector:$,filtered:!1,pending:!1})}),K&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Oe("drone_image"),columns:Ee,keySelector:$,filtered:!1,pending:!1})})]}),e.jsxs(z,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsxs("div",{className:c.userInteractionCards,children:[e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:He("drone_image")}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median Edit Time"}),e.jsx(Z,{name:"view-edit-time-details",variant:p?"primary":"secondary",onClick:()=>E(p?"none":"editTime"),className:c.userInteractionCardButton,children:p?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:Ve()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Median % Modified"}),e.jsx(Z,{name:"view-percentage-details",variant:I?"primary":"secondary",onClick:()=>E(I?"none":"percentage"),className:c.userInteractionCardButton,children:I?"Hide Details":"View Details"})]}),e.jsxs("div",{className:c.userInteractionCard,children:[e.jsx("div",{className:c.userInteractionCardValue,children:ze()}),e.jsx("div",{className:c.userInteractionCardLabel,children:"Delete Rate"}),e.jsx(Z,{name:"view-delete-details",variant:T?"primary":"secondary",onClick:()=>E(T?"none":"delete"),className:c.userInteractionCardButton,children:T?"Hide Details":"View Details"})]})]}),p&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ue("drone_image"),columns:ke,keySelector:$,filtered:!1,pending:!1})}),I&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:We("drone_image"),columns:Le,keySelector:$,filtered:!1,pending:!1})}),T&&e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Qe("drone_image"),columns:Pe,keySelector:$,filtered:!1,pending:!1})})]}),e.jsx(z,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.modelPerformance,children:e.jsx(B,{data:Ze("drone_image"),columns:Te,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Quality-Event Type Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:qe("drone_image"),columns:Re,keySelector:$,filtered:!1,pending:!1})})}),e.jsx(z,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsx("div",{className:c.tableContainer,children:e.jsx(B,{data:Ge("drone_image"),columns:$e,keySelector:$,filtered:!1,pending:!1})})})]})]})})}export{jn as default}; diff --git a/py_backend/static/assets/index-BTevbmbp.js b/py_backend/static/assets/index-Ccygiftu.js similarity index 99% rename from py_backend/static/assets/index-BTevbmbp.js rename to py_backend/static/assets/index-Ccygiftu.js index 9d2651741e6f67e38aa3b69dba1d7ddba55cd37d..9b2e064d927babf089c51b9e14cd3be52a443db2 100644 --- a/py_backend/static/assets/index-BTevbmbp.js +++ b/py_backend/static/assets/index-Ccygiftu.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-zGid42TK.js","assets/index-w0OOMPwN.js","assets/index-cCOeofBN.css"])))=>i.map(i=>d[i]); -import{K as ea,x as aa,r as d,D as ta,j as a,N as ee,n as M,_ as we,L as sa,z as E,v as ne,w as oe,F as ia,M as na,G as oa}from"./index-w0OOMPwN.js";import{u as ra}from"./useAdmin-avReXN15.js";import{F as la,E as ca}from"./ExportModal-C5df6JIW.js";const da="_tabSelector_usssr_1",ga="_imageContainer_usssr_12",ma="_imagePlaceholder_usssr_33",ua="_metadataTags_usssr_45",pa="_metadataTag_usssr_45",fa="_captionContainer_usssr_67",_a="_captionText_usssr_74",ha="_gridLayout_usssr_131",xa="_detailsSection_usssr_155",ya="_loadingContainer_usssr_161",va="_errorContainer_usssr_171",ja="_fullSizeModalOverlay_usssr_205",wa="_fullSizeModalContent_usssr_219",Ia="_ratingWarningContent_usssr_230",Na="_ratingWarningTitle_usssr_236",Ca="_ratingWarningText_usssr_243",ba="_ratingWarningButtons_usssr_250",Sa="_carouselContainer_usssr_365",ka="_carouselImageWrapper_usssr_370",Da="_carouselImage_usssr_370",La="_carouselNavigation_usssr_393",Ma="_carouselButton_usssr_405",Fa="_carouselIndicators_usssr_429",Ta="_carouselIndicator_usssr_429",Ea="_carouselIndicatorActive_usssr_458",$a="_singleImageContainer_usssr_488",Pa="_viewImageButtonContainer_usssr_494",g={tabSelector:da,imageContainer:ga,imagePlaceholder:ma,metadataTags:ua,metadataTag:pa,captionContainer:fa,captionText:_a,gridLayout:ha,detailsSection:xa,loadingContainer:ya,errorContainer:va,fullSizeModalOverlay:ja,fullSizeModalContent:wa,ratingWarningContent:Ia,ratingWarningTitle:Na,ratingWarningText:Ca,ratingWarningButtons:ba,carouselContainer:Sa,carouselImageWrapper:ka,carouselImage:Da,carouselNavigation:La,carouselButton:Ma,carouselIndicators:Fa,carouselIndicator:Ta,carouselIndicatorActive:Ea,singleImageContainer:$a,viewImageButtonContainer:Pa};function st(){const{mapId:u}=ea(),x=aa(),{isAuthenticated:re}=ra(),[le,Ie]=d.useState("mapDetails"),[e,ae]=d.useState(null),[z,R]=d.useState(!0),[ce,O]=d.useState(null),[de,Ne]=d.useState([]),[ge,Ce]=d.useState([]),[me,be]=d.useState([]),[ue,Se]=d.useState([]),[ke,De]=d.useState([]),[Le,Me]=d.useState(!1),[Fe,Te]=d.useState(!1),[W,q]=d.useState(!1),[Ee,K]=d.useState(!1),[pe,Z]=d.useState(!1),[$e,te]=d.useState(!1),[Pe,se]=d.useState(!1),[Ra,Aa]=d.useState("standard"),[$,za]=d.useState(80),[J,Oa]=d.useState(10),[Ua,Ba]=d.useState(10),[Wa,Ja]=d.useState(!0),[Va,Ga]=d.useState(!0),[U,Q]=d.useState(!1),[Re,fe]=d.useState(!1),[Ae,_e]=d.useState(null),[ze,V]=d.useState(!1),[h,G]=d.useState([]),[k,A]=d.useState(0),[H,he]=d.useState(!1),{search:p,setSearch:Ha,srcFilter:y,setSrcFilter:qa,catFilter:v,setCatFilter:Ka,regionFilter:j,setRegionFilter:Za,countryFilter:w,setCountryFilter:Qa,imageTypeFilter:I,setImageTypeFilter:Xa,uploadTypeFilter:N,setUploadTypeFilter:Ya,showReferenceExamples:b,setShowReferenceExamples:Oe,clearAllFilters:Ue}=ta(),Be=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],X=d.useCallback(async t=>{if(!(!t||t==="undefined"||t==="null"||t.trim()===""))try{const s=new URLSearchParams;p&&s.append("search",p),y&&s.append("source",y),v&&s.append("event_type",v),j&&s.append("region",j),w&&s.append("country",w),I&&s.append("image_type",I),N&&s.append("upload_type",N),b&&s.append("starred_only","true");const l=await fetch(`/api/images/grouped?${s.toString()}`);if(l.ok){const i=await l.json();console.log("Server response for upload_type=multiple:",{url:`/api/images/grouped?${s.toString()}`,count:i.length,images:i.map(r=>({image_id:r.image_id,image_count:r.image_count,all_image_ids:r.all_image_ids,all_image_ids_length:r.all_image_ids?.length}))});const n=i.findIndex(r=>r.image_id===t);console.log("Navigation availability check (server-side):",{filteredImagesCount:i.length,currentIndex:n,currentId:t,uploadTypeFilter:N,hasPrevious:i.length>1&&n>0,hasNext:i.length>1&&n({image_id:r.image_id,image_count:r.image_count,all_image_ids:r.all_image_ids,image_type:r.image_type}))}),Me(i.length>1&&n>0),Te(i.length>1&&n{console.log("fetchAllImages called with imageIds:",t),he(!0);try{const s=t.map(async i=>{const n=await fetch(`/api/images/${i}`);if(!n.ok)throw new Error(`Failed to fetch image ${i}`);return n.json()}),l=await Promise.all(s);G(l),A(0),console.log("fetchAllImages: Loaded",l.length,"images")}catch(s){console.error("fetchAllImages error:",s),O(s instanceof Error?s.message:"Failed to load all images")}finally{he(!1)}},[]),xe=d.useCallback(async t=>{if(console.log("fetchMapData called with id:",t),console.log("fetchMapData id type:",typeof t),!t||t==="undefined"||t==="null"||t.trim()===""){console.log("fetchMapData: Invalid ID detected:",t),O("Invalid Map ID"),R(!1);return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)){console.log("fetchMapData: Invalid UUID format:",t),O("Invalid Map ID format"),R(!1);return}console.log("fetchMapData: Making API call for id:",t),q(!0),R(!0);try{const l=await fetch(`/api/images/${t}`);if(!l.ok)throw new Error("Map not found");const i=await l.json();if(ae(i),i.all_image_ids&&i.all_image_ids.length>1)await ie(i.all_image_ids);else if(i.image_count&&i.image_count>1){console.log("Multi-upload detected but no all_image_ids, trying grouped endpoint");try{const n=await fetch("/api/images/grouped");if(n.ok){const o=(await n.json()).find(m=>m.all_image_ids&&m.all_image_ids.includes(i.image_id));o&&o.all_image_ids?await ie(o.all_image_ids):(G([i]),A(0))}else G([i]),A(0)}catch(n){console.error("Failed to fetch from grouped endpoint:",n),G([i]),A(0)}}else G([i]),A(0);await X(t)}catch(l){O(l instanceof Error?l.message:"Unknown error occurred")}finally{R(!1),q(!1)}},[X,ie]),We=d.useCallback(()=>{h.length>1&&A(t=>t>0?t-1:h.length-1)},[h.length]),Je=d.useCallback(()=>{h.length>1&&A(t=>t{t>=0&&t{const s=t||(h.length>0?h[k]:e);if(s){V(!0),_e(s),fe(!0);try{const l=new Image;l.onload=()=>{V(!1)},l.onerror=()=>{V(!1)},l.src=s.image_url}catch(l){console.error("Error preloading full-size image:",l),V(!1)}}},[h,k,e]),Ge=d.useCallback(()=>{fe(!1),_e(null),V(!1)},[]);d.useEffect(()=>{if(console.log("MapDetailsPage: mapId from useParams:",u),console.log("MapDetailsPage: mapId type:",typeof u),console.log("MapDetailsPage: mapId value:",u),!u||u==="undefined"||u==="null"||u.trim()===""||u===void 0||u===null){console.log("MapDetailsPage: Invalid mapId, setting error"),O("Map ID is required"),R(!1);return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(u)){console.log("MapDetailsPage: Invalid UUID format:",u),O("Invalid Map ID format"),R(!1);return}console.log("MapDetailsPage: Fetching data for mapId:",u),xe(u)},[u,xe]),d.useEffect(()=>{if(!e||z||U)return;if(!u||u==="undefined"||u==="null"||u.trim()===""){console.log("Auto-navigation skipped: Invalid mapId");return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(u)){console.log("Auto-navigation skipped: Invalid mapId format");return}(()=>{const l=!p||e.title?.toLowerCase().includes(p.toLowerCase())||e.generated?.toLowerCase().includes(p.toLowerCase())||e.source?.toLowerCase().includes(p.toLowerCase())||e.event_type?.toLowerCase().includes(p.toLowerCase()),i=!y||e.source===y,n=!v||e.event_type===v,r=!j||e.countries.some(P=>P.r_code===j),o=!w||e.countries.some(P=>P.c_code===w),m=!I||e.image_type===I,_=!b||e.starred===!0,D=l&&i&&n&&r&&o&&m&&_;return console.log("Auto-navigation check:",{mapId:u,search:p,srcFilter:y,catFilter:v,regionFilter:j,countryFilter:w,imageTypeFilter:I,showReferenceExamples:b,matchesSearch:l,matchesSource:i,matchesCategory:n,matchesRegion:r,matchesCountry:o,matchesImageType:m,matchesReferenceExamples:_,matches:D}),D})()||(console.log("Current map does not match filters, looking for first matching item"),fetch("/api/images").then(l=>l.json()).then(l=>{console.log("Auto-navigation: Received images from API:",l.length),console.log("Auto-navigation: First few images:",l.slice(0,3).map(n=>({image_id:n.image_id,title:n.title})));const i=l.find(n=>{const r=!p||n.title?.toLowerCase().includes(p.toLowerCase())||n.generated?.toLowerCase().includes(p.toLowerCase())||n.source?.toLowerCase().includes(p.toLowerCase())||n.event_type?.toLowerCase().includes(p.toLowerCase()),o=!y||n.source===y,m=!v||n.event_type===v,_=!j||n.countries?.some(f=>f.r_code===j),D=!w||n.countries?.some(f=>f.c_code===w),P=!I||n.image_type===I,F=!b||n.starred===!0;return r&&o&&m&&_&&D&&P&&F});console.log("Auto-navigation: Found first matching image:",i?{image_id:i.image_id,title:i.title,source:i.source}:"No matching image found"),i&&i.image_id&&i.image_id!=="undefined"&&i.image_id!=="null"&&i.image_id.trim()!==""&&i.image_id!==u&&(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(i.image_id)?(console.log("Auto-navigating to:",i.image_id),x(`/map/${i.image_id}`)):console.error("Auto-navigation blocked: Invalid image_id format:",i.image_id))}).catch(console.error))},[e,p,y,v,j,w,I,b,u,x,z,U]);const ve=async t=>{if(!W){q(!0);try{const s=new URLSearchParams;p&&s.append("search",p),y&&s.append("source",y),v&&s.append("event_type",v),j&&s.append("region",j),w&&s.append("country",w),I&&s.append("image_type",I),N&&s.append("upload_type",N),b&&s.append("starred_only","true");const l=await fetch(`/api/images/grouped?${s.toString()}`);if(l.ok){const i=await l.json(),n=i.findIndex(m=>m.image_id===u);if(n===-1){console.error("Current image not found in filtered list");return}let r;t==="previous"?r=n>0?n-1:i.length-1:r=n{console.log("=== NAVIGATION USEEFFECT TRIGGERED ==="),console.log("Navigation useEffect triggered:",{map:!!e,mapId:u,loading:z,isDeleting:U,uploadTypeFilter:N,allFilters:{search:p,srcFilter:y,catFilter:v,regionFilter:j,countryFilter:w,imageTypeFilter:I,uploadTypeFilter:N,showReferenceExamples:b}}),e&&u&&!z&&!U?(console.log("Calling checkNavigationAvailability with:",u),X(u)):console.log("NOT calling checkNavigationAvailability because:",{map:!!e,mapId:!!u,loading:z,isDeleting:U})},[e,u,p,y,v,j,w,I,N,b,z,U,X]),d.useEffect(()=>{Promise.all([fetch("/api/sources").then(t=>t.json()),fetch("/api/types").then(t=>t.json()),fetch("/api/image-types").then(t=>t.json()),fetch("/api/regions").then(t=>t.json()),fetch("/api/countries").then(t=>t.json())]).then(([t,s,l,i,n])=>{Ne(t),Ce(s),be(l),Se(i),De(n)}).catch(console.error)},[]);const He=async()=>{e&&K(!0)},qe=async()=>{if(e)try{(await fetch(`/api/images/${e.image_id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({starred:!e.starred})})).ok?ae(s=>s?{...s,starred:!s.starred}:null):console.error("Failed to toggle starred status")}catch(t){console.error("Error toggling starred status:",t)}},Ke=async()=>{if(e){Q(!0);try{if(console.log("Deleting image with ID:",e.image_id),(await fetch(`/api/images/${e.image_id}`,{method:"DELETE"})).ok){ae(s=>s?{...s,starred:!s.starred}:null),K(!1);try{const s=await fetch("/api/images/grouped");if(s.ok){const i=(await s.json()).filter(r=>{const o=!p||r.title?.toLowerCase().includes(p.toLowerCase())||r.generated?.toLowerCase().includes(p.toLowerCase())||r.source?.toLowerCase().includes(p.toLowerCase())||r.event_type?.toLowerCase().includes(p.toLowerCase()),m=!y||r.source===y,_=!v||r.event_type===v,D=!j||r.countries?.some(C=>C.r_code===j),P=!w||r.countries?.some(C=>C.c_code===w),F=!I||r.image_type===I,f=!N||N==="single"&&(!r.image_count||r.image_count<=1)||N==="multiple"&&r.image_count&&r.image_count>1,L=!b||r.starred===!0;return o&&m&&_&&D&&P&&F&&f&&L}),n=i.filter(r=>r.image_id!==e.image_id);if(n.length>0){const r=i.findIndex(m=>m.image_id===e.image_id);let o;if(r===i.length-1?o=r-1:o=r,console.log("Navigation target:",{currentIndex:r,targetIndex:o,targetId:n[o]?.image_id}),o>=0&&o{R(!0);try{const t=new URLSearchParams;p&&t.append("search",p),y&&t.append("source",y),v&&t.append("event_type",v),j&&t.append("region",j),w&&t.append("country",w),I&&t.append("image_type",I),N&&t.append("upload_type",N),b&&t.append("starred_only","true");const s=await fetch(`/api/images/grouped?${t.toString()}`);if(s.ok){const l=await s.json();if(l.length>0){const i=l[0];i&&i.image_id&&x(`/map/${i.image_id}`)}else x("/explore")}}catch(t){console.error("Failed to navigate to matching image:",t),x("/explore")}finally{R(!1)}},[p,y,v,j,w,I,N,b,x]),c=d.useMemo(()=>{if(!e)return null;if(!p&&!y&&!v&&!j&&!w&&!I&&!N&&!b)return e;const t=!p||e.title?.toLowerCase().includes(p.toLowerCase())||e.generated?.toLowerCase().includes(p.toLowerCase())||e.source?.toLowerCase().includes(p.toLowerCase())||e.event_type?.toLowerCase().includes(p.toLowerCase()),s=!y||e.source===y,l=!v||e.event_type===v,i=!j||e.countries.some(D=>D.r_code===j),n=!w||e.countries.some(D=>D.c_code===w),r=!I||e.image_type===I,o=!N||N==="single"&&(!e.image_count||e.image_count<=1)&&(!e.all_image_ids||e.all_image_ids.length<=1)||N==="multiple"&&(e.image_count&&e.image_count>1||e.all_image_ids&&e.all_image_ids.length>1),m=!b||e.starred===!0,_=t&&s&&l&&i&&n&&r&&o&&m;return!_&&(p||y||v||j||w||I||N||b)?(setTimeout(()=>{je()},100),e):_?e:null},[e,p,y,v,j,w,I,N,b,je]),Ze=()=>{if(!e)return;if(!e.all_image_ids||e.all_image_ids.length<=1){const i=`/upload?step=1&contribute=true&imageIds=${[e.image_id].join(",")}`;x(i);return}const s=`/upload?step=1&contribute=true&imageIds=${e.all_image_ids.join(",")}`;x(s)},T=(t,s)=>({image:`images/${s}`,caption:t.edited||t.generated||"",metadata:{image_id:t.image_count&&t.image_count>1?t.all_image_ids||[t.image_id]:t.image_id,title:t.title,source:t.source,event_type:t.event_type,image_type:t.image_type,countries:t.countries,starred:t.starred,image_count:t.image_count||1}}),Qe=async t=>{if(e){te(!0),se(!1);try{const s=(await oa(async()=>{const{default:o}=await import("./jszip.min-zGid42TK.js").then(m=>m.j);return{default:o}},__vite__mapDeps([0,1,2]))).default,l=new s;if(e.image_type==="crisis_map"){const o=l.folder("crisis_maps_dataset"),m=o?.folder("images");if(m)try{const _=e.image_count&&e.image_count>1?e.all_image_ids||[e.image_id]:[e.image_id],D=_.map(async(f,L)=>{try{const C=await fetch(`/api/images/${f}/file`);if(!C.ok)throw new Error(`Failed to fetch image ${f}`);const S=await C.blob(),Y=e.file_key.split(".").pop()||"jpg",B=`0001_${String(L+1).padStart(2,"0")}.${Y}`;return m.file(B,S),{success:!0,fileName:B,imageId:f}}catch(C){return console.error(`Failed to process image ${f}:`,C),{success:!1,fileName:"",imageId:f}}}),F=(await Promise.all(D)).filter(f=>f.success);if(F.length===0)throw new Error("No images could be processed");if(t==="fine-tuning"){const f=[],L=[],C=[],S=F.map(Ye=>`images/${Ye.fileName}`),Y=Math.random(),B={image:S.length===1?S[0]:S,caption:e.edited||e.generated||"",metadata:{image_id:_,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};Y<$/100?f.push(B):Y<($+J)/100?L.push(B):C.push(B),o&&(o.file("train.jsonl",JSON.stringify(f,null,2)),o.file("test.jsonl",JSON.stringify(L,null,2)),o.file("val.jsonl",JSON.stringify(C,null,2)))}else{const f=F.map(C=>`images/${C.fileName}`),L={image:f.length===1?f[0]:f,caption:e.edited||e.generated||"",metadata:{image_id:_,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};o&&o.file("0001.json",JSON.stringify(L,null,2))}}catch(_){throw console.error(`Failed to process image ${e.image_id}:`,_),_}}else if(e.image_type==="drone_image"){const o=l.folder("drone_images_dataset"),m=o?.folder("images");if(m)try{const _=await fetch(`/api/images/${e.image_id}/file`);if(!_.ok)throw new Error(`Failed to fetch image ${e.image_id}`);const D=await _.blob(),F=`0001.${e.file_key.split(".").pop()||"jpg"}`;if(m.file(F,D),t==="fine-tuning"){const f=[],L=[],C=[];if(String(e?.image_type)==="crisis_map"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}else if(String(e?.image_type)==="drone_image"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}o&&(o.file("train.jsonl",JSON.stringify(f,null,2)),o.file("test.jsonl",JSON.stringify(L,null,2)),o.file("val.jsonl",JSON.stringify(C,null,2)))}else{const f={image:`images/${F}`,caption:e.edited||e.generated||"",metadata:{image_id:e.image_count&&e.image_count>1?e.all_image_ids||[e.image_id]:e.image_id,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};o&&o.file("0001.json",JSON.stringify(f,null,2))}}catch(_){throw console.error(`Failed to process image ${e.image_id}:`,_),_}}else{const o=l.folder("generic_dataset"),m=o?.folder("images");if(m)try{const _=await fetch(`/api/images/${e.image_id}/file`);if(!_.ok)throw new Error(`Failed to fetch image ${e.image_id}`);const D=await _.blob(),F=`0001.${e.file_key.split(".").pop()||"jpg"}`;if(m.file(F,D),t==="fine-tuning"){const f=[],L=[],C=[];if(String(e?.image_type)==="crisis_map"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}else if(String(e?.image_type)==="drone_image"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}o&&(o.file("train.jsonl",JSON.stringify(f,null,2)),o.file("test.jsonl",JSON.stringify(L,null,2)),o.file("val.jsonl",JSON.stringify(C,null,2)))}else{const f={image:`images/${F}`,caption:e.edited||e.generated||"",metadata:{image_id:e.image_count&&e.image_count>1?e.all_image_ids||[e.image_id]:e.image_id,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};o&&o.file("0001.json",JSON.stringify(f,null,2))}}catch(_){throw console.error(`Failed to process image ${e.image_id}:`,_),_}}const i=await l.generateAsync({type:"blob"}),n=URL.createObjectURL(i),r=document.createElement("a");r.href=n,r.download=`dataset_${e.image_type}_${e.image_id}_${t}_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),console.log(`Exported ${e.image_type} dataset with 1 image in ${t} mode`),se(!0)}catch(s){console.error("Export failed:",s),alert("Failed to export dataset. Please try again.")}finally{te(!1)}}},Xe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return!u||u==="undefined"||u==="null"||u.trim()===""||!Xe.test(u)?a.jsx(ee,{children:a.jsxs("div",{className:"flex flex-col items-center gap-4 text-center py-12",children:[a.jsx("div",{className:"text-4xl",children:"⚠️"}),a.jsx("div",{className:"text-xl font-semibold",children:"Invalid Map ID"}),a.jsx("div",{children:"The map ID provided is not valid."}),a.jsxs("div",{className:"text-sm text-gray-500 mt-2",children:['Debug Info: mapId = "',u,'" (type: ',typeof u,")"]}),a.jsx(M,{name:"back-to-explore",variant:"secondary",onClick:()=>x("/explore"),children:"Return to Explore"})]})}):z?a.jsx(ee,{children:a.jsx("div",{className:g.loadingContainer,children:a.jsxs("div",{className:"flex flex-col items-center gap-4",children:[a.jsx(we,{className:"text-ifrcRed"}),a.jsx("div",{children:"Loading map details..."})]})})}):ce||!e?a.jsx(ee,{children:a.jsx("div",{className:g.errorContainer,children:a.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[a.jsx("div",{className:"text-4xl",children:"⚠️"}),a.jsx("div",{className:"text-xl font-semibold",children:"Unable to load map"}),a.jsx("div",{children:ce||"Map not found"}),a.jsx(M,{name:"back-to-explore",variant:"secondary",onClick:()=>x("/explore"),children:"Return to Explore"})]})})}):a.jsxs(ee,{children:[a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsxs("div",{className:g.tabSelector,children:[a.jsx(sa,{name:"map-details-view",value:le,onChange:t=>{(t==="mapDetails"||t==="explore")&&(Ie(t),t==="explore"&&x("/explore"))},options:Be,keySelector:t=>t.key,labelSelector:t=>t.label}),a.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:a.jsxs(M,{name:"reference-examples",variant:b?"primary":"secondary",onClick:()=>Oe(!b),className:"whitespace-nowrap",children:[a.jsx("span",{className:"mr-2",children:b?a.jsx("span",{className:"text-yellow-400",children:"★"}):a.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),a.jsx(M,{name:"export-dataset",variant:"secondary",onClick:()=>Z(!0),children:"Export"})]})]}),a.jsx(la,{sources:de,types:ge,regions:ue,countries:ke,imageTypes:me,isLoadingFilters:!1}),le==="mapDetails"?a.jsx("div",{className:"relative",children:c?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:g.gridLayout,children:[a.jsxs(E,{heading:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{children:c.title||"Map Image"}),c.starred&&a.jsx("span",{className:"text-red-500 text-xl",title:"Starred image",children:"★"})]}),headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:[a.jsx("div",{className:g.imageContainer,children:e?.image_count&&e.image_count>1||h.length>1?a.jsxs("div",{className:g.carouselContainer,children:[a.jsx("div",{className:g.carouselImageWrapper,children:H?a.jsxs("div",{className:g.imagePlaceholder,children:[a.jsx(we,{className:"text-ifrcRed"}),a.jsx("div",{children:"Loading images..."})]}):h[k]?.detail_url?a.jsx("img",{src:h[k].detail_url,alt:h[k].file_key,className:g.carouselImage,onError:t=>{console.log("MapDetailsPage: Detail image failed to load, falling back to original:",h[k].detail_url);const s=t.target;h[k].image_url&&(s.src=h[k].image_url)},onLoad:()=>console.log("MapDetailsPage: Detail image loaded successfully:",h[k].detail_url)}):h[k]?.image_url?a.jsx("img",{src:h[k].image_url,alt:h[k].file_key,className:g.carouselImage,onLoad:()=>console.log("MapDetailsPage: Original image loaded successfully:",h[k].image_url)}):a.jsx("div",{className:g.imagePlaceholder,children:"No image available"})}),a.jsxs("div",{className:g.carouselNavigation,children:[a.jsx(M,{name:"previous-image",variant:"tertiary",size:1,onClick:We,disabled:H,className:g.carouselButton,children:a.jsx(ne,{className:"w-4 h-4"})}),a.jsx("div",{className:g.carouselIndicators,children:h.map((t,s)=>a.jsx("button",{onClick:()=>Ve(s),className:`${g.carouselIndicator} ${s===k?g.carouselIndicatorActive:""}`,disabled:H,children:s+1},s))}),a.jsx(M,{name:"next-image",variant:"tertiary",size:1,onClick:Je,disabled:H,className:g.carouselButton,children:a.jsx(oe,{className:"w-4 h-4"})})]}),a.jsx("div",{className:g.viewImageButtonContainer,children:a.jsx(M,{name:"view-full-size-carousel",variant:"secondary",size:1,onClick:()=>ye(h[k]),disabled:H||!h[k]?.image_url,children:"View Image"})})]}):a.jsxs("div",{className:g.singleImageContainer,children:[c.detail_url?a.jsx("img",{src:c.detail_url,alt:c.file_key,onError:t=>{console.log("MapDetailsPage: Detail image failed to load, falling back to original:",c.detail_url);const s=t.target;c.image_url&&(s.src=c.image_url)},onLoad:()=>console.log("MapDetailsPage: Detail image loaded successfully:",c.detail_url)}):c.image_url?a.jsx("img",{src:c.image_url,alt:c.file_key,onLoad:()=>console.log("MapDetailsPage: Original image loaded successfully:",c.image_url)}):a.jsx("div",{className:g.imagePlaceholder,children:"No image available"}),a.jsx("div",{className:g.viewImageButtonContainer,children:a.jsx(M,{name:"view-full-size-single",variant:"secondary",size:1,onClick:()=>ye(c),disabled:!c.image_url,children:"View Image"})})]})}),a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:a.jsxs("div",{className:g.metadataTags,children:[c.image_type!=="drone_image"&&a.jsx("span",{className:g.metadataTag,children:de.find(t=>t.s_code===c.source)?.label||c.source}),a.jsx("span",{className:g.metadataTag,children:ge.find(t=>t.t_code===c.event_type)?.label||c.event_type}),a.jsx("span",{className:g.metadataTag,children:me.find(t=>t.image_type===c.image_type)?.label||c.image_type}),c.countries&&c.countries.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:g.metadataTag,children:ue.find(t=>t.r_code===c.countries[0].r_code)?.label||"Unknown Region"}),a.jsx("span",{className:g.metadataTag,children:c.countries.map(t=>t.label).join(", ")})]}),c.image_count&&c.image_count>1&&a.jsxs("span",{className:g.metadataTag,title:`Multi-upload with ${c.image_count} images`,children:["📷 ",c.image_count]}),(!c.image_count||c.image_count<=1)&&a.jsx("span",{className:g.metadataTag,title:"Single Upload",children:"Single"})]})})]}),a.jsx("div",{className:g.detailsSection,children:c.edited&&c.edited.includes("Description:")||c.generated&&c.generated.includes("Description:")?a.jsx(E,{heading:"AI Generated Content",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:a.jsx("div",{className:g.captionContainer,children:a.jsx("div",{className:g.captionText,children:(c.edited||c.generated||"").split(/(Description:|Analysis:|Recommended Actions:)/).map((l,i)=>l.trim()===""?null:l==="Description:"||l==="Analysis:"||l==="Recommended Actions:"?a.jsx("h4",{className:"font-semibold text-gray-800 mt-4 mb-2",children:l},i):a.jsx("p",{className:"mb-2",children:l.trim()},i))})})}):a.jsx(E,{heading:"Description",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:a.jsx("div",{className:g.captionContainer,children:c.generated||c.edited?a.jsx("div",{className:g.captionText,children:a.jsx("p",{children:c.edited||c.generated})}):a.jsx("p",{children:"— no caption yet —"})})})})]}),a.jsx("div",{className:"flex items-center justify-center mt-8",children:a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-lg p-4",children:a.jsxs("div",{className:"flex items-center gap-4",children:[Le&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"previous-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${W?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>ve("previous"),disabled:W,children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsxs("div",{className:"flex -space-x-1",children:[a.jsx(ne,{className:"w-4 h-4"}),a.jsx(ne,{className:"w-4 h-4"})]}),a.jsx("span",{className:"font-semibold",children:"Previous"})]})})}),re&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"delete",variant:"tertiary",size:1,className:"bg-red-50 hover:bg-red-100 text-red-700 border border-red-200 hover:border-red-300",onClick:He,title:"Delete","aria-label":"Delete saved image",children:a.jsx(ia,{className:"w-4 h-4"})})}),a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"contribute",onClick:Ze,children:"Contribute"})}),re&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"toggle-star",variant:"tertiary",size:1,className:`${e?.starred?"bg-red-100 hover:bg-red-200 text-red-800 border-2 border-red-400":"bg-gray-100 hover:bg-gray-200 text-gray-600 border-2 border-gray-300"} w-16 h-8 rounded-full transition-all duration-200 flex items-center justify-center`,onClick:qe,title:e?.starred?"Unstar image":"Star image","aria-label":e?.starred?"Unstar image":"Star image",children:a.jsx("span",{className:`text-lg transition-all duration-200 ${e?.starred?"text-red-600":"text-gray-500"}`,children:e?.starred?"★":"☆"})})}),Fe&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"next-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${W?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>ve("next"),disabled:W,children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"font-semibold",children:"Next"}),a.jsxs("div",{className:"flex -space-x-1",children:[a.jsx(oe,{className:"w-4 h-4"}),a.jsx(oe,{className:"w-4 h-4"})]})]})})})]})})})]}):a.jsxs("div",{className:"text-center py-12",children:[a.jsx("div",{className:"text-xl font-semibold text-gray-600 mb-4",children:"No matches found"}),a.jsx("div",{className:"mt-4",children:a.jsx(M,{name:"clear-filters",variant:"secondary",onClick:Ue,children:"Clear Filters"})})]})}):null]}),Ee&&a.jsx("div",{className:g.fullSizeModalOverlay,onClick:()=>K(!1),children:a.jsx("div",{className:g.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:a.jsxs("div",{className:g.ratingWarningContent,children:[a.jsx("h3",{className:g.ratingWarningTitle,children:"Delete Image?"}),a.jsx("p",{className:g.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this saved image and all related data?"}),a.jsxs("div",{className:g.ratingWarningButtons,children:[a.jsx(M,{name:"confirm-delete",variant:"secondary",onClick:Ke,children:"Delete"}),a.jsx(M,{name:"cancel-delete",variant:"tertiary",onClick:()=>K(!1),children:"Cancel"})]})]})})}),pe&&a.jsx(ca,{isOpen:pe,onClose:()=>{Z(!1),se(!1),te(!1)},onExport:(t,s)=>{s.includes(e.image_type)&&Qe(t)},filteredCount:1,totalCount:1,hasFilters:!1,crisisMapsCount:e.image_type==="crisis_map"?1:0,droneImagesCount:e.image_type==="drone_image"?1:0,isLoading:$e,exportSuccess:Pe,variant:"single",onNavigateToList:()=>{Z(!1),x("/explore")},onNavigateAndExport:()=>{Z(!1),x("/explore?export=true")}}),a.jsx(na,{isOpen:Re,imageUrl:Ae?.image_url||null,preview:null,selectedImageData:null,onClose:Ge,isLoading:ze})]})}export{st as default}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-Du5pcDB6.js","assets/index-DuuohOak.js","assets/index-cCOeofBN.css"])))=>i.map(i=>d[i]); +import{K as ea,x as aa,r as d,D as ta,j as a,N as ee,n as M,_ as we,L as sa,z as E,v as ne,w as oe,F as ia,M as na,G as oa}from"./index-DuuohOak.js";import{u as ra}from"./useAdmin-Cd7hRYKP.js";import{F as la,E as ca}from"./ExportModal-B89pVxH6.js";const da="_tabSelector_usssr_1",ga="_imageContainer_usssr_12",ma="_imagePlaceholder_usssr_33",ua="_metadataTags_usssr_45",pa="_metadataTag_usssr_45",fa="_captionContainer_usssr_67",_a="_captionText_usssr_74",ha="_gridLayout_usssr_131",xa="_detailsSection_usssr_155",ya="_loadingContainer_usssr_161",va="_errorContainer_usssr_171",ja="_fullSizeModalOverlay_usssr_205",wa="_fullSizeModalContent_usssr_219",Ia="_ratingWarningContent_usssr_230",Na="_ratingWarningTitle_usssr_236",Ca="_ratingWarningText_usssr_243",ba="_ratingWarningButtons_usssr_250",Sa="_carouselContainer_usssr_365",ka="_carouselImageWrapper_usssr_370",Da="_carouselImage_usssr_370",La="_carouselNavigation_usssr_393",Ma="_carouselButton_usssr_405",Fa="_carouselIndicators_usssr_429",Ta="_carouselIndicator_usssr_429",Ea="_carouselIndicatorActive_usssr_458",$a="_singleImageContainer_usssr_488",Pa="_viewImageButtonContainer_usssr_494",g={tabSelector:da,imageContainer:ga,imagePlaceholder:ma,metadataTags:ua,metadataTag:pa,captionContainer:fa,captionText:_a,gridLayout:ha,detailsSection:xa,loadingContainer:ya,errorContainer:va,fullSizeModalOverlay:ja,fullSizeModalContent:wa,ratingWarningContent:Ia,ratingWarningTitle:Na,ratingWarningText:Ca,ratingWarningButtons:ba,carouselContainer:Sa,carouselImageWrapper:ka,carouselImage:Da,carouselNavigation:La,carouselButton:Ma,carouselIndicators:Fa,carouselIndicator:Ta,carouselIndicatorActive:Ea,singleImageContainer:$a,viewImageButtonContainer:Pa};function st(){const{mapId:u}=ea(),x=aa(),{isAuthenticated:re}=ra(),[le,Ie]=d.useState("mapDetails"),[e,ae]=d.useState(null),[z,R]=d.useState(!0),[ce,O]=d.useState(null),[de,Ne]=d.useState([]),[ge,Ce]=d.useState([]),[me,be]=d.useState([]),[ue,Se]=d.useState([]),[ke,De]=d.useState([]),[Le,Me]=d.useState(!1),[Fe,Te]=d.useState(!1),[W,q]=d.useState(!1),[Ee,K]=d.useState(!1),[pe,Z]=d.useState(!1),[$e,te]=d.useState(!1),[Pe,se]=d.useState(!1),[Ra,Aa]=d.useState("standard"),[$,za]=d.useState(80),[J,Oa]=d.useState(10),[Ua,Ba]=d.useState(10),[Wa,Ja]=d.useState(!0),[Va,Ga]=d.useState(!0),[U,Q]=d.useState(!1),[Re,fe]=d.useState(!1),[Ae,_e]=d.useState(null),[ze,V]=d.useState(!1),[h,G]=d.useState([]),[k,A]=d.useState(0),[H,he]=d.useState(!1),{search:p,setSearch:Ha,srcFilter:y,setSrcFilter:qa,catFilter:v,setCatFilter:Ka,regionFilter:j,setRegionFilter:Za,countryFilter:w,setCountryFilter:Qa,imageTypeFilter:I,setImageTypeFilter:Xa,uploadTypeFilter:N,setUploadTypeFilter:Ya,showReferenceExamples:b,setShowReferenceExamples:Oe,clearAllFilters:Ue}=ta(),Be=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],X=d.useCallback(async t=>{if(!(!t||t==="undefined"||t==="null"||t.trim()===""))try{const s=new URLSearchParams;p&&s.append("search",p),y&&s.append("source",y),v&&s.append("event_type",v),j&&s.append("region",j),w&&s.append("country",w),I&&s.append("image_type",I),N&&s.append("upload_type",N),b&&s.append("starred_only","true");const l=await fetch(`/api/images/grouped?${s.toString()}`);if(l.ok){const i=await l.json();console.log("Server response for upload_type=multiple:",{url:`/api/images/grouped?${s.toString()}`,count:i.length,images:i.map(r=>({image_id:r.image_id,image_count:r.image_count,all_image_ids:r.all_image_ids,all_image_ids_length:r.all_image_ids?.length}))});const n=i.findIndex(r=>r.image_id===t);console.log("Navigation availability check (server-side):",{filteredImagesCount:i.length,currentIndex:n,currentId:t,uploadTypeFilter:N,hasPrevious:i.length>1&&n>0,hasNext:i.length>1&&n({image_id:r.image_id,image_count:r.image_count,all_image_ids:r.all_image_ids,image_type:r.image_type}))}),Me(i.length>1&&n>0),Te(i.length>1&&n{console.log("fetchAllImages called with imageIds:",t),he(!0);try{const s=t.map(async i=>{const n=await fetch(`/api/images/${i}`);if(!n.ok)throw new Error(`Failed to fetch image ${i}`);return n.json()}),l=await Promise.all(s);G(l),A(0),console.log("fetchAllImages: Loaded",l.length,"images")}catch(s){console.error("fetchAllImages error:",s),O(s instanceof Error?s.message:"Failed to load all images")}finally{he(!1)}},[]),xe=d.useCallback(async t=>{if(console.log("fetchMapData called with id:",t),console.log("fetchMapData id type:",typeof t),!t||t==="undefined"||t==="null"||t.trim()===""){console.log("fetchMapData: Invalid ID detected:",t),O("Invalid Map ID"),R(!1);return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)){console.log("fetchMapData: Invalid UUID format:",t),O("Invalid Map ID format"),R(!1);return}console.log("fetchMapData: Making API call for id:",t),q(!0),R(!0);try{const l=await fetch(`/api/images/${t}`);if(!l.ok)throw new Error("Map not found");const i=await l.json();if(ae(i),i.all_image_ids&&i.all_image_ids.length>1)await ie(i.all_image_ids);else if(i.image_count&&i.image_count>1){console.log("Multi-upload detected but no all_image_ids, trying grouped endpoint");try{const n=await fetch("/api/images/grouped");if(n.ok){const o=(await n.json()).find(m=>m.all_image_ids&&m.all_image_ids.includes(i.image_id));o&&o.all_image_ids?await ie(o.all_image_ids):(G([i]),A(0))}else G([i]),A(0)}catch(n){console.error("Failed to fetch from grouped endpoint:",n),G([i]),A(0)}}else G([i]),A(0);await X(t)}catch(l){O(l instanceof Error?l.message:"Unknown error occurred")}finally{R(!1),q(!1)}},[X,ie]),We=d.useCallback(()=>{h.length>1&&A(t=>t>0?t-1:h.length-1)},[h.length]),Je=d.useCallback(()=>{h.length>1&&A(t=>t{t>=0&&t{const s=t||(h.length>0?h[k]:e);if(s){V(!0),_e(s),fe(!0);try{const l=new Image;l.onload=()=>{V(!1)},l.onerror=()=>{V(!1)},l.src=s.image_url}catch(l){console.error("Error preloading full-size image:",l),V(!1)}}},[h,k,e]),Ge=d.useCallback(()=>{fe(!1),_e(null),V(!1)},[]);d.useEffect(()=>{if(console.log("MapDetailsPage: mapId from useParams:",u),console.log("MapDetailsPage: mapId type:",typeof u),console.log("MapDetailsPage: mapId value:",u),!u||u==="undefined"||u==="null"||u.trim()===""||u===void 0||u===null){console.log("MapDetailsPage: Invalid mapId, setting error"),O("Map ID is required"),R(!1);return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(u)){console.log("MapDetailsPage: Invalid UUID format:",u),O("Invalid Map ID format"),R(!1);return}console.log("MapDetailsPage: Fetching data for mapId:",u),xe(u)},[u,xe]),d.useEffect(()=>{if(!e||z||U)return;if(!u||u==="undefined"||u==="null"||u.trim()===""){console.log("Auto-navigation skipped: Invalid mapId");return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(u)){console.log("Auto-navigation skipped: Invalid mapId format");return}(()=>{const l=!p||e.title?.toLowerCase().includes(p.toLowerCase())||e.generated?.toLowerCase().includes(p.toLowerCase())||e.source?.toLowerCase().includes(p.toLowerCase())||e.event_type?.toLowerCase().includes(p.toLowerCase()),i=!y||e.source===y,n=!v||e.event_type===v,r=!j||e.countries.some(P=>P.r_code===j),o=!w||e.countries.some(P=>P.c_code===w),m=!I||e.image_type===I,_=!b||e.starred===!0,D=l&&i&&n&&r&&o&&m&&_;return console.log("Auto-navigation check:",{mapId:u,search:p,srcFilter:y,catFilter:v,regionFilter:j,countryFilter:w,imageTypeFilter:I,showReferenceExamples:b,matchesSearch:l,matchesSource:i,matchesCategory:n,matchesRegion:r,matchesCountry:o,matchesImageType:m,matchesReferenceExamples:_,matches:D}),D})()||(console.log("Current map does not match filters, looking for first matching item"),fetch("/api/images").then(l=>l.json()).then(l=>{console.log("Auto-navigation: Received images from API:",l.length),console.log("Auto-navigation: First few images:",l.slice(0,3).map(n=>({image_id:n.image_id,title:n.title})));const i=l.find(n=>{const r=!p||n.title?.toLowerCase().includes(p.toLowerCase())||n.generated?.toLowerCase().includes(p.toLowerCase())||n.source?.toLowerCase().includes(p.toLowerCase())||n.event_type?.toLowerCase().includes(p.toLowerCase()),o=!y||n.source===y,m=!v||n.event_type===v,_=!j||n.countries?.some(f=>f.r_code===j),D=!w||n.countries?.some(f=>f.c_code===w),P=!I||n.image_type===I,F=!b||n.starred===!0;return r&&o&&m&&_&&D&&P&&F});console.log("Auto-navigation: Found first matching image:",i?{image_id:i.image_id,title:i.title,source:i.source}:"No matching image found"),i&&i.image_id&&i.image_id!=="undefined"&&i.image_id!=="null"&&i.image_id.trim()!==""&&i.image_id!==u&&(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(i.image_id)?(console.log("Auto-navigating to:",i.image_id),x(`/map/${i.image_id}`)):console.error("Auto-navigation blocked: Invalid image_id format:",i.image_id))}).catch(console.error))},[e,p,y,v,j,w,I,b,u,x,z,U]);const ve=async t=>{if(!W){q(!0);try{const s=new URLSearchParams;p&&s.append("search",p),y&&s.append("source",y),v&&s.append("event_type",v),j&&s.append("region",j),w&&s.append("country",w),I&&s.append("image_type",I),N&&s.append("upload_type",N),b&&s.append("starred_only","true");const l=await fetch(`/api/images/grouped?${s.toString()}`);if(l.ok){const i=await l.json(),n=i.findIndex(m=>m.image_id===u);if(n===-1){console.error("Current image not found in filtered list");return}let r;t==="previous"?r=n>0?n-1:i.length-1:r=n{console.log("=== NAVIGATION USEEFFECT TRIGGERED ==="),console.log("Navigation useEffect triggered:",{map:!!e,mapId:u,loading:z,isDeleting:U,uploadTypeFilter:N,allFilters:{search:p,srcFilter:y,catFilter:v,regionFilter:j,countryFilter:w,imageTypeFilter:I,uploadTypeFilter:N,showReferenceExamples:b}}),e&&u&&!z&&!U?(console.log("Calling checkNavigationAvailability with:",u),X(u)):console.log("NOT calling checkNavigationAvailability because:",{map:!!e,mapId:!!u,loading:z,isDeleting:U})},[e,u,p,y,v,j,w,I,N,b,z,U,X]),d.useEffect(()=>{Promise.all([fetch("/api/sources").then(t=>t.json()),fetch("/api/types").then(t=>t.json()),fetch("/api/image-types").then(t=>t.json()),fetch("/api/regions").then(t=>t.json()),fetch("/api/countries").then(t=>t.json())]).then(([t,s,l,i,n])=>{Ne(t),Ce(s),be(l),Se(i),De(n)}).catch(console.error)},[]);const He=async()=>{e&&K(!0)},qe=async()=>{if(e)try{(await fetch(`/api/images/${e.image_id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({starred:!e.starred})})).ok?ae(s=>s?{...s,starred:!s.starred}:null):console.error("Failed to toggle starred status")}catch(t){console.error("Error toggling starred status:",t)}},Ke=async()=>{if(e){Q(!0);try{if(console.log("Deleting image with ID:",e.image_id),(await fetch(`/api/images/${e.image_id}`,{method:"DELETE"})).ok){ae(s=>s?{...s,starred:!s.starred}:null),K(!1);try{const s=await fetch("/api/images/grouped");if(s.ok){const i=(await s.json()).filter(r=>{const o=!p||r.title?.toLowerCase().includes(p.toLowerCase())||r.generated?.toLowerCase().includes(p.toLowerCase())||r.source?.toLowerCase().includes(p.toLowerCase())||r.event_type?.toLowerCase().includes(p.toLowerCase()),m=!y||r.source===y,_=!v||r.event_type===v,D=!j||r.countries?.some(C=>C.r_code===j),P=!w||r.countries?.some(C=>C.c_code===w),F=!I||r.image_type===I,f=!N||N==="single"&&(!r.image_count||r.image_count<=1)||N==="multiple"&&r.image_count&&r.image_count>1,L=!b||r.starred===!0;return o&&m&&_&&D&&P&&F&&f&&L}),n=i.filter(r=>r.image_id!==e.image_id);if(n.length>0){const r=i.findIndex(m=>m.image_id===e.image_id);let o;if(r===i.length-1?o=r-1:o=r,console.log("Navigation target:",{currentIndex:r,targetIndex:o,targetId:n[o]?.image_id}),o>=0&&o{R(!0);try{const t=new URLSearchParams;p&&t.append("search",p),y&&t.append("source",y),v&&t.append("event_type",v),j&&t.append("region",j),w&&t.append("country",w),I&&t.append("image_type",I),N&&t.append("upload_type",N),b&&t.append("starred_only","true");const s=await fetch(`/api/images/grouped?${t.toString()}`);if(s.ok){const l=await s.json();if(l.length>0){const i=l[0];i&&i.image_id&&x(`/map/${i.image_id}`)}else x("/explore")}}catch(t){console.error("Failed to navigate to matching image:",t),x("/explore")}finally{R(!1)}},[p,y,v,j,w,I,N,b,x]),c=d.useMemo(()=>{if(!e)return null;if(!p&&!y&&!v&&!j&&!w&&!I&&!N&&!b)return e;const t=!p||e.title?.toLowerCase().includes(p.toLowerCase())||e.generated?.toLowerCase().includes(p.toLowerCase())||e.source?.toLowerCase().includes(p.toLowerCase())||e.event_type?.toLowerCase().includes(p.toLowerCase()),s=!y||e.source===y,l=!v||e.event_type===v,i=!j||e.countries.some(D=>D.r_code===j),n=!w||e.countries.some(D=>D.c_code===w),r=!I||e.image_type===I,o=!N||N==="single"&&(!e.image_count||e.image_count<=1)&&(!e.all_image_ids||e.all_image_ids.length<=1)||N==="multiple"&&(e.image_count&&e.image_count>1||e.all_image_ids&&e.all_image_ids.length>1),m=!b||e.starred===!0,_=t&&s&&l&&i&&n&&r&&o&&m;return!_&&(p||y||v||j||w||I||N||b)?(setTimeout(()=>{je()},100),e):_?e:null},[e,p,y,v,j,w,I,N,b,je]),Ze=()=>{if(!e)return;if(!e.all_image_ids||e.all_image_ids.length<=1){const i=`/upload?step=1&contribute=true&imageIds=${[e.image_id].join(",")}`;x(i);return}const s=`/upload?step=1&contribute=true&imageIds=${e.all_image_ids.join(",")}`;x(s)},T=(t,s)=>({image:`images/${s}`,caption:t.edited||t.generated||"",metadata:{image_id:t.image_count&&t.image_count>1?t.all_image_ids||[t.image_id]:t.image_id,title:t.title,source:t.source,event_type:t.event_type,image_type:t.image_type,countries:t.countries,starred:t.starred,image_count:t.image_count||1}}),Qe=async t=>{if(e){te(!0),se(!1);try{const s=(await oa(async()=>{const{default:o}=await import("./jszip.min-Du5pcDB6.js").then(m=>m.j);return{default:o}},__vite__mapDeps([0,1,2]))).default,l=new s;if(e.image_type==="crisis_map"){const o=l.folder("crisis_maps_dataset"),m=o?.folder("images");if(m)try{const _=e.image_count&&e.image_count>1?e.all_image_ids||[e.image_id]:[e.image_id],D=_.map(async(f,L)=>{try{const C=await fetch(`/api/images/${f}/file`);if(!C.ok)throw new Error(`Failed to fetch image ${f}`);const S=await C.blob(),Y=e.file_key.split(".").pop()||"jpg",B=`0001_${String(L+1).padStart(2,"0")}.${Y}`;return m.file(B,S),{success:!0,fileName:B,imageId:f}}catch(C){return console.error(`Failed to process image ${f}:`,C),{success:!1,fileName:"",imageId:f}}}),F=(await Promise.all(D)).filter(f=>f.success);if(F.length===0)throw new Error("No images could be processed");if(t==="fine-tuning"){const f=[],L=[],C=[],S=F.map(Ye=>`images/${Ye.fileName}`),Y=Math.random(),B={image:S.length===1?S[0]:S,caption:e.edited||e.generated||"",metadata:{image_id:_,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};Y<$/100?f.push(B):Y<($+J)/100?L.push(B):C.push(B),o&&(o.file("train.jsonl",JSON.stringify(f,null,2)),o.file("test.jsonl",JSON.stringify(L,null,2)),o.file("val.jsonl",JSON.stringify(C,null,2)))}else{const f=F.map(C=>`images/${C.fileName}`),L={image:f.length===1?f[0]:f,caption:e.edited||e.generated||"",metadata:{image_id:_,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};o&&o.file("0001.json",JSON.stringify(L,null,2))}}catch(_){throw console.error(`Failed to process image ${e.image_id}:`,_),_}}else if(e.image_type==="drone_image"){const o=l.folder("drone_images_dataset"),m=o?.folder("images");if(m)try{const _=await fetch(`/api/images/${e.image_id}/file`);if(!_.ok)throw new Error(`Failed to fetch image ${e.image_id}`);const D=await _.blob(),F=`0001.${e.file_key.split(".").pop()||"jpg"}`;if(m.file(F,D),t==="fine-tuning"){const f=[],L=[],C=[];if(String(e?.image_type)==="crisis_map"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}else if(String(e?.image_type)==="drone_image"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}o&&(o.file("train.jsonl",JSON.stringify(f,null,2)),o.file("test.jsonl",JSON.stringify(L,null,2)),o.file("val.jsonl",JSON.stringify(C,null,2)))}else{const f={image:`images/${F}`,caption:e.edited||e.generated||"",metadata:{image_id:e.image_count&&e.image_count>1?e.all_image_ids||[e.image_id]:e.image_id,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};o&&o.file("0001.json",JSON.stringify(f,null,2))}}catch(_){throw console.error(`Failed to process image ${e.image_id}:`,_),_}}else{const o=l.folder("generic_dataset"),m=o?.folder("images");if(m)try{const _=await fetch(`/api/images/${e.image_id}/file`);if(!_.ok)throw new Error(`Failed to fetch image ${e.image_id}`);const D=await _.blob(),F=`0001.${e.file_key.split(".").pop()||"jpg"}`;if(m.file(F,D),t==="fine-tuning"){const f=[],L=[],C=[];if(String(e?.image_type)==="crisis_map"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}else if(String(e?.image_type)==="drone_image"){const S=Math.random();S<$/100?f.push(T(e,"0001")):S<($+J)/100?L.push(T(e,"0001")):C.push(T(e,"0001"))}o&&(o.file("train.jsonl",JSON.stringify(f,null,2)),o.file("test.jsonl",JSON.stringify(L,null,2)),o.file("val.jsonl",JSON.stringify(C,null,2)))}else{const f={image:`images/${F}`,caption:e.edited||e.generated||"",metadata:{image_id:e.image_count&&e.image_count>1?e.all_image_ids||[e.image_id]:e.image_id,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};o&&o.file("0001.json",JSON.stringify(f,null,2))}}catch(_){throw console.error(`Failed to process image ${e.image_id}:`,_),_}}const i=await l.generateAsync({type:"blob"}),n=URL.createObjectURL(i),r=document.createElement("a");r.href=n,r.download=`dataset_${e.image_type}_${e.image_id}_${t}_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),console.log(`Exported ${e.image_type} dataset with 1 image in ${t} mode`),se(!0)}catch(s){console.error("Export failed:",s),alert("Failed to export dataset. Please try again.")}finally{te(!1)}}},Xe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return!u||u==="undefined"||u==="null"||u.trim()===""||!Xe.test(u)?a.jsx(ee,{children:a.jsxs("div",{className:"flex flex-col items-center gap-4 text-center py-12",children:[a.jsx("div",{className:"text-4xl",children:"⚠️"}),a.jsx("div",{className:"text-xl font-semibold",children:"Invalid Map ID"}),a.jsx("div",{children:"The map ID provided is not valid."}),a.jsxs("div",{className:"text-sm text-gray-500 mt-2",children:['Debug Info: mapId = "',u,'" (type: ',typeof u,")"]}),a.jsx(M,{name:"back-to-explore",variant:"secondary",onClick:()=>x("/explore"),children:"Return to Explore"})]})}):z?a.jsx(ee,{children:a.jsx("div",{className:g.loadingContainer,children:a.jsxs("div",{className:"flex flex-col items-center gap-4",children:[a.jsx(we,{className:"text-ifrcRed"}),a.jsx("div",{children:"Loading map details..."})]})})}):ce||!e?a.jsx(ee,{children:a.jsx("div",{className:g.errorContainer,children:a.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[a.jsx("div",{className:"text-4xl",children:"⚠️"}),a.jsx("div",{className:"text-xl font-semibold",children:"Unable to load map"}),a.jsx("div",{children:ce||"Map not found"}),a.jsx(M,{name:"back-to-explore",variant:"secondary",onClick:()=>x("/explore"),children:"Return to Explore"})]})})}):a.jsxs(ee,{children:[a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsxs("div",{className:g.tabSelector,children:[a.jsx(sa,{name:"map-details-view",value:le,onChange:t=>{(t==="mapDetails"||t==="explore")&&(Ie(t),t==="explore"&&x("/explore"))},options:Be,keySelector:t=>t.key,labelSelector:t=>t.label}),a.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:a.jsxs(M,{name:"reference-examples",variant:b?"primary":"secondary",onClick:()=>Oe(!b),className:"whitespace-nowrap",children:[a.jsx("span",{className:"mr-2",children:b?a.jsx("span",{className:"text-yellow-400",children:"★"}):a.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),a.jsx(M,{name:"export-dataset",variant:"secondary",onClick:()=>Z(!0),children:"Export"})]})]}),a.jsx(la,{sources:de,types:ge,regions:ue,countries:ke,imageTypes:me,isLoadingFilters:!1}),le==="mapDetails"?a.jsx("div",{className:"relative",children:c?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:g.gridLayout,children:[a.jsxs(E,{heading:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{children:c.title||"Map Image"}),c.starred&&a.jsx("span",{className:"text-red-500 text-xl",title:"Starred image",children:"★"})]}),headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:[a.jsx("div",{className:g.imageContainer,children:e?.image_count&&e.image_count>1||h.length>1?a.jsxs("div",{className:g.carouselContainer,children:[a.jsx("div",{className:g.carouselImageWrapper,children:H?a.jsxs("div",{className:g.imagePlaceholder,children:[a.jsx(we,{className:"text-ifrcRed"}),a.jsx("div",{children:"Loading images..."})]}):h[k]?.detail_url?a.jsx("img",{src:h[k].detail_url,alt:h[k].file_key,className:g.carouselImage,onError:t=>{console.log("MapDetailsPage: Detail image failed to load, falling back to original:",h[k].detail_url);const s=t.target;h[k].image_url&&(s.src=h[k].image_url)},onLoad:()=>console.log("MapDetailsPage: Detail image loaded successfully:",h[k].detail_url)}):h[k]?.image_url?a.jsx("img",{src:h[k].image_url,alt:h[k].file_key,className:g.carouselImage,onLoad:()=>console.log("MapDetailsPage: Original image loaded successfully:",h[k].image_url)}):a.jsx("div",{className:g.imagePlaceholder,children:"No image available"})}),a.jsxs("div",{className:g.carouselNavigation,children:[a.jsx(M,{name:"previous-image",variant:"tertiary",size:1,onClick:We,disabled:H,className:g.carouselButton,children:a.jsx(ne,{className:"w-4 h-4"})}),a.jsx("div",{className:g.carouselIndicators,children:h.map((t,s)=>a.jsx("button",{onClick:()=>Ve(s),className:`${g.carouselIndicator} ${s===k?g.carouselIndicatorActive:""}`,disabled:H,children:s+1},s))}),a.jsx(M,{name:"next-image",variant:"tertiary",size:1,onClick:Je,disabled:H,className:g.carouselButton,children:a.jsx(oe,{className:"w-4 h-4"})})]}),a.jsx("div",{className:g.viewImageButtonContainer,children:a.jsx(M,{name:"view-full-size-carousel",variant:"secondary",size:1,onClick:()=>ye(h[k]),disabled:H||!h[k]?.image_url,children:"View Image"})})]}):a.jsxs("div",{className:g.singleImageContainer,children:[c.detail_url?a.jsx("img",{src:c.detail_url,alt:c.file_key,onError:t=>{console.log("MapDetailsPage: Detail image failed to load, falling back to original:",c.detail_url);const s=t.target;c.image_url&&(s.src=c.image_url)},onLoad:()=>console.log("MapDetailsPage: Detail image loaded successfully:",c.detail_url)}):c.image_url?a.jsx("img",{src:c.image_url,alt:c.file_key,onLoad:()=>console.log("MapDetailsPage: Original image loaded successfully:",c.image_url)}):a.jsx("div",{className:g.imagePlaceholder,children:"No image available"}),a.jsx("div",{className:g.viewImageButtonContainer,children:a.jsx(M,{name:"view-full-size-single",variant:"secondary",size:1,onClick:()=>ye(c),disabled:!c.image_url,children:"View Image"})})]})}),a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:a.jsxs("div",{className:g.metadataTags,children:[c.image_type!=="drone_image"&&a.jsx("span",{className:g.metadataTag,children:de.find(t=>t.s_code===c.source)?.label||c.source}),a.jsx("span",{className:g.metadataTag,children:ge.find(t=>t.t_code===c.event_type)?.label||c.event_type}),a.jsx("span",{className:g.metadataTag,children:me.find(t=>t.image_type===c.image_type)?.label||c.image_type}),c.countries&&c.countries.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:g.metadataTag,children:ue.find(t=>t.r_code===c.countries[0].r_code)?.label||"Unknown Region"}),a.jsx("span",{className:g.metadataTag,children:c.countries.map(t=>t.label).join(", ")})]}),c.image_count&&c.image_count>1&&a.jsxs("span",{className:g.metadataTag,title:`Multi-upload with ${c.image_count} images`,children:["📷 ",c.image_count]}),(!c.image_count||c.image_count<=1)&&a.jsx("span",{className:g.metadataTag,title:"Single Upload",children:"Single"})]})})]}),a.jsx("div",{className:g.detailsSection,children:c.edited&&c.edited.includes("Description:")||c.generated&&c.generated.includes("Description:")?a.jsx(E,{heading:"AI Generated Content",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:a.jsx("div",{className:g.captionContainer,children:a.jsx("div",{className:g.captionText,children:(c.edited||c.generated||"").split(/(Description:|Analysis:|Recommended Actions:)/).map((l,i)=>l.trim()===""?null:l==="Description:"||l==="Analysis:"||l==="Recommended Actions:"?a.jsx("h4",{className:"font-semibold text-gray-800 mt-4 mb-2",children:l},i):a.jsx("p",{className:"mb-2",children:l.trim()},i))})})}):a.jsx(E,{heading:"Description",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:a.jsx("div",{className:g.captionContainer,children:c.generated||c.edited?a.jsx("div",{className:g.captionText,children:a.jsx("p",{children:c.edited||c.generated})}):a.jsx("p",{children:"— no caption yet —"})})})})]}),a.jsx("div",{className:"flex items-center justify-center mt-8",children:a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-lg p-4",children:a.jsxs("div",{className:"flex items-center gap-4",children:[Le&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"previous-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${W?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>ve("previous"),disabled:W,children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsxs("div",{className:"flex -space-x-1",children:[a.jsx(ne,{className:"w-4 h-4"}),a.jsx(ne,{className:"w-4 h-4"})]}),a.jsx("span",{className:"font-semibold",children:"Previous"})]})})}),re&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"delete",variant:"tertiary",size:1,className:"bg-red-50 hover:bg-red-100 text-red-700 border border-red-200 hover:border-red-300",onClick:He,title:"Delete","aria-label":"Delete saved image",children:a.jsx(ia,{className:"w-4 h-4"})})}),a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"contribute",onClick:Ze,children:"Contribute"})}),re&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"toggle-star",variant:"tertiary",size:1,className:`${e?.starred?"bg-red-100 hover:bg-red-200 text-red-800 border-2 border-red-400":"bg-gray-100 hover:bg-gray-200 text-gray-600 border-2 border-gray-300"} w-16 h-8 rounded-full transition-all duration-200 flex items-center justify-center`,onClick:qe,title:e?.starred?"Unstar image":"Star image","aria-label":e?.starred?"Unstar image":"Star image",children:a.jsx("span",{className:`text-lg transition-all duration-200 ${e?.starred?"text-red-600":"text-gray-500"}`,children:e?.starred?"★":"☆"})})}),Fe&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(M,{name:"next-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${W?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>ve("next"),disabled:W,children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"font-semibold",children:"Next"}),a.jsxs("div",{className:"flex -space-x-1",children:[a.jsx(oe,{className:"w-4 h-4"}),a.jsx(oe,{className:"w-4 h-4"})]})]})})})]})})})]}):a.jsxs("div",{className:"text-center py-12",children:[a.jsx("div",{className:"text-xl font-semibold text-gray-600 mb-4",children:"No matches found"}),a.jsx("div",{className:"mt-4",children:a.jsx(M,{name:"clear-filters",variant:"secondary",onClick:Ue,children:"Clear Filters"})})]})}):null]}),Ee&&a.jsx("div",{className:g.fullSizeModalOverlay,onClick:()=>K(!1),children:a.jsx("div",{className:g.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:a.jsxs("div",{className:g.ratingWarningContent,children:[a.jsx("h3",{className:g.ratingWarningTitle,children:"Delete Image?"}),a.jsx("p",{className:g.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this saved image and all related data?"}),a.jsxs("div",{className:g.ratingWarningButtons,children:[a.jsx(M,{name:"confirm-delete",variant:"secondary",onClick:Ke,children:"Delete"}),a.jsx(M,{name:"cancel-delete",variant:"tertiary",onClick:()=>K(!1),children:"Cancel"})]})]})})}),pe&&a.jsx(ca,{isOpen:pe,onClose:()=>{Z(!1),se(!1),te(!1)},onExport:(t,s)=>{s.includes(e.image_type)&&Qe(t)},filteredCount:1,totalCount:1,hasFilters:!1,crisisMapsCount:e.image_type==="crisis_map"?1:0,droneImagesCount:e.image_type==="drone_image"?1:0,isLoading:$e,exportSuccess:Pe,variant:"single",onNavigateToList:()=>{Z(!1),x("/explore")},onNavigateAndExport:()=>{Z(!1),x("/explore?export=true")}}),a.jsx(na,{isOpen:Re,imageUrl:Ae?.image_url||null,preview:null,selectedImageData:null,onClose:Ge,isLoading:ze})]})}export{st as default}; diff --git a/py_backend/static/assets/index-DYN5AjU6.js b/py_backend/static/assets/index-DYN5AjU6.js new file mode 100644 index 0000000000000000000000000000000000000000..60c4216feb495fa3e1cf3a1c2265de80a7633d74 --- /dev/null +++ b/py_backend/static/assets/index-DYN5AjU6.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-Du5pcDB6.js","assets/index-DuuohOak.js","assets/index-cCOeofBN.css"])))=>i.map(i=>d[i]); +import{j as t,z as j,n as N,v as De,w as Oe,x as Le,B as Me,r,D as Re,N as Je,_ as ge,L as ze,F as We,G as Ue}from"./index-DuuohOak.js";import{u as Be}from"./useAdmin-Cd7hRYKP.js";import{F as Ae,E as He}from"./ExportModal-B89pVxH6.js";const Ve="_paginatorContainer_1l5ti_1",Ge="_paginationControls_1l5ti_19",pe={paginatorContainer:Ve,paginationControls:Ge};function Ze({currentPage:_,totalPages:p,onPageChange:T,className:z=""}){if(p<=1)return null;const u=(()=>{const f=[];if(p<=5)for(let h=1;h<=p;h++)f.push(h);else{let h=Math.max(1,_-2);const v=Math.min(p,h+5-1);v===p&&(h=Math.max(1,v-5+1));for(let b=h;b<=v;b++)f.push(b)}return f})();return t.jsx("div",{className:`${pe.paginatorContainer} ${z}`,children:t.jsxs("div",{className:pe.paginationControls,children:[t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsxs(N,{name:"prev-page",variant:"tertiary",size:1,onClick:()=>T(Math.max(1,_-1)),disabled:_===1,title:"Previous page",children:[t.jsx(De,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Previous"})]})}),t.jsxs("div",{className:"flex items-center gap-1",children:[u[0]>1&&t.jsxs(t.Fragment,{children:[t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx(N,{name:"page-1",variant:"tertiary",size:1,onClick:()=>T(1),children:"1"})}),u[0]>2&&t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx("span",{className:"px-2 text-gray-500",children:"..."})})]}),u.map(f=>t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx(N,{name:`page-${f}`,variant:_===f?"primary":"tertiary",size:1,onClick:()=>T(f),children:f})},f)),u[u.length-1]T(p),children:p})})]})]}),t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsxs(N,{name:"next-page",variant:"tertiary",size:1,onClick:()=>T(Math.min(p,_+1)),disabled:_===p,title:"Next page",children:[t.jsx("span",{className:"hidden sm:inline",children:"Next"}),t.jsx(Oe,{className:"w-4 h-4"})]})})]})})}const qe="_tabSelector_o9y1f_1",Ke="_metadataTags_o9y1f_8",Qe="_metadataTag_o9y1f_8",Xe="_metadataTagSource_o9y1f_32",Ye="_metadataTagType_o9y1f_43",et="_mapItem_o9y1f_54",tt="_mapItemImage_o9y1f_72",at="_mapItemContent_o9y1f_92",st="_mapItemTitle_o9y1f_97",it="_mapItemMetadata_o9y1f_105",nt="_fullSizeModalOverlay_o9y1f_134",lt="_fullSizeModalContent_o9y1f_148",rt="_ratingWarningContent_o9y1f_159",ot="_ratingWarningTitle_o9y1f_165",ct="_ratingWarningText_o9y1f_172",dt="_ratingWarningButtons_o9y1f_179",m={tabSelector:qe,metadataTags:Ke,metadataTag:Qe,metadataTagSource:Xe,metadataTagType:Ye,mapItem:et,mapItemImage:tt,mapItemContent:at,mapItemTitle:st,mapItemMetadata:it,fullSizeModalOverlay:nt,fullSizeModalContent:lt,ratingWarningContent:rt,ratingWarningTitle:ot,ratingWarningText:ct,ratingWarningButtons:dt};function ut(){const _=Le(),p=Me(),{isAuthenticated:T}=Be(),[z,te]=r.useState("explore"),[u,f]=r.useState([]),{search:I,srcFilter:h,catFilter:v,regionFilter:b,countryFilter:P,imageTypeFilter:D,uploadTypeFilter:O,showReferenceExamples:w,setShowReferenceExamples:ue}=Re(),[A,fe]=r.useState([]),[H,he]=r.useState([]),[ae,xe]=r.useState([]),[_e,ye]=r.useState([]),[se,je]=r.useState([]),[Ne,ie]=r.useState(!0),[L,ne]=r.useState(!0),[ve,V]=r.useState(!1),[be,G]=r.useState(!1),[we,Z]=r.useState(!1),[q,K]=r.useState(null),[Se,W]=r.useState(!1),[U,le]=r.useState(""),[Q,re]=r.useState(!1),[X,oe]=r.useState(1),[B]=r.useState(10),[Y,ce]=r.useState(0),[Te,de]=r.useState(0),Ie=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],M=r.useCallback(()=>{ne(!0),K(null);const e=new URLSearchParams({page:X.toString(),limit:B.toString(),include_count:"true"});I&&e.append("search",I),h&&e.append("source",h),v&&e.append("event_type",v),b&&e.append("region",b),P&&e.append("country",P),D&&e.append("image_type",D),O&&e.append("upload_type",O),w&&e.append("starred_only","true"),fetch(`/api/images/grouped?${e.toString()}`).then(s=>{if(!s.ok)throw new Error(`Failed to fetch images: ${s.status} ${s.statusText}`);return s.json()}).then(s=>{if(console.log("ExplorePage: Fetched captions:",s),s.items&&typeof s.total_count=="number")f(s.items),ce(s.total_count),de(Math.ceil(s.total_count/B));else if(Array.isArray(s))f(s);else throw new Error("Unexpected response format");K(null)}).catch(s=>{console.error("ExplorePage: Error fetching captions:",s),K(s instanceof Error?s.message:"Failed to load images. Please try again later."),f([]),ce(0),de(0)}).finally(()=>{ne(!1)})},[X,I,h,v,b,P,D,O,w,B]);r.useEffect(()=>{M()},[M]),r.useEffect(()=>{oe(1)},[I,h,v,b,P,D,O,w]),r.useEffect(()=>{const e=()=>{document.hidden||M()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[M]),r.useEffect(()=>{new URLSearchParams(p.search).get("export")==="true"&&(V(!0),_("/explore",{replace:!0}))},[p.search,_,I,h,v,b,P,D,w]),r.useEffect(()=>{ie(!0),Promise.all([fetch("/api/sources").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/regions").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/countries").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/image-types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()})]).then(([e,s,d,E,C])=>{fe(e),he(s),xe(d),ye(E),je(C)}).catch(()=>{}).finally(()=>{ie(!1)})},[]);const S=u,Ee=async(e,s="fine-tuning")=>{if(e.length===0){alert("No images to export");return}G(!0),Z(!1);try{const d=(await Ue(async()=>{const{default:i}=await import("./jszip.min-Du5pcDB6.js").then($=>$.j);return{default:i}},__vite__mapDeps([0,1,2]))).default,E=new d,C=e.filter(i=>i.image_type==="crisis_map"),R=e.filter(i=>i.image_type==="drone_image");if(C.length>0){const i=E.folder("crisis_maps_dataset"),$=i?.folder("images");if($){let F=1;for(const a of C)try{const y=a.image_count&&a.image_count>1?a.all_image_ids||[a.image_id]:[a.image_id],ee=y.map(async(n,x)=>{try{const l=await fetch(`/api/images/${n}/file`);if(!l.ok)throw new Error(`Failed to fetch image ${n}`);const o=await l.blob(),c=a.file_key.split(".").pop()||"jpg",g=`${String(F).padStart(4,"0")}_${String(x+1).padStart(2,"0")}.${c}`;return $.file(g,o),{success:!0,fileName:g,imageId:n}}catch(l){return console.error(`Failed to process image ${n}:`,l),{success:!1,fileName:"",imageId:n}}}),k=(await Promise.all(ee)).filter(n=>n.success);if(k.length>0){if(s==="fine-tuning"){const n=k.map(o=>`images/${o.fileName}`),x=Math.random(),l={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:y,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};if(!i)continue;if(x<.8){const o=i.file("train.jsonl");if(o){const c=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);c.push(l),i.file("train.jsonl",JSON.stringify(c,null,2))}else i.file("train.jsonl",JSON.stringify([l],null,2))}else if(x<.9){const o=i.file("test.jsonl");if(o){const c=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);c.push(l),i.file("test.jsonl",JSON.stringify(c,null,2))}else i.file("test.jsonl",JSON.stringify([l],null,2))}else{const o=i.file("val.jsonl");if(o){const c=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);c.push(l),i.file("val.jsonl",JSON.stringify(c,null,2))}else i.file("val.jsonl",JSON.stringify([l],null,2))}}else{const n=k.map(l=>`images/${l.fileName}`),x={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:y,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};i&&i.file(`${String(F).padStart(4,"0")}.json`,JSON.stringify(x,null,2))}F++}}catch(y){console.error(`Failed to process caption ${a.image_id}:`,y)}}}if(R.length>0){const i=E.folder("drone_images_dataset"),$=i?.folder("images");if($){let F=1;for(const a of R)try{const y=a.image_count&&a.image_count>1?a.all_image_ids||[a.image_id]:[a.image_id],ee=y.map(async(n,x)=>{try{const l=await fetch(`/api/images/${n}/file`);if(!l.ok)throw new Error(`Failed to fetch image ${n}`);const o=await l.blob(),c=a.file_key.split(".").pop()||"jpg",g=`${String(F).padStart(4,"0")}_${String(x+1).padStart(2,"0")}.${c}`;return $.file(g,o),{success:!0,fileName:g,imageId:n}}catch(l){return console.error(`Failed to process image ${n}:`,l),{success:!1,fileName:"",imageId:n}}}),k=(await Promise.all(ee)).filter(n=>n.success);if(k.length>0){if(s==="fine-tuning"){const n=k.map(o=>`images/${o.fileName}`),x=Math.random(),l={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:y,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};if(!i)continue;if(x<.8){const o=i.file("train.jsonl");if(o){const c=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);c.push(l),i.file("train.jsonl",JSON.stringify(c,null,2))}else i.file("train.jsonl",JSON.stringify([l],null,2))}else if(x<.9){const o=i.file("test.jsonl");if(o){const c=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);c.push(l),i.file("test.jsonl",JSON.stringify(c,null,2))}else i.file("test.jsonl",JSON.stringify([l],null,2))}else{const o=i.file("val.jsonl");if(o){const c=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);c.push(l),i.file("val.jsonl",JSON.stringify(c,null,2))}else i.file("val.jsonl",JSON.stringify([l],null,2))}}else{const n=k.map(l=>`images/${l.fileName}`),x={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:y,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};i&&i.file(`${String(F).padStart(4,"0")}.json`,JSON.stringify(x,null,2))}F++}}catch(y){console.error(`Failed to process caption ${a.image_id}:`,y)}}}const Fe=await E.generateAsync({type:"blob"}),me=URL.createObjectURL(Fe),J=document.createElement("a");J.href=me,J.download=`datasets_${s}_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(J),J.click(),document.body.removeChild(J),URL.revokeObjectURL(me);const ke=(C.length||0)+(R.length||0);console.log(`Exported ${s} datasets with ${ke} total images:`),C.length>0&&console.log(`- Crisis maps: ${C.length} images`),R.length>0&&console.log(`- Drone images: ${R.length} images`),Z(!0)}catch(d){console.error("Export failed:",d),alert("Failed to export dataset. Please try again.")}finally{G(!1)}},Ce=e=>{le(e),W(!0)},$e=async()=>{if(U){re(!0);try{console.log("Deleting image with ID:",U),(await fetch(`/api/images/${U}`,{method:"DELETE"})).ok?(f(s=>s.filter(d=>d.image_id!==U)),W(!1),le("")):(console.error("Delete failed"),alert("Failed to delete image. Please try again."))}catch(e){console.error("Delete failed:",e),alert("Failed to delete image. Please try again.")}finally{re(!1)}}};return t.jsxs(Je,{children:[L?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[60vh]",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsx(ge,{className:"text-ifrcRed"}),t.jsx("div",{children:"Loading examples..."})]})}):t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:m.tabSelector,children:[t.jsx(ze,{name:"explore-view",value:z,onChange:e=>{(e==="explore"||e==="mapDetails")&&(te(e),e==="mapDetails"&&u.length>0&&(u[0]?.image_id&&u[0].image_id!=="undefined"&&u[0].image_id!=="null"?_(`/map/${u[0].image_id}`):console.error("Invalid image_id for navigation:",u[0]?.image_id)))},options:Ie,keySelector:e=>e.key,labelSelector:e=>e.label}),t.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsxs(N,{name:"reference-examples",variant:w?"primary":"secondary",onClick:()=>ue(!w),className:"whitespace-nowrap",children:[t.jsx("span",{className:"mr-2",children:w?t.jsx("span",{className:"text-yellow-400",children:"★"}):t.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),t.jsx(N,{name:"export-dataset",variant:"secondary",onClick:()=>V(!0),children:"Export"})]})]}),z==="explore"?t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"mb-6 space-y-4",children:t.jsx("div",{className:"flex flex-wrap items-center gap-4",children:t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:t.jsx(Ae,{sources:A,types:H,regions:ae,countries:_e,imageTypes:se,isLoadingFilters:Ne})})})}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"flex justify-between items-center",children:t.jsxs("p",{className:"text-sm text-gray-600",children:[S.length," of ",Y," examples"]})}),L&&t.jsx("div",{className:"text-center py-12",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsx(ge,{className:"text-ifrcRed"}),t.jsx("div",{children:"Loading examples..."})]})}),!L&&q&&t.jsx("div",{className:"text-center py-12",children:t.jsx(j,{withInternalPadding:!0,className:"bg-red-50 border border-red-200 rounded-md max-w-2xl mx-auto",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsx("div",{className:"text-red-800 font-semibold text-lg",children:"Failed to Load Images"}),t.jsx("div",{className:"text-red-700",children:q}),t.jsx(N,{name:"retry-fetch",variant:"primary",onClick:()=>M(),children:"Retry"})]})})}),!L&&!q&&t.jsxs("div",{className:"space-y-4",children:[S.map(e=>t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("div",{className:`${m.mapItem} flex-1`,onClick:()=>{console.log("ExplorePage: Clicking on image with ID:",e.image_id),console.log("ExplorePage: Image data:",e),e.image_id&&e.image_id!=="undefined"&&e.image_id!=="null"?(console.log("ExplorePage: Navigating to:",`/map/${e.image_id}`),console.log("ExplorePage: Full navigation URL:",`/#/map/${e.image_id}`),_(`/map/${e.image_id}`)):(console.error("Invalid image_id for navigation:",e.image_id),console.error("Full item data:",JSON.stringify(e,null,2)),alert(`Cannot navigate: Invalid image ID (${e.image_id})`))},children:[t.jsx("div",{className:m.mapItemImage,style:{width:"120px",height:"80px"},children:e.thumbnail_url?t.jsxs(t.Fragment,{children:[console.log("ExplorePage: Using thumbnail for fast loading:",e.thumbnail_url),t.jsx("img",{src:e.thumbnail_url,alt:e.file_key,onError:s=>{console.error("ExplorePage: Thumbnail failed to load, falling back to original:",e.thumbnail_url);const d=s.target;e.image_url?d.src=e.image_url:(d.style.display="none",d.parentElement.innerHTML="Img")},onLoad:()=>console.log("ExplorePage: Thumbnail loaded successfully:",e.thumbnail_url)})]}):e.image_url?t.jsxs(t.Fragment,{children:[console.log("ExplorePage: No thumbnail available, using original image:",e.image_url),t.jsx("img",{src:e.image_url,alt:e.file_key,onError:s=>{console.error("ExplorePage: Original image failed to load:",e.image_url);const d=s.target;d.style.display="none",d.parentElement.innerHTML="Img"},onLoad:()=>console.log("ExplorePage: Original image loaded successfully:",e.image_url)})]}):t.jsxs(t.Fragment,{children:[console.log("ExplorePage: No image_url or thumbnail provided for item:",e),"'Img'"]})}),t.jsxs("div",{className:m.mapItemContent,children:[t.jsx("h3",{className:m.mapItemTitle,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{children:e.title||"Untitled"}),e.starred&&t.jsx("span",{className:"text-red-500 text-lg",title:"Starred image",children:"★"})]})}),t.jsx("div",{className:m.mapItemMetadata,children:t.jsxs("div",{className:m.metadataTags,children:[e.image_type!=="drone_image"&&t.jsx("span",{className:m.metadataTagSource,children:e.source&&e.source.includes(", ")?e.source.split(", ").map(s=>A.find(d=>d.s_code===s.trim())?.label||s.trim()).join(", "):A.find(s=>s.s_code===e.source)?.label||e.source}),t.jsx("span",{className:m.metadataTagType,children:e.event_type&&e.event_type.includes(", ")?e.event_type.split(", ").map(s=>H.find(d=>d.t_code===s.trim())?.label||s.trim()).join(", "):H.find(s=>s.t_code===e.event_type)?.label||e.event_type}),t.jsx("span",{className:m.metadataTag,children:se.find(s=>s.image_type===e.image_type)?.label||e.image_type}),e.image_count&&e.image_count>1&&t.jsxs("span",{className:m.metadataTag,title:`Multi-upload with ${e.image_count} images`,children:["📷 ",e.image_count]}),(!e.image_count||e.image_count<=1)&&t.jsx("span",{className:m.metadataTag,title:"Single Upload",children:"Single"}),e.countries&&e.countries.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:m.metadataTag,children:ae.find(s=>s.r_code===e.countries[0].r_code)?.label||"Unknown Region"}),t.jsx("span",{className:m.metadataTag,children:e.countries.map(s=>s.label).join(", ")})]})]})})]})]}),T&&t.jsx(j,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx(N,{name:`delete-${e.image_id}`,variant:"tertiary",size:1,className:"bg-red-50 hover:bg-red-100 text-red-700 border border-red-200 hover:border-red-300",onClick:()=>Ce(e.image_id),title:"Delete","aria-label":"Delete saved image",children:t.jsx(We,{className:"w-4 h-4"})})})]},e.image_id)),!S.length&&t.jsx("div",{className:"text-center py-12",children:t.jsx("p",{className:"text-gray-500",children:"No examples found."})}),!L&&S.length>0&&t.jsx(Ze,{currentPage:X,totalPages:Te,totalItems:Y,itemsPerPage:B,onPageChange:oe})]})]})]}):t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"text-center py-12",children:[t.jsx("p",{className:"text-gray-500",children:"Map Details view coming soon..."}),t.jsx("p",{className:"text-sm text-gray-400 mt-2",children:"This will show detailed information about individual maps"})]})})]}),Se&&t.jsx("div",{className:m.fullSizeModalOverlay,onClick:()=>W(!1),children:t.jsx("div",{className:m.fullSizeModalContent,onClick:e=>e.stopPropagation(),children:t.jsxs("div",{className:m.ratingWarningContent,children:[t.jsx("h3",{className:m.ratingWarningTitle,children:"Delete Image?"}),t.jsx("p",{className:m.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this saved image and all related data?"}),t.jsxs("div",{className:m.ratingWarningButtons,children:[t.jsx(N,{name:"confirm-delete",variant:"secondary",onClick:$e,disabled:Q,children:Q?"Deleting...":"Delete"}),t.jsx(N,{name:"cancel-delete",variant:"tertiary",onClick:()=>W(!1),disabled:Q,children:"Cancel"})]})]})})}),t.jsx(He,{isOpen:ve,onClose:()=>{V(!1),Z(!1),G(!1)},onExport:(e,s)=>{const d=S.filter(E=>s.includes(E.image_type));Ee(d,e)},filteredCount:S.length,totalCount:Y,hasFilters:!!(I||h||v||b||P||D||O||w),crisisMapsCount:S.filter(e=>e.image_type==="crisis_map").length,droneImagesCount:S.filter(e=>e.image_type==="drone_image").length,isLoading:be,exportSuccess:we})]})}export{ut as default}; diff --git a/py_backend/static/assets/index-w0OOMPwN.js b/py_backend/static/assets/index-DuuohOak.js similarity index 88% rename from py_backend/static/assets/index-w0OOMPwN.js rename to py_backend/static/assets/index-DuuohOak.js index 69b011adc8da6849a9bfc60331f746ae0e870a39..533e6b8c1499415ba020a977997a8ee4d24c7d3b 100644 --- a/py_backend/static/assets/index-w0OOMPwN.js +++ b/py_backend/static/assets/index-DuuohOak.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D3L5y9N7.js","assets/index-B1uKTNcW.css","assets/index-hD4RFL5O.js","assets/useAdmin-avReXN15.js","assets/ExportModal-C5df6JIW.js","assets/ExportModal-BoB3JpqO.css","assets/index-C85X4vtS.css","assets/AdminPage-DLWomD88.js","assets/AdminPage-VgSjQ50W.css","assets/index-BTevbmbp.js","assets/index-tDgjKyWF.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index--kE6PMOO.js","assets/index-B1uKTNcW.css","assets/index-DYN5AjU6.js","assets/useAdmin-Cd7hRYKP.js","assets/ExportModal-B89pVxH6.js","assets/ExportModal-BoB3JpqO.css","assets/index-C85X4vtS.css","assets/AdminPage-Cm0ZXhfF.js","assets/AdminPage-VgSjQ50W.css","assets/index-Ccygiftu.js","assets/index-tDgjKyWF.css"])))=>i.map(i=>d[i]); function zg(e,n){for(var i=0;io[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function i(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=i(s);fetch(s.href,u)}})();var kP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kc={exports:{}},Ra={},Yc={exports:{}},qe={};/** * @license React * react.production.min.js @@ -7,7 +7,7 @@ function zg(e,n){for(var i=0;i>>1,oe=G[H];if(0>>1;Hs(re,T))ees(Q,re)?(G[H]=Q,G[ee]=T,H=ee):(G[H]=re,G[se]=T,H=se);else if(ees(Q,T))G[H]=Q,G[ee]=T,H=ee;else break e}}return ue}function s(G,ue){var T=G.sortIndex-ue.sortIndex;return T!==0?T:G.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var p=[],y=[],w=1,C=null,m=3,x=!1,E=!1,b=!1,N=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(G){for(var ue=i(y);ue!==null;){if(ue.callback===null)o(y);else if(ue.startTime<=G)o(y),ue.sortIndex=ue.expirationTime,n(p,ue);else break;ue=i(y)}}function q(G){if(b=!1,$(G),!E)if(i(p)!==null)E=!0,Ce(Z);else{var ue=i(y);ue!==null&&_e(q,ue.startTime-G)}}function Z(G,ue){E=!1,b&&(b=!1,P(K),K=-1),x=!0;var T=m;try{for($(ue),C=i(p);C!==null&&(!(C.expirationTime>ue)||G&&!I());){var H=C.callback;if(typeof H=="function"){C.callback=null,m=C.priorityLevel;var oe=H(C.expirationTime<=ue);ue=e.unstable_now(),typeof oe=="function"?C.callback=oe:C===i(p)&&o(p),$(ue)}else o(p);C=i(p)}if(C!==null)var Se=!0;else{var se=i(y);se!==null&&_e(q,se.startTime-ue),Se=!1}return Se}finally{C=null,m=T,x=!1}}var fe=!1,O=null,K=-1,ce=5,de=-1;function I(){return!(e.unstable_now()-deG||125H?(G.sortIndex=T,n(y,G),i(p)===null&&G===i(y)&&(b?(P(K),K=-1):b=!0,_e(q,T-H))):(G.sortIndex=oe,n(p,G),E||x||(E=!0,Ce(Z))),G},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(G){var ue=m;return function(){var T=m;m=ue;try{return G.apply(this,arguments)}finally{m=T}}}}(ed)),ed}var fm;function B1(){return fm||(fm=1,Jc.exports=z1()),Jc.exports}/** + */var dm;function z1(){return dm||(dm=1,function(e){function n(G,ue){var T=G.length;G.push(ue);e:for(;0>>1,oe=G[V];if(0>>1;Vs(re,T))ees(Q,re)?(G[V]=Q,G[ee]=T,V=ee):(G[V]=re,G[se]=T,V=se);else if(ees(Q,T))G[V]=Q,G[ee]=T,V=ee;else break e}}return ue}function s(G,ue){var T=G.sortIndex-ue.sortIndex;return T!==0?T:G.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var p=[],y=[],w=1,C=null,m=3,x=!1,N=!1,b=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(G){for(var ue=i(y);ue!==null;){if(ue.callback===null)o(y);else if(ue.startTime<=G)o(y),ue.sortIndex=ue.expirationTime,n(p,ue);else break;ue=i(y)}}function H(G){if(b=!1,$(G),!N)if(i(p)!==null)N=!0,Ce(Z);else{var ue=i(y);ue!==null&&_e(H,ue.startTime-G)}}function Z(G,ue){N=!1,b&&(b=!1,P(K),K=-1),x=!0;var T=m;try{for($(ue),C=i(p);C!==null&&(!(C.expirationTime>ue)||G&&!I());){var V=C.callback;if(typeof V=="function"){C.callback=null,m=C.priorityLevel;var oe=V(C.expirationTime<=ue);ue=e.unstable_now(),typeof oe=="function"?C.callback=oe:C===i(p)&&o(p),$(ue)}else o(p);C=i(p)}if(C!==null)var Se=!0;else{var se=i(y);se!==null&&_e(H,se.startTime-ue),Se=!1}return Se}finally{C=null,m=T,x=!1}}var de=!1,O=null,K=-1,ce=5,fe=-1;function I(){return!(e.unstable_now()-feG||125V?(G.sortIndex=T,n(y,G),i(p)===null&&G===i(y)&&(b?(P(K),K=-1):b=!0,_e(H,T-V))):(G.sortIndex=oe,n(p,G),N||x||(N=!0,Ce(Z))),G},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(G){var ue=m;return function(){var T=m;m=ue;try{return G.apply(this,arguments)}finally{m=T}}}}(ed)),ed}var fm;function B1(){return fm||(fm=1,Jc.exports=z1()),Jc.exports}/** * @license React * react-dom.production.min.js * @@ -31,14 +31,14 @@ function zg(e,n){for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},C={};function m(t){return p.call(C,t)?!0:p.call(w,t)?!1:y.test(t)?C[t]=!0:(w[t]=!0,!1)}function x(t,r,a,l){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:a!==null?!a.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function E(t,r,a,l){if(r===null||typeof r>"u"||x(t,r,a,l))return!0;if(l)return!1;if(a!==null)switch(a.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function b(t,r,a,l,c,h,S){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=a,this.propertyName=t,this.type=r,this.sanitizeURL=h,this.removeEmptyString=S}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){N[t]=new b(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];N[r]=new b(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){N[t]=new b(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){N[t]=new b(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){N[t]=new b(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){N[t]=new b(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){N[t]=new b(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){N[t]=new b(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){N[t]=new b(t,5,!1,t.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function L(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var r=t.replace(P,L);N[r]=new b(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(P,L);N[r]=new b(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(P,L);N[r]=new b(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){N[t]=new b(t,1,!1,t.toLowerCase(),null,!1,!1)}),N.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){N[t]=new b(t,1,!1,t.toLowerCase(),null,!0,!0)});function $(t,r,a,l){var c=N.hasOwnProperty(r)?N[r]:null;(c!==null?c.type!==0:l||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},C={};function m(t){return p.call(C,t)?!0:p.call(w,t)?!1:y.test(t)?C[t]=!0:(w[t]=!0,!1)}function x(t,r,a,l){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:a!==null?!a.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function N(t,r,a,l){if(r===null||typeof r>"u"||x(t,r,a,l))return!0;if(l)return!1;if(a!==null)switch(a.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function b(t,r,a,l,c,h,S){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=a,this.propertyName=t,this.type=r,this.sanitizeURL=h,this.removeEmptyString=S}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){E[t]=new b(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];E[r]=new b(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){E[t]=new b(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){E[t]=new b(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){E[t]=new b(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){E[t]=new b(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){E[t]=new b(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){E[t]=new b(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){E[t]=new b(t,5,!1,t.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function L(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var r=t.replace(P,L);E[r]=new b(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(P,L);E[r]=new b(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(P,L);E[r]=new b(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){E[t]=new b(t,1,!1,t.toLowerCase(),null,!1,!1)}),E.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){E[t]=new b(t,1,!1,t.toLowerCase(),null,!0,!0)});function $(t,r,a,l){var c=E.hasOwnProperty(r)?E[r]:null;(c!==null?c.type!==0:l||!(2_||c[S]!==h[_]){var M=` -`+c[S].replace(" at new "," at ");return t.displayName&&M.includes("")&&(M=M.replace("",t.displayName)),M}while(1<=S&&0<=_);break}}}finally{Se=!1,Error.prepareStackTrace=a}return(t=t?t.displayName||t.name:"")?oe(t):""}function re(t){switch(t.tag){case 5:return oe(t.type);case 16:return oe("Lazy");case 13:return oe("Suspense");case 19:return oe("SuspenseList");case 0:case 2:case 15:return t=se(t.type,!1),t;case 11:return t=se(t.type.render,!1),t;case 1:return t=se(t.type,!0),t;default:return""}}function ee(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case fe:return"Portal";case ce:return"Profiler";case K:return"StrictMode";case W:return"Suspense";case ne:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case I:return(t.displayName||"Context")+".Consumer";case de:return(t._context.displayName||"Context")+".Provider";case U:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case he:return r=t.displayName||null,r!==null?r:ee(t.type)||"Memo";case Ce:r=t._payload,t=t._init;try{return ee(t(r))}catch{}}return null}function Q(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ee(r);case 8:return r===K?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Y(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function et(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function tn(t){var r=et(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),l=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var c=a.get,h=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return c.call(this)},set:function(S){l=""+S,h.call(this,S)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Wt(t){t._valueTracker||(t._valueTracker=tn(t))}function ot(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),l="";return t&&(l=et(t)?t.checked?"true":"false":t.value),t=l,t!==a?(r.setValue(t),!0):!1}function bt(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function st(t,r){var a=r.checked;return T({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??t._wrapperState.initialChecked})}function wt(t,r){var a=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;a=Y(r.value!=null?r.value:a),t._wrapperState={initialChecked:l,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function ft(t,r){r=r.checked,r!=null&&$(t,"checked",r,!1)}function ht(t,r){ft(t,r);var a=Y(r.value),l=r.type;if(a!=null)l==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+a):t.value!==""+a&&(t.value=""+a);else if(l==="submit"||l==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?nn(t,r.type,a):r.hasOwnProperty("defaultValue")&&nn(t,r.type,Y(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function xt(t,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,a||r===t.value||(t.value=r),t.defaultValue=r}a=t.name,a!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,a!==""&&(t.name=a)}function nn(t,r,a){(r!=="number"||bt(t.ownerDocument)!==t)&&(a==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+a&&(t.defaultValue=""+a))}var Tn=Array.isArray;function ln(t,r,a,l){if(t=t.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=lt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function Qt(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kt=["Webkit","ms","Moz","O"];Object.keys(pt).forEach(function(t){Kt.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),pt[r]=pt[t]})});function dn(t,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||pt.hasOwnProperty(t)&&pt[t]?(""+r).trim():r+"px"}function ji(t,r){t=t.style;for(var a in r)if(r.hasOwnProperty(a)){var l=a.indexOf("--")===0,c=dn(a,r[a],l);a==="float"&&(a="cssFloat"),l?t.setProperty(a,c):t[a]=c}}var Pi=T({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kr(t,r){if(r){if(Pi[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(i(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(i(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(i(61))}if(r.style!=null&&typeof r.style!="object")throw Error(i(62))}}function Nr(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tr=null;function $n(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var jr=null,fn=null,rn=null;function Mi(t){if(t=xa(t)){if(typeof jr!="function")throw Error(i(280));var r=t.stateNode;r&&(r=As(r),jr(t.stateNode,t.type,r))}}function Li(t){fn?rn?rn.push(t):rn=[t]:fn=t}function ei(){if(fn){var t=fn,r=rn;if(rn=fn=null,Mi(t),r)for(t=0;t>>=0,t===0?32:31-(pr(t)/Dr|0)|0}var po=64,mo=4194304;function Ri(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ni(t,r){var a=t.pendingLanes;if(a===0)return 0;var l=0,c=t.suspendedLanes,h=t.pingedLanes,S=a&268435455;if(S!==0){var _=S&~c;_!==0?l=Ri(_):(h&=S,h!==0&&(l=Ri(h)))}else S=a&~c,S!==0?l=Ri(S):h!==0&&(l=Ri(h));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,h=r&-r,c>=h||c===16&&(h&4194240)!==0))return r;if((l&4)!==0&&(l|=a&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=l;0a;a++)r.push(t);return r}function Ii(t,r,a){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Ze(r),t[r]=a}function _u(t,r){var a=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var l=t.eventTimes;for(t=t.expirationTimes;0=da),Jf=" ",eh=!1;function th(t,r){switch(t){case"keyup":return My.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var wo=!1;function Dy(t,r){switch(t){case"compositionend":return nh(r);case"keypress":return r.which!==32?null:(eh=!0,Jf);case"textInput":return t=r.data,t===Jf&&eh?null:t;default:return null}}function Oy(t,r){if(wo)return t==="compositionend"||!Pu&&th(t,r)?(t=Ot(),Re=pe=ke=null,wo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:a,offset:r-t};t=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=uh(a)}}function dh(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?dh(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function fh(){for(var t=window,r=bt();r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=bt(t.document)}return r}function Du(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function Hy(t){var r=fh(),a=t.focusedElem,l=t.selectionRange;if(r!==a&&a&&a.ownerDocument&&dh(a.ownerDocument.documentElement,a)){if(l!==null&&Du(a)){if(r=l.start,t=l.end,t===void 0&&(t=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(t,a.value.length);else if(t=(r=a.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var c=a.textContent.length,h=Math.min(l.start,c);l=l.end===void 0?h:Math.min(l.end,c),!t.extend&&h>l&&(c=l,l=h,h=c),c=ch(a,h);var S=ch(a,l);c&&S&&(t.rangeCount!==1||t.anchorNode!==c.node||t.anchorOffset!==c.offset||t.focusNode!==S.node||t.focusOffset!==S.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),t.removeAllRanges(),h>l?(t.addRange(r),t.extend(S.node,S.offset)):(r.setEnd(S.node,S.offset),t.addRange(r)))}}for(r=[],t=a;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,xo=null,Ou=null,ma=null,Ru=!1;function hh(t,r,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ru||xo==null||xo!==bt(l)||(l=xo,"selectionStart"in l&&Du(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ma&&pa(ma,l)||(ma=l,l=Os(Ou,"onSelect"),0Eo||(t.current=Gu[Eo],Gu[Eo]=null,Eo--)}function mt(t,r){Eo++,Gu[Eo]=t.current,t.current=r}var ci={},Yt=ui(ci),vn=ui(!1),Hi=ci;function ko(t,r){var a=t.type.contextTypes;if(!a)return ci;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in a)c[h]=r[h];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=c),c}function yn(t){return t=t.childContextTypes,t!=null}function Fs(){yt(vn),yt(Yt)}function Th(t,r,a){if(Yt.current!==ci)throw Error(i(168));mt(Yt,r),mt(vn,a)}function jh(t,r,a){var l=t.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return a;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(i(108,Q(t)||"Unknown",c));return T({},a,l)}function $s(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ci,Hi=Yt.current,mt(Yt,t),mt(vn,vn.current),!0}function Ph(t,r,a){var l=t.stateNode;if(!l)throw Error(i(169));a?(t=jh(t,r,Hi),l.__reactInternalMemoizedMergedChildContext=t,yt(vn),yt(Yt),mt(Yt,t)):yt(vn),mt(vn,a)}var Fr=null,zs=!1,Zu=!1;function Mh(t){Fr===null?Fr=[t]:Fr.push(t)}function t1(t){zs=!0,Mh(t)}function di(){if(!Zu&&Fr!==null){Zu=!0;var t=0,r=tt;try{var a=Fr;for(tt=1;t>=S,c-=S,$r=1<<32-Ze(r)+c|a<Ie?(Ut=De,De=null):Ut=De.sibling;var Je=J(A,De,F[Ie],ae);if(Je===null){De===null&&(De=Ut);break}t&&De&&Je.alternate===null&&r(A,De),D=h(Je,D,Ie),Le===null?je=Je:Le.sibling=Je,Le=Je,De=Ut}if(Ie===F.length)return a(A,De),Ct&&qi(A,Ie),je;if(De===null){for(;IeIe?(Ut=De,De=null):Ut=De.sibling;var xi=J(A,De,Je.value,ae);if(xi===null){De===null&&(De=Ut);break}t&&De&&xi.alternate===null&&r(A,De),D=h(xi,D,Ie),Le===null?je=xi:Le.sibling=xi,Le=xi,De=Ut}if(Je.done)return a(A,De),Ct&&qi(A,Ie),je;if(De===null){for(;!Je.done;Ie++,Je=F.next())Je=ie(A,Je.value,ae),Je!==null&&(D=h(Je,D,Ie),Le===null?je=Je:Le.sibling=Je,Le=Je);return Ct&&qi(A,Ie),je}for(De=l(A,De);!Je.done;Ie++,Je=F.next())Je=me(De,A,Ie,Je.value,ae),Je!==null&&(t&&Je.alternate!==null&&De.delete(Je.key===null?Ie:Je.key),D=h(Je,D,Ie),Le===null?je=Je:Le.sibling=Je,Le=Je);return t&&De.forEach(function(R1){return r(A,R1)}),Ct&&qi(A,Ie),je}function Mt(A,D,F,ae){if(typeof F=="object"&&F!==null&&F.type===O&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case Z:e:{for(var je=F.key,Le=D;Le!==null;){if(Le.key===je){if(je=F.type,je===O){if(Le.tag===7){a(A,Le.sibling),D=c(Le,F.props.children),D.return=A,A=D;break e}}else if(Le.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===Ce&&qh(je)===Le.type){a(A,Le.sibling),D=c(Le,F.props),D.ref=Ca(A,Le,F),D.return=A,A=D;break e}a(A,Le);break}else r(A,Le);Le=Le.sibling}F.type===O?(D=Ji(F.props.children,A.mode,ae,F.key),D.return=A,A=D):(ae=pl(F.type,F.key,F.props,null,A.mode,ae),ae.ref=Ca(A,D,F),ae.return=A,A=ae)}return S(A);case fe:e:{for(Le=F.key;D!==null;){if(D.key===Le)if(D.tag===4&&D.stateNode.containerInfo===F.containerInfo&&D.stateNode.implementation===F.implementation){a(A,D.sibling),D=c(D,F.children||[]),D.return=A,A=D;break e}else{a(A,D);break}else r(A,D);D=D.sibling}D=qc(F,A.mode,ae),D.return=A,A=D}return S(A);case Ce:return Le=F._init,Mt(A,D,Le(F._payload),ae)}if(Tn(F))return be(A,D,F,ae);if(ue(F))return Te(A,D,F,ae);Qs(A,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,D!==null&&D.tag===6?(a(A,D.sibling),D=c(D,F),D.return=A,A=D):(a(A,D),D=Vc(F,A.mode,ae),D.return=A,A=D),S(A)):a(A,D)}return Mt}var Lo=Wh(!0),Gh=Wh(!1),Sa={},vr=ui(Sa),ba=ui(Sa),_a=ui(Sa);function Gi(t){if(t===Sa)throw Error(i(174));return t}function lc(t,r){switch(mt(_a,r),mt(ba,t),mt(vr,Sa),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Kn(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Kn(r,t)}yt(vr),mt(vr,r)}function Do(){yt(vr),yt(ba),yt(_a)}function Zh(t){Gi(_a.current);var r=Gi(vr.current),a=Kn(r,t.type);r!==a&&(mt(ba,t),mt(vr,a))}function uc(t){ba.current===t&&(yt(vr),yt(ba))}var Et=ui(0);function Ks(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var cc=[];function dc(){for(var t=0;ta?a:4,t(!0);var l=fc.transition;fc.transition={};try{t(!1),r()}finally{tt=a,fc.transition=l}}function fp(){return Wn().memoizedState}function o1(t,r,a){var l=vi(t);if(a={lane:l,action:a,hasEagerState:!1,eagerState:null,next:null},hp(t))pp(r,a);else if(a=Ah(t,r,a,l),a!==null){var c=an();ur(a,t,l,c),mp(a,r,l)}}function a1(t,r,a){var l=vi(t),c={lane:l,action:a,hasEagerState:!1,eagerState:null,next:null};if(hp(t))pp(r,c);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var S=r.lastRenderedState,_=h(S,a);if(c.hasEagerState=!0,c.eagerState=_,ir(_,S)){var M=r.interleaved;M===null?(c.next=c,ic(r)):(c.next=M.next,M.next=c),r.interleaved=c;return}}catch{}finally{}a=Ah(t,r,c,l),a!==null&&(c=an(),ur(a,t,l,c),mp(a,r,l))}}function hp(t){var r=t.alternate;return t===kt||r!==null&&r===kt}function pp(t,r){Ea=Xs=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function mp(t,r,a){if((a&4194240)!==0){var l=r.lanes;l&=t.pendingLanes,a|=l,r.lanes=a,sa(t,a)}}var tl={readContext:qn,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useInsertionEffect:Xt,useLayoutEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useMutableSource:Xt,useSyncExternalStore:Xt,useId:Xt,unstable_isNewReconciler:!1},s1={readContext:qn,useCallback:function(t,r){return yr().memoizedState=[t,r===void 0?null:r],t},useContext:qn,useEffect:ip,useImperativeHandle:function(t,r,a){return a=a!=null?a.concat([t]):null,Js(4194308,4,sp.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Js(4194308,4,t,r)},useInsertionEffect:function(t,r){return Js(4,2,t,r)},useMemo:function(t,r){var a=yr();return r=r===void 0?null:r,t=t(),a.memoizedState=[t,r],t},useReducer:function(t,r,a){var l=yr();return r=a!==void 0?a(r):r,l.memoizedState=l.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},l.queue=t,t=t.dispatch=o1.bind(null,kt,t),[l.memoizedState,t]},useRef:function(t){var r=yr();return t={current:t},r.memoizedState=t},useState:np,useDebugValue:wc,useDeferredValue:function(t){return yr().memoizedState=t},useTransition:function(){var t=np(!1),r=t[0];return t=i1.bind(null,t[1]),yr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,a){var l=kt,c=yr();if(Ct){if(a===void 0)throw Error(i(407));a=a()}else{if(a=r(),Bt===null)throw Error(i(349));(Zi&30)!==0||Yh(l,r,a)}c.memoizedState=a;var h={value:a,getSnapshot:r};return c.queue=h,ip(Jh.bind(null,l,h,t),[t]),l.flags|=2048,Ta(9,Xh.bind(null,l,h,a,r),void 0,null),a},useId:function(){var t=yr(),r=Bt.identifierPrefix;if(Ct){var a=zr,l=$r;a=(l&~(1<<32-Ze(l)-1)).toString(32)+a,r=":"+r+"R"+a,a=ka++,0")&&(M=M.replace("",t.displayName)),M}while(1<=S&&0<=_);break}}}finally{Se=!1,Error.prepareStackTrace=a}return(t=t?t.displayName||t.name:"")?oe(t):""}function re(t){switch(t.tag){case 5:return oe(t.type);case 16:return oe("Lazy");case 13:return oe("Suspense");case 19:return oe("SuspenseList");case 0:case 2:case 15:return t=se(t.type,!1),t;case 11:return t=se(t.type.render,!1),t;case 1:return t=se(t.type,!0),t;default:return""}}function ee(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case de:return"Portal";case ce:return"Profiler";case K:return"StrictMode";case W:return"Suspense";case ne:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case I:return(t.displayName||"Context")+".Consumer";case fe:return(t._context.displayName||"Context")+".Provider";case U:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case he:return r=t.displayName||null,r!==null?r:ee(t.type)||"Memo";case Ce:r=t._payload,t=t._init;try{return ee(t(r))}catch{}}return null}function Q(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ee(r);case 8:return r===K?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Y(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function et(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function tn(t){var r=et(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),l=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var c=a.get,h=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return c.call(this)},set:function(S){l=""+S,h.call(this,S)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Wt(t){t._valueTracker||(t._valueTracker=tn(t))}function ot(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),l="";return t&&(l=et(t)?t.checked?"true":"false":t.value),t=l,t!==a?(r.setValue(t),!0):!1}function bt(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function st(t,r){var a=r.checked;return T({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??t._wrapperState.initialChecked})}function wt(t,r){var a=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;a=Y(r.value!=null?r.value:a),t._wrapperState={initialChecked:l,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function ft(t,r){r=r.checked,r!=null&&$(t,"checked",r,!1)}function ht(t,r){ft(t,r);var a=Y(r.value),l=r.type;if(a!=null)l==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+a):t.value!==""+a&&(t.value=""+a);else if(l==="submit"||l==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?nn(t,r.type,a):r.hasOwnProperty("defaultValue")&&nn(t,r.type,Y(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function xt(t,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,a||r===t.value||(t.value=r),t.defaultValue=r}a=t.name,a!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,a!==""&&(t.name=a)}function nn(t,r,a){(r!=="number"||bt(t.ownerDocument)!==t)&&(a==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+a&&(t.defaultValue=""+a))}var Tn=Array.isArray;function ln(t,r,a,l){if(t=t.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=lt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function Qt(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kt=["Webkit","ms","Moz","O"];Object.keys(pt).forEach(function(t){Kt.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),pt[r]=pt[t]})});function dn(t,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||pt.hasOwnProperty(t)&&pt[t]?(""+r).trim():r+"px"}function ji(t,r){t=t.style;for(var a in r)if(r.hasOwnProperty(a)){var l=a.indexOf("--")===0,c=dn(a,r[a],l);a==="float"&&(a="cssFloat"),l?t.setProperty(a,c):t[a]=c}}var Pi=T({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kr(t,r){if(r){if(Pi[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(i(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(i(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(i(61))}if(r.style!=null&&typeof r.style!="object")throw Error(i(62))}}function Nr(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tr=null;function $n(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var jr=null,fn=null,rn=null;function Mi(t){if(t=xa(t)){if(typeof jr!="function")throw Error(i(280));var r=t.stateNode;r&&(r=As(r),jr(t.stateNode,t.type,r))}}function Li(t){fn?rn?rn.push(t):rn=[t]:fn=t}function ei(){if(fn){var t=fn,r=rn;if(rn=fn=null,Mi(t),r)for(t=0;t>>=0,t===0?32:31-(pr(t)/Dr|0)|0}var po=64,mo=4194304;function Ri(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ni(t,r){var a=t.pendingLanes;if(a===0)return 0;var l=0,c=t.suspendedLanes,h=t.pingedLanes,S=a&268435455;if(S!==0){var _=S&~c;_!==0?l=Ri(_):(h&=S,h!==0&&(l=Ri(h)))}else S=a&~c,S!==0?l=Ri(S):h!==0&&(l=Ri(h));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,h=r&-r,c>=h||c===16&&(h&4194240)!==0))return r;if((l&4)!==0&&(l|=a&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=l;0a;a++)r.push(t);return r}function Ii(t,r,a){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Ze(r),t[r]=a}function _u(t,r){var a=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var l=t.eventTimes;for(t=t.expirationTimes;0=da),Jf=" ",eh=!1;function th(t,r){switch(t){case"keyup":return My.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var wo=!1;function Dy(t,r){switch(t){case"compositionend":return nh(r);case"keypress":return r.which!==32?null:(eh=!0,Jf);case"textInput":return t=r.data,t===Jf&&eh?null:t;default:return null}}function Oy(t,r){if(wo)return t==="compositionend"||!Pu&&th(t,r)?(t=Ot(),Re=pe=ke=null,wo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:a,offset:r-t};t=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=uh(a)}}function dh(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?dh(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function fh(){for(var t=window,r=bt();r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=bt(t.document)}return r}function Du(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function Hy(t){var r=fh(),a=t.focusedElem,l=t.selectionRange;if(r!==a&&a&&a.ownerDocument&&dh(a.ownerDocument.documentElement,a)){if(l!==null&&Du(a)){if(r=l.start,t=l.end,t===void 0&&(t=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(t,a.value.length);else if(t=(r=a.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var c=a.textContent.length,h=Math.min(l.start,c);l=l.end===void 0?h:Math.min(l.end,c),!t.extend&&h>l&&(c=l,l=h,h=c),c=ch(a,h);var S=ch(a,l);c&&S&&(t.rangeCount!==1||t.anchorNode!==c.node||t.anchorOffset!==c.offset||t.focusNode!==S.node||t.focusOffset!==S.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),t.removeAllRanges(),h>l?(t.addRange(r),t.extend(S.node,S.offset)):(r.setEnd(S.node,S.offset),t.addRange(r)))}}for(r=[],t=a;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,xo=null,Ou=null,ma=null,Ru=!1;function hh(t,r,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ru||xo==null||xo!==bt(l)||(l=xo,"selectionStart"in l&&Du(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ma&&pa(ma,l)||(ma=l,l=Os(Ou,"onSelect"),0Eo||(t.current=Gu[Eo],Gu[Eo]=null,Eo--)}function mt(t,r){Eo++,Gu[Eo]=t.current,t.current=r}var ci={},Yt=ui(ci),vn=ui(!1),Hi=ci;function ko(t,r){var a=t.type.contextTypes;if(!a)return ci;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in a)c[h]=r[h];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=c),c}function yn(t){return t=t.childContextTypes,t!=null}function Fs(){yt(vn),yt(Yt)}function Th(t,r,a){if(Yt.current!==ci)throw Error(i(168));mt(Yt,r),mt(vn,a)}function jh(t,r,a){var l=t.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return a;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(i(108,Q(t)||"Unknown",c));return T({},a,l)}function $s(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ci,Hi=Yt.current,mt(Yt,t),mt(vn,vn.current),!0}function Ph(t,r,a){var l=t.stateNode;if(!l)throw Error(i(169));a?(t=jh(t,r,Hi),l.__reactInternalMemoizedMergedChildContext=t,yt(vn),yt(Yt),mt(Yt,t)):yt(vn),mt(vn,a)}var Fr=null,zs=!1,Zu=!1;function Mh(t){Fr===null?Fr=[t]:Fr.push(t)}function t1(t){zs=!0,Mh(t)}function di(){if(!Zu&&Fr!==null){Zu=!0;var t=0,r=tt;try{var a=Fr;for(tt=1;t>=S,c-=S,$r=1<<32-Ze(r)+c|a<Ie?(Ut=De,De=null):Ut=De.sibling;var Je=J(A,De,F[Ie],ae);if(Je===null){De===null&&(De=Ut);break}t&&De&&Je.alternate===null&&r(A,De),D=h(Je,D,Ie),Le===null?je=Je:Le.sibling=Je,Le=Je,De=Ut}if(Ie===F.length)return a(A,De),Ct&&qi(A,Ie),je;if(De===null){for(;IeIe?(Ut=De,De=null):Ut=De.sibling;var xi=J(A,De,Je.value,ae);if(xi===null){De===null&&(De=Ut);break}t&&De&&xi.alternate===null&&r(A,De),D=h(xi,D,Ie),Le===null?je=xi:Le.sibling=xi,Le=xi,De=Ut}if(Je.done)return a(A,De),Ct&&qi(A,Ie),je;if(De===null){for(;!Je.done;Ie++,Je=F.next())Je=ie(A,Je.value,ae),Je!==null&&(D=h(Je,D,Ie),Le===null?je=Je:Le.sibling=Je,Le=Je);return Ct&&qi(A,Ie),je}for(De=l(A,De);!Je.done;Ie++,Je=F.next())Je=me(De,A,Ie,Je.value,ae),Je!==null&&(t&&Je.alternate!==null&&De.delete(Je.key===null?Ie:Je.key),D=h(Je,D,Ie),Le===null?je=Je:Le.sibling=Je,Le=Je);return t&&De.forEach(function(R1){return r(A,R1)}),Ct&&qi(A,Ie),je}function Mt(A,D,F,ae){if(typeof F=="object"&&F!==null&&F.type===O&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case Z:e:{for(var je=F.key,Le=D;Le!==null;){if(Le.key===je){if(je=F.type,je===O){if(Le.tag===7){a(A,Le.sibling),D=c(Le,F.props.children),D.return=A,A=D;break e}}else if(Le.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===Ce&&qh(je)===Le.type){a(A,Le.sibling),D=c(Le,F.props),D.ref=Ca(A,Le,F),D.return=A,A=D;break e}a(A,Le);break}else r(A,Le);Le=Le.sibling}F.type===O?(D=Ji(F.props.children,A.mode,ae,F.key),D.return=A,A=D):(ae=pl(F.type,F.key,F.props,null,A.mode,ae),ae.ref=Ca(A,D,F),ae.return=A,A=ae)}return S(A);case de:e:{for(Le=F.key;D!==null;){if(D.key===Le)if(D.tag===4&&D.stateNode.containerInfo===F.containerInfo&&D.stateNode.implementation===F.implementation){a(A,D.sibling),D=c(D,F.children||[]),D.return=A,A=D;break e}else{a(A,D);break}else r(A,D);D=D.sibling}D=qc(F,A.mode,ae),D.return=A,A=D}return S(A);case Ce:return Le=F._init,Mt(A,D,Le(F._payload),ae)}if(Tn(F))return be(A,D,F,ae);if(ue(F))return Te(A,D,F,ae);Qs(A,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,D!==null&&D.tag===6?(a(A,D.sibling),D=c(D,F),D.return=A,A=D):(a(A,D),D=Vc(F,A.mode,ae),D.return=A,A=D),S(A)):a(A,D)}return Mt}var Lo=Wh(!0),Gh=Wh(!1),Sa={},vr=ui(Sa),ba=ui(Sa),_a=ui(Sa);function Gi(t){if(t===Sa)throw Error(i(174));return t}function lc(t,r){switch(mt(_a,r),mt(ba,t),mt(vr,Sa),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Kn(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Kn(r,t)}yt(vr),mt(vr,r)}function Do(){yt(vr),yt(ba),yt(_a)}function Zh(t){Gi(_a.current);var r=Gi(vr.current),a=Kn(r,t.type);r!==a&&(mt(ba,t),mt(vr,a))}function uc(t){ba.current===t&&(yt(vr),yt(ba))}var Et=ui(0);function Ks(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var cc=[];function dc(){for(var t=0;ta?a:4,t(!0);var l=fc.transition;fc.transition={};try{t(!1),r()}finally{tt=a,fc.transition=l}}function fp(){return Wn().memoizedState}function o1(t,r,a){var l=vi(t);if(a={lane:l,action:a,hasEagerState:!1,eagerState:null,next:null},hp(t))pp(r,a);else if(a=Ah(t,r,a,l),a!==null){var c=an();ur(a,t,l,c),mp(a,r,l)}}function a1(t,r,a){var l=vi(t),c={lane:l,action:a,hasEagerState:!1,eagerState:null,next:null};if(hp(t))pp(r,c);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var S=r.lastRenderedState,_=h(S,a);if(c.hasEagerState=!0,c.eagerState=_,ir(_,S)){var M=r.interleaved;M===null?(c.next=c,ic(r)):(c.next=M.next,M.next=c),r.interleaved=c;return}}catch{}finally{}a=Ah(t,r,c,l),a!==null&&(c=an(),ur(a,t,l,c),mp(a,r,l))}}function hp(t){var r=t.alternate;return t===kt||r!==null&&r===kt}function pp(t,r){Ea=Xs=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function mp(t,r,a){if((a&4194240)!==0){var l=r.lanes;l&=t.pendingLanes,a|=l,r.lanes=a,sa(t,a)}}var tl={readContext:qn,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useInsertionEffect:Xt,useLayoutEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useMutableSource:Xt,useSyncExternalStore:Xt,useId:Xt,unstable_isNewReconciler:!1},s1={readContext:qn,useCallback:function(t,r){return yr().memoizedState=[t,r===void 0?null:r],t},useContext:qn,useEffect:ip,useImperativeHandle:function(t,r,a){return a=a!=null?a.concat([t]):null,Js(4194308,4,sp.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Js(4194308,4,t,r)},useInsertionEffect:function(t,r){return Js(4,2,t,r)},useMemo:function(t,r){var a=yr();return r=r===void 0?null:r,t=t(),a.memoizedState=[t,r],t},useReducer:function(t,r,a){var l=yr();return r=a!==void 0?a(r):r,l.memoizedState=l.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},l.queue=t,t=t.dispatch=o1.bind(null,kt,t),[l.memoizedState,t]},useRef:function(t){var r=yr();return t={current:t},r.memoizedState=t},useState:np,useDebugValue:wc,useDeferredValue:function(t){return yr().memoizedState=t},useTransition:function(){var t=np(!1),r=t[0];return t=i1.bind(null,t[1]),yr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,a){var l=kt,c=yr();if(Ct){if(a===void 0)throw Error(i(407));a=a()}else{if(a=r(),Bt===null)throw Error(i(349));(Zi&30)!==0||Yh(l,r,a)}c.memoizedState=a;var h={value:a,getSnapshot:r};return c.queue=h,ip(Jh.bind(null,l,h,t),[t]),l.flags|=2048,Ta(9,Xh.bind(null,l,h,a,r),void 0,null),a},useId:function(){var t=yr(),r=Bt.identifierPrefix;if(Ct){var a=zr,l=$r;a=(l&~(1<<32-Ze(l)-1)).toString(32)+a,r=":"+r+"R"+a,a=ka++,0<\/script>",t=t.removeChild(t.firstChild)):typeof l.is=="string"?t=S.createElement(a,{is:l.is}):(t=S.createElement(a),a==="select"&&(S=t,l.multiple?S.multiple=!0:l.size&&(S.size=l.size))):t=S.createElementNS(t,a),t[gr]=r,t[wa]=l,Lp(t,r,!1,!1),r.stateNode=t;e:{switch(S=Nr(a,l),a){case"dialog":vt("cancel",t),vt("close",t),c=l;break;case"iframe":case"object":case"embed":vt("load",t),c=l;break;case"video":case"audio":for(c=0;cAo&&(r.flags|=128,l=!0,ja(h,!1),r.lanes=4194304)}else{if(!l)if(t=Ks(S),t!==null){if(r.flags|=128,l=!0,a=t.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),ja(h,!0),h.tail===null&&h.tailMode==="hidden"&&!S.alternate&&!Ct)return Jt(r),null}else 2*Ve()-h.renderingStartTime>Ao&&a!==1073741824&&(r.flags|=128,l=!0,ja(h,!1),r.lanes=4194304);h.isBackwards?(S.sibling=r.child,r.child=S):(a=h.last,a!==null?a.sibling=S:r.child=S,h.last=S)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Ve(),r.sibling=null,a=Et.current,mt(Et,l?a&1|2:a&1),r):(Jt(r),null);case 22:case 23:return Bc(),l=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(On&1073741824)!==0&&(Jt(r),r.subtreeFlags&6&&(r.flags|=8192)):Jt(r),null;case 24:return null;case 25:return null}throw Error(i(156,r.tag))}function m1(t,r){switch(Ku(r),r.tag){case 1:return yn(r.type)&&Fs(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Do(),yt(vn),yt(Yt),dc(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return uc(r),null;case 13:if(yt(Et),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));jo()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return yt(Et),null;case 4:return Do(),null;case 10:return nc(r.type._context),null;case 22:case 23:return Bc(),null;case 24:return null;default:return null}}var il=!1,en=!1,g1=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ro(t,r){var a=t.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(l){Tt(t,r,l)}else a.current=null}function jc(t,r,a){try{a()}catch(l){Tt(t,r,l)}}var Rp=!1;function v1(t,r){if(Bu=vo,t=fh(),Du(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var S=0,_=-1,M=-1,B=0,te=0,ie=t,J=null;t:for(;;){for(var me;ie!==a||c!==0&&ie.nodeType!==3||(_=S+c),ie!==h||l!==0&&ie.nodeType!==3||(M=S+l),ie.nodeType===3&&(S+=ie.nodeValue.length),(me=ie.firstChild)!==null;)J=ie,ie=me;for(;;){if(ie===t)break t;if(J===a&&++B===c&&(_=S),J===h&&++te===l&&(M=S),(me=ie.nextSibling)!==null)break;ie=J,J=ie.parentNode}ie=me}a=_===-1||M===-1?null:{start:_,end:M}}else a=null}a=a||{start:0,end:0}}else a=null;for(Uu={focusedElem:t,selectionRange:a},vo=!1,xe=r;xe!==null;)if(r=xe,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,xe=t;else for(;xe!==null;){r=xe;try{var be=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var Te=be.memoizedProps,Mt=be.memoizedState,A=r.stateNode,D=A.getSnapshotBeforeUpdate(r.elementType===r.type?Te:ar(r.type,Te),Mt);A.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var F=r.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ae){Tt(r,r.return,ae)}if(t=r.sibling,t!==null){t.return=r.return,xe=t;break}xe=r.return}return be=Rp,Rp=!1,be}function Pa(t,r,a){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&t)===t){var h=c.destroy;c.destroy=void 0,h!==void 0&&jc(r,a,h)}c=c.next}while(c!==l)}}function ol(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&t)===t){var l=a.create;a.destroy=l()}a=a.next}while(a!==r)}}function Pc(t){var r=t.ref;if(r!==null){var a=t.stateNode;switch(t.tag){case 5:t=a;break;default:t=a}typeof r=="function"?r(t):r.current=t}}function Ip(t){var r=t.alternate;r!==null&&(t.alternate=null,Ip(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[gr],delete r[wa],delete r[Wu],delete r[Jy],delete r[e1])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ap(t){return t.tag===5||t.tag===3||t.tag===4}function Fp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ap(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Mc(t,r,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(t,r):a.insertBefore(t,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(t,a)):(r=a,r.appendChild(t)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Is));else if(l!==4&&(t=t.child,t!==null))for(Mc(t,r,a),t=t.sibling;t!==null;)Mc(t,r,a),t=t.sibling}function Lc(t,r,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(l!==4&&(t=t.child,t!==null))for(Lc(t,r,a),t=t.sibling;t!==null;)Lc(t,r,a),t=t.sibling}var Gt=null,sr=!1;function pi(t,r,a){for(a=a.child;a!==null;)$p(t,r,a),a=a.sibling}function $p(t,r,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(nt,a)}catch{}switch(a.tag){case 5:en||Ro(a,r);case 6:var l=Gt,c=sr;Gt=null,pi(t,r,a),Gt=l,sr=c,Gt!==null&&(sr?(t=Gt,a=a.stateNode,t.nodeType===8?t.parentNode.removeChild(a):t.removeChild(a)):Gt.removeChild(a.stateNode));break;case 18:Gt!==null&&(sr?(t=Gt,a=a.stateNode,t.nodeType===8?qu(t.parentNode,a):t.nodeType===1&&qu(t,a),oi(t)):qu(Gt,a.stateNode));break;case 4:l=Gt,c=sr,Gt=a.stateNode.containerInfo,sr=!0,pi(t,r,a),Gt=l,sr=c;break;case 0:case 11:case 14:case 15:if(!en&&(l=a.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var h=c,S=h.destroy;h=h.tag,S!==void 0&&((h&2)!==0||(h&4)!==0)&&jc(a,r,S),c=c.next}while(c!==l)}pi(t,r,a);break;case 1:if(!en&&(Ro(a,r),l=a.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=a.memoizedProps,l.state=a.memoizedState,l.componentWillUnmount()}catch(_){Tt(a,r,_)}pi(t,r,a);break;case 21:pi(t,r,a);break;case 22:a.mode&1?(en=(l=en)||a.memoizedState!==null,pi(t,r,a),en=l):pi(t,r,a);break;default:pi(t,r,a)}}function zp(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var a=t.stateNode;a===null&&(a=t.stateNode=new g1),r.forEach(function(l){var c=k1.bind(null,t,l);a.has(l)||(a.add(l),l.then(c,c))})}}function lr(t,r){var a=r.deletions;if(a!==null)for(var l=0;lc&&(c=S),l&=~h}if(l=c,l=Ve()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*w1(l/1960))-l,10t?16:t,gi===null)var l=!1;else{if(t=gi,gi=null,cl=0,(Ke&6)!==0)throw Error(i(331));var c=Ke;for(Ke|=4,xe=t.current;xe!==null;){var h=xe,S=h.child;if((xe.flags&16)!==0){var _=h.deletions;if(_!==null){for(var M=0;M<_.length;M++){var B=_[M];for(xe=B;xe!==null;){var te=xe;switch(te.tag){case 0:case 11:case 15:Pa(8,te,h)}var ie=te.child;if(ie!==null)ie.return=te,xe=ie;else for(;xe!==null;){te=xe;var J=te.sibling,me=te.return;if(Ip(te),te===B){xe=null;break}if(J!==null){J.return=me,xe=J;break}xe=me}}}var be=h.alternate;if(be!==null){var Te=be.child;if(Te!==null){be.child=null;do{var Mt=Te.sibling;Te.sibling=null,Te=Mt}while(Te!==null)}}xe=h}}if((h.subtreeFlags&2064)!==0&&S!==null)S.return=h,xe=S;else e:for(;xe!==null;){if(h=xe,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:Pa(9,h,h.return)}var A=h.sibling;if(A!==null){A.return=h.return,xe=A;break e}xe=h.return}}var D=t.current;for(xe=D;xe!==null;){S=xe;var F=S.child;if((S.subtreeFlags&2064)!==0&&F!==null)F.return=S,xe=F;else e:for(S=D;xe!==null;){if(_=xe,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:ol(9,_)}}catch(je){Tt(_,_.return,je)}if(_===S){xe=null;break e}var ae=_.sibling;if(ae!==null){ae.return=_.return,xe=ae;break e}xe=_.return}}if(Ke=c,di(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(nt,t)}catch{}l=!0}return l}finally{tt=a,Gn.transition=r}}return!1}function Xp(t,r,a){r=Oo(a,r),r=gp(t,r,1),t=hi(t,r,1),r=an(),t!==null&&(Ii(t,1,r),Cn(t,r))}function Tt(t,r,a){if(t.tag===3)Xp(t,t,a);else for(;r!==null;){if(r.tag===3){Xp(r,t,a);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(mi===null||!mi.has(l))){t=Oo(a,t),t=vp(r,t,1),r=hi(r,t,1),t=an(),r!==null&&(Ii(r,1,t),Cn(r,t));break}}r=r.return}}function _1(t,r,a){var l=t.pingCache;l!==null&&l.delete(r),r=an(),t.pingedLanes|=t.suspendedLanes&a,Bt===t&&(Zt&a)===a&&($t===4||$t===3&&(Zt&130023424)===Zt&&500>Ve()-Rc?Yi(t,0):Oc|=a),Cn(t,r)}function Jp(t,r){r===0&&((t.mode&1)===0?r=1:(r=mo,mo<<=1,(mo&130023424)===0&&(mo=4194304)));var a=an();t=Br(t,r),t!==null&&(Ii(t,r,a),Cn(t,a))}function E1(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Jp(t,a)}function k1(t,r){var a=0;switch(t.tag){case 13:var l=t.stateNode,c=t.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=t.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(r),Jp(t,a)}var em;em=function(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps||vn.current)wn=!0;else{if((t.lanes&a)===0&&(r.flags&128)===0)return wn=!1,h1(t,r,a);wn=(t.flags&131072)!==0}else wn=!1,Ct&&(r.flags&1048576)!==0&&Lh(r,Us,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;rl(t,r),t=r.pendingProps;var c=ko(r,Yt.current);Mo(r,a),c=pc(null,r,l,t,c,a);var h=mc();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,yn(l)?(h=!0,$s(r)):h=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,oc(r),c.updater=Zs,r.stateNode=c,c._reactInternals=r,sc(r,l,t,a),r=bc(null,r,l,!0,h,a)):(r.tag=0,Ct&&h&&Qu(r),on(null,r,c,a),r=r.child),r;case 16:l=r.elementType;e:{switch(rl(t,r),t=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=T1(l),t=ar(l,t),c){case 0:r=Sc(null,r,l,t,a);break e;case 1:r=kp(null,r,l,t,a);break e;case 11:r=Cp(null,r,l,t,a);break e;case 14:r=Sp(null,r,l,ar(l.type,t),a);break e}throw Error(i(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),Sc(t,r,l,c,a);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),kp(t,r,l,c,a);case 3:e:{if(Np(r),t===null)throw Error(i(387));l=r.pendingProps,h=r.memoizedState,c=h.element,Fh(t,r),Gs(r,l,null,a);var S=r.memoizedState;if(l=S.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){c=Oo(Error(i(423)),r),r=Tp(t,r,l,a,c);break e}else if(l!==c){c=Oo(Error(i(424)),r),r=Tp(t,r,l,a,c);break e}else for(Dn=li(r.stateNode.containerInfo.firstChild),Ln=r,Ct=!0,or=null,a=Gh(r,null,l,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(jo(),l===c){r=Hr(t,r,a);break e}on(t,r,l,a)}r=r.child}return r;case 5:return Zh(r),t===null&&Xu(r),l=r.type,c=r.pendingProps,h=t!==null?t.memoizedProps:null,S=c.children,Hu(l,c)?S=null:h!==null&&Hu(l,h)&&(r.flags|=32),Ep(t,r),on(t,r,S,a),r.child;case 6:return t===null&&Xu(r),null;case 13:return jp(t,r,a);case 4:return lc(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Lo(r,null,l,a):on(t,r,l,a),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),Cp(t,r,l,c,a);case 7:return on(t,r,r.pendingProps,a),r.child;case 8:return on(t,r,r.pendingProps.children,a),r.child;case 12:return on(t,r,r.pendingProps.children,a),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,h=r.memoizedProps,S=c.value,mt(Vs,l._currentValue),l._currentValue=S,h!==null)if(ir(h.value,S)){if(h.children===c.children&&!vn.current){r=Hr(t,r,a);break e}}else for(h=r.child,h!==null&&(h.return=r);h!==null;){var _=h.dependencies;if(_!==null){S=h.child;for(var M=_.firstContext;M!==null;){if(M.context===l){if(h.tag===1){M=Ur(-1,a&-a),M.tag=2;var B=h.updateQueue;if(B!==null){B=B.shared;var te=B.pending;te===null?M.next=M:(M.next=te.next,te.next=M),B.pending=M}}h.lanes|=a,M=h.alternate,M!==null&&(M.lanes|=a),rc(h.return,a,r),_.lanes|=a;break}M=M.next}}else if(h.tag===10)S=h.type===r.type?null:h.child;else if(h.tag===18){if(S=h.return,S===null)throw Error(i(341));S.lanes|=a,_=S.alternate,_!==null&&(_.lanes|=a),rc(S,a,r),S=h.sibling}else S=h.child;if(S!==null)S.return=h;else for(S=h;S!==null;){if(S===r){S=null;break}if(h=S.sibling,h!==null){h.return=S.return,S=h;break}S=S.return}h=S}on(t,r,c.children,a),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,Mo(r,a),c=qn(c),l=l(c),r.flags|=1,on(t,r,l,a),r.child;case 14:return l=r.type,c=ar(l,r.pendingProps),c=ar(l.type,c),Sp(t,r,l,c,a);case 15:return bp(t,r,r.type,r.pendingProps,a);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),rl(t,r),r.tag=1,yn(l)?(t=!0,$s(r)):t=!1,Mo(r,a),Hh(r,l,c),sc(r,l,c,a),bc(null,r,l,!0,t,a);case 19:return Mp(t,r,a);case 22:return _p(t,r,a)}throw Error(i(156,r.tag))};function tm(t,r){return Xe(t,r)}function N1(t,r,a,l){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(t,r,a,l){return new N1(t,r,a,l)}function Hc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function T1(t){if(typeof t=="function")return Hc(t)?1:0;if(t!=null){if(t=t.$$typeof,t===U)return 11;if(t===he)return 14}return 2}function wi(t,r){var a=t.alternate;return a===null?(a=Zn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&14680064,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a}function pl(t,r,a,l,c,h){var S=2;if(l=t,typeof t=="function")Hc(t)&&(S=1);else if(typeof t=="string")S=5;else e:switch(t){case O:return Ji(a.children,c,h,r);case K:S=8,c|=8;break;case ce:return t=Zn(12,a,r,c|2),t.elementType=ce,t.lanes=h,t;case W:return t=Zn(13,a,r,c),t.elementType=W,t.lanes=h,t;case ne:return t=Zn(19,a,r,c),t.elementType=ne,t.lanes=h,t;case _e:return ml(a,c,h,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case de:S=10;break e;case I:S=9;break e;case U:S=11;break e;case he:S=14;break e;case Ce:S=16,l=null;break e}throw Error(i(130,t==null?t:typeof t,""))}return r=Zn(S,a,r,c),r.elementType=t,r.type=l,r.lanes=h,r}function Ji(t,r,a,l){return t=Zn(7,t,l,r),t.lanes=a,t}function ml(t,r,a,l){return t=Zn(22,t,l,r),t.elementType=_e,t.lanes=a,t.stateNode={isHidden:!1},t}function Vc(t,r,a){return t=Zn(6,t,null,r),t.lanes=a,t}function qc(t,r,a){return r=Zn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function j1(t,r,a,l,c){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=aa(0),this.expirationTimes=aa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=aa(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Wc(t,r,a,l,c,h,S,_,M){return t=new j1(t,r,a,_,M),r===1?(r=1,h===!0&&(r|=8)):r=0,h=Zn(3,null,null,r),t.current=h,h.stateNode=t,h.memoizedState={element:l,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},oc(h),t}function P1(t,r,a){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Xc.exports=U1(),Xc.exports}var mm;function H1(){if(mm)return Sl;mm=1;var e=Ug();return Sl.createRoot=e.createRoot,Sl.hydrateRoot=e.hydrateRoot,Sl}var V1=H1();const q1="modulepreload",W1=function(e){return"/"+e},gm={},Qn=function(n,i,o){let s=Promise.resolve();if(i&&i.length>0){let p=function(y){return Promise.all(y.map(w=>Promise.resolve(w).then(C=>({status:"fulfilled",value:C}),C=>({status:"rejected",reason:C}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");s=p(i.map(y=>{if(y=W1(y),y in gm)return;gm[y]=!0;const w=y.endsWith(".css"),C=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${C}`))return;const m=document.createElement("link");if(m.rel=w?"stylesheet":q1,w||(m.as="script"),m.crossOrigin="",m.href=y,f&&m.setAttribute("nonce",f),document.head.appendChild(m),w)return new Promise((x,E)=>{m.addEventListener("load",x),m.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${y}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return s.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return n().catch(u)})};var ef=Ug();const G1=Bg(ef),Z1=zg({__proto__:null,default:G1},[ef]);/** +`+h.stack}return{value:t,source:r,stack:c,digest:null}}function xc(t,r,a){return{value:t,source:null,stack:a??null,digest:r??null}}function Cc(t,r){try{console.error(r.value)}catch(a){setTimeout(function(){throw a})}}var c1=typeof WeakMap=="function"?WeakMap:Map;function gp(t,r,a){a=Ur(-1,a),a.tag=3,a.payload={element:null};var l=r.value;return a.callback=function(){ll||(ll=!0,Ic=l),Cc(t,r)},a}function vp(t,r,a){a=Ur(-1,a),a.tag=3;var l=t.type.getDerivedStateFromError;if(typeof l=="function"){var c=r.value;a.payload=function(){return l(c)},a.callback=function(){Cc(t,r)}}var h=t.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(a.callback=function(){Cc(t,r),typeof l!="function"&&(mi===null?mi=new Set([this]):mi.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})}),a}function yp(t,r,a){var l=t.pingCache;if(l===null){l=t.pingCache=new c1;var c=new Set;l.set(r,c)}else c=l.get(r),c===void 0&&(c=new Set,l.set(r,c));c.has(a)||(c.add(a),t=_1.bind(null,t,r,a),r.then(t,t))}function wp(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function xp(t,r,a,l,c){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(r=Ur(-1,1),r.tag=2,hi(a,r,1))),a.lanes|=1),t):(t.flags|=65536,t.lanes=c,t)}var d1=H.ReactCurrentOwner,wn=!1;function on(t,r,a,l){r.child=t===null?Gh(r,null,a,l):Lo(r,t.child,a,l)}function Cp(t,r,a,l,c){a=a.render;var h=r.ref;return Mo(r,c),l=pc(t,r,a,l,h,c),a=mc(),t!==null&&!wn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~c,Hr(t,r,c)):(Ct&&a&&Qu(r),r.flags|=1,on(t,r,l,c),r.child)}function Sp(t,r,a,l,c){if(t===null){var h=a.type;return typeof h=="function"&&!Hc(h)&&h.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(r.tag=15,r.type=h,bp(t,r,h,l,c)):(t=pl(a.type,null,l,r,r.mode,c),t.ref=r.ref,t.return=r,r.child=t)}if(h=t.child,(t.lanes&c)===0){var S=h.memoizedProps;if(a=a.compare,a=a!==null?a:pa,a(S,l)&&t.ref===r.ref)return Hr(t,r,c)}return r.flags|=1,t=wi(h,l),t.ref=r.ref,t.return=r,r.child=t}function bp(t,r,a,l,c){if(t!==null){var h=t.memoizedProps;if(pa(h,l)&&t.ref===r.ref)if(wn=!1,r.pendingProps=l=h,(t.lanes&c)!==0)(t.flags&131072)!==0&&(wn=!0);else return r.lanes=t.lanes,Hr(t,r,c)}return Sc(t,r,a,l,c)}function _p(t,r,a){var l=r.pendingProps,c=l.children,h=t!==null?t.memoizedState:null;if(l.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Io,On),On|=a;else{if((a&1073741824)===0)return t=h!==null?h.baseLanes|a:a,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,mt(Io,On),On|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=h!==null?h.baseLanes:a,mt(Io,On),On|=l}else h!==null?(l=h.baseLanes|a,r.memoizedState=null):l=a,mt(Io,On),On|=l;return on(t,r,c,a),r.child}function Ep(t,r){var a=r.ref;(t===null&&a!==null||t!==null&&t.ref!==a)&&(r.flags|=512,r.flags|=2097152)}function Sc(t,r,a,l,c){var h=yn(a)?Hi:Yt.current;return h=ko(r,h),Mo(r,c),a=pc(t,r,a,l,h,c),l=mc(),t!==null&&!wn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~c,Hr(t,r,c)):(Ct&&l&&Qu(r),r.flags|=1,on(t,r,a,c),r.child)}function kp(t,r,a,l,c){if(yn(a)){var h=!0;$s(r)}else h=!1;if(Mo(r,c),r.stateNode===null)rl(t,r),Hh(r,a,l),sc(r,a,l,c),l=!0;else if(t===null){var S=r.stateNode,_=r.memoizedProps;S.props=_;var M=S.context,B=a.contextType;typeof B=="object"&&B!==null?B=qn(B):(B=yn(a)?Hi:Yt.current,B=ko(r,B));var te=a.getDerivedStateFromProps,ie=typeof te=="function"||typeof S.getSnapshotBeforeUpdate=="function";ie||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(_!==l||M!==B)&&Vh(r,S,l,B),fi=!1;var J=r.memoizedState;S.state=J,Gs(r,l,S,c),M=r.memoizedState,_!==l||J!==M||vn.current||fi?(typeof te=="function"&&(ac(r,a,te,l),M=r.memoizedState),(_=fi||Uh(r,a,_,l,J,M,B))?(ie||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(r.flags|=4194308)):(typeof S.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=M),S.props=l,S.state=M,S.context=B,l=_):(typeof S.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{S=r.stateNode,Fh(t,r),_=r.memoizedProps,B=r.type===r.elementType?_:ar(r.type,_),S.props=B,ie=r.pendingProps,J=S.context,M=a.contextType,typeof M=="object"&&M!==null?M=qn(M):(M=yn(a)?Hi:Yt.current,M=ko(r,M));var me=a.getDerivedStateFromProps;(te=typeof me=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(_!==ie||J!==M)&&Vh(r,S,l,M),fi=!1,J=r.memoizedState,S.state=J,Gs(r,l,S,c);var be=r.memoizedState;_!==ie||J!==be||vn.current||fi?(typeof me=="function"&&(ac(r,a,me,l),be=r.memoizedState),(B=fi||Uh(r,a,B,l,J,be,M)||!1)?(te||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(l,be,M),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(l,be,M)),typeof S.componentDidUpdate=="function"&&(r.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof S.componentDidUpdate!="function"||_===t.memoizedProps&&J===t.memoizedState||(r.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&J===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=be),S.props=l,S.state=be,S.context=M,l=B):(typeof S.componentDidUpdate!="function"||_===t.memoizedProps&&J===t.memoizedState||(r.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&J===t.memoizedState||(r.flags|=1024),l=!1)}return bc(t,r,a,l,h,c)}function bc(t,r,a,l,c,h){Ep(t,r);var S=(r.flags&128)!==0;if(!l&&!S)return c&&Ph(r,a,!1),Hr(t,r,h);l=r.stateNode,d1.current=r;var _=S&&typeof a.getDerivedStateFromError!="function"?null:l.render();return r.flags|=1,t!==null&&S?(r.child=Lo(r,t.child,null,h),r.child=Lo(r,null,_,h)):on(t,r,_,h),r.memoizedState=l.state,c&&Ph(r,a,!0),r.child}function Np(t){var r=t.stateNode;r.pendingContext?Th(t,r.pendingContext,r.pendingContext!==r.context):r.context&&Th(t,r.context,!1),lc(t,r.containerInfo)}function Tp(t,r,a,l,c){return jo(),Ju(c),r.flags|=256,on(t,r,a,l),r.child}var _c={dehydrated:null,treeContext:null,retryLane:0};function Ec(t){return{baseLanes:t,cachePool:null,transitions:null}}function jp(t,r,a){var l=r.pendingProps,c=Et.current,h=!1,S=(r.flags&128)!==0,_;if((_=S)||(_=t!==null&&t.memoizedState===null?!1:(c&2)!==0),_?(h=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(c|=1),mt(Et,c&1),t===null)return Xu(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(S=l.children,t=l.fallback,h?(l=r.mode,h=r.child,S={mode:"hidden",children:S},(l&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=S):h=ml(S,l,0,null),t=Ji(t,l,a,null),h.return=r,t.return=r,h.sibling=t,r.child=h,r.child.memoizedState=Ec(a),r.memoizedState=_c,t):kc(r,S));if(c=t.memoizedState,c!==null&&(_=c.dehydrated,_!==null))return f1(t,r,S,l,_,c,a);if(h){h=l.fallback,S=r.mode,c=t.child,_=c.sibling;var M={mode:"hidden",children:l.children};return(S&1)===0&&r.child!==c?(l=r.child,l.childLanes=0,l.pendingProps=M,r.deletions=null):(l=wi(c,M),l.subtreeFlags=c.subtreeFlags&14680064),_!==null?h=wi(_,h):(h=Ji(h,S,a,null),h.flags|=2),h.return=r,l.return=r,l.sibling=h,r.child=l,l=h,h=r.child,S=t.child.memoizedState,S=S===null?Ec(a):{baseLanes:S.baseLanes|a,cachePool:null,transitions:S.transitions},h.memoizedState=S,h.childLanes=t.childLanes&~a,r.memoizedState=_c,l}return h=t.child,t=h.sibling,l=wi(h,{mode:"visible",children:l.children}),(r.mode&1)===0&&(l.lanes=a),l.return=r,l.sibling=null,t!==null&&(a=r.deletions,a===null?(r.deletions=[t],r.flags|=16):a.push(t)),r.child=l,r.memoizedState=null,l}function kc(t,r){return r=ml({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function nl(t,r,a,l){return l!==null&&Ju(l),Lo(r,t.child,null,a),t=kc(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function f1(t,r,a,l,c,h,S){if(a)return r.flags&256?(r.flags&=-257,l=xc(Error(i(422))),nl(t,r,S,l)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(h=l.fallback,c=r.mode,l=ml({mode:"visible",children:l.children},c,0,null),h=Ji(h,c,S,null),h.flags|=2,l.return=r,h.return=r,l.sibling=h,r.child=l,(r.mode&1)!==0&&Lo(r,t.child,null,S),r.child.memoizedState=Ec(S),r.memoizedState=_c,h);if((r.mode&1)===0)return nl(t,r,S,null);if(c.data==="$!"){if(l=c.nextSibling&&c.nextSibling.dataset,l)var _=l.dgst;return l=_,h=Error(i(419)),l=xc(h,l,void 0),nl(t,r,S,l)}if(_=(S&t.childLanes)!==0,wn||_){if(l=Bt,l!==null){switch(S&-S){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(l.suspendedLanes|S))!==0?0:c,c!==0&&c!==h.retryLane&&(h.retryLane=c,Br(t,c),ur(l,t,c,-1))}return Uc(),l=xc(Error(i(421))),nl(t,r,S,l)}return c.data==="$?"?(r.flags|=128,r.child=t.child,r=E1.bind(null,t),c._reactRetry=r,null):(t=h.treeContext,Dn=li(c.nextSibling),Ln=r,Ct=!0,or=null,t!==null&&(Hn[Vn++]=$r,Hn[Vn++]=zr,Hn[Vn++]=Vi,$r=t.id,zr=t.overflow,Vi=r),r=kc(r,l.children),r.flags|=4096,r)}function Pp(t,r,a){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),rc(t.return,r,a)}function Nc(t,r,a,l,c){var h=t.memoizedState;h===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c}:(h.isBackwards=r,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=a,h.tailMode=c)}function Mp(t,r,a){var l=r.pendingProps,c=l.revealOrder,h=l.tail;if(on(t,r,l.children,a),l=Et.current,(l&2)!==0)l=l&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Pp(t,a,r);else if(t.tag===19)Pp(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}if(mt(Et,l),(r.mode&1)===0)r.memoizedState=null;else switch(c){case"forwards":for(a=r.child,c=null;a!==null;)t=a.alternate,t!==null&&Ks(t)===null&&(c=a),a=a.sibling;a=c,a===null?(c=r.child,r.child=null):(c=a.sibling,a.sibling=null),Nc(r,!1,c,a,h);break;case"backwards":for(a=null,c=r.child,r.child=null;c!==null;){if(t=c.alternate,t!==null&&Ks(t)===null){r.child=c;break}t=c.sibling,c.sibling=a,a=c,c=t}Nc(r,!0,a,null,h);break;case"together":Nc(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function rl(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function Hr(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Qi|=r.lanes,(a&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(i(153));if(r.child!==null){for(t=r.child,a=wi(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=wi(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function h1(t,r,a){switch(r.tag){case 3:Np(r),jo();break;case 5:Zh(r);break;case 1:yn(r.type)&&$s(r);break;case 4:lc(r,r.stateNode.containerInfo);break;case 10:var l=r.type._context,c=r.memoizedProps.value;mt(Vs,l._currentValue),l._currentValue=c;break;case 13:if(l=r.memoizedState,l!==null)return l.dehydrated!==null?(mt(Et,Et.current&1),r.flags|=128,null):(a&r.child.childLanes)!==0?jp(t,r,a):(mt(Et,Et.current&1),t=Hr(t,r,a),t!==null?t.sibling:null);mt(Et,Et.current&1);break;case 19:if(l=(a&r.childLanes)!==0,(t.flags&128)!==0){if(l)return Mp(t,r,a);r.flags|=128}if(c=r.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),mt(Et,Et.current),l)break;return null;case 22:case 23:return r.lanes=0,_p(t,r,a)}return Hr(t,r,a)}var Lp,Tc,Dp,Op;Lp=function(t,r){for(var a=r.child;a!==null;){if(a.tag===5||a.tag===6)t.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Tc=function(){},Dp=function(t,r,a,l){var c=t.memoizedProps;if(c!==l){t=r.stateNode,Gi(vr.current);var h=null;switch(a){case"input":c=st(t,c),l=st(t,l),h=[];break;case"select":c=T({},c,{value:void 0}),l=T({},l,{value:void 0}),h=[];break;case"textarea":c=jn(t,c),l=jn(t,l),h=[];break;default:typeof c.onClick!="function"&&typeof l.onClick=="function"&&(t.onclick=Is)}kr(a,l);var S;a=null;for(B in c)if(!l.hasOwnProperty(B)&&c.hasOwnProperty(B)&&c[B]!=null)if(B==="style"){var _=c[B];for(S in _)_.hasOwnProperty(S)&&(a||(a={}),a[S]="")}else B!=="dangerouslySetInnerHTML"&&B!=="children"&&B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(s.hasOwnProperty(B)?h||(h=[]):(h=h||[]).push(B,null));for(B in l){var M=l[B];if(_=c?.[B],l.hasOwnProperty(B)&&M!==_&&(M!=null||_!=null))if(B==="style")if(_){for(S in _)!_.hasOwnProperty(S)||M&&M.hasOwnProperty(S)||(a||(a={}),a[S]="");for(S in M)M.hasOwnProperty(S)&&_[S]!==M[S]&&(a||(a={}),a[S]=M[S])}else a||(h||(h=[]),h.push(B,a)),a=M;else B==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,_=_?_.__html:void 0,M!=null&&_!==M&&(h=h||[]).push(B,M)):B==="children"?typeof M!="string"&&typeof M!="number"||(h=h||[]).push(B,""+M):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&(s.hasOwnProperty(B)?(M!=null&&B==="onScroll"&&vt("scroll",t),h||_===M||(h=[])):(h=h||[]).push(B,M))}a&&(h=h||[]).push("style",a);var B=h;(r.updateQueue=B)&&(r.flags|=4)}},Op=function(t,r,a,l){a!==l&&(r.flags|=4)};function ja(t,r){if(!Ct)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Jt(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,l=0;if(r)for(var c=t.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&14680064,l|=c.flags&14680064,c.return=t,c=c.sibling;else for(c=t.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=t,c=c.sibling;return t.subtreeFlags|=l,t.childLanes=a,r}function p1(t,r,a){var l=r.pendingProps;switch(Ku(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jt(r),null;case 1:return yn(r.type)&&Fs(),Jt(r),null;case 3:return l=r.stateNode,Do(),yt(vn),yt(Yt),dc(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Hs(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,or!==null&&($c(or),or=null))),Tc(t,r),Jt(r),null;case 5:uc(r);var c=Gi(_a.current);if(a=r.type,t!==null&&r.stateNode!=null)Dp(t,r,a,l,c),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!l){if(r.stateNode===null)throw Error(i(166));return Jt(r),null}if(t=Gi(vr.current),Hs(r)){l=r.stateNode,a=r.type;var h=r.memoizedProps;switch(l[gr]=r,l[wa]=h,t=(r.mode&1)!==0,a){case"dialog":vt("cancel",l),vt("close",l);break;case"iframe":case"object":case"embed":vt("load",l);break;case"video":case"audio":for(c=0;c<\/script>",t=t.removeChild(t.firstChild)):typeof l.is=="string"?t=S.createElement(a,{is:l.is}):(t=S.createElement(a),a==="select"&&(S=t,l.multiple?S.multiple=!0:l.size&&(S.size=l.size))):t=S.createElementNS(t,a),t[gr]=r,t[wa]=l,Lp(t,r,!1,!1),r.stateNode=t;e:{switch(S=Nr(a,l),a){case"dialog":vt("cancel",t),vt("close",t),c=l;break;case"iframe":case"object":case"embed":vt("load",t),c=l;break;case"video":case"audio":for(c=0;cAo&&(r.flags|=128,l=!0,ja(h,!1),r.lanes=4194304)}else{if(!l)if(t=Ks(S),t!==null){if(r.flags|=128,l=!0,a=t.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),ja(h,!0),h.tail===null&&h.tailMode==="hidden"&&!S.alternate&&!Ct)return Jt(r),null}else 2*Ve()-h.renderingStartTime>Ao&&a!==1073741824&&(r.flags|=128,l=!0,ja(h,!1),r.lanes=4194304);h.isBackwards?(S.sibling=r.child,r.child=S):(a=h.last,a!==null?a.sibling=S:r.child=S,h.last=S)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Ve(),r.sibling=null,a=Et.current,mt(Et,l?a&1|2:a&1),r):(Jt(r),null);case 22:case 23:return Bc(),l=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(On&1073741824)!==0&&(Jt(r),r.subtreeFlags&6&&(r.flags|=8192)):Jt(r),null;case 24:return null;case 25:return null}throw Error(i(156,r.tag))}function m1(t,r){switch(Ku(r),r.tag){case 1:return yn(r.type)&&Fs(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Do(),yt(vn),yt(Yt),dc(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return uc(r),null;case 13:if(yt(Et),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));jo()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return yt(Et),null;case 4:return Do(),null;case 10:return nc(r.type._context),null;case 22:case 23:return Bc(),null;case 24:return null;default:return null}}var il=!1,en=!1,g1=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ro(t,r){var a=t.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(l){Tt(t,r,l)}else a.current=null}function jc(t,r,a){try{a()}catch(l){Tt(t,r,l)}}var Rp=!1;function v1(t,r){if(Bu=vo,t=fh(),Du(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var S=0,_=-1,M=-1,B=0,te=0,ie=t,J=null;t:for(;;){for(var me;ie!==a||c!==0&&ie.nodeType!==3||(_=S+c),ie!==h||l!==0&&ie.nodeType!==3||(M=S+l),ie.nodeType===3&&(S+=ie.nodeValue.length),(me=ie.firstChild)!==null;)J=ie,ie=me;for(;;){if(ie===t)break t;if(J===a&&++B===c&&(_=S),J===h&&++te===l&&(M=S),(me=ie.nextSibling)!==null)break;ie=J,J=ie.parentNode}ie=me}a=_===-1||M===-1?null:{start:_,end:M}}else a=null}a=a||{start:0,end:0}}else a=null;for(Uu={focusedElem:t,selectionRange:a},vo=!1,xe=r;xe!==null;)if(r=xe,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,xe=t;else for(;xe!==null;){r=xe;try{var be=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var Te=be.memoizedProps,Mt=be.memoizedState,A=r.stateNode,D=A.getSnapshotBeforeUpdate(r.elementType===r.type?Te:ar(r.type,Te),Mt);A.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var F=r.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ae){Tt(r,r.return,ae)}if(t=r.sibling,t!==null){t.return=r.return,xe=t;break}xe=r.return}return be=Rp,Rp=!1,be}function Pa(t,r,a){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&t)===t){var h=c.destroy;c.destroy=void 0,h!==void 0&&jc(r,a,h)}c=c.next}while(c!==l)}}function ol(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&t)===t){var l=a.create;a.destroy=l()}a=a.next}while(a!==r)}}function Pc(t){var r=t.ref;if(r!==null){var a=t.stateNode;switch(t.tag){case 5:t=a;break;default:t=a}typeof r=="function"?r(t):r.current=t}}function Ip(t){var r=t.alternate;r!==null&&(t.alternate=null,Ip(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[gr],delete r[wa],delete r[Wu],delete r[Jy],delete r[e1])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ap(t){return t.tag===5||t.tag===3||t.tag===4}function Fp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ap(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Mc(t,r,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(t,r):a.insertBefore(t,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(t,a)):(r=a,r.appendChild(t)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Is));else if(l!==4&&(t=t.child,t!==null))for(Mc(t,r,a),t=t.sibling;t!==null;)Mc(t,r,a),t=t.sibling}function Lc(t,r,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(l!==4&&(t=t.child,t!==null))for(Lc(t,r,a),t=t.sibling;t!==null;)Lc(t,r,a),t=t.sibling}var Gt=null,sr=!1;function pi(t,r,a){for(a=a.child;a!==null;)$p(t,r,a),a=a.sibling}function $p(t,r,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(nt,a)}catch{}switch(a.tag){case 5:en||Ro(a,r);case 6:var l=Gt,c=sr;Gt=null,pi(t,r,a),Gt=l,sr=c,Gt!==null&&(sr?(t=Gt,a=a.stateNode,t.nodeType===8?t.parentNode.removeChild(a):t.removeChild(a)):Gt.removeChild(a.stateNode));break;case 18:Gt!==null&&(sr?(t=Gt,a=a.stateNode,t.nodeType===8?qu(t.parentNode,a):t.nodeType===1&&qu(t,a),oi(t)):qu(Gt,a.stateNode));break;case 4:l=Gt,c=sr,Gt=a.stateNode.containerInfo,sr=!0,pi(t,r,a),Gt=l,sr=c;break;case 0:case 11:case 14:case 15:if(!en&&(l=a.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var h=c,S=h.destroy;h=h.tag,S!==void 0&&((h&2)!==0||(h&4)!==0)&&jc(a,r,S),c=c.next}while(c!==l)}pi(t,r,a);break;case 1:if(!en&&(Ro(a,r),l=a.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=a.memoizedProps,l.state=a.memoizedState,l.componentWillUnmount()}catch(_){Tt(a,r,_)}pi(t,r,a);break;case 21:pi(t,r,a);break;case 22:a.mode&1?(en=(l=en)||a.memoizedState!==null,pi(t,r,a),en=l):pi(t,r,a);break;default:pi(t,r,a)}}function zp(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var a=t.stateNode;a===null&&(a=t.stateNode=new g1),r.forEach(function(l){var c=k1.bind(null,t,l);a.has(l)||(a.add(l),l.then(c,c))})}}function lr(t,r){var a=r.deletions;if(a!==null)for(var l=0;lc&&(c=S),l&=~h}if(l=c,l=Ve()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*w1(l/1960))-l,10t?16:t,gi===null)var l=!1;else{if(t=gi,gi=null,cl=0,(Ke&6)!==0)throw Error(i(331));var c=Ke;for(Ke|=4,xe=t.current;xe!==null;){var h=xe,S=h.child;if((xe.flags&16)!==0){var _=h.deletions;if(_!==null){for(var M=0;M<_.length;M++){var B=_[M];for(xe=B;xe!==null;){var te=xe;switch(te.tag){case 0:case 11:case 15:Pa(8,te,h)}var ie=te.child;if(ie!==null)ie.return=te,xe=ie;else for(;xe!==null;){te=xe;var J=te.sibling,me=te.return;if(Ip(te),te===B){xe=null;break}if(J!==null){J.return=me,xe=J;break}xe=me}}}var be=h.alternate;if(be!==null){var Te=be.child;if(Te!==null){be.child=null;do{var Mt=Te.sibling;Te.sibling=null,Te=Mt}while(Te!==null)}}xe=h}}if((h.subtreeFlags&2064)!==0&&S!==null)S.return=h,xe=S;else e:for(;xe!==null;){if(h=xe,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:Pa(9,h,h.return)}var A=h.sibling;if(A!==null){A.return=h.return,xe=A;break e}xe=h.return}}var D=t.current;for(xe=D;xe!==null;){S=xe;var F=S.child;if((S.subtreeFlags&2064)!==0&&F!==null)F.return=S,xe=F;else e:for(S=D;xe!==null;){if(_=xe,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:ol(9,_)}}catch(je){Tt(_,_.return,je)}if(_===S){xe=null;break e}var ae=_.sibling;if(ae!==null){ae.return=_.return,xe=ae;break e}xe=_.return}}if(Ke=c,di(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(nt,t)}catch{}l=!0}return l}finally{tt=a,Gn.transition=r}}return!1}function Xp(t,r,a){r=Oo(a,r),r=gp(t,r,1),t=hi(t,r,1),r=an(),t!==null&&(Ii(t,1,r),Cn(t,r))}function Tt(t,r,a){if(t.tag===3)Xp(t,t,a);else for(;r!==null;){if(r.tag===3){Xp(r,t,a);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(mi===null||!mi.has(l))){t=Oo(a,t),t=vp(r,t,1),r=hi(r,t,1),t=an(),r!==null&&(Ii(r,1,t),Cn(r,t));break}}r=r.return}}function _1(t,r,a){var l=t.pingCache;l!==null&&l.delete(r),r=an(),t.pingedLanes|=t.suspendedLanes&a,Bt===t&&(Zt&a)===a&&($t===4||$t===3&&(Zt&130023424)===Zt&&500>Ve()-Rc?Yi(t,0):Oc|=a),Cn(t,r)}function Jp(t,r){r===0&&((t.mode&1)===0?r=1:(r=mo,mo<<=1,(mo&130023424)===0&&(mo=4194304)));var a=an();t=Br(t,r),t!==null&&(Ii(t,r,a),Cn(t,a))}function E1(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Jp(t,a)}function k1(t,r){var a=0;switch(t.tag){case 13:var l=t.stateNode,c=t.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=t.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(r),Jp(t,a)}var em;em=function(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps||vn.current)wn=!0;else{if((t.lanes&a)===0&&(r.flags&128)===0)return wn=!1,h1(t,r,a);wn=(t.flags&131072)!==0}else wn=!1,Ct&&(r.flags&1048576)!==0&&Lh(r,Us,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;rl(t,r),t=r.pendingProps;var c=ko(r,Yt.current);Mo(r,a),c=pc(null,r,l,t,c,a);var h=mc();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,yn(l)?(h=!0,$s(r)):h=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,oc(r),c.updater=Zs,r.stateNode=c,c._reactInternals=r,sc(r,l,t,a),r=bc(null,r,l,!0,h,a)):(r.tag=0,Ct&&h&&Qu(r),on(null,r,c,a),r=r.child),r;case 16:l=r.elementType;e:{switch(rl(t,r),t=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=T1(l),t=ar(l,t),c){case 0:r=Sc(null,r,l,t,a);break e;case 1:r=kp(null,r,l,t,a);break e;case 11:r=Cp(null,r,l,t,a);break e;case 14:r=Sp(null,r,l,ar(l.type,t),a);break e}throw Error(i(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),Sc(t,r,l,c,a);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),kp(t,r,l,c,a);case 3:e:{if(Np(r),t===null)throw Error(i(387));l=r.pendingProps,h=r.memoizedState,c=h.element,Fh(t,r),Gs(r,l,null,a);var S=r.memoizedState;if(l=S.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){c=Oo(Error(i(423)),r),r=Tp(t,r,l,a,c);break e}else if(l!==c){c=Oo(Error(i(424)),r),r=Tp(t,r,l,a,c);break e}else for(Dn=li(r.stateNode.containerInfo.firstChild),Ln=r,Ct=!0,or=null,a=Gh(r,null,l,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(jo(),l===c){r=Hr(t,r,a);break e}on(t,r,l,a)}r=r.child}return r;case 5:return Zh(r),t===null&&Xu(r),l=r.type,c=r.pendingProps,h=t!==null?t.memoizedProps:null,S=c.children,Hu(l,c)?S=null:h!==null&&Hu(l,h)&&(r.flags|=32),Ep(t,r),on(t,r,S,a),r.child;case 6:return t===null&&Xu(r),null;case 13:return jp(t,r,a);case 4:return lc(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Lo(r,null,l,a):on(t,r,l,a),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),Cp(t,r,l,c,a);case 7:return on(t,r,r.pendingProps,a),r.child;case 8:return on(t,r,r.pendingProps.children,a),r.child;case 12:return on(t,r,r.pendingProps.children,a),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,h=r.memoizedProps,S=c.value,mt(Vs,l._currentValue),l._currentValue=S,h!==null)if(ir(h.value,S)){if(h.children===c.children&&!vn.current){r=Hr(t,r,a);break e}}else for(h=r.child,h!==null&&(h.return=r);h!==null;){var _=h.dependencies;if(_!==null){S=h.child;for(var M=_.firstContext;M!==null;){if(M.context===l){if(h.tag===1){M=Ur(-1,a&-a),M.tag=2;var B=h.updateQueue;if(B!==null){B=B.shared;var te=B.pending;te===null?M.next=M:(M.next=te.next,te.next=M),B.pending=M}}h.lanes|=a,M=h.alternate,M!==null&&(M.lanes|=a),rc(h.return,a,r),_.lanes|=a;break}M=M.next}}else if(h.tag===10)S=h.type===r.type?null:h.child;else if(h.tag===18){if(S=h.return,S===null)throw Error(i(341));S.lanes|=a,_=S.alternate,_!==null&&(_.lanes|=a),rc(S,a,r),S=h.sibling}else S=h.child;if(S!==null)S.return=h;else for(S=h;S!==null;){if(S===r){S=null;break}if(h=S.sibling,h!==null){h.return=S.return,S=h;break}S=S.return}h=S}on(t,r,c.children,a),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,Mo(r,a),c=qn(c),l=l(c),r.flags|=1,on(t,r,l,a),r.child;case 14:return l=r.type,c=ar(l,r.pendingProps),c=ar(l.type,c),Sp(t,r,l,c,a);case 15:return bp(t,r,r.type,r.pendingProps,a);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:ar(l,c),rl(t,r),r.tag=1,yn(l)?(t=!0,$s(r)):t=!1,Mo(r,a),Hh(r,l,c),sc(r,l,c,a),bc(null,r,l,!0,t,a);case 19:return Mp(t,r,a);case 22:return _p(t,r,a)}throw Error(i(156,r.tag))};function tm(t,r){return Xe(t,r)}function N1(t,r,a,l){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(t,r,a,l){return new N1(t,r,a,l)}function Hc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function T1(t){if(typeof t=="function")return Hc(t)?1:0;if(t!=null){if(t=t.$$typeof,t===U)return 11;if(t===he)return 14}return 2}function wi(t,r){var a=t.alternate;return a===null?(a=Zn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&14680064,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a}function pl(t,r,a,l,c,h){var S=2;if(l=t,typeof t=="function")Hc(t)&&(S=1);else if(typeof t=="string")S=5;else e:switch(t){case O:return Ji(a.children,c,h,r);case K:S=8,c|=8;break;case ce:return t=Zn(12,a,r,c|2),t.elementType=ce,t.lanes=h,t;case W:return t=Zn(13,a,r,c),t.elementType=W,t.lanes=h,t;case ne:return t=Zn(19,a,r,c),t.elementType=ne,t.lanes=h,t;case _e:return ml(a,c,h,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case fe:S=10;break e;case I:S=9;break e;case U:S=11;break e;case he:S=14;break e;case Ce:S=16,l=null;break e}throw Error(i(130,t==null?t:typeof t,""))}return r=Zn(S,a,r,c),r.elementType=t,r.type=l,r.lanes=h,r}function Ji(t,r,a,l){return t=Zn(7,t,l,r),t.lanes=a,t}function ml(t,r,a,l){return t=Zn(22,t,l,r),t.elementType=_e,t.lanes=a,t.stateNode={isHidden:!1},t}function Vc(t,r,a){return t=Zn(6,t,null,r),t.lanes=a,t}function qc(t,r,a){return r=Zn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function j1(t,r,a,l,c){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=aa(0),this.expirationTimes=aa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=aa(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Wc(t,r,a,l,c,h,S,_,M){return t=new j1(t,r,a,_,M),r===1?(r=1,h===!0&&(r|=8)):r=0,h=Zn(3,null,null,r),t.current=h,h.stateNode=t,h.memoizedState={element:l,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},oc(h),t}function P1(t,r,a){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Xc.exports=U1(),Xc.exports}var mm;function H1(){if(mm)return Sl;mm=1;var e=Ug();return Sl.createRoot=e.createRoot,Sl.hydrateRoot=e.hydrateRoot,Sl}var V1=H1();const q1="modulepreload",W1=function(e){return"/"+e},gm={},Qn=function(n,i,o){let s=Promise.resolve();if(i&&i.length>0){let p=function(y){return Promise.all(y.map(w=>Promise.resolve(w).then(C=>({status:"fulfilled",value:C}),C=>({status:"rejected",reason:C}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");s=p(i.map(y=>{if(y=W1(y),y in gm)return;gm[y]=!0;const w=y.endsWith(".css"),C=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${C}`))return;const m=document.createElement("link");if(m.rel=w?"stylesheet":q1,w||(m.as="script"),m.crossOrigin="",m.href=y,f&&m.setAttribute("nonce",f),document.head.appendChild(m),w)return new Promise((x,N)=>{m.addEventListener("load",x),m.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${y}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return s.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return n().catch(u)})};var ef=Ug();const G1=Bg(ef),Z1=zg({__proto__:null,default:G1},[ef]);/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. @@ -47,8 +47,8 @@ Error generating stack: `+h.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function St(){return St=Object.assign?Object.assign.bind():function(e){for(var n=1;n"u")throw new Error(n)}function Ko(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function K1(){return Math.random().toString(36).substr(2,8)}function ym(e,n){return{usr:e.state,key:e.key,idx:n}}function Ja(e,n,i,o){return i===void 0&&(i=null),St({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?Ni(n):n,{state:i,key:n&&n.key||o||K1()})}function so(e){let{pathname:n="/",search:i="",hash:o=""}=e;return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ni(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substr(i),e=e.substr(0,i));let o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}function Y1(e,n,i,o){o===void 0&&(o={});let{window:s=document.defaultView,v5Compat:u=!1}=o,d=s.history,f=It.Pop,p=null,y=w();y==null&&(y=0,d.replaceState(St({},d.state,{idx:y}),""));function w(){return(d.state||{idx:null}).idx}function C(){f=It.Pop;let N=w(),P=N==null?null:N-y;y=N,p&&p({action:f,location:b.location,delta:P})}function m(N,P){f=It.Push;let L=Ja(b.location,N,P);y=w()+1;let $=ym(L,y),q=b.createHref(L);try{d.pushState($,"",q)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;s.location.assign(q)}u&&p&&p({action:f,location:b.location,delta:1})}function x(N,P){f=It.Replace;let L=Ja(b.location,N,P);y=w();let $=ym(L,y),q=b.createHref(L);d.replaceState($,"",q),u&&p&&p({action:f,location:b.location,delta:0})}function E(N){let P=s.location.origin!=="null"?s.location.origin:s.location.href,L=typeof N=="string"?N:so(N);return L=L.replace(/ $/,"%20"),Qe(P,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,P)}let b={get action(){return f},get location(){return e(s,d)},listen(N){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(vm,C),p=N,()=>{s.removeEventListener(vm,C),p=null}},createHref(N){return n(s,N)},createURL:E,encodeLocation(N){let P=E(N);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:m,replace:x,go(N){return d.go(N)}};return b}var rt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rt||(rt={}));const X1=new Set(["lazy","caseSensitive","path","id","index","children"]);function J1(e){return e.index===!0}function Ql(e,n,i,o){return i===void 0&&(i=[]),o===void 0&&(o={}),e.map((s,u)=>{let d=[...i,String(u)],f=typeof s.id=="string"?s.id:d.join("-");if(Qe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Qe(!o[f],'Found a route id collision on id "'+f+`". Route id's must be globally unique within Data Router usages`),J1(s)){let p=St({},s,n(s),{id:f});return o[f]=p,p}else{let p=St({},s,n(s),{id:f,children:void 0});return o[f]=p,s.children&&(p.children=Ql(s.children,n,d,o)),p}})}function to(e,n,i){return i===void 0&&(i="/"),Ul(e,n,i,!1)}function Ul(e,n,i,o){let s=typeof n=="string"?Ni(n):n,u=na(s.pathname||"/",i);if(u==null)return null;let d=Hg(e);tw(d);let f=null;for(let p=0;f==null&&p{let p={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Qe(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let y=Qr([o,p.relativePath]),w=i.concat(p);u.children&&u.children.length>0&&(Qe(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),Hg(u.children,n,w,y)),!(u.path==null&&!u.index)&&n.push({path:y,score:lw(y,u.index),routesMeta:w})};return e.forEach((u,d)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))s(u,d);else for(let p of Vg(u.path))s(u,d,p)}),n}function Vg(e){let n=e.split("/");if(n.length===0)return[];let[i,...o]=n,s=i.endsWith("?"),u=i.replace(/\?$/,"");if(o.length===0)return s?[u,""]:[u];let d=Vg(o.join("/")),f=[];return f.push(...d.map(p=>p===""?u:[u,p].join("/"))),s&&f.push(...d),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function tw(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:uw(n.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}const nw=/^:[\w-]+$/,rw=3,iw=2,ow=1,aw=10,sw=-2,wm=e=>e==="*";function lw(e,n){let i=e.split("/"),o=i.length;return i.some(wm)&&(o+=sw),n&&(o+=iw),i.filter(s=>!wm(s)).reduce((s,u)=>s+(nw.test(u)?rw:u===""?ow:aw),o)}function uw(e,n){return e.length===n.length&&e.slice(0,-1).every((o,s)=>o===n[s])?e[e.length-1]-n[n.length-1]:0}function cw(e,n,i){i===void 0&&(i=!1);let{routesMeta:o}=e,s={},u="/",d=[];for(let f=0;f{let{paramName:m,isOptional:x}=w;if(m==="*"){let b=f[C]||"";d=u.slice(0,u.length-b.length).replace(/(.)\/+$/,"$1")}const E=f[C];return x&&!E?y[m]=void 0:y[m]=(E||"").replace(/%2F/g,"/"),y},{}),pathname:u,pathnameBase:d,pattern:e}}function dw(e,n,i){n===void 0&&(n=!1),i===void 0&&(i=!0),Ko(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,p)=>(o.push({paramName:f,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),o]}function fw(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Ko(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function na(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,o=e.charAt(i);return o&&o!=="/"?null:e.slice(i)||"/"}function hw(e,n){n===void 0&&(n="/");let{pathname:i,search:o="",hash:s=""}=typeof e=="string"?Ni(e):e;return{pathname:i?i.startsWith("/")?i:pw(i,n):n,search:gw(o),hash:vw(s)}}function pw(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function td(e,n,i,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function qg(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function tf(e,n){let i=qg(e);return n?i.map((o,s)=>s===i.length-1?o.pathname:o.pathnameBase):i.map(o=>o.pathnameBase)}function nf(e,n,i,o){o===void 0&&(o=!1);let s;typeof e=="string"?s=Ni(e):(s=St({},e),Qe(!s.pathname||!s.pathname.includes("?"),td("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),td("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),td("#","search","hash",s)));let u=e===""||s.pathname==="",d=u?"/":s.pathname,f;if(d==null)f=i;else{let C=n.length-1;if(!o&&d.startsWith("..")){let m=d.split("/");for(;m[0]==="..";)m.shift(),C-=1;s.pathname=m.join("/")}f=C>=0?n[C]:"/"}let p=hw(s,f),y=d&&d!=="/"&&d.endsWith("/"),w=(u||d===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(y||w)&&(p.pathname+="/"),p}const Qr=e=>e.join("/").replace(/\/\/+/g,"/"),mw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Kl{constructor(n,i,o,s){s===void 0&&(s=!1),this.status=n,this.statusText=i||"",this.internal=s,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}}function es(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Wg=["post","put","patch","delete"],yw=new Set(Wg),ww=["get",...Wg],xw=new Set(ww),Cw=new Set([301,302,303,307,308]),Sw=new Set([307,308]),nd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bw={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ia={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},rf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_w=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Gg="remix-router-transitions";function Ew(e){const n=e.window?e.window:typeof window<"u"?window:void 0,i=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u",o=!i;Qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let j=e.detectErrorBoundary;s=R=>({hasErrorBoundary:j(R)})}else s=_w;let u={},d=Ql(e.routes,s,void 0,u),f,p=e.basename||"/",y=e.dataStrategy||jw,w=e.patchRoutesOnNavigation,C=St({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,x=new Set,E=null,b=null,N=null,P=e.hydrationData!=null,L=to(d,e.history.location,p),$=!1,q=null;if(L==null&&!w){let j=bn(404,{pathname:e.history.location.pathname}),{matches:R,route:z}=Mm(d);L=R,q={[z.id]:j}}L&&!e.hydrationData&&Yn(L,d,e.history.location.pathname).active&&(L=null);let Z;if(L)if(L.some(j=>j.route.lazy))Z=!1;else if(!L.some(j=>j.route.loader))Z=!0;else if(C.v7_partialHydration){let j=e.hydrationData?e.hydrationData.loaderData:null,R=e.hydrationData?e.hydrationData.errors:null;if(R){let z=L.findIndex(X=>R[X.route.id]!==void 0);Z=L.slice(0,z+1).every(X=>!kd(X.route,j,R))}else Z=L.every(z=>!kd(z.route,j,R))}else Z=e.hydrationData!=null;else if(Z=!1,L=[],C.v7_partialHydration){let j=Yn(null,d,e.history.location.pathname);j.active&&j.matches&&($=!0,L=j.matches)}let fe,O={historyAction:e.history.action,location:e.history.location,matches:L,initialized:Z,navigation:nd,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||q,fetchers:new Map,blockers:new Map},K=It.Pop,ce=!1,de,I=!1,U=new Map,W=null,ne=!1,he=!1,Ce=[],_e=new Set,G=new Map,ue=0,T=-1,H=new Map,oe=new Set,Se=new Map,se=new Map,re=new Set,ee=new Map,Q=new Map,Y;function et(){if(m=e.history.listen(j=>{let{action:R,location:z,delta:X}=j;if(Y){Y(),Y=void 0;return}Ko(Q.size===0||X!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let le=jr({currentLocation:O.location,nextLocation:z,historyAction:R});if(le&&X!=null){let Ee=new Promise(Me=>{Y=Me});e.history.go(X*-1),$n(le,{state:"blocked",location:z,proceed(){$n(le,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),Ee.then(()=>e.history.go(X))},reset(){let Me=new Map(O.blockers);Me.set(le,Ia),ot({blockers:Me})}});return}return ft(R,z)}),i){Hw(n,U);let j=()=>Vw(n,U);n.addEventListener("pagehide",j),W=()=>n.removeEventListener("pagehide",j)}return O.initialized||ft(It.Pop,O.location,{initialHydration:!0}),fe}function tn(){m&&m(),W&&W(),x.clear(),de&&de.abort(),O.fetchers.forEach((j,R)=>pt(R)),O.blockers.forEach((j,R)=>Tr(R))}function Wt(j){return x.add(j),()=>x.delete(j)}function ot(j,R){R===void 0&&(R={}),O=St({},O,j);let z=[],X=[];C.v7_fetcherPersist&&O.fetchers.forEach((le,Ee)=>{le.state==="idle"&&(re.has(Ee)?X.push(Ee):z.push(Ee))}),re.forEach(le=>{!O.fetchers.has(le)&&!G.has(le)&&X.push(le)}),[...x].forEach(le=>le(O,{deletedFetchers:X,viewTransitionOpts:R.viewTransitionOpts,flushSync:R.flushSync===!0})),C.v7_fetcherPersist?(z.forEach(le=>O.fetchers.delete(le)),X.forEach(le=>pt(le))):X.forEach(le=>re.delete(le))}function bt(j,R,z){var X,le;let{flushSync:Ee}=z===void 0?{}:z,Me=O.actionData!=null&&O.navigation.formMethod!=null&&cr(O.navigation.formMethod)&&O.navigation.state==="loading"&&((X=j.state)==null?void 0:X._isRedirect)!==!0,ye;R.actionData?Object.keys(R.actionData).length>0?ye=R.actionData:ye=null:Me?ye=O.actionData:ye=null;let we=R.loaderData?jm(O.loaderData,R.loaderData,R.matches||[],R.errors):O.loaderData,ge=O.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((ze,Pt)=>ge.set(Pt,Ia)));let ve=ce===!0||O.navigation.formMethod!=null&&cr(O.navigation.formMethod)&&((le=j.state)==null?void 0:le._isRedirect)!==!0;f&&(d=f,f=void 0),ne||K===It.Pop||(K===It.Push?e.history.push(j,j.state):K===It.Replace&&e.history.replace(j,j.state));let Fe;if(K===It.Pop){let ze=U.get(O.location.pathname);ze&&ze.has(j.pathname)?Fe={currentLocation:O.location,nextLocation:j}:U.has(j.pathname)&&(Fe={currentLocation:j,nextLocation:O.location})}else if(I){let ze=U.get(O.location.pathname);ze?ze.add(j.pathname):(ze=new Set([j.pathname]),U.set(O.location.pathname,ze)),Fe={currentLocation:O.location,nextLocation:j}}ot(St({},R,{actionData:ye,loaderData:we,historyAction:K,location:j,initialized:!0,navigation:nd,revalidation:"idle",restoreScrollPosition:Di(j,R.matches||O.matches),preventScrollReset:ve,blockers:ge}),{viewTransitionOpts:Fe,flushSync:Ee===!0}),K=It.Pop,ce=!1,I=!1,ne=!1,he=!1,Ce=[]}async function st(j,R){if(typeof j=="number"){e.history.go(j);return}let z=Ed(O.location,O.matches,p,C.v7_prependBasename,j,C.v7_relativeSplatPath,R?.fromRouteId,R?.relative),{path:X,submission:le,error:Ee}=Cm(C.v7_normalizeFormMethod,!1,z,R),Me=O.location,ye=Ja(O.location,X,R&&R.state);ye=St({},ye,e.history.encodeLocation(ye));let we=R&&R.replace!=null?R.replace:void 0,ge=It.Push;we===!0?ge=It.Replace:we===!1||le!=null&&cr(le.formMethod)&&le.formAction===O.location.pathname+O.location.search&&(ge=It.Replace);let ve=R&&"preventScrollReset"in R?R.preventScrollReset===!0:void 0,Fe=(R&&R.flushSync)===!0,ze=jr({currentLocation:Me,nextLocation:ye,historyAction:ge});if(ze){$n(ze,{state:"blocked",location:ye,proceed(){$n(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),st(j,R)},reset(){let Pt=new Map(O.blockers);Pt.set(ze,Ia),ot({blockers:Pt})}});return}return await ft(ge,ye,{submission:le,pendingError:Ee,preventScrollReset:ve,replace:R&&R.replace,enableViewTransition:R&&R.viewTransition,flushSync:Fe})}function wt(){if(Kn(),ot({revalidation:"loading"}),O.navigation.state!=="submitting"){if(O.navigation.state==="idle"){ft(O.historyAction,O.location,{startUninterruptedRevalidation:!0});return}ft(K||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:I===!0})}}async function ft(j,R,z){de&&de.abort(),de=null,K=j,ne=(z&&z.startUninterruptedRevalidation)===!0,ei(O.location,O.matches),ce=(z&&z.preventScrollReset)===!0,I=(z&&z.enableViewTransition)===!0;let X=f||d,le=z&&z.overrideNavigation,Ee=z!=null&&z.initialHydration&&O.matches&&O.matches.length>0&&!$?O.matches:to(X,R,p),Me=(z&&z.flushSync)===!0;if(Ee&&O.initialized&&!he&&Rw(O.location,R)&&!(z&&z.submission&&cr(z.submission.formMethod))){bt(R,{matches:Ee},{flushSync:Me});return}let ye=Yn(Ee,X,R.pathname);if(ye.active&&ye.matches&&(Ee=ye.matches),!Ee){let{error:Ye,notFoundMatches:Ge,route:Xe}=fn(R.pathname);bt(R,{matches:Ge,loaderData:{},errors:{[Xe.id]:Ye}},{flushSync:Me});return}de=new AbortController;let we=$o(e.history,R,de.signal,z&&z.submission),ge;if(z&&z.pendingError)ge=[no(Ee).route.id,{type:rt.error,error:z.pendingError}];else if(z&&z.submission&&cr(z.submission.formMethod)){let Ye=await ht(we,R,z.submission,Ee,ye.active,{replace:z.replace,flushSync:Me});if(Ye.shortCircuited)return;if(Ye.pendingActionResult){let[Ge,Xe]=Ye.pendingActionResult;if(In(Xe)&&es(Xe.error)&&Xe.error.status===404){de=null,bt(R,{matches:Ye.matches,loaderData:{},errors:{[Ge]:Xe.error}});return}}Ee=Ye.matches||Ee,ge=Ye.pendingActionResult,le=rd(R,z.submission),Me=!1,ye.active=!1,we=$o(e.history,we.url,we.signal)}let{shortCircuited:ve,matches:Fe,loaderData:ze,errors:Pt}=await xt(we,R,Ee,ye.active,le,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,Me,ge);ve||(de=null,bt(R,St({matches:Fe||Ee},Pm(ge),{loaderData:ze,errors:Pt})))}async function ht(j,R,z,X,le,Ee){Ee===void 0&&(Ee={}),Kn();let Me=Bw(R,z);if(ot({navigation:Me},{flushSync:Ee.flushSync===!0}),le){let ge=await hn(X,R.pathname,j.signal);if(ge.type==="aborted")return{shortCircuited:!0};if(ge.type==="error"){let ve=no(ge.partialMatches).route.id;return{matches:ge.partialMatches,pendingActionResult:[ve,{type:rt.error,error:ge.error}]}}else if(ge.matches)X=ge.matches;else{let{notFoundMatches:ve,error:Fe,route:ze}=fn(R.pathname);return{matches:ve,pendingActionResult:[ze.id,{type:rt.error,error:Fe}]}}}let ye,we=Za(X,R);if(!we.route.action&&!we.route.lazy)ye={type:rt.error,error:bn(405,{method:j.method,pathname:R.pathname,routeId:we.route.id})};else if(ye=(await cn("action",O,j,[we],X,null))[we.route.id],j.signal.aborted)return{shortCircuited:!0};if(oo(ye)){let ge;return Ee&&Ee.replace!=null?ge=Ee.replace:ge=km(ye.response.headers.get("Location"),new URL(j.url),p)===O.location.pathname+O.location.search,await un(j,ye,!0,{submission:z,replace:ge}),{shortCircuited:!0}}if(Ei(ye))throw bn(400,{type:"defer-action"});if(In(ye)){let ge=no(X,we.route.id);return(Ee&&Ee.replace)!==!0&&(K=It.Push),{matches:X,pendingActionResult:[ge.route.id,ye]}}return{matches:X,pendingActionResult:[we.route.id,ye]}}async function xt(j,R,z,X,le,Ee,Me,ye,we,ge,ve){let Fe=le||rd(R,Ee),ze=Ee||Me||Dm(Fe),Pt=!ne&&(!C.v7_partialHydration||!we);if(X){if(Pt){let nt=nn(ve);ot(St({navigation:Fe},nt!==void 0?{actionData:nt}:{}),{flushSync:ge})}let He=await hn(z,R.pathname,j.signal);if(He.type==="aborted")return{shortCircuited:!0};if(He.type==="error"){let nt=no(He.partialMatches).route.id;return{matches:He.partialMatches,loaderData:{},errors:{[nt]:He.error}}}else if(He.matches)z=He.matches;else{let{error:nt,notFoundMatches:_t,route:Lr}=fn(R.pathname);return{matches:_t,loaderData:{},errors:{[Lr.id]:nt}}}}let Ye=f||d,[Ge,Xe]=bm(e.history,O,z,ze,R,C.v7_partialHydration&&we===!0,C.v7_skipActionErrorRevalidation,he,Ce,_e,re,Se,oe,Ye,p,ve);if(rn(He=>!(z&&z.some(nt=>nt.route.id===He))||Ge&&Ge.some(nt=>nt.route.id===He)),T=++ue,Ge.length===0&&Xe.length===0){let He=Pi();return bt(R,St({matches:z,loaderData:{},errors:ve&&In(ve[1])?{[ve[0]]:ve[1].error}:null},Pm(ve),He?{fetchers:new Map(O.fetchers)}:{}),{flushSync:ge}),{shortCircuited:!0}}if(Pt){let He={};if(!X){He.navigation=Fe;let nt=nn(ve);nt!==void 0&&(He.actionData=nt)}Xe.length>0&&(He.fetchers=Tn(Xe)),ot(He,{flushSync:ge})}Xe.forEach(He=>{dn(He.key),He.controller&&G.set(He.key,He.controller)});let Pn=()=>Xe.forEach(He=>dn(He.key));de&&de.signal.addEventListener("abort",Pn);let{loaderResults:pn,fetcherResults:Mn}=await Er(O,z,Ge,Xe,j);if(j.signal.aborted)return{shortCircuited:!0};de&&de.signal.removeEventListener("abort",Pn),Xe.forEach(He=>G.delete(He.key));let Ve=bl(pn);if(Ve)return await un(j,Ve.result,!0,{replace:ye}),{shortCircuited:!0};if(Ve=bl(Mn),Ve)return oe.add(Ve.key),await un(j,Ve.result,!0,{replace:ye}),{shortCircuited:!0};let{loaderData:Oi,errors:At}=Tm(O,z,pn,ve,Xe,Mn,ee);ee.forEach((He,nt)=>{He.subscribe(_t=>{(_t||He.done)&&ee.delete(nt)})}),C.v7_partialHydration&&we&&O.errors&&(At=St({},O.errors,At));let zn=Pi(),mn=kr(T),ti=zn||mn||Xe.length>0;return St({matches:z,loaderData:Oi,errors:At},ti?{fetchers:new Map(O.fetchers)}:{})}function nn(j){if(j&&!In(j[1]))return{[j[0]]:j[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function Tn(j){return j.forEach(R=>{let z=O.fetchers.get(R.key),X=Aa(void 0,z?z.data:void 0);O.fetchers.set(R.key,X)}),new Map(O.fetchers)}function ln(j,R,z,X){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");dn(j);let le=(X&&X.flushSync)===!0,Ee=f||d,Me=Ed(O.location,O.matches,p,C.v7_prependBasename,z,C.v7_relativeSplatPath,R,X?.relative),ye=to(Ee,Me,p),we=Yn(ye,Ee,Me);if(we.active&&we.matches&&(ye=we.matches),!ye){Dt(j,R,bn(404,{pathname:Me}),{flushSync:le});return}let{path:ge,submission:ve,error:Fe}=Cm(C.v7_normalizeFormMethod,!0,Me,X);if(Fe){Dt(j,R,Fe,{flushSync:le});return}let ze=Za(ye,ge),Pt=(X&&X.preventScrollReset)===!0;if(ve&&cr(ve.formMethod)){jn(j,R,ge,ze,ye,we.active,le,Pt,ve);return}Se.set(j,{routeId:R,path:ge}),Jr(j,R,ge,ze,ye,we.active,le,Pt,ve)}async function jn(j,R,z,X,le,Ee,Me,ye,we){Kn(),Se.delete(j);function ge(Ze){if(!Ze.route.action&&!Ze.route.lazy){let pr=bn(405,{method:we.formMethod,pathname:z,routeId:R});return Dt(j,R,pr,{flushSync:Me}),!0}return!1}if(!Ee&&ge(X))return;let ve=O.fetchers.get(j);lt(j,Uw(we,ve),{flushSync:Me});let Fe=new AbortController,ze=$o(e.history,z,Fe.signal,we);if(Ee){let Ze=await hn(le,new URL(ze.url).pathname,ze.signal,j);if(Ze.type==="aborted")return;if(Ze.type==="error"){Dt(j,R,Ze.error,{flushSync:Me});return}else if(Ze.matches){if(le=Ze.matches,X=Za(le,z),ge(X))return}else{Dt(j,R,bn(404,{pathname:z}),{flushSync:Me});return}}G.set(j,Fe);let Pt=ue,Ge=(await cn("action",O,ze,[X],le,j))[X.route.id];if(ze.signal.aborted){G.get(j)===Fe&&G.delete(j);return}if(C.v7_fetcherPersist&&re.has(j)){if(oo(Ge)||In(Ge)){lt(j,_i(void 0));return}}else{if(oo(Ge))if(G.delete(j),T>Pt){lt(j,_i(void 0));return}else return oe.add(j),lt(j,Aa(we)),un(ze,Ge,!1,{fetcherSubmission:we,preventScrollReset:ye});if(In(Ge)){Dt(j,R,Ge.error);return}}if(Ei(Ge))throw bn(400,{type:"defer-action"});let Xe=O.navigation.location||O.location,Pn=$o(e.history,Xe,Fe.signal),pn=f||d,Mn=O.navigation.state!=="idle"?to(pn,O.navigation.location,p):O.matches;Qe(Mn,"Didn't find any matches after fetcher action");let Ve=++ue;H.set(j,Ve);let Oi=Aa(we,Ge.data);O.fetchers.set(j,Oi);let[At,zn]=bm(e.history,O,Mn,we,Xe,!1,C.v7_skipActionErrorRevalidation,he,Ce,_e,re,Se,oe,pn,p,[X.route.id,Ge]);zn.filter(Ze=>Ze.key!==j).forEach(Ze=>{let pr=Ze.key,Dr=O.fetchers.get(pr),Or=Aa(void 0,Dr?Dr.data:void 0);O.fetchers.set(pr,Or),dn(pr),Ze.controller&&G.set(pr,Ze.controller)}),ot({fetchers:new Map(O.fetchers)});let mn=()=>zn.forEach(Ze=>dn(Ze.key));Fe.signal.addEventListener("abort",mn);let{loaderResults:ti,fetcherResults:He}=await Er(O,Mn,At,zn,Pn);if(Fe.signal.aborted)return;Fe.signal.removeEventListener("abort",mn),H.delete(j),G.delete(j),zn.forEach(Ze=>G.delete(Ze.key));let nt=bl(ti);if(nt)return un(Pn,nt.result,!1,{preventScrollReset:ye});if(nt=bl(He),nt)return oe.add(nt.key),un(Pn,nt.result,!1,{preventScrollReset:ye});let{loaderData:_t,errors:Lr}=Tm(O,Mn,ti,void 0,zn,He,ee);if(O.fetchers.has(j)){let Ze=_i(Ge.data);O.fetchers.set(j,Ze)}kr(Ve),O.navigation.state==="loading"&&Ve>T?(Qe(K,"Expected pending action"),de&&de.abort(),bt(O.navigation.location,{matches:Mn,loaderData:_t,errors:Lr,fetchers:new Map(O.fetchers)})):(ot({errors:Lr,loaderData:jm(O.loaderData,_t,Mn,Lr),fetchers:new Map(O.fetchers)}),he=!1)}async function Jr(j,R,z,X,le,Ee,Me,ye,we){let ge=O.fetchers.get(j);lt(j,Aa(we,ge?ge.data:void 0),{flushSync:Me});let ve=new AbortController,Fe=$o(e.history,z,ve.signal);if(Ee){let Ge=await hn(le,new URL(Fe.url).pathname,Fe.signal,j);if(Ge.type==="aborted")return;if(Ge.type==="error"){Dt(j,R,Ge.error,{flushSync:Me});return}else if(Ge.matches)le=Ge.matches,X=Za(le,z);else{Dt(j,R,bn(404,{pathname:z}),{flushSync:Me});return}}G.set(j,ve);let ze=ue,Ye=(await cn("loader",O,Fe,[X],le,j))[X.route.id];if(Ei(Ye)&&(Ye=await of(Ye,Fe.signal,!0)||Ye),G.get(j)===ve&&G.delete(j),!Fe.signal.aborted){if(re.has(j)){lt(j,_i(void 0));return}if(oo(Ye))if(T>ze){lt(j,_i(void 0));return}else{oe.add(j),await un(Fe,Ye,!1,{preventScrollReset:ye});return}if(In(Ye)){Dt(j,R,Ye.error);return}Qe(!Ei(Ye),"Unhandled fetcher deferred data"),lt(j,_i(Ye.data))}}async function un(j,R,z,X){let{submission:le,fetcherSubmission:Ee,preventScrollReset:Me,replace:ye}=X===void 0?{}:X;R.response.headers.has("X-Remix-Revalidate")&&(he=!0);let we=R.response.headers.get("Location");Qe(we,"Expected a Location header on the redirect Response"),we=km(we,new URL(j.url),p);let ge=Ja(O.location,we,{_isRedirect:!0});if(i){let Ge=!1;if(R.response.headers.has("X-Remix-Reload-Document"))Ge=!0;else if(rf.test(we)){const Xe=e.history.createURL(we);Ge=Xe.origin!==n.location.origin||na(Xe.pathname,p)==null}if(Ge){ye?n.location.replace(we):n.location.assign(we);return}}de=null;let ve=ye===!0||R.response.headers.has("X-Remix-Replace")?It.Replace:It.Push,{formMethod:Fe,formAction:ze,formEncType:Pt}=O.navigation;!le&&!Ee&&Fe&&ze&&Pt&&(le=Dm(O.navigation));let Ye=le||Ee;if(Sw.has(R.response.status)&&Ye&&cr(Ye.formMethod))await ft(ve,ge,{submission:St({},Ye,{formAction:we}),preventScrollReset:Me||ce,enableViewTransition:z?I:void 0});else{let Ge=rd(ge,le);await ft(ve,ge,{overrideNavigation:Ge,fetcherSubmission:Ee,preventScrollReset:Me||ce,enableViewTransition:z?I:void 0})}}async function cn(j,R,z,X,le,Ee){let Me,ye={};try{Me=await Pw(y,j,R,z,X,le,Ee,u,s)}catch(we){return X.forEach(ge=>{ye[ge.route.id]={type:rt.error,error:we}}),ye}for(let[we,ge]of Object.entries(Me))if(Iw(ge)){let ve=ge.result;ye[we]={type:rt.redirect,response:Dw(ve,z,we,le,p,C.v7_relativeSplatPath)}}else ye[we]=await Lw(ge);return ye}async function Er(j,R,z,X,le){let Ee=j.matches,Me=cn("loader",j,le,z,R,null),ye=Promise.all(X.map(async ve=>{if(ve.matches&&ve.match&&ve.controller){let ze=(await cn("loader",j,$o(e.history,ve.path,ve.controller.signal),[ve.match],ve.matches,ve.key))[ve.match.route.id];return{[ve.key]:ze}}else return Promise.resolve({[ve.key]:{type:rt.error,error:bn(404,{pathname:ve.path})}})})),we=await Me,ge=(await ye).reduce((ve,Fe)=>Object.assign(ve,Fe),{});return await Promise.all([$w(R,we,le.signal,Ee,j.loaderData),zw(R,ge,X)]),{loaderResults:we,fetcherResults:ge}}function Kn(){he=!0,Ce.push(...rn()),Se.forEach((j,R)=>{G.has(R)&&_e.add(R),dn(R)})}function lt(j,R,z){z===void 0&&(z={}),O.fetchers.set(j,R),ot({fetchers:new Map(O.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function Dt(j,R,z,X){X===void 0&&(X={});let le=no(O.matches,R);pt(j),ot({errors:{[le.route.id]:z},fetchers:new Map(O.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function Qt(j){return se.set(j,(se.get(j)||0)+1),re.has(j)&&re.delete(j),O.fetchers.get(j)||bw}function pt(j){let R=O.fetchers.get(j);G.has(j)&&!(R&&R.state==="loading"&&H.has(j))&&dn(j),Se.delete(j),H.delete(j),oe.delete(j),C.v7_fetcherPersist&&re.delete(j),_e.delete(j),O.fetchers.delete(j)}function Kt(j){let R=(se.get(j)||0)-1;R<=0?(se.delete(j),re.add(j),C.v7_fetcherPersist||pt(j)):se.set(j,R),ot({fetchers:new Map(O.fetchers)})}function dn(j){let R=G.get(j);R&&(R.abort(),G.delete(j))}function ji(j){for(let R of j){let z=Qt(R),X=_i(z.data);O.fetchers.set(R,X)}}function Pi(){let j=[],R=!1;for(let z of oe){let X=O.fetchers.get(z);Qe(X,"Expected fetcher: "+z),X.state==="loading"&&(oe.delete(z),j.push(z),R=!0)}return ji(j),R}function kr(j){let R=[];for(let[z,X]of H)if(X0}function Nr(j,R){let z=O.blockers.get(j)||Ia;return Q.get(j)!==R&&Q.set(j,R),z}function Tr(j){O.blockers.delete(j),Q.delete(j)}function $n(j,R){let z=O.blockers.get(j)||Ia;Qe(z.state==="unblocked"&&R.state==="blocked"||z.state==="blocked"&&R.state==="blocked"||z.state==="blocked"&&R.state==="proceeding"||z.state==="blocked"&&R.state==="unblocked"||z.state==="proceeding"&&R.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+R.state);let X=new Map(O.blockers);X.set(j,R),ot({blockers:X})}function jr(j){let{currentLocation:R,nextLocation:z,historyAction:X}=j;if(Q.size===0)return;Q.size>1&&Ko(!1,"A router only supports one blocker at a time");let le=Array.from(Q.entries()),[Ee,Me]=le[le.length-1],ye=O.blockers.get(Ee);if(!(ye&&ye.state==="proceeding")&&Me({currentLocation:R,nextLocation:z,historyAction:X}))return Ee}function fn(j){let R=bn(404,{pathname:j}),z=f||d,{matches:X,route:le}=Mm(z);return rn(),{notFoundMatches:X,route:le,error:R}}function rn(j){let R=[];return ee.forEach((z,X)=>{(!j||j(X))&&(z.cancel(),R.push(X),ee.delete(X))}),R}function Mi(j,R,z){if(E=j,N=R,b=z||null,!P&&O.navigation===nd){P=!0;let X=Di(O.location,O.matches);X!=null&&ot({restoreScrollPosition:X})}return()=>{E=null,N=null,b=null}}function Li(j,R){return b&&b(j,R.map(X=>ew(X,O.loaderData)))||j.key}function ei(j,R){if(E&&N){let z=Li(j,R);E[z]=N()}}function Di(j,R){if(E){let z=Li(j,R),X=E[z];if(typeof X=="number")return X}return null}function Yn(j,R,z){if(w)if(j){if(Object.keys(j[0].params).length>0)return{active:!0,matches:Ul(R,z,p,!0)}}else return{active:!0,matches:Ul(R,z,p,!0)||[]};return{active:!1,matches:null}}async function hn(j,R,z,X){if(!w)return{type:"success",matches:j};let le=j;for(;;){let Ee=f==null,Me=f||d,ye=u;try{await w({signal:z,path:R,matches:le,fetcherKey:X,patch:(ve,Fe)=>{z.aborted||Em(ve,Fe,Me,ye,s)}})}catch(ve){return{type:"error",error:ve,partialMatches:le}}finally{Ee&&!z.aborted&&(d=[...d])}if(z.aborted)return{type:"aborted"};let we=to(Me,R,p);if(we)return{type:"success",matches:we};let ge=Ul(Me,R,p,!0);if(!ge||le.length===ge.length&&le.every((ve,Fe)=>ve.route.id===ge[Fe].route.id))return{type:"success",matches:null};le=ge}}function Pr(j){u={},f=Ql(j,s,void 0,u)}function Mr(j,R){let z=f==null;Em(j,R,f||d,u,s),z&&(d=[...d],ot({}))}return fe={get basename(){return p},get future(){return C},get state(){return O},get routes(){return d},get window(){return n},initialize:et,subscribe:Wt,enableScrollRestoration:Mi,navigate:st,fetch:ln,revalidate:wt,createHref:j=>e.history.createHref(j),encodeLocation:j=>e.history.encodeLocation(j),getFetcher:Qt,deleteFetcher:Kt,dispose:tn,getBlocker:Nr,deleteBlocker:Tr,patchRoutes:Mr,_internalFetchControllers:G,_internalActiveDeferreds:ee,_internalSetRoutes:Pr},fe}function kw(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ed(e,n,i,o,s,u,d,f){let p,y;if(d){p=[];for(let C of n)if(p.push(C),C.route.id===d){y=C;break}}else p=n,y=n[n.length-1];let w=nf(s||".",tf(p,u),na(e.pathname,i)||e.pathname,f==="path");if(s==null&&(w.search=e.search,w.hash=e.hash),(s==null||s===""||s===".")&&y){let C=af(w.search);if(y.route.index&&!C)w.search=w.search?w.search.replace(/^\?/,"?index&"):"?index";else if(!y.route.index&&C){let m=new URLSearchParams(w.search),x=m.getAll("index");m.delete("index"),x.filter(b=>b).forEach(b=>m.append("index",b));let E=m.toString();w.search=E?"?"+E:""}}return o&&i!=="/"&&(w.pathname=w.pathname==="/"?i:Qr([i,w.pathname])),so(w)}function Cm(e,n,i,o){if(!o||!kw(o))return{path:i};if(o.formMethod&&!Fw(o.formMethod))return{path:i,error:bn(405,{method:o.formMethod})};let s=()=>({path:i,error:bn(400,{type:"invalid-body"})}),u=o.formMethod||"get",d=e?u.toUpperCase():u.toLowerCase(),f=Kg(i);if(o.body!==void 0){if(o.formEncType==="text/plain"){if(!cr(d))return s();let m=typeof o.body=="string"?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce((x,E)=>{let[b,N]=E;return""+x+b+"="+N+` -`},""):String(o.body);return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:void 0,text:m}}}else if(o.formEncType==="application/json"){if(!cr(d))return s();try{let m=typeof o.body=="string"?JSON.parse(o.body):o.body;return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let p,y;if(o.formData)p=Nd(o.formData),y=o.formData;else if(o.body instanceof FormData)p=Nd(o.body),y=o.body;else if(o.body instanceof URLSearchParams)p=o.body,y=Nm(p);else if(o.body==null)p=new URLSearchParams,y=new FormData;else try{p=new URLSearchParams(o.body),y=Nm(p)}catch{return s()}let w={formMethod:d,formAction:f,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(cr(w.formMethod))return{path:i,submission:w};let C=Ni(i);return n&&C.search&&af(C.search)&&p.append("index",""),C.search="?"+p,{path:so(C),submission:w}}function Sm(e,n,i){i===void 0&&(i=!1);let o=e.findIndex(s=>s.route.id===n);return o>=0?e.slice(0,i?o+1:o):e}function bm(e,n,i,o,s,u,d,f,p,y,w,C,m,x,E,b){let N=b?In(b[1])?b[1].error:b[1].data:void 0,P=e.createURL(n.location),L=e.createURL(s),$=i;u&&n.errors?$=Sm(i,Object.keys(n.errors)[0],!0):b&&In(b[1])&&($=Sm(i,b[0]));let q=b?b[1].statusCode:void 0,Z=d&&q&&q>=400,fe=$.filter((K,ce)=>{let{route:de}=K;if(de.lazy)return!0;if(de.loader==null)return!1;if(u)return kd(de,n.loaderData,n.errors);if(Nw(n.loaderData,n.matches[ce],K)||p.some(W=>W===K.route.id))return!0;let I=n.matches[ce],U=K;return _m(K,St({currentUrl:P,currentParams:I.params,nextUrl:L,nextParams:U.params},o,{actionResult:N,actionStatus:q,defaultShouldRevalidate:Z?!1:f||P.pathname+P.search===L.pathname+L.search||P.search!==L.search||Zg(I,U)}))}),O=[];return C.forEach((K,ce)=>{if(u||!i.some(ne=>ne.route.id===K.routeId)||w.has(ce))return;let de=to(x,K.path,E);if(!de){O.push({key:ce,routeId:K.routeId,path:K.path,matches:null,match:null,controller:null});return}let I=n.fetchers.get(ce),U=Za(de,K.path),W=!1;m.has(ce)?W=!1:y.has(ce)?(y.delete(ce),W=!0):I&&I.state!=="idle"&&I.data===void 0?W=f:W=_m(U,St({currentUrl:P,currentParams:n.matches[n.matches.length-1].params,nextUrl:L,nextParams:i[i.length-1].params},o,{actionResult:N,actionStatus:q,defaultShouldRevalidate:Z?!1:f})),W&&O.push({key:ce,routeId:K.routeId,path:K.path,matches:de,match:U,controller:new AbortController})}),[fe,O]}function kd(e,n,i){if(e.lazy)return!0;if(!e.loader)return!1;let o=n!=null&&n[e.id]!==void 0,s=i!=null&&i[e.id]!==void 0;return!o&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!o&&!s}function Nw(e,n,i){let o=!n||i.route.id!==n.route.id,s=e[i.route.id]===void 0;return o||s}function Zg(e,n){let i=e.route.path;return e.pathname!==n.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==n.params["*"]}function _m(e,n){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(n);if(typeof i=="boolean")return i}return n.defaultShouldRevalidate}function Em(e,n,i,o,s){var u;let d;if(e){let y=o[e];Qe(y,"No route found to patch children into: routeId = "+e),y.children||(y.children=[]),d=y.children}else d=i;let f=n.filter(y=>!d.some(w=>Qg(y,w))),p=Ql(f,s,[e||"_","patch",String(((u=d)==null?void 0:u.length)||"0")],o);d.push(...p)}function Qg(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((i,o)=>{var s;return(s=n.children)==null?void 0:s.some(u=>Qg(i,u))}):!1}async function Tw(e,n,i){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let s=i[e.id];Qe(s,"No route found in manifest");let u={};for(let d in o){let p=s[d]!==void 0&&d!=="hasErrorBoundary";Ko(!p,'Route "'+s.id+'" has a static property "'+d+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+d+'" will be ignored.')),!p&&!X1.has(d)&&(u[d]=o[d])}Object.assign(s,u),Object.assign(s,St({},n(s),{lazy:void 0}))}async function jw(e){let{matches:n}=e,i=n.filter(s=>s.shouldLoad);return(await Promise.all(i.map(s=>s.resolve()))).reduce((s,u,d)=>Object.assign(s,{[i[d].route.id]:u}),{})}async function Pw(e,n,i,o,s,u,d,f,p,y){let w=u.map(x=>x.route.lazy?Tw(x.route,p,f):void 0),C=u.map((x,E)=>{let b=w[E],N=s.some(L=>L.route.id===x.route.id);return St({},x,{shouldLoad:N,resolve:async L=>(L&&o.method==="GET"&&(x.route.lazy||x.route.loader)&&(N=!0),N?Mw(n,o,x,b,L,y):Promise.resolve({type:rt.data,result:void 0}))})}),m=await e({matches:C,request:o,params:u[0].params,fetcherKey:d,context:y});try{await Promise.all(w)}catch{}return m}async function Mw(e,n,i,o,s,u){let d,f,p=y=>{let w,C=new Promise((E,b)=>w=b);f=()=>w(),n.signal.addEventListener("abort",f);let m=E=>typeof y!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+i.route.id+"]"))):y({request:n,params:i.params,context:u},...E!==void 0?[E]:[]),x=(async()=>{try{return{type:"data",result:await(s?s(b=>m(b)):m())}}catch(E){return{type:"error",result:E}}})();return Promise.race([x,C])};try{let y=i.route[e];if(o)if(y){let w,[C]=await Promise.all([p(y).catch(m=>{w=m}),o]);if(w!==void 0)throw w;d=C}else if(await o,y=i.route[e],y)d=await p(y);else if(e==="action"){let w=new URL(n.url),C=w.pathname+w.search;throw bn(405,{method:n.method,pathname:C,routeId:i.route.id})}else return{type:rt.data,result:void 0};else if(y)d=await p(y);else{let w=new URL(n.url),C=w.pathname+w.search;throw bn(404,{pathname:C})}Qe(d.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+i.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){return{type:rt.error,result:y}}finally{f&&n.signal.removeEventListener("abort",f)}return d}async function Lw(e){let{result:n,type:i}=e;if(Yg(n)){let C;try{let m=n.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?n.body==null?C=null:C=await n.json():C=await n.text()}catch(m){return{type:rt.error,error:m}}return i===rt.error?{type:rt.error,error:new Kl(n.status,n.statusText,C),statusCode:n.status,headers:n.headers}:{type:rt.data,data:C,statusCode:n.status,headers:n.headers}}if(i===rt.error){if(Lm(n)){var o,s;if(n.data instanceof Error){var u,d;return{type:rt.error,error:n.data,statusCode:(u=n.init)==null?void 0:u.status,headers:(d=n.init)!=null&&d.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:new Kl(((o=n.init)==null?void 0:o.status)||500,void 0,n.data),statusCode:es(n)?n.status:void 0,headers:(s=n.init)!=null&&s.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:n,statusCode:es(n)?n.status:void 0}}if(Aw(n)){var f,p;return{type:rt.deferred,deferredData:n,statusCode:(f=n.init)==null?void 0:f.status,headers:((p=n.init)==null?void 0:p.headers)&&new Headers(n.init.headers)}}if(Lm(n)){var y,w;return{type:rt.data,data:n.data,statusCode:(y=n.init)==null?void 0:y.status,headers:(w=n.init)!=null&&w.headers?new Headers(n.init.headers):void 0}}return{type:rt.data,data:n}}function Dw(e,n,i,o,s,u){let d=e.headers.get("Location");if(Qe(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!rf.test(d)){let f=o.slice(0,o.findIndex(p=>p.route.id===i)+1);d=Ed(new URL(n.url),f,s,!0,d,u),e.headers.set("Location",d)}return e}function km(e,n,i){if(rf.test(e)){let o=e,s=o.startsWith("//")?new URL(n.protocol+o):new URL(o),u=na(s.pathname,i)!=null;if(s.origin===n.origin&&u)return s.pathname+s.search+s.hash}return e}function $o(e,n,i,o){let s=e.createURL(Kg(n)).toString(),u={signal:i};if(o&&cr(o.formMethod)){let{formMethod:d,formEncType:f}=o;u.method=d.toUpperCase(),f==="application/json"?(u.headers=new Headers({"Content-Type":f}),u.body=JSON.stringify(o.json)):f==="text/plain"?u.body=o.text:f==="application/x-www-form-urlencoded"&&o.formData?u.body=Nd(o.formData):u.body=o.formData}return new Request(s,u)}function Nd(e){let n=new URLSearchParams;for(let[i,o]of e.entries())n.append(i,typeof o=="string"?o:o.name);return n}function Nm(e){let n=new FormData;for(let[i,o]of e.entries())n.append(i,o);return n}function Ow(e,n,i,o,s){let u={},d=null,f,p=!1,y={},w=i&&In(i[1])?i[1].error:void 0;return e.forEach(C=>{if(!(C.route.id in n))return;let m=C.route.id,x=n[m];if(Qe(!oo(x),"Cannot handle redirect results in processLoaderData"),In(x)){let E=x.error;w!==void 0&&(E=w,w=void 0),d=d||{};{let b=no(e,m);d[b.route.id]==null&&(d[b.route.id]=E)}u[m]=void 0,p||(p=!0,f=es(x.error)?x.error.status:500),x.headers&&(y[m]=x.headers)}else Ei(x)?(o.set(m,x.deferredData),u[m]=x.deferredData.data,x.statusCode!=null&&x.statusCode!==200&&!p&&(f=x.statusCode),x.headers&&(y[m]=x.headers)):(u[m]=x.data,x.statusCode&&x.statusCode!==200&&!p&&(f=x.statusCode),x.headers&&(y[m]=x.headers))}),w!==void 0&&i&&(d={[i[0]]:w},u[i[0]]=void 0),{loaderData:u,errors:d,statusCode:f||200,loaderHeaders:y}}function Tm(e,n,i,o,s,u,d){let{loaderData:f,errors:p}=Ow(n,i,o,d);return s.forEach(y=>{let{key:w,match:C,controller:m}=y,x=u[w];if(Qe(x,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(In(x)){let E=no(e.matches,C?.route.id);p&&p[E.route.id]||(p=St({},p,{[E.route.id]:x.error})),e.fetchers.delete(w)}else if(oo(x))Qe(!1,"Unhandled fetcher revalidation redirect");else if(Ei(x))Qe(!1,"Unhandled fetcher deferred data");else{let E=_i(x.data);e.fetchers.set(w,E)}}),{loaderData:f,errors:p}}function jm(e,n,i,o){let s=St({},n);for(let u of i){let d=u.route.id;if(n.hasOwnProperty(d)?n[d]!==void 0&&(s[d]=n[d]):e[d]!==void 0&&u.route.loader&&(s[d]=e[d]),o&&o.hasOwnProperty(d))break}return s}function Pm(e){return e?In(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function no(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Mm(e){let n=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function bn(e,n){let{pathname:i,routeId:o,method:s,type:u,message:d}=n===void 0?{}:n,f="Unknown Server Error",p="Unknown @remix-run/router error";return e===400?(f="Bad Request",s&&i&&o?p="You made a "+s+' request to "'+i+'" but '+('did not provide a `loader` for route "'+o+'", ')+"so there is no way to handle the request.":u==="defer-action"?p="defer() is not supported in actions":u==="invalid-body"&&(p="Unable to encode submission body")):e===403?(f="Forbidden",p='Route "'+o+'" does not match URL "'+i+'"'):e===404?(f="Not Found",p='No route matches URL "'+i+'"'):e===405&&(f="Method Not Allowed",s&&i&&o?p="You made a "+s.toUpperCase()+' request to "'+i+'" but '+('did not provide an `action` for route "'+o+'", ')+"so there is no way to handle the request.":s&&(p='Invalid request method "'+s.toUpperCase()+'"')),new Kl(e||500,f,new Error(p),!0)}function bl(e){let n=Object.entries(e);for(let i=n.length-1;i>=0;i--){let[o,s]=n[i];if(oo(s))return{key:o,result:s}}}function Kg(e){let n=typeof e=="string"?Ni(e):e;return so(St({},n,{hash:""}))}function Rw(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function Iw(e){return Yg(e.result)&&Cw.has(e.result.status)}function Ei(e){return e.type===rt.deferred}function In(e){return e.type===rt.error}function oo(e){return(e&&e.type)===rt.redirect}function Lm(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Aw(e){let n=e;return n&&typeof n=="object"&&typeof n.data=="object"&&typeof n.subscribe=="function"&&typeof n.cancel=="function"&&typeof n.resolveData=="function"}function Yg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Fw(e){return xw.has(e.toLowerCase())}function cr(e){return yw.has(e.toLowerCase())}async function $w(e,n,i,o,s){let u=Object.entries(n);for(let d=0;dm?.route.id===f);if(!y)continue;let w=o.find(m=>m.route.id===y.route.id),C=w!=null&&!Zg(w,y)&&(s&&s[y.route.id])!==void 0;Ei(p)&&C&&await of(p,i,!1).then(m=>{m&&(n[f]=m)})}}async function zw(e,n,i){for(let o=0;oy?.route.id===u)&&Ei(f)&&(Qe(d,"Expected an AbortController for revalidating fetcher deferred result"),await of(f,d.signal,!0).then(y=>{y&&(n[s]=y)}))}}async function of(e,n,i){if(i===void 0&&(i=!1),!await e.deferredData.resolveData(n)){if(i)try{return{type:rt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:rt.error,error:s}}return{type:rt.data,data:e.deferredData.data}}}function af(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Za(e,n){let i=typeof n=="string"?Ni(n).search:n.search;if(e[e.length-1].route.index&&af(i||""))return e[e.length-1];let o=qg(e);return o[o.length-1]}function Dm(e){let{formMethod:n,formAction:i,formEncType:o,text:s,formData:u,json:d}=e;if(!(!n||!i||!o)){if(s!=null)return{formMethod:n,formAction:i,formEncType:o,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:n,formAction:i,formEncType:o,formData:u,json:void 0,text:void 0};if(d!==void 0)return{formMethod:n,formAction:i,formEncType:o,formData:void 0,json:d,text:void 0}}}function rd(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Bw(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Aa(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function Uw(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function _i(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Hw(e,n){try{let i=e.sessionStorage.getItem(Gg);if(i){let o=JSON.parse(i);for(let[s,u]of Object.entries(o||{}))u&&Array.isArray(u)&&n.set(s,new Set(u||[]))}}catch{}}function Vw(e,n){if(n.size>0){let i={};for(let[o,s]of n)i[o]=[...s];try{e.sessionStorage.setItem(Gg,JSON.stringify(i))}catch(o){Ko(!1,"Failed to save applied view transitions in sessionStorage ("+o+").")}}}/** + */function St(){return St=Object.assign?Object.assign.bind():function(e){for(var n=1;n"u")throw new Error(n)}function Ko(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function K1(){return Math.random().toString(36).substr(2,8)}function ym(e,n){return{usr:e.state,key:e.key,idx:n}}function Ja(e,n,i,o){return i===void 0&&(i=null),St({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?Ni(n):n,{state:i,key:n&&n.key||o||K1()})}function so(e){let{pathname:n="/",search:i="",hash:o=""}=e;return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ni(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substr(i),e=e.substr(0,i));let o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}function Y1(e,n,i,o){o===void 0&&(o={});let{window:s=document.defaultView,v5Compat:u=!1}=o,d=s.history,f=It.Pop,p=null,y=w();y==null&&(y=0,d.replaceState(St({},d.state,{idx:y}),""));function w(){return(d.state||{idx:null}).idx}function C(){f=It.Pop;let E=w(),P=E==null?null:E-y;y=E,p&&p({action:f,location:b.location,delta:P})}function m(E,P){f=It.Push;let L=Ja(b.location,E,P);y=w()+1;let $=ym(L,y),H=b.createHref(L);try{d.pushState($,"",H)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;s.location.assign(H)}u&&p&&p({action:f,location:b.location,delta:1})}function x(E,P){f=It.Replace;let L=Ja(b.location,E,P);y=w();let $=ym(L,y),H=b.createHref(L);d.replaceState($,"",H),u&&p&&p({action:f,location:b.location,delta:0})}function N(E){let P=s.location.origin!=="null"?s.location.origin:s.location.href,L=typeof E=="string"?E:so(E);return L=L.replace(/ $/,"%20"),Qe(P,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,P)}let b={get action(){return f},get location(){return e(s,d)},listen(E){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(vm,C),p=E,()=>{s.removeEventListener(vm,C),p=null}},createHref(E){return n(s,E)},createURL:N,encodeLocation(E){let P=N(E);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:m,replace:x,go(E){return d.go(E)}};return b}var rt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rt||(rt={}));const X1=new Set(["lazy","caseSensitive","path","id","index","children"]);function J1(e){return e.index===!0}function Ql(e,n,i,o){return i===void 0&&(i=[]),o===void 0&&(o={}),e.map((s,u)=>{let d=[...i,String(u)],f=typeof s.id=="string"?s.id:d.join("-");if(Qe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Qe(!o[f],'Found a route id collision on id "'+f+`". Route id's must be globally unique within Data Router usages`),J1(s)){let p=St({},s,n(s),{id:f});return o[f]=p,p}else{let p=St({},s,n(s),{id:f,children:void 0});return o[f]=p,s.children&&(p.children=Ql(s.children,n,d,o)),p}})}function to(e,n,i){return i===void 0&&(i="/"),Ul(e,n,i,!1)}function Ul(e,n,i,o){let s=typeof n=="string"?Ni(n):n,u=na(s.pathname||"/",i);if(u==null)return null;let d=Hg(e);tw(d);let f=null;for(let p=0;f==null&&p{let p={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Qe(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let y=Qr([o,p.relativePath]),w=i.concat(p);u.children&&u.children.length>0&&(Qe(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),Hg(u.children,n,w,y)),!(u.path==null&&!u.index)&&n.push({path:y,score:lw(y,u.index),routesMeta:w})};return e.forEach((u,d)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))s(u,d);else for(let p of Vg(u.path))s(u,d,p)}),n}function Vg(e){let n=e.split("/");if(n.length===0)return[];let[i,...o]=n,s=i.endsWith("?"),u=i.replace(/\?$/,"");if(o.length===0)return s?[u,""]:[u];let d=Vg(o.join("/")),f=[];return f.push(...d.map(p=>p===""?u:[u,p].join("/"))),s&&f.push(...d),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function tw(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:uw(n.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}const nw=/^:[\w-]+$/,rw=3,iw=2,ow=1,aw=10,sw=-2,wm=e=>e==="*";function lw(e,n){let i=e.split("/"),o=i.length;return i.some(wm)&&(o+=sw),n&&(o+=iw),i.filter(s=>!wm(s)).reduce((s,u)=>s+(nw.test(u)?rw:u===""?ow:aw),o)}function uw(e,n){return e.length===n.length&&e.slice(0,-1).every((o,s)=>o===n[s])?e[e.length-1]-n[n.length-1]:0}function cw(e,n,i){i===void 0&&(i=!1);let{routesMeta:o}=e,s={},u="/",d=[];for(let f=0;f{let{paramName:m,isOptional:x}=w;if(m==="*"){let b=f[C]||"";d=u.slice(0,u.length-b.length).replace(/(.)\/+$/,"$1")}const N=f[C];return x&&!N?y[m]=void 0:y[m]=(N||"").replace(/%2F/g,"/"),y},{}),pathname:u,pathnameBase:d,pattern:e}}function dw(e,n,i){n===void 0&&(n=!1),i===void 0&&(i=!0),Ko(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,p)=>(o.push({paramName:f,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),o]}function fw(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Ko(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function na(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,o=e.charAt(i);return o&&o!=="/"?null:e.slice(i)||"/"}function hw(e,n){n===void 0&&(n="/");let{pathname:i,search:o="",hash:s=""}=typeof e=="string"?Ni(e):e;return{pathname:i?i.startsWith("/")?i:pw(i,n):n,search:gw(o),hash:vw(s)}}function pw(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function td(e,n,i,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function qg(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function tf(e,n){let i=qg(e);return n?i.map((o,s)=>s===i.length-1?o.pathname:o.pathnameBase):i.map(o=>o.pathnameBase)}function nf(e,n,i,o){o===void 0&&(o=!1);let s;typeof e=="string"?s=Ni(e):(s=St({},e),Qe(!s.pathname||!s.pathname.includes("?"),td("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),td("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),td("#","search","hash",s)));let u=e===""||s.pathname==="",d=u?"/":s.pathname,f;if(d==null)f=i;else{let C=n.length-1;if(!o&&d.startsWith("..")){let m=d.split("/");for(;m[0]==="..";)m.shift(),C-=1;s.pathname=m.join("/")}f=C>=0?n[C]:"/"}let p=hw(s,f),y=d&&d!=="/"&&d.endsWith("/"),w=(u||d===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(y||w)&&(p.pathname+="/"),p}const Qr=e=>e.join("/").replace(/\/\/+/g,"/"),mw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Kl{constructor(n,i,o,s){s===void 0&&(s=!1),this.status=n,this.statusText=i||"",this.internal=s,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}}function es(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Wg=["post","put","patch","delete"],yw=new Set(Wg),ww=["get",...Wg],xw=new Set(ww),Cw=new Set([301,302,303,307,308]),Sw=new Set([307,308]),nd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bw={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ia={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},rf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_w=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Gg="remix-router-transitions";function Ew(e){const n=e.window?e.window:typeof window<"u"?window:void 0,i=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u",o=!i;Qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let j=e.detectErrorBoundary;s=R=>({hasErrorBoundary:j(R)})}else s=_w;let u={},d=Ql(e.routes,s,void 0,u),f,p=e.basename||"/",y=e.dataStrategy||jw,w=e.patchRoutesOnNavigation,C=St({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,x=new Set,N=null,b=null,E=null,P=e.hydrationData!=null,L=to(d,e.history.location,p),$=!1,H=null;if(L==null&&!w){let j=bn(404,{pathname:e.history.location.pathname}),{matches:R,route:z}=Mm(d);L=R,H={[z.id]:j}}L&&!e.hydrationData&&Yn(L,d,e.history.location.pathname).active&&(L=null);let Z;if(L)if(L.some(j=>j.route.lazy))Z=!1;else if(!L.some(j=>j.route.loader))Z=!0;else if(C.v7_partialHydration){let j=e.hydrationData?e.hydrationData.loaderData:null,R=e.hydrationData?e.hydrationData.errors:null;if(R){let z=L.findIndex(X=>R[X.route.id]!==void 0);Z=L.slice(0,z+1).every(X=>!kd(X.route,j,R))}else Z=L.every(z=>!kd(z.route,j,R))}else Z=e.hydrationData!=null;else if(Z=!1,L=[],C.v7_partialHydration){let j=Yn(null,d,e.history.location.pathname);j.active&&j.matches&&($=!0,L=j.matches)}let de,O={historyAction:e.history.action,location:e.history.location,matches:L,initialized:Z,navigation:nd,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||H,fetchers:new Map,blockers:new Map},K=It.Pop,ce=!1,fe,I=!1,U=new Map,W=null,ne=!1,he=!1,Ce=[],_e=new Set,G=new Map,ue=0,T=-1,V=new Map,oe=new Set,Se=new Map,se=new Map,re=new Set,ee=new Map,Q=new Map,Y;function et(){if(m=e.history.listen(j=>{let{action:R,location:z,delta:X}=j;if(Y){Y(),Y=void 0;return}Ko(Q.size===0||X!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let le=jr({currentLocation:O.location,nextLocation:z,historyAction:R});if(le&&X!=null){let Ee=new Promise(Me=>{Y=Me});e.history.go(X*-1),$n(le,{state:"blocked",location:z,proceed(){$n(le,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),Ee.then(()=>e.history.go(X))},reset(){let Me=new Map(O.blockers);Me.set(le,Ia),ot({blockers:Me})}});return}return ft(R,z)}),i){Hw(n,U);let j=()=>Vw(n,U);n.addEventListener("pagehide",j),W=()=>n.removeEventListener("pagehide",j)}return O.initialized||ft(It.Pop,O.location,{initialHydration:!0}),de}function tn(){m&&m(),W&&W(),x.clear(),fe&&fe.abort(),O.fetchers.forEach((j,R)=>pt(R)),O.blockers.forEach((j,R)=>Tr(R))}function Wt(j){return x.add(j),()=>x.delete(j)}function ot(j,R){R===void 0&&(R={}),O=St({},O,j);let z=[],X=[];C.v7_fetcherPersist&&O.fetchers.forEach((le,Ee)=>{le.state==="idle"&&(re.has(Ee)?X.push(Ee):z.push(Ee))}),re.forEach(le=>{!O.fetchers.has(le)&&!G.has(le)&&X.push(le)}),[...x].forEach(le=>le(O,{deletedFetchers:X,viewTransitionOpts:R.viewTransitionOpts,flushSync:R.flushSync===!0})),C.v7_fetcherPersist?(z.forEach(le=>O.fetchers.delete(le)),X.forEach(le=>pt(le))):X.forEach(le=>re.delete(le))}function bt(j,R,z){var X,le;let{flushSync:Ee}=z===void 0?{}:z,Me=O.actionData!=null&&O.navigation.formMethod!=null&&cr(O.navigation.formMethod)&&O.navigation.state==="loading"&&((X=j.state)==null?void 0:X._isRedirect)!==!0,ye;R.actionData?Object.keys(R.actionData).length>0?ye=R.actionData:ye=null:Me?ye=O.actionData:ye=null;let we=R.loaderData?jm(O.loaderData,R.loaderData,R.matches||[],R.errors):O.loaderData,ge=O.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((ze,Pt)=>ge.set(Pt,Ia)));let ve=ce===!0||O.navigation.formMethod!=null&&cr(O.navigation.formMethod)&&((le=j.state)==null?void 0:le._isRedirect)!==!0;f&&(d=f,f=void 0),ne||K===It.Pop||(K===It.Push?e.history.push(j,j.state):K===It.Replace&&e.history.replace(j,j.state));let Fe;if(K===It.Pop){let ze=U.get(O.location.pathname);ze&&ze.has(j.pathname)?Fe={currentLocation:O.location,nextLocation:j}:U.has(j.pathname)&&(Fe={currentLocation:j,nextLocation:O.location})}else if(I){let ze=U.get(O.location.pathname);ze?ze.add(j.pathname):(ze=new Set([j.pathname]),U.set(O.location.pathname,ze)),Fe={currentLocation:O.location,nextLocation:j}}ot(St({},R,{actionData:ye,loaderData:we,historyAction:K,location:j,initialized:!0,navigation:nd,revalidation:"idle",restoreScrollPosition:Di(j,R.matches||O.matches),preventScrollReset:ve,blockers:ge}),{viewTransitionOpts:Fe,flushSync:Ee===!0}),K=It.Pop,ce=!1,I=!1,ne=!1,he=!1,Ce=[]}async function st(j,R){if(typeof j=="number"){e.history.go(j);return}let z=Ed(O.location,O.matches,p,C.v7_prependBasename,j,C.v7_relativeSplatPath,R?.fromRouteId,R?.relative),{path:X,submission:le,error:Ee}=Cm(C.v7_normalizeFormMethod,!1,z,R),Me=O.location,ye=Ja(O.location,X,R&&R.state);ye=St({},ye,e.history.encodeLocation(ye));let we=R&&R.replace!=null?R.replace:void 0,ge=It.Push;we===!0?ge=It.Replace:we===!1||le!=null&&cr(le.formMethod)&&le.formAction===O.location.pathname+O.location.search&&(ge=It.Replace);let ve=R&&"preventScrollReset"in R?R.preventScrollReset===!0:void 0,Fe=(R&&R.flushSync)===!0,ze=jr({currentLocation:Me,nextLocation:ye,historyAction:ge});if(ze){$n(ze,{state:"blocked",location:ye,proceed(){$n(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),st(j,R)},reset(){let Pt=new Map(O.blockers);Pt.set(ze,Ia),ot({blockers:Pt})}});return}return await ft(ge,ye,{submission:le,pendingError:Ee,preventScrollReset:ve,replace:R&&R.replace,enableViewTransition:R&&R.viewTransition,flushSync:Fe})}function wt(){if(Kn(),ot({revalidation:"loading"}),O.navigation.state!=="submitting"){if(O.navigation.state==="idle"){ft(O.historyAction,O.location,{startUninterruptedRevalidation:!0});return}ft(K||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:I===!0})}}async function ft(j,R,z){fe&&fe.abort(),fe=null,K=j,ne=(z&&z.startUninterruptedRevalidation)===!0,ei(O.location,O.matches),ce=(z&&z.preventScrollReset)===!0,I=(z&&z.enableViewTransition)===!0;let X=f||d,le=z&&z.overrideNavigation,Ee=z!=null&&z.initialHydration&&O.matches&&O.matches.length>0&&!$?O.matches:to(X,R,p),Me=(z&&z.flushSync)===!0;if(Ee&&O.initialized&&!he&&Rw(O.location,R)&&!(z&&z.submission&&cr(z.submission.formMethod))){bt(R,{matches:Ee},{flushSync:Me});return}let ye=Yn(Ee,X,R.pathname);if(ye.active&&ye.matches&&(Ee=ye.matches),!Ee){let{error:Ye,notFoundMatches:Ge,route:Xe}=fn(R.pathname);bt(R,{matches:Ge,loaderData:{},errors:{[Xe.id]:Ye}},{flushSync:Me});return}fe=new AbortController;let we=$o(e.history,R,fe.signal,z&&z.submission),ge;if(z&&z.pendingError)ge=[no(Ee).route.id,{type:rt.error,error:z.pendingError}];else if(z&&z.submission&&cr(z.submission.formMethod)){let Ye=await ht(we,R,z.submission,Ee,ye.active,{replace:z.replace,flushSync:Me});if(Ye.shortCircuited)return;if(Ye.pendingActionResult){let[Ge,Xe]=Ye.pendingActionResult;if(In(Xe)&&es(Xe.error)&&Xe.error.status===404){fe=null,bt(R,{matches:Ye.matches,loaderData:{},errors:{[Ge]:Xe.error}});return}}Ee=Ye.matches||Ee,ge=Ye.pendingActionResult,le=rd(R,z.submission),Me=!1,ye.active=!1,we=$o(e.history,we.url,we.signal)}let{shortCircuited:ve,matches:Fe,loaderData:ze,errors:Pt}=await xt(we,R,Ee,ye.active,le,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,Me,ge);ve||(fe=null,bt(R,St({matches:Fe||Ee},Pm(ge),{loaderData:ze,errors:Pt})))}async function ht(j,R,z,X,le,Ee){Ee===void 0&&(Ee={}),Kn();let Me=Bw(R,z);if(ot({navigation:Me},{flushSync:Ee.flushSync===!0}),le){let ge=await hn(X,R.pathname,j.signal);if(ge.type==="aborted")return{shortCircuited:!0};if(ge.type==="error"){let ve=no(ge.partialMatches).route.id;return{matches:ge.partialMatches,pendingActionResult:[ve,{type:rt.error,error:ge.error}]}}else if(ge.matches)X=ge.matches;else{let{notFoundMatches:ve,error:Fe,route:ze}=fn(R.pathname);return{matches:ve,pendingActionResult:[ze.id,{type:rt.error,error:Fe}]}}}let ye,we=Za(X,R);if(!we.route.action&&!we.route.lazy)ye={type:rt.error,error:bn(405,{method:j.method,pathname:R.pathname,routeId:we.route.id})};else if(ye=(await cn("action",O,j,[we],X,null))[we.route.id],j.signal.aborted)return{shortCircuited:!0};if(oo(ye)){let ge;return Ee&&Ee.replace!=null?ge=Ee.replace:ge=km(ye.response.headers.get("Location"),new URL(j.url),p)===O.location.pathname+O.location.search,await un(j,ye,!0,{submission:z,replace:ge}),{shortCircuited:!0}}if(Ei(ye))throw bn(400,{type:"defer-action"});if(In(ye)){let ge=no(X,we.route.id);return(Ee&&Ee.replace)!==!0&&(K=It.Push),{matches:X,pendingActionResult:[ge.route.id,ye]}}return{matches:X,pendingActionResult:[we.route.id,ye]}}async function xt(j,R,z,X,le,Ee,Me,ye,we,ge,ve){let Fe=le||rd(R,Ee),ze=Ee||Me||Dm(Fe),Pt=!ne&&(!C.v7_partialHydration||!we);if(X){if(Pt){let nt=nn(ve);ot(St({navigation:Fe},nt!==void 0?{actionData:nt}:{}),{flushSync:ge})}let He=await hn(z,R.pathname,j.signal);if(He.type==="aborted")return{shortCircuited:!0};if(He.type==="error"){let nt=no(He.partialMatches).route.id;return{matches:He.partialMatches,loaderData:{},errors:{[nt]:He.error}}}else if(He.matches)z=He.matches;else{let{error:nt,notFoundMatches:_t,route:Lr}=fn(R.pathname);return{matches:_t,loaderData:{},errors:{[Lr.id]:nt}}}}let Ye=f||d,[Ge,Xe]=bm(e.history,O,z,ze,R,C.v7_partialHydration&&we===!0,C.v7_skipActionErrorRevalidation,he,Ce,_e,re,Se,oe,Ye,p,ve);if(rn(He=>!(z&&z.some(nt=>nt.route.id===He))||Ge&&Ge.some(nt=>nt.route.id===He)),T=++ue,Ge.length===0&&Xe.length===0){let He=Pi();return bt(R,St({matches:z,loaderData:{},errors:ve&&In(ve[1])?{[ve[0]]:ve[1].error}:null},Pm(ve),He?{fetchers:new Map(O.fetchers)}:{}),{flushSync:ge}),{shortCircuited:!0}}if(Pt){let He={};if(!X){He.navigation=Fe;let nt=nn(ve);nt!==void 0&&(He.actionData=nt)}Xe.length>0&&(He.fetchers=Tn(Xe)),ot(He,{flushSync:ge})}Xe.forEach(He=>{dn(He.key),He.controller&&G.set(He.key,He.controller)});let Pn=()=>Xe.forEach(He=>dn(He.key));fe&&fe.signal.addEventListener("abort",Pn);let{loaderResults:pn,fetcherResults:Mn}=await Er(O,z,Ge,Xe,j);if(j.signal.aborted)return{shortCircuited:!0};fe&&fe.signal.removeEventListener("abort",Pn),Xe.forEach(He=>G.delete(He.key));let Ve=bl(pn);if(Ve)return await un(j,Ve.result,!0,{replace:ye}),{shortCircuited:!0};if(Ve=bl(Mn),Ve)return oe.add(Ve.key),await un(j,Ve.result,!0,{replace:ye}),{shortCircuited:!0};let{loaderData:Oi,errors:At}=Tm(O,z,pn,ve,Xe,Mn,ee);ee.forEach((He,nt)=>{He.subscribe(_t=>{(_t||He.done)&&ee.delete(nt)})}),C.v7_partialHydration&&we&&O.errors&&(At=St({},O.errors,At));let zn=Pi(),mn=kr(T),ti=zn||mn||Xe.length>0;return St({matches:z,loaderData:Oi,errors:At},ti?{fetchers:new Map(O.fetchers)}:{})}function nn(j){if(j&&!In(j[1]))return{[j[0]]:j[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function Tn(j){return j.forEach(R=>{let z=O.fetchers.get(R.key),X=Aa(void 0,z?z.data:void 0);O.fetchers.set(R.key,X)}),new Map(O.fetchers)}function ln(j,R,z,X){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");dn(j);let le=(X&&X.flushSync)===!0,Ee=f||d,Me=Ed(O.location,O.matches,p,C.v7_prependBasename,z,C.v7_relativeSplatPath,R,X?.relative),ye=to(Ee,Me,p),we=Yn(ye,Ee,Me);if(we.active&&we.matches&&(ye=we.matches),!ye){Dt(j,R,bn(404,{pathname:Me}),{flushSync:le});return}let{path:ge,submission:ve,error:Fe}=Cm(C.v7_normalizeFormMethod,!0,Me,X);if(Fe){Dt(j,R,Fe,{flushSync:le});return}let ze=Za(ye,ge),Pt=(X&&X.preventScrollReset)===!0;if(ve&&cr(ve.formMethod)){jn(j,R,ge,ze,ye,we.active,le,Pt,ve);return}Se.set(j,{routeId:R,path:ge}),Jr(j,R,ge,ze,ye,we.active,le,Pt,ve)}async function jn(j,R,z,X,le,Ee,Me,ye,we){Kn(),Se.delete(j);function ge(Ze){if(!Ze.route.action&&!Ze.route.lazy){let pr=bn(405,{method:we.formMethod,pathname:z,routeId:R});return Dt(j,R,pr,{flushSync:Me}),!0}return!1}if(!Ee&&ge(X))return;let ve=O.fetchers.get(j);lt(j,Uw(we,ve),{flushSync:Me});let Fe=new AbortController,ze=$o(e.history,z,Fe.signal,we);if(Ee){let Ze=await hn(le,new URL(ze.url).pathname,ze.signal,j);if(Ze.type==="aborted")return;if(Ze.type==="error"){Dt(j,R,Ze.error,{flushSync:Me});return}else if(Ze.matches){if(le=Ze.matches,X=Za(le,z),ge(X))return}else{Dt(j,R,bn(404,{pathname:z}),{flushSync:Me});return}}G.set(j,Fe);let Pt=ue,Ge=(await cn("action",O,ze,[X],le,j))[X.route.id];if(ze.signal.aborted){G.get(j)===Fe&&G.delete(j);return}if(C.v7_fetcherPersist&&re.has(j)){if(oo(Ge)||In(Ge)){lt(j,_i(void 0));return}}else{if(oo(Ge))if(G.delete(j),T>Pt){lt(j,_i(void 0));return}else return oe.add(j),lt(j,Aa(we)),un(ze,Ge,!1,{fetcherSubmission:we,preventScrollReset:ye});if(In(Ge)){Dt(j,R,Ge.error);return}}if(Ei(Ge))throw bn(400,{type:"defer-action"});let Xe=O.navigation.location||O.location,Pn=$o(e.history,Xe,Fe.signal),pn=f||d,Mn=O.navigation.state!=="idle"?to(pn,O.navigation.location,p):O.matches;Qe(Mn,"Didn't find any matches after fetcher action");let Ve=++ue;V.set(j,Ve);let Oi=Aa(we,Ge.data);O.fetchers.set(j,Oi);let[At,zn]=bm(e.history,O,Mn,we,Xe,!1,C.v7_skipActionErrorRevalidation,he,Ce,_e,re,Se,oe,pn,p,[X.route.id,Ge]);zn.filter(Ze=>Ze.key!==j).forEach(Ze=>{let pr=Ze.key,Dr=O.fetchers.get(pr),Or=Aa(void 0,Dr?Dr.data:void 0);O.fetchers.set(pr,Or),dn(pr),Ze.controller&&G.set(pr,Ze.controller)}),ot({fetchers:new Map(O.fetchers)});let mn=()=>zn.forEach(Ze=>dn(Ze.key));Fe.signal.addEventListener("abort",mn);let{loaderResults:ti,fetcherResults:He}=await Er(O,Mn,At,zn,Pn);if(Fe.signal.aborted)return;Fe.signal.removeEventListener("abort",mn),V.delete(j),G.delete(j),zn.forEach(Ze=>G.delete(Ze.key));let nt=bl(ti);if(nt)return un(Pn,nt.result,!1,{preventScrollReset:ye});if(nt=bl(He),nt)return oe.add(nt.key),un(Pn,nt.result,!1,{preventScrollReset:ye});let{loaderData:_t,errors:Lr}=Tm(O,Mn,ti,void 0,zn,He,ee);if(O.fetchers.has(j)){let Ze=_i(Ge.data);O.fetchers.set(j,Ze)}kr(Ve),O.navigation.state==="loading"&&Ve>T?(Qe(K,"Expected pending action"),fe&&fe.abort(),bt(O.navigation.location,{matches:Mn,loaderData:_t,errors:Lr,fetchers:new Map(O.fetchers)})):(ot({errors:Lr,loaderData:jm(O.loaderData,_t,Mn,Lr),fetchers:new Map(O.fetchers)}),he=!1)}async function Jr(j,R,z,X,le,Ee,Me,ye,we){let ge=O.fetchers.get(j);lt(j,Aa(we,ge?ge.data:void 0),{flushSync:Me});let ve=new AbortController,Fe=$o(e.history,z,ve.signal);if(Ee){let Ge=await hn(le,new URL(Fe.url).pathname,Fe.signal,j);if(Ge.type==="aborted")return;if(Ge.type==="error"){Dt(j,R,Ge.error,{flushSync:Me});return}else if(Ge.matches)le=Ge.matches,X=Za(le,z);else{Dt(j,R,bn(404,{pathname:z}),{flushSync:Me});return}}G.set(j,ve);let ze=ue,Ye=(await cn("loader",O,Fe,[X],le,j))[X.route.id];if(Ei(Ye)&&(Ye=await of(Ye,Fe.signal,!0)||Ye),G.get(j)===ve&&G.delete(j),!Fe.signal.aborted){if(re.has(j)){lt(j,_i(void 0));return}if(oo(Ye))if(T>ze){lt(j,_i(void 0));return}else{oe.add(j),await un(Fe,Ye,!1,{preventScrollReset:ye});return}if(In(Ye)){Dt(j,R,Ye.error);return}Qe(!Ei(Ye),"Unhandled fetcher deferred data"),lt(j,_i(Ye.data))}}async function un(j,R,z,X){let{submission:le,fetcherSubmission:Ee,preventScrollReset:Me,replace:ye}=X===void 0?{}:X;R.response.headers.has("X-Remix-Revalidate")&&(he=!0);let we=R.response.headers.get("Location");Qe(we,"Expected a Location header on the redirect Response"),we=km(we,new URL(j.url),p);let ge=Ja(O.location,we,{_isRedirect:!0});if(i){let Ge=!1;if(R.response.headers.has("X-Remix-Reload-Document"))Ge=!0;else if(rf.test(we)){const Xe=e.history.createURL(we);Ge=Xe.origin!==n.location.origin||na(Xe.pathname,p)==null}if(Ge){ye?n.location.replace(we):n.location.assign(we);return}}fe=null;let ve=ye===!0||R.response.headers.has("X-Remix-Replace")?It.Replace:It.Push,{formMethod:Fe,formAction:ze,formEncType:Pt}=O.navigation;!le&&!Ee&&Fe&&ze&&Pt&&(le=Dm(O.navigation));let Ye=le||Ee;if(Sw.has(R.response.status)&&Ye&&cr(Ye.formMethod))await ft(ve,ge,{submission:St({},Ye,{formAction:we}),preventScrollReset:Me||ce,enableViewTransition:z?I:void 0});else{let Ge=rd(ge,le);await ft(ve,ge,{overrideNavigation:Ge,fetcherSubmission:Ee,preventScrollReset:Me||ce,enableViewTransition:z?I:void 0})}}async function cn(j,R,z,X,le,Ee){let Me,ye={};try{Me=await Pw(y,j,R,z,X,le,Ee,u,s)}catch(we){return X.forEach(ge=>{ye[ge.route.id]={type:rt.error,error:we}}),ye}for(let[we,ge]of Object.entries(Me))if(Iw(ge)){let ve=ge.result;ye[we]={type:rt.redirect,response:Dw(ve,z,we,le,p,C.v7_relativeSplatPath)}}else ye[we]=await Lw(ge);return ye}async function Er(j,R,z,X,le){let Ee=j.matches,Me=cn("loader",j,le,z,R,null),ye=Promise.all(X.map(async ve=>{if(ve.matches&&ve.match&&ve.controller){let ze=(await cn("loader",j,$o(e.history,ve.path,ve.controller.signal),[ve.match],ve.matches,ve.key))[ve.match.route.id];return{[ve.key]:ze}}else return Promise.resolve({[ve.key]:{type:rt.error,error:bn(404,{pathname:ve.path})}})})),we=await Me,ge=(await ye).reduce((ve,Fe)=>Object.assign(ve,Fe),{});return await Promise.all([$w(R,we,le.signal,Ee,j.loaderData),zw(R,ge,X)]),{loaderResults:we,fetcherResults:ge}}function Kn(){he=!0,Ce.push(...rn()),Se.forEach((j,R)=>{G.has(R)&&_e.add(R),dn(R)})}function lt(j,R,z){z===void 0&&(z={}),O.fetchers.set(j,R),ot({fetchers:new Map(O.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function Dt(j,R,z,X){X===void 0&&(X={});let le=no(O.matches,R);pt(j),ot({errors:{[le.route.id]:z},fetchers:new Map(O.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function Qt(j){return se.set(j,(se.get(j)||0)+1),re.has(j)&&re.delete(j),O.fetchers.get(j)||bw}function pt(j){let R=O.fetchers.get(j);G.has(j)&&!(R&&R.state==="loading"&&V.has(j))&&dn(j),Se.delete(j),V.delete(j),oe.delete(j),C.v7_fetcherPersist&&re.delete(j),_e.delete(j),O.fetchers.delete(j)}function Kt(j){let R=(se.get(j)||0)-1;R<=0?(se.delete(j),re.add(j),C.v7_fetcherPersist||pt(j)):se.set(j,R),ot({fetchers:new Map(O.fetchers)})}function dn(j){let R=G.get(j);R&&(R.abort(),G.delete(j))}function ji(j){for(let R of j){let z=Qt(R),X=_i(z.data);O.fetchers.set(R,X)}}function Pi(){let j=[],R=!1;for(let z of oe){let X=O.fetchers.get(z);Qe(X,"Expected fetcher: "+z),X.state==="loading"&&(oe.delete(z),j.push(z),R=!0)}return ji(j),R}function kr(j){let R=[];for(let[z,X]of V)if(X0}function Nr(j,R){let z=O.blockers.get(j)||Ia;return Q.get(j)!==R&&Q.set(j,R),z}function Tr(j){O.blockers.delete(j),Q.delete(j)}function $n(j,R){let z=O.blockers.get(j)||Ia;Qe(z.state==="unblocked"&&R.state==="blocked"||z.state==="blocked"&&R.state==="blocked"||z.state==="blocked"&&R.state==="proceeding"||z.state==="blocked"&&R.state==="unblocked"||z.state==="proceeding"&&R.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+R.state);let X=new Map(O.blockers);X.set(j,R),ot({blockers:X})}function jr(j){let{currentLocation:R,nextLocation:z,historyAction:X}=j;if(Q.size===0)return;Q.size>1&&Ko(!1,"A router only supports one blocker at a time");let le=Array.from(Q.entries()),[Ee,Me]=le[le.length-1],ye=O.blockers.get(Ee);if(!(ye&&ye.state==="proceeding")&&Me({currentLocation:R,nextLocation:z,historyAction:X}))return Ee}function fn(j){let R=bn(404,{pathname:j}),z=f||d,{matches:X,route:le}=Mm(z);return rn(),{notFoundMatches:X,route:le,error:R}}function rn(j){let R=[];return ee.forEach((z,X)=>{(!j||j(X))&&(z.cancel(),R.push(X),ee.delete(X))}),R}function Mi(j,R,z){if(N=j,E=R,b=z||null,!P&&O.navigation===nd){P=!0;let X=Di(O.location,O.matches);X!=null&&ot({restoreScrollPosition:X})}return()=>{N=null,E=null,b=null}}function Li(j,R){return b&&b(j,R.map(X=>ew(X,O.loaderData)))||j.key}function ei(j,R){if(N&&E){let z=Li(j,R);N[z]=E()}}function Di(j,R){if(N){let z=Li(j,R),X=N[z];if(typeof X=="number")return X}return null}function Yn(j,R,z){if(w)if(j){if(Object.keys(j[0].params).length>0)return{active:!0,matches:Ul(R,z,p,!0)}}else return{active:!0,matches:Ul(R,z,p,!0)||[]};return{active:!1,matches:null}}async function hn(j,R,z,X){if(!w)return{type:"success",matches:j};let le=j;for(;;){let Ee=f==null,Me=f||d,ye=u;try{await w({signal:z,path:R,matches:le,fetcherKey:X,patch:(ve,Fe)=>{z.aborted||Em(ve,Fe,Me,ye,s)}})}catch(ve){return{type:"error",error:ve,partialMatches:le}}finally{Ee&&!z.aborted&&(d=[...d])}if(z.aborted)return{type:"aborted"};let we=to(Me,R,p);if(we)return{type:"success",matches:we};let ge=Ul(Me,R,p,!0);if(!ge||le.length===ge.length&&le.every((ve,Fe)=>ve.route.id===ge[Fe].route.id))return{type:"success",matches:null};le=ge}}function Pr(j){u={},f=Ql(j,s,void 0,u)}function Mr(j,R){let z=f==null;Em(j,R,f||d,u,s),z&&(d=[...d],ot({}))}return de={get basename(){return p},get future(){return C},get state(){return O},get routes(){return d},get window(){return n},initialize:et,subscribe:Wt,enableScrollRestoration:Mi,navigate:st,fetch:ln,revalidate:wt,createHref:j=>e.history.createHref(j),encodeLocation:j=>e.history.encodeLocation(j),getFetcher:Qt,deleteFetcher:Kt,dispose:tn,getBlocker:Nr,deleteBlocker:Tr,patchRoutes:Mr,_internalFetchControllers:G,_internalActiveDeferreds:ee,_internalSetRoutes:Pr},de}function kw(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ed(e,n,i,o,s,u,d,f){let p,y;if(d){p=[];for(let C of n)if(p.push(C),C.route.id===d){y=C;break}}else p=n,y=n[n.length-1];let w=nf(s||".",tf(p,u),na(e.pathname,i)||e.pathname,f==="path");if(s==null&&(w.search=e.search,w.hash=e.hash),(s==null||s===""||s===".")&&y){let C=af(w.search);if(y.route.index&&!C)w.search=w.search?w.search.replace(/^\?/,"?index&"):"?index";else if(!y.route.index&&C){let m=new URLSearchParams(w.search),x=m.getAll("index");m.delete("index"),x.filter(b=>b).forEach(b=>m.append("index",b));let N=m.toString();w.search=N?"?"+N:""}}return o&&i!=="/"&&(w.pathname=w.pathname==="/"?i:Qr([i,w.pathname])),so(w)}function Cm(e,n,i,o){if(!o||!kw(o))return{path:i};if(o.formMethod&&!Fw(o.formMethod))return{path:i,error:bn(405,{method:o.formMethod})};let s=()=>({path:i,error:bn(400,{type:"invalid-body"})}),u=o.formMethod||"get",d=e?u.toUpperCase():u.toLowerCase(),f=Kg(i);if(o.body!==void 0){if(o.formEncType==="text/plain"){if(!cr(d))return s();let m=typeof o.body=="string"?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce((x,N)=>{let[b,E]=N;return""+x+b+"="+E+` +`},""):String(o.body);return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:void 0,text:m}}}else if(o.formEncType==="application/json"){if(!cr(d))return s();try{let m=typeof o.body=="string"?JSON.parse(o.body):o.body;return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let p,y;if(o.formData)p=Nd(o.formData),y=o.formData;else if(o.body instanceof FormData)p=Nd(o.body),y=o.body;else if(o.body instanceof URLSearchParams)p=o.body,y=Nm(p);else if(o.body==null)p=new URLSearchParams,y=new FormData;else try{p=new URLSearchParams(o.body),y=Nm(p)}catch{return s()}let w={formMethod:d,formAction:f,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(cr(w.formMethod))return{path:i,submission:w};let C=Ni(i);return n&&C.search&&af(C.search)&&p.append("index",""),C.search="?"+p,{path:so(C),submission:w}}function Sm(e,n,i){i===void 0&&(i=!1);let o=e.findIndex(s=>s.route.id===n);return o>=0?e.slice(0,i?o+1:o):e}function bm(e,n,i,o,s,u,d,f,p,y,w,C,m,x,N,b){let E=b?In(b[1])?b[1].error:b[1].data:void 0,P=e.createURL(n.location),L=e.createURL(s),$=i;u&&n.errors?$=Sm(i,Object.keys(n.errors)[0],!0):b&&In(b[1])&&($=Sm(i,b[0]));let H=b?b[1].statusCode:void 0,Z=d&&H&&H>=400,de=$.filter((K,ce)=>{let{route:fe}=K;if(fe.lazy)return!0;if(fe.loader==null)return!1;if(u)return kd(fe,n.loaderData,n.errors);if(Nw(n.loaderData,n.matches[ce],K)||p.some(W=>W===K.route.id))return!0;let I=n.matches[ce],U=K;return _m(K,St({currentUrl:P,currentParams:I.params,nextUrl:L,nextParams:U.params},o,{actionResult:E,actionStatus:H,defaultShouldRevalidate:Z?!1:f||P.pathname+P.search===L.pathname+L.search||P.search!==L.search||Zg(I,U)}))}),O=[];return C.forEach((K,ce)=>{if(u||!i.some(ne=>ne.route.id===K.routeId)||w.has(ce))return;let fe=to(x,K.path,N);if(!fe){O.push({key:ce,routeId:K.routeId,path:K.path,matches:null,match:null,controller:null});return}let I=n.fetchers.get(ce),U=Za(fe,K.path),W=!1;m.has(ce)?W=!1:y.has(ce)?(y.delete(ce),W=!0):I&&I.state!=="idle"&&I.data===void 0?W=f:W=_m(U,St({currentUrl:P,currentParams:n.matches[n.matches.length-1].params,nextUrl:L,nextParams:i[i.length-1].params},o,{actionResult:E,actionStatus:H,defaultShouldRevalidate:Z?!1:f})),W&&O.push({key:ce,routeId:K.routeId,path:K.path,matches:fe,match:U,controller:new AbortController})}),[de,O]}function kd(e,n,i){if(e.lazy)return!0;if(!e.loader)return!1;let o=n!=null&&n[e.id]!==void 0,s=i!=null&&i[e.id]!==void 0;return!o&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!o&&!s}function Nw(e,n,i){let o=!n||i.route.id!==n.route.id,s=e[i.route.id]===void 0;return o||s}function Zg(e,n){let i=e.route.path;return e.pathname!==n.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==n.params["*"]}function _m(e,n){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(n);if(typeof i=="boolean")return i}return n.defaultShouldRevalidate}function Em(e,n,i,o,s){var u;let d;if(e){let y=o[e];Qe(y,"No route found to patch children into: routeId = "+e),y.children||(y.children=[]),d=y.children}else d=i;let f=n.filter(y=>!d.some(w=>Qg(y,w))),p=Ql(f,s,[e||"_","patch",String(((u=d)==null?void 0:u.length)||"0")],o);d.push(...p)}function Qg(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((i,o)=>{var s;return(s=n.children)==null?void 0:s.some(u=>Qg(i,u))}):!1}async function Tw(e,n,i){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let s=i[e.id];Qe(s,"No route found in manifest");let u={};for(let d in o){let p=s[d]!==void 0&&d!=="hasErrorBoundary";Ko(!p,'Route "'+s.id+'" has a static property "'+d+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+d+'" will be ignored.')),!p&&!X1.has(d)&&(u[d]=o[d])}Object.assign(s,u),Object.assign(s,St({},n(s),{lazy:void 0}))}async function jw(e){let{matches:n}=e,i=n.filter(s=>s.shouldLoad);return(await Promise.all(i.map(s=>s.resolve()))).reduce((s,u,d)=>Object.assign(s,{[i[d].route.id]:u}),{})}async function Pw(e,n,i,o,s,u,d,f,p,y){let w=u.map(x=>x.route.lazy?Tw(x.route,p,f):void 0),C=u.map((x,N)=>{let b=w[N],E=s.some(L=>L.route.id===x.route.id);return St({},x,{shouldLoad:E,resolve:async L=>(L&&o.method==="GET"&&(x.route.lazy||x.route.loader)&&(E=!0),E?Mw(n,o,x,b,L,y):Promise.resolve({type:rt.data,result:void 0}))})}),m=await e({matches:C,request:o,params:u[0].params,fetcherKey:d,context:y});try{await Promise.all(w)}catch{}return m}async function Mw(e,n,i,o,s,u){let d,f,p=y=>{let w,C=new Promise((N,b)=>w=b);f=()=>w(),n.signal.addEventListener("abort",f);let m=N=>typeof y!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+i.route.id+"]"))):y({request:n,params:i.params,context:u},...N!==void 0?[N]:[]),x=(async()=>{try{return{type:"data",result:await(s?s(b=>m(b)):m())}}catch(N){return{type:"error",result:N}}})();return Promise.race([x,C])};try{let y=i.route[e];if(o)if(y){let w,[C]=await Promise.all([p(y).catch(m=>{w=m}),o]);if(w!==void 0)throw w;d=C}else if(await o,y=i.route[e],y)d=await p(y);else if(e==="action"){let w=new URL(n.url),C=w.pathname+w.search;throw bn(405,{method:n.method,pathname:C,routeId:i.route.id})}else return{type:rt.data,result:void 0};else if(y)d=await p(y);else{let w=new URL(n.url),C=w.pathname+w.search;throw bn(404,{pathname:C})}Qe(d.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+i.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){return{type:rt.error,result:y}}finally{f&&n.signal.removeEventListener("abort",f)}return d}async function Lw(e){let{result:n,type:i}=e;if(Yg(n)){let C;try{let m=n.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?n.body==null?C=null:C=await n.json():C=await n.text()}catch(m){return{type:rt.error,error:m}}return i===rt.error?{type:rt.error,error:new Kl(n.status,n.statusText,C),statusCode:n.status,headers:n.headers}:{type:rt.data,data:C,statusCode:n.status,headers:n.headers}}if(i===rt.error){if(Lm(n)){var o,s;if(n.data instanceof Error){var u,d;return{type:rt.error,error:n.data,statusCode:(u=n.init)==null?void 0:u.status,headers:(d=n.init)!=null&&d.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:new Kl(((o=n.init)==null?void 0:o.status)||500,void 0,n.data),statusCode:es(n)?n.status:void 0,headers:(s=n.init)!=null&&s.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:n,statusCode:es(n)?n.status:void 0}}if(Aw(n)){var f,p;return{type:rt.deferred,deferredData:n,statusCode:(f=n.init)==null?void 0:f.status,headers:((p=n.init)==null?void 0:p.headers)&&new Headers(n.init.headers)}}if(Lm(n)){var y,w;return{type:rt.data,data:n.data,statusCode:(y=n.init)==null?void 0:y.status,headers:(w=n.init)!=null&&w.headers?new Headers(n.init.headers):void 0}}return{type:rt.data,data:n}}function Dw(e,n,i,o,s,u){let d=e.headers.get("Location");if(Qe(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!rf.test(d)){let f=o.slice(0,o.findIndex(p=>p.route.id===i)+1);d=Ed(new URL(n.url),f,s,!0,d,u),e.headers.set("Location",d)}return e}function km(e,n,i){if(rf.test(e)){let o=e,s=o.startsWith("//")?new URL(n.protocol+o):new URL(o),u=na(s.pathname,i)!=null;if(s.origin===n.origin&&u)return s.pathname+s.search+s.hash}return e}function $o(e,n,i,o){let s=e.createURL(Kg(n)).toString(),u={signal:i};if(o&&cr(o.formMethod)){let{formMethod:d,formEncType:f}=o;u.method=d.toUpperCase(),f==="application/json"?(u.headers=new Headers({"Content-Type":f}),u.body=JSON.stringify(o.json)):f==="text/plain"?u.body=o.text:f==="application/x-www-form-urlencoded"&&o.formData?u.body=Nd(o.formData):u.body=o.formData}return new Request(s,u)}function Nd(e){let n=new URLSearchParams;for(let[i,o]of e.entries())n.append(i,typeof o=="string"?o:o.name);return n}function Nm(e){let n=new FormData;for(let[i,o]of e.entries())n.append(i,o);return n}function Ow(e,n,i,o,s){let u={},d=null,f,p=!1,y={},w=i&&In(i[1])?i[1].error:void 0;return e.forEach(C=>{if(!(C.route.id in n))return;let m=C.route.id,x=n[m];if(Qe(!oo(x),"Cannot handle redirect results in processLoaderData"),In(x)){let N=x.error;w!==void 0&&(N=w,w=void 0),d=d||{};{let b=no(e,m);d[b.route.id]==null&&(d[b.route.id]=N)}u[m]=void 0,p||(p=!0,f=es(x.error)?x.error.status:500),x.headers&&(y[m]=x.headers)}else Ei(x)?(o.set(m,x.deferredData),u[m]=x.deferredData.data,x.statusCode!=null&&x.statusCode!==200&&!p&&(f=x.statusCode),x.headers&&(y[m]=x.headers)):(u[m]=x.data,x.statusCode&&x.statusCode!==200&&!p&&(f=x.statusCode),x.headers&&(y[m]=x.headers))}),w!==void 0&&i&&(d={[i[0]]:w},u[i[0]]=void 0),{loaderData:u,errors:d,statusCode:f||200,loaderHeaders:y}}function Tm(e,n,i,o,s,u,d){let{loaderData:f,errors:p}=Ow(n,i,o,d);return s.forEach(y=>{let{key:w,match:C,controller:m}=y,x=u[w];if(Qe(x,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(In(x)){let N=no(e.matches,C?.route.id);p&&p[N.route.id]||(p=St({},p,{[N.route.id]:x.error})),e.fetchers.delete(w)}else if(oo(x))Qe(!1,"Unhandled fetcher revalidation redirect");else if(Ei(x))Qe(!1,"Unhandled fetcher deferred data");else{let N=_i(x.data);e.fetchers.set(w,N)}}),{loaderData:f,errors:p}}function jm(e,n,i,o){let s=St({},n);for(let u of i){let d=u.route.id;if(n.hasOwnProperty(d)?n[d]!==void 0&&(s[d]=n[d]):e[d]!==void 0&&u.route.loader&&(s[d]=e[d]),o&&o.hasOwnProperty(d))break}return s}function Pm(e){return e?In(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function no(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Mm(e){let n=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function bn(e,n){let{pathname:i,routeId:o,method:s,type:u,message:d}=n===void 0?{}:n,f="Unknown Server Error",p="Unknown @remix-run/router error";return e===400?(f="Bad Request",s&&i&&o?p="You made a "+s+' request to "'+i+'" but '+('did not provide a `loader` for route "'+o+'", ')+"so there is no way to handle the request.":u==="defer-action"?p="defer() is not supported in actions":u==="invalid-body"&&(p="Unable to encode submission body")):e===403?(f="Forbidden",p='Route "'+o+'" does not match URL "'+i+'"'):e===404?(f="Not Found",p='No route matches URL "'+i+'"'):e===405&&(f="Method Not Allowed",s&&i&&o?p="You made a "+s.toUpperCase()+' request to "'+i+'" but '+('did not provide an `action` for route "'+o+'", ')+"so there is no way to handle the request.":s&&(p='Invalid request method "'+s.toUpperCase()+'"')),new Kl(e||500,f,new Error(p),!0)}function bl(e){let n=Object.entries(e);for(let i=n.length-1;i>=0;i--){let[o,s]=n[i];if(oo(s))return{key:o,result:s}}}function Kg(e){let n=typeof e=="string"?Ni(e):e;return so(St({},n,{hash:""}))}function Rw(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function Iw(e){return Yg(e.result)&&Cw.has(e.result.status)}function Ei(e){return e.type===rt.deferred}function In(e){return e.type===rt.error}function oo(e){return(e&&e.type)===rt.redirect}function Lm(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Aw(e){let n=e;return n&&typeof n=="object"&&typeof n.data=="object"&&typeof n.subscribe=="function"&&typeof n.cancel=="function"&&typeof n.resolveData=="function"}function Yg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Fw(e){return xw.has(e.toLowerCase())}function cr(e){return yw.has(e.toLowerCase())}async function $w(e,n,i,o,s){let u=Object.entries(n);for(let d=0;dm?.route.id===f);if(!y)continue;let w=o.find(m=>m.route.id===y.route.id),C=w!=null&&!Zg(w,y)&&(s&&s[y.route.id])!==void 0;Ei(p)&&C&&await of(p,i,!1).then(m=>{m&&(n[f]=m)})}}async function zw(e,n,i){for(let o=0;oy?.route.id===u)&&Ei(f)&&(Qe(d,"Expected an AbortController for revalidating fetcher deferred result"),await of(f,d.signal,!0).then(y=>{y&&(n[s]=y)}))}}async function of(e,n,i){if(i===void 0&&(i=!1),!await e.deferredData.resolveData(n)){if(i)try{return{type:rt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:rt.error,error:s}}return{type:rt.data,data:e.deferredData.data}}}function af(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Za(e,n){let i=typeof n=="string"?Ni(n).search:n.search;if(e[e.length-1].route.index&&af(i||""))return e[e.length-1];let o=qg(e);return o[o.length-1]}function Dm(e){let{formMethod:n,formAction:i,formEncType:o,text:s,formData:u,json:d}=e;if(!(!n||!i||!o)){if(s!=null)return{formMethod:n,formAction:i,formEncType:o,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:n,formAction:i,formEncType:o,formData:u,json:void 0,text:void 0};if(d!==void 0)return{formMethod:n,formAction:i,formEncType:o,formData:void 0,json:d,text:void 0}}}function rd(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Bw(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Aa(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function Uw(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function _i(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Hw(e,n){try{let i=e.sessionStorage.getItem(Gg);if(i){let o=JSON.parse(i);for(let[s,u]of Object.entries(o||{}))u&&Array.isArray(u)&&n.set(s,new Set(u||[]))}}catch{}}function Vw(e,n){if(n.size>0){let i={};for(let[o,s]of n)i[o]=[...s];try{e.sessionStorage.setItem(Gg,JSON.stringify(i))}catch(o){Ko(!1,"Failed to save applied view transitions in sessionStorage ("+o+").")}}}/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. @@ -57,7 +57,7 @@ Error generating stack: `+h.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var n=1;n{f.current=!0}),v.useCallback(function(y,w){if(w===void 0&&(w={}),!f.current)return;if(typeof y=="number"){o.go(y);return}let C=nf(y,JSON.parse(d),u,w.relative==="path");e==null&&n!=="/"&&(C.pathname=C.pathname==="/"?n:Qr([n,C.pathname])),(w.replace?o.replace:o.push)(C,w.state,w)},[n,o,d,u,e])}const Gw=v.createContext(null);function Zw(e){let n=v.useContext(Xr).outlet;return n&&v.createElement(Gw.Provider,{value:e},n)}function NP(){let{matches:e}=v.useContext(Xr),n=e[e.length-1];return n?n.params:{}}function t0(e,n){let{relative:i}=n===void 0?{}:n,{future:o}=v.useContext(fo),{matches:s}=v.useContext(Xr),{pathname:u}=ra(),d=JSON.stringify(tf(s,o.v7_relativeSplatPath));return v.useMemo(()=>nf(e,JSON.parse(d),u,i==="path"),[e,d,u,i])}function Qw(e,n,i,o){fs()||Qe(!1);let{navigator:s}=v.useContext(fo),{matches:u}=v.useContext(Xr),d=u[u.length-1],f=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let y=ra(),w;w=y;let C=w.pathname||"/",m=C;if(p!=="/"){let b=p.replace(/^\//,"").split("/");m="/"+C.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=to(e,{pathname:m});return ex(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},f,b.params),pathname:Qr([p,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?p:Qr([p,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),u,i,o)}function Kw(){let e=ix(),n=es(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),i?v.createElement("pre",{style:s},i):null,null)}const Yw=v.createElement(Kw,null);class Xw extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){console.error("React Router caught the following error during render",n,i)}render(){return this.state.error!==void 0?v.createElement(Xr.Provider,{value:this.props.routeContext},v.createElement(Jg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Jw(e){let{routeContext:n,match:i,children:o}=e,s=v.useContext(cu);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(Xr.Provider,{value:n},o)}function ex(e,n,i,o){var s;if(n===void 0&&(n=[]),i===void 0&&(i=null),o===void 0&&(o=null),e==null){var u;if(!i)return null;if(i.errors)e=i.matches;else if((u=o)!=null&&u.v7_partialHydration&&n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let d=e,f=(s=i)==null?void 0:s.errors;if(f!=null){let w=d.findIndex(C=>C.route.id&&f?.[C.route.id]!==void 0);w>=0||Qe(!1),d=d.slice(0,Math.min(d.length,w+1))}let p=!1,y=-1;if(i&&o&&o.v7_partialHydration)for(let w=0;w=0?d=d.slice(0,y+1):d=[d[0]];break}}}return d.reduceRight((w,C,m)=>{let x,E=!1,b=null,N=null;i&&(x=f&&C.route.id?f[C.route.id]:void 0,b=C.route.errorElement||Yw,p&&(y<0&&m===0?(ax("route-fallback"),E=!0,N=null):y===m&&(E=!0,N=C.route.hydrateFallbackElement||null)));let P=n.concat(d.slice(0,m+1)),L=()=>{let $;return x?$=b:E?$=N:C.route.Component?$=v.createElement(C.route.Component,null):C.route.element?$=C.route.element:$=w,v.createElement(Jw,{match:C,routeContext:{outlet:w,matches:P,isDataRoute:i!=null},children:$})};return i&&(C.route.ErrorBoundary||C.route.errorElement||m===0)?v.createElement(Xw,{location:i.location,revalidation:i.revalidation,component:b,error:x,children:L(),routeContext:{outlet:null,matches:P,isDataRoute:!0}}):L()},null)}var n0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(n0||{}),r0=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(r0||{});function tx(e){let n=v.useContext(cu);return n||Qe(!1),n}function nx(e){let n=v.useContext(Xg);return n||Qe(!1),n}function rx(e){let n=v.useContext(Xr);return n||Qe(!1),n}function i0(e){let n=rx(),i=n.matches[n.matches.length-1];return i.route.id||Qe(!1),i.route.id}function ix(){var e;let n=v.useContext(Jg),i=nx(),o=i0();return n!==void 0?n:(e=i.errors)==null?void 0:e[o]}function ox(){let{router:e}=tx(n0.UseNavigateStable),n=i0(r0.UseNavigateStable),i=v.useRef(!1);return e0(()=>{i.current=!0}),v.useCallback(function(s,u){u===void 0&&(u={}),i.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Yl({fromRouteId:n},u)))},[e,n])}const Om={};function ax(e,n,i){Om[e]||(Om[e]=!0)}function sx(e,n){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!n||n.v7_relativeSplatPath),n&&(n.v7_fetcherPersist,n.v7_normalizeFormMethod,n.v7_partialHydration,n.v7_skipActionErrorRevalidation)}function lx(e){return Zw(e.context)}function ux(e){let{basename:n="/",children:i=null,location:o,navigationType:s=It.Pop,navigator:u,static:d=!1,future:f}=e;fs()&&Qe(!1);let p=n.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:p,navigator:u,static:d,future:Yl({v7_relativeSplatPath:!1},f)}),[p,f,u,d]);typeof o=="string"&&(o=Ni(o));let{pathname:w="/",search:C="",hash:m="",state:x=null,key:E="default"}=o,b=v.useMemo(()=>{let N=na(w,p);return N==null?null:{location:{pathname:N,search:C,hash:m,state:x,key:E},navigationType:s}},[p,w,C,m,x,E,s]);return b==null?null:v.createElement(fo.Provider,{value:y},v.createElement(sf.Provider,{children:i,value:b}))}new Promise(()=>{});function cx(e){let n={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(n,{element:v.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(n,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),n}/** + */function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var n=1;n{f.current=!0}),v.useCallback(function(y,w){if(w===void 0&&(w={}),!f.current)return;if(typeof y=="number"){o.go(y);return}let C=nf(y,JSON.parse(d),u,w.relative==="path");e==null&&n!=="/"&&(C.pathname=C.pathname==="/"?n:Qr([n,C.pathname])),(w.replace?o.replace:o.push)(C,w.state,w)},[n,o,d,u,e])}const Gw=v.createContext(null);function Zw(e){let n=v.useContext(Xr).outlet;return n&&v.createElement(Gw.Provider,{value:e},n)}function NP(){let{matches:e}=v.useContext(Xr),n=e[e.length-1];return n?n.params:{}}function t0(e,n){let{relative:i}=n===void 0?{}:n,{future:o}=v.useContext(fo),{matches:s}=v.useContext(Xr),{pathname:u}=ra(),d=JSON.stringify(tf(s,o.v7_relativeSplatPath));return v.useMemo(()=>nf(e,JSON.parse(d),u,i==="path"),[e,d,u,i])}function Qw(e,n,i,o){fs()||Qe(!1);let{navigator:s}=v.useContext(fo),{matches:u}=v.useContext(Xr),d=u[u.length-1],f=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let y=ra(),w;w=y;let C=w.pathname||"/",m=C;if(p!=="/"){let b=p.replace(/^\//,"").split("/");m="/"+C.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=to(e,{pathname:m});return ex(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},f,b.params),pathname:Qr([p,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?p:Qr([p,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),u,i,o)}function Kw(){let e=ix(),n=es(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),i?v.createElement("pre",{style:s},i):null,null)}const Yw=v.createElement(Kw,null);class Xw extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){console.error("React Router caught the following error during render",n,i)}render(){return this.state.error!==void 0?v.createElement(Xr.Provider,{value:this.props.routeContext},v.createElement(Jg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Jw(e){let{routeContext:n,match:i,children:o}=e,s=v.useContext(cu);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(Xr.Provider,{value:n},o)}function ex(e,n,i,o){var s;if(n===void 0&&(n=[]),i===void 0&&(i=null),o===void 0&&(o=null),e==null){var u;if(!i)return null;if(i.errors)e=i.matches;else if((u=o)!=null&&u.v7_partialHydration&&n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let d=e,f=(s=i)==null?void 0:s.errors;if(f!=null){let w=d.findIndex(C=>C.route.id&&f?.[C.route.id]!==void 0);w>=0||Qe(!1),d=d.slice(0,Math.min(d.length,w+1))}let p=!1,y=-1;if(i&&o&&o.v7_partialHydration)for(let w=0;w=0?d=d.slice(0,y+1):d=[d[0]];break}}}return d.reduceRight((w,C,m)=>{let x,N=!1,b=null,E=null;i&&(x=f&&C.route.id?f[C.route.id]:void 0,b=C.route.errorElement||Yw,p&&(y<0&&m===0?(ax("route-fallback"),N=!0,E=null):y===m&&(N=!0,E=C.route.hydrateFallbackElement||null)));let P=n.concat(d.slice(0,m+1)),L=()=>{let $;return x?$=b:N?$=E:C.route.Component?$=v.createElement(C.route.Component,null):C.route.element?$=C.route.element:$=w,v.createElement(Jw,{match:C,routeContext:{outlet:w,matches:P,isDataRoute:i!=null},children:$})};return i&&(C.route.ErrorBoundary||C.route.errorElement||m===0)?v.createElement(Xw,{location:i.location,revalidation:i.revalidation,component:b,error:x,children:L(),routeContext:{outlet:null,matches:P,isDataRoute:!0}}):L()},null)}var n0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(n0||{}),r0=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(r0||{});function tx(e){let n=v.useContext(cu);return n||Qe(!1),n}function nx(e){let n=v.useContext(Xg);return n||Qe(!1),n}function rx(e){let n=v.useContext(Xr);return n||Qe(!1),n}function i0(e){let n=rx(),i=n.matches[n.matches.length-1];return i.route.id||Qe(!1),i.route.id}function ix(){var e;let n=v.useContext(Jg),i=nx(),o=i0();return n!==void 0?n:(e=i.errors)==null?void 0:e[o]}function ox(){let{router:e}=tx(n0.UseNavigateStable),n=i0(r0.UseNavigateStable),i=v.useRef(!1);return e0(()=>{i.current=!0}),v.useCallback(function(s,u){u===void 0&&(u={}),i.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Yl({fromRouteId:n},u)))},[e,n])}const Om={};function ax(e,n,i){Om[e]||(Om[e]=!0)}function sx(e,n){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!n||n.v7_relativeSplatPath),n&&(n.v7_fetcherPersist,n.v7_normalizeFormMethod,n.v7_partialHydration,n.v7_skipActionErrorRevalidation)}function lx(e){return Zw(e.context)}function ux(e){let{basename:n="/",children:i=null,location:o,navigationType:s=It.Pop,navigator:u,static:d=!1,future:f}=e;fs()&&Qe(!1);let p=n.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:p,navigator:u,static:d,future:Yl({v7_relativeSplatPath:!1},f)}),[p,f,u,d]);typeof o=="string"&&(o=Ni(o));let{pathname:w="/",search:C="",hash:m="",state:x=null,key:N="default"}=o,b=v.useMemo(()=>{let E=na(w,p);return E==null?null:{location:{pathname:E,search:C,hash:m,state:x,key:N},navigationType:s}},[p,w,C,m,x,N,s]);return b==null?null:v.createElement(fo.Provider,{value:y},v.createElement(sf.Provider,{children:i,value:b}))}new Promise(()=>{});function cx(e){let n={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(n,{element:v.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(n,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),n}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. @@ -66,7 +66,7 @@ Error generating stack: `+h.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&(i[s]=e[s]);return i}function fx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hx(e,n){return e.button===0&&(!n||n==="_self")&&!fx(e)}function Td(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,i)=>{let o=e[i];return n.concat(Array.isArray(o)?o.map(s=>[i,s]):[[i,o]])},[]))}function px(e,n){let i=Td(e);return n&&n.forEach((o,s)=>{i.has(s)||n.getAll(s).forEach(u=>{i.append(s,u)})}),i}const mx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gx="6";try{window.__reactRouterVersion=gx}catch{}function vx(e,n){return Ew({basename:n?.basename,future:ts({},n?.future,{v7_prependBasename:!0}),history:Q1({window:n?.window}),hydrationData:n?.hydrationData||yx(),routes:e,mapRouteProperties:cx,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window}).initialize()}function yx(){var e;let n=(e=window)==null?void 0:e.__staticRouterHydrationData;return n&&n.errors&&(n=ts({},n,{errors:wx(n.errors)})),n}function wx(e){if(!e)return null;let n=Object.entries(e),i={};for(let[o,s]of n)if(s&&s.__type==="RouteErrorResponse")i[o]=new Kl(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let u=window[s.__subType];if(typeof u=="function")try{let d=new u(s.message);d.stack="",i[o]=d}catch{}}if(i[o]==null){let u=new Error(s.message);u.stack="",i[o]=u}}else i[o]=s;return i}const xx=v.createContext({isTransitioning:!1}),Cx=v.createContext(new Map),Sx="startTransition",Rm=$1[Sx],bx="flushSync",Im=Z1[bx];function _x(e){Rm?Rm(e):e()}function Fa(e){Im?Im(e):e()}class Ex{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=o=>{this.status==="pending"&&(this.status="resolved",n(o))},this.reject=o=>{this.status==="pending"&&(this.status="rejected",i(o))}})}}function kx(e){let{fallbackElement:n,router:i,future:o}=e,[s,u]=v.useState(i.state),[d,f]=v.useState(),[p,y]=v.useState({isTransitioning:!1}),[w,C]=v.useState(),[m,x]=v.useState(),[E,b]=v.useState(),N=v.useRef(new Map),{v7_startTransition:P}=o||{},L=v.useCallback(K=>{P?_x(K):K()},[P]),$=v.useCallback((K,ce)=>{let{deletedFetchers:de,flushSync:I,viewTransitionOpts:U}=ce;K.fetchers.forEach((ne,he)=>{ne.data!==void 0&&N.current.set(he,ne.data)}),de.forEach(ne=>N.current.delete(ne));let W=i.window==null||i.window.document==null||typeof i.window.document.startViewTransition!="function";if(!U||W){I?Fa(()=>u(K)):L(()=>u(K));return}if(I){Fa(()=>{m&&(w&&w.resolve(),m.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:U.currentLocation,nextLocation:U.nextLocation})});let ne=i.window.document.startViewTransition(()=>{Fa(()=>u(K))});ne.finished.finally(()=>{Fa(()=>{C(void 0),x(void 0),f(void 0),y({isTransitioning:!1})})}),Fa(()=>x(ne));return}m?(w&&w.resolve(),m.skipTransition(),b({state:K,currentLocation:U.currentLocation,nextLocation:U.nextLocation})):(f(K),y({isTransitioning:!0,flushSync:!1,currentLocation:U.currentLocation,nextLocation:U.nextLocation}))},[i.window,m,w,N,L]);v.useLayoutEffect(()=>i.subscribe($),[i,$]),v.useEffect(()=>{p.isTransitioning&&!p.flushSync&&C(new Ex)},[p]),v.useEffect(()=>{if(w&&d&&i.window){let K=d,ce=w.promise,de=i.window.document.startViewTransition(async()=>{L(()=>u(K)),await ce});de.finished.finally(()=>{C(void 0),x(void 0),f(void 0),y({isTransitioning:!1})}),x(de)}},[L,d,w,i.window]),v.useEffect(()=>{w&&d&&s.location.key===d.location.key&&w.resolve()},[w,m,s.location,d]),v.useEffect(()=>{!p.isTransitioning&&E&&(f(E.state),y({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),b(void 0))},[p.isTransitioning,E]),v.useEffect(()=>{},[]);let q=v.useMemo(()=>({createHref:i.createHref,encodeLocation:i.encodeLocation,go:K=>i.navigate(K),push:(K,ce,de)=>i.navigate(K,{state:ce,preventScrollReset:de?.preventScrollReset}),replace:(K,ce,de)=>i.navigate(K,{replace:!0,state:ce,preventScrollReset:de?.preventScrollReset})}),[i]),Z=i.basename||"/",fe=v.useMemo(()=>({router:i,navigator:q,static:!1,basename:Z}),[i,q,Z]),O=v.useMemo(()=>({v7_relativeSplatPath:i.future.v7_relativeSplatPath}),[i.future.v7_relativeSplatPath]);return v.useEffect(()=>sx(o,i.future),[o,i.future]),v.createElement(v.Fragment,null,v.createElement(cu.Provider,{value:fe},v.createElement(Xg.Provider,{value:s},v.createElement(Cx.Provider,{value:N.current},v.createElement(xx.Provider,{value:p},v.createElement(ux,{basename:Z,location:s.location,navigationType:s.historyAction,navigator:q,future:O},s.initialized||i.future.v7_partialHydration?v.createElement(Nx,{routes:i.routes,future:i.future,state:s}):n))))),null)}const Nx=v.memo(Tx);function Tx(e){let{routes:n,future:i,state:o}=e;return Qw(n,void 0,o,i)}const jx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Px=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mx=v.forwardRef(function(n,i){let{onClick:o,relative:s,reloadDocument:u,replace:d,state:f,target:p,to:y,preventScrollReset:w,viewTransition:C}=n,m=dx(n,mx),{basename:x}=v.useContext(fo),E,b=!1;if(typeof y=="string"&&Px.test(y)&&(E=y,jx))try{let $=new URL(window.location.href),q=y.startsWith("//")?new URL($.protocol+y):new URL(y),Z=na(q.pathname,x);q.origin===$.origin&&Z!=null?y=Z+q.search+q.hash:b=!0}catch{}let N=qw(y,{relative:s}),P=Lx(y,{replace:d,state:f,target:p,preventScrollReset:w,relative:s,viewTransition:C});function L($){o&&o($),$.defaultPrevented||P($)}return v.createElement("a",ts({},m,{href:E||N,onClick:b||u?o:L,ref:i,target:p}))});var Am;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Am||(Am={}));var Fm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Fm||(Fm={}));function Lx(e,n){let{target:i,replace:o,state:s,preventScrollReset:u,relative:d,viewTransition:f}=n===void 0?{}:n,p=hs(),y=ra(),w=t0(e,{relative:d});return v.useCallback(C=>{if(hx(C,i)){C.preventDefault();let m=o!==void 0?o:so(y)===so(w);p(e,{replace:m,state:s,preventScrollReset:u,relative:d,viewTransition:f})}},[y,p,w,o,s,i,e,u,d,f])}function Dx(e){let n=v.useRef(Td(e)),i=v.useRef(!1),o=ra(),s=v.useMemo(()=>px(o.search,i.current?null:n.current),[o.search]),u=hs(),d=v.useCallback((f,p)=>{const y=Td(typeof f=="function"?f(s):f);i.current=!0,u("?"+y,p)},[u,s]);return[s,d]}function Ox(e){return typeof e=="number"?Number.isNaN(e):!1}function $e(e){return e==null||Ox(e)}function Lt(e){return!$e(e)}function Rx(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return $e(e)||e===!1||n.includes(e)}function lf(e){return Rx(e,[""])}function ps(e){return!lf(e)}const Ix=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];Ix.reduce((e,n)=>({...e,[`[object ${n}]`]:n.toLowerCase()}),{});const Ax={sorting:void 0,setSorting:e=>{console.warn("Trying to set to ",e)}},TP=v.createContext(Ax),Fx=v.createContext({alerts:[],addAlert:()=>{console.warn("AlertContext::addAlert called before it was initialized")},removeAlert:()=>{console.warn("AlertContext::removeAlert called before it was initialized")},updateAlert:()=>{console.warn("AlertContext::updateAlert called before it was initialized")}}),jP=v.createContext({setShowDropdown:()=>{console.warn("DropdownMenuContext::setShowDropdown called without a provider")}}),o0=v.createContext({currentLanguage:"en",setCurrentLanguage:()=>{console.warn("LanguageContext::setCurrentLanguage called without a provider")},languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{console.warn("LanguageContext::setLanguageNamespaceStatus called without a provider")},strings:{},setStrings:()=>{console.warn("LanguageContext::setStrings called without a provider")},registerNamespace:()=>{console.warn("LanguageContext::registerNamespace called without a provider")}});v.createContext({variant:"primary"});function $x(e){return typeof e=="number"?Number.isNaN(e):!1}function zx(e){return e==null||$x(e)}function Bx(e,n){if(zx(e))return;const i={},o=[];return e.forEach(s=>{const u=n?n(s):JSON.stringify(s);i[u]||(i[u]=!0,o.push(s))}),e.length===o.length?e:o}const Ux=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];Ux.reduce((e,n)=>({...e,[`[object ${n}]`]:n.toLowerCase()}),{});function Oe(){for(var e=arguments.length,n=new Array(e),i=0;i{d&&d(u,C)},[d,u]);return g.jsx("button",{ref:s,name:typeof u=="string"?u:void 0,type:p,className:Oe($m.rawButton,f&&$m.focused,i),disabled:o,onClick:d?w:void 0,...y,children:n})}function $a(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";if($e(e))return"";const o=String(e);return o.length>=n?o:Array(n-o.length+1).join(i)+o}function qx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i="";const o=n?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"abcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;sn+i,0)}function cf(e,n,i){const o=Math.min(n,i),s=Math.max(n,i);return Math.max(o,Math.min(s,e))}function Sr(e){const[n]=v.useState(()=>`_${qx()}`),{spacing:i,variant:o="md",mode:s="gap",inner:u}=e;return v.useEffect(()=>{const d=["var(--go-ui-spacing-4xs)","var(--go-ui-spacing-3xs)","var(--go-ui-spacing-2xs)","var(--go-ui-spacing-xs)","var(--go-ui-spacing-sm)","var(--go-ui-spacing-md)","var(--go-ui-spacing-lg)","var(--go-ui-spacing-xl)","var(--go-ui-spacing-2xl)","var(--go-ui-spacing-3xl)","var(--go-ui-spacing-4xl)"];let f="0";if(i!=="none"){const w={condensed:-3,compact:-2,cozy:-1,default:0,comfortable:1,relaxed:2,loose:3},C={xs:3,sm:4,md:5,lg:6,xl:7},m=u?C[o]-1:C[o],x=w[i];f=d[cf(m+x,0,d.length-1)]}if($e(i))return;const p=document.createElement("style");if(document.head.appendChild(p),!p.sheet){p.remove();return}let y;return s==="gap"||s==="grid-gap"?y=`gap: ${f};`:s==="padding-h"?y=`padding-left: ${f}; padding-right: ${f};`:s==="padding-v"&&(y=`padding-top: ${f}; padding-bottom: ${f};`),p.sheet.insertRule(`.${n} { ${y} }`),()=>{p.remove()}},[i,o,s,u,n]),n}const Qx="_basic-layout_v9jro_1",Kx="_with-wrap_v9jro_5",Yx="_icons-container_v9jro_9",Xx="_children-container_v9jro_14",Jx="_actions-container_v9jro_19",za={basicLayout:Qx,withWrap:Kx,iconsContainer:Yx,childrenContainer:Xx,actionsContainer:Jx};function ms(e){const{className:n,icons:i,children:o,actions:s,iconsContainerClassName:u,childrenContainerClassName:d,actionsContainerClassName:f,withoutWrap:p,spacing:y="default",variant:w="md"}=e,C=Sr({spacing:y,variant:w,mode:"gap"}),m=Sr({spacing:y,variant:w,mode:"gap",inner:!0}),x=Oe(za.basicLayout,!p&&za.withWrap,C,n),E=$e(i)&&$e(o)&&$e(s)?null:g.jsxs(g.Fragment,{children:[i&&g.jsx("div",{className:Oe(za.iconsContainer,m,u),children:i}),g.jsx("div",{className:Oe(za.childrenContainer,m,d),children:o}),s&&g.jsx("div",{className:Oe(za.actionsContainer,m,f),children:s})]});return{containerClassName:x,content:E}}const eC="_button_18a84_1",tC="_ellipsized_18a84_29",nC="_children_18a84_32",rC="_overflow-wrapper_18a84_36",iC="_primary_18a84_44",oC="_secondary_18a84_45",aC="_no-spacing_18a84_50",sC="_condensed-spacing_18a84_54",lC="_compact-spacing_18a84_58",uC="_cozy-spacing_18a84_62",cC="_default-spacing_18a84_66",dC="_comfortable-spacing_18a84_70",fC="_relaxed-spacing_18a84_74",hC="_loose-spacing_18a84_78",pC="_disabled_18a84_88",mC="_tertiary_18a84_116",gC="_tertiary-on-dark_18a84_130",vC="_dropdown-item_18a84_144",Vt={button:eC,ellipsized:tC,children:nC,overflowWrapper:rC,primary:iC,secondary:oC,noSpacing:aC,condensedSpacing:sC,compactSpacing:lC,cozySpacing:uC,defaultSpacing:cC,comfortableSpacing:dC,relaxedSpacing:fC,looseSpacing:hC,disabled:pC,tertiary:mC,tertiaryOnDark:gC,dropdownItem:vC},yC={primary:Vt.primary,secondary:Vt.secondary,tertiary:Vt.tertiary,"tertiary-on-dark":Vt.tertiaryOnDark,"dropdown-item":Vt.dropdownItem},wC={none:Vt.noSpacing,condensed:Vt.condensedSpacing,compact:Vt.compactSpacing,cozy:Vt.cozySpacing,default:Vt.defaultSpacing,comfortable:Vt.comfortableSpacing,relaxed:Vt.relaxedSpacing,loose:Vt.looseSpacing};function xC(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,disabled:d,icons:f,iconsContainerClassName:p,variant:y="primary",spacing:w="default",ellipsize:C}=e,m=Oe(Vt.button,yC[y],wC[w],d&&Vt.disabled,C&&Vt.ellipsized,u),x=v.useMemo(()=>C?g.jsx("div",{className:Vt.overflowWrapper,children:o}):o,[C,o]),{content:E,containerClassName:b}=ms({className:m,icons:f,children:x,actions:n,iconsContainerClassName:p,childrenContainerClassName:Oe(Vt.children,s),actionsContainerClassName:i,spacing:w,withoutWrap:!0,variant:"xs"});return{className:b,children:E,disabled:d}}function Ue(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,disabled:d,icons:f,iconsContainerClassName:p,name:y,onClick:w,variant:C,type:m="button",spacing:x,...E}=e,b=v.useCallback((P,L)=>{w&&w(P,L)},[w]),N=xC({variant:C,className:u,actionsContainerClassName:i,iconsContainerClassName:p,childrenContainerClassName:s,children:o,icons:f,actions:n,spacing:x,disabled:d||m!=="submit"&&$e(w)});return g.jsx(uf,{name:y,type:m,onClick:b,...E,...N})}const CC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#alert-line_svg__a)"},v.createElement("path",{d:"m12.866 3 9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0Zm-8.66 16h15.588L12 5.5 4.206 19ZM11 16h2v2h-2v-2Zm0-7h2v5h-2V9Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"alert-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),a0=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56","aria-hidden":"true",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#analysis_svg__a)"},v.createElement("path",{d:"m12.384 37.796-7.179 7.18a4.115 4.115 0 0 0 5.82 5.819l7.179-7.18a24.009 24.009 0 0 1-5.82-5.819Zm13.619-13.798h-4a1.003 1.003 0 0 0-1 1v4.94a12.572 12.572 0 0 0 6 5.518V24.998a1.003 1.003 0 0 0-1-1Zm15.998-6h-4a1.003 1.003 0 0 0-1 1v16.458a12.572 12.572 0 0 0 6-5.519V18.998a1.003 1.003 0 0 0-1-1Zm-7.999 3h-4a1.003 1.003 0 0 0-1 1v14.138c1.972.48 4.029.48 6 0V21.998a1.003 1.003 0 0 0-1-1Z"}),v.createElement("path",{d:"M32.002 4a19.998 19.998 0 1 0 0 39.995 19.998 19.998 0 0 0 0-39.995Zm10.999 30.177a14.998 14.998 0 1 1-21.998-20.394 14.998 14.998 0 0 1 21.998 20.394Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"analysis_svg__a"},v.createElement("path",{d:"M0 0h56v56H0z"})))),SC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#arrow-down-small-fill_svg__a)"},v.createElement("path",{d:"m12 16-6-6h12l-6 6Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"arrow-down-small-fill_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),bC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#arrow-right-line_svg__a)"},v.createElement("path",{d:"m16.172 11-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2h12.172Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"arrow-right-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),_C=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#arrow-up-small-fill_svg__a)"},v.createElement("path",{d:"m12 8 6 6H6l6-6Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"arrow-up-small-fill_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),EC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#check-double-fill_svg__a)"},v.createElement("path",{d:"m11.602 13.76 1.412 1.412 8.466-8.466 1.414 1.414-9.88 9.88-6.364-6.364 1.414-1.414 2.125 2.125 1.413 1.412Zm.002-2.829 4.952-4.952 1.41 1.41-4.952 4.952-1.41-1.41Zm-2.827 5.656L7.364 18 1 11.636l1.414-1.414 1.413 1.412-.001.002 4.951 4.95Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"check-double-fill_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),kC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#check-line_svg__a)"},v.createElement("path",{d:"m10 15.171 9.192-9.192 1.415 1.414L10 18l-6.364-6.364 1.414-1.414 4.95 4.95Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"check-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),NC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#checkbox-blank-circle-line_svg__a)"},v.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"checkbox-blank-circle-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),TC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#checkbox-blank-line_svg__a)"},v.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"checkbox-blank-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),jC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#checkbox-line_svg__a)"},v.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm6.003 11L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"checkbox-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),PC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#chevron-left-line_svg__a)"},v.createElement("path",{d:"M11.05 12 16 7.05l-1.413-1.414L8.223 12l6.364 6.364L16 16.95 11.05 12Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"chevron-left-line_svg__a"},v.createElement("path",{d:"M0 24h24V0H0z"})))),MC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#chevron-right-line_svg__a)"},v.createElement("path",{d:"m13.172 12-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414 4.95-4.95Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"chevron-right-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),LC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("path",{fillRule:"evenodd",d:"m13.057 11.996 4.716-4.716a.75.75 0 1 0-1.06-1.06l-4.717 4.716L7.28 6.22a.75.75 0 1 0-1.06 1.06l4.716 4.716-4.716 4.716a.75.75 0 1 0 1.06 1.06l4.716-4.715 4.716 4.716a.748.748 0 0 0 1.061 0 .75.75 0 0 0 0-1.061l-4.716-4.716Z",clipRule:"evenodd"})),df=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#delete-bin-line_svg__a)"},v.createElement("path",{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3Zm1 2H6v12h12V8Zm-9 3h2v6H9v-6Zm4 0h2v6h-2v-6ZM9 4v2h6V4H9Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"delete-bin-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),DC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("path",{d:"M17.949 6.651a1.834 1.834 0 1 0-1.833 1.834c1.01 0 1.833-.822 1.833-1.834Zm-7.806 15.847a1.836 1.836 0 0 0-1.833 1.834c0 1.01.822 1.832 1.833 1.832a1.835 1.835 0 0 0 1.833-1.832 1.836 1.836 0 0 0-1.833-1.834Zm5.973-10.343a2.506 2.506 0 1 0 .001 5.012 2.506 2.506 0 0 0-.001-5.012Zm5.973 10.343a1.834 1.834 0 1 0 1.833 1.834 1.836 1.836 0 0 0-1.833-1.834Z"}),v.createElement("path",{fillRule:"evenodd",d:"M0 16C0 7.163 7.164 0 16 0c8.837 0 16 7.163 16 16 0 8.836-7.164 16-16 16S0 24.836 0 16Zm22.089 11.044a2.716 2.716 0 0 1-2.713-2.713c0-.828.375-1.57.962-2.068l-2.589-4.324a3.643 3.643 0 0 1-3.266 0l-2.589 4.324a2.7 2.7 0 0 1 .962 2.068 2.716 2.716 0 0 1-2.713 2.713A2.716 2.716 0 0 1 7.43 24.33a2.716 2.716 0 0 1 2.713-2.713c.352 0 .688.07.997.192l2.606-4.354a3.664 3.664 0 0 1 1.93-6.43v-1.7a2.714 2.714 0 0 1-2.273-2.674 2.716 2.716 0 0 1 2.714-2.713 2.716 2.716 0 0 1 2.712 2.713 2.714 2.714 0 0 1-2.272 2.674v1.7a3.664 3.664 0 0 1 3.226 3.636 3.651 3.651 0 0 1-1.297 2.794l2.607 4.354c.31-.122.645-.192.997-.192a2.716 2.716 0 0 1 2.712 2.713 2.716 2.716 0 0 1-2.713 2.713ZM4.497 14.677c0-1.958 1.228-3.59 3.282-3.59 1.497 0 2.754.798 2.936 2.342H9.544c-.114-.901-.901-1.363-1.765-1.363-1.47 0-2.083 1.295-2.083 2.61 0 1.316.613 2.61 2.083 2.61 1.227.02 1.899-.719 1.919-1.88H7.875v-.912h2.917v3.609h-.768l-.182-.806c-.643.73-1.227.969-2.062.969-2.055 0-3.283-1.632-3.283-3.59Z",clipRule:"evenodd"})),OC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#menu-line_svg__a)"},v.createElement("path",{d:"M3 4h18v2H3V4Zm0 7h18v2H3v-2Zm0 7h18v2H3v-2Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"menu-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),RC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#question-line_svg__a)"},v.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm-1-5h2v2h-2v-2Zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1 1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.5 3.5 0 1 1 13 13.355Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"question-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),IC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#radio-button-line_svg__a)"},v.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm0-3a5 5 0 1 1 0-10 5 5 0 0 1 0 10Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"radio-button-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),AC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#search-line_svg__a)"},v.createElement("path",{d:"m18.031 16.617 4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.868-3.133-7-7-7-3.868 0-7 3.132-7 7 0 3.867 3.132 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"search-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),FC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 25 25",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("path",{d:"M8.775 9.71a2.284 2.284 0 0 0-2.2 1.66H4.623a.623.623 0 0 0 0 1.247h1.952a2.284 2.284 0 0 0 4.401 0h8.804a.623.623 0 0 0 0-1.246h-8.804a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.076 1.038 1.038 0 0 1 0 2.076ZM15.627 4a2.284 2.284 0 0 0-2.2 1.661H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 1 0 0-1.246h-1.952A2.284 2.284 0 0 0 15.628 4Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Zm0 8.098a2.284 2.284 0 0 0-2.2 1.66H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 0 0 0-1.245h-1.952a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Z"})),s0=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#upload-cloud-line_svg__a)"},v.createElement("path",{d:"M1 14.5a6.496 6.496 0 0 1 3.064-5.519 8.001 8.001 0 0 1 15.872 0 6.5 6.5 0 0 1-2.936 12l-10 .02c-3.356-.275-6-3.079-6-6.5Zm15.848 4.487a4.5 4.5 0 0 0 2.03-8.309l-.807-.503-.12-.942a6 6 0 0 0-11.903 0l-.12.942-.805.503a4.5 4.5 0 0 0 2.029 8.31l.173.012h9.35l.173-.013ZM13 13v4h-2v-4H8l4-5 4 5h-3Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"upload-cloud-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),$C="_spinner_50bgg_1",zC="_spinner-bounce_50bgg_9",_l={spinner:$C,spinnerBounce:zC};function Wo(e){const{className:n}=e;return g.jsxs("div",{className:Oe(_l.spinner,n),children:[g.jsx("div",{className:_l.spinnerBounce}),g.jsx("div",{className:_l.spinnerBounce}),g.jsx("div",{className:_l.spinnerBounce})]})}const BC="_message_176iw_1",UC="_icon_176iw_13",HC="_spinner_176iw_17",VC="_title_176iw_22",qC="_errored_176iw_27",WC="_compact_176iw_33",Ci={message:BC,icon:UC,spinner:HC,title:VC,errored:qC,compact:WC};function GC(e){const{className:n,pending:i=!1,variant:o,icon:s,title:u,description:d,actions:f,compact:p=!1,errored:y,erroredTitle:w,erroredDescription:C}=e,m=Lt(y?w:u),x=Lt(y?C:d);return g.jsxs("div",{className:Oe(Ci.message,o==="error"&&Ci.errored,p&&Ci.compact,n),children:[(s||i)&&g.jsxs("div",{className:Ci.icon,children:[i&&g.jsx(Wo,{className:Ci.spinner}),!i&&s]}),m&&g.jsx("div",{className:Ci.title,children:y?w:u}),x&&g.jsx("div",{className:Ci.description,children:d}),f&&g.jsx("div",{className:Ci.actions,children:f})]})}function l0(e){const{strings:n,registerNamespace:i}=v.useContext(o0);return v.useEffect(()=>{i(e.namespace,e.strings)},[i,e]),n[e.namespace]??e.strings}const ZC="common",QC={messageTitleFetching:"Fetching data...",messageTitleFilteredDataNotAvailable:"Data is not available for selected filter!",messageTitleDataNotAvailable:"Data is not available!",messageTitleDataFailedToFetch:"Failed to fetch data!"},KC={namespace:ZC,strings:QC},YC="_default-message_wu986_1",XC="_overlay_wu986_2",zm={defaultMessage:YC,overlay:XC};function u0(e){const{className:n,compact:i,pending:o,overlayPending:s,filtered:u,empty:d,errored:f,emptyMessage:p,filteredEmptyMessage:y,pendingMessage:w,errorMessage:C}=e,m=l0(KC),x=v.useMemo(()=>o?w??m.messageTitleFetching:f?C??m.messageTitleDataFailedToFetch:u?y??m.messageTitleFilteredDataNotAvailable:d?p??m.messageTitleDataNotAvailable:null,[d,o,u,f,p,y,w,C,m]);return!d&&!o&&!f?null:g.jsx(GC,{className:Oe(zm.defaultMessage,o&&s&&zm.overlay,n),icon:g.jsx(a0,{}),compact:i,title:x,pending:o})}const JC="_filter-bar_16xsj_1",eS="_grid-with-actions_16xsj_6",tS="_grid_16xsj_6",nS="_actions_16xsj_15",Qa={filterBar:JC,gridWithActions:eS,grid:tS,actions:nS};function Bm(e){const{grid:n,actions:i,spacing:o="default"}=e,s=Sr({spacing:o,mode:"gap"}),u=Sr({spacing:o,mode:"gap",inner:!0}),d=Sr({spacing:o,mode:"grid-gap"});return $e(n)&&$e(i)?null:g.jsxs("div",{className:Oe(Qa.gridWithActions,s),children:[g.jsx("div",{className:Oe(Qa.grid,d),children:n}),Lt(i)&&g.jsx("div",{className:Oe(Qa.actions,u),children:i})]})}function rS(e){const{className:n,filters:i,filterActions:o,search:s,searchActions:u,filterPreview:d,spacing:f}=e;return $e(i)&&$e(o)&&$e(s)&&$e(u)&&$e(d)?null:g.jsxs("div",{className:Oe(Qa.filterBar,n),children:[g.jsx(Bm,{grid:i,actions:o,spacing:f}),g.jsx(Bm,{grid:s,actions:u,spacing:f}),Lt(d)&&g.jsx("div",{className:Qa.filterPreview,children:d})]})}function iS(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,icons:d,iconsContainerClassName:f,spacing:p,withoutWrap:y}=e,{content:w,containerClassName:C}=ms({actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,icons:d,iconsContainerClassName:f,spacing:p,withoutWrap:y});return g.jsx("div",{className:C,children:w})}function oS(e,n,i){const[o,s]=v.useState(()=>e);return v.useEffect(()=>{const u=setTimeout(()=>{s(e)},300);return()=>{clearTimeout(u)}},[e,n,i]),o}function aS(e,n=!1){const[i,o]=v.useState(()=>{var s;const u=(s=e.current)==null?void 0:s.getBoundingClientRect();return{width:u?.width??0,height:u?.height??0}});return v.useEffect(()=>{const s=new ResizeObserver(d=>{const f=d.at(0),p=f?.contentRect;p&&o({width:p.width,height:p.height})}),u=e.current;return!n&&Lt(u)&&s.observe(u),()=>{!n&&Lt(u)&&s.unobserve(u)}},[n,e]),oS(i)}const sS="_heading_1uxwj_1",lS="_level-one_1uxwj_9",uS="_level-two_1uxwj_17",cS="_level-three_1uxwj_25",dS="_level-four_1uxwj_33",fS="_level-five_1uxwj_37",hS="_level-six_1uxwj_41",pS="_ellipsized-text_1uxwj_45",mS="_ellipsized_1uxwj_45",Gr={heading:sS,levelOne:lS,levelTwo:uS,levelThree:cS,levelFour:dS,levelFive:fS,levelSix:hS,ellipsizedText:pS,ellipsized:mS},gS={1:Gr.levelOne,2:Gr.levelTwo,3:Gr.levelThree,4:Gr.levelFour,5:Gr.levelFive,6:Gr.levelSix};function ro(e){const{className:n,level:i=3,children:o,ellipsize:s}=e,u=`h${i}`,d=v.useRef(null),f=aS(d);return o?g.jsxs(u,{className:Oe(Gr.heading,s&&Gr.ellipsized,gS[i],n),ref:d,children:[s&&g.jsx("div",{className:Gr.ellipsizedText,style:{width:`${f.width}px`},title:typeof o=="string"?o:void 0,children:o}),!s&&o]}):null}const vS="_header_537v1_1",yS={header:vS};function wS(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,elementRef:d,ellipsizeHeading:f,heading:p,headingClassName:y,headingLevel:w,headingDescription:C,headingDescriptionContainerClassName:m,icons:x,iconsContainerClassName:E,headingSectionClassName:b,headingContainerClassName:N,wrapHeadingContent:P=!1,spacing:L="default"}=e,$=v.useMemo(()=>$e(p)&&$e(C)?null:g.jsxs(g.Fragment,{children:[g.jsx(ro,{level:w,className:y,ellipsize:f,children:p}),C&&g.jsx("div",{className:m,children:C})]}),[p,f,C,y,m,w]),{content:q,containerClassName:Z}=ms({actions:n,actionsContainerClassName:i,children:$,childrenContainerClassName:N,className:b,icons:x,iconsContainerClassName:E,withoutWrap:!P,spacing:L,variant:"sm"}),fe=Sr({spacing:L,inner:!0});return!q&&!o?null:g.jsxs("div",{className:Oe(yS.header,fe,u),ref:d,children:[q&&g.jsx("div",{className:Z,children:q}),o&&g.jsx("div",{className:s,children:o})]})}const xS="_container_lyve2_1",CS="_header_lyve2_8",SS="_centered-header-description-container_lyve2_11",bS="_centered-description_lyve2_16",_S="_with-border-and-header-background_lyve2_23",ES="_border_lyve2_33",kS="_content_lyve2_39",NS="_pending-overlaid_lyve2_42",TS="_message_lyve2_47",jS="_footer_lyve2_53",PS="_with-grid-view_lyve2_57",MS="_two-columns_lyve2_67",LS="_three-columns_lyve2_82",DS="_four-columns_lyve2_96",OS="_five-columns_lyve2_100",RS="_with-vertical-view_lyve2_105",IS="_with-overflow-in-content_lyve2_112",Ht={container:xS,header:CS,centeredHeaderDescriptionContainer:SS,centeredDescription:bS,withBorderAndHeaderBackground:_S,border:ES,content:kS,pendingOverlaid:NS,message:TS,footer:jS,withGridView:PS,twoColumns:MS,threeColumns:LS,fourColumns:DS,fiveColumns:OS,withVerticalView:RS,withOverflowInContent:IS},AS={2:Ht.twoColumns,3:Ht.threeColumns,4:Ht.fourColumns,5:Ht.fiveColumns};function dr(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,containerRef:d,contentViewType:f="default",ellipsizeHeading:p,filters:y,filterActions:w,footerActions:C,footerActionsContainerClassName:m,footerClassName:x,footerContent:E,footerContentClassName:b,footerIcons:N,headerClassName:P,headerDescription:L,withCenteredHeaderDescription:$,headerDescriptionContainerClassName:q,headerElementRef:Z,heading:fe,headingClassName:O,headingContainerClassName:K,headingDescription:ce,headingDescriptionContainerClassName:de,headingLevel:I,headingSectionClassName:U,icons:W,iconsContainerClassName:ne,numPreferredGridContentColumns:he=2,spacing:Ce="default",withHeaderBorder:_e=!1,withFooterBorder:G=!1,withBorderAndHeaderBackground:ue=!1,withOverflowInContent:T=!1,withInternalPadding:H=!1,withoutWrapInHeading:oe=!1,withoutWrapInFooter:Se=!1,pending:se=!1,overlayPending:re=!1,empty:ee=!1,errored:Q=!1,filtered:Y=!1,compactMessage:et=!1,errorMessage:tn,emptyMessage:Wt,pendingMessage:ot,filteredEmptyMessage:bt}=e,st=N||E||C,wt=fe||n||W||L||ce,ft=Sr({spacing:Ce}),ht=Sr({spacing:Ce,mode:"padding-h"}),xt=Sr({spacing:Ce,mode:"padding-v"}),nn=Sr({spacing:Ce,mode:"gap",inner:!0}),Tn=v.useMemo(()=>$e(L)?null:$?g.jsx("div",{className:Ht.centeredDescription,children:L}):L,[L,$]);return!wt&&!y&&!o&&!st&&!ee&&!se&&!Q&&!Y?null:g.jsxs("div",{ref:d,className:Oe(Ht.container,!ue&&ft,H&&xt,T&&Ht.withOverflowInContent,ue&&Ht.withBorderAndHeaderBackground,f==="grid"&&Ht.withGridView,f==="grid"&&AS[he],f==="vertical"&&Ht.withVerticalView,u),children:[wt&&g.jsx(wS,{actions:n,className:Oe(Ht.header,ue&&xt,(H||ue)&&ht,P),elementRef:Z,actionsContainerClassName:i,ellipsizeHeading:p,heading:fe,headingLevel:I,icons:W,iconsContainerClassName:ne,childrenContainerClassName:Oe($&&Ht.centeredHeaderDescriptionContainer,q),headingSectionClassName:U,headingClassName:O,headingContainerClassName:K,wrapHeadingContent:!oe,headingDescription:ce,headingDescriptionContainerClassName:de,spacing:Ce,children:Tn}),_e&&g.jsx("div",{className:Ht.border}),g.jsx(rS,{filters:y,filterActions:w,spacing:Ce,className:Oe(H&&ht)}),(o||ee||se||Q||Y)&&g.jsxs("div",{className:Oe(Ht.content,f!=="default"&&nn,(H||ue)&&ht,ue&&xt,re&&se&&Ht.pendingOverlaid,s),children:[g.jsx(u0,{className:Ht.message,pending:se,filtered:Y,errored:Q,empty:ee,compact:et,overlayPending:re,emptyMessage:Wt,filteredEmptyMessage:bt,pendingMessage:ot,errorMessage:tn}),!ee&&!Q&&(!se||re)&&o]}),st&&G&&g.jsx("div",{className:Ht.border}),st&&g.jsx(iS,{actions:C,icons:N,childrenContainerClassName:b,className:Oe(Ht.footer,H&&ht,ue&&xt,x),actionsContainerClassName:m,spacing:Ce,withoutWrap:Se,children:E})]})}function FS(e){const{children:n,container:i=document.body,portalKey:o}=e;return g.jsx(g.Fragment,{children:ef.createPortal(n,i,o)})}const $S="yyyy-MM-dd",PP="-",MP=108;function Ka(e,n,i){return $e(e)?void 0:e.reduce((o,s,u)=>{const d=n(s,u);return o[d]=i?i(s,d,u,o):s,o},{})}function ff(e,n){return function(i,o){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const u=Lt(i)?e(i):void 0,d=Lt(o)?e(o):void 0;return u===d?0:$e(u)?s*1:$e(d)?s*-1:s*n(u,d)}}const LP=ff(e=>e,(e,n)=>e.localeCompare(n)),DP=ff(e=>e,(e,n)=>e-n),zS=(e,n,i,o)=>i?ff(s=>s,(s,u)=>{const d=i.toLowerCase(),f=s.toLowerCase().indexOf(d),p=u.toLowerCase().indexOf(d);return f===p||f===-1&&p===-1?s.localeCompare(u):p===-1?-1:f===-1?1:f-p})(e,n,o):0,BS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],US=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var Zr=function(e){return e.time="time",e.date="date",e}(Zr||{});function Um(e,n){let i,o;return n.forEach(s=>{const u=e.indexOf(s);if(u===-1)return;const d=u+s.length;(i===void 0||uo)&&(o=d)}),{start:i,end:o}}function HS(e){const{start:n,end:i}=Um(e,["yyyy","yy","MMM","MM","dd","EEE"]),{start:o,end:s}=Um(e,["hh","mm","ss","aaa"]),u=e.length,d=(f,p)=>f===void 0||p===void 0?"":e.substring(f,p);return n===void 0&&o===void 0?[{value:e}].filter(f=>f.value!==""):n===void 0?[{value:d(0,o)},{type:Zr.time,value:d(o,s)},{value:d(s,u)}].filter(f=>f.value!==""):o===void 0?[{value:d(0,n)},{type:Zr.date,value:d(n,i)},{value:d(i,u)}].filter(f=>f.value!==""):nf.value!==""):[{value:d(0,o)},{type:Zr.time,value:d(o,s)},{value:d(s,n)},{type:Zr.date,value:d(n,i)},{value:d(i,u)}].filter(f=>f.value!=="")}function VS(e,n){return e.map(i=>{if(i.type===Zr.date){const o=n.getFullYear(),s=n.getMonth(),u=n.getDate(),d=US[n.getDay()],f={...i};return f.value=f.value.replace("yyyy",String(o)).replace("yy",String(o%100)).replace("MMM",BS[s]).replace("MM",$a(s+1,2)).replace("EEE",d).replace("dd",$a(u,2)),f}if(i.type===Zr.time){const o=i.value.indexOf("aaa"),s=n.getHours(),u=o>=0?(s-1)%12+1:s,d=s>=12?"PM":"AM",f=n.getMinutes(),p=n.getSeconds(),y={...i};return y.value=y.value.replace("hh",$a(u,2)).replace("mm",$a(f,2)).replace("ss",$a(p,2)).replace("aaa",d),y}return i})}function OP(e,n,i=!0){if($e(e)||$e(n))return;if(n===0)return 0;const o=e*100/n;return i?cf(o,0,100):o}function qS(e){if($e(e))return;const n=e.filter(Lt);if(n.length!==0)return n}function RP(e){const n=qS(e);if(!$e(n))return Zx(n)}function lo(e,n,i){return lf(n)?e:e.filter(o=>Wx(i(o),n)).sort((o,s)=>zS(i(o),i(s),n))}function Hm(e){if(e<1e3)return 2;const n=new Intl.NumberFormat("default",{notation:"compact"}).formatToParts(e).find(({type:i})=>i==="fraction");return $e(n)||lf(n.value)?0:Number(n.value)>.1?1:0}function IP(e,n){if($e(e))return;const i={};if($e(n))return i.maximumFractionDigits=Hm(e),new Intl.NumberFormat("default",i).format(e);const{currency:o,unit:s,maximumFractionDigits:u,compact:d,separatorHidden:f,language:p}=n;return ps(s)&&(i.unit=s,i.unitDisplay="short"),o&&(i.currencyDisplay="narrowSymbol",i.style="currency"),d&&(i.notation="compact",i.compactDisplay="short"),i.useGrouping=!f,Lt(u)?i.maximumFractionDigits=u:i.maximumFractionDigits=Hm(e),new Intl.NumberFormat(p,i).format(e)}function AP(e,n=$S){if($e(e))return;const i=new Date(e);return Number.isNaN(i.getTime())?void 0:VS(HS(n),i).map(o=>o.value).join("")}const Xl=parseFloat(getComputedStyle(document.documentElement).fontSize),WS=16*Xl,id=.5*Xl,GS={vertical:"bottom",horizontal:"right"};function ZS(e){const n=window.innerWidth/2,i=window.innerHeight/2,o=e.x+e.width/2,s=e.y+e.height/2;return{horizontal:o{if($e(e.current))return;const u=e.current.getBoundingClientRect(),{x:d,y:f,width:p,height:y}=u,w=Xl,C=w,m=window.innerWidth-w,x=window.innerWidth-2*w,E=ZS(u),b=d+p/2,N=cf(Lt(n)?n*Xl:p,WS,x);let P=b-N/2,L=b+N/2;if(Pm){const $=L-m-w;L=m,P-=$}o({content:{bottom:E.vertical==="bottom"?`${window.innerHeight-f+id}px`:"unset",top:E.vertical==="top"?`${f+y+id}px`:"unset",left:E.horizontal==="left"?`${P}px`:"unset",right:E.horizontal==="right"?`${window.innerWidth-L}px`:"unset"},pointer:{left:`${b}px`,top:E.vertical==="top"?`${f+y}px`:`${f-id}px`,right:"unset",bottom:"unset"},width:`${L-P}px`,orientation:E})},[e,n]);return v.useEffect(()=>{s();const u=s,d=s;return window.addEventListener("scroll",u,!0),window.addEventListener("resize",d,!0),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",d,!0)}},[s]),i}const KS="_popup_cws49_1",YS="_top-orientation_cws49_9",XS="_pointer_cws49_15",JS="_icon_cws49_25",Ba={popup:KS,topOrientation:YS,pointer:XS,icon:JS};function c0(e){const{parentRef:n,elementRef:i,children:o,className:s,pointerClassName:u,preferredWidth:d}=e,{content:f,pointer:p,width:y,orientation:w}=QS(n,d);return g.jsxs(FS,{children:[g.jsx("div",{ref:i,style:{...f,width:y},className:Oe(Ba.popup,w.vertical==="bottom"&&Ba.topOrientation,s),children:o}),g.jsx("div",{className:Oe(Ba.pointer,w.vertical==="bottom"&&Ba.topOrientation,u),style:{...p},children:g.jsx("svg",{className:Ba.icon,viewBox:"0 0 200 100",children:g.jsx("path",{d:"M0 100 L100 0 L200 100Z"})})})]})}const eb="_input-error_1sxiz_1",tb="_pointer_1sxiz_14",El={inputError:eb,pointer:tb};function d0(e){const{children:n,className:i,disabled:o}=e,[s,u]=v.useState(!1),d=v.useRef(),f=v.useRef(null);return v.useEffect(()=>{if($e(f.current))return;const{current:{parentElement:p}}=f;$e(p)||(d.current=p,u(!0))},[]),g.jsxs(g.Fragment,{children:[!s&&g.jsx("div",{className:El.tooltipDummy,ref:f}),n&&!o&&g.jsxs(c0,{className:Oe(El.inputError,i),pointerClassName:El.pointer,parentRef:d,children:[g.jsx(CC,{className:El.icon}),n]})]})}const nb="_input-label_3lsx4_1",rb="_disabled_3lsx4_7",ib="_required_3lsx4_11",od={inputLabel:nb,disabled:rb,required:ib};function f0(e){const{children:n,className:i,disabled:o,required:s}=e;return n?g.jsxs("div",{className:Oe(od.inputLabel,o&&od.disabled,i),children:[n,s&&g.jsx("span",{"aria-hidden":!0,className:od.required,children:"*"})]}):null}function h0(e){const{data:n,keySelector:i,renderer:o,rendererParams:s}=e;return $e(n)?null:n.map((u,d)=>{const f=i(u,d),p=s(f,u,d,n);return g.jsx(o,{...p},String(f))})}const ob="_radio_1uudv_1",ab="_icon_1uudv_5",sb="_content_1uudv_10",lb="_description_1uudv_16",ub="_input_1uudv_21",cb="_active_1uudv_37",db="_disabled_1uudv_43",fb="_read-only_1uudv_55",qr={radio:ob,icon:ab,content:sb,description:lb,input:ub,active:cb,disabled:db,readOnly:fb};function hb(e){const{name:n,label:i,description:o,className:s,value:u,inputName:d,onClick:f,disabled:p,readOnly:y,actions:w}=e,C=fr.useCallback(()=>{f&&f(n)},[n,f]),{content:m,containerClassName:x}=ms({icons:u?g.jsx(IC,{className:qr.icon}):g.jsx(NC,{className:qr.icon}),actions:w,childrenContainerClassName:qr.content,children:g.jsxs(g.Fragment,{children:[i,o&&g.jsx("div",{className:qr.description,children:o})]}),spacing:"compact",withoutWrap:!0});return g.jsxs("label",{className:Oe(qr.radio,u&&qr.active,p&&qr.disabled,y&&qr.readOnly,x,s),children:[g.jsx("input",{className:qr.input,type:"radio",name:typeof d=="string"?d:void 0,checked:u,onClick:C,disabled:p,readOnly:!0}),m]})}const pb="_radio-input_17cft_1",mb="_radio-list-container_17cft_6",gb="_disabled_17cft_13",vb="_input-hint_17cft_18",kl={radioInput:pb,radioListContainer:mb,disabled:gb,inputHint:vb};function yb(e){return!!e.clearable}function wb(e){const n=yb(e),{className:i,name:o,options:s,value:u,keySelector:d,labelSelector:f,descriptionSelector:p,label:y,labelContainerClassName:w,hint:C,hintContainerClassName:m,listContainerClassName:x,error:E,renderer:b=hb,rendererParams:N,disabled:P,readOnly:L,required:$,onChange:q,withAsterisk:Z}=e,fe=fr.useCallback(ce=>{L||(n&&e.onChange(ce===u?void 0:ce,o),!n&&Lt(ce)&&q(ce,o))},[u,e,q,n,L,o]),O=fr.useCallback((ce,de)=>{const I={inputName:o,label:f(de),description:p?p(de):void 0,name:ce,onClick:fe,value:ce===u,disabled:P,readOnly:L};return{...N?N(de):void 0,...I}},[o,f,u,fe,N,P,L,p]),K=Z??$;return g.jsxs("div",{className:Oe(kl.radioInput,P&&kl.disabled,i),children:[g.jsx(f0,{className:w,disabled:P,required:K,children:y}),g.jsx("div",{className:Oe(kl.radioListContainer,x),children:g.jsx(h0,{data:s,rendererParams:O,renderer:b,keySelector:d})}),C&&g.jsx("div",{className:Oe(kl.inputHint,m),children:C}),g.jsx(d0,{children:E})]})}const xb="_button_1vbet_1",Cb="_round_1vbet_31",Sb="_primary_1vbet_34",bb="_secondary_1vbet_51",_b="_tertiary_1vbet_69",ad={button:xb,round:Cb,primary:Sb,secondary:bb,tertiary:_b};function hf(e){const{ariaLabel:n,children:i,className:o,variant:s,round:u=!0,...d}=e,f=Oe(ad.button,ad[s],u&&ad.round,o);return g.jsx(uf,{className:f,"aria-label":n,...d,children:i})}var Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eb(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var i=function o(){return this instanceof o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(i,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),i}var kn=function(){return kn=Object.assign||function(e){for(var n,i=1,o=arguments.length;i=0}).sort(n_)},i_=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],Cf=i_.join(","),o_="".concat(Cf,", [data-focus-guard]"),O0=function(e,n){return _r((e.shadowRoot||e).children).reduce(function(i,o){return i.concat(o.matches(n?o_:Cf)?[o]:[],O0(o))},[])},a_=function(e,n){var i;return e instanceof HTMLIFrameElement&&!((i=e.contentDocument)===null||i===void 0)&&i.body?Yo([e.contentDocument.body],n):[e]},Yo=function(e,n){return e.reduce(function(i,o){var s,u=O0(o,n),d=(s=[]).concat.apply(s,u.map(function(f){return a_(f,n)}));return i.concat(d,o.parentNode?_r(o.parentNode.querySelectorAll(Cf)).filter(function(f){return f===o}):[])},[])},s_=function(e){var n=e.querySelectorAll("[".concat(Rb,"]"));return _r(n).map(function(i){return Yo([i])}).reduce(function(i,o){return i.concat(o)},[])},Sf=function(e,n){return _r(e).filter(function(i){return j0(n,i)}).filter(function(i){return Jb(i)})},Zm=function(e,n){return n===void 0&&(n=new Map),_r(e).filter(function(i){return P0(n,i)})},bf=function(e,n,i){return xf(Sf(Yo(e,i),n),!0,i)},rs=function(e,n){return xf(Sf(Yo(e),n),!1)},l_=function(e,n){return Sf(s_(e),n)},ao=function(e,n){return e.shadowRoot?ao(e.shadowRoot,n):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,n)?!0:_r(e.children).some(function(i){var o;if(i instanceof HTMLIFrameElement){var s=(o=i.contentDocument)===null||o===void 0?void 0:o.body;return s?ao(s,n):!1}return ao(i,n)})},u_=function(e){for(var n=new Set,i=e.length,o=0;o0&&n.add(s),(u&Node.DOCUMENT_POSITION_CONTAINS)>0&&n.add(o)}return e.filter(function(d,f){return!n.has(f)})},R0=function(e){return e.parentNode?R0(e.parentNode):e},_f=function(e){var n=uo(e);return n.filter(Boolean).reduce(function(i,o){var s=o.getAttribute(jd);return i.push.apply(i,s?u_(_r(R0(o).querySelectorAll("[".concat(jd,'="').concat(s,'"]:not([').concat(w0,'="disabled"])')))):[o]),i},[])},c_=function(e){try{return e()}catch{return}},is=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var n=e.activeElement;return n.shadowRoot?is(n.shadowRoot):n instanceof HTMLIFrameElement&&c_(function(){return n.contentWindow.document})?is(n.contentWindow.document):n}},d_=function(e,n){return e===n},f_=function(e,n){return!!_r(e.querySelectorAll("iframe")).some(function(i){return d_(i,n)})},I0=function(e,n){return n===void 0&&(n=is(k0(e).ownerDocument)),!n||n.dataset&&n.dataset.focusGuard?!1:_f(e).some(function(i){return ao(i,n)||f_(i,n)})},h_=function(e){e===void 0&&(e=document);var n=is(e);return n?_r(e.querySelectorAll("[".concat(Ob,"]"))).some(function(i){return ao(i,n)}):!1},p_=function(e,n){return n.filter(D0).filter(function(i){return i.name===e.name}).filter(function(i){return i.checked})[0]||e},Ef=function(e,n){return D0(e)&&e.name?p_(e,n):e},m_=function(e){var n=new Set;return e.forEach(function(i){return n.add(Ef(i,e))}),e.filter(function(i){return n.has(i)})},Qm=function(e){return e[0]&&e.length>1?Ef(e[0],e):e[0]},Km=function(e,n){return e.indexOf(Ef(n,e))},Ld="NEW_FOCUS",g_=function(e,n,i,o,s){var u=e.length,d=e[0],f=e[u-1],p=wf(o);if(!(o&&e.indexOf(o)>=0)){var y=o!==void 0?i.indexOf(o):-1,w=s?i.indexOf(s):y,C=s?e.indexOf(s):-1;if(y===-1)return C!==-1?C:Ld;if(C===-1)return Ld;var m=y-w,x=i.indexOf(d),E=i.indexOf(f),b=m_(i),N=o!==void 0?b.indexOf(o):-1,P=N-(s?b.indexOf(s):y);if(!m&&C>=0||n.length===0)return C;var L=Km(e,n[0]),$=Km(e,n[n.length-1]);if(y<=x&&p&&Math.abs(m)>1)return $;if(y>=E&&p&&Math.abs(m)>1)return L;if(m&&Math.abs(P)>1)return C;if(y<=x)return $;if(y>E)return L;if(m)return Math.abs(m)>1?C:(u+C+m)%u}},v_=function(e){return function(n){var i,o=(i=M0(n))===null||i===void 0?void 0:i.autofocus;return n.autofocus||o!==void 0&&o!=="false"||e.indexOf(n)>=0}},Ym=function(e,n,i){var o=e.map(function(u){var d=u.node;return d}),s=Zm(o.filter(v_(i)));return s&&s.length?Qm(s):Qm(Zm(n))},Dd=function(e,n){return n===void 0&&(n=[]),n.push(e),e.parentNode&&Dd(e.parentNode.host||e.parentNode,n),n},fd=function(e,n){for(var i=Dd(e),o=Dd(n),s=0;s=0)return u}return!1},A0=function(e,n,i){var o=uo(e),s=uo(n),u=o[0],d=!1;return s.filter(Boolean).forEach(function(f){d=fd(d||f,f)||d,i.filter(Boolean).forEach(function(p){var y=fd(u,p);y&&(!d||ao(y,d)?d=y:d=fd(y,d))})}),d},Xm=function(e,n){return e.reduce(function(i,o){return i.concat(l_(o,n))},[])},y_=function(e,n){var i=new Map;return n.forEach(function(o){return i.set(o.node,o)}),e.map(function(o){return i.get(o)}).filter(t_)},w_=function(e,n){var i=is(uo(e).length>0?document:k0(e).ownerDocument),o=_f(e).filter(Md),s=A0(i||e,e,o),u=new Map,d=rs(o,u),f=d.filter(function(E){var b=E.node;return Md(b)});if(f[0]){var p=rs([s],u).map(function(E){var b=E.node;return b}),y=y_(p,f),w=y.map(function(E){var b=E.node;return b}),C=y.filter(function(E){var b=E.tabIndex;return b>=0}).map(function(E){var b=E.node;return b}),m=g_(w,C,p,i,n);if(m===Ld){var x=Ym(d,C,Xm(o,u))||Ym(d,w,Xm(o,u));if(x)return{node:x};console.warn("focus-lock: cannot find any node to move focus into");return}return m===void 0?m:y[m]}},x_=function(e){var n=_f(e).filter(Md),i=A0(e,e,n),o=xf(Yo([i],!0),!0,!0),s=Yo(n,!1);return o.map(function(u){var d=u.node,f=u.index;return{node:d,index:f,lockItem:s.indexOf(d)>=0,guard:wf(d)}})},kf=function(e,n){e&&("focus"in e&&e.focus(n),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},hd=0,pd=!1,F0=function(e,n,i){i===void 0&&(i={});var o=w_(e,n);if(!pd&&o){if(hd>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),pd=!0,setTimeout(function(){pd=!1},1);return}hd++,kf(o.node,i.focusOptions),hd--}};function Ua(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var n=e?new WeakRef(e):null;return function(){return n?.deref()||null}}var C_=function(e){if(!e)return null;for(var n=[],i=e;i&&i!==document.body;)n.push({current:Ua(i),parent:Ua(i.parentElement),left:Ua(i.previousElementSibling),right:Ua(i.nextElementSibling)}),i=i.parentElement;return{element:Ua(e),stack:n,ownerDocument:e.ownerDocument}},S_=function(e){var n,i,o,s,u;if(e)for(var d=e.stack,f=e.ownerDocument,p=new Map,y=0,w=d;y-1&&(b.filter(function(P){var L=P.guard,$=P.node;return L&&$.dataset.focusAutoGuard}).forEach(function(P){var L=P.node;return L.removeAttribute("tabIndex")}),eg(N,b.length,1,b),eg(N,-1,-1,b))}}}return e},V0=function(e){tu()&&e&&(e.stopPropagation(),e.preventDefault())},Tf=function(){return yf(tu)},$_=function(e){var n=e.target,i=e.currentTarget;i.contains(n)||D_(i,n)},z_=function(){return null},q0=function(){Nf=!0},W0=function(){Nf=!1,os="just",yf(function(){os="meanwhile"})},B_=function(){document.addEventListener("focusin",V0),document.addEventListener("focusout",Tf),window.addEventListener("focus",q0),window.addEventListener("blur",W0)},U_=function(){document.removeEventListener("focusin",V0),document.removeEventListener("focusout",Tf),window.removeEventListener("focus",q0),window.removeEventListener("blur",W0)};function H_(e){return e.filter(function(n){var i=n.disabled;return!i})}var G0={moveFocusInside:F0,focusInside:I0,focusNextElement:k_,focusPrevElement:N_,focusFirstElement:T_,focusLastElement:j_,captureFocusRestore:$0};function V_(e){var n=e.slice(-1)[0];n&&!Go&&B_();var i=Go,o=i&&n&&n.id===i.id;Go=n,i&&!o&&(i.onDeactivation(),e.filter(function(s){var u=s.id;return u===i.id}).length||i.returnFocus(!n)),n?(Rn=null,(!o||i.observed!==n.observed)&&n.onActivation(G0),tu(),yf(tu)):(U_(),Rn=null)}x0.assignSyncMedium($_);C0.assignMedium(Tf);Ab.assignMedium(function(e){return e(G0)});const q_=Gb(H_,V_)(z_);gf(S0,q_);var W_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=W_();return n&&e.setAttribute("nonce",n),e}function Z_(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Q_(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var K_=function(){var e=0,n=null;return{add:function(i){e==0&&(n=G_())&&(Z_(n,i),Q_(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Y_=function(){var e=K_();return function(n,i){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&i])}},jf=function(){var e=Y_(),n=function(i){var o=i.styles,s=i.dynamic;return e(o,s),null};return n},X_={left:0,top:0,right:0,gap:0},md=function(e){return parseInt(e||"",10)||0},J_=function(e){var n=window.getComputedStyle(document.body),i=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],s=n[e==="padding"?"paddingRight":"marginRight"];return[md(i),md(o),md(s)]},eE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return X_;var n=J_(e),i=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-i+n[2]-n[0])}},tE=jf(),Qo="data-scroll-locked",nE=function(e,n,i,o){var s=e.left,u=e.top,d=e.right,f=e.gap;return i===void 0&&(i="margin"),` + */function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&(i[s]=e[s]);return i}function fx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hx(e,n){return e.button===0&&(!n||n==="_self")&&!fx(e)}function Td(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,i)=>{let o=e[i];return n.concat(Array.isArray(o)?o.map(s=>[i,s]):[[i,o]])},[]))}function px(e,n){let i=Td(e);return n&&n.forEach((o,s)=>{i.has(s)||n.getAll(s).forEach(u=>{i.append(s,u)})}),i}const mx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gx="6";try{window.__reactRouterVersion=gx}catch{}function vx(e,n){return Ew({basename:n?.basename,future:ts({},n?.future,{v7_prependBasename:!0}),history:Q1({window:n?.window}),hydrationData:n?.hydrationData||yx(),routes:e,mapRouteProperties:cx,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window}).initialize()}function yx(){var e;let n=(e=window)==null?void 0:e.__staticRouterHydrationData;return n&&n.errors&&(n=ts({},n,{errors:wx(n.errors)})),n}function wx(e){if(!e)return null;let n=Object.entries(e),i={};for(let[o,s]of n)if(s&&s.__type==="RouteErrorResponse")i[o]=new Kl(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let u=window[s.__subType];if(typeof u=="function")try{let d=new u(s.message);d.stack="",i[o]=d}catch{}}if(i[o]==null){let u=new Error(s.message);u.stack="",i[o]=u}}else i[o]=s;return i}const xx=v.createContext({isTransitioning:!1}),Cx=v.createContext(new Map),Sx="startTransition",Rm=$1[Sx],bx="flushSync",Im=Z1[bx];function _x(e){Rm?Rm(e):e()}function Fa(e){Im?Im(e):e()}class Ex{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=o=>{this.status==="pending"&&(this.status="resolved",n(o))},this.reject=o=>{this.status==="pending"&&(this.status="rejected",i(o))}})}}function kx(e){let{fallbackElement:n,router:i,future:o}=e,[s,u]=v.useState(i.state),[d,f]=v.useState(),[p,y]=v.useState({isTransitioning:!1}),[w,C]=v.useState(),[m,x]=v.useState(),[N,b]=v.useState(),E=v.useRef(new Map),{v7_startTransition:P}=o||{},L=v.useCallback(K=>{P?_x(K):K()},[P]),$=v.useCallback((K,ce)=>{let{deletedFetchers:fe,flushSync:I,viewTransitionOpts:U}=ce;K.fetchers.forEach((ne,he)=>{ne.data!==void 0&&E.current.set(he,ne.data)}),fe.forEach(ne=>E.current.delete(ne));let W=i.window==null||i.window.document==null||typeof i.window.document.startViewTransition!="function";if(!U||W){I?Fa(()=>u(K)):L(()=>u(K));return}if(I){Fa(()=>{m&&(w&&w.resolve(),m.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:U.currentLocation,nextLocation:U.nextLocation})});let ne=i.window.document.startViewTransition(()=>{Fa(()=>u(K))});ne.finished.finally(()=>{Fa(()=>{C(void 0),x(void 0),f(void 0),y({isTransitioning:!1})})}),Fa(()=>x(ne));return}m?(w&&w.resolve(),m.skipTransition(),b({state:K,currentLocation:U.currentLocation,nextLocation:U.nextLocation})):(f(K),y({isTransitioning:!0,flushSync:!1,currentLocation:U.currentLocation,nextLocation:U.nextLocation}))},[i.window,m,w,E,L]);v.useLayoutEffect(()=>i.subscribe($),[i,$]),v.useEffect(()=>{p.isTransitioning&&!p.flushSync&&C(new Ex)},[p]),v.useEffect(()=>{if(w&&d&&i.window){let K=d,ce=w.promise,fe=i.window.document.startViewTransition(async()=>{L(()=>u(K)),await ce});fe.finished.finally(()=>{C(void 0),x(void 0),f(void 0),y({isTransitioning:!1})}),x(fe)}},[L,d,w,i.window]),v.useEffect(()=>{w&&d&&s.location.key===d.location.key&&w.resolve()},[w,m,s.location,d]),v.useEffect(()=>{!p.isTransitioning&&N&&(f(N.state),y({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}),b(void 0))},[p.isTransitioning,N]),v.useEffect(()=>{},[]);let H=v.useMemo(()=>({createHref:i.createHref,encodeLocation:i.encodeLocation,go:K=>i.navigate(K),push:(K,ce,fe)=>i.navigate(K,{state:ce,preventScrollReset:fe?.preventScrollReset}),replace:(K,ce,fe)=>i.navigate(K,{replace:!0,state:ce,preventScrollReset:fe?.preventScrollReset})}),[i]),Z=i.basename||"/",de=v.useMemo(()=>({router:i,navigator:H,static:!1,basename:Z}),[i,H,Z]),O=v.useMemo(()=>({v7_relativeSplatPath:i.future.v7_relativeSplatPath}),[i.future.v7_relativeSplatPath]);return v.useEffect(()=>sx(o,i.future),[o,i.future]),v.createElement(v.Fragment,null,v.createElement(cu.Provider,{value:de},v.createElement(Xg.Provider,{value:s},v.createElement(Cx.Provider,{value:E.current},v.createElement(xx.Provider,{value:p},v.createElement(ux,{basename:Z,location:s.location,navigationType:s.historyAction,navigator:H,future:O},s.initialized||i.future.v7_partialHydration?v.createElement(Nx,{routes:i.routes,future:i.future,state:s}):n))))),null)}const Nx=v.memo(Tx);function Tx(e){let{routes:n,future:i,state:o}=e;return Qw(n,void 0,o,i)}const jx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Px=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mx=v.forwardRef(function(n,i){let{onClick:o,relative:s,reloadDocument:u,replace:d,state:f,target:p,to:y,preventScrollReset:w,viewTransition:C}=n,m=dx(n,mx),{basename:x}=v.useContext(fo),N,b=!1;if(typeof y=="string"&&Px.test(y)&&(N=y,jx))try{let $=new URL(window.location.href),H=y.startsWith("//")?new URL($.protocol+y):new URL(y),Z=na(H.pathname,x);H.origin===$.origin&&Z!=null?y=Z+H.search+H.hash:b=!0}catch{}let E=qw(y,{relative:s}),P=Lx(y,{replace:d,state:f,target:p,preventScrollReset:w,relative:s,viewTransition:C});function L($){o&&o($),$.defaultPrevented||P($)}return v.createElement("a",ts({},m,{href:N||E,onClick:b||u?o:L,ref:i,target:p}))});var Am;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Am||(Am={}));var Fm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Fm||(Fm={}));function Lx(e,n){let{target:i,replace:o,state:s,preventScrollReset:u,relative:d,viewTransition:f}=n===void 0?{}:n,p=hs(),y=ra(),w=t0(e,{relative:d});return v.useCallback(C=>{if(hx(C,i)){C.preventDefault();let m=o!==void 0?o:so(y)===so(w);p(e,{replace:m,state:s,preventScrollReset:u,relative:d,viewTransition:f})}},[y,p,w,o,s,i,e,u,d,f])}function Dx(e){let n=v.useRef(Td(e)),i=v.useRef(!1),o=ra(),s=v.useMemo(()=>px(o.search,i.current?null:n.current),[o.search]),u=hs(),d=v.useCallback((f,p)=>{const y=Td(typeof f=="function"?f(s):f);i.current=!0,u("?"+y,p)},[u,s]);return[s,d]}function Ox(e){return typeof e=="number"?Number.isNaN(e):!1}function $e(e){return e==null||Ox(e)}function Lt(e){return!$e(e)}function Rx(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return $e(e)||e===!1||n.includes(e)}function lf(e){return Rx(e,[""])}function ps(e){return!lf(e)}const Ix=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];Ix.reduce((e,n)=>({...e,[`[object ${n}]`]:n.toLowerCase()}),{});const Ax={sorting:void 0,setSorting:e=>{console.warn("Trying to set to ",e)}},TP=v.createContext(Ax),Fx=v.createContext({alerts:[],addAlert:()=>{console.warn("AlertContext::addAlert called before it was initialized")},removeAlert:()=>{console.warn("AlertContext::removeAlert called before it was initialized")},updateAlert:()=>{console.warn("AlertContext::updateAlert called before it was initialized")}}),jP=v.createContext({setShowDropdown:()=>{console.warn("DropdownMenuContext::setShowDropdown called without a provider")}}),o0=v.createContext({currentLanguage:"en",setCurrentLanguage:()=>{console.warn("LanguageContext::setCurrentLanguage called without a provider")},languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{console.warn("LanguageContext::setLanguageNamespaceStatus called without a provider")},strings:{},setStrings:()=>{console.warn("LanguageContext::setStrings called without a provider")},registerNamespace:()=>{console.warn("LanguageContext::registerNamespace called without a provider")}});v.createContext({variant:"primary"});function $x(e){return typeof e=="number"?Number.isNaN(e):!1}function zx(e){return e==null||$x(e)}function Bx(e,n){if(zx(e))return;const i={},o=[];return e.forEach(s=>{const u=n?n(s):JSON.stringify(s);i[u]||(i[u]=!0,o.push(s))}),e.length===o.length?e:o}const Ux=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];Ux.reduce((e,n)=>({...e,[`[object ${n}]`]:n.toLowerCase()}),{});function Oe(){for(var e=arguments.length,n=new Array(e),i=0;i{d&&d(u,C)},[d,u]);return g.jsx("button",{ref:s,name:typeof u=="string"?u:void 0,type:p,className:Oe($m.rawButton,f&&$m.focused,i),disabled:o,onClick:d?w:void 0,...y,children:n})}function $a(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";if($e(e))return"";const o=String(e);return o.length>=n?o:Array(n-o.length+1).join(i)+o}function qx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i="";const o=n?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"abcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;sn+i,0)}function cf(e,n,i){const o=Math.min(n,i),s=Math.max(n,i);return Math.max(o,Math.min(s,e))}function Sr(e){const[n]=v.useState(()=>`_${qx()}`),{spacing:i,variant:o="md",mode:s="gap",inner:u}=e;return v.useEffect(()=>{const d=["var(--go-ui-spacing-4xs)","var(--go-ui-spacing-3xs)","var(--go-ui-spacing-2xs)","var(--go-ui-spacing-xs)","var(--go-ui-spacing-sm)","var(--go-ui-spacing-md)","var(--go-ui-spacing-lg)","var(--go-ui-spacing-xl)","var(--go-ui-spacing-2xl)","var(--go-ui-spacing-3xl)","var(--go-ui-spacing-4xl)"];let f="0";if(i!=="none"){const w={condensed:-3,compact:-2,cozy:-1,default:0,comfortable:1,relaxed:2,loose:3},C={xs:3,sm:4,md:5,lg:6,xl:7},m=u?C[o]-1:C[o],x=w[i];f=d[cf(m+x,0,d.length-1)]}if($e(i))return;const p=document.createElement("style");if(document.head.appendChild(p),!p.sheet){p.remove();return}let y;return s==="gap"||s==="grid-gap"?y=`gap: ${f};`:s==="padding-h"?y=`padding-left: ${f}; padding-right: ${f};`:s==="padding-v"&&(y=`padding-top: ${f}; padding-bottom: ${f};`),p.sheet.insertRule(`.${n} { ${y} }`),()=>{p.remove()}},[i,o,s,u,n]),n}const Qx="_basic-layout_v9jro_1",Kx="_with-wrap_v9jro_5",Yx="_icons-container_v9jro_9",Xx="_children-container_v9jro_14",Jx="_actions-container_v9jro_19",za={basicLayout:Qx,withWrap:Kx,iconsContainer:Yx,childrenContainer:Xx,actionsContainer:Jx};function ms(e){const{className:n,icons:i,children:o,actions:s,iconsContainerClassName:u,childrenContainerClassName:d,actionsContainerClassName:f,withoutWrap:p,spacing:y="default",variant:w="md"}=e,C=Sr({spacing:y,variant:w,mode:"gap"}),m=Sr({spacing:y,variant:w,mode:"gap",inner:!0}),x=Oe(za.basicLayout,!p&&za.withWrap,C,n),N=$e(i)&&$e(o)&&$e(s)?null:g.jsxs(g.Fragment,{children:[i&&g.jsx("div",{className:Oe(za.iconsContainer,m,u),children:i}),g.jsx("div",{className:Oe(za.childrenContainer,m,d),children:o}),s&&g.jsx("div",{className:Oe(za.actionsContainer,m,f),children:s})]});return{containerClassName:x,content:N}}const eC="_button_18a84_1",tC="_ellipsized_18a84_29",nC="_children_18a84_32",rC="_overflow-wrapper_18a84_36",iC="_primary_18a84_44",oC="_secondary_18a84_45",aC="_no-spacing_18a84_50",sC="_condensed-spacing_18a84_54",lC="_compact-spacing_18a84_58",uC="_cozy-spacing_18a84_62",cC="_default-spacing_18a84_66",dC="_comfortable-spacing_18a84_70",fC="_relaxed-spacing_18a84_74",hC="_loose-spacing_18a84_78",pC="_disabled_18a84_88",mC="_tertiary_18a84_116",gC="_tertiary-on-dark_18a84_130",vC="_dropdown-item_18a84_144",Vt={button:eC,ellipsized:tC,children:nC,overflowWrapper:rC,primary:iC,secondary:oC,noSpacing:aC,condensedSpacing:sC,compactSpacing:lC,cozySpacing:uC,defaultSpacing:cC,comfortableSpacing:dC,relaxedSpacing:fC,looseSpacing:hC,disabled:pC,tertiary:mC,tertiaryOnDark:gC,dropdownItem:vC},yC={primary:Vt.primary,secondary:Vt.secondary,tertiary:Vt.tertiary,"tertiary-on-dark":Vt.tertiaryOnDark,"dropdown-item":Vt.dropdownItem},wC={none:Vt.noSpacing,condensed:Vt.condensedSpacing,compact:Vt.compactSpacing,cozy:Vt.cozySpacing,default:Vt.defaultSpacing,comfortable:Vt.comfortableSpacing,relaxed:Vt.relaxedSpacing,loose:Vt.looseSpacing};function xC(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,disabled:d,icons:f,iconsContainerClassName:p,variant:y="primary",spacing:w="default",ellipsize:C}=e,m=Oe(Vt.button,yC[y],wC[w],d&&Vt.disabled,C&&Vt.ellipsized,u),x=v.useMemo(()=>C?g.jsx("div",{className:Vt.overflowWrapper,children:o}):o,[C,o]),{content:N,containerClassName:b}=ms({className:m,icons:f,children:x,actions:n,iconsContainerClassName:p,childrenContainerClassName:Oe(Vt.children,s),actionsContainerClassName:i,spacing:w,withoutWrap:!0,variant:"xs"});return{className:b,children:N,disabled:d}}function Ue(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,disabled:d,icons:f,iconsContainerClassName:p,name:y,onClick:w,variant:C,type:m="button",spacing:x,...N}=e,b=v.useCallback((P,L)=>{w&&w(P,L)},[w]),E=xC({variant:C,className:u,actionsContainerClassName:i,iconsContainerClassName:p,childrenContainerClassName:s,children:o,icons:f,actions:n,spacing:x,disabled:d||m!=="submit"&&$e(w)});return g.jsx(uf,{name:y,type:m,onClick:b,...N,...E})}const CC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#alert-line_svg__a)"},v.createElement("path",{d:"m12.866 3 9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0Zm-8.66 16h15.588L12 5.5 4.206 19ZM11 16h2v2h-2v-2Zm0-7h2v5h-2V9Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"alert-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),a0=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56","aria-hidden":"true",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#analysis_svg__a)"},v.createElement("path",{d:"m12.384 37.796-7.179 7.18a4.115 4.115 0 0 0 5.82 5.819l7.179-7.18a24.009 24.009 0 0 1-5.82-5.819Zm13.619-13.798h-4a1.003 1.003 0 0 0-1 1v4.94a12.572 12.572 0 0 0 6 5.518V24.998a1.003 1.003 0 0 0-1-1Zm15.998-6h-4a1.003 1.003 0 0 0-1 1v16.458a12.572 12.572 0 0 0 6-5.519V18.998a1.003 1.003 0 0 0-1-1Zm-7.999 3h-4a1.003 1.003 0 0 0-1 1v14.138c1.972.48 4.029.48 6 0V21.998a1.003 1.003 0 0 0-1-1Z"}),v.createElement("path",{d:"M32.002 4a19.998 19.998 0 1 0 0 39.995 19.998 19.998 0 0 0 0-39.995Zm10.999 30.177a14.998 14.998 0 1 1-21.998-20.394 14.998 14.998 0 0 1 21.998 20.394Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"analysis_svg__a"},v.createElement("path",{d:"M0 0h56v56H0z"})))),SC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#arrow-down-small-fill_svg__a)"},v.createElement("path",{d:"m12 16-6-6h12l-6 6Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"arrow-down-small-fill_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),bC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#arrow-right-line_svg__a)"},v.createElement("path",{d:"m16.172 11-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2h12.172Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"arrow-right-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),_C=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#arrow-up-small-fill_svg__a)"},v.createElement("path",{d:"m12 8 6 6H6l6-6Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"arrow-up-small-fill_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),EC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#check-double-fill_svg__a)"},v.createElement("path",{d:"m11.602 13.76 1.412 1.412 8.466-8.466 1.414 1.414-9.88 9.88-6.364-6.364 1.414-1.414 2.125 2.125 1.413 1.412Zm.002-2.829 4.952-4.952 1.41 1.41-4.952 4.952-1.41-1.41Zm-2.827 5.656L7.364 18 1 11.636l1.414-1.414 1.413 1.412-.001.002 4.951 4.95Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"check-double-fill_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),kC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#check-line_svg__a)"},v.createElement("path",{d:"m10 15.171 9.192-9.192 1.415 1.414L10 18l-6.364-6.364 1.414-1.414 4.95 4.95Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"check-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),NC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#checkbox-blank-circle-line_svg__a)"},v.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"checkbox-blank-circle-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),TC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#checkbox-blank-line_svg__a)"},v.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"checkbox-blank-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),jC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#checkbox-line_svg__a)"},v.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm6.003 11L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"checkbox-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),PC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#chevron-left-line_svg__a)"},v.createElement("path",{d:"M11.05 12 16 7.05l-1.413-1.414L8.223 12l6.364 6.364L16 16.95 11.05 12Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"chevron-left-line_svg__a"},v.createElement("path",{d:"M0 24h24V0H0z"})))),MC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#chevron-right-line_svg__a)"},v.createElement("path",{d:"m13.172 12-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414 4.95-4.95Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"chevron-right-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),LC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("path",{fillRule:"evenodd",d:"m13.057 11.996 4.716-4.716a.75.75 0 1 0-1.06-1.06l-4.717 4.716L7.28 6.22a.75.75 0 1 0-1.06 1.06l4.716 4.716-4.716 4.716a.75.75 0 1 0 1.06 1.06l4.716-4.715 4.716 4.716a.748.748 0 0 0 1.061 0 .75.75 0 0 0 0-1.061l-4.716-4.716Z",clipRule:"evenodd"})),df=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#delete-bin-line_svg__a)"},v.createElement("path",{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3Zm1 2H6v12h12V8Zm-9 3h2v6H9v-6Zm4 0h2v6h-2v-6ZM9 4v2h6V4H9Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"delete-bin-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),DC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("path",{d:"M17.949 6.651a1.834 1.834 0 1 0-1.833 1.834c1.01 0 1.833-.822 1.833-1.834Zm-7.806 15.847a1.836 1.836 0 0 0-1.833 1.834c0 1.01.822 1.832 1.833 1.832a1.835 1.835 0 0 0 1.833-1.832 1.836 1.836 0 0 0-1.833-1.834Zm5.973-10.343a2.506 2.506 0 1 0 .001 5.012 2.506 2.506 0 0 0-.001-5.012Zm5.973 10.343a1.834 1.834 0 1 0 1.833 1.834 1.836 1.836 0 0 0-1.833-1.834Z"}),v.createElement("path",{fillRule:"evenodd",d:"M0 16C0 7.163 7.164 0 16 0c8.837 0 16 7.163 16 16 0 8.836-7.164 16-16 16S0 24.836 0 16Zm22.089 11.044a2.716 2.716 0 0 1-2.713-2.713c0-.828.375-1.57.962-2.068l-2.589-4.324a3.643 3.643 0 0 1-3.266 0l-2.589 4.324a2.7 2.7 0 0 1 .962 2.068 2.716 2.716 0 0 1-2.713 2.713A2.716 2.716 0 0 1 7.43 24.33a2.716 2.716 0 0 1 2.713-2.713c.352 0 .688.07.997.192l2.606-4.354a3.664 3.664 0 0 1 1.93-6.43v-1.7a2.714 2.714 0 0 1-2.273-2.674 2.716 2.716 0 0 1 2.714-2.713 2.716 2.716 0 0 1 2.712 2.713 2.714 2.714 0 0 1-2.272 2.674v1.7a3.664 3.664 0 0 1 3.226 3.636 3.651 3.651 0 0 1-1.297 2.794l2.607 4.354c.31-.122.645-.192.997-.192a2.716 2.716 0 0 1 2.712 2.713 2.716 2.716 0 0 1-2.713 2.713ZM4.497 14.677c0-1.958 1.228-3.59 3.282-3.59 1.497 0 2.754.798 2.936 2.342H9.544c-.114-.901-.901-1.363-1.765-1.363-1.47 0-2.083 1.295-2.083 2.61 0 1.316.613 2.61 2.083 2.61 1.227.02 1.899-.719 1.919-1.88H7.875v-.912h2.917v3.609h-.768l-.182-.806c-.643.73-1.227.969-2.062.969-2.055 0-3.283-1.632-3.283-3.59Z",clipRule:"evenodd"})),OC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#menu-line_svg__a)"},v.createElement("path",{d:"M3 4h18v2H3V4Zm0 7h18v2H3v-2Zm0 7h18v2H3v-2Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"menu-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),RC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#question-line_svg__a)"},v.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm-1-5h2v2h-2v-2Zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1 1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.5 3.5 0 1 1 13 13.355Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"question-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),IC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#radio-button-line_svg__a)"},v.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm0-3a5 5 0 1 1 0-10 5 5 0 0 1 0 10Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"radio-button-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),AC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#search-line_svg__a)"},v.createElement("path",{d:"m18.031 16.617 4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.868-3.133-7-7-7-3.868 0-7 3.132-7 7 0 3.867 3.132 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"search-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),FC=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 25 25",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("path",{d:"M8.775 9.71a2.284 2.284 0 0 0-2.2 1.66H4.623a.623.623 0 0 0 0 1.247h1.952a2.284 2.284 0 0 0 4.401 0h8.804a.623.623 0 0 0 0-1.246h-8.804a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.076 1.038 1.038 0 0 1 0 2.076ZM15.627 4a2.284 2.284 0 0 0-2.2 1.661H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 1 0 0-1.246h-1.952A2.284 2.284 0 0 0 15.628 4Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Zm0 8.098a2.284 2.284 0 0 0-2.2 1.66H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 0 0 0-1.245h-1.952a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Z"})),s0=({title:e,titleId:n,...i})=>v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?v.createElement("title",{id:n},e):null,v.createElement("g",{clipPath:"url(#upload-cloud-line_svg__a)"},v.createElement("path",{d:"M1 14.5a6.496 6.496 0 0 1 3.064-5.519 8.001 8.001 0 0 1 15.872 0 6.5 6.5 0 0 1-2.936 12l-10 .02c-3.356-.275-6-3.079-6-6.5Zm15.848 4.487a4.5 4.5 0 0 0 2.03-8.309l-.807-.503-.12-.942a6 6 0 0 0-11.903 0l-.12.942-.805.503a4.5 4.5 0 0 0 2.029 8.31l.173.012h9.35l.173-.013ZM13 13v4h-2v-4H8l4-5 4 5h-3Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"upload-cloud-line_svg__a"},v.createElement("path",{d:"M0 0h24v24H0z"})))),$C="_spinner_50bgg_1",zC="_spinner-bounce_50bgg_9",_l={spinner:$C,spinnerBounce:zC};function Wo(e){const{className:n}=e;return g.jsxs("div",{className:Oe(_l.spinner,n),children:[g.jsx("div",{className:_l.spinnerBounce}),g.jsx("div",{className:_l.spinnerBounce}),g.jsx("div",{className:_l.spinnerBounce})]})}const BC="_message_176iw_1",UC="_icon_176iw_13",HC="_spinner_176iw_17",VC="_title_176iw_22",qC="_errored_176iw_27",WC="_compact_176iw_33",Ci={message:BC,icon:UC,spinner:HC,title:VC,errored:qC,compact:WC};function GC(e){const{className:n,pending:i=!1,variant:o,icon:s,title:u,description:d,actions:f,compact:p=!1,errored:y,erroredTitle:w,erroredDescription:C}=e,m=Lt(y?w:u),x=Lt(y?C:d);return g.jsxs("div",{className:Oe(Ci.message,o==="error"&&Ci.errored,p&&Ci.compact,n),children:[(s||i)&&g.jsxs("div",{className:Ci.icon,children:[i&&g.jsx(Wo,{className:Ci.spinner}),!i&&s]}),m&&g.jsx("div",{className:Ci.title,children:y?w:u}),x&&g.jsx("div",{className:Ci.description,children:d}),f&&g.jsx("div",{className:Ci.actions,children:f})]})}function l0(e){const{strings:n,registerNamespace:i}=v.useContext(o0);return v.useEffect(()=>{i(e.namespace,e.strings)},[i,e]),n[e.namespace]??e.strings}const ZC="common",QC={messageTitleFetching:"Fetching data...",messageTitleFilteredDataNotAvailable:"Data is not available for selected filter!",messageTitleDataNotAvailable:"Data is not available!",messageTitleDataFailedToFetch:"Failed to fetch data!"},KC={namespace:ZC,strings:QC},YC="_default-message_wu986_1",XC="_overlay_wu986_2",zm={defaultMessage:YC,overlay:XC};function u0(e){const{className:n,compact:i,pending:o,overlayPending:s,filtered:u,empty:d,errored:f,emptyMessage:p,filteredEmptyMessage:y,pendingMessage:w,errorMessage:C}=e,m=l0(KC),x=v.useMemo(()=>o?w??m.messageTitleFetching:f?C??m.messageTitleDataFailedToFetch:u?y??m.messageTitleFilteredDataNotAvailable:d?p??m.messageTitleDataNotAvailable:null,[d,o,u,f,p,y,w,C,m]);return!d&&!o&&!f?null:g.jsx(GC,{className:Oe(zm.defaultMessage,o&&s&&zm.overlay,n),icon:g.jsx(a0,{}),compact:i,title:x,pending:o})}const JC="_filter-bar_16xsj_1",eS="_grid-with-actions_16xsj_6",tS="_grid_16xsj_6",nS="_actions_16xsj_15",Qa={filterBar:JC,gridWithActions:eS,grid:tS,actions:nS};function Bm(e){const{grid:n,actions:i,spacing:o="default"}=e,s=Sr({spacing:o,mode:"gap"}),u=Sr({spacing:o,mode:"gap",inner:!0}),d=Sr({spacing:o,mode:"grid-gap"});return $e(n)&&$e(i)?null:g.jsxs("div",{className:Oe(Qa.gridWithActions,s),children:[g.jsx("div",{className:Oe(Qa.grid,d),children:n}),Lt(i)&&g.jsx("div",{className:Oe(Qa.actions,u),children:i})]})}function rS(e){const{className:n,filters:i,filterActions:o,search:s,searchActions:u,filterPreview:d,spacing:f}=e;return $e(i)&&$e(o)&&$e(s)&&$e(u)&&$e(d)?null:g.jsxs("div",{className:Oe(Qa.filterBar,n),children:[g.jsx(Bm,{grid:i,actions:o,spacing:f}),g.jsx(Bm,{grid:s,actions:u,spacing:f}),Lt(d)&&g.jsx("div",{className:Qa.filterPreview,children:d})]})}function iS(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,icons:d,iconsContainerClassName:f,spacing:p,withoutWrap:y}=e,{content:w,containerClassName:C}=ms({actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,icons:d,iconsContainerClassName:f,spacing:p,withoutWrap:y});return g.jsx("div",{className:C,children:w})}function oS(e,n,i){const[o,s]=v.useState(()=>e);return v.useEffect(()=>{const u=setTimeout(()=>{s(e)},300);return()=>{clearTimeout(u)}},[e,n,i]),o}function aS(e,n=!1){const[i,o]=v.useState(()=>{var s;const u=(s=e.current)==null?void 0:s.getBoundingClientRect();return{width:u?.width??0,height:u?.height??0}});return v.useEffect(()=>{const s=new ResizeObserver(d=>{const f=d.at(0),p=f?.contentRect;p&&o({width:p.width,height:p.height})}),u=e.current;return!n&&Lt(u)&&s.observe(u),()=>{!n&&Lt(u)&&s.unobserve(u)}},[n,e]),oS(i)}const sS="_heading_1uxwj_1",lS="_level-one_1uxwj_9",uS="_level-two_1uxwj_17",cS="_level-three_1uxwj_25",dS="_level-four_1uxwj_33",fS="_level-five_1uxwj_37",hS="_level-six_1uxwj_41",pS="_ellipsized-text_1uxwj_45",mS="_ellipsized_1uxwj_45",Gr={heading:sS,levelOne:lS,levelTwo:uS,levelThree:cS,levelFour:dS,levelFive:fS,levelSix:hS,ellipsizedText:pS,ellipsized:mS},gS={1:Gr.levelOne,2:Gr.levelTwo,3:Gr.levelThree,4:Gr.levelFour,5:Gr.levelFive,6:Gr.levelSix};function ro(e){const{className:n,level:i=3,children:o,ellipsize:s}=e,u=`h${i}`,d=v.useRef(null),f=aS(d);return o?g.jsxs(u,{className:Oe(Gr.heading,s&&Gr.ellipsized,gS[i],n),ref:d,children:[s&&g.jsx("div",{className:Gr.ellipsizedText,style:{width:`${f.width}px`},title:typeof o=="string"?o:void 0,children:o}),!s&&o]}):null}const vS="_header_537v1_1",yS={header:vS};function wS(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,elementRef:d,ellipsizeHeading:f,heading:p,headingClassName:y,headingLevel:w,headingDescription:C,headingDescriptionContainerClassName:m,icons:x,iconsContainerClassName:N,headingSectionClassName:b,headingContainerClassName:E,wrapHeadingContent:P=!1,spacing:L="default"}=e,$=v.useMemo(()=>$e(p)&&$e(C)?null:g.jsxs(g.Fragment,{children:[g.jsx(ro,{level:w,className:y,ellipsize:f,children:p}),C&&g.jsx("div",{className:m,children:C})]}),[p,f,C,y,m,w]),{content:H,containerClassName:Z}=ms({actions:n,actionsContainerClassName:i,children:$,childrenContainerClassName:E,className:b,icons:x,iconsContainerClassName:N,withoutWrap:!P,spacing:L,variant:"sm"}),de=Sr({spacing:L,inner:!0});return!H&&!o?null:g.jsxs("div",{className:Oe(yS.header,de,u),ref:d,children:[H&&g.jsx("div",{className:Z,children:H}),o&&g.jsx("div",{className:s,children:o})]})}const xS="_container_lyve2_1",CS="_header_lyve2_8",SS="_centered-header-description-container_lyve2_11",bS="_centered-description_lyve2_16",_S="_with-border-and-header-background_lyve2_23",ES="_border_lyve2_33",kS="_content_lyve2_39",NS="_pending-overlaid_lyve2_42",TS="_message_lyve2_47",jS="_footer_lyve2_53",PS="_with-grid-view_lyve2_57",MS="_two-columns_lyve2_67",LS="_three-columns_lyve2_82",DS="_four-columns_lyve2_96",OS="_five-columns_lyve2_100",RS="_with-vertical-view_lyve2_105",IS="_with-overflow-in-content_lyve2_112",Ht={container:xS,header:CS,centeredHeaderDescriptionContainer:SS,centeredDescription:bS,withBorderAndHeaderBackground:_S,border:ES,content:kS,pendingOverlaid:NS,message:TS,footer:jS,withGridView:PS,twoColumns:MS,threeColumns:LS,fourColumns:DS,fiveColumns:OS,withVerticalView:RS,withOverflowInContent:IS},AS={2:Ht.twoColumns,3:Ht.threeColumns,4:Ht.fourColumns,5:Ht.fiveColumns};function dr(e){const{actions:n,actionsContainerClassName:i,children:o,childrenContainerClassName:s,className:u,containerRef:d,contentViewType:f="default",ellipsizeHeading:p,filters:y,filterActions:w,footerActions:C,footerActionsContainerClassName:m,footerClassName:x,footerContent:N,footerContentClassName:b,footerIcons:E,headerClassName:P,headerDescription:L,withCenteredHeaderDescription:$,headerDescriptionContainerClassName:H,headerElementRef:Z,heading:de,headingClassName:O,headingContainerClassName:K,headingDescription:ce,headingDescriptionContainerClassName:fe,headingLevel:I,headingSectionClassName:U,icons:W,iconsContainerClassName:ne,numPreferredGridContentColumns:he=2,spacing:Ce="default",withHeaderBorder:_e=!1,withFooterBorder:G=!1,withBorderAndHeaderBackground:ue=!1,withOverflowInContent:T=!1,withInternalPadding:V=!1,withoutWrapInHeading:oe=!1,withoutWrapInFooter:Se=!1,pending:se=!1,overlayPending:re=!1,empty:ee=!1,errored:Q=!1,filtered:Y=!1,compactMessage:et=!1,errorMessage:tn,emptyMessage:Wt,pendingMessage:ot,filteredEmptyMessage:bt}=e,st=E||N||C,wt=de||n||W||L||ce,ft=Sr({spacing:Ce}),ht=Sr({spacing:Ce,mode:"padding-h"}),xt=Sr({spacing:Ce,mode:"padding-v"}),nn=Sr({spacing:Ce,mode:"gap",inner:!0}),Tn=v.useMemo(()=>$e(L)?null:$?g.jsx("div",{className:Ht.centeredDescription,children:L}):L,[L,$]);return!wt&&!y&&!o&&!st&&!ee&&!se&&!Q&&!Y?null:g.jsxs("div",{ref:d,className:Oe(Ht.container,!ue&&ft,V&&xt,T&&Ht.withOverflowInContent,ue&&Ht.withBorderAndHeaderBackground,f==="grid"&&Ht.withGridView,f==="grid"&&AS[he],f==="vertical"&&Ht.withVerticalView,u),children:[wt&&g.jsx(wS,{actions:n,className:Oe(Ht.header,ue&&xt,(V||ue)&&ht,P),elementRef:Z,actionsContainerClassName:i,ellipsizeHeading:p,heading:de,headingLevel:I,icons:W,iconsContainerClassName:ne,childrenContainerClassName:Oe($&&Ht.centeredHeaderDescriptionContainer,H),headingSectionClassName:U,headingClassName:O,headingContainerClassName:K,wrapHeadingContent:!oe,headingDescription:ce,headingDescriptionContainerClassName:fe,spacing:Ce,children:Tn}),_e&&g.jsx("div",{className:Ht.border}),g.jsx(rS,{filters:y,filterActions:w,spacing:Ce,className:Oe(V&&ht)}),(o||ee||se||Q||Y)&&g.jsxs("div",{className:Oe(Ht.content,f!=="default"&&nn,(V||ue)&&ht,ue&&xt,re&&se&&Ht.pendingOverlaid,s),children:[g.jsx(u0,{className:Ht.message,pending:se,filtered:Y,errored:Q,empty:ee,compact:et,overlayPending:re,emptyMessage:Wt,filteredEmptyMessage:bt,pendingMessage:ot,errorMessage:tn}),!ee&&!Q&&(!se||re)&&o]}),st&&G&&g.jsx("div",{className:Ht.border}),st&&g.jsx(iS,{actions:C,icons:E,childrenContainerClassName:b,className:Oe(Ht.footer,V&&ht,ue&&xt,x),actionsContainerClassName:m,spacing:Ce,withoutWrap:Se,children:N})]})}function FS(e){const{children:n,container:i=document.body,portalKey:o}=e;return g.jsx(g.Fragment,{children:ef.createPortal(n,i,o)})}const $S="yyyy-MM-dd",PP="-",MP=108;function Ka(e,n,i){return $e(e)?void 0:e.reduce((o,s,u)=>{const d=n(s,u);return o[d]=i?i(s,d,u,o):s,o},{})}function ff(e,n){return function(i,o){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const u=Lt(i)?e(i):void 0,d=Lt(o)?e(o):void 0;return u===d?0:$e(u)?s*1:$e(d)?s*-1:s*n(u,d)}}const LP=ff(e=>e,(e,n)=>e.localeCompare(n)),DP=ff(e=>e,(e,n)=>e-n),zS=(e,n,i,o)=>i?ff(s=>s,(s,u)=>{const d=i.toLowerCase(),f=s.toLowerCase().indexOf(d),p=u.toLowerCase().indexOf(d);return f===p||f===-1&&p===-1?s.localeCompare(u):p===-1?-1:f===-1?1:f-p})(e,n,o):0,BS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],US=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var Zr=function(e){return e.time="time",e.date="date",e}(Zr||{});function Um(e,n){let i,o;return n.forEach(s=>{const u=e.indexOf(s);if(u===-1)return;const d=u+s.length;(i===void 0||uo)&&(o=d)}),{start:i,end:o}}function HS(e){const{start:n,end:i}=Um(e,["yyyy","yy","MMM","MM","dd","EEE"]),{start:o,end:s}=Um(e,["hh","mm","ss","aaa"]),u=e.length,d=(f,p)=>f===void 0||p===void 0?"":e.substring(f,p);return n===void 0&&o===void 0?[{value:e}].filter(f=>f.value!==""):n===void 0?[{value:d(0,o)},{type:Zr.time,value:d(o,s)},{value:d(s,u)}].filter(f=>f.value!==""):o===void 0?[{value:d(0,n)},{type:Zr.date,value:d(n,i)},{value:d(i,u)}].filter(f=>f.value!==""):nf.value!==""):[{value:d(0,o)},{type:Zr.time,value:d(o,s)},{value:d(s,n)},{type:Zr.date,value:d(n,i)},{value:d(i,u)}].filter(f=>f.value!=="")}function VS(e,n){return e.map(i=>{if(i.type===Zr.date){const o=n.getFullYear(),s=n.getMonth(),u=n.getDate(),d=US[n.getDay()],f={...i};return f.value=f.value.replace("yyyy",String(o)).replace("yy",String(o%100)).replace("MMM",BS[s]).replace("MM",$a(s+1,2)).replace("EEE",d).replace("dd",$a(u,2)),f}if(i.type===Zr.time){const o=i.value.indexOf("aaa"),s=n.getHours(),u=o>=0?(s-1)%12+1:s,d=s>=12?"PM":"AM",f=n.getMinutes(),p=n.getSeconds(),y={...i};return y.value=y.value.replace("hh",$a(u,2)).replace("mm",$a(f,2)).replace("ss",$a(p,2)).replace("aaa",d),y}return i})}function OP(e,n,i=!0){if($e(e)||$e(n))return;if(n===0)return 0;const o=e*100/n;return i?cf(o,0,100):o}function qS(e){if($e(e))return;const n=e.filter(Lt);if(n.length!==0)return n}function RP(e){const n=qS(e);if(!$e(n))return Zx(n)}function lo(e,n,i){return lf(n)?e:e.filter(o=>Wx(i(o),n)).sort((o,s)=>zS(i(o),i(s),n))}function Hm(e){if(e<1e3)return 2;const n=new Intl.NumberFormat("default",{notation:"compact"}).formatToParts(e).find(({type:i})=>i==="fraction");return $e(n)||lf(n.value)?0:Number(n.value)>.1?1:0}function IP(e,n){if($e(e))return;const i={};if($e(n))return i.maximumFractionDigits=Hm(e),new Intl.NumberFormat("default",i).format(e);const{currency:o,unit:s,maximumFractionDigits:u,compact:d,separatorHidden:f,language:p}=n;return ps(s)&&(i.unit=s,i.unitDisplay="short"),o&&(i.currencyDisplay="narrowSymbol",i.style="currency"),d&&(i.notation="compact",i.compactDisplay="short"),i.useGrouping=!f,Lt(u)?i.maximumFractionDigits=u:i.maximumFractionDigits=Hm(e),new Intl.NumberFormat(p,i).format(e)}function AP(e,n=$S){if($e(e))return;const i=new Date(e);return Number.isNaN(i.getTime())?void 0:VS(HS(n),i).map(o=>o.value).join("")}const Xl=parseFloat(getComputedStyle(document.documentElement).fontSize),WS=16*Xl,id=.5*Xl,GS={vertical:"bottom",horizontal:"right"};function ZS(e){const n=window.innerWidth/2,i=window.innerHeight/2,o=e.x+e.width/2,s=e.y+e.height/2;return{horizontal:o{if($e(e.current))return;const u=e.current.getBoundingClientRect(),{x:d,y:f,width:p,height:y}=u,w=Xl,C=w,m=window.innerWidth-w,x=window.innerWidth-2*w,N=ZS(u),b=d+p/2,E=cf(Lt(n)?n*Xl:p,WS,x);let P=b-E/2,L=b+E/2;if(Pm){const $=L-m-w;L=m,P-=$}o({content:{bottom:N.vertical==="bottom"?`${window.innerHeight-f+id}px`:"unset",top:N.vertical==="top"?`${f+y+id}px`:"unset",left:N.horizontal==="left"?`${P}px`:"unset",right:N.horizontal==="right"?`${window.innerWidth-L}px`:"unset"},pointer:{left:`${b}px`,top:N.vertical==="top"?`${f+y}px`:`${f-id}px`,right:"unset",bottom:"unset"},width:`${L-P}px`,orientation:N})},[e,n]);return v.useEffect(()=>{s();const u=s,d=s;return window.addEventListener("scroll",u,!0),window.addEventListener("resize",d,!0),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",d,!0)}},[s]),i}const KS="_popup_cws49_1",YS="_top-orientation_cws49_9",XS="_pointer_cws49_15",JS="_icon_cws49_25",Ba={popup:KS,topOrientation:YS,pointer:XS,icon:JS};function c0(e){const{parentRef:n,elementRef:i,children:o,className:s,pointerClassName:u,preferredWidth:d}=e,{content:f,pointer:p,width:y,orientation:w}=QS(n,d);return g.jsxs(FS,{children:[g.jsx("div",{ref:i,style:{...f,width:y},className:Oe(Ba.popup,w.vertical==="bottom"&&Ba.topOrientation,s),children:o}),g.jsx("div",{className:Oe(Ba.pointer,w.vertical==="bottom"&&Ba.topOrientation,u),style:{...p},children:g.jsx("svg",{className:Ba.icon,viewBox:"0 0 200 100",children:g.jsx("path",{d:"M0 100 L100 0 L200 100Z"})})})]})}const eb="_input-error_1sxiz_1",tb="_pointer_1sxiz_14",El={inputError:eb,pointer:tb};function d0(e){const{children:n,className:i,disabled:o}=e,[s,u]=v.useState(!1),d=v.useRef(),f=v.useRef(null);return v.useEffect(()=>{if($e(f.current))return;const{current:{parentElement:p}}=f;$e(p)||(d.current=p,u(!0))},[]),g.jsxs(g.Fragment,{children:[!s&&g.jsx("div",{className:El.tooltipDummy,ref:f}),n&&!o&&g.jsxs(c0,{className:Oe(El.inputError,i),pointerClassName:El.pointer,parentRef:d,children:[g.jsx(CC,{className:El.icon}),n]})]})}const nb="_input-label_3lsx4_1",rb="_disabled_3lsx4_7",ib="_required_3lsx4_11",od={inputLabel:nb,disabled:rb,required:ib};function f0(e){const{children:n,className:i,disabled:o,required:s}=e;return n?g.jsxs("div",{className:Oe(od.inputLabel,o&&od.disabled,i),children:[n,s&&g.jsx("span",{"aria-hidden":!0,className:od.required,children:"*"})]}):null}function h0(e){const{data:n,keySelector:i,renderer:o,rendererParams:s}=e;return $e(n)?null:n.map((u,d)=>{const f=i(u,d),p=s(f,u,d,n);return g.jsx(o,{...p},String(f))})}const ob="_radio_1uudv_1",ab="_icon_1uudv_5",sb="_content_1uudv_10",lb="_description_1uudv_16",ub="_input_1uudv_21",cb="_active_1uudv_37",db="_disabled_1uudv_43",fb="_read-only_1uudv_55",qr={radio:ob,icon:ab,content:sb,description:lb,input:ub,active:cb,disabled:db,readOnly:fb};function hb(e){const{name:n,label:i,description:o,className:s,value:u,inputName:d,onClick:f,disabled:p,readOnly:y,actions:w}=e,C=fr.useCallback(()=>{f&&f(n)},[n,f]),{content:m,containerClassName:x}=ms({icons:u?g.jsx(IC,{className:qr.icon}):g.jsx(NC,{className:qr.icon}),actions:w,childrenContainerClassName:qr.content,children:g.jsxs(g.Fragment,{children:[i,o&&g.jsx("div",{className:qr.description,children:o})]}),spacing:"compact",withoutWrap:!0});return g.jsxs("label",{className:Oe(qr.radio,u&&qr.active,p&&qr.disabled,y&&qr.readOnly,x,s),children:[g.jsx("input",{className:qr.input,type:"radio",name:typeof d=="string"?d:void 0,checked:u,onClick:C,disabled:p,readOnly:!0}),m]})}const pb="_radio-input_17cft_1",mb="_radio-list-container_17cft_6",gb="_disabled_17cft_13",vb="_input-hint_17cft_18",kl={radioInput:pb,radioListContainer:mb,disabled:gb,inputHint:vb};function yb(e){return!!e.clearable}function wb(e){const n=yb(e),{className:i,name:o,options:s,value:u,keySelector:d,labelSelector:f,descriptionSelector:p,label:y,labelContainerClassName:w,hint:C,hintContainerClassName:m,listContainerClassName:x,error:N,renderer:b=hb,rendererParams:E,disabled:P,readOnly:L,required:$,onChange:H,withAsterisk:Z}=e,de=fr.useCallback(ce=>{L||(n&&e.onChange(ce===u?void 0:ce,o),!n&&Lt(ce)&&H(ce,o))},[u,e,H,n,L,o]),O=fr.useCallback((ce,fe)=>{const I={inputName:o,label:f(fe),description:p?p(fe):void 0,name:ce,onClick:de,value:ce===u,disabled:P,readOnly:L};return{...E?E(fe):void 0,...I}},[o,f,u,de,E,P,L,p]),K=Z??$;return g.jsxs("div",{className:Oe(kl.radioInput,P&&kl.disabled,i),children:[g.jsx(f0,{className:w,disabled:P,required:K,children:y}),g.jsx("div",{className:Oe(kl.radioListContainer,x),children:g.jsx(h0,{data:s,rendererParams:O,renderer:b,keySelector:d})}),C&&g.jsx("div",{className:Oe(kl.inputHint,m),children:C}),g.jsx(d0,{children:N})]})}const xb="_button_1vbet_1",Cb="_round_1vbet_31",Sb="_primary_1vbet_34",bb="_secondary_1vbet_51",_b="_tertiary_1vbet_69",ad={button:xb,round:Cb,primary:Sb,secondary:bb,tertiary:_b};function hf(e){const{ariaLabel:n,children:i,className:o,variant:s,round:u=!0,...d}=e,f=Oe(ad.button,ad[s],u&&ad.round,o);return g.jsx(uf,{className:f,"aria-label":n,...d,children:i})}var Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eb(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var i=function o(){return this instanceof o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(i,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),i}var kn=function(){return kn=Object.assign||function(e){for(var n,i=1,o=arguments.length;i=0}).sort(n_)},i_=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],Cf=i_.join(","),o_="".concat(Cf,", [data-focus-guard]"),O0=function(e,n){return _r((e.shadowRoot||e).children).reduce(function(i,o){return i.concat(o.matches(n?o_:Cf)?[o]:[],O0(o))},[])},a_=function(e,n){var i;return e instanceof HTMLIFrameElement&&!((i=e.contentDocument)===null||i===void 0)&&i.body?Yo([e.contentDocument.body],n):[e]},Yo=function(e,n){return e.reduce(function(i,o){var s,u=O0(o,n),d=(s=[]).concat.apply(s,u.map(function(f){return a_(f,n)}));return i.concat(d,o.parentNode?_r(o.parentNode.querySelectorAll(Cf)).filter(function(f){return f===o}):[])},[])},s_=function(e){var n=e.querySelectorAll("[".concat(Rb,"]"));return _r(n).map(function(i){return Yo([i])}).reduce(function(i,o){return i.concat(o)},[])},Sf=function(e,n){return _r(e).filter(function(i){return j0(n,i)}).filter(function(i){return Jb(i)})},Zm=function(e,n){return n===void 0&&(n=new Map),_r(e).filter(function(i){return P0(n,i)})},bf=function(e,n,i){return xf(Sf(Yo(e,i),n),!0,i)},rs=function(e,n){return xf(Sf(Yo(e),n),!1)},l_=function(e,n){return Sf(s_(e),n)},ao=function(e,n){return e.shadowRoot?ao(e.shadowRoot,n):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,n)?!0:_r(e.children).some(function(i){var o;if(i instanceof HTMLIFrameElement){var s=(o=i.contentDocument)===null||o===void 0?void 0:o.body;return s?ao(s,n):!1}return ao(i,n)})},u_=function(e){for(var n=new Set,i=e.length,o=0;o0&&n.add(s),(u&Node.DOCUMENT_POSITION_CONTAINS)>0&&n.add(o)}return e.filter(function(d,f){return!n.has(f)})},R0=function(e){return e.parentNode?R0(e.parentNode):e},_f=function(e){var n=uo(e);return n.filter(Boolean).reduce(function(i,o){var s=o.getAttribute(jd);return i.push.apply(i,s?u_(_r(R0(o).querySelectorAll("[".concat(jd,'="').concat(s,'"]:not([').concat(w0,'="disabled"])')))):[o]),i},[])},c_=function(e){try{return e()}catch{return}},is=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var n=e.activeElement;return n.shadowRoot?is(n.shadowRoot):n instanceof HTMLIFrameElement&&c_(function(){return n.contentWindow.document})?is(n.contentWindow.document):n}},d_=function(e,n){return e===n},f_=function(e,n){return!!_r(e.querySelectorAll("iframe")).some(function(i){return d_(i,n)})},I0=function(e,n){return n===void 0&&(n=is(k0(e).ownerDocument)),!n||n.dataset&&n.dataset.focusGuard?!1:_f(e).some(function(i){return ao(i,n)||f_(i,n)})},h_=function(e){e===void 0&&(e=document);var n=is(e);return n?_r(e.querySelectorAll("[".concat(Ob,"]"))).some(function(i){return ao(i,n)}):!1},p_=function(e,n){return n.filter(D0).filter(function(i){return i.name===e.name}).filter(function(i){return i.checked})[0]||e},Ef=function(e,n){return D0(e)&&e.name?p_(e,n):e},m_=function(e){var n=new Set;return e.forEach(function(i){return n.add(Ef(i,e))}),e.filter(function(i){return n.has(i)})},Qm=function(e){return e[0]&&e.length>1?Ef(e[0],e):e[0]},Km=function(e,n){return e.indexOf(Ef(n,e))},Ld="NEW_FOCUS",g_=function(e,n,i,o,s){var u=e.length,d=e[0],f=e[u-1],p=wf(o);if(!(o&&e.indexOf(o)>=0)){var y=o!==void 0?i.indexOf(o):-1,w=s?i.indexOf(s):y,C=s?e.indexOf(s):-1;if(y===-1)return C!==-1?C:Ld;if(C===-1)return Ld;var m=y-w,x=i.indexOf(d),N=i.indexOf(f),b=m_(i),E=o!==void 0?b.indexOf(o):-1,P=E-(s?b.indexOf(s):y);if(!m&&C>=0||n.length===0)return C;var L=Km(e,n[0]),$=Km(e,n[n.length-1]);if(y<=x&&p&&Math.abs(m)>1)return $;if(y>=N&&p&&Math.abs(m)>1)return L;if(m&&Math.abs(P)>1)return C;if(y<=x)return $;if(y>N)return L;if(m)return Math.abs(m)>1?C:(u+C+m)%u}},v_=function(e){return function(n){var i,o=(i=M0(n))===null||i===void 0?void 0:i.autofocus;return n.autofocus||o!==void 0&&o!=="false"||e.indexOf(n)>=0}},Ym=function(e,n,i){var o=e.map(function(u){var d=u.node;return d}),s=Zm(o.filter(v_(i)));return s&&s.length?Qm(s):Qm(Zm(n))},Dd=function(e,n){return n===void 0&&(n=[]),n.push(e),e.parentNode&&Dd(e.parentNode.host||e.parentNode,n),n},fd=function(e,n){for(var i=Dd(e),o=Dd(n),s=0;s=0)return u}return!1},A0=function(e,n,i){var o=uo(e),s=uo(n),u=o[0],d=!1;return s.filter(Boolean).forEach(function(f){d=fd(d||f,f)||d,i.filter(Boolean).forEach(function(p){var y=fd(u,p);y&&(!d||ao(y,d)?d=y:d=fd(y,d))})}),d},Xm=function(e,n){return e.reduce(function(i,o){return i.concat(l_(o,n))},[])},y_=function(e,n){var i=new Map;return n.forEach(function(o){return i.set(o.node,o)}),e.map(function(o){return i.get(o)}).filter(t_)},w_=function(e,n){var i=is(uo(e).length>0?document:k0(e).ownerDocument),o=_f(e).filter(Md),s=A0(i||e,e,o),u=new Map,d=rs(o,u),f=d.filter(function(N){var b=N.node;return Md(b)});if(f[0]){var p=rs([s],u).map(function(N){var b=N.node;return b}),y=y_(p,f),w=y.map(function(N){var b=N.node;return b}),C=y.filter(function(N){var b=N.tabIndex;return b>=0}).map(function(N){var b=N.node;return b}),m=g_(w,C,p,i,n);if(m===Ld){var x=Ym(d,C,Xm(o,u))||Ym(d,w,Xm(o,u));if(x)return{node:x};console.warn("focus-lock: cannot find any node to move focus into");return}return m===void 0?m:y[m]}},x_=function(e){var n=_f(e).filter(Md),i=A0(e,e,n),o=xf(Yo([i],!0),!0,!0),s=Yo(n,!1);return o.map(function(u){var d=u.node,f=u.index;return{node:d,index:f,lockItem:s.indexOf(d)>=0,guard:wf(d)}})},kf=function(e,n){e&&("focus"in e&&e.focus(n),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},hd=0,pd=!1,F0=function(e,n,i){i===void 0&&(i={});var o=w_(e,n);if(!pd&&o){if(hd>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),pd=!0,setTimeout(function(){pd=!1},1);return}hd++,kf(o.node,i.focusOptions),hd--}};function Ua(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var n=e?new WeakRef(e):null;return function(){return n?.deref()||null}}var C_=function(e){if(!e)return null;for(var n=[],i=e;i&&i!==document.body;)n.push({current:Ua(i),parent:Ua(i.parentElement),left:Ua(i.previousElementSibling),right:Ua(i.nextElementSibling)}),i=i.parentElement;return{element:Ua(e),stack:n,ownerDocument:e.ownerDocument}},S_=function(e){var n,i,o,s,u;if(e)for(var d=e.stack,f=e.ownerDocument,p=new Map,y=0,w=d;y-1&&(b.filter(function(P){var L=P.guard,$=P.node;return L&&$.dataset.focusAutoGuard}).forEach(function(P){var L=P.node;return L.removeAttribute("tabIndex")}),eg(E,b.length,1,b),eg(E,-1,-1,b))}}}return e},V0=function(e){tu()&&e&&(e.stopPropagation(),e.preventDefault())},Tf=function(){return yf(tu)},$_=function(e){var n=e.target,i=e.currentTarget;i.contains(n)||D_(i,n)},z_=function(){return null},q0=function(){Nf=!0},W0=function(){Nf=!1,os="just",yf(function(){os="meanwhile"})},B_=function(){document.addEventListener("focusin",V0),document.addEventListener("focusout",Tf),window.addEventListener("focus",q0),window.addEventListener("blur",W0)},U_=function(){document.removeEventListener("focusin",V0),document.removeEventListener("focusout",Tf),window.removeEventListener("focus",q0),window.removeEventListener("blur",W0)};function H_(e){return e.filter(function(n){var i=n.disabled;return!i})}var G0={moveFocusInside:F0,focusInside:I0,focusNextElement:k_,focusPrevElement:N_,focusFirstElement:T_,focusLastElement:j_,captureFocusRestore:$0};function V_(e){var n=e.slice(-1)[0];n&&!Go&&B_();var i=Go,o=i&&n&&n.id===i.id;Go=n,i&&!o&&(i.onDeactivation(),e.filter(function(s){var u=s.id;return u===i.id}).length||i.returnFocus(!n)),n?(Rn=null,(!o||i.observed!==n.observed)&&n.onActivation(G0),tu(),yf(tu)):(U_(),Rn=null)}x0.assignSyncMedium($_);C0.assignMedium(Tf);Ab.assignMedium(function(e){return e(G0)});const q_=Gb(H_,V_)(z_);gf(S0,q_);var W_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=W_();return n&&e.setAttribute("nonce",n),e}function Z_(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Q_(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var K_=function(){var e=0,n=null;return{add:function(i){e==0&&(n=G_())&&(Z_(n,i),Q_(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Y_=function(){var e=K_();return function(n,i){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&i])}},jf=function(){var e=Y_(),n=function(i){var o=i.styles,s=i.dynamic;return e(o,s),null};return n},X_={left:0,top:0,right:0,gap:0},md=function(e){return parseInt(e||"",10)||0},J_=function(e){var n=window.getComputedStyle(document.body),i=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],s=n[e==="padding"?"paddingRight":"marginRight"];return[md(i),md(o),md(s)]},eE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return X_;var n=J_(e),i=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-i+n[2]-n[0])}},tE=jf(),Qo="data-scroll-locked",nE=function(e,n,i,o){var s=e.left,u=e.top,d=e.right,f=e.gap;return i===void 0&&(i="margin"),` .`.concat(Tb,` { overflow: hidden `).concat(o,`; padding-right: `).concat(f,"px ").concat(o,`; @@ -103,23 +103,23 @@ Error generating stack: `+h.message+` body[`).concat(Qo,`] { `).concat(jb,": ").concat(f,`px; } -`)},tg=function(){var e=parseInt(document.body.getAttribute(Qo)||"0",10);return isFinite(e)?e:0},rE=function(){v.useEffect(function(){return document.body.setAttribute(Qo,(tg()+1).toString()),function(){var e=tg()-1;e<=0?document.body.removeAttribute(Qo):document.body.setAttribute(Qo,e.toString())}},[])},iE=function(e){var n=e.noRelative,i=e.noImportant,o=e.gapMode,s=o===void 0?"margin":o;rE();var u=v.useMemo(function(){return eE(s)},[s]);return v.createElement(tE,{styles:nE(u,!n,s,i?"":"!important")})},Od=!1;if(typeof window<"u")try{var Nl=Object.defineProperty({},"passive",{get:function(){return Od=!0,!0}});window.addEventListener("test",Nl,Nl),window.removeEventListener("test",Nl,Nl)}catch{Od=!1}var zo=Od?{passive:!1}:!1,oE=function(e){return e.tagName==="TEXTAREA"},Z0=function(e,n){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[n]!=="hidden"&&!(i.overflowY===i.overflowX&&!oE(e)&&i[n]==="visible")},aE=function(e){return Z0(e,"overflowY")},sE=function(e){return Z0(e,"overflowX")},ng=function(e,n){var i=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=Q0(e,o);if(s){var u=K0(e,o),d=u[1],f=u[2];if(d>f)return!0}o=o.parentNode}while(o&&o!==i.body);return!1},lE=function(e){var n=e.scrollTop,i=e.scrollHeight,o=e.clientHeight;return[n,i,o]},uE=function(e){var n=e.scrollLeft,i=e.scrollWidth,o=e.clientWidth;return[n,i,o]},Q0=function(e,n){return e==="v"?aE(n):sE(n)},K0=function(e,n){return e==="v"?lE(n):uE(n)},cE=function(e,n){return e==="h"&&n==="rtl"?-1:1},dE=function(e,n,i,o,s){var u=cE(e,window.getComputedStyle(n).direction),d=u*o,f=i.target,p=n.contains(f),y=!1,w=d>0,C=0,m=0;do{var x=K0(e,f),E=x[0],b=x[1],N=x[2],P=b-N-u*E;(E||P)&&Q0(e,f)&&(C+=P,m+=E),f instanceof ShadowRoot?f=f.host:f=f.parentNode}while(!p&&f!==document.body||p&&(n.contains(f)||n===f));return(w&&Math.abs(C)<1||!w&&Math.abs(m)<1)&&(y=!0),y},Tl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rg=function(e){return[e.deltaX,e.deltaY]},ig=function(e){return e&&"current"in e?e.current:e},fE=function(e,n){return e[0]===n[0]&&e[1]===n[1]},hE=function(e){return` +`)},tg=function(){var e=parseInt(document.body.getAttribute(Qo)||"0",10);return isFinite(e)?e:0},rE=function(){v.useEffect(function(){return document.body.setAttribute(Qo,(tg()+1).toString()),function(){var e=tg()-1;e<=0?document.body.removeAttribute(Qo):document.body.setAttribute(Qo,e.toString())}},[])},iE=function(e){var n=e.noRelative,i=e.noImportant,o=e.gapMode,s=o===void 0?"margin":o;rE();var u=v.useMemo(function(){return eE(s)},[s]);return v.createElement(tE,{styles:nE(u,!n,s,i?"":"!important")})},Od=!1;if(typeof window<"u")try{var Nl=Object.defineProperty({},"passive",{get:function(){return Od=!0,!0}});window.addEventListener("test",Nl,Nl),window.removeEventListener("test",Nl,Nl)}catch{Od=!1}var zo=Od?{passive:!1}:!1,oE=function(e){return e.tagName==="TEXTAREA"},Z0=function(e,n){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[n]!=="hidden"&&!(i.overflowY===i.overflowX&&!oE(e)&&i[n]==="visible")},aE=function(e){return Z0(e,"overflowY")},sE=function(e){return Z0(e,"overflowX")},ng=function(e,n){var i=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=Q0(e,o);if(s){var u=K0(e,o),d=u[1],f=u[2];if(d>f)return!0}o=o.parentNode}while(o&&o!==i.body);return!1},lE=function(e){var n=e.scrollTop,i=e.scrollHeight,o=e.clientHeight;return[n,i,o]},uE=function(e){var n=e.scrollLeft,i=e.scrollWidth,o=e.clientWidth;return[n,i,o]},Q0=function(e,n){return e==="v"?aE(n):sE(n)},K0=function(e,n){return e==="v"?lE(n):uE(n)},cE=function(e,n){return e==="h"&&n==="rtl"?-1:1},dE=function(e,n,i,o,s){var u=cE(e,window.getComputedStyle(n).direction),d=u*o,f=i.target,p=n.contains(f),y=!1,w=d>0,C=0,m=0;do{var x=K0(e,f),N=x[0],b=x[1],E=x[2],P=b-E-u*N;(N||P)&&Q0(e,f)&&(C+=P,m+=N),f instanceof ShadowRoot?f=f.host:f=f.parentNode}while(!p&&f!==document.body||p&&(n.contains(f)||n===f));return(w&&Math.abs(C)<1||!w&&Math.abs(m)<1)&&(y=!0),y},Tl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rg=function(e){return[e.deltaX,e.deltaY]},ig=function(e){return e&&"current"in e?e.current:e},fE=function(e,n){return e[0]===n[0]&&e[1]===n[1]},hE=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},pE=0,Bo=[];function mE(e){var n=v.useRef([]),i=v.useRef([0,0]),o=v.useRef(),s=v.useState(pE++)[0],u=v.useState(jf)[0],d=v.useRef(e);v.useEffect(function(){d.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var b=Nb([e.lockRef.current],(e.shards||[]).map(ig)).filter(Boolean);return b.forEach(function(N){return N.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),b.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(b,N){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!d.current.allowPinchZoom;var P=Tl(b),L=i.current,$="deltaX"in b?b.deltaX:L[0]-P[0],q="deltaY"in b?b.deltaY:L[1]-P[1],Z,fe=b.target,O=Math.abs($)>Math.abs(q)?"h":"v";if("touches"in b&&O==="h"&&fe.type==="range")return!1;var K=ng(O,fe);if(!K)return!0;if(K?Z=O:(Z=O==="v"?"h":"v",K=ng(O,fe)),!K)return!1;if(!o.current&&"changedTouches"in b&&($||q)&&(o.current=Z),!Z)return!0;var ce=o.current||Z;return dE(ce,N,b,ce==="h"?$:q)},[]),p=v.useCallback(function(b){var N=b;if(!(!Bo.length||Bo[Bo.length-1]!==u)){var P="deltaY"in N?rg(N):Tl(N),L=n.current.filter(function(Z){return Z.name===N.type&&(Z.target===N.target||N.target===Z.shadowParent)&&fE(Z.delta,P)})[0];if(L&&L.should){N.cancelable&&N.preventDefault();return}if(!L){var $=(d.current.shards||[]).map(ig).filter(Boolean).filter(function(Z){return Z.contains(N.target)}),q=$.length>0?f(N,$[0]):!d.current.noIsolation;q&&N.cancelable&&N.preventDefault()}}},[]),y=v.useCallback(function(b,N,P,L){var $={name:b,delta:N,target:P,should:L,shadowParent:gE(P)};n.current.push($),setTimeout(function(){n.current=n.current.filter(function(q){return q!==$})},1)},[]),w=v.useCallback(function(b){i.current=Tl(b),o.current=void 0},[]),C=v.useCallback(function(b){y(b.type,rg(b),b.target,f(b,e.lockRef.current))},[]),m=v.useCallback(function(b){y(b.type,Tl(b),b.target,f(b,e.lockRef.current))},[]);v.useEffect(function(){return Bo.push(u),e.setCallbacks({onScrollCapture:C,onWheelCapture:C,onTouchMoveCapture:m}),document.addEventListener("wheel",p,zo),document.addEventListener("touchmove",p,zo),document.addEventListener("touchstart",w,zo),function(){Bo=Bo.filter(function(b){return b!==u}),document.removeEventListener("wheel",p,zo),document.removeEventListener("touchmove",p,zo),document.removeEventListener("touchstart",w,zo)}},[]);var x=e.removeScrollBar,E=e.inert;return v.createElement(v.Fragment,null,E?v.createElement(u,{styles:hE(s)}):null,x?v.createElement(iE,{gapMode:e.gapMode}):null)}function gE(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}gf(y0,mE);var vE=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Uo=new WeakMap,jl=new WeakMap,Pl={},gd=0,Y0=function(e){return e&&(e.host||Y0(e.parentNode))},yE=function(e,n){return n.map(function(i){if(e.contains(i))return i;var o=Y0(i);return o&&e.contains(o)?o:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},wE=function(e,n,i,o){var s=yE(n,Array.isArray(e)?e:[e]);Pl[i]||(Pl[i]=new WeakMap);var u=Pl[i],d=[],f=new Set,p=new Set(s),y=function(C){!C||f.has(C)||(f.add(C),y(C.parentNode))};s.forEach(y);var w=function(C){!C||p.has(C)||Array.prototype.forEach.call(C.children,function(m){if(f.has(m))w(m);else try{var x=m.getAttribute(o),E=x!==null&&x!=="false",b=(Uo.get(m)||0)+1,N=(u.get(m)||0)+1;Uo.set(m,b),u.set(m,N),d.push(m),b===1&&E&&jl.set(m,!0),N===1&&m.setAttribute(i,"true"),E||m.setAttribute(o,"true")}catch(P){console.error("aria-hidden: cannot operate on ",m,P)}})};return w(n),f.clear(),gd++,function(){d.forEach(function(C){var m=Uo.get(C)-1,x=u.get(C)-1;Uo.set(C,m),u.set(C,x),m||(jl.has(C)||C.removeAttribute(o),jl.delete(C)),x||C.removeAttribute(i)}),gd--,gd||(Uo=new WeakMap,Uo=new WeakMap,jl=new WeakMap,Pl={})}},xE=function(e,n,i){var o=Array.from(Array.isArray(e)?e:[e]),s=n||vE(e);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live]"))),wE(o,s,i,"aria-hidden")):function(){return null}},CE=jf(),SE=` +`)},pE=0,Bo=[];function mE(e){var n=v.useRef([]),i=v.useRef([0,0]),o=v.useRef(),s=v.useState(pE++)[0],u=v.useState(jf)[0],d=v.useRef(e);v.useEffect(function(){d.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var b=Nb([e.lockRef.current],(e.shards||[]).map(ig)).filter(Boolean);return b.forEach(function(E){return E.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),b.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(b,E){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!d.current.allowPinchZoom;var P=Tl(b),L=i.current,$="deltaX"in b?b.deltaX:L[0]-P[0],H="deltaY"in b?b.deltaY:L[1]-P[1],Z,de=b.target,O=Math.abs($)>Math.abs(H)?"h":"v";if("touches"in b&&O==="h"&&de.type==="range")return!1;var K=ng(O,de);if(!K)return!0;if(K?Z=O:(Z=O==="v"?"h":"v",K=ng(O,de)),!K)return!1;if(!o.current&&"changedTouches"in b&&($||H)&&(o.current=Z),!Z)return!0;var ce=o.current||Z;return dE(ce,E,b,ce==="h"?$:H)},[]),p=v.useCallback(function(b){var E=b;if(!(!Bo.length||Bo[Bo.length-1]!==u)){var P="deltaY"in E?rg(E):Tl(E),L=n.current.filter(function(Z){return Z.name===E.type&&(Z.target===E.target||E.target===Z.shadowParent)&&fE(Z.delta,P)})[0];if(L&&L.should){E.cancelable&&E.preventDefault();return}if(!L){var $=(d.current.shards||[]).map(ig).filter(Boolean).filter(function(Z){return Z.contains(E.target)}),H=$.length>0?f(E,$[0]):!d.current.noIsolation;H&&E.cancelable&&E.preventDefault()}}},[]),y=v.useCallback(function(b,E,P,L){var $={name:b,delta:E,target:P,should:L,shadowParent:gE(P)};n.current.push($),setTimeout(function(){n.current=n.current.filter(function(H){return H!==$})},1)},[]),w=v.useCallback(function(b){i.current=Tl(b),o.current=void 0},[]),C=v.useCallback(function(b){y(b.type,rg(b),b.target,f(b,e.lockRef.current))},[]),m=v.useCallback(function(b){y(b.type,Tl(b),b.target,f(b,e.lockRef.current))},[]);v.useEffect(function(){return Bo.push(u),e.setCallbacks({onScrollCapture:C,onWheelCapture:C,onTouchMoveCapture:m}),document.addEventListener("wheel",p,zo),document.addEventListener("touchmove",p,zo),document.addEventListener("touchstart",w,zo),function(){Bo=Bo.filter(function(b){return b!==u}),document.removeEventListener("wheel",p,zo),document.removeEventListener("touchmove",p,zo),document.removeEventListener("touchstart",w,zo)}},[]);var x=e.removeScrollBar,N=e.inert;return v.createElement(v.Fragment,null,N?v.createElement(u,{styles:hE(s)}):null,x?v.createElement(iE,{gapMode:e.gapMode}):null)}function gE(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}gf(y0,mE);var vE=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Uo=new WeakMap,jl=new WeakMap,Pl={},gd=0,Y0=function(e){return e&&(e.host||Y0(e.parentNode))},yE=function(e,n){return n.map(function(i){if(e.contains(i))return i;var o=Y0(i);return o&&e.contains(o)?o:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},wE=function(e,n,i,o){var s=yE(n,Array.isArray(e)?e:[e]);Pl[i]||(Pl[i]=new WeakMap);var u=Pl[i],d=[],f=new Set,p=new Set(s),y=function(C){!C||f.has(C)||(f.add(C),y(C.parentNode))};s.forEach(y);var w=function(C){!C||p.has(C)||Array.prototype.forEach.call(C.children,function(m){if(f.has(m))w(m);else try{var x=m.getAttribute(o),N=x!==null&&x!=="false",b=(Uo.get(m)||0)+1,E=(u.get(m)||0)+1;Uo.set(m,b),u.set(m,E),d.push(m),b===1&&N&&jl.set(m,!0),E===1&&m.setAttribute(i,"true"),N||m.setAttribute(o,"true")}catch(P){console.error("aria-hidden: cannot operate on ",m,P)}})};return w(n),f.clear(),gd++,function(){d.forEach(function(C){var m=Uo.get(C)-1,x=u.get(C)-1;Uo.set(C,m),u.set(C,x),m||(jl.has(C)||C.removeAttribute(o),jl.delete(C)),x||C.removeAttribute(i)}),gd--,gd||(Uo=new WeakMap,Uo=new WeakMap,jl=new WeakMap,Pl={})}},xE=function(e,n,i){var o=Array.from(Array.isArray(e)?e:[e]),s=n||vE(e);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live]"))),wE(o,s,i,"aria-hidden")):function(){return null}},CE=jf(),SE=` [`+E0+`] { pointer-events: none !important; } -`,bE=function(){return v.createElement(CE,{styles:SE})},og=function(e){return"current"in e?e.current:e};function _E(e){var n=e.setLockProps,i=e.onEscapeKey,o=e.onClickOutside,s=e.shards,u=e.onActivation,d=e.onDeactivation,f=e.noIsolation,p=v.useState(void 0),y=p[0],w=p[1],C=v.useRef(null),m=v.useRef(0);return v.useEffect(function(){var x=function(P){P.defaultPrevented||(P.code==="Escape"||P.key==="Escape"||P.keyCode===27)&&i&&i(P)},E=function(P){P.defaultPrevented||P.target===C.current||P instanceof MouseEvent&&P.button!==0||s&&s.map(og).some(function(L){return L&&L.contains(P.target)||L===P.target})||o&&o(P)},b=function(P){E(P),m.current=P.touches.length},N=function(P){m.current=P.touches.length};if(y)return document.addEventListener("keydown",x),document.addEventListener("mousedown",E),document.addEventListener("touchstart",b),document.addEventListener("touchend",N),function(){document.removeEventListener("keydown",x),document.removeEventListener("mousedown",E),document.removeEventListener("touchstart",b),document.removeEventListener("touchend",N)}},[y,o,i]),v.useEffect(function(){if(y)return u&&u(y),function(){d&&d()}},[!!y]),v.useEffect(function(){var x=function(){return null},E=!1,b=function(P){f||(x=xE(kb([P],(s||[]).map(og)),document.body,E0)),w(function(){return P})},N=function(){x(),E||w(null)};return n({onMouseDown:function(P){C.current=P.target},onTouchStart:function(P){C.current=P.target},onActivation:b,onDeactivation:N}),function(){E=!0,n(!1)}},[]),v.createElement(bE,null)}const EE=gf(_0,_E);var kE=function(e){return v.createElement(EE,kn({},e))};v.forwardRef(function(e,n){return v.createElement(Ub,kn({},e,{ref:n,sideCar:kE}))});const NE="_input-container_1b4m7_1",TE="_input-section_1b4m7_4",jE="_input_1b4m7_1",PE="_disabled_1b4m7_17",ME="_errored_1b4m7_25",LE="_general_1b4m7_31",DE="_read-only_1b4m7_38",OE="_input-hint_1b4m7_53",RE="_input-error_1b4m7_58",xr={inputContainer:NE,inputSection:TE,input:jE,disabled:PE,errored:ME,general:LE,readOnly:DE,inputHint:OE,inputError:RE};function Pf(e){const{containerRef:n,inputSectionRef:i,actions:o,className:s,disabled:u,error:d,errorOnTooltip:f=!1,hint:p,icons:y,input:w,inputSectionClassName:C,label:m,labelClassName:x,readOnly:E,required:b,variant:N="form",withAsterisk:P,actionsContainerClassName:L,errorContainerClassName:$,hintContainerClassName:q,iconsContainerClassName:Z,spacing:fe}=e,O=P??b,{content:K,containerClassName:ce}=ms({className:Oe(xr.inputSection,C),icons:y,iconsContainerClassName:Z,actions:o,actionsContainerClassName:L,children:w,childrenContainerClassName:xr.input,spacing:fe,withoutWrap:!0,variant:"xs"});return g.jsxs("div",{ref:n,className:Oe(xr.inputContainer,!!d&&xr.errored,E&&xr.readOnly,N==="form"&&xr.form,N==="general"&&xr.general,u&&xr.disabled,s),title:f&&d&&typeof d=="string"?d:void 0,children:[g.jsx(f0,{className:x,disabled:u,required:O,children:m}),g.jsx("div",{ref:i,className:ce,children:K}),p&&g.jsx("div",{className:Oe(xr.inputHint,q),children:p}),!f&&g.jsx(d0,{disabled:u,className:Oe(xr.inputError,$),children:d})]})}const IE="_raw-input_8rtzt_1",AE={rawInput:IE};function X0(e){const{className:n,onChange:i,elementRef:o,value:s,name:u,...d}=e,f=fr.useCallback(p=>{const y=p.currentTarget.value;i&&i(y===""?void 0:y,u,p)},[u,i]);return g.jsx("input",{...d,ref:o,className:Oe(AE.rawInput,n),name:Lt(u)?String(u):void 0,onChange:f,value:s??""})}function FE(e,n,i,o){fr.useEffect(()=>{if(!e)return;const s=u=>{const{current:d}=i,{current:f}=o,p=u.target,y=u&&d?d===u.target||d.contains(p):!1,w=f?f===u.target||f.contains(p):!1;n(y,w,u)};return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[e,n,i,o])}var ag={},$E={},as={},Mf={},ss={},Lf={};Object.defineProperty(Lf,"__esModule",{value:!0});Lf.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var Df={};Object.defineProperty(Df,"__esModule",{value:!0});Df.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var Rd={};(function(e){var n;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(n=String.fromCodePoint)!==null&&n!==void 0?n:function(u){var d="";return u>65535&&(u-=65536,d+=String.fromCharCode(u>>>10&1023|55296),u=56320|u&1023),d+=String.fromCharCode(u),d};function o(u){var d;return u>=55296&&u<=57343||u>1114111?65533:(d=i.get(u))!==null&&d!==void 0?d:u}e.replaceCodePoint=o;function s(u){return(0,e.fromCodePoint)(o(u))}e.default=s})(Rd);(function(e){var n=Ae&&Ae.__createBinding||(Object.create?function(I,U,W,ne){ne===void 0&&(ne=W);var he=Object.getOwnPropertyDescriptor(U,W);(!he||("get"in he?!U.__esModule:he.writable||he.configurable))&&(he={enumerable:!0,get:function(){return U[W]}}),Object.defineProperty(I,ne,he)}:function(I,U,W,ne){ne===void 0&&(ne=W),I[ne]=U[W]}),i=Ae&&Ae.__setModuleDefault||(Object.create?function(I,U){Object.defineProperty(I,"default",{enumerable:!0,value:U})}:function(I,U){I.default=U}),o=Ae&&Ae.__importStar||function(I){if(I&&I.__esModule)return I;var U={};if(I!=null)for(var W in I)W!=="default"&&Object.prototype.hasOwnProperty.call(I,W)&&n(U,I,W);return i(U,I),U},s=Ae&&Ae.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var u=s(Lf);e.htmlDecodeTree=u.default;var d=s(Df);e.xmlDecodeTree=d.default;var f=o(Rd);e.decodeCodePoint=f.default;var p=Rd;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return p.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return p.fromCodePoint}});var y;(function(I){I[I.NUM=35]="NUM",I[I.SEMI=59]="SEMI",I[I.EQUALS=61]="EQUALS",I[I.ZERO=48]="ZERO",I[I.NINE=57]="NINE",I[I.LOWER_A=97]="LOWER_A",I[I.LOWER_F=102]="LOWER_F",I[I.LOWER_X=120]="LOWER_X",I[I.LOWER_Z=122]="LOWER_Z",I[I.UPPER_A=65]="UPPER_A",I[I.UPPER_F=70]="UPPER_F",I[I.UPPER_Z=90]="UPPER_Z"})(y||(y={}));var w=32,C;(function(I){I[I.VALUE_LENGTH=49152]="VALUE_LENGTH",I[I.BRANCH_LENGTH=16256]="BRANCH_LENGTH",I[I.JUMP_TABLE=127]="JUMP_TABLE"})(C=e.BinTrieFlags||(e.BinTrieFlags={}));function m(I){return I>=y.ZERO&&I<=y.NINE}function x(I){return I>=y.UPPER_A&&I<=y.UPPER_F||I>=y.LOWER_A&&I<=y.LOWER_F}function E(I){return I>=y.UPPER_A&&I<=y.UPPER_Z||I>=y.LOWER_A&&I<=y.LOWER_Z||m(I)}function b(I){return I===y.EQUALS||E(I)}var N;(function(I){I[I.EntityStart=0]="EntityStart",I[I.NumericStart=1]="NumericStart",I[I.NumericDecimal=2]="NumericDecimal",I[I.NumericHex=3]="NumericHex",I[I.NamedEntity=4]="NamedEntity"})(N||(N={}));var P;(function(I){I[I.Legacy=0]="Legacy",I[I.Strict=1]="Strict",I[I.Attribute=2]="Attribute"})(P=e.DecodingMode||(e.DecodingMode={}));var L=function(){function I(U,W,ne){this.decodeTree=U,this.emitCodePoint=W,this.errors=ne,this.state=N.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=P.Strict}return I.prototype.startEntity=function(U){this.decodeMode=U,this.state=N.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},I.prototype.write=function(U,W){switch(this.state){case N.EntityStart:return U.charCodeAt(W)===y.NUM?(this.state=N.NumericStart,this.consumed+=1,this.stateNumericStart(U,W+1)):(this.state=N.NamedEntity,this.stateNamedEntity(U,W));case N.NumericStart:return this.stateNumericStart(U,W);case N.NumericDecimal:return this.stateNumericDecimal(U,W);case N.NumericHex:return this.stateNumericHex(U,W);case N.NamedEntity:return this.stateNamedEntity(U,W)}},I.prototype.stateNumericStart=function(U,W){return W>=U.length?-1:(U.charCodeAt(W)|w)===y.LOWER_X?(this.state=N.NumericHex,this.consumed+=1,this.stateNumericHex(U,W+1)):(this.state=N.NumericDecimal,this.stateNumericDecimal(U,W))},I.prototype.addToNumericResult=function(U,W,ne,he){if(W!==ne){var Ce=ne-W;this.result=this.result*Math.pow(he,Ce)+parseInt(U.substr(W,Ce),he),this.consumed+=Ce}},I.prototype.stateNumericHex=function(U,W){for(var ne=W;W>14;W>14,Ce!==0){if(_e===y.SEMI)return this.emitNamedEntityData(this.treeIndex,Ce,this.consumed+this.excess);this.decodeMode!==P.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},I.prototype.emitNotTerminatedNamedEntity=function(){var U,W=this,ne=W.result,he=W.decodeTree,Ce=(he[ne]&C.VALUE_LENGTH)>>14;return this.emitNamedEntityData(ne,Ce,this.consumed),(U=this.errors)===null||U===void 0||U.missingSemicolonAfterCharacterReference(),this.consumed},I.prototype.emitNamedEntityData=function(U,W,ne){var he=this.decodeTree;return this.emitCodePoint(W===1?he[U]&~C.VALUE_LENGTH:he[U+1],ne),W===3&&this.emitCodePoint(he[U+2],ne),ne},I.prototype.end=function(){var U;switch(this.state){case N.NamedEntity:return this.result!==0&&(this.decodeMode!==P.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case N.NumericDecimal:return this.emitNumericEntity(0,2);case N.NumericHex:return this.emitNumericEntity(0,3);case N.NumericStart:return(U=this.errors)===null||U===void 0||U.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case N.EntityStart:return 0}},I}();e.EntityDecoder=L;function $(I){var U="",W=new L(I,function(ne){return U+=(0,f.fromCodePoint)(ne)});return function(ne,he){for(var Ce=0,_e=0;(_e=ne.indexOf("&",_e))>=0;){U+=ne.slice(Ce,_e),W.startEntity(he);var G=W.write(ne,_e+1);if(G<0){Ce=_e+W.end();break}Ce=_e+G,_e=G===0?Ce+1:Ce}var ue=U+ne.slice(Ce);return U="",ue}}function q(I,U,W,ne){var he=(U&C.BRANCH_LENGTH)>>7,Ce=U&C.JUMP_TABLE;if(he===0)return Ce!==0&&ne===Ce?W:-1;if(Ce){var _e=ne-Ce;return _e<0||_e>=he?-1:I[W+_e]-1}for(var G=W,ue=G+he-1;G<=ue;){var T=G+ue>>>1,H=I[T];if(Hne)ue=T-1;else return I[T+he]}return-1}e.determineBranch=q;var Z=$(u.default),fe=$(d.default);function O(I,U){return U===void 0&&(U=P.Legacy),Z(I,U)}e.decodeHTML=O;function K(I){return Z(I,P.Attribute)}e.decodeHTMLAttribute=K;function ce(I){return Z(I,P.Strict)}e.decodeHTMLStrict=ce;function de(I){return fe(I,P.Strict)}e.decodeXML=de})(ss);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var n=ss,i;(function(m){m[m.Tab=9]="Tab",m[m.NewLine=10]="NewLine",m[m.FormFeed=12]="FormFeed",m[m.CarriageReturn=13]="CarriageReturn",m[m.Space=32]="Space",m[m.ExclamationMark=33]="ExclamationMark",m[m.Number=35]="Number",m[m.Amp=38]="Amp",m[m.SingleQuote=39]="SingleQuote",m[m.DoubleQuote=34]="DoubleQuote",m[m.Dash=45]="Dash",m[m.Slash=47]="Slash",m[m.Zero=48]="Zero",m[m.Nine=57]="Nine",m[m.Semi=59]="Semi",m[m.Lt=60]="Lt",m[m.Eq=61]="Eq",m[m.Gt=62]="Gt",m[m.Questionmark=63]="Questionmark",m[m.UpperA=65]="UpperA",m[m.LowerA=97]="LowerA",m[m.UpperF=70]="UpperF",m[m.LowerF=102]="LowerF",m[m.UpperZ=90]="UpperZ",m[m.LowerZ=122]="LowerZ",m[m.LowerX=120]="LowerX",m[m.OpeningSquareBracket=91]="OpeningSquareBracket"})(i||(i={}));var o;(function(m){m[m.Text=1]="Text",m[m.BeforeTagName=2]="BeforeTagName",m[m.InTagName=3]="InTagName",m[m.InSelfClosingTag=4]="InSelfClosingTag",m[m.BeforeClosingTagName=5]="BeforeClosingTagName",m[m.InClosingTagName=6]="InClosingTagName",m[m.AfterClosingTagName=7]="AfterClosingTagName",m[m.BeforeAttributeName=8]="BeforeAttributeName",m[m.InAttributeName=9]="InAttributeName",m[m.AfterAttributeName=10]="AfterAttributeName",m[m.BeforeAttributeValue=11]="BeforeAttributeValue",m[m.InAttributeValueDq=12]="InAttributeValueDq",m[m.InAttributeValueSq=13]="InAttributeValueSq",m[m.InAttributeValueNq=14]="InAttributeValueNq",m[m.BeforeDeclaration=15]="BeforeDeclaration",m[m.InDeclaration=16]="InDeclaration",m[m.InProcessingInstruction=17]="InProcessingInstruction",m[m.BeforeComment=18]="BeforeComment",m[m.CDATASequence=19]="CDATASequence",m[m.InSpecialComment=20]="InSpecialComment",m[m.InCommentLike=21]="InCommentLike",m[m.BeforeSpecialS=22]="BeforeSpecialS",m[m.SpecialStartSequence=23]="SpecialStartSequence",m[m.InSpecialTag=24]="InSpecialTag",m[m.BeforeEntity=25]="BeforeEntity",m[m.BeforeNumericEntity=26]="BeforeNumericEntity",m[m.InNamedEntity=27]="InNamedEntity",m[m.InNumericEntity=28]="InNumericEntity",m[m.InHexEntity=29]="InHexEntity"})(o||(o={}));function s(m){return m===i.Space||m===i.NewLine||m===i.Tab||m===i.FormFeed||m===i.CarriageReturn}function u(m){return m===i.Slash||m===i.Gt||s(m)}function d(m){return m>=i.Zero&&m<=i.Nine}function f(m){return m>=i.LowerA&&m<=i.LowerZ||m>=i.UpperA&&m<=i.UpperZ}function p(m){return m>=i.UpperA&&m<=i.UpperF||m>=i.LowerA&&m<=i.LowerF}var y;(function(m){m[m.NoValue=0]="NoValue",m[m.Unquoted=1]="Unquoted",m[m.Single=2]="Single",m[m.Double=3]="Double"})(y=e.QuoteType||(e.QuoteType={}));var w={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},C=function(){function m(x,E){var b=x.xmlMode,N=b===void 0?!1:b,P=x.decodeEntities,L=P===void 0?!0:P;this.cbs=E,this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=N,this.decodeEntities=L,this.entityTrie=N?n.xmlDecodeTree:n.htmlDecodeTree}return m.prototype.reset=function(){this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},m.prototype.write=function(x){this.offset+=this.buffer.length,this.buffer=x,this.parse()},m.prototype.end=function(){this.running&&this.finish()},m.prototype.pause=function(){this.running=!1},m.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=o.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&x===i.Amp&&(this.state=o.BeforeEntity)},m.prototype.stateSpecialStartSequence=function(x){var E=this.sequenceIndex===this.currentSequence.length,b=E?u(x):(x|32)===this.currentSequence[this.sequenceIndex];if(!b)this.isSpecial=!1;else if(!E){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=o.InTagName,this.stateInTagName(x)},m.prototype.stateInSpecialTag=function(x){if(this.sequenceIndex===this.currentSequence.length){if(x===i.Gt||s(x)){var E=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&x!==i.Semi)this.trieIndex+=b;else{var N=this.index-this.entityExcess+1;N>this.sectionStart&&this.emitPartial(this.sectionStart,N),this.entityResult=this.trieIndex,this.trieIndex+=b,this.entityExcess=0,this.sectionStart=this.index+1,b===0&&this.emitNamedEntity()}}},m.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var x=(this.entityTrie[this.entityResult]&n.BinTrieFlags.VALUE_LENGTH)>>14;switch(x){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~n.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},m.prototype.stateBeforeNumericEntity=function(x){(x|32)===i.LowerX?(this.entityExcess++,this.state=o.InHexEntity):(this.state=o.InNumericEntity,this.stateInNumericEntity(x))},m.prototype.emitNumericEntity=function(x){var E=this.index-this.entityExcess-1,b=E+2+ +(this.state===o.InHexEntity);b!==this.index&&(E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.sectionStart=this.index+Number(x),this.emitCodePoint((0,n.replaceCodePoint)(this.entityResult))),this.state=this.baseState},m.prototype.stateInNumericEntity=function(x){x===i.Semi?this.emitNumericEntity(!0):d(x)?(this.entityResult=this.entityResult*10+(x-i.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},m.prototype.stateInHexEntity=function(x){x===i.Semi?this.emitNumericEntity(!0):d(x)?(this.entityResult=this.entityResult*16+(x-i.Zero),this.entityExcess++):p(x)?(this.entityResult=this.entityResult*16+((x|32)-i.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},m.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===o.Text||this.baseState===o.InSpecialTag)},m.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===o.Text||this.state===o.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===o.InAttributeValueDq||this.state===o.InAttributeValueSq||this.state===o.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},m.prototype.shouldContinue=function(){return this.index0&&d.has(this.stack[this.stack.length-1]);){var f=this.stack.pop();(o=(i=this.cbs).onclosetag)===null||o===void 0||o.call(i,f,!0)}this.isVoidElement(n)||(this.stack.push(n),dg.has(n)?this.foreignContext.push(!0):fg.has(n)&&this.foreignContext.push(!1)),(u=(s=this.cbs).onopentagname)===null||u===void 0||u.call(s,n),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(n){var i,o;this.startIndex=this.openTagStart,this.attribs&&((o=(i=this.cbs).onopentag)===null||o===void 0||o.call(i,this.tagname,this.attribs,n),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(n){this.endIndex=n,this.endOpenTag(!1),this.startIndex=n+1},e.prototype.onclosetag=function(n,i){var o,s,u,d,f,p;this.endIndex=i;var y=this.getSlice(n,i);if(this.lowerCaseTagNames&&(y=y.toLowerCase()),(dg.has(y)||fg.has(y))&&this.foreignContext.pop(),this.isVoidElement(y))!this.options.xmlMode&&y==="br"&&((s=(o=this.cbs).onopentagname)===null||s===void 0||s.call(o,"br"),(d=(u=this.cbs).onopentag)===null||d===void 0||d.call(u,"br",{},!0),(p=(f=this.cbs).onclosetag)===null||p===void 0||p.call(f,"br",!1));else{var w=this.stack.lastIndexOf(y);if(w!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-w;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=w;else!this.options.xmlMode&&y==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=i+1},e.prototype.onselfclosingtag=function(n){this.endIndex=n,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=n+1):this.onopentagend(n)},e.prototype.closeCurrentTag=function(n){var i,o,s=this.tagname;this.endOpenTag(n),this.stack[this.stack.length-1]===s&&((o=(i=this.cbs).onclosetag)===null||o===void 0||o.call(i,s,!n),this.stack.pop())},e.prototype.onattribname=function(n,i){this.startIndex=n;var o=this.getSlice(n,i);this.attribname=this.lowerCaseAttributeNames?o.toLowerCase():o},e.prototype.onattribdata=function(n,i){this.attribvalue+=this.getSlice(n,i)},e.prototype.onattribentity=function(n){this.attribvalue+=(0,sg.fromCodePoint)(n)},e.prototype.onattribend=function(n,i){var o,s;this.endIndex=i,(s=(o=this.cbs).onattribute)===null||s===void 0||s.call(o,this.attribname,this.attribvalue,n===Ml.QuoteType.Double?'"':n===Ml.QuoteType.Single?"'":n===Ml.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(n){var i=n.search(qE),o=i<0?n:n.substr(0,i);return this.lowerCaseTagNames&&(o=o.toLowerCase()),o},e.prototype.ondeclaration=function(n,i){this.endIndex=i;var o=this.getSlice(n,i);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(o);this.cbs.onprocessinginstruction("!".concat(s),"!".concat(o))}this.startIndex=i+1},e.prototype.onprocessinginstruction=function(n,i){this.endIndex=i;var o=this.getSlice(n,i);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(o);this.cbs.onprocessinginstruction("?".concat(s),"?".concat(o))}this.startIndex=i+1},e.prototype.oncomment=function(n,i,o){var s,u,d,f;this.endIndex=i,(u=(s=this.cbs).oncomment)===null||u===void 0||u.call(s,this.getSlice(n,i-o)),(f=(d=this.cbs).oncommentend)===null||f===void 0||f.call(d),this.startIndex=i+1},e.prototype.oncdata=function(n,i,o){var s,u,d,f,p,y,w,C,m,x;this.endIndex=i;var E=this.getSlice(n,i-o);this.options.xmlMode||this.options.recognizeCDATA?((u=(s=this.cbs).oncdatastart)===null||u===void 0||u.call(s),(f=(d=this.cbs).ontext)===null||f===void 0||f.call(d,E),(y=(p=this.cbs).oncdataend)===null||y===void 0||y.call(p)):((C=(w=this.cbs).oncomment)===null||C===void 0||C.call(w,"[CDATA[".concat(E,"]]")),(x=(m=this.cbs).oncommentend)===null||x===void 0||x.call(m)),this.startIndex=i+1},e.prototype.onend=function(){var n,i;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var o=this.stack.length;o>0;this.cbs.onclosetag(this.stack[--o],!0));}(i=(n=this.cbs).onend)===null||i===void 0||i.call(n)},e.prototype.reset=function(){var n,i,o,s;(i=(n=this.cbs).onreset)===null||i===void 0||i.call(n),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(s=(o=this.cbs).onparserinit)===null||s===void 0||s.call(o,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(n){this.reset(),this.end(n)},e.prototype.getSlice=function(n,i){for(;n-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var o=this.buffers[0].slice(n-this.bufferOffset,i-this.bufferOffset);i-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),o+=this.buffers[0].slice(0,i-this.bufferOffset);return o},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(n){var i,o;if(this.ended){(o=(i=this.cbs).onerror)===null||o===void 0||o.call(i,new Error(".write() after done!"));return}this.buffers.push(n),this.tokenizer.running&&(this.tokenizer.write(n),this.writeIndex++)},e.prototype.end=function(n){var i,o;if(this.ended){(o=(i=this.cbs).onerror)===null||o===void 0||o.call(i,new Error(".end() after done!"));return}n&&this.write(n),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(i){this.children=i},enumerable:!1,configurable:!0}),n}(Of);We.NodeWithChildren=fu;var nv=function(e){Ti(n,e);function n(){var i=e!==null&&e.apply(this,arguments)||this;return i.type=Nn.ElementType.CDATA,i}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(fu);We.CDATA=nv;var rv=function(e){Ti(n,e);function n(){var i=e!==null&&e.apply(this,arguments)||this;return i.type=Nn.ElementType.Root,i}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(fu);We.Document=rv;var iv=function(e){Ti(n,e);function n(i,o,s,u){s===void 0&&(s=[]),u===void 0&&(u=i==="script"?Nn.ElementType.Script:i==="style"?Nn.ElementType.Style:Nn.ElementType.Tag);var d=e.call(this,s)||this;return d.name=i,d.attribs=o,d.type=u,d}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(i){this.name=i},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var i=this;return Object.keys(this.attribs).map(function(o){var s,u;return{name:o,value:i.attribs[o],namespace:(s=i["x-attribsNamespace"])===null||s===void 0?void 0:s[o],prefix:(u=i["x-attribsPrefix"])===null||u===void 0?void 0:u[o]}})},enumerable:!1,configurable:!0}),n}(fu);We.Element=iv;function ov(e){return(0,Nn.isTag)(e)}We.isTag=ov;function av(e){return e.type===Nn.ElementType.CDATA}We.isCDATA=av;function sv(e){return e.type===Nn.ElementType.Text}We.isText=sv;function lv(e){return e.type===Nn.ElementType.Comment}We.isComment=lv;function uv(e){return e.type===Nn.ElementType.Directive}We.isDirective=uv;function cv(e){return e.type===Nn.ElementType.Root}We.isDocument=cv;function GE(e){return Object.prototype.hasOwnProperty.call(e,"children")}We.hasChildren=GE;function Rf(e,n){n===void 0&&(n=!1);var i;if(sv(e))i=new J0(e.data);else if(lv(e))i=new ev(e.data);else if(ov(e)){var o=n?vd(e.children):[],s=new iv(e.name,Ya({},e.attribs),o);o.forEach(function(p){return p.parent=s}),e.namespace!=null&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]=Ya({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]=Ya({},e["x-attribsPrefix"])),i=s}else if(av(e)){var o=n?vd(e.children):[],u=new nv(o);o.forEach(function(y){return y.parent=u}),i=u}else if(cv(e)){var o=n?vd(e.children):[],d=new rv(o);o.forEach(function(y){return y.parent=d}),e["x-mode"]&&(d["x-mode"]=e["x-mode"]),i=d}else if(uv(e)){var f=new tv(e.name,e.data);e["x-name"]!=null&&(f["x-name"]=e["x-name"],f["x-publicId"]=e["x-publicId"],f["x-systemId"]=e["x-systemId"]),i=f}else throw new Error("Not implemented yet: ".concat(e.type));return i.startIndex=e.startIndex,i.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(i.sourceCodeLocation=e.sourceCodeLocation),i}We.cloneNode=Rf;function vd(e){for(var n=e.map(function(o){return Rf(o,!0)}),i=1;i$\x80-\uFFFF]/g;var n=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(s,u){return s.codePointAt(u)}:function(s,u){return(s.charCodeAt(u)&64512)===55296?(s.charCodeAt(u)-55296)*1024+s.charCodeAt(u+1)-56320+65536:s.charCodeAt(u)};function i(s){for(var u="",d=0,f;(f=e.xmlReplacer.exec(s))!==null;){var p=f.index,y=s.charCodeAt(p),w=n.get(y);w!==void 0?(u+=s.substring(d,p)+w,d=p+1):(u+="".concat(s.substring(d,p),"&#x").concat((0,e.getCodePoint)(s,p).toString(16),";"),d=e.xmlReplacer.lastIndex+=+((y&64512)===55296))}return u+s.substr(d)}e.encodeXML=i,e.escape=i;function o(s,u){return function(d){for(var f,p=0,y="";f=s.exec(d);)p!==f.index&&(y+=d.substring(p,f.index)),y+=u.get(f[0].charCodeAt(0)),p=f.index+1;return y+d.substring(p)}}e.escapeUTF8=o(/[&<>'"]/g,n),e.escapeAttribute=o(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=o(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(nu);var ZE=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(co,"__esModule",{value:!0});co.encodeNonAsciiHTML=co.encodeHTML=void 0;var QE=ZE(If),fv=nu,KE=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function YE(e){return hv(KE,e)}co.encodeHTML=YE;function XE(e){return hv(fv.xmlReplacer,e)}co.encodeNonAsciiHTML=XE;function hv(e,n){for(var i="",o=0,s;(s=e.exec(n))!==null;){var u=s.index;i+=n.substring(o,u);var d=n.charCodeAt(u),f=QE.default.get(d);if(typeof f=="object"){if(u+10&&(o+=hu(e.children,n)),(n.xmlMode||!hg.has(e.name))&&(o+=""))),o}function uk(e){return"<".concat(e.data,">")}function ck(e,n){var i,o=e.data||"";return((i=n.encodeEntities)!==null&&i!==void 0?i:n.decodeEntities)!==!1&&!(!n.xmlMode&&e.parent&&nk.has(e.parent.name))&&(o=n.xmlMode||n.encodeEntities!=="utf8"?(0,ru.encodeXML)(o):(0,ru.escapeText)(o)),o}function dk(e){return"")}function fk(e){return"")}var hk=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(An,"__esModule",{value:!0});An.innerText=An.textContent=An.getText=An.getInnerHTML=An.getOuterHTML=void 0;var br=Kr,pk=hk(gs),mk=ia;function mv(e,n){return(0,pk.default)(e,n)}An.getOuterHTML=mv;function gk(e,n){return(0,br.hasChildren)(e)?e.children.map(function(i){return mv(i,n)}).join(""):""}An.getInnerHTML=gk;function Wl(e){return Array.isArray(e)?e.map(Wl).join(""):(0,br.isTag)(e)?e.name==="br"?` -`:Wl(e.children):(0,br.isCDATA)(e)?Wl(e.children):(0,br.isText)(e)?e.data:""}An.getText=Wl;function Id(e){return Array.isArray(e)?e.map(Id).join(""):(0,br.hasChildren)(e)&&!(0,br.isComment)(e)?Id(e.children):(0,br.isText)(e)?e.data:""}An.textContent=Id;function Ad(e){return Array.isArray(e)?e.map(Ad).join(""):(0,br.hasChildren)(e)&&(e.type===mk.ElementType.Tag||(0,br.isCDATA)(e))?Ad(e.children):(0,br.isText)(e)?e.data:""}An.innerText=Ad;var qt={};Object.defineProperty(qt,"__esModule",{value:!0});qt.prevElementSibling=qt.nextElementSibling=qt.getName=qt.hasAttrib=qt.getAttributeValue=qt.getSiblings=qt.getParent=qt.getChildren=void 0;var Af=Kr;function gv(e){return(0,Af.hasChildren)(e)?e.children:[]}qt.getChildren=gv;function vv(e){return e.parent||null}qt.getParent=vv;function vk(e){var n,i,o=vv(e);if(o!=null)return gv(o);for(var s=[e],u=e.prev,d=e.next;u!=null;)s.unshift(u),n=u,u=n.prev;for(;d!=null;)s.push(d),i=d,d=i.next;return s}qt.getSiblings=vk;function yk(e,n){var i;return(i=e.attribs)===null||i===void 0?void 0:i[n]}qt.getAttributeValue=yk;function wk(e,n){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,n)&&e.attribs[n]!=null}qt.hasAttrib=wk;function xk(e){return e.name}qt.getName=xk;function Ck(e){for(var n,i=e.next;i!==null&&!(0,Af.isTag)(i);)n=i,i=n.next;return i}qt.nextElementSibling=Ck;function Sk(e){for(var n,i=e.prev;i!==null&&!(0,Af.isTag)(i);)n=i,i=n.prev;return i}qt.prevElementSibling=Sk;var En={};Object.defineProperty(En,"__esModule",{value:!0});En.prepend=En.prependChild=En.append=En.appendChild=En.replaceElement=En.removeElement=void 0;function vs(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var n=e.parent.children,i=n.lastIndexOf(e);i>=0&&n.splice(i,1)}e.next=null,e.prev=null,e.parent=null}En.removeElement=vs;function bk(e,n){var i=n.prev=e.prev;i&&(i.next=n);var o=n.next=e.next;o&&(o.prev=n);var s=n.parent=e.parent;if(s){var u=s.children;u[u.lastIndexOf(e)]=n,e.parent=null}}En.replaceElement=bk;function _k(e,n){if(vs(n),n.next=null,n.parent=e,e.children.push(n)>1){var i=e.children[e.children.length-2];i.next=n,n.prev=i}else n.prev=null}En.appendChild=_k;function Ek(e,n){vs(n);var i=e.parent,o=e.next;if(n.next=o,n.prev=e,e.next=n,n.parent=i,o){if(o.prev=n,i){var s=i.children;s.splice(s.lastIndexOf(o),0,n)}}else i&&i.children.push(n)}En.append=Ek;function kk(e,n){if(vs(n),n.parent=e,n.prev=null,e.children.unshift(n)!==1){var i=e.children[1];i.prev=n,n.next=i}else n.next=null}En.prependChild=kk;function Nk(e,n){vs(n);var i=e.parent;if(i){var o=i.children;o.splice(o.indexOf(e),0,n)}e.prev&&(e.prev.next=n),n.parent=i,n.prev=e.prev,n.next=e,e.prev=n}En.prepend=Nk;var sn={};Object.defineProperty(sn,"__esModule",{value:!0});sn.findAll=sn.existsOne=sn.findOne=sn.findOneChild=sn.find=sn.filter=void 0;var pu=Kr;function Tk(e,n,i,o){return i===void 0&&(i=!0),o===void 0&&(o=1/0),yv(e,Array.isArray(n)?n:[n],i,o)}sn.filter=Tk;function yv(e,n,i,o){for(var s=[],u=[n],d=[0];;){if(d[0]>=u[0].length){if(d.length===1)return s;u.shift(),d.shift();continue}var f=u[0][d[0]++];if(e(f)&&(s.push(f),--o<=0))return s;i&&(0,pu.hasChildren)(f)&&f.children.length>0&&(d.unshift(0),u.unshift(f.children))}}sn.find=yv;function jk(e,n){return n.find(e)}sn.findOneChild=jk;function wv(e,n,i){i===void 0&&(i=!0);for(var o=null,s=0;s0&&(o=wv(e,u.children,!0));else continue}return o}sn.findOne=wv;function xv(e,n){return n.some(function(i){return(0,pu.isTag)(i)&&(e(i)||xv(e,i.children))})}sn.existsOne=xv;function Pk(e,n){for(var i=[],o=[n],s=[0];;){if(s[0]>=o[0].length){if(o.length===1)return i;o.shift(),s.shift();continue}var u=o[0][s[0]++];(0,pu.isTag)(u)&&(e(u)&&i.push(u),u.children.length>0&&(s.unshift(0),o.unshift(u.children)))}}sn.findAll=Pk;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.getElementsByTagType=Fn.getElementsByTagName=Fn.getElementById=Fn.getElements=Fn.testElement=void 0;var io=Kr,mu=sn,iu={tag_name:function(e){return typeof e=="function"?function(n){return(0,io.isTag)(n)&&e(n.name)}:e==="*"?io.isTag:function(n){return(0,io.isTag)(n)&&n.name===e}},tag_type:function(e){return typeof e=="function"?function(n){return e(n.type)}:function(n){return n.type===e}},tag_contains:function(e){return typeof e=="function"?function(n){return(0,io.isText)(n)&&e(n.data)}:function(n){return(0,io.isText)(n)&&n.data===e}}};function Cv(e,n){return typeof n=="function"?function(i){return(0,io.isTag)(i)&&n(i.attribs[e])}:function(i){return(0,io.isTag)(i)&&i.attribs[e]===n}}function Mk(e,n){return function(i){return e(i)||n(i)}}function Sv(e){var n=Object.keys(e).map(function(i){var o=e[i];return Object.prototype.hasOwnProperty.call(iu,i)?iu[i](o):Cv(i,o)});return n.length===0?null:n.reduce(Mk)}function Lk(e,n){var i=Sv(e);return i?i(n):!0}Fn.testElement=Lk;function Dk(e,n,i,o){o===void 0&&(o=1/0);var s=Sv(e);return s?(0,mu.filter)(s,n,i,o):[]}Fn.getElements=Dk;function Ok(e,n,i){return i===void 0&&(i=!0),Array.isArray(n)||(n=[n]),(0,mu.findOne)(Cv("id",e),n,i)}Fn.getElementById=Ok;function Rk(e,n,i,o){return i===void 0&&(i=!0),o===void 0&&(o=1/0),(0,mu.filter)(iu.tag_name(e),n,i,o)}Fn.getElementsByTagName=Rk;function Ik(e,n,i,o){return i===void 0&&(i=!0),o===void 0&&(o=1/0),(0,mu.filter)(iu.tag_type(e),n,i,o)}Fn.getElementsByTagType=Ik;var bv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var n=Kr;function i(d){for(var f=d.length;--f>=0;){var p=d[f];if(f>0&&d.lastIndexOf(p,f-1)>=0){d.splice(f,1);continue}for(var y=p.parent;y;y=y.parent)if(d.includes(y)){d.splice(f,1);break}}return d}e.removeSubsets=i;var o;(function(d){d[d.DISCONNECTED=1]="DISCONNECTED",d[d.PRECEDING=2]="PRECEDING",d[d.FOLLOWING=4]="FOLLOWING",d[d.CONTAINS=8]="CONTAINS",d[d.CONTAINED_BY=16]="CONTAINED_BY"})(o=e.DocumentPosition||(e.DocumentPosition={}));function s(d,f){var p=[],y=[];if(d===f)return 0;for(var w=(0,n.hasChildren)(d)?d:d.parent;w;)p.unshift(w),w=w.parent;for(w=(0,n.hasChildren)(f)?f:f.parent;w;)y.unshift(w),w=w.parent;for(var C=Math.min(p.length,y.length),m=0;mE.indexOf(N)?x===f?o.FOLLOWING|o.CONTAINED_BY:o.FOLLOWING:x===d?o.PRECEDING|o.CONTAINS:o.PRECEDING}e.compareDocumentPosition=s;function u(d){return d=d.filter(function(f,p,y){return!y.includes(f,p+1)}),d.sort(function(f,p){var y=s(f,p);return y&o.PRECEDING?-1:y&o.FOLLOWING?1:0}),d}e.uniqueSort=u})(bv);var gu={};Object.defineProperty(gu,"__esModule",{value:!0});gu.getFeed=void 0;var Ak=An,ys=Fn;function Fk(e){var n=ou(Hk,e);return n?n.name==="feed"?$k(n):zk(n):null}gu.getFeed=Fk;function $k(e){var n,i=e.children,o={type:"atom",items:(0,ys.getElementsByTagName)("entry",i).map(function(d){var f,p=d.children,y={media:_v(p)};_n(y,"id","id",p),_n(y,"title","title",p);var w=(f=ou("link",p))===null||f===void 0?void 0:f.attribs.href;w&&(y.link=w);var C=ki("summary",p)||ki("content",p);C&&(y.description=C);var m=ki("updated",p);return m&&(y.pubDate=new Date(m)),y})};_n(o,"id","id",i),_n(o,"title","title",i);var s=(n=ou("link",i))===null||n===void 0?void 0:n.attribs.href;s&&(o.link=s),_n(o,"description","subtitle",i);var u=ki("updated",i);return u&&(o.updated=new Date(u)),_n(o,"author","email",i,!0),o}function zk(e){var n,i,o=(i=(n=ou("channel",e.children))===null||n===void 0?void 0:n.children)!==null&&i!==void 0?i:[],s={type:e.name.substr(0,3),id:"",items:(0,ys.getElementsByTagName)("item",e.children).map(function(d){var f=d.children,p={media:_v(f)};_n(p,"id","guid",f),_n(p,"title","title",f),_n(p,"link","link",f),_n(p,"description","description",f);var y=ki("pubDate",f)||ki("dc:date",f);return y&&(p.pubDate=new Date(y)),p})};_n(s,"title","title",o),_n(s,"link","link",o),_n(s,"description","description",o);var u=ki("lastBuildDate",o);return u&&(s.updated=new Date(u)),_n(s,"author","managingEditor",o,!0),s}var Bk=["url","type","lang"],Uk=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function _v(e){return(0,ys.getElementsByTagName)("media:content",e).map(function(n){for(var i=n.attribs,o={medium:i.medium,isDefault:!!i.isDefault},s=0,u=Bk;s{const y=p.currentTarget.value;i&&i(y===""?void 0:y,u,p)},[u,i]);return g.jsx("input",{...d,ref:o,className:Oe(AE.rawInput,n),name:Lt(u)?String(u):void 0,onChange:f,value:s??""})}function FE(e,n,i,o){fr.useEffect(()=>{if(!e)return;const s=u=>{const{current:d}=i,{current:f}=o,p=u.target,y=u&&d?d===u.target||d.contains(p):!1,w=f?f===u.target||f.contains(p):!1;n(y,w,u)};return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[e,n,i,o])}var ag={},$E={},as={},Mf={},ss={},Lf={};Object.defineProperty(Lf,"__esModule",{value:!0});Lf.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var Df={};Object.defineProperty(Df,"__esModule",{value:!0});Df.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var Rd={};(function(e){var n;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(n=String.fromCodePoint)!==null&&n!==void 0?n:function(u){var d="";return u>65535&&(u-=65536,d+=String.fromCharCode(u>>>10&1023|55296),u=56320|u&1023),d+=String.fromCharCode(u),d};function o(u){var d;return u>=55296&&u<=57343||u>1114111?65533:(d=i.get(u))!==null&&d!==void 0?d:u}e.replaceCodePoint=o;function s(u){return(0,e.fromCodePoint)(o(u))}e.default=s})(Rd);(function(e){var n=Ae&&Ae.__createBinding||(Object.create?function(I,U,W,ne){ne===void 0&&(ne=W);var he=Object.getOwnPropertyDescriptor(U,W);(!he||("get"in he?!U.__esModule:he.writable||he.configurable))&&(he={enumerable:!0,get:function(){return U[W]}}),Object.defineProperty(I,ne,he)}:function(I,U,W,ne){ne===void 0&&(ne=W),I[ne]=U[W]}),i=Ae&&Ae.__setModuleDefault||(Object.create?function(I,U){Object.defineProperty(I,"default",{enumerable:!0,value:U})}:function(I,U){I.default=U}),o=Ae&&Ae.__importStar||function(I){if(I&&I.__esModule)return I;var U={};if(I!=null)for(var W in I)W!=="default"&&Object.prototype.hasOwnProperty.call(I,W)&&n(U,I,W);return i(U,I),U},s=Ae&&Ae.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var u=s(Lf);e.htmlDecodeTree=u.default;var d=s(Df);e.xmlDecodeTree=d.default;var f=o(Rd);e.decodeCodePoint=f.default;var p=Rd;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return p.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return p.fromCodePoint}});var y;(function(I){I[I.NUM=35]="NUM",I[I.SEMI=59]="SEMI",I[I.EQUALS=61]="EQUALS",I[I.ZERO=48]="ZERO",I[I.NINE=57]="NINE",I[I.LOWER_A=97]="LOWER_A",I[I.LOWER_F=102]="LOWER_F",I[I.LOWER_X=120]="LOWER_X",I[I.LOWER_Z=122]="LOWER_Z",I[I.UPPER_A=65]="UPPER_A",I[I.UPPER_F=70]="UPPER_F",I[I.UPPER_Z=90]="UPPER_Z"})(y||(y={}));var w=32,C;(function(I){I[I.VALUE_LENGTH=49152]="VALUE_LENGTH",I[I.BRANCH_LENGTH=16256]="BRANCH_LENGTH",I[I.JUMP_TABLE=127]="JUMP_TABLE"})(C=e.BinTrieFlags||(e.BinTrieFlags={}));function m(I){return I>=y.ZERO&&I<=y.NINE}function x(I){return I>=y.UPPER_A&&I<=y.UPPER_F||I>=y.LOWER_A&&I<=y.LOWER_F}function N(I){return I>=y.UPPER_A&&I<=y.UPPER_Z||I>=y.LOWER_A&&I<=y.LOWER_Z||m(I)}function b(I){return I===y.EQUALS||N(I)}var E;(function(I){I[I.EntityStart=0]="EntityStart",I[I.NumericStart=1]="NumericStart",I[I.NumericDecimal=2]="NumericDecimal",I[I.NumericHex=3]="NumericHex",I[I.NamedEntity=4]="NamedEntity"})(E||(E={}));var P;(function(I){I[I.Legacy=0]="Legacy",I[I.Strict=1]="Strict",I[I.Attribute=2]="Attribute"})(P=e.DecodingMode||(e.DecodingMode={}));var L=function(){function I(U,W,ne){this.decodeTree=U,this.emitCodePoint=W,this.errors=ne,this.state=E.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=P.Strict}return I.prototype.startEntity=function(U){this.decodeMode=U,this.state=E.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},I.prototype.write=function(U,W){switch(this.state){case E.EntityStart:return U.charCodeAt(W)===y.NUM?(this.state=E.NumericStart,this.consumed+=1,this.stateNumericStart(U,W+1)):(this.state=E.NamedEntity,this.stateNamedEntity(U,W));case E.NumericStart:return this.stateNumericStart(U,W);case E.NumericDecimal:return this.stateNumericDecimal(U,W);case E.NumericHex:return this.stateNumericHex(U,W);case E.NamedEntity:return this.stateNamedEntity(U,W)}},I.prototype.stateNumericStart=function(U,W){return W>=U.length?-1:(U.charCodeAt(W)|w)===y.LOWER_X?(this.state=E.NumericHex,this.consumed+=1,this.stateNumericHex(U,W+1)):(this.state=E.NumericDecimal,this.stateNumericDecimal(U,W))},I.prototype.addToNumericResult=function(U,W,ne,he){if(W!==ne){var Ce=ne-W;this.result=this.result*Math.pow(he,Ce)+parseInt(U.substr(W,Ce),he),this.consumed+=Ce}},I.prototype.stateNumericHex=function(U,W){for(var ne=W;W>14;W>14,Ce!==0){if(_e===y.SEMI)return this.emitNamedEntityData(this.treeIndex,Ce,this.consumed+this.excess);this.decodeMode!==P.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},I.prototype.emitNotTerminatedNamedEntity=function(){var U,W=this,ne=W.result,he=W.decodeTree,Ce=(he[ne]&C.VALUE_LENGTH)>>14;return this.emitNamedEntityData(ne,Ce,this.consumed),(U=this.errors)===null||U===void 0||U.missingSemicolonAfterCharacterReference(),this.consumed},I.prototype.emitNamedEntityData=function(U,W,ne){var he=this.decodeTree;return this.emitCodePoint(W===1?he[U]&~C.VALUE_LENGTH:he[U+1],ne),W===3&&this.emitCodePoint(he[U+2],ne),ne},I.prototype.end=function(){var U;switch(this.state){case E.NamedEntity:return this.result!==0&&(this.decodeMode!==P.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case E.NumericDecimal:return this.emitNumericEntity(0,2);case E.NumericHex:return this.emitNumericEntity(0,3);case E.NumericStart:return(U=this.errors)===null||U===void 0||U.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case E.EntityStart:return 0}},I}();e.EntityDecoder=L;function $(I){var U="",W=new L(I,function(ne){return U+=(0,f.fromCodePoint)(ne)});return function(ne,he){for(var Ce=0,_e=0;(_e=ne.indexOf("&",_e))>=0;){U+=ne.slice(Ce,_e),W.startEntity(he);var G=W.write(ne,_e+1);if(G<0){Ce=_e+W.end();break}Ce=_e+G,_e=G===0?Ce+1:Ce}var ue=U+ne.slice(Ce);return U="",ue}}function H(I,U,W,ne){var he=(U&C.BRANCH_LENGTH)>>7,Ce=U&C.JUMP_TABLE;if(he===0)return Ce!==0&&ne===Ce?W:-1;if(Ce){var _e=ne-Ce;return _e<0||_e>=he?-1:I[W+_e]-1}for(var G=W,ue=G+he-1;G<=ue;){var T=G+ue>>>1,V=I[T];if(Vne)ue=T-1;else return I[T+he]}return-1}e.determineBranch=H;var Z=$(u.default),de=$(d.default);function O(I,U){return U===void 0&&(U=P.Legacy),Z(I,U)}e.decodeHTML=O;function K(I){return Z(I,P.Attribute)}e.decodeHTMLAttribute=K;function ce(I){return Z(I,P.Strict)}e.decodeHTMLStrict=ce;function fe(I){return de(I,P.Strict)}e.decodeXML=fe})(ss);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var n=ss,i;(function(m){m[m.Tab=9]="Tab",m[m.NewLine=10]="NewLine",m[m.FormFeed=12]="FormFeed",m[m.CarriageReturn=13]="CarriageReturn",m[m.Space=32]="Space",m[m.ExclamationMark=33]="ExclamationMark",m[m.Number=35]="Number",m[m.Amp=38]="Amp",m[m.SingleQuote=39]="SingleQuote",m[m.DoubleQuote=34]="DoubleQuote",m[m.Dash=45]="Dash",m[m.Slash=47]="Slash",m[m.Zero=48]="Zero",m[m.Nine=57]="Nine",m[m.Semi=59]="Semi",m[m.Lt=60]="Lt",m[m.Eq=61]="Eq",m[m.Gt=62]="Gt",m[m.Questionmark=63]="Questionmark",m[m.UpperA=65]="UpperA",m[m.LowerA=97]="LowerA",m[m.UpperF=70]="UpperF",m[m.LowerF=102]="LowerF",m[m.UpperZ=90]="UpperZ",m[m.LowerZ=122]="LowerZ",m[m.LowerX=120]="LowerX",m[m.OpeningSquareBracket=91]="OpeningSquareBracket"})(i||(i={}));var o;(function(m){m[m.Text=1]="Text",m[m.BeforeTagName=2]="BeforeTagName",m[m.InTagName=3]="InTagName",m[m.InSelfClosingTag=4]="InSelfClosingTag",m[m.BeforeClosingTagName=5]="BeforeClosingTagName",m[m.InClosingTagName=6]="InClosingTagName",m[m.AfterClosingTagName=7]="AfterClosingTagName",m[m.BeforeAttributeName=8]="BeforeAttributeName",m[m.InAttributeName=9]="InAttributeName",m[m.AfterAttributeName=10]="AfterAttributeName",m[m.BeforeAttributeValue=11]="BeforeAttributeValue",m[m.InAttributeValueDq=12]="InAttributeValueDq",m[m.InAttributeValueSq=13]="InAttributeValueSq",m[m.InAttributeValueNq=14]="InAttributeValueNq",m[m.BeforeDeclaration=15]="BeforeDeclaration",m[m.InDeclaration=16]="InDeclaration",m[m.InProcessingInstruction=17]="InProcessingInstruction",m[m.BeforeComment=18]="BeforeComment",m[m.CDATASequence=19]="CDATASequence",m[m.InSpecialComment=20]="InSpecialComment",m[m.InCommentLike=21]="InCommentLike",m[m.BeforeSpecialS=22]="BeforeSpecialS",m[m.SpecialStartSequence=23]="SpecialStartSequence",m[m.InSpecialTag=24]="InSpecialTag",m[m.BeforeEntity=25]="BeforeEntity",m[m.BeforeNumericEntity=26]="BeforeNumericEntity",m[m.InNamedEntity=27]="InNamedEntity",m[m.InNumericEntity=28]="InNumericEntity",m[m.InHexEntity=29]="InHexEntity"})(o||(o={}));function s(m){return m===i.Space||m===i.NewLine||m===i.Tab||m===i.FormFeed||m===i.CarriageReturn}function u(m){return m===i.Slash||m===i.Gt||s(m)}function d(m){return m>=i.Zero&&m<=i.Nine}function f(m){return m>=i.LowerA&&m<=i.LowerZ||m>=i.UpperA&&m<=i.UpperZ}function p(m){return m>=i.UpperA&&m<=i.UpperF||m>=i.LowerA&&m<=i.LowerF}var y;(function(m){m[m.NoValue=0]="NoValue",m[m.Unquoted=1]="Unquoted",m[m.Single=2]="Single",m[m.Double=3]="Double"})(y=e.QuoteType||(e.QuoteType={}));var w={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},C=function(){function m(x,N){var b=x.xmlMode,E=b===void 0?!1:b,P=x.decodeEntities,L=P===void 0?!0:P;this.cbs=N,this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=E,this.decodeEntities=L,this.entityTrie=E?n.xmlDecodeTree:n.htmlDecodeTree}return m.prototype.reset=function(){this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},m.prototype.write=function(x){this.offset+=this.buffer.length,this.buffer=x,this.parse()},m.prototype.end=function(){this.running&&this.finish()},m.prototype.pause=function(){this.running=!1},m.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=o.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&x===i.Amp&&(this.state=o.BeforeEntity)},m.prototype.stateSpecialStartSequence=function(x){var N=this.sequenceIndex===this.currentSequence.length,b=N?u(x):(x|32)===this.currentSequence[this.sequenceIndex];if(!b)this.isSpecial=!1;else if(!N){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=o.InTagName,this.stateInTagName(x)},m.prototype.stateInSpecialTag=function(x){if(this.sequenceIndex===this.currentSequence.length){if(x===i.Gt||s(x)){var N=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&x!==i.Semi)this.trieIndex+=b;else{var E=this.index-this.entityExcess+1;E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.entityResult=this.trieIndex,this.trieIndex+=b,this.entityExcess=0,this.sectionStart=this.index+1,b===0&&this.emitNamedEntity()}}},m.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var x=(this.entityTrie[this.entityResult]&n.BinTrieFlags.VALUE_LENGTH)>>14;switch(x){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~n.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},m.prototype.stateBeforeNumericEntity=function(x){(x|32)===i.LowerX?(this.entityExcess++,this.state=o.InHexEntity):(this.state=o.InNumericEntity,this.stateInNumericEntity(x))},m.prototype.emitNumericEntity=function(x){var N=this.index-this.entityExcess-1,b=N+2+ +(this.state===o.InHexEntity);b!==this.index&&(N>this.sectionStart&&this.emitPartial(this.sectionStart,N),this.sectionStart=this.index+Number(x),this.emitCodePoint((0,n.replaceCodePoint)(this.entityResult))),this.state=this.baseState},m.prototype.stateInNumericEntity=function(x){x===i.Semi?this.emitNumericEntity(!0):d(x)?(this.entityResult=this.entityResult*10+(x-i.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},m.prototype.stateInHexEntity=function(x){x===i.Semi?this.emitNumericEntity(!0):d(x)?(this.entityResult=this.entityResult*16+(x-i.Zero),this.entityExcess++):p(x)?(this.entityResult=this.entityResult*16+((x|32)-i.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},m.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===o.Text||this.baseState===o.InSpecialTag)},m.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===o.Text||this.state===o.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===o.InAttributeValueDq||this.state===o.InAttributeValueSq||this.state===o.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},m.prototype.shouldContinue=function(){return this.index0&&d.has(this.stack[this.stack.length-1]);){var f=this.stack.pop();(o=(i=this.cbs).onclosetag)===null||o===void 0||o.call(i,f,!0)}this.isVoidElement(n)||(this.stack.push(n),dg.has(n)?this.foreignContext.push(!0):fg.has(n)&&this.foreignContext.push(!1)),(u=(s=this.cbs).onopentagname)===null||u===void 0||u.call(s,n),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(n){var i,o;this.startIndex=this.openTagStart,this.attribs&&((o=(i=this.cbs).onopentag)===null||o===void 0||o.call(i,this.tagname,this.attribs,n),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(n){this.endIndex=n,this.endOpenTag(!1),this.startIndex=n+1},e.prototype.onclosetag=function(n,i){var o,s,u,d,f,p;this.endIndex=i;var y=this.getSlice(n,i);if(this.lowerCaseTagNames&&(y=y.toLowerCase()),(dg.has(y)||fg.has(y))&&this.foreignContext.pop(),this.isVoidElement(y))!this.options.xmlMode&&y==="br"&&((s=(o=this.cbs).onopentagname)===null||s===void 0||s.call(o,"br"),(d=(u=this.cbs).onopentag)===null||d===void 0||d.call(u,"br",{},!0),(p=(f=this.cbs).onclosetag)===null||p===void 0||p.call(f,"br",!1));else{var w=this.stack.lastIndexOf(y);if(w!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-w;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=w;else!this.options.xmlMode&&y==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=i+1},e.prototype.onselfclosingtag=function(n){this.endIndex=n,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=n+1):this.onopentagend(n)},e.prototype.closeCurrentTag=function(n){var i,o,s=this.tagname;this.endOpenTag(n),this.stack[this.stack.length-1]===s&&((o=(i=this.cbs).onclosetag)===null||o===void 0||o.call(i,s,!n),this.stack.pop())},e.prototype.onattribname=function(n,i){this.startIndex=n;var o=this.getSlice(n,i);this.attribname=this.lowerCaseAttributeNames?o.toLowerCase():o},e.prototype.onattribdata=function(n,i){this.attribvalue+=this.getSlice(n,i)},e.prototype.onattribentity=function(n){this.attribvalue+=(0,sg.fromCodePoint)(n)},e.prototype.onattribend=function(n,i){var o,s;this.endIndex=i,(s=(o=this.cbs).onattribute)===null||s===void 0||s.call(o,this.attribname,this.attribvalue,n===Ml.QuoteType.Double?'"':n===Ml.QuoteType.Single?"'":n===Ml.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(n){var i=n.search(qE),o=i<0?n:n.substr(0,i);return this.lowerCaseTagNames&&(o=o.toLowerCase()),o},e.prototype.ondeclaration=function(n,i){this.endIndex=i;var o=this.getSlice(n,i);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(o);this.cbs.onprocessinginstruction("!".concat(s),"!".concat(o))}this.startIndex=i+1},e.prototype.onprocessinginstruction=function(n,i){this.endIndex=i;var o=this.getSlice(n,i);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(o);this.cbs.onprocessinginstruction("?".concat(s),"?".concat(o))}this.startIndex=i+1},e.prototype.oncomment=function(n,i,o){var s,u,d,f;this.endIndex=i,(u=(s=this.cbs).oncomment)===null||u===void 0||u.call(s,this.getSlice(n,i-o)),(f=(d=this.cbs).oncommentend)===null||f===void 0||f.call(d),this.startIndex=i+1},e.prototype.oncdata=function(n,i,o){var s,u,d,f,p,y,w,C,m,x;this.endIndex=i;var N=this.getSlice(n,i-o);this.options.xmlMode||this.options.recognizeCDATA?((u=(s=this.cbs).oncdatastart)===null||u===void 0||u.call(s),(f=(d=this.cbs).ontext)===null||f===void 0||f.call(d,N),(y=(p=this.cbs).oncdataend)===null||y===void 0||y.call(p)):((C=(w=this.cbs).oncomment)===null||C===void 0||C.call(w,"[CDATA[".concat(N,"]]")),(x=(m=this.cbs).oncommentend)===null||x===void 0||x.call(m)),this.startIndex=i+1},e.prototype.onend=function(){var n,i;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var o=this.stack.length;o>0;this.cbs.onclosetag(this.stack[--o],!0));}(i=(n=this.cbs).onend)===null||i===void 0||i.call(n)},e.prototype.reset=function(){var n,i,o,s;(i=(n=this.cbs).onreset)===null||i===void 0||i.call(n),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(s=(o=this.cbs).onparserinit)===null||s===void 0||s.call(o,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(n){this.reset(),this.end(n)},e.prototype.getSlice=function(n,i){for(;n-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var o=this.buffers[0].slice(n-this.bufferOffset,i-this.bufferOffset);i-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),o+=this.buffers[0].slice(0,i-this.bufferOffset);return o},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(n){var i,o;if(this.ended){(o=(i=this.cbs).onerror)===null||o===void 0||o.call(i,new Error(".write() after done!"));return}this.buffers.push(n),this.tokenizer.running&&(this.tokenizer.write(n),this.writeIndex++)},e.prototype.end=function(n){var i,o;if(this.ended){(o=(i=this.cbs).onerror)===null||o===void 0||o.call(i,new Error(".end() after done!"));return}n&&this.write(n),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(i){this.children=i},enumerable:!1,configurable:!0}),n}(Of);We.NodeWithChildren=fu;var nv=function(e){Ti(n,e);function n(){var i=e!==null&&e.apply(this,arguments)||this;return i.type=Nn.ElementType.CDATA,i}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(fu);We.CDATA=nv;var rv=function(e){Ti(n,e);function n(){var i=e!==null&&e.apply(this,arguments)||this;return i.type=Nn.ElementType.Root,i}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(fu);We.Document=rv;var iv=function(e){Ti(n,e);function n(i,o,s,u){s===void 0&&(s=[]),u===void 0&&(u=i==="script"?Nn.ElementType.Script:i==="style"?Nn.ElementType.Style:Nn.ElementType.Tag);var d=e.call(this,s)||this;return d.name=i,d.attribs=o,d.type=u,d}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(i){this.name=i},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var i=this;return Object.keys(this.attribs).map(function(o){var s,u;return{name:o,value:i.attribs[o],namespace:(s=i["x-attribsNamespace"])===null||s===void 0?void 0:s[o],prefix:(u=i["x-attribsPrefix"])===null||u===void 0?void 0:u[o]}})},enumerable:!1,configurable:!0}),n}(fu);We.Element=iv;function ov(e){return(0,Nn.isTag)(e)}We.isTag=ov;function av(e){return e.type===Nn.ElementType.CDATA}We.isCDATA=av;function sv(e){return e.type===Nn.ElementType.Text}We.isText=sv;function lv(e){return e.type===Nn.ElementType.Comment}We.isComment=lv;function uv(e){return e.type===Nn.ElementType.Directive}We.isDirective=uv;function cv(e){return e.type===Nn.ElementType.Root}We.isDocument=cv;function GE(e){return Object.prototype.hasOwnProperty.call(e,"children")}We.hasChildren=GE;function Rf(e,n){n===void 0&&(n=!1);var i;if(sv(e))i=new J0(e.data);else if(lv(e))i=new ev(e.data);else if(ov(e)){var o=n?vd(e.children):[],s=new iv(e.name,Ya({},e.attribs),o);o.forEach(function(p){return p.parent=s}),e.namespace!=null&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]=Ya({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]=Ya({},e["x-attribsPrefix"])),i=s}else if(av(e)){var o=n?vd(e.children):[],u=new nv(o);o.forEach(function(y){return y.parent=u}),i=u}else if(cv(e)){var o=n?vd(e.children):[],d=new rv(o);o.forEach(function(y){return y.parent=d}),e["x-mode"]&&(d["x-mode"]=e["x-mode"]),i=d}else if(uv(e)){var f=new tv(e.name,e.data);e["x-name"]!=null&&(f["x-name"]=e["x-name"],f["x-publicId"]=e["x-publicId"],f["x-systemId"]=e["x-systemId"]),i=f}else throw new Error("Not implemented yet: ".concat(e.type));return i.startIndex=e.startIndex,i.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(i.sourceCodeLocation=e.sourceCodeLocation),i}We.cloneNode=Rf;function vd(e){for(var n=e.map(function(o){return Rf(o,!0)}),i=1;i$\x80-\uFFFF]/g;var n=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(s,u){return s.codePointAt(u)}:function(s,u){return(s.charCodeAt(u)&64512)===55296?(s.charCodeAt(u)-55296)*1024+s.charCodeAt(u+1)-56320+65536:s.charCodeAt(u)};function i(s){for(var u="",d=0,f;(f=e.xmlReplacer.exec(s))!==null;){var p=f.index,y=s.charCodeAt(p),w=n.get(y);w!==void 0?(u+=s.substring(d,p)+w,d=p+1):(u+="".concat(s.substring(d,p),"&#x").concat((0,e.getCodePoint)(s,p).toString(16),";"),d=e.xmlReplacer.lastIndex+=+((y&64512)===55296))}return u+s.substr(d)}e.encodeXML=i,e.escape=i;function o(s,u){return function(d){for(var f,p=0,y="";f=s.exec(d);)p!==f.index&&(y+=d.substring(p,f.index)),y+=u.get(f[0].charCodeAt(0)),p=f.index+1;return y+d.substring(p)}}e.escapeUTF8=o(/[&<>'"]/g,n),e.escapeAttribute=o(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=o(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(nu);var ZE=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(co,"__esModule",{value:!0});co.encodeNonAsciiHTML=co.encodeHTML=void 0;var QE=ZE(If),fv=nu,KE=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function YE(e){return hv(KE,e)}co.encodeHTML=YE;function XE(e){return hv(fv.xmlReplacer,e)}co.encodeNonAsciiHTML=XE;function hv(e,n){for(var i="",o=0,s;(s=e.exec(n))!==null;){var u=s.index;i+=n.substring(o,u);var d=n.charCodeAt(u),f=QE.default.get(d);if(typeof f=="object"){if(u+10&&(o+=hu(e.children,n)),(n.xmlMode||!hg.has(e.name))&&(o+=""))),o}function uk(e){return"<".concat(e.data,">")}function ck(e,n){var i,o=e.data||"";return((i=n.encodeEntities)!==null&&i!==void 0?i:n.decodeEntities)!==!1&&!(!n.xmlMode&&e.parent&&nk.has(e.parent.name))&&(o=n.xmlMode||n.encodeEntities!=="utf8"?(0,ru.encodeXML)(o):(0,ru.escapeText)(o)),o}function dk(e){return"")}function fk(e){return"")}var hk=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(An,"__esModule",{value:!0});An.innerText=An.textContent=An.getText=An.getInnerHTML=An.getOuterHTML=void 0;var br=Kr,pk=hk(gs),mk=ia;function mv(e,n){return(0,pk.default)(e,n)}An.getOuterHTML=mv;function gk(e,n){return(0,br.hasChildren)(e)?e.children.map(function(i){return mv(i,n)}).join(""):""}An.getInnerHTML=gk;function Wl(e){return Array.isArray(e)?e.map(Wl).join(""):(0,br.isTag)(e)?e.name==="br"?` +`:Wl(e.children):(0,br.isCDATA)(e)?Wl(e.children):(0,br.isText)(e)?e.data:""}An.getText=Wl;function Id(e){return Array.isArray(e)?e.map(Id).join(""):(0,br.hasChildren)(e)&&!(0,br.isComment)(e)?Id(e.children):(0,br.isText)(e)?e.data:""}An.textContent=Id;function Ad(e){return Array.isArray(e)?e.map(Ad).join(""):(0,br.hasChildren)(e)&&(e.type===mk.ElementType.Tag||(0,br.isCDATA)(e))?Ad(e.children):(0,br.isText)(e)?e.data:""}An.innerText=Ad;var qt={};Object.defineProperty(qt,"__esModule",{value:!0});qt.prevElementSibling=qt.nextElementSibling=qt.getName=qt.hasAttrib=qt.getAttributeValue=qt.getSiblings=qt.getParent=qt.getChildren=void 0;var Af=Kr;function gv(e){return(0,Af.hasChildren)(e)?e.children:[]}qt.getChildren=gv;function vv(e){return e.parent||null}qt.getParent=vv;function vk(e){var n,i,o=vv(e);if(o!=null)return gv(o);for(var s=[e],u=e.prev,d=e.next;u!=null;)s.unshift(u),n=u,u=n.prev;for(;d!=null;)s.push(d),i=d,d=i.next;return s}qt.getSiblings=vk;function yk(e,n){var i;return(i=e.attribs)===null||i===void 0?void 0:i[n]}qt.getAttributeValue=yk;function wk(e,n){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,n)&&e.attribs[n]!=null}qt.hasAttrib=wk;function xk(e){return e.name}qt.getName=xk;function Ck(e){for(var n,i=e.next;i!==null&&!(0,Af.isTag)(i);)n=i,i=n.next;return i}qt.nextElementSibling=Ck;function Sk(e){for(var n,i=e.prev;i!==null&&!(0,Af.isTag)(i);)n=i,i=n.prev;return i}qt.prevElementSibling=Sk;var En={};Object.defineProperty(En,"__esModule",{value:!0});En.prepend=En.prependChild=En.append=En.appendChild=En.replaceElement=En.removeElement=void 0;function vs(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var n=e.parent.children,i=n.lastIndexOf(e);i>=0&&n.splice(i,1)}e.next=null,e.prev=null,e.parent=null}En.removeElement=vs;function bk(e,n){var i=n.prev=e.prev;i&&(i.next=n);var o=n.next=e.next;o&&(o.prev=n);var s=n.parent=e.parent;if(s){var u=s.children;u[u.lastIndexOf(e)]=n,e.parent=null}}En.replaceElement=bk;function _k(e,n){if(vs(n),n.next=null,n.parent=e,e.children.push(n)>1){var i=e.children[e.children.length-2];i.next=n,n.prev=i}else n.prev=null}En.appendChild=_k;function Ek(e,n){vs(n);var i=e.parent,o=e.next;if(n.next=o,n.prev=e,e.next=n,n.parent=i,o){if(o.prev=n,i){var s=i.children;s.splice(s.lastIndexOf(o),0,n)}}else i&&i.children.push(n)}En.append=Ek;function kk(e,n){if(vs(n),n.parent=e,n.prev=null,e.children.unshift(n)!==1){var i=e.children[1];i.prev=n,n.next=i}else n.next=null}En.prependChild=kk;function Nk(e,n){vs(n);var i=e.parent;if(i){var o=i.children;o.splice(o.indexOf(e),0,n)}e.prev&&(e.prev.next=n),n.parent=i,n.prev=e.prev,n.next=e,e.prev=n}En.prepend=Nk;var sn={};Object.defineProperty(sn,"__esModule",{value:!0});sn.findAll=sn.existsOne=sn.findOne=sn.findOneChild=sn.find=sn.filter=void 0;var pu=Kr;function Tk(e,n,i,o){return i===void 0&&(i=!0),o===void 0&&(o=1/0),yv(e,Array.isArray(n)?n:[n],i,o)}sn.filter=Tk;function yv(e,n,i,o){for(var s=[],u=[n],d=[0];;){if(d[0]>=u[0].length){if(d.length===1)return s;u.shift(),d.shift();continue}var f=u[0][d[0]++];if(e(f)&&(s.push(f),--o<=0))return s;i&&(0,pu.hasChildren)(f)&&f.children.length>0&&(d.unshift(0),u.unshift(f.children))}}sn.find=yv;function jk(e,n){return n.find(e)}sn.findOneChild=jk;function wv(e,n,i){i===void 0&&(i=!0);for(var o=null,s=0;s0&&(o=wv(e,u.children,!0));else continue}return o}sn.findOne=wv;function xv(e,n){return n.some(function(i){return(0,pu.isTag)(i)&&(e(i)||xv(e,i.children))})}sn.existsOne=xv;function Pk(e,n){for(var i=[],o=[n],s=[0];;){if(s[0]>=o[0].length){if(o.length===1)return i;o.shift(),s.shift();continue}var u=o[0][s[0]++];(0,pu.isTag)(u)&&(e(u)&&i.push(u),u.children.length>0&&(s.unshift(0),o.unshift(u.children)))}}sn.findAll=Pk;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.getElementsByTagType=Fn.getElementsByTagName=Fn.getElementById=Fn.getElements=Fn.testElement=void 0;var io=Kr,mu=sn,iu={tag_name:function(e){return typeof e=="function"?function(n){return(0,io.isTag)(n)&&e(n.name)}:e==="*"?io.isTag:function(n){return(0,io.isTag)(n)&&n.name===e}},tag_type:function(e){return typeof e=="function"?function(n){return e(n.type)}:function(n){return n.type===e}},tag_contains:function(e){return typeof e=="function"?function(n){return(0,io.isText)(n)&&e(n.data)}:function(n){return(0,io.isText)(n)&&n.data===e}}};function Cv(e,n){return typeof n=="function"?function(i){return(0,io.isTag)(i)&&n(i.attribs[e])}:function(i){return(0,io.isTag)(i)&&i.attribs[e]===n}}function Mk(e,n){return function(i){return e(i)||n(i)}}function Sv(e){var n=Object.keys(e).map(function(i){var o=e[i];return Object.prototype.hasOwnProperty.call(iu,i)?iu[i](o):Cv(i,o)});return n.length===0?null:n.reduce(Mk)}function Lk(e,n){var i=Sv(e);return i?i(n):!0}Fn.testElement=Lk;function Dk(e,n,i,o){o===void 0&&(o=1/0);var s=Sv(e);return s?(0,mu.filter)(s,n,i,o):[]}Fn.getElements=Dk;function Ok(e,n,i){return i===void 0&&(i=!0),Array.isArray(n)||(n=[n]),(0,mu.findOne)(Cv("id",e),n,i)}Fn.getElementById=Ok;function Rk(e,n,i,o){return i===void 0&&(i=!0),o===void 0&&(o=1/0),(0,mu.filter)(iu.tag_name(e),n,i,o)}Fn.getElementsByTagName=Rk;function Ik(e,n,i,o){return i===void 0&&(i=!0),o===void 0&&(o=1/0),(0,mu.filter)(iu.tag_type(e),n,i,o)}Fn.getElementsByTagType=Ik;var bv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var n=Kr;function i(d){for(var f=d.length;--f>=0;){var p=d[f];if(f>0&&d.lastIndexOf(p,f-1)>=0){d.splice(f,1);continue}for(var y=p.parent;y;y=y.parent)if(d.includes(y)){d.splice(f,1);break}}return d}e.removeSubsets=i;var o;(function(d){d[d.DISCONNECTED=1]="DISCONNECTED",d[d.PRECEDING=2]="PRECEDING",d[d.FOLLOWING=4]="FOLLOWING",d[d.CONTAINS=8]="CONTAINS",d[d.CONTAINED_BY=16]="CONTAINED_BY"})(o=e.DocumentPosition||(e.DocumentPosition={}));function s(d,f){var p=[],y=[];if(d===f)return 0;for(var w=(0,n.hasChildren)(d)?d:d.parent;w;)p.unshift(w),w=w.parent;for(w=(0,n.hasChildren)(f)?f:f.parent;w;)y.unshift(w),w=w.parent;for(var C=Math.min(p.length,y.length),m=0;mN.indexOf(E)?x===f?o.FOLLOWING|o.CONTAINED_BY:o.FOLLOWING:x===d?o.PRECEDING|o.CONTAINS:o.PRECEDING}e.compareDocumentPosition=s;function u(d){return d=d.filter(function(f,p,y){return!y.includes(f,p+1)}),d.sort(function(f,p){var y=s(f,p);return y&o.PRECEDING?-1:y&o.FOLLOWING?1:0}),d}e.uniqueSort=u})(bv);var gu={};Object.defineProperty(gu,"__esModule",{value:!0});gu.getFeed=void 0;var Ak=An,ys=Fn;function Fk(e){var n=ou(Hk,e);return n?n.name==="feed"?$k(n):zk(n):null}gu.getFeed=Fk;function $k(e){var n,i=e.children,o={type:"atom",items:(0,ys.getElementsByTagName)("entry",i).map(function(d){var f,p=d.children,y={media:_v(p)};_n(y,"id","id",p),_n(y,"title","title",p);var w=(f=ou("link",p))===null||f===void 0?void 0:f.attribs.href;w&&(y.link=w);var C=ki("summary",p)||ki("content",p);C&&(y.description=C);var m=ki("updated",p);return m&&(y.pubDate=new Date(m)),y})};_n(o,"id","id",i),_n(o,"title","title",i);var s=(n=ou("link",i))===null||n===void 0?void 0:n.attribs.href;s&&(o.link=s),_n(o,"description","subtitle",i);var u=ki("updated",i);return u&&(o.updated=new Date(u)),_n(o,"author","email",i,!0),o}function zk(e){var n,i,o=(i=(n=ou("channel",e.children))===null||n===void 0?void 0:n.children)!==null&&i!==void 0?i:[],s={type:e.name.substr(0,3),id:"",items:(0,ys.getElementsByTagName)("item",e.children).map(function(d){var f=d.children,p={media:_v(f)};_n(p,"id","guid",f),_n(p,"title","title",f),_n(p,"link","link",f),_n(p,"description","description",f);var y=ki("pubDate",f)||ki("dc:date",f);return y&&(p.pubDate=new Date(y)),p})};_n(s,"title","title",o),_n(s,"link","link",o),_n(s,"description","description",o);var u=ki("lastBuildDate",o);return u&&(s.updated=new Date(u)),_n(s,"author","managingEditor",o,!0),s}var Bk=["url","type","lang"],Uk=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function _v(e){return(0,ys.getElementsByTagName)("media:content",e).map(function(n){for(var i=n.attribs,o={medium:i.medium,isDefault:!!i.isDefault},s=0,u=Bk;s * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function pg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vk(e){var n,i;return pg(e)===!1?!1:(n=e.constructor,n===void 0?!0:(i=n.prototype,!(pg(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}Ff.isPlainObject=Vk;var qk={exports:{}};(function(e){(function(n,i){e.exports?e.exports=i():n.parseSrcset=i()})(Ae,function(){return function(n){function i(q){return q===" "||q===" "||q===` -`||q==="\f"||q==="\r"}function o(q){var Z,fe=q.exec(n.substring(N));if(fe)return Z=fe[0],N+=Z.length,Z}for(var s=n.length,u=/^[ \t\n\r\u000c]+/,d=/^[, \t\n\r\u000c]+/,f=/^[^ \t\n\r\u000c]+/,p=/[,]+$/,y=/^\d+$/,w=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,C,m,x,E,b,N=0,P=[];;){if(o(d),N>=s)return P;C=o(f),m=[],C.slice(-1)===","?(C=C.replace(p,""),$()):L()}function L(){for(o(u),x="",E="in descriptor";;){if(b=n.charAt(N),E==="in descriptor")if(i(b))x&&(m.push(x),x="",E="after descriptor");else if(b===","){N+=1,x&&m.push(x),$();return}else if(b==="(")x=x+b,E="in parens";else if(b===""){x&&m.push(x),$();return}else x=x+b;else if(E==="in parens")if(b===")")x=x+b,E="in descriptor";else if(b===""){m.push(x),$();return}else x=x+b;else if(E==="after descriptor"&&!i(b))if(b===""){$();return}else E="in descriptor",N-=1;N+=1}}function $(){var q=!1,Z,fe,O,K,ce={},de,I,U,W,ne;for(K=0;K",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let i=this.source;n==null&&(n=mg.isColorSupported);let o=w=>w,s=w=>w,u=w=>w;if(n){let{bold:w,gray:C,red:m}=mg.createColors(!0);s=x=>w(m(x)),o=x=>C(x),gg&&(u=x=>gg(x))}let d=i.split(/\r?\n/),f=Math.max(this.line-3,0),p=Math.min(this.line+2,d.length),y=String(p).length;return d.slice(f,p).map((w,C)=>{let m=f+1+C,x=" "+(" "+m).slice(-y)+" | ";if(m===this.line){if(w.length>160){let b=20,N=Math.max(0,this.column-b),P=Math.max(this.column+b,this.endColumn+b),L=w.slice(N,P),$=o(x.replace(/\d/g," "))+w.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return s(">")+o(x)+u(L)+` - `+$+s("^")}let E=o(x.replace(/\d/g," "))+w.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+o(x)+u(w)+` - `+E+s("^")}return" "+o(x)+u(w)}).join(` + */function pg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vk(e){var n,i;return pg(e)===!1?!1:(n=e.constructor,n===void 0?!0:(i=n.prototype,!(pg(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}Ff.isPlainObject=Vk;var qk={exports:{}};(function(e){(function(n,i){e.exports?e.exports=i():n.parseSrcset=i()})(Ae,function(){return function(n){function i(H){return H===" "||H===" "||H===` +`||H==="\f"||H==="\r"}function o(H){var Z,de=H.exec(n.substring(E));if(de)return Z=de[0],E+=Z.length,Z}for(var s=n.length,u=/^[ \t\n\r\u000c]+/,d=/^[, \t\n\r\u000c]+/,f=/^[^ \t\n\r\u000c]+/,p=/[,]+$/,y=/^\d+$/,w=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,C,m,x,N,b,E=0,P=[];;){if(o(d),E>=s)return P;C=o(f),m=[],C.slice(-1)===","?(C=C.replace(p,""),$()):L()}function L(){for(o(u),x="",N="in descriptor";;){if(b=n.charAt(E),N==="in descriptor")if(i(b))x&&(m.push(x),x="",N="after descriptor");else if(b===","){E+=1,x&&m.push(x),$();return}else if(b==="(")x=x+b,N="in parens";else if(b===""){x&&m.push(x),$();return}else x=x+b;else if(N==="in parens")if(b===")")x=x+b,N="in descriptor";else if(b===""){m.push(x),$();return}else x=x+b;else if(N==="after descriptor"&&!i(b))if(b===""){$();return}else N="in descriptor",E-=1;E+=1}}function $(){var H=!1,Z,de,O,K,ce={},fe,I,U,W,ne;for(K=0;K",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let i=this.source;n==null&&(n=mg.isColorSupported);let o=w=>w,s=w=>w,u=w=>w;if(n){let{bold:w,gray:C,red:m}=mg.createColors(!0);s=x=>w(m(x)),o=x=>C(x),gg&&(u=x=>gg(x))}let d=i.split(/\r?\n/),f=Math.max(this.line-3,0),p=Math.min(this.line+2,d.length),y=String(p).length;return d.slice(f,p).map((w,C)=>{let m=f+1+C,x=" "+(" "+m).slice(-y)+" | ";if(m===this.line){if(w.length>160){let b=20,E=Math.max(0,this.column-b),P=Math.max(this.column+b,this.endColumn+b),L=w.slice(E,P),$=o(x.replace(/\d/g," "))+w.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return s(">")+o(x)+u(L)+` + `+$+s("^")}let N=o(x.replace(/\d/g," "))+w.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+o(x)+u(w)+` + `+N+s("^")}return" "+o(x)+u(w)}).join(` `)}toString(){let n=this.showSourceCode();return n&&(n=` `+n+` @@ -141,21 +141,21 @@ Error generating stack: `+h.message+` `;this.css.includes(`\r `)&&(n=`\r `),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),i=e.root||Gl(e.file),o;this.mapOpts.sourcesContent===!1?(o=new Qv(e.text),o.sourcesContent&&(o.sourcesContent=null)):o=e.consumer(),this.map.applySourceMap(o,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),TN&&NN&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Zl.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Zl({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Zl({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,i="",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,u;this.stringify(this.root,(d,f,p)=>{if(this.css+=d,f&&p!=="end"&&(o.generated.line=e,o.generated.column=n-1,f.source&&f.source.start?(o.source=this.sourcePath(f),o.original.line=f.source.start.line,o.original.column=f.source.start.column-1,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,this.map.addMapping(o))),u=d.match(/\n/g),u?(e+=u.length,s=d.lastIndexOf(` -`),n=d.length-s):n+=d.length,f&&p!=="start"){let y=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==y.last||y.raws.semicolon)&&(f.source&&f.source.end?(o.source=this.sourcePath(f),o.original.line=f.source.end.line,o.original.column=f.source.end.column-1,o.generated.line=e,o.generated.column=n-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=e,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let i=this.opts.to?Gl(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=Gl(Gv(i,this.mapOpts.annotation)));let o=Wv(i,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new kN(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let i=n.source.input.from;if(i&&!e[i]){e[i]=!0;let o=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(o,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(bg){let i=bg(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;Zv==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var Kv=jN;const Cd=39,_g=34,Ol=92,Eg=47,Rl=10,Va=32,Il=12,Al=9,Fl=13,PN=91,MN=93,LN=40,DN=41,ON=123,RN=125,IN=59,AN=42,FN=58,$N=64,$l=/[\t\n\f\r "#'()/;[\\\]{}]/g,zl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,zN=/.[\r\n"'(/\\]/,kg=/[\da-f]/i;var BN=function(e,n={}){let i=e.css.valueOf(),o=n.ignoreErrors,s,u,d,f,p,y,w,C,m,x,E=i.length,b=0,N=[],P=[];function L(){return b}function $(O){throw e.error("Unclosed "+O,b)}function q(){return P.length===0&&b>=E}function Z(O){if(P.length)return P.pop();if(b>=E)return;let K=O?O.ignoreUnclosed:!1;switch(s=i.charCodeAt(b),s){case Rl:case Va:case Al:case Fl:case Il:{f=b;do f+=1,s=i.charCodeAt(f);while(s===Va||s===Rl||s===Al||s===Fl||s===Il);y=["space",i.slice(b,f)],b=f-1;break}case PN:case MN:case ON:case RN:case FN:case IN:case DN:{let ce=String.fromCharCode(s);y=[ce,ce,b];break}case LN:{if(x=N.length?N.pop()[1]:"",m=i.charCodeAt(b+1),x==="url"&&m!==Cd&&m!==_g&&m!==Va&&m!==Rl&&m!==Al&&m!==Il&&m!==Fl){f=b;do{if(w=!1,f=i.indexOf(")",f+1),f===-1)if(o||K){f=b;break}else $("bracket");for(C=f;i.charCodeAt(C-1)===Ol;)C-=1,w=!w}while(w);y=["brackets",i.slice(b,f+1),b,f],b=f}else f=i.indexOf(")",b+1),u=i.slice(b,f+1),f===-1||zN.test(u)?y=["(","(",b]:(y=["brackets",u,b,f],b=f);break}case Cd:case _g:{p=s===Cd?"'":'"',f=b;do{if(w=!1,f=i.indexOf(p,f+1),f===-1)if(o||K){f=b+1;break}else $("string");for(C=f;i.charCodeAt(C-1)===Ol;)C-=1,w=!w}while(w);y=["string",i.slice(b,f+1),b,f],b=f;break}case $N:{$l.lastIndex=b+1,$l.test(i),$l.lastIndex===0?f=i.length-1:f=$l.lastIndex-2,y=["at-word",i.slice(b,f+1),b,f],b=f;break}case Ol:{for(f=b,d=!0;i.charCodeAt(f+1)===Ol;)f+=1,d=!d;if(s=i.charCodeAt(f+1),d&&s!==Eg&&s!==Va&&s!==Rl&&s!==Al&&s!==Fl&&s!==Il&&(f+=1,kg.test(i.charAt(f)))){for(;kg.test(i.charAt(f+1));)f+=1;i.charCodeAt(f+1)===Va&&(f+=1)}y=["word",i.slice(b,f+1),b,f],b=f;break}default:{s===Eg&&i.charCodeAt(b+1)===AN?(f=i.indexOf("*/",b+2)+1,f===0&&(o||K?f=i.length:$("comment")),y=["comment",i.slice(b,f+1),b,f],b=f):(zl.lastIndex=b+1,zl.test(i),zl.lastIndex===0?f=i.length-1:f=zl.lastIndex-2,y=["word",i.slice(b,f+1),b,f],N.push(y),b=f);break}}return b++,y}function fe(O){P.push(O)}return{back:fe,endOfFile:q,nextToken:Z,position:L}};let UN=Hf,HN=wu,VN=xu,qN=xs,Ng=qf,WN=BN;const Tg={empty:!0,space:!0};function GN(e){for(let n=e.length-1;n>=0;n--){let i=e[n],o=i[3]||i[2];if(o)return o}}let ZN=class{constructor(e){this.input=e,this.root=new qN,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new UN;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i,o,s,u=!1,d=!1,f=[],p=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?p.push(i==="("?")":"]"):i==="{"&&p.length>0?p.push("}"):i===p[p.length-1]&&p.pop(),p.length===0)if(i===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){d=!0;break}else if(i==="}"){if(f.length>0){for(s=f.length-1,o=f[s];o&&o[0]==="space";)o=f[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){u=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(n.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(n,"params",f),u&&(e=f[f.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),d&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let i=0,o;for(let s=n-1;s>=0&&(o=e[s],!(o[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(e){let n=0,i,o,s;for(let[u,d]of e.entries()){if(o=d,s=o[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!i)this.doubleColon(o);else{if(i[0]==="word"&&i[1]==="progid")continue;return u}i=o}return!1}comment(e){let n=new HN;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))n.text="",n.raws.left=i,n.raws.right="";else{let o=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=o[2],n.raws.left=o[1],n.raws.right=o[3]}}createTokenizer(){this.tokenizer=WN(this.input)}decl(e,n){let i=new VN;this.init(i,e[0][2]);let o=e[e.length-1];for(o[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(o[3]||o[2]||GN(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let u=[],d;for(;e.length&&(d=e[0][0],!(d!=="space"&&d!=="comment"));)u.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(s=e[f],s[1].toLowerCase()==="!important"){i.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(i.raws.important=p);break}else if(s[1].toLowerCase()==="important"){let p=e.slice(0),y="";for(let w=f;w>0;w--){let C=p[w][0];if(y.trim().startsWith("!")&&C!=="space")break;y=p.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,e=p)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(i.raws.between+=u.map(f=>f[1]).join(""),u=[]),this.raw(i,"value",u.concat(e),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new Ng;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,i=null,o=!1,s=null,u=[],d=e[1].startsWith("--"),f=[],p=e;for(;p;){if(i=p[0],f.push(p),i==="("||i==="[")s||(s=p),u.push(i==="("?")":"]");else if(d&&o&&i==="{")s||(s=p),u.push("}");else if(u.length===0)if(i===";")if(o){this.decl(f,d);return}else break;else if(i==="{"){this.rule(f);return}else if(i==="}"){this.tokenizer.back(f.pop()),n=!0;break}else i===":"&&(o=!0);else i===u[u.length-1]&&(u.pop(),u.length===0&&(s=null));p=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),u.length>0&&this.unclosedBracket(s),n&&o){if(!d)for(;f.length&&(p=f[f.length-1][0],!(p!=="space"&&p!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,d)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,i,o){let s,u,d=i.length,f="",p=!0,y,w;for(let C=0;Cm+x[1],"");e.raws[n]={raw:C,value:f}}e[n]=f}rule(e){e.pop();let n=new Ng;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,i="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let n,i="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let n,i="";for(;e.length&&(n=e[e.length-1][0],n==="space");)i=e.pop()[1]+i;return i}stringFrom(e,n){let i="";for(let o=n;oe.type==="warning")}get content(){return this.css}};var Gf=Qd;Qd.default=Qd;let e2=ho,t2=Vf,n2=Kv,r2=Wf,jg=Gf,i2=xs,o2=vu,{isClean:Cr,my:a2}=ws;const s2={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},l2={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},u2={Once:!0,postcssPlugin:!0,prepare:!0},ea=0;function qa(e){return typeof e=="object"&&typeof e.then=="function"}function Xv(e){let n=!1,i=s2[e.type];return e.type==="decl"?n=e.prop.toLowerCase():e.type==="atrule"&&(n=e.name.toLowerCase()),n&&e.append?[i,i+"-"+n,ea,i+"Exit",i+"Exit-"+n]:n?[i,i+"-"+n,i+"Exit",i+"Exit-"+n]:e.append?[i,ea,i+"Exit"]:[i,i+"Exit"]}function Pg(e){let n;return e.type==="document"?n=["Document",ea,"DocumentExit"]:e.type==="root"?n=["Root",ea,"RootExit"]:n=Xv(e),{eventIndex:0,events:n,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Kd(e){return e[Cr]=!1,e.nodes&&e.nodes.forEach(n=>Kd(n)),e}let Yd={},ta=class Jv{constructor(n,i,o){this.stringified=!1,this.processed=!1;let s;if(typeof i=="object"&&i!==null&&(i.type==="root"||i.type==="document"))s=Kd(i);else if(i instanceof Jv||i instanceof jg)s=Kd(i.root),i.map&&(typeof o.map>"u"&&(o.map={}),o.map.inline||(o.map.inline=!1),o.map.prev=i.map);else{let u=r2;o.syntax&&(u=o.syntax.parse),o.parser&&(u=o.parser),u.parse&&(u=u.parse);try{s=u(i,o)}catch(d){this.processed=!0,this.error=d}s&&!s[a2]&&e2.rebuild(s)}this.result=new jg(n,s,o),this.helpers={...Yd,postcss:Yd,result:this.result},this.plugins=this.processor.plugins.map(u=>typeof u=="object"&&u.prepare?{...u,...u.prepare(this.result)}:u)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(n){return this.async().catch(n)}finally(n){return this.async().then(n,n)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(n,i){let o=this.result.lastPlugin;try{i&&i.addToError(n),this.error=n,n.name==="CssSyntaxError"&&!n.plugin?(n.plugin=o.postcssPlugin,n.setMessage()):o.postcssVersion}catch(s){console&&console.error&&console.error(s)}return n}prepareVisitors(){this.listeners={};let n=(i,o,s)=>{this.listeners[o]||(this.listeners[o]=[]),this.listeners[o].push([i,s])};for(let i of this.plugins)if(typeof i=="object")for(let o in i){if(!l2[o]&&/^[A-Z]/.test(o))throw new Error(`Unknown event ${o} in ${i.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u2[o])if(typeof i[o]=="object")for(let s in i[o])s==="*"?n(i,o,i[o][s]):n(i,o+"-"+s.toLowerCase(),i[o][s]);else typeof i[o]=="function"&&n(i,o,i[o])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let n=0;n0;){let o=this.visitTick(i);if(qa(o))try{await o}catch(s){let u=i[i.length-1].node;throw this.handleError(s,u)}}}if(this.listeners.OnceExit)for(let[i,o]of this.listeners.OnceExit){this.result.lastPlugin=i;try{if(n.type==="document"){let s=n.nodes.map(u=>o(u,this.helpers));await Promise.all(s)}else await o(n,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(n){this.result.lastPlugin=n;try{if(typeof n=="object"&&n.Once){if(this.result.root.type==="document"){let i=this.result.root.nodes.map(o=>n.Once(o,this.helpers));return qa(i[0])?Promise.all(i):i}return n.Once(this.result.root,this.helpers)}else if(typeof n=="function")return n(this.result.root,this.result)}catch(i){throw this.handleError(i)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let n=this.result.opts,i=o2;n.syntax&&(i=n.syntax.stringify),n.stringifier&&(i=n.stringifier),i.stringify&&(i=i.stringify);let o=new n2(i,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let n of this.plugins){let i=this.runOnRoot(n);if(qa(i))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let n=this.result.root;for(;!n[Cr];)n[Cr]=!0,this.walkSync(n);if(this.listeners.OnceExit)if(n.type==="document")for(let i of n.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,n)}return this.result}then(n,i){return this.async().then(n,i)}toString(){return this.css}visitSync(n,i){for(let[o,s]of n){this.result.lastPlugin=o;let u;try{u=s(i,this.helpers)}catch(d){throw this.handleError(d,i.proxyOf)}if(i.type!=="root"&&i.type!=="document"&&!i.parent)return!0;if(qa(u))throw this.getAsyncError()}}visitTick(n){let i=n[n.length-1],{node:o,visitors:s}=i;if(o.type!=="root"&&o.type!=="document"&&!o.parent){n.pop();return}if(s.length>0&&i.visitorIndex{s[Cr]||this.walkSync(s)});else{let s=this.listeners[o];if(s&&this.visitSync(s,n.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ta.registerPostcss=e=>{Yd=e};var ey=ta;ta.default=ta;i2.registerLazyResult(ta);t2.registerLazyResult(ta);let c2=Kv,d2=Wf;const f2=Gf;let h2=vu,Xd=class{constructor(e,n,i){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=i,this._map=void 0;let o,s=h2;this.result=new f2(this._processor,o,this._opts),this.result.css=n;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let d=new c2(s,o,this._opts,n);if(d.isMap()){let[f,p]=d.generate();f&&(this.result.css=f),p&&(this.result.map=p)}else d.clearAnnotation(),this.result.css=d.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=d2;try{e=n(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var p2=Xd;Xd.default=Xd;let m2=Vf,g2=ey,v2=p2,y2=xs,ds=class{constructor(n=[]){this.version="8.4.47",this.plugins=this.normalize(n)}normalize(n){let i=[];for(let o of n)if(o.postcss===!0?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))i=i.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)i.push(o);else if(typeof o=="function")i.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return i}process(n,i={}){return!this.plugins.length&&!i.parser&&!i.stringifier&&!i.syntax?new v2(this,n,i):new g2(this,n,i)}use(n){return this.plugins=this.plugins.concat(this.normalize([n])),this}};var w2=ds;ds.default=ds;y2.registerProcessor(ds);m2.registerProcessor(ds);let ty=Hf,ny=wu,x2=ho,C2=zf,ry=xu,iy=Vf,S2=EN,b2=Cu,_2=ey,E2=Vv,k2=yu,N2=Wf,Zf=w2,T2=Gf,oy=xs,ay=qf,j2=vu,P2=Yv;function it(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Zf(e)}it.plugin=function(e,n){let i=!1;function o(...u){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: +`),n=d.length-s):n+=d.length,f&&p!=="start"){let y=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==y.last||y.raws.semicolon)&&(f.source&&f.source.end?(o.source=this.sourcePath(f),o.original.line=f.source.end.line,o.original.column=f.source.end.column-1,o.generated.line=e,o.generated.column=n-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=e,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let i=this.opts.to?Gl(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=Gl(Gv(i,this.mapOpts.annotation)));let o=Wv(i,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new kN(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let i=n.source.input.from;if(i&&!e[i]){e[i]=!0;let o=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(o,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(bg){let i=bg(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;Zv==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var Kv=jN;const Cd=39,_g=34,Ol=92,Eg=47,Rl=10,Va=32,Il=12,Al=9,Fl=13,PN=91,MN=93,LN=40,DN=41,ON=123,RN=125,IN=59,AN=42,FN=58,$N=64,$l=/[\t\n\f\r "#'()/;[\\\]{}]/g,zl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,zN=/.[\r\n"'(/\\]/,kg=/[\da-f]/i;var BN=function(e,n={}){let i=e.css.valueOf(),o=n.ignoreErrors,s,u,d,f,p,y,w,C,m,x,N=i.length,b=0,E=[],P=[];function L(){return b}function $(O){throw e.error("Unclosed "+O,b)}function H(){return P.length===0&&b>=N}function Z(O){if(P.length)return P.pop();if(b>=N)return;let K=O?O.ignoreUnclosed:!1;switch(s=i.charCodeAt(b),s){case Rl:case Va:case Al:case Fl:case Il:{f=b;do f+=1,s=i.charCodeAt(f);while(s===Va||s===Rl||s===Al||s===Fl||s===Il);y=["space",i.slice(b,f)],b=f-1;break}case PN:case MN:case ON:case RN:case FN:case IN:case DN:{let ce=String.fromCharCode(s);y=[ce,ce,b];break}case LN:{if(x=E.length?E.pop()[1]:"",m=i.charCodeAt(b+1),x==="url"&&m!==Cd&&m!==_g&&m!==Va&&m!==Rl&&m!==Al&&m!==Il&&m!==Fl){f=b;do{if(w=!1,f=i.indexOf(")",f+1),f===-1)if(o||K){f=b;break}else $("bracket");for(C=f;i.charCodeAt(C-1)===Ol;)C-=1,w=!w}while(w);y=["brackets",i.slice(b,f+1),b,f],b=f}else f=i.indexOf(")",b+1),u=i.slice(b,f+1),f===-1||zN.test(u)?y=["(","(",b]:(y=["brackets",u,b,f],b=f);break}case Cd:case _g:{p=s===Cd?"'":'"',f=b;do{if(w=!1,f=i.indexOf(p,f+1),f===-1)if(o||K){f=b+1;break}else $("string");for(C=f;i.charCodeAt(C-1)===Ol;)C-=1,w=!w}while(w);y=["string",i.slice(b,f+1),b,f],b=f;break}case $N:{$l.lastIndex=b+1,$l.test(i),$l.lastIndex===0?f=i.length-1:f=$l.lastIndex-2,y=["at-word",i.slice(b,f+1),b,f],b=f;break}case Ol:{for(f=b,d=!0;i.charCodeAt(f+1)===Ol;)f+=1,d=!d;if(s=i.charCodeAt(f+1),d&&s!==Eg&&s!==Va&&s!==Rl&&s!==Al&&s!==Fl&&s!==Il&&(f+=1,kg.test(i.charAt(f)))){for(;kg.test(i.charAt(f+1));)f+=1;i.charCodeAt(f+1)===Va&&(f+=1)}y=["word",i.slice(b,f+1),b,f],b=f;break}default:{s===Eg&&i.charCodeAt(b+1)===AN?(f=i.indexOf("*/",b+2)+1,f===0&&(o||K?f=i.length:$("comment")),y=["comment",i.slice(b,f+1),b,f],b=f):(zl.lastIndex=b+1,zl.test(i),zl.lastIndex===0?f=i.length-1:f=zl.lastIndex-2,y=["word",i.slice(b,f+1),b,f],E.push(y),b=f);break}}return b++,y}function de(O){P.push(O)}return{back:de,endOfFile:H,nextToken:Z,position:L}};let UN=Hf,HN=wu,VN=xu,qN=xs,Ng=qf,WN=BN;const Tg={empty:!0,space:!0};function GN(e){for(let n=e.length-1;n>=0;n--){let i=e[n],o=i[3]||i[2];if(o)return o}}let ZN=class{constructor(e){this.input=e,this.root=new qN,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new UN;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i,o,s,u=!1,d=!1,f=[],p=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?p.push(i==="("?")":"]"):i==="{"&&p.length>0?p.push("}"):i===p[p.length-1]&&p.pop(),p.length===0)if(i===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){d=!0;break}else if(i==="}"){if(f.length>0){for(s=f.length-1,o=f[s];o&&o[0]==="space";)o=f[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){u=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(n.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(n,"params",f),u&&(e=f[f.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),d&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let i=0,o;for(let s=n-1;s>=0&&(o=e[s],!(o[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(e){let n=0,i,o,s;for(let[u,d]of e.entries()){if(o=d,s=o[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!i)this.doubleColon(o);else{if(i[0]==="word"&&i[1]==="progid")continue;return u}i=o}return!1}comment(e){let n=new HN;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))n.text="",n.raws.left=i,n.raws.right="";else{let o=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=o[2],n.raws.left=o[1],n.raws.right=o[3]}}createTokenizer(){this.tokenizer=WN(this.input)}decl(e,n){let i=new VN;this.init(i,e[0][2]);let o=e[e.length-1];for(o[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(o[3]||o[2]||GN(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let u=[],d;for(;e.length&&(d=e[0][0],!(d!=="space"&&d!=="comment"));)u.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(s=e[f],s[1].toLowerCase()==="!important"){i.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(i.raws.important=p);break}else if(s[1].toLowerCase()==="important"){let p=e.slice(0),y="";for(let w=f;w>0;w--){let C=p[w][0];if(y.trim().startsWith("!")&&C!=="space")break;y=p.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,e=p)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(i.raws.between+=u.map(f=>f[1]).join(""),u=[]),this.raw(i,"value",u.concat(e),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new Ng;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,i=null,o=!1,s=null,u=[],d=e[1].startsWith("--"),f=[],p=e;for(;p;){if(i=p[0],f.push(p),i==="("||i==="[")s||(s=p),u.push(i==="("?")":"]");else if(d&&o&&i==="{")s||(s=p),u.push("}");else if(u.length===0)if(i===";")if(o){this.decl(f,d);return}else break;else if(i==="{"){this.rule(f);return}else if(i==="}"){this.tokenizer.back(f.pop()),n=!0;break}else i===":"&&(o=!0);else i===u[u.length-1]&&(u.pop(),u.length===0&&(s=null));p=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),u.length>0&&this.unclosedBracket(s),n&&o){if(!d)for(;f.length&&(p=f[f.length-1][0],!(p!=="space"&&p!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,d)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,i,o){let s,u,d=i.length,f="",p=!0,y,w;for(let C=0;Cm+x[1],"");e.raws[n]={raw:C,value:f}}e[n]=f}rule(e){e.pop();let n=new Ng;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,i="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let n,i="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let n,i="";for(;e.length&&(n=e[e.length-1][0],n==="space");)i=e.pop()[1]+i;return i}stringFrom(e,n){let i="";for(let o=n;oe.type==="warning")}get content(){return this.css}};var Gf=Qd;Qd.default=Qd;let e2=ho,t2=Vf,n2=Kv,r2=Wf,jg=Gf,i2=xs,o2=vu,{isClean:Cr,my:a2}=ws;const s2={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},l2={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},u2={Once:!0,postcssPlugin:!0,prepare:!0},ea=0;function qa(e){return typeof e=="object"&&typeof e.then=="function"}function Xv(e){let n=!1,i=s2[e.type];return e.type==="decl"?n=e.prop.toLowerCase():e.type==="atrule"&&(n=e.name.toLowerCase()),n&&e.append?[i,i+"-"+n,ea,i+"Exit",i+"Exit-"+n]:n?[i,i+"-"+n,i+"Exit",i+"Exit-"+n]:e.append?[i,ea,i+"Exit"]:[i,i+"Exit"]}function Pg(e){let n;return e.type==="document"?n=["Document",ea,"DocumentExit"]:e.type==="root"?n=["Root",ea,"RootExit"]:n=Xv(e),{eventIndex:0,events:n,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Kd(e){return e[Cr]=!1,e.nodes&&e.nodes.forEach(n=>Kd(n)),e}let Yd={},ta=class Jv{constructor(n,i,o){this.stringified=!1,this.processed=!1;let s;if(typeof i=="object"&&i!==null&&(i.type==="root"||i.type==="document"))s=Kd(i);else if(i instanceof Jv||i instanceof jg)s=Kd(i.root),i.map&&(typeof o.map>"u"&&(o.map={}),o.map.inline||(o.map.inline=!1),o.map.prev=i.map);else{let u=r2;o.syntax&&(u=o.syntax.parse),o.parser&&(u=o.parser),u.parse&&(u=u.parse);try{s=u(i,o)}catch(d){this.processed=!0,this.error=d}s&&!s[a2]&&e2.rebuild(s)}this.result=new jg(n,s,o),this.helpers={...Yd,postcss:Yd,result:this.result},this.plugins=this.processor.plugins.map(u=>typeof u=="object"&&u.prepare?{...u,...u.prepare(this.result)}:u)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(n){return this.async().catch(n)}finally(n){return this.async().then(n,n)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(n,i){let o=this.result.lastPlugin;try{i&&i.addToError(n),this.error=n,n.name==="CssSyntaxError"&&!n.plugin?(n.plugin=o.postcssPlugin,n.setMessage()):o.postcssVersion}catch(s){console&&console.error&&console.error(s)}return n}prepareVisitors(){this.listeners={};let n=(i,o,s)=>{this.listeners[o]||(this.listeners[o]=[]),this.listeners[o].push([i,s])};for(let i of this.plugins)if(typeof i=="object")for(let o in i){if(!l2[o]&&/^[A-Z]/.test(o))throw new Error(`Unknown event ${o} in ${i.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u2[o])if(typeof i[o]=="object")for(let s in i[o])s==="*"?n(i,o,i[o][s]):n(i,o+"-"+s.toLowerCase(),i[o][s]);else typeof i[o]=="function"&&n(i,o,i[o])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let n=0;n0;){let o=this.visitTick(i);if(qa(o))try{await o}catch(s){let u=i[i.length-1].node;throw this.handleError(s,u)}}}if(this.listeners.OnceExit)for(let[i,o]of this.listeners.OnceExit){this.result.lastPlugin=i;try{if(n.type==="document"){let s=n.nodes.map(u=>o(u,this.helpers));await Promise.all(s)}else await o(n,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(n){this.result.lastPlugin=n;try{if(typeof n=="object"&&n.Once){if(this.result.root.type==="document"){let i=this.result.root.nodes.map(o=>n.Once(o,this.helpers));return qa(i[0])?Promise.all(i):i}return n.Once(this.result.root,this.helpers)}else if(typeof n=="function")return n(this.result.root,this.result)}catch(i){throw this.handleError(i)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let n=this.result.opts,i=o2;n.syntax&&(i=n.syntax.stringify),n.stringifier&&(i=n.stringifier),i.stringify&&(i=i.stringify);let o=new n2(i,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let n of this.plugins){let i=this.runOnRoot(n);if(qa(i))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let n=this.result.root;for(;!n[Cr];)n[Cr]=!0,this.walkSync(n);if(this.listeners.OnceExit)if(n.type==="document")for(let i of n.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,n)}return this.result}then(n,i){return this.async().then(n,i)}toString(){return this.css}visitSync(n,i){for(let[o,s]of n){this.result.lastPlugin=o;let u;try{u=s(i,this.helpers)}catch(d){throw this.handleError(d,i.proxyOf)}if(i.type!=="root"&&i.type!=="document"&&!i.parent)return!0;if(qa(u))throw this.getAsyncError()}}visitTick(n){let i=n[n.length-1],{node:o,visitors:s}=i;if(o.type!=="root"&&o.type!=="document"&&!o.parent){n.pop();return}if(s.length>0&&i.visitorIndex{s[Cr]||this.walkSync(s)});else{let s=this.listeners[o];if(s&&this.visitSync(s,n.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ta.registerPostcss=e=>{Yd=e};var ey=ta;ta.default=ta;i2.registerLazyResult(ta);t2.registerLazyResult(ta);let c2=Kv,d2=Wf;const f2=Gf;let h2=vu,Xd=class{constructor(e,n,i){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=i,this._map=void 0;let o,s=h2;this.result=new f2(this._processor,o,this._opts),this.result.css=n;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let d=new c2(s,o,this._opts,n);if(d.isMap()){let[f,p]=d.generate();f&&(this.result.css=f),p&&(this.result.map=p)}else d.clearAnnotation(),this.result.css=d.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=d2;try{e=n(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var p2=Xd;Xd.default=Xd;let m2=Vf,g2=ey,v2=p2,y2=xs,ds=class{constructor(n=[]){this.version="8.4.47",this.plugins=this.normalize(n)}normalize(n){let i=[];for(let o of n)if(o.postcss===!0?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))i=i.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)i.push(o);else if(typeof o=="function")i.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return i}process(n,i={}){return!this.plugins.length&&!i.parser&&!i.stringifier&&!i.syntax?new v2(this,n,i):new g2(this,n,i)}use(n){return this.plugins=this.plugins.concat(this.normalize([n])),this}};var w2=ds;ds.default=ds;y2.registerProcessor(ds);m2.registerProcessor(ds);let ty=Hf,ny=wu,x2=ho,C2=zf,ry=xu,iy=Vf,S2=EN,b2=Cu,_2=ey,E2=Vv,k2=yu,N2=Wf,Zf=w2,T2=Gf,oy=xs,ay=qf,j2=vu,P2=Yv;function it(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Zf(e)}it.plugin=function(e,n){let i=!1;function o(...u){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),ag.LANG&&ag.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南: -https://www.w3ctech.com/topic/2226`));let d=n(...u);return d.postcssPlugin=e,d.postcssVersion=new Zf().version,d}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(u,d,f){return it([o(f)]).process(u,d)},o};it.stringify=j2;it.parse=N2;it.fromJSON=S2;it.list=E2;it.comment=e=>new ny(e);it.atRule=e=>new ty(e);it.decl=e=>new ry(e);it.rule=e=>new ay(e);it.root=e=>new oy(e);it.document=e=>new iy(e);it.CssSyntaxError=C2;it.Declaration=ry;it.Container=x2;it.Processor=Zf;it.Document=iy;it.Comment=ny;it.Warning=P2;it.AtRule=ty;it.Result=T2;it.Input=b2;it.Rule=ay;it.Root=oy;it.Node=k2;_2.registerPostcss(it);var M2=it;it.default=it;const{isPlainObject:$P}=Ff,{parse:zP}=M2,L2="_list_1whuj_1",D2="_compact_1whuj_5",O2="_pending_1whuj_8",Sd={list:L2,compact:D2,pending:O2};function R2(e){const{className:n,data:i,keySelector:o,renderer:s,rendererParams:u,pending:d,errored:f,filtered:p,errorMessage:y,emptyMessage:w,pendingMessage:C,filteredEmptyMessage:m,compact:x,withoutMessage:E=!1,messageClassName:b}=e,N=$e(i)||i.length===0;return g.jsxs("div",{className:Oe(Sd.list,x&&Sd.compact,d&&Sd.pending,n),children:[g.jsx(h0,{data:i,keySelector:o,renderer:s,rendererParams:u}),!E&&g.jsx(u0,{className:b,pending:d,filtered:p,empty:N,errored:f,compact:x,emptyMessage:w,filteredEmptyMessage:m,pendingMessage:C,errorMessage:y,overlayPending:!0})]})}function sy(e,n){if($e(e))return;const i={},o=[];return e.forEach(s=>{const u=n?n(s):JSON.stringify(s);i[u]||(i[u]=!0,o.push(s))}),e.length===o.length?e:o}const I2=[40,38,13,8];function A2(e,n,i){return n.findIndex((o,s)=>i(o,s)===e)}function Mg(e,n,i,o){if(i.length<=0)return;let s=A2(e,i,o);s===-1&&(s=n>0?-1:0);const u=Gx(s+n,i.length);return o(i[u],u)}function F2(e,n,i,o,s,u,d,f,p){return v.useCallback(y=>{const{keyCode:w}=y,C=e?.key;if(o&&(w===9||w===27))u();else if(!o&&I2.includes(w))y.stopPropagation(),y.preventDefault(),d();else if(w===13)if(Lt(C)){y.stopPropagation(),y.preventDefault();const m=i.find((x,E)=>n(x,E)===C);m&&f(C,m)}else y.stopPropagation(),y.preventDefault(),p&&p();else if(w===40){y.stopPropagation(),y.preventDefault();const m=Mg(C,1,i,n);s(m?{key:m}:void 0)}else if(w===38){y.stopPropagation(),y.preventDefault();const m=Mg(C,-1,i,n);s(m?{key:m}:void 0)}},[e,o,n,s,u,f,d,p,i])}const $2="_generic-option_zv1n8_1",z2={genericOption:$2};function B2(e){const{optionContainerClassName:n,contentRenderer:i,contentRendererParam:o,option:s,onClick:u,optionKey:d,focusedKey:f}=e,p=o(d,s),{containerClassName:y,title:w,...C}=p,m=f?.key===d,x=v.useRef(null);v.useEffect(()=>{f&&f.key===d&&!f.mouse&&x.current&&x.current.scrollIntoView({behavior:"smooth",block:"center"})},[d,f]);const E=v.useCallback(()=>{u(d,s)},[d,s,u]);return g.jsx(uf,{elementRef:x,className:Oe(z2.genericOption,n,y),onClick:E,title:w,name:d,focused:m,children:i(C)})}const U2="common",H2={infoMessageAnd:"and",infoMessageMore:"more",buttonTitleSelect:"Select all",buttonTitleClear:"Clear",buttonTitleClose:"Close",buttonTitleOpen:"Open",selectInputPendingMessage:"Fetching options...",selectInputEmptyMessage:"No option available",selectInputFilteredMessage:"No option available for the search",selectInputErrorMessage:"Could not load options"},V2={namespace:U2,strings:H2},q2="_popup_poyjv_1",W2="_list_poyjv_4",G2="_list-item_poyjv_9",Z2="_info-message_poyjv_14",Q2="_icon_poyjv_21",Si={popup:q2,list:W2,listItem:G2,infoMessage:Z2,icon:Q2},K2=[];function ly(e){const{actions:n,actionsContainerClassName:i,className:o,disabled:s,error:u,errorContainerClassName:d,hint:f,hintContainerClassName:p,icons:y,iconsContainerClassName:w,inputSectionClassName:C,label:m,labelClassName:x,name:E,onOptionClick:b,searchText:N,onSearchTextChange:P,optionContainerClassName:L,optionKeySelector:$,optionRenderer:q,optionRendererParams:Z,options:fe,optionsPopupClassName:O,persistentOptionPopup:K,readOnly:ce,placeholder:de,valueDisplay:I="",nonClearable:U,onClearButtonClick:W,onSelectAllButtonClick:ne,optionsPending:he=!1,optionsFiltered:Ce=!1,optionsErrored:_e=!1,focused:G,focusedKey:ue,onFocusedKeyChange:T,onFocusedChange:H,dropdownShown:oe,onDropdownShownChange:Se,totalOptionsCount:se=0,hasValue:re,autoFocus:ee,onEnterWithoutOption:Q,withAsterisk:Y,required:et,variant:tn,errorOnTooltip:Wt,dropdownHidden:ot}=e,bt=fe??K2,st=l0(V2),wt=v.useRef(null),ft=v.useRef(null),ht=v.useRef(null),xt=v.useRef(null),nn=v.useCallback(pt=>{oe||Se(!0),P(pt)},[oe,Se,P]),Tn=v.useCallback((pt,Kt)=>{Kt.stopPropagation(),Se(!oe)},[oe,Se]),ln=v.useCallback(()=>{oe||Se(!0)},[oe,Se]),jn=v.useCallback(()=>{Se(!1)},[Se]),Jr=v.useCallback(()=>{ce||ln()},[ce,ln]),un=v.useCallback((pt,Kt)=>{pt||Kt?K&&ht.current&&ht.current.focus():jn()},[jn,K]),cn=v.useCallback((pt,Kt)=>{b(pt,Kt,E),K||jn()},[b,jn,K,E]),Er=v.useCallback((pt,Kt)=>({contentRendererParam:Z,option:Kt,optionKey:pt,focusedKey:ue,contentRenderer:q,onClick:cn,onFocus:T,optionContainerClassName:Oe(L,Si.listItem)}),[ue,cn,T,L,q,Z]);FE(oe,un,xt,wt);const Kn=F2(ue,$,bt,oe,T,jn,ln,cn,Q),lt=bt.length,Dt=se-lt>0?`${st.infoMessageAnd} ${se-lt} ${st.infoMessageMore}`:void 0,Qt=oe&&!ot;return g.jsxs(g.Fragment,{children:[g.jsx(Pf,{actionsContainerClassName:i,className:o,containerRef:wt,disabled:s,errorContainerClassName:d,error:u,errorOnTooltip:Wt,hintContainerClassName:p,hint:f,iconsContainerClassName:w,icons:y,inputSectionClassName:C,inputSectionRef:ft,labelClassName:x,label:m,readOnly:ce,required:et,variant:tn,withAsterisk:Y,actions:g.jsxs(g.Fragment,{children:[n,!ce&&ne&&g.jsx(Ue,{onClick:ne,disabled:s,variant:"tertiary",name:void 0,title:st.buttonTitleSelect,children:g.jsx(EC,{className:Si.icon})}),!ce&&!U&&re&&g.jsx(Ue,{onClick:W,disabled:s,variant:"tertiary",name:void 0,title:st.buttonTitleClear,children:g.jsx(LC,{className:Si.icon})}),!ce&&g.jsx(Ue,{onClick:Tn,variant:"tertiary",name:void 0,title:Qt?st.buttonTitleClose:st.buttonTitleOpen,children:Qt?g.jsx(_C,{className:Si.icon}):g.jsx(SC,{className:Si.icon})})]}),input:g.jsx(X0,{name:E,elementRef:ht,readOnly:ce,disabled:s,value:oe||G?N:I,onChange:nn,onClick:Jr,onFocus:()=>H(!0),onBlur:()=>H(!1),placeholder:ps(I)?I:de,autoComplete:"off",onKeyDown:Kn,autoFocus:ee})}),Qt&&g.jsxs(c0,{elementRef:xt,parentRef:ft,className:Oe(O,Si.popup),children:[g.jsx(R2,{className:Si.list,data:bt,keySelector:$,renderer:B2,rendererParams:Er,errored:_e,filtered:Ce,pending:he,pendingMessage:st.selectInputPendingMessage,emptyMessage:st.selectInputEmptyMessage,filteredEmptyMessage:st.selectInputFilteredMessage,errorMessage:st.selectInputErrorMessage,compact:!0}),!he&&!_e&&!!Dt&&g.jsx("div",{className:Si.infoMessage,children:Dt})]})]})}function Y2(e){const{children:n,isActive:i,iconClassName:o,labelClassName:s}=e;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:o,children:i?g.jsx(jC,{}):g.jsx(TC,{})}),g.jsx("div",{className:s,children:n})]})}const X2="_option_1kpl9_1",J2="_active_1kpl9_7",eT="_icon_1kpl9_11",tT="_label_1kpl9_17",Wa={option:X2,active:J2,icon:eT,label:tT},bd=[];function nT(e){const{keySelector:n,labelSelector:i,name:o,onChange:s,onOptionsChange:u,options:d,optionsPending:f,optionsErrored:p,value:y,sortFunction:w,searchOptions:C,onSearchValueChange:m,onShowDropdownChange:x,hideOptionFilter:E,selectedOnTop:b,...N}=e,P=d??bd,L=C??bd,$=y??bd,[q,Z]=v.useState(),[fe,O]=v.useState(!1),[K,ce]=v.useState(!1),[de,I]=v.useState(),[U,W]=v.useState({}),ne=v.useMemo(()=>Ka(P,n,se=>se),[P,n]),he=v.useMemo(()=>Ka(P,n,i),[P,n,i]),Ce=v.useMemo(()=>$.map(se=>he[se]??"?").join(", "),[$,he]),_e=v.useMemo(()=>$.map(se=>ne[se]).filter(Lt),[$,ne]),G=v.useMemo(()=>{const se=sy([...L,..._e],n);if(!b)return w?w(se,q,i):se;const re=se.filter(Q=>U[n(Q)]),ee=se.filter(Q=>!U[n(Q)]&&($e(E)||E(Q)));return w?[...lo(re,q,i),...w(ee,q,i)]:[...lo(re,q,i),...ee]},[b,n,i,q,L,U,_e,w,E]),ue=v.useCallback(se=>{Z(se),m&&m(se)},[m]),T=v.useCallback(se=>{O(se),x&&x(se),se?(W(Ka($,re=>re,()=>!0)),I(void 0)):(W({}),I(void 0),Z(void 0),m&&m(void 0))},[$,m,x]),H=v.useCallback((se,re)=>{const ee=$.findIndex(Q=>Q===se)!==-1;return{children:i(re),containerClassName:Oe(Wa.option,ee&&Wa.active),title:i(re),isActive:ee,labelClassName:Wa.label,iconClassName:Wa.icon}},[i,$]),oe=v.useCallback((se,re)=>{const ee=[...$],Q=$.findIndex(Y=>Y===se);Q!==-1?ee.splice(Q,1):(ee.push(se),u&&u(Y=>{const et=Y??[];return et.find(tn=>n(tn)===se)?Y:[...et,re]})),s(ee,o)},[$,s,o,u,n]),Se=v.useCallback(()=>{s([],o)},[o,s]);return g.jsx(ly,{...N,name:o,options:G,optionsPending:f,optionsFiltered:ps(q)&&q.length>0,optionsErrored:p,optionKeySelector:n,optionRenderer:Y2,optionRendererParams:H,optionContainerClassName:Wa.optionContainer,onOptionClick:oe,valueDisplay:Ce,onClearButtonClick:Se,searchText:q,onSearchTextChange:ue,dropdownShown:fe,onDropdownShownChange:T,focused:K,onFocusedChange:ce,focusedKey:de,onFocusedKeyChange:I,persistentOptionPopup:!0,nonClearable:!1,hasValue:Lt($)&&$.length>0})}function Lg(e){const{name:n,options:i,keySelector:o,onChange:s,withSelectAll:u,...d}=e,f=v.useCallback(()=>{if($e(i))return;const p=i.map(o);s(p,n)},[i,n,s,o]);return g.jsx(nT,{...d,name:n,onChange:s,options:i,keySelector:o,sortFunction:lo,searchOptions:i,onSelectAllButtonClick:u?f:void 0,selectedOnTop:!1})}const rT="_page-container_1cfro_1",iT="_content_1cfro_2",Dg={pageContainer:rT,content:iT};function Qf(e){const{className:n,contentClassName:i,children:o,contentAs:s="div",containerAs:u="div"}=e,d=s;return g.jsx(u,{className:Oe(Dg.pageContainer,n),children:g.jsx(d,{className:Oe(Dg.content,i),children:o})})}const oT="_raw-input_145mq_1",aT={rawInput:oT};function sT(e){const{className:n,onChange:i,elementRef:o,value:s,name:u,...d}=e,f=fr.useCallback(p=>{var y;const w=(y=p?.target)==null?void 0:y.value;i&&i(w===""?void 0:w,u,p)},[u,i]);return g.jsx("textarea",{...d,ref:o,className:Oe(aT.rawInput,n),name:Lt(u)?String(u):void 0,onChange:f,value:s??""})}const lT="_option_11p37_1",uT="_icon_11p37_6",cT="_label_11p37_14",dT="_overflow-container_11p37_20",fT="_description_11p37_25",Vo={option:lT,icon:uT,label:cT,overflowContainer:dT,description:fT};function hT(e){const{className:n,label:i,description:o,iconClassName:s,labelClassName:u}=e;return g.jsxs("div",{className:Oe(Vo.option,n),children:[g.jsx("div",{className:Oe(Vo.icon,s),children:g.jsx(kC,{})}),g.jsxs("div",{className:Oe(Vo.label,u),children:[g.jsx("div",{className:Vo.overflowContainer,children:i}),g.jsx("div",{className:Oe(Vo.overflowContainer,Vo.description),children:o})]})]})}const pT="_option-container_2k92q_1",mT="_option_2k92q_1",gT="_active_2k92q_9",vT="_icon_2k92q_12",Ga={optionContainer:pT,option:mT,active:gT,icon:vT},Og=[];function Rg(e){const{keySelector:n,labelSelector:i,descriptionSelector:o,name:s,onChange:u,onOptionsChange:d,options:f,optionsPending:p,optionsErrored:y,value:w,sortFunction:C,searchOptions:m,onSearchValueChange:x,onShowDropdownChange:E,hideOptionFilter:b,selectedOnTop:N,onEnterWithoutOption:P,...L}=e,$=f??Og,q=m??Og,[Z,fe]=v.useState(),[O,K]=v.useState(!1),[ce,de]=v.useState(!1),[I,U]=v.useState(),[W,ne]=v.useState({}),he=v.useMemo(()=>Ka($,n,i),[$,n,i]),Ce=Lt(w)?he[w]??"?":"",_e=v.useMemo(()=>{const re=$?.find(ee=>n(ee)===w);return $e(re)?[]:[re]},[w,$,n]),G=v.useMemo(()=>{const re=sy([...q,..._e],n);if(!N)return C?C(re,Z,i):re;const ee=re.filter(Y=>W[n(Y)]),Q=re.filter(Y=>!W[n(Y)]&&($e(b)||b(Y)));return C?[...lo(ee,Z,i),...C(Q,Z,i)]:[...lo(ee,Z,i),...Q]},[N,n,i,Z,q,W,_e,C,b]),ue=v.useCallback(re=>{fe(re),x&&x(re)},[x]),T=v.useCallback(()=>{K(!1),E&&E(!1),fe(void 0),x&&x(void 0),P&&P(Z)},[Z,E,P,x]),H=v.useCallback(re=>{K(re),E&&E(re),re?(ne(Ka(w?[w]:[],ee=>ee,()=>!0)),U(w?{key:w}:void 0)):(ne({}),U(void 0),fe(void 0),x&&x(void 0))},[w,x,E]),oe=v.useCallback((re,ee)=>{const Q=re===w;return{label:i(ee),description:o?o(ee):void 0,containerClassName:Oe(Ga.optionContainer,Q&&Ga.active),title:i(ee),className:Ga.option,iconClassName:Ga.icon}},[w,i,o]),Se=v.useCallback((re,ee)=>{d&&d(Q=>{const Y=Q??[];return Y.find(et=>n(et)===re)?Q:[...Y,ee]}),u(re,s,ee)},[u,s,d,n]),se=v.useCallback(()=>{if(!e.nonClearable){const re=e.onChange;re(void 0,s,void 0)}},[s,e.onChange,e.nonClearable]);return g.jsx(ly,{...L,name:s,options:G,optionsPending:p,optionsErrored:y,optionsFiltered:ps(Z)&&Z.length>0,optionKeySelector:n,optionRenderer:hT,optionRendererParams:oe,optionContainerClassName:Ga.optionContainer,onOptionClick:Se,valueDisplay:Ce,onClearButtonClick:se,searchText:Z,onSearchTextChange:ue,dropdownShown:O,onDropdownShownChange:H,focused:ce,onFocusedChange:de,focusedKey:I,onFocusedKeyChange:U,hasValue:Lt(w),persistentOptionPopup:!1,onEnterWithoutOption:T})}const yT="_segment-input_bykt7_1",wT="_segment-list_bykt7_4",xT="_segment_bykt7_1",CT="_active_bykt7_18",ST="_secondary-variant_bykt7_24",Xa={segmentInput:yT,segmentList:wT,segment:xT,active:CT,secondaryVariant:ST};function bT(e){const{label:n,name:i,onClick:o,value:s,className:u,variant:d="primary",inputName:f,...p}=e;return g.jsx(Ue,{...p,className:Oe(Xa.segment,s&&Xa.active,d==="secondary"&&Xa.secondaryVariant,u),name:i,onClick:o,variant:"tertiary",children:n})}function _T(e){const{rendererParams:n,listContainerClassName:i,keySelector:o,labelSelector:s,className:u,...d}=e;return g.jsx(wb,{className:Oe(u,Xa.segmentInput),...d,renderer:bT,rendererParams:n,listContainerClassName:Oe(i,Xa.segmentList),keySelector:o,labelSelector:s})}function eo(e){const{name:n,options:i,nonClearable:o,onChange:s,...u}=e;return e.nonClearable?g.jsx(Rg,{...u,onChange:e.onChange,nonClearable:e.nonClearable,name:n,options:i,sortFunction:lo,searchOptions:i,selectedOnTop:!1}):g.jsx(Rg,{...u,onChange:e.onChange,nonClearable:e.nonClearable,name:n,options:i,sortFunction:lo,searchOptions:i,selectedOnTop:!1})}v.createContext({tabs:[],step:0,disabled:!1,activeTab:"",variant:"primary",setActiveTab:()=>{console.warn("setActiveTab called before it was initialized")},registerTab:()=>{console.warn("registerTab called before it was initialized")},unregisterTab:()=>{console.warn("unregisterTab called before it was initialized")}});const Ig="•",ET="Enter";function kT(e){const{actions:n,className:i,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputClassName:p,label:y,labelClassName:w,readOnly:C,required:m,variant:x,inputSectionClassName:E,withAsterisk:b,onChange:N,name:P,autoBullets:L=!1,rows:$=5,...q}=e,Z=fr.useCallback(O=>{$e(N)||O.target.value===""&&N(`${Ig} `,P)},[N,P]),fe=fr.useCallback(O=>{$e(N)||O.key===ET&&N(`${O.currentTarget.value}${Ig} `,P)},[N,P]);return g.jsx(Pf,{actions:n,className:i,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputSectionClassName:E,labelClassName:w,label:y,readOnly:C,required:m,variant:x,withAsterisk:b,input:g.jsx(sT,{...q,readOnly:C,disabled:o,className:p,onChange:N,name:P,onFocus:L?Z:void 0,onKeyUp:L?fe:void 0,rows:$})})}function jt(e){const{actions:n,className:i,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputClassName:p,inputSectionClassName:y,label:w,readOnly:C,required:m,variant:x,withAsterisk:E,type:b="text",...N}=e;return g.jsx(Pf,{className:i,actions:n,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputSectionClassName:y,label:w,required:m,readOnly:C,variant:x,withAsterisk:E,input:g.jsx(X0,{...N,required:m,readOnly:C,disabled:o,className:p,type:b})})}const NT="_dropdownContainer_1six7_3",TT="_dropdownMenu_1six7_15",jT="_dropdownContent_1six7_43",_d={dropdownContainer:NT,dropdownMenu:TT,dropdownContent:jT},PT=[{to:"/upload",label:"Upload",Icon:s0},{to:"/explore",label:"Explore",Icon:AC},{to:"/analytics",label:"Analytics",Icon:a0}];function MT(){const e=ra(),n=hs(),[i,o]=v.useState(!1),s=v.useRef(null);return v.useEffect(()=>{const u=d=>{s.current&&!s.current.contains(d.target)&&o(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),g.jsx("nav",{className:"border-b border-gray-200 bg-white shadow-sm sticky top-0 z-50 backdrop-blur-sm bg-white/95",children:g.jsxs(Qf,{className:"border-b-2 border-ifrcRed",contentClassName:"grid grid-cols-3 items-center py-6",children:[g.jsxs("div",{className:"flex items-center gap-4 min-w-0 cursor-pointer group transition-all duration-200 hover:scale-105",onClick:()=>{if(!(e.pathname==="/upload"||e.pathname==="/")){if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/")}},children:[g.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-ifrcRed/10 to-ifrcRed/20 group-hover:from-ifrcRed/20 group-hover:to-ifrcRed/30 transition-all duration-200",children:g.jsx(DC,{className:"h-8 w-8 flex-shrink-0 text-ifrcRed"})}),g.jsx("div",{className:"flex flex-col",children:g.jsx("span",{className:"font-bold text-xl text-gray-900 leading-tight",children:"PromptAid Vision"})})]}),g.jsx("div",{className:"flex justify-center",children:g.jsx("nav",{className:"flex items-center space-x-4 bg-gray-50/80 rounded-xl p-2 backdrop-blur-sm",children:PT.map(({to:u,label:d,Icon:f})=>{const p=e.pathname===u||u==="/upload"&&e.pathname==="/"||u==="/explore"&&e.pathname.startsWith("/map/"),y=e.pathname==="/upload"||e.pathname==="/",w=u==="/upload"||u==="/";return g.jsxs("div",{className:"relative",children:[g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsxs(Ue,{name:d.toLowerCase(),variant:p?"primary":"tertiary",size:1,className:`transition-all duration-200 ${p?"shadow-lg shadow-ifrcRed/20 transform scale-105":"hover:bg-white hover:shadow-md hover:scale-105"}`,onClick:()=>{if(!(y&&w)){if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded(u);return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n(u)}},children:[g.jsx(f,{className:`w-4 h-4 transition-transform duration-200 ${p?"scale-110":"group-hover:scale-110"}`}),g.jsx("span",{className:"inline ml-2 font-semibold",children:d})]})}),p&&g.jsx("div",{className:"absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-8 h-1 bg-ifrcRed rounded-full animate-pulse"})]},u)})})}),g.jsx("div",{className:"flex justify-end",children:g.jsxs("div",{className:_d.dropdownContainer,ref:s,children:[g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsx(Ue,{name:"more-options",variant:i?"primary":"tertiary",size:1,className:"transition-all duration-200",onClick:()=>o(!i),children:g.jsx(OC,{className:"w-4 h-4"})})}),i&&g.jsx("div",{className:_d.dropdownMenu,children:g.jsxs("div",{className:_d.dropdownContent,children:[g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsxs(Ue,{name:"help-support",variant:"tertiary",size:1,className:"w-full justify-start",onClick:()=>{if(o(!1),e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/help");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/help")},children:[g.jsx(RC,{className:"w-4 h-4"}),g.jsx("span",{className:"ml-2 font-semibold",children:"Help & Support"})]})}),g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsxs(Ue,{name:"dev",variant:"tertiary",size:1,className:"w-full justify-start",onClick:()=>{if(o(!1),e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/admin");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/admin")},children:[g.jsx(FC,{className:"w-4 h-4"}),g.jsx("span",{className:"ml-2 font-semibold",children:"Dev"})]})})]})})]})})]})})}function LT(){return g.jsxs(g.Fragment,{children:[g.jsx(MT,{}),g.jsx(lx,{})]})}const DT="_uploadContainer_1i3bv_1",OT="_dropZone_1i3bv_9",RT="_hasFile_1i3bv_30",IT="_dropZoneIcon_1i3bv_37",AT="_dropZoneText_1i3bv_43",FT="_dropZoneSubtext_1i3bv_49",$T="_filePreview_1i3bv_55",zT="_filePreviewImage_1i3bv_64",BT="_fileName_1i3bv_110",UT="_fileInfo_1i3bv_118",HT="_helpLink_1i3bv_125",VT="_loadingContainer_1i3bv_145",qT="_loadingText_1i3bv_153",WT="_generateButtonContainer_1i3bv_157",GT="_uploadedMapContainer_1i3bv_165",ZT="_uploadedMapImage_1i3bv_169",QT="_formGrid_1i3bv_209",KT="_titleField_1i3bv_222",YT="_ratingDescription_1i3bv_230",XT="_ratingSlider_1i3bv_235",JT="_ratingLabel_1i3bv_242",ej="_ratingInput_1i3bv_251",tj="_ratingValue_1i3bv_256",nj="_submitSection_1i3bv_266",rj="_successContainer_1i3bv_275",ij="_successHeading_1i3bv_280",oj="_successText_1i3bv_285",aj="_successButton_1i3bv_291",sj="_viewFullSizeButton_1i3bv_297",lj="_fullSizeModalOverlay_1i3bv_306",uj="_lightModalOverlay_1i3bv_320",cj="_fullSizeModalContent_1i3bv_334",dj="_fullSizeModalHeader_1i3bv_345",fj="_fullSizeModalImage_1i3bv_361",hj="_confirmSection_1i3bv_398",pj="_step2Layout_1i3bv_407",mj="_topRow_1i3bv_413",gj="_ratingHidden_1i3bv_421",vj="_imageSection_1i3bv_425",yj="_ratingContent_1i3bv_435",wj="_mapColumn_1i3bv_453",xj="_contentColumn_1i3bv_458",Cj="_step2bLayout_1i3bv_465",Sj="_metadataSectionCard_1i3bv_562",bj="_droneMetadataSection_1i3bv_571",_j="_droneMetadataHeading_1i3bv_577",Ej="_droneMetadataGrid_1i3bv_585",kj="_rtkFixContainer_1i3bv_591",Nj="_rtkFixLabel_1i3bv_597",Tj="_rtkFixCheckbox_1i3bv_606",jj="_confirmButtonContainer_1i3bv_621",Pj="_ratingWarningContent_1i3bv_629",Mj="_ratingWarningTitle_1i3bv_637",Lj="_ratingWarningText_1i3bv_644",Dj="_ratingWarningButtons_1i3bv_651",Oj="_fallbackReasonBox_1i3bv_659",Rj="_fallbackReasonTitle_1i3bv_668",Ij="_fallbackReasonText_1i3bv_675",Aj="_preprocessingProgress_1i3bv_682",Fj="_carouselContainer_1i3bv_735",$j="_carouselImageWrapper_1i3bv_740",zj="_carouselImage_1i3bv_740",Bj="_carouselNavigation_1i3bv_763",Uj="_carouselButton_1i3bv_775",Hj="_carouselIndicators_1i3bv_799",Vj="_carouselIndicator_1i3bv_799",qj="_carouselIndicatorActive_1i3bv_828",Wj="_viewImageButtonContainer_1i3bv_864",V={uploadContainer:DT,dropZone:OT,hasFile:RT,dropZoneIcon:IT,dropZoneText:AT,dropZoneSubtext:FT,filePreview:$T,filePreviewImage:zT,fileName:BT,fileInfo:UT,helpLink:HT,loadingContainer:VT,loadingText:qT,generateButtonContainer:WT,uploadedMapContainer:GT,uploadedMapImage:ZT,formGrid:QT,titleField:KT,ratingDescription:YT,ratingSlider:XT,ratingLabel:JT,ratingInput:ej,ratingValue:tj,submitSection:nj,successContainer:rj,successHeading:ij,successText:oj,successButton:aj,viewFullSizeButton:sj,fullSizeModalOverlay:lj,lightModalOverlay:uj,fullSizeModalContent:cj,fullSizeModalHeader:dj,fullSizeModalImage:fj,confirmSection:hj,step2Layout:pj,topRow:mj,ratingHidden:gj,imageSection:vj,ratingContent:yj,mapColumn:wj,contentColumn:xj,step2bLayout:Cj,metadataSectionCard:Sj,droneMetadataSection:bj,droneMetadataHeading:_j,droneMetadataGrid:Ej,rtkFixContainer:kj,rtkFixLabel:Nj,rtkFixCheckbox:Tj,confirmButtonContainer:jj,ratingWarningContent:Pj,ratingWarningTitle:Mj,ratingWarningText:Lj,ratingWarningButtons:Dj,fallbackReasonBox:Oj,fallbackReasonTitle:Rj,fallbackReasonText:Ij,preprocessingProgress:Aj,carouselContainer:Fj,carouselImageWrapper:$j,carouselImage:zj,carouselNavigation:Bj,carouselButton:Uj,carouselIndicators:Hj,carouselIndicator:Vj,carouselIndicatorActive:qj,viewImageButtonContainer:Wj},uy=v.createContext(void 0),Gj=({children:e})=>{const[n,i]=v.useState(""),[o,s]=v.useState(""),[u,d]=v.useState(""),[f,p]=v.useState(""),[y,w]=v.useState(""),[C,m]=v.useState(""),[x,E]=v.useState(""),[b,N]=v.useState(!1),L={search:n,srcFilter:o,catFilter:u,regionFilter:f,countryFilter:y,imageTypeFilter:C,uploadTypeFilter:x,showReferenceExamples:b,setSearch:i,setSrcFilter:s,setCatFilter:d,setRegionFilter:p,setCountryFilter:w,setImageTypeFilter:m,setUploadTypeFilter:E,setShowReferenceExamples:N,clearAllFilters:()=>{i(""),s(""),d(""),p(""),w(""),m(""),E(""),N(!1)}};return g.jsx(uy.Provider,{value:L,children:e})},Zj=()=>{const e=v.useContext(uy);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e};function Ag({files:e,file:n,preview:i,imageType:o,onFileChange:s,onRemoveImage:u,onAddImage:d,onImageTypeChange:f,onChangeFile:p}){const y=w=>{w.preventDefault();const C=w.dataTransfer.files?.[0];C&&s(C)};return g.jsxs("div",{className:"space-y-6",children:[g.jsx("p",{className:"text-gray-700 leading-relaxed max-w-2xl mx-auto",children:"This app evaluates how well multimodal AI models analyze and describe crisis maps and drone imagery. Upload an image and the AI will generate a description. Then you can review and rate the result based on your expertise."}),g.jsx("div",{className:V.helpLink,children:g.jsxs(Mx,{to:"/help",className:V.helpLink,children:["More ",g.jsx(bC,{className:"w-3 h-3"})]})}),g.jsx("div",{className:"flex justify-center",children:g.jsx(dr,{withInternalPadding:!0,className:"bg-transparent border-none shadow-none",children:g.jsx(_T,{name:"image-type",value:o,onChange:w=>f(w),options:[{key:"crisis_map",label:"Crisis Maps"},{key:"drone_image",label:"Drone Imagery"}],keySelector:w=>w.key,labelSelector:w=>w.label})})}),g.jsxs("div",{className:`${V.dropZone} ${n?V.hasFile:""}`,onDragOver:w=>w.preventDefault(),onDrop:y,children:[e.length>1?g.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 mb-4",children:e.map((w,C)=>g.jsxs("div",{className:"relative",children:[g.jsx("img",{src:URL.createObjectURL(w),alt:`Image ${C+1}`,className:"w-full h-32 object-cover rounded"}),g.jsx(hf,{name:"remove-image",variant:"tertiary",onClick:()=>u(C),title:"Remove image",ariaLabel:"Remove image",className:"absolute top-2 right-2 bg-white/90 hover:bg-white shadow-md hover:shadow-lg border border-gray-200 hover:border-red-300 transition-all duration-200 backdrop-blur-sm",children:g.jsx(df,{className:"w-4 h-4"})}),g.jsx("div",{className:"text-xs text-center mt-1",children:w.name})]},C))}):n&&i?g.jsxs("div",{className:V.filePreview,children:[g.jsx("div",{className:V.filePreviewImage,children:g.jsx("img",{src:i,alt:"File preview"})}),g.jsx("p",{className:V.fileName,children:n.name}),g.jsxs("p",{className:V.fileInfo,children:[(n.size/1024/1024).toFixed(2)," MB"]})]}):g.jsxs(g.Fragment,{children:[g.jsx(s0,{className:V.dropZoneIcon}),g.jsx("p",{className:V.dropZoneText,children:"Drag & Drop any file here"}),g.jsx("p",{className:V.dropZoneSubtext,children:"or"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("label",{className:"inline-block cursor-pointer",children:[g.jsx("input",{type:"file",className:"sr-only",accept:".jpg,.jpeg,.png,.tiff,.tif,.heic,.heif,.webp,.gif,.pdf",onChange:w=>{n&&p?p(w.target.files?.[0]):s(w.target.files?.[0])}}),g.jsx(Ue,{name:"upload",variant:"secondary",size:1,onClick:()=>document.querySelector('input[type="file"]')?.click(),children:n?"Change Image":"Browse Files"})]}),n&&e.length<5&&g.jsx(Ue,{name:"add-image",variant:"secondary",size:1,onClick:d,children:"Add Image"})]})]})]})}function Fg({files:e,imageUrl:n,preview:i,onViewFullSize:o,currentImageIndex:s=0,onGoToPrevious:u,onGoToNext:d,onGoToImage:f,showCarousel:p=!1}){return p&&e.length>1?g.jsx(dr,{heading:"Uploaded Images",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:V.carouselContainer,children:[g.jsx("div",{className:V.carouselImageWrapper,children:e[s]?g.jsx("img",{src:URL.createObjectURL(e[s]),alt:`Image ${s+1}`,className:V.carouselImage}):g.jsx("div",{className:V.imagePlaceholder,children:"No image available"})}),g.jsxs("div",{className:V.carouselNavigation,children:[g.jsx(Ue,{name:"previous-image",variant:"tertiary",size:1,onClick:u,className:V.carouselButton,children:g.jsx(PC,{className:"w-4 h-4"})}),g.jsx("div",{className:V.carouselIndicators,children:e.map((y,w)=>g.jsx("button",{onClick:()=>f?.(w),className:`${V.carouselIndicator} ${w===s?V.carouselIndicatorActive:""}`,children:w+1},w))}),g.jsx(Ue,{name:"next-image",variant:"tertiary",size:1,onClick:d,className:V.carouselButton,children:g.jsx(MC,{className:"w-4 h-4"})})]}),g.jsx("div",{className:V.viewImageButtonContainer,children:g.jsx(Ue,{name:"view-full-size-carousel",variant:"secondary",size:1,onClick:()=>o({file:e[s],index:s}),disabled:!e[s],children:"View Image"})})]})}):e.length>1?g.jsx("div",{className:"space-y-6",children:e.map((y,w)=>g.jsx(dr,{heading:`Image ${w+1}: ${y.name}`,headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:V.uploadedMapContainer,children:[g.jsx("div",{className:V.uploadedMapImage,children:g.jsx("img",{src:URL.createObjectURL(y),alt:`Image ${w+1}`})}),g.jsx("div",{className:V.viewFullSizeButton,children:g.jsx(Ue,{name:`view-full-size-${w}`,variant:"secondary",size:1,onClick:()=>o({file:y,index:w}),children:"View Image"})})]})},w))}):g.jsx(dr,{heading:"Uploaded Image",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:V.uploadedMapContainer,children:[g.jsx("div",{className:V.uploadedMapImage,children:g.jsx("img",{src:n||i||void 0,alt:"Uploaded image preview"})}),g.jsx("div",{className:V.viewFullSizeButton,children:g.jsx(Ue,{name:"view-full-size",variant:"secondary",size:1,onClick:()=>o(),children:"View Image"})})]})})}function Qj({files:e,imageType:n,title:i,source:o,eventType:s,epsg:u,countries:d,centerLon:f,centerLat:p,amslM:y,aglM:w,headingDeg:C,yawDeg:m,pitchDeg:x,rollDeg:E,rtkFix:b,stdHM:N,stdVM:P,metadataArray:L,sources:$,types:q,spatialReferences:Z,imageTypes:fe,countriesOptions:O,onTitleChange:K,onSourceChange:ce,onEventTypeChange:de,onEpsgChange:I,onCountriesChange:U,onCenterLonChange:W,onCenterLatChange:ne,onAmslMChange:he,onAglMChange:Ce,onHeadingDegChange:_e,onYawDegChange:G,onPitchDegChange:ue,onRollDegChange:T,onRtkFixChange:H,onStdHMChange:oe,onStdVMChange:Se,onImageTypeChange:se,updateMetadataForImage:re}){return e.length>1?g.jsxs("div",{children:[g.jsx("div",{className:"mb-4",children:g.jsx(jt,{label:"Shared Title",name:"title",value:i,onChange:K,placeholder:"Enter a title for all images...",required:!0})}),e.map((ee,Q)=>g.jsx("div",{className:"mb-6",children:g.jsx(dr,{heading:`Image ${Q+1}: ${ee.name}`,headingLevel:4,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:V.formGrid,children:[n!=="drone_image"&&g.jsx(eo,{label:"Source",name:`source_${Q}`,value:L[Q]?.source||"",onChange:Y=>re(Q,"source",Y),options:$,keySelector:Y=>Y.s_code,labelSelector:Y=>Y.label,required:!0}),g.jsx(eo,{label:"Event Type",name:`event_type_${Q}`,value:L[Q]?.eventType||"",onChange:Y=>re(Q,"eventType",Y),options:q,keySelector:Y=>Y.t_code,labelSelector:Y=>Y.label,required:n!=="drone_image"}),g.jsx(eo,{label:"EPSG",name:`epsg_${Q}`,value:L[Q]?.epsg||"",onChange:Y=>re(Q,"epsg",Y),options:Z,keySelector:Y=>Y.epsg,labelSelector:Y=>`${Y.srid} (EPSG:${Y.epsg})`,placeholder:"EPSG",required:n!=="drone_image"}),g.jsx(Lg,{label:"Countries (optional)",name:`countries_${Q}`,value:L[Q]?.countries||[],onChange:Y=>re(Q,"countries",Y),options:O,keySelector:Y=>Y.c_code,labelSelector:Y=>Y.label,placeholder:"Select one or more"}),n==="drone_image"&&g.jsx(g.Fragment,{children:g.jsxs("div",{className:V.droneMetadataSection,children:[g.jsx("h4",{className:V.droneMetadataHeading,children:"Drone Flight Data"}),g.jsxs("div",{className:V.droneMetadataGrid,children:[g.jsx(jt,{label:"Center Longitude",name:`center_lon_${Q}`,value:L[Q]?.centerLon||"",onChange:Y=>re(Q,"centerLon",Y),placeholder:"e.g., -122.4194",step:"any"}),g.jsx(jt,{label:"Center Latitude",name:`center_lat_${Q}`,value:L[Q]?.centerLat||"",onChange:Y=>re(Q,"centerLat",Y),placeholder:"e.g., 37.7749",step:"any"}),g.jsx(jt,{label:"Altitude AMSL (m)",name:`amsl_m_${Q}`,value:L[Q]?.amslM||"",onChange:Y=>re(Q,"amslM",Y),placeholder:"e.g., 100.5",step:"any"}),g.jsx(jt,{label:"Altitude AGL (m)",name:`agl_m_${Q}`,value:L[Q]?.aglM||"",onChange:Y=>re(Q,"aglM",Y),placeholder:"e.g., 50.2",step:"any"}),g.jsx(jt,{label:"Heading (degrees)",name:`heading_deg_${Q}`,value:L[Q]?.headingDeg||"",onChange:Y=>re(Q,"headingDeg",Y),placeholder:"e.g., 180.0",step:"any"}),g.jsx(jt,{label:"Yaw (degrees)",name:`yaw_deg_${Q}`,value:L[Q]?.yawDeg||"",onChange:Y=>re(Q,"yawDeg",Y),placeholder:"e.g., 90.0",step:"any"}),g.jsx(jt,{label:"Pitch (degrees)",name:`pitch_deg_${Q}`,value:L[Q]?.pitchDeg||"",onChange:Y=>re(Q,"pitchDeg",Y),placeholder:"e.g., 0.0",step:"any"}),g.jsx(jt,{label:"Roll (degrees)",name:`roll_deg_${Q}`,value:L[Q]?.rollDeg||"",onChange:Y=>re(Q,"rollDeg",Y),placeholder:"e.g., 0.0",step:"any"}),g.jsx("div",{className:V.rtkFixContainer,children:g.jsxs("label",{className:V.rtkFixLabel,children:[g.jsx("input",{type:"checkbox",checked:L[Q]?.rtkFix||!1,onChange:Y=>re(Q,"rtkFix",Y.target.checked),className:V.rtkFixCheckbox}),"RTK Fix Available"]})}),g.jsx(jt,{label:"Horizontal Std Dev (m)",name:`std_h_m_${Q}`,value:L[Q]?.stdHM||"",onChange:Y=>re(Q,"stdHM",Y),placeholder:"e.g., 0.1",step:"any"}),g.jsx(jt,{label:"Vertical Std Dev (m)",name:`std_v_m_${Q}`,value:L[Q]?.stdVM||"",onChange:Y=>re(Q,"stdVM",Y),placeholder:"e.g., 0.2",step:"any"})]})]})})]})})},Q))]}):g.jsxs("div",{className:V.formGrid,children:[g.jsx("div",{className:V.titleField,children:g.jsx(jt,{label:"Title",name:"title",value:i,onChange:K,placeholder:"Enter a title for this map...",required:!0})}),n!=="drone_image"&&g.jsx(eo,{label:"Source",name:"source",value:o,onChange:ce,options:$,keySelector:ee=>ee.s_code,labelSelector:ee=>ee.label,required:!0}),g.jsx(eo,{label:"Event Type",name:"event_type",value:s,onChange:de,options:q,keySelector:ee=>ee.t_code,labelSelector:ee=>ee.label,required:n!=="drone_image"}),g.jsx(eo,{label:"EPSG",name:"epsg",value:u,onChange:I,options:Z,keySelector:ee=>ee.epsg,labelSelector:ee=>`${ee.srid} (EPSG:${ee.epsg})`,placeholder:"EPSG",required:n!=="drone_image"}),g.jsx(eo,{label:"Image Type",name:"image_type",value:n,onChange:se,options:fe,keySelector:ee=>ee.image_type,labelSelector:ee=>ee.label,required:!0}),g.jsx(Lg,{label:"Countries (optional)",name:"countries",value:d,onChange:U,options:O,keySelector:ee=>ee.c_code,labelSelector:ee=>ee.label,placeholder:"Select one or more"}),n==="drone_image"&&g.jsx(g.Fragment,{children:g.jsxs("div",{className:V.droneMetadataSection,children:[g.jsx("h4",{className:V.droneMetadataHeading,children:"Drone Flight Data"}),g.jsxs("div",{className:V.droneMetadataGrid,children:[g.jsx(jt,{label:"Center Longitude",name:"center_lon",value:f,onChange:W,placeholder:"e.g., -122.4194",step:"any"}),g.jsx(jt,{label:"Center Latitude",name:"center_lat",value:p,onChange:ne,placeholder:"e.g., 37.7749",step:"any"}),g.jsx(jt,{label:"Altitude AMSL (m)",name:"amsl_m",value:y,onChange:he,placeholder:"e.g., 100.5",step:"any"}),g.jsx(jt,{label:"Altitude AGL (m)",name:"agl_m",value:w,onChange:Ce,placeholder:"e.g., 50.2",step:"any"}),g.jsx(jt,{label:"Heading (degrees)",name:"heading_deg",value:C,onChange:_e,placeholder:"e.g., 180.0",step:"any"}),g.jsx(jt,{label:"Yaw (degrees)",name:"yaw_deg",value:m,onChange:G,placeholder:"e.g., 90.0",step:"any"}),g.jsx(jt,{label:"Pitch (degrees)",name:"pitch_deg",value:x,onChange:ue,placeholder:"e.g., 0.0",step:"any"}),g.jsx(jt,{label:"Roll (degrees)",name:"roll_deg",value:E,onChange:T,placeholder:"e.g., 0.0",step:"any"}),g.jsx("div",{className:V.rtkFixContainer,children:g.jsxs("label",{className:V.rtkFixLabel,children:[g.jsx("input",{type:"checkbox",checked:b,onChange:ee=>H(ee.target.checked),className:V.rtkFixCheckbox}),"RTK Fix Available"]})}),g.jsx(jt,{label:"Horizontal Std Dev (m)",name:"std_h_m",value:N,onChange:oe,placeholder:"e.g., 0.1",step:"any"}),g.jsx(jt,{label:"Vertical Std Dev (m)",name:"std_v_m",value:P,onChange:Se,placeholder:"e.g., 0.2",step:"any"})]})]})})]})}function Kj({isPerformanceConfirmed:e,scores:n,onScoreChange:i,onConfirmRatings:o}){return e?null:g.jsx(dr,{heading:"AI Performance Rating",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:V.ratingContent,children:[g.jsx("p",{className:V.ratingDescription,children:"How well did the AI perform on the task?"}),["accuracy","context","usability"].map(s=>g.jsxs("div",{className:V.ratingSlider,children:[g.jsx("label",{className:V.ratingLabel,children:s}),g.jsx("input",{type:"range",min:0,max:100,value:n[s],onChange:u=>i(s,Number(u.target.value)),className:V.ratingInput}),g.jsx("span",{className:V.ratingValue,children:n[s]})]},s)),g.jsx("div",{className:V.confirmButtonContainer,children:g.jsx(Ue,{name:"confirm-ratings",variant:"secondary",onClick:o,children:"Confirm Ratings"})})]})})}function Yj({description:e,analysis:n,recommendedActions:i,onDescriptionChange:o,onAnalysisChange:s,onRecommendedActionsChange:u,onBack:d,onDelete:f,onSubmit:p,onEditRatings:y,isPerformanceConfirmed:w=!1,isSubmitting:C=!1}){const m=x=>{if(x){const E=x.split(` -`),b=E.findIndex(L=>L.startsWith("Description:")),N=E.findIndex(L=>L.startsWith("Analysis:")),P=E.findIndex(L=>L.startsWith("Recommended Actions:"));b!==-1&&N!==-1&&P!==-1&&(o(E.slice(b+1,N).join(` -`).trim()),s(E.slice(N+1,P).join(` -`).trim()),u(E.slice(P+1).join(` -`).trim()))}};return g.jsxs(dr,{heading:"Generated Text",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[g.jsx("div",{className:"text-left space-y-4",children:g.jsx("div",{children:g.jsx(kT,{name:"generatedContent",value:`Description: +https://www.w3ctech.com/topic/2226`));let d=n(...u);return d.postcssPlugin=e,d.postcssVersion=new Zf().version,d}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(u,d,f){return it([o(f)]).process(u,d)},o};it.stringify=j2;it.parse=N2;it.fromJSON=S2;it.list=E2;it.comment=e=>new ny(e);it.atRule=e=>new ty(e);it.decl=e=>new ry(e);it.rule=e=>new ay(e);it.root=e=>new oy(e);it.document=e=>new iy(e);it.CssSyntaxError=C2;it.Declaration=ry;it.Container=x2;it.Processor=Zf;it.Document=iy;it.Comment=ny;it.Warning=P2;it.AtRule=ty;it.Result=T2;it.Input=b2;it.Rule=ay;it.Root=oy;it.Node=k2;_2.registerPostcss(it);var M2=it;it.default=it;const{isPlainObject:$P}=Ff,{parse:zP}=M2,L2="_list_1whuj_1",D2="_compact_1whuj_5",O2="_pending_1whuj_8",Sd={list:L2,compact:D2,pending:O2};function R2(e){const{className:n,data:i,keySelector:o,renderer:s,rendererParams:u,pending:d,errored:f,filtered:p,errorMessage:y,emptyMessage:w,pendingMessage:C,filteredEmptyMessage:m,compact:x,withoutMessage:N=!1,messageClassName:b}=e,E=$e(i)||i.length===0;return g.jsxs("div",{className:Oe(Sd.list,x&&Sd.compact,d&&Sd.pending,n),children:[g.jsx(h0,{data:i,keySelector:o,renderer:s,rendererParams:u}),!N&&g.jsx(u0,{className:b,pending:d,filtered:p,empty:E,errored:f,compact:x,emptyMessage:w,filteredEmptyMessage:m,pendingMessage:C,errorMessage:y,overlayPending:!0})]})}function sy(e,n){if($e(e))return;const i={},o=[];return e.forEach(s=>{const u=n?n(s):JSON.stringify(s);i[u]||(i[u]=!0,o.push(s))}),e.length===o.length?e:o}const I2=[40,38,13,8];function A2(e,n,i){return n.findIndex((o,s)=>i(o,s)===e)}function Mg(e,n,i,o){if(i.length<=0)return;let s=A2(e,i,o);s===-1&&(s=n>0?-1:0);const u=Gx(s+n,i.length);return o(i[u],u)}function F2(e,n,i,o,s,u,d,f,p){return v.useCallback(y=>{const{keyCode:w}=y,C=e?.key;if(o&&(w===9||w===27))u();else if(!o&&I2.includes(w))y.stopPropagation(),y.preventDefault(),d();else if(w===13)if(Lt(C)){y.stopPropagation(),y.preventDefault();const m=i.find((x,N)=>n(x,N)===C);m&&f(C,m)}else y.stopPropagation(),y.preventDefault(),p&&p();else if(w===40){y.stopPropagation(),y.preventDefault();const m=Mg(C,1,i,n);s(m?{key:m}:void 0)}else if(w===38){y.stopPropagation(),y.preventDefault();const m=Mg(C,-1,i,n);s(m?{key:m}:void 0)}},[e,o,n,s,u,f,d,p,i])}const $2="_generic-option_zv1n8_1",z2={genericOption:$2};function B2(e){const{optionContainerClassName:n,contentRenderer:i,contentRendererParam:o,option:s,onClick:u,optionKey:d,focusedKey:f}=e,p=o(d,s),{containerClassName:y,title:w,...C}=p,m=f?.key===d,x=v.useRef(null);v.useEffect(()=>{f&&f.key===d&&!f.mouse&&x.current&&x.current.scrollIntoView({behavior:"smooth",block:"center"})},[d,f]);const N=v.useCallback(()=>{u(d,s)},[d,s,u]);return g.jsx(uf,{elementRef:x,className:Oe(z2.genericOption,n,y),onClick:N,title:w,name:d,focused:m,children:i(C)})}const U2="common",H2={infoMessageAnd:"and",infoMessageMore:"more",buttonTitleSelect:"Select all",buttonTitleClear:"Clear",buttonTitleClose:"Close",buttonTitleOpen:"Open",selectInputPendingMessage:"Fetching options...",selectInputEmptyMessage:"No option available",selectInputFilteredMessage:"No option available for the search",selectInputErrorMessage:"Could not load options"},V2={namespace:U2,strings:H2},q2="_popup_poyjv_1",W2="_list_poyjv_4",G2="_list-item_poyjv_9",Z2="_info-message_poyjv_14",Q2="_icon_poyjv_21",Si={popup:q2,list:W2,listItem:G2,infoMessage:Z2,icon:Q2},K2=[];function ly(e){const{actions:n,actionsContainerClassName:i,className:o,disabled:s,error:u,errorContainerClassName:d,hint:f,hintContainerClassName:p,icons:y,iconsContainerClassName:w,inputSectionClassName:C,label:m,labelClassName:x,name:N,onOptionClick:b,searchText:E,onSearchTextChange:P,optionContainerClassName:L,optionKeySelector:$,optionRenderer:H,optionRendererParams:Z,options:de,optionsPopupClassName:O,persistentOptionPopup:K,readOnly:ce,placeholder:fe,valueDisplay:I="",nonClearable:U,onClearButtonClick:W,onSelectAllButtonClick:ne,optionsPending:he=!1,optionsFiltered:Ce=!1,optionsErrored:_e=!1,focused:G,focusedKey:ue,onFocusedKeyChange:T,onFocusedChange:V,dropdownShown:oe,onDropdownShownChange:Se,totalOptionsCount:se=0,hasValue:re,autoFocus:ee,onEnterWithoutOption:Q,withAsterisk:Y,required:et,variant:tn,errorOnTooltip:Wt,dropdownHidden:ot}=e,bt=de??K2,st=l0(V2),wt=v.useRef(null),ft=v.useRef(null),ht=v.useRef(null),xt=v.useRef(null),nn=v.useCallback(pt=>{oe||Se(!0),P(pt)},[oe,Se,P]),Tn=v.useCallback((pt,Kt)=>{Kt.stopPropagation(),Se(!oe)},[oe,Se]),ln=v.useCallback(()=>{oe||Se(!0)},[oe,Se]),jn=v.useCallback(()=>{Se(!1)},[Se]),Jr=v.useCallback(()=>{ce||ln()},[ce,ln]),un=v.useCallback((pt,Kt)=>{pt||Kt?K&&ht.current&&ht.current.focus():jn()},[jn,K]),cn=v.useCallback((pt,Kt)=>{b(pt,Kt,N),K||jn()},[b,jn,K,N]),Er=v.useCallback((pt,Kt)=>({contentRendererParam:Z,option:Kt,optionKey:pt,focusedKey:ue,contentRenderer:H,onClick:cn,onFocus:T,optionContainerClassName:Oe(L,Si.listItem)}),[ue,cn,T,L,H,Z]);FE(oe,un,xt,wt);const Kn=F2(ue,$,bt,oe,T,jn,ln,cn,Q),lt=bt.length,Dt=se-lt>0?`${st.infoMessageAnd} ${se-lt} ${st.infoMessageMore}`:void 0,Qt=oe&&!ot;return g.jsxs(g.Fragment,{children:[g.jsx(Pf,{actionsContainerClassName:i,className:o,containerRef:wt,disabled:s,errorContainerClassName:d,error:u,errorOnTooltip:Wt,hintContainerClassName:p,hint:f,iconsContainerClassName:w,icons:y,inputSectionClassName:C,inputSectionRef:ft,labelClassName:x,label:m,readOnly:ce,required:et,variant:tn,withAsterisk:Y,actions:g.jsxs(g.Fragment,{children:[n,!ce&&ne&&g.jsx(Ue,{onClick:ne,disabled:s,variant:"tertiary",name:void 0,title:st.buttonTitleSelect,children:g.jsx(EC,{className:Si.icon})}),!ce&&!U&&re&&g.jsx(Ue,{onClick:W,disabled:s,variant:"tertiary",name:void 0,title:st.buttonTitleClear,children:g.jsx(LC,{className:Si.icon})}),!ce&&g.jsx(Ue,{onClick:Tn,variant:"tertiary",name:void 0,title:Qt?st.buttonTitleClose:st.buttonTitleOpen,children:Qt?g.jsx(_C,{className:Si.icon}):g.jsx(SC,{className:Si.icon})})]}),input:g.jsx(X0,{name:N,elementRef:ht,readOnly:ce,disabled:s,value:oe||G?E:I,onChange:nn,onClick:Jr,onFocus:()=>V(!0),onBlur:()=>V(!1),placeholder:ps(I)?I:fe,autoComplete:"off",onKeyDown:Kn,autoFocus:ee})}),Qt&&g.jsxs(c0,{elementRef:xt,parentRef:ft,className:Oe(O,Si.popup),children:[g.jsx(R2,{className:Si.list,data:bt,keySelector:$,renderer:B2,rendererParams:Er,errored:_e,filtered:Ce,pending:he,pendingMessage:st.selectInputPendingMessage,emptyMessage:st.selectInputEmptyMessage,filteredEmptyMessage:st.selectInputFilteredMessage,errorMessage:st.selectInputErrorMessage,compact:!0}),!he&&!_e&&!!Dt&&g.jsx("div",{className:Si.infoMessage,children:Dt})]})]})}function Y2(e){const{children:n,isActive:i,iconClassName:o,labelClassName:s}=e;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:o,children:i?g.jsx(jC,{}):g.jsx(TC,{})}),g.jsx("div",{className:s,children:n})]})}const X2="_option_1kpl9_1",J2="_active_1kpl9_7",eT="_icon_1kpl9_11",tT="_label_1kpl9_17",Wa={option:X2,active:J2,icon:eT,label:tT},bd=[];function nT(e){const{keySelector:n,labelSelector:i,name:o,onChange:s,onOptionsChange:u,options:d,optionsPending:f,optionsErrored:p,value:y,sortFunction:w,searchOptions:C,onSearchValueChange:m,onShowDropdownChange:x,hideOptionFilter:N,selectedOnTop:b,...E}=e,P=d??bd,L=C??bd,$=y??bd,[H,Z]=v.useState(),[de,O]=v.useState(!1),[K,ce]=v.useState(!1),[fe,I]=v.useState(),[U,W]=v.useState({}),ne=v.useMemo(()=>Ka(P,n,se=>se),[P,n]),he=v.useMemo(()=>Ka(P,n,i),[P,n,i]),Ce=v.useMemo(()=>$.map(se=>he[se]??"?").join(", "),[$,he]),_e=v.useMemo(()=>$.map(se=>ne[se]).filter(Lt),[$,ne]),G=v.useMemo(()=>{const se=sy([...L,..._e],n);if(!b)return w?w(se,H,i):se;const re=se.filter(Q=>U[n(Q)]),ee=se.filter(Q=>!U[n(Q)]&&($e(N)||N(Q)));return w?[...lo(re,H,i),...w(ee,H,i)]:[...lo(re,H,i),...ee]},[b,n,i,H,L,U,_e,w,N]),ue=v.useCallback(se=>{Z(se),m&&m(se)},[m]),T=v.useCallback(se=>{O(se),x&&x(se),se?(W(Ka($,re=>re,()=>!0)),I(void 0)):(W({}),I(void 0),Z(void 0),m&&m(void 0))},[$,m,x]),V=v.useCallback((se,re)=>{const ee=$.findIndex(Q=>Q===se)!==-1;return{children:i(re),containerClassName:Oe(Wa.option,ee&&Wa.active),title:i(re),isActive:ee,labelClassName:Wa.label,iconClassName:Wa.icon}},[i,$]),oe=v.useCallback((se,re)=>{const ee=[...$],Q=$.findIndex(Y=>Y===se);Q!==-1?ee.splice(Q,1):(ee.push(se),u&&u(Y=>{const et=Y??[];return et.find(tn=>n(tn)===se)?Y:[...et,re]})),s(ee,o)},[$,s,o,u,n]),Se=v.useCallback(()=>{s([],o)},[o,s]);return g.jsx(ly,{...E,name:o,options:G,optionsPending:f,optionsFiltered:ps(H)&&H.length>0,optionsErrored:p,optionKeySelector:n,optionRenderer:Y2,optionRendererParams:V,optionContainerClassName:Wa.optionContainer,onOptionClick:oe,valueDisplay:Ce,onClearButtonClick:Se,searchText:H,onSearchTextChange:ue,dropdownShown:de,onDropdownShownChange:T,focused:K,onFocusedChange:ce,focusedKey:fe,onFocusedKeyChange:I,persistentOptionPopup:!0,nonClearable:!1,hasValue:Lt($)&&$.length>0})}function Lg(e){const{name:n,options:i,keySelector:o,onChange:s,withSelectAll:u,...d}=e,f=v.useCallback(()=>{if($e(i))return;const p=i.map(o);s(p,n)},[i,n,s,o]);return g.jsx(nT,{...d,name:n,onChange:s,options:i,keySelector:o,sortFunction:lo,searchOptions:i,onSelectAllButtonClick:u?f:void 0,selectedOnTop:!1})}const rT="_page-container_1cfro_1",iT="_content_1cfro_2",Dg={pageContainer:rT,content:iT};function Qf(e){const{className:n,contentClassName:i,children:o,contentAs:s="div",containerAs:u="div"}=e,d=s;return g.jsx(u,{className:Oe(Dg.pageContainer,n),children:g.jsx(d,{className:Oe(Dg.content,i),children:o})})}const oT="_raw-input_145mq_1",aT={rawInput:oT};function sT(e){const{className:n,onChange:i,elementRef:o,value:s,name:u,...d}=e,f=fr.useCallback(p=>{var y;const w=(y=p?.target)==null?void 0:y.value;i&&i(w===""?void 0:w,u,p)},[u,i]);return g.jsx("textarea",{...d,ref:o,className:Oe(aT.rawInput,n),name:Lt(u)?String(u):void 0,onChange:f,value:s??""})}const lT="_option_11p37_1",uT="_icon_11p37_6",cT="_label_11p37_14",dT="_overflow-container_11p37_20",fT="_description_11p37_25",Vo={option:lT,icon:uT,label:cT,overflowContainer:dT,description:fT};function hT(e){const{className:n,label:i,description:o,iconClassName:s,labelClassName:u}=e;return g.jsxs("div",{className:Oe(Vo.option,n),children:[g.jsx("div",{className:Oe(Vo.icon,s),children:g.jsx(kC,{})}),g.jsxs("div",{className:Oe(Vo.label,u),children:[g.jsx("div",{className:Vo.overflowContainer,children:i}),g.jsx("div",{className:Oe(Vo.overflowContainer,Vo.description),children:o})]})]})}const pT="_option-container_2k92q_1",mT="_option_2k92q_1",gT="_active_2k92q_9",vT="_icon_2k92q_12",Ga={optionContainer:pT,option:mT,active:gT,icon:vT},Og=[];function Rg(e){const{keySelector:n,labelSelector:i,descriptionSelector:o,name:s,onChange:u,onOptionsChange:d,options:f,optionsPending:p,optionsErrored:y,value:w,sortFunction:C,searchOptions:m,onSearchValueChange:x,onShowDropdownChange:N,hideOptionFilter:b,selectedOnTop:E,onEnterWithoutOption:P,...L}=e,$=f??Og,H=m??Og,[Z,de]=v.useState(),[O,K]=v.useState(!1),[ce,fe]=v.useState(!1),[I,U]=v.useState(),[W,ne]=v.useState({}),he=v.useMemo(()=>Ka($,n,i),[$,n,i]),Ce=Lt(w)?he[w]??"?":"",_e=v.useMemo(()=>{const re=$?.find(ee=>n(ee)===w);return $e(re)?[]:[re]},[w,$,n]),G=v.useMemo(()=>{const re=sy([...H,..._e],n);if(!E)return C?C(re,Z,i):re;const ee=re.filter(Y=>W[n(Y)]),Q=re.filter(Y=>!W[n(Y)]&&($e(b)||b(Y)));return C?[...lo(ee,Z,i),...C(Q,Z,i)]:[...lo(ee,Z,i),...Q]},[E,n,i,Z,H,W,_e,C,b]),ue=v.useCallback(re=>{de(re),x&&x(re)},[x]),T=v.useCallback(()=>{K(!1),N&&N(!1),de(void 0),x&&x(void 0),P&&P(Z)},[Z,N,P,x]),V=v.useCallback(re=>{K(re),N&&N(re),re?(ne(Ka(w?[w]:[],ee=>ee,()=>!0)),U(w?{key:w}:void 0)):(ne({}),U(void 0),de(void 0),x&&x(void 0))},[w,x,N]),oe=v.useCallback((re,ee)=>{const Q=re===w;return{label:i(ee),description:o?o(ee):void 0,containerClassName:Oe(Ga.optionContainer,Q&&Ga.active),title:i(ee),className:Ga.option,iconClassName:Ga.icon}},[w,i,o]),Se=v.useCallback((re,ee)=>{d&&d(Q=>{const Y=Q??[];return Y.find(et=>n(et)===re)?Q:[...Y,ee]}),u(re,s,ee)},[u,s,d,n]),se=v.useCallback(()=>{if(!e.nonClearable){const re=e.onChange;re(void 0,s,void 0)}},[s,e.onChange,e.nonClearable]);return g.jsx(ly,{...L,name:s,options:G,optionsPending:p,optionsErrored:y,optionsFiltered:ps(Z)&&Z.length>0,optionKeySelector:n,optionRenderer:hT,optionRendererParams:oe,optionContainerClassName:Ga.optionContainer,onOptionClick:Se,valueDisplay:Ce,onClearButtonClick:se,searchText:Z,onSearchTextChange:ue,dropdownShown:O,onDropdownShownChange:V,focused:ce,onFocusedChange:fe,focusedKey:I,onFocusedKeyChange:U,hasValue:Lt(w),persistentOptionPopup:!1,onEnterWithoutOption:T})}const yT="_segment-input_bykt7_1",wT="_segment-list_bykt7_4",xT="_segment_bykt7_1",CT="_active_bykt7_18",ST="_secondary-variant_bykt7_24",Xa={segmentInput:yT,segmentList:wT,segment:xT,active:CT,secondaryVariant:ST};function bT(e){const{label:n,name:i,onClick:o,value:s,className:u,variant:d="primary",inputName:f,...p}=e;return g.jsx(Ue,{...p,className:Oe(Xa.segment,s&&Xa.active,d==="secondary"&&Xa.secondaryVariant,u),name:i,onClick:o,variant:"tertiary",children:n})}function _T(e){const{rendererParams:n,listContainerClassName:i,keySelector:o,labelSelector:s,className:u,...d}=e;return g.jsx(wb,{className:Oe(u,Xa.segmentInput),...d,renderer:bT,rendererParams:n,listContainerClassName:Oe(i,Xa.segmentList),keySelector:o,labelSelector:s})}function eo(e){const{name:n,options:i,nonClearable:o,onChange:s,...u}=e;return e.nonClearable?g.jsx(Rg,{...u,onChange:e.onChange,nonClearable:e.nonClearable,name:n,options:i,sortFunction:lo,searchOptions:i,selectedOnTop:!1}):g.jsx(Rg,{...u,onChange:e.onChange,nonClearable:e.nonClearable,name:n,options:i,sortFunction:lo,searchOptions:i,selectedOnTop:!1})}v.createContext({tabs:[],step:0,disabled:!1,activeTab:"",variant:"primary",setActiveTab:()=>{console.warn("setActiveTab called before it was initialized")},registerTab:()=>{console.warn("registerTab called before it was initialized")},unregisterTab:()=>{console.warn("unregisterTab called before it was initialized")}});const Ig="•",ET="Enter";function kT(e){const{actions:n,className:i,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputClassName:p,label:y,labelClassName:w,readOnly:C,required:m,variant:x,inputSectionClassName:N,withAsterisk:b,onChange:E,name:P,autoBullets:L=!1,rows:$=5,...H}=e,Z=fr.useCallback(O=>{$e(E)||O.target.value===""&&E(`${Ig} `,P)},[E,P]),de=fr.useCallback(O=>{$e(E)||O.key===ET&&E(`${O.currentTarget.value}${Ig} `,P)},[E,P]);return g.jsx(Pf,{actions:n,className:i,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputSectionClassName:N,labelClassName:w,label:y,readOnly:C,required:m,variant:x,withAsterisk:b,input:g.jsx(sT,{...H,readOnly:C,disabled:o,className:p,onChange:E,name:P,onFocus:L?Z:void 0,onKeyUp:L?de:void 0,rows:$})})}function jt(e){const{actions:n,className:i,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputClassName:p,inputSectionClassName:y,label:w,readOnly:C,required:m,variant:x,withAsterisk:N,type:b="text",...E}=e;return g.jsx(Pf,{className:i,actions:n,disabled:o,error:s,errorOnTooltip:u,hint:d,icons:f,inputSectionClassName:y,label:w,required:m,readOnly:C,variant:x,withAsterisk:N,input:g.jsx(X0,{...E,required:m,readOnly:C,disabled:o,className:p,type:b})})}const NT="_dropdownContainer_1six7_3",TT="_dropdownMenu_1six7_15",jT="_dropdownContent_1six7_43",_d={dropdownContainer:NT,dropdownMenu:TT,dropdownContent:jT},PT=[{to:"/upload",label:"Upload",Icon:s0},{to:"/explore",label:"Explore",Icon:AC},{to:"/analytics",label:"Analytics",Icon:a0}];function MT(){const e=ra(),n=hs(),[i,o]=v.useState(!1),s=v.useRef(null);return v.useEffect(()=>{const u=d=>{s.current&&!s.current.contains(d.target)&&o(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),g.jsx("nav",{className:"border-b border-gray-200 bg-white shadow-sm sticky top-0 z-50 backdrop-blur-sm bg-white/95",children:g.jsxs(Qf,{className:"border-b-2 border-ifrcRed",contentClassName:"grid grid-cols-3 items-center py-6",children:[g.jsxs("div",{className:"flex items-center gap-4 min-w-0 cursor-pointer group transition-all duration-200 hover:scale-105",onClick:()=>{if(!(e.pathname==="/upload"||e.pathname==="/")){if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/")}},children:[g.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-ifrcRed/10 to-ifrcRed/20 group-hover:from-ifrcRed/20 group-hover:to-ifrcRed/30 transition-all duration-200",children:g.jsx(DC,{className:"h-8 w-8 flex-shrink-0 text-ifrcRed"})}),g.jsx("div",{className:"flex flex-col",children:g.jsx("span",{className:"font-bold text-xl text-gray-900 leading-tight",children:"PromptAid Vision"})})]}),g.jsx("div",{className:"flex justify-center",children:g.jsx("nav",{className:"flex items-center space-x-4 bg-gray-50/80 rounded-xl p-2 backdrop-blur-sm",children:PT.map(({to:u,label:d,Icon:f})=>{const p=e.pathname===u||u==="/upload"&&e.pathname==="/"||u==="/explore"&&e.pathname.startsWith("/map/"),y=e.pathname==="/upload"||e.pathname==="/",w=u==="/upload"||u==="/";return g.jsxs("div",{className:"relative",children:[g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsxs(Ue,{name:d.toLowerCase(),variant:p?"primary":"tertiary",size:1,className:`transition-all duration-200 ${p?"shadow-lg shadow-ifrcRed/20 transform scale-105":"hover:bg-white hover:shadow-md hover:scale-105"}`,onClick:()=>{if(!(y&&w)){if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded(u);return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n(u)}},children:[g.jsx(f,{className:`w-4 h-4 transition-transform duration-200 ${p?"scale-110":"group-hover:scale-110"}`}),g.jsx("span",{className:"inline ml-2 font-semibold",children:d})]})}),p&&g.jsx("div",{className:"absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-8 h-1 bg-ifrcRed rounded-full animate-pulse"})]},u)})})}),g.jsx("div",{className:"flex justify-end",children:g.jsxs("div",{className:_d.dropdownContainer,ref:s,children:[g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsx(Ue,{name:"more-options",variant:i?"primary":"tertiary",size:1,className:"transition-all duration-200",onClick:()=>o(!i),children:g.jsx(OC,{className:"w-4 h-4"})})}),i&&g.jsx("div",{className:_d.dropdownMenu,children:g.jsxs("div",{className:_d.dropdownContent,children:[g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsxs(Ue,{name:"help-support",variant:"tertiary",size:1,className:"w-full justify-start",onClick:()=>{if(o(!1),e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/help");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/help")},children:[g.jsx(RC,{className:"w-4 h-4"}),g.jsx("span",{className:"ml-2 font-semibold",children:"Help & Support"})]})}),g.jsx(dr,{withInternalPadding:!0,className:"p-2",children:g.jsxs(Ue,{name:"dev",variant:"tertiary",size:1,className:"w-full justify-start",onClick:()=>{if(o(!1),e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/admin");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/admin")},children:[g.jsx(FC,{className:"w-4 h-4"}),g.jsx("span",{className:"ml-2 font-semibold",children:"Dev"})]})})]})})]})})]})})}function LT(){return g.jsxs(g.Fragment,{children:[g.jsx(MT,{}),g.jsx(lx,{})]})}const DT="_uploadContainer_1i3bv_1",OT="_dropZone_1i3bv_9",RT="_hasFile_1i3bv_30",IT="_dropZoneIcon_1i3bv_37",AT="_dropZoneText_1i3bv_43",FT="_dropZoneSubtext_1i3bv_49",$T="_filePreview_1i3bv_55",zT="_filePreviewImage_1i3bv_64",BT="_fileName_1i3bv_110",UT="_fileInfo_1i3bv_118",HT="_helpLink_1i3bv_125",VT="_loadingContainer_1i3bv_145",qT="_loadingText_1i3bv_153",WT="_generateButtonContainer_1i3bv_157",GT="_uploadedMapContainer_1i3bv_165",ZT="_uploadedMapImage_1i3bv_169",QT="_formGrid_1i3bv_209",KT="_titleField_1i3bv_222",YT="_ratingDescription_1i3bv_230",XT="_ratingSlider_1i3bv_235",JT="_ratingLabel_1i3bv_242",ej="_ratingInput_1i3bv_251",tj="_ratingValue_1i3bv_256",nj="_submitSection_1i3bv_266",rj="_successContainer_1i3bv_275",ij="_successHeading_1i3bv_280",oj="_successText_1i3bv_285",aj="_successButton_1i3bv_291",sj="_viewFullSizeButton_1i3bv_297",lj="_fullSizeModalOverlay_1i3bv_306",uj="_lightModalOverlay_1i3bv_320",cj="_fullSizeModalContent_1i3bv_334",dj="_fullSizeModalHeader_1i3bv_345",fj="_fullSizeModalImage_1i3bv_361",hj="_confirmSection_1i3bv_398",pj="_step2Layout_1i3bv_407",mj="_topRow_1i3bv_413",gj="_ratingHidden_1i3bv_421",vj="_imageSection_1i3bv_425",yj="_ratingContent_1i3bv_435",wj="_mapColumn_1i3bv_453",xj="_contentColumn_1i3bv_458",Cj="_step2bLayout_1i3bv_465",Sj="_metadataSectionCard_1i3bv_562",bj="_droneMetadataSection_1i3bv_571",_j="_droneMetadataHeading_1i3bv_577",Ej="_droneMetadataGrid_1i3bv_585",kj="_rtkFixContainer_1i3bv_591",Nj="_rtkFixLabel_1i3bv_597",Tj="_rtkFixCheckbox_1i3bv_606",jj="_confirmButtonContainer_1i3bv_621",Pj="_ratingWarningContent_1i3bv_629",Mj="_ratingWarningTitle_1i3bv_637",Lj="_ratingWarningText_1i3bv_644",Dj="_ratingWarningButtons_1i3bv_651",Oj="_fallbackReasonBox_1i3bv_659",Rj="_fallbackReasonTitle_1i3bv_668",Ij="_fallbackReasonText_1i3bv_675",Aj="_preprocessingProgress_1i3bv_682",Fj="_carouselContainer_1i3bv_735",$j="_carouselImageWrapper_1i3bv_740",zj="_carouselImage_1i3bv_740",Bj="_carouselNavigation_1i3bv_763",Uj="_carouselButton_1i3bv_775",Hj="_carouselIndicators_1i3bv_799",Vj="_carouselIndicator_1i3bv_799",qj="_carouselIndicatorActive_1i3bv_828",Wj="_viewImageButtonContainer_1i3bv_864",q={uploadContainer:DT,dropZone:OT,hasFile:RT,dropZoneIcon:IT,dropZoneText:AT,dropZoneSubtext:FT,filePreview:$T,filePreviewImage:zT,fileName:BT,fileInfo:UT,helpLink:HT,loadingContainer:VT,loadingText:qT,generateButtonContainer:WT,uploadedMapContainer:GT,uploadedMapImage:ZT,formGrid:QT,titleField:KT,ratingDescription:YT,ratingSlider:XT,ratingLabel:JT,ratingInput:ej,ratingValue:tj,submitSection:nj,successContainer:rj,successHeading:ij,successText:oj,successButton:aj,viewFullSizeButton:sj,fullSizeModalOverlay:lj,lightModalOverlay:uj,fullSizeModalContent:cj,fullSizeModalHeader:dj,fullSizeModalImage:fj,confirmSection:hj,step2Layout:pj,topRow:mj,ratingHidden:gj,imageSection:vj,ratingContent:yj,mapColumn:wj,contentColumn:xj,step2bLayout:Cj,metadataSectionCard:Sj,droneMetadataSection:bj,droneMetadataHeading:_j,droneMetadataGrid:Ej,rtkFixContainer:kj,rtkFixLabel:Nj,rtkFixCheckbox:Tj,confirmButtonContainer:jj,ratingWarningContent:Pj,ratingWarningTitle:Mj,ratingWarningText:Lj,ratingWarningButtons:Dj,fallbackReasonBox:Oj,fallbackReasonTitle:Rj,fallbackReasonText:Ij,preprocessingProgress:Aj,carouselContainer:Fj,carouselImageWrapper:$j,carouselImage:zj,carouselNavigation:Bj,carouselButton:Uj,carouselIndicators:Hj,carouselIndicator:Vj,carouselIndicatorActive:qj,viewImageButtonContainer:Wj},uy=v.createContext(void 0),Gj=({children:e})=>{const[n,i]=v.useState(""),[o,s]=v.useState(""),[u,d]=v.useState(""),[f,p]=v.useState(""),[y,w]=v.useState(""),[C,m]=v.useState(""),[x,N]=v.useState(""),[b,E]=v.useState(!1),L={search:n,srcFilter:o,catFilter:u,regionFilter:f,countryFilter:y,imageTypeFilter:C,uploadTypeFilter:x,showReferenceExamples:b,setSearch:i,setSrcFilter:s,setCatFilter:d,setRegionFilter:p,setCountryFilter:w,setImageTypeFilter:m,setUploadTypeFilter:N,setShowReferenceExamples:E,clearAllFilters:()=>{i(""),s(""),d(""),p(""),w(""),m(""),N(""),E(!1)}};return g.jsx(uy.Provider,{value:L,children:e})},Zj=()=>{const e=v.useContext(uy);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e};function Ag({files:e,file:n,preview:i,imageType:o,onFileChange:s,onRemoveImage:u,onAddImage:d,onImageTypeChange:f,onChangeFile:p}){const y=w=>{w.preventDefault();const C=w.dataTransfer.files?.[0];C&&s(C)};return g.jsxs("div",{className:"space-y-6",children:[g.jsx("p",{className:"text-gray-700 leading-relaxed max-w-2xl mx-auto",children:"This app evaluates how well multimodal AI models analyze and describe crisis maps and drone imagery. Upload an image and the AI will generate a description. Then you can review and rate the result based on your expertise."}),g.jsx("div",{className:q.helpLink,children:g.jsxs(Mx,{to:"/help",className:q.helpLink,children:["More ",g.jsx(bC,{className:"w-3 h-3"})]})}),g.jsx("div",{className:"flex justify-center",children:g.jsx(dr,{withInternalPadding:!0,className:"bg-transparent border-none shadow-none",children:g.jsx(_T,{name:"image-type",value:o,onChange:w=>f(w),options:[{key:"crisis_map",label:"Crisis Maps"},{key:"drone_image",label:"Drone Imagery"}],keySelector:w=>w.key,labelSelector:w=>w.label})})}),g.jsxs("div",{className:`${q.dropZone} ${n?q.hasFile:""}`,onDragOver:w=>w.preventDefault(),onDrop:y,children:[e.length>1?g.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 mb-4",children:e.map((w,C)=>g.jsxs("div",{className:"relative",children:[g.jsx("img",{src:URL.createObjectURL(w),alt:`Image ${C+1}`,className:"w-full h-32 object-cover rounded"}),g.jsx(hf,{name:"remove-image",variant:"tertiary",onClick:()=>u(C),title:"Remove image",ariaLabel:"Remove image",className:"absolute top-2 right-2 bg-white/90 hover:bg-white shadow-md hover:shadow-lg border border-gray-200 hover:border-red-300 transition-all duration-200 backdrop-blur-sm",children:g.jsx(df,{className:"w-4 h-4"})}),g.jsx("div",{className:"text-xs text-center mt-1",children:w.name})]},C))}):n&&i?g.jsxs("div",{className:q.filePreview,children:[g.jsx("div",{className:q.filePreviewImage,children:g.jsx("img",{src:i,alt:"File preview"})}),g.jsx("p",{className:q.fileName,children:n.name}),g.jsxs("p",{className:q.fileInfo,children:[(n.size/1024/1024).toFixed(2)," MB"]})]}):g.jsxs(g.Fragment,{children:[g.jsx(s0,{className:q.dropZoneIcon}),g.jsx("p",{className:q.dropZoneText,children:"Drag & Drop any file here"}),g.jsx("p",{className:q.dropZoneSubtext,children:"or"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("label",{className:"inline-block cursor-pointer",children:[g.jsx("input",{type:"file",className:"sr-only",accept:".jpg,.jpeg,.png,.tiff,.tif,.heic,.heif,.webp,.gif,.pdf",onChange:w=>{n&&p?p(w.target.files?.[0]):s(w.target.files?.[0])}}),g.jsx(Ue,{name:"upload",variant:"secondary",size:1,onClick:()=>document.querySelector('input[type="file"]')?.click(),children:n?"Change Image":"Browse Files"})]}),n&&e.length<5&&g.jsx(Ue,{name:"add-image",variant:"secondary",size:1,onClick:d,children:"Add Image"})]})]})]})}function Fg({files:e,imageUrl:n,preview:i,onViewFullSize:o,currentImageIndex:s=0,onGoToPrevious:u,onGoToNext:d,onGoToImage:f,showCarousel:p=!1}){return p&&e.length>1?g.jsx(dr,{heading:"Uploaded Images",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:q.carouselContainer,children:[g.jsx("div",{className:q.carouselImageWrapper,children:e[s]?g.jsx("img",{src:URL.createObjectURL(e[s]),alt:`Image ${s+1}`,className:q.carouselImage}):g.jsx("div",{className:q.imagePlaceholder,children:"No image available"})}),g.jsxs("div",{className:q.carouselNavigation,children:[g.jsx(Ue,{name:"previous-image",variant:"tertiary",size:1,onClick:u,className:q.carouselButton,children:g.jsx(PC,{className:"w-4 h-4"})}),g.jsx("div",{className:q.carouselIndicators,children:e.map((y,w)=>g.jsx("button",{onClick:()=>f?.(w),className:`${q.carouselIndicator} ${w===s?q.carouselIndicatorActive:""}`,children:w+1},w))}),g.jsx(Ue,{name:"next-image",variant:"tertiary",size:1,onClick:d,className:q.carouselButton,children:g.jsx(MC,{className:"w-4 h-4"})})]}),g.jsx("div",{className:q.viewImageButtonContainer,children:g.jsx(Ue,{name:"view-full-size-carousel",variant:"secondary",size:1,onClick:()=>o({file:e[s],index:s}),disabled:!e[s],children:"View Image"})})]})}):e.length>1?g.jsx("div",{className:"space-y-6",children:e.map((y,w)=>g.jsx(dr,{heading:`Image ${w+1}: ${y.name}`,headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:q.uploadedMapContainer,children:[g.jsx("div",{className:q.uploadedMapImage,children:g.jsx("img",{src:URL.createObjectURL(y),alt:`Image ${w+1}`})}),g.jsx("div",{className:q.viewFullSizeButton,children:g.jsx(Ue,{name:`view-full-size-${w}`,variant:"secondary",size:1,onClick:()=>o({file:y,index:w}),children:"View Image"})})]})},w))}):g.jsx(dr,{heading:"Uploaded Image",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:q.uploadedMapContainer,children:[g.jsx("div",{className:q.uploadedMapImage,children:g.jsx("img",{src:n||i||void 0,alt:"Uploaded image preview"})}),g.jsx("div",{className:q.viewFullSizeButton,children:g.jsx(Ue,{name:"view-full-size",variant:"secondary",size:1,onClick:()=>o(),children:"View Image"})})]})})}function Qj({files:e,imageType:n,title:i,source:o,eventType:s,epsg:u,countries:d,centerLon:f,centerLat:p,amslM:y,aglM:w,headingDeg:C,yawDeg:m,pitchDeg:x,rollDeg:N,rtkFix:b,stdHM:E,stdVM:P,metadataArray:L,sources:$,types:H,spatialReferences:Z,imageTypes:de,countriesOptions:O,onTitleChange:K,onSourceChange:ce,onEventTypeChange:fe,onEpsgChange:I,onCountriesChange:U,onCenterLonChange:W,onCenterLatChange:ne,onAmslMChange:he,onAglMChange:Ce,onHeadingDegChange:_e,onYawDegChange:G,onPitchDegChange:ue,onRollDegChange:T,onRtkFixChange:V,onStdHMChange:oe,onStdVMChange:Se,onImageTypeChange:se,updateMetadataForImage:re}){return e.length>1?g.jsxs("div",{children:[g.jsx("div",{className:"mb-4",children:g.jsx(jt,{label:"Shared Title",name:"title",value:i,onChange:K,placeholder:"Enter a title for all images...",required:!0})}),e.map((ee,Q)=>g.jsx("div",{className:"mb-6",children:g.jsx(dr,{heading:`Image ${Q+1}: ${ee.name}`,headingLevel:4,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:q.formGrid,children:[n!=="drone_image"&&g.jsx(eo,{label:"Source",name:`source_${Q}`,value:L[Q]?.source||"",onChange:Y=>re(Q,"source",Y),options:$,keySelector:Y=>Y.s_code,labelSelector:Y=>Y.label,required:!0}),g.jsx(eo,{label:"Event Type",name:`event_type_${Q}`,value:L[Q]?.eventType||"",onChange:Y=>re(Q,"eventType",Y),options:H,keySelector:Y=>Y.t_code,labelSelector:Y=>Y.label,required:n!=="drone_image"}),g.jsx(eo,{label:"EPSG",name:`epsg_${Q}`,value:L[Q]?.epsg||"",onChange:Y=>re(Q,"epsg",Y),options:Z,keySelector:Y=>Y.epsg,labelSelector:Y=>`${Y.srid} (EPSG:${Y.epsg})`,placeholder:"EPSG",required:n!=="drone_image"}),g.jsx(Lg,{label:"Countries (optional)",name:`countries_${Q}`,value:L[Q]?.countries||[],onChange:Y=>re(Q,"countries",Y),options:O,keySelector:Y=>Y.c_code,labelSelector:Y=>Y.label,placeholder:"Select one or more"}),n==="drone_image"&&g.jsx(g.Fragment,{children:g.jsxs("div",{className:q.droneMetadataSection,children:[g.jsx("h4",{className:q.droneMetadataHeading,children:"Drone Flight Data"}),g.jsxs("div",{className:q.droneMetadataGrid,children:[g.jsx(jt,{label:"Center Longitude",name:`center_lon_${Q}`,value:L[Q]?.centerLon||"",onChange:Y=>re(Q,"centerLon",Y),placeholder:"e.g., -122.4194",step:"any"}),g.jsx(jt,{label:"Center Latitude",name:`center_lat_${Q}`,value:L[Q]?.centerLat||"",onChange:Y=>re(Q,"centerLat",Y),placeholder:"e.g., 37.7749",step:"any"}),g.jsx(jt,{label:"Altitude AMSL (m)",name:`amsl_m_${Q}`,value:L[Q]?.amslM||"",onChange:Y=>re(Q,"amslM",Y),placeholder:"e.g., 100.5",step:"any"}),g.jsx(jt,{label:"Altitude AGL (m)",name:`agl_m_${Q}`,value:L[Q]?.aglM||"",onChange:Y=>re(Q,"aglM",Y),placeholder:"e.g., 50.2",step:"any"}),g.jsx(jt,{label:"Heading (degrees)",name:`heading_deg_${Q}`,value:L[Q]?.headingDeg||"",onChange:Y=>re(Q,"headingDeg",Y),placeholder:"e.g., 180.0",step:"any"}),g.jsx(jt,{label:"Yaw (degrees)",name:`yaw_deg_${Q}`,value:L[Q]?.yawDeg||"",onChange:Y=>re(Q,"yawDeg",Y),placeholder:"e.g., 90.0",step:"any"}),g.jsx(jt,{label:"Pitch (degrees)",name:`pitch_deg_${Q}`,value:L[Q]?.pitchDeg||"",onChange:Y=>re(Q,"pitchDeg",Y),placeholder:"e.g., 0.0",step:"any"}),g.jsx(jt,{label:"Roll (degrees)",name:`roll_deg_${Q}`,value:L[Q]?.rollDeg||"",onChange:Y=>re(Q,"rollDeg",Y),placeholder:"e.g., 0.0",step:"any"}),g.jsx("div",{className:q.rtkFixContainer,children:g.jsxs("label",{className:q.rtkFixLabel,children:[g.jsx("input",{type:"checkbox",checked:L[Q]?.rtkFix||!1,onChange:Y=>re(Q,"rtkFix",Y.target.checked),className:q.rtkFixCheckbox}),"RTK Fix Available"]})}),g.jsx(jt,{label:"Horizontal Std Dev (m)",name:`std_h_m_${Q}`,value:L[Q]?.stdHM||"",onChange:Y=>re(Q,"stdHM",Y),placeholder:"e.g., 0.1",step:"any"}),g.jsx(jt,{label:"Vertical Std Dev (m)",name:`std_v_m_${Q}`,value:L[Q]?.stdVM||"",onChange:Y=>re(Q,"stdVM",Y),placeholder:"e.g., 0.2",step:"any"})]})]})})]})})},Q))]}):g.jsxs("div",{className:q.formGrid,children:[g.jsx("div",{className:q.titleField,children:g.jsx(jt,{label:"Title",name:"title",value:i,onChange:K,placeholder:"Enter a title for this map...",required:!0})}),n!=="drone_image"&&g.jsx(eo,{label:"Source",name:"source",value:o,onChange:ce,options:$,keySelector:ee=>ee.s_code,labelSelector:ee=>ee.label,required:!0}),g.jsx(eo,{label:"Event Type",name:"event_type",value:s,onChange:fe,options:H,keySelector:ee=>ee.t_code,labelSelector:ee=>ee.label,required:n!=="drone_image"}),g.jsx(eo,{label:"EPSG",name:"epsg",value:u,onChange:I,options:Z,keySelector:ee=>ee.epsg,labelSelector:ee=>`${ee.srid} (EPSG:${ee.epsg})`,placeholder:"EPSG",required:n!=="drone_image"}),g.jsx(eo,{label:"Image Type",name:"image_type",value:n,onChange:se,options:de,keySelector:ee=>ee.image_type,labelSelector:ee=>ee.label,required:!0}),g.jsx(Lg,{label:"Countries (optional)",name:"countries",value:d,onChange:U,options:O,keySelector:ee=>ee.c_code,labelSelector:ee=>ee.label,placeholder:"Select one or more"}),n==="drone_image"&&g.jsx(g.Fragment,{children:g.jsxs("div",{className:q.droneMetadataSection,children:[g.jsx("h4",{className:q.droneMetadataHeading,children:"Drone Flight Data"}),g.jsxs("div",{className:q.droneMetadataGrid,children:[g.jsx(jt,{label:"Center Longitude",name:"center_lon",value:f,onChange:W,placeholder:"e.g., -122.4194",step:"any"}),g.jsx(jt,{label:"Center Latitude",name:"center_lat",value:p,onChange:ne,placeholder:"e.g., 37.7749",step:"any"}),g.jsx(jt,{label:"Altitude AMSL (m)",name:"amsl_m",value:y,onChange:he,placeholder:"e.g., 100.5",step:"any"}),g.jsx(jt,{label:"Altitude AGL (m)",name:"agl_m",value:w,onChange:Ce,placeholder:"e.g., 50.2",step:"any"}),g.jsx(jt,{label:"Heading (degrees)",name:"heading_deg",value:C,onChange:_e,placeholder:"e.g., 180.0",step:"any"}),g.jsx(jt,{label:"Yaw (degrees)",name:"yaw_deg",value:m,onChange:G,placeholder:"e.g., 90.0",step:"any"}),g.jsx(jt,{label:"Pitch (degrees)",name:"pitch_deg",value:x,onChange:ue,placeholder:"e.g., 0.0",step:"any"}),g.jsx(jt,{label:"Roll (degrees)",name:"roll_deg",value:N,onChange:T,placeholder:"e.g., 0.0",step:"any"}),g.jsx("div",{className:q.rtkFixContainer,children:g.jsxs("label",{className:q.rtkFixLabel,children:[g.jsx("input",{type:"checkbox",checked:b,onChange:ee=>V(ee.target.checked),className:q.rtkFixCheckbox}),"RTK Fix Available"]})}),g.jsx(jt,{label:"Horizontal Std Dev (m)",name:"std_h_m",value:E,onChange:oe,placeholder:"e.g., 0.1",step:"any"}),g.jsx(jt,{label:"Vertical Std Dev (m)",name:"std_v_m",value:P,onChange:Se,placeholder:"e.g., 0.2",step:"any"})]})]})})]})}function Kj({isPerformanceConfirmed:e,scores:n,onScoreChange:i,onConfirmRatings:o}){return e?null:g.jsx(dr,{heading:"AI Performance Rating",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:g.jsxs("div",{className:q.ratingContent,children:[g.jsx("p",{className:q.ratingDescription,children:"How well did the AI perform on the task?"}),["accuracy","context","usability"].map(s=>g.jsxs("div",{className:q.ratingSlider,children:[g.jsx("label",{className:q.ratingLabel,children:s}),g.jsx("input",{type:"range",min:0,max:100,value:n[s],onChange:u=>i(s,Number(u.target.value)),className:q.ratingInput}),g.jsx("span",{className:q.ratingValue,children:n[s]})]},s)),g.jsx("div",{className:q.confirmButtonContainer,children:g.jsx(Ue,{name:"confirm-ratings",variant:"secondary",onClick:o,children:"Confirm Ratings"})})]})})}function Yj({description:e,analysis:n,recommendedActions:i,onDescriptionChange:o,onAnalysisChange:s,onRecommendedActionsChange:u,onBack:d,onDelete:f,onSubmit:p,onEditRatings:y,isPerformanceConfirmed:w=!1,isSubmitting:C=!1}){const[m,x]=v.useState("");v.useEffect(()=>{const b=`Description: ${e||"AI-generated description will appear here..."} Analysis: ${n||"AI-generated analysis will appear here..."} Recommended Actions: -${i||"AI-generated recommended actions will appear here..."}`,onChange:m,rows:12,placeholder:"AI-generated content will appear here..."})})}),g.jsxs("div",{className:V.submitSection,children:[g.jsx(Ue,{name:"back",variant:"secondary",onClick:d,children:"Back"}),w&&y&&g.jsx(Ue,{name:"edit-ratings",variant:"secondary",onClick:y,children:"Edit Ratings"}),g.jsx(hf,{name:"delete",variant:"tertiary",onClick:f,title:"Delete",ariaLabel:"Delete uploaded image",children:g.jsx(df,{})}),g.jsx(Ue,{name:"submit",onClick:p,disabled:C,children:"Submit"})]})]})}function Xj({isOpen:e,imageUrl:n,preview:i,selectedImageData:o,onClose:s,isLoading:u=!1}){if(!e)return null;let d,f;return o?(d=URL.createObjectURL(o.file),f=`Image ${o.index+1}: ${o.file.name}`):(d=n||i||void 0,f="Full size map"),g.jsx("div",{className:V.fullSizeModalOverlay,onClick:s,children:g.jsxs("div",{className:V.fullSizeModalContent,onClick:p=>p.stopPropagation(),children:[g.jsx("div",{className:V.fullSizeModalHeader,children:g.jsx(Ue,{name:"close-modal",variant:"tertiary",size:1,onClick:s,children:"✕"})}),g.jsx("div",{className:V.fullSizeModalImage,children:u?g.jsxs("div",{className:V.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:V.loadingText,children:"Loading image..."})]}):g.jsx("img",{src:d,alt:f})})]})})}function Jj({isOpen:e,onClose:n}){return e?g.jsx("div",{className:V.fullSizeModalOverlay,onClick:n,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:i=>i.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"Please Confirm Your Ratings"}),g.jsx("p",{className:V.ratingWarningText,children:'You must confirm your performance ratings before submitting. Please go back to the rating section and click "Confirm Ratings".'}),g.jsx("div",{className:V.ratingWarningButtons,children:g.jsx(Ue,{name:"close-warning",variant:"secondary",onClick:n,children:"Close"})})]})})}):null}function eP({isOpen:e,onConfirm:n,onCancel:i}){return e?g.jsx("div",{className:V.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"Delete Image?"}),g.jsx("p",{className:V.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this uploaded image?"}),g.jsxs("div",{className:V.ratingWarningButtons,children:[g.jsx(Ue,{name:"confirm-delete",variant:"secondary",onClick:n,children:"Delete"}),g.jsx(Ue,{name:"cancel-delete",variant:"tertiary",onClick:i,children:"Cancel"})]})]})})}):null}function tP({isOpen:e,onConfirm:n,onCancel:i}){return e?g.jsx("div",{className:V.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"Leave Page?"}),g.jsx("p",{className:V.ratingWarningText,children:"Your uploaded image will be deleted if you leave this page. Are you sure you want to continue?"}),g.jsxs("div",{className:V.ratingWarningButtons,children:[g.jsx(Ue,{name:"confirm-navigation",variant:"secondary",onClick:n,children:"Leave Page"}),g.jsx(Ue,{name:"cancel-navigation",variant:"tertiary",onClick:i,children:"Stay"})]})]})})}):null}function nP({isOpen:e,fallbackInfo:n,onClose:i}){if(!e||!n)return null;const s=(u=>u.includes("quota")||u.includes("credits")?"API quota exceeded - you've used up your monthly free credits":u.includes("rate")||u.includes("429")?"Rate limit exceeded - too many requests":u.includes("loading")||u.includes("503")?"Model is currently loading or unavailable":u.includes("network")||u.includes("timeout")?"Network connection issue":u.includes("MODEL_UNAVAILABLE")?"Model service is temporarily unavailable":u)(n.reason);return g.jsx("div",{className:V.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:u=>u.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"⚠️ Model Changed"}),g.jsxs("p",{className:V.ratingWarningText,children:[g.jsx("strong",{children:n.originalModel})," is currently unavailable. We've automatically switched to ",g.jsx("strong",{children:n.fallbackModel})," to complete your request."]}),g.jsxs("div",{className:V.fallbackReasonBox,children:[g.jsx("p",{className:V.fallbackReasonTitle,children:"Reason:"}),g.jsx("p",{className:V.fallbackReasonText,children:s})]}),g.jsx("div",{className:V.ratingWarningButtons,children:g.jsx(Ue,{name:"close-fallback",variant:"secondary",onClick:i,children:"Got it"})})]})})})}function rP({isOpen:e,preprocessingInfo:n,onClose:i}){return!e||!n?null:g.jsx("div",{className:V.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"File Converted"}),g.jsxs("p",{className:V.ratingWarningText,children:["Your file ",g.jsx("strong",{children:n.original_filename})," has been converted from",g.jsxs("strong",{children:[" ",n.original_mime_type]})," to",g.jsxs("strong",{children:[" ",n.processed_mime_type]})," for optimal processing.",g.jsx("br",{}),g.jsx("br",{}),"This conversion ensures your file is in the best format for our AI models to analyze."]}),g.jsx("div",{className:V.ratingWarningButtons,children:g.jsx(Ue,{name:"close-preprocessing",variant:"secondary",onClick:i,children:"Got it"})})]})})})}function iP({isOpen:e,isPreprocessing:n,preprocessingProgress:i,onConfirm:o,onCancel:s}){return e?g.jsx("div",{className:V.fullSizeModalOverlay,onClick:n?void 0:s,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:u=>u.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"File Conversion Required"}),g.jsx("p",{className:V.ratingWarningText,children:"The file you selected will be converted to PNG format. This ensures optimal compatibility and processing by our AI models."}),!n&&g.jsxs("div",{className:V.ratingWarningButtons,children:[g.jsx(Ue,{name:"confirm-preprocessing",variant:"secondary",onClick:o,children:"Convert File"}),g.jsx(Ue,{name:"cancel-preprocessing",variant:"tertiary",onClick:s,children:"Cancel"})]}),n&&g.jsxs("div",{className:V.preprocessingProgress,children:[g.jsx("p",{children:i}),g.jsx(Wo,{className:"text-ifrcRed"})]})]})})}):null}function oP({isOpen:e,unsupportedFile:n,onClose:i}){return!e||!n?null:g.jsx("div",{className:V.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"Unsupported File Format"}),g.jsxs("p",{className:V.ratingWarningText,children:["The file ",g.jsx("strong",{children:n.name})," is not supported for upload.",g.jsx("br",{}),g.jsx("br",{}),g.jsx("strong",{children:"Supported formats:"}),g.jsx("br",{}),"• Images: JPEG, PNG, TIFF, HEIC, WebP, GIF",g.jsx("br",{}),"• Documents: PDF (will be converted to image)",g.jsx("br",{}),g.jsx("br",{}),g.jsx("strong",{children:"Recommendation:"})," Convert your file to JPEG or PNG format for best compatibility."]}),g.jsx("div",{className:V.ratingWarningButtons,children:g.jsx(Ue,{name:"close-unsupported",variant:"secondary",onClick:i,children:"Got it"})})]})})})}function aP({isOpen:e,oversizedFile:n,onClose:i,onCancel:o}){return!e||!n?null:g.jsx("div",{className:V.lightModalOverlay,onClick:o,children:g.jsx("div",{className:V.fullSizeModalContent,onClick:s=>s.stopPropagation(),children:g.jsxs("div",{className:V.ratingWarningContent,children:[g.jsx("h3",{className:V.ratingWarningTitle,children:"File Size Warning"}),g.jsxs("p",{className:V.ratingWarningText,children:["The file ",g.jsx("strong",{children:n.name})," is large (",(n.size/(1024*1024)).toFixed(1),"MB).",g.jsx("br",{}),g.jsx("br",{}),g.jsx("strong",{children:"Warning:"})," This file size might exceed the limits of the AI models we use.",g.jsx("br",{}),g.jsx("br",{}),"You can still proceed, but consider using a smaller file if you encounter issues."]}),g.jsxs("div",{className:V.ratingWarningButtons,children:[g.jsx(Ue,{name:"continue-size-warning",variant:"secondary",onClick:i,children:"Continue"}),g.jsx(Ue,{name:"cancel-size-warning",variant:"tertiary",onClick:o,children:"Cancel"})]})]})})})}const Bl="selectedVlmModel";function $g(){let e,n;try{[e]=Dx(),n=hs()}catch(k){console.warn("Router context not available, using fallback:",k),e=new URLSearchParams,n=()=>{}}const[i,o]=v.useState(1),[s,u]=v.useState(!1),[d,f]=v.useState(!1),[p,y]=v.useState(!1),w=v.useRef(i),C=v.useRef(null),[m,x]=v.useState(null),[E,b]=v.useState(null),[N,P]=v.useState([]),[L,$]=v.useState(""),[q,Z]=v.useState(""),[fe,O]=v.useState(""),[K,ce]=v.useState("crisis_map"),[de,I]=v.useState([]),[U,W]=v.useState(""),[ne,he]=v.useState(""),[Ce,_e]=v.useState(""),[G,ue]=v.useState(""),[T,H]=v.useState(""),[oe,Se]=v.useState(""),[se,re]=v.useState(""),[ee,Q]=v.useState(""),[Y,et]=v.useState(""),[tn,Wt]=v.useState(!1),[ot,bt]=v.useState(""),[st,wt]=v.useState(""),[ft,ht]=v.useState([]),[xt,nn]=v.useState([]),[Tn,ln]=v.useState([]),[jn,Jr]=v.useState([]),[un,cn]=v.useState([]),[Er,Kn]=v.useState([]),[lt,Dt]=v.useState(null),[Qt,pt]=v.useState([]),[Kt,dn]=v.useState(null),[ji,Pi]=v.useState(""),[kr,Nr]=v.useState(""),[Tr,$n]=v.useState(""),[jr,fn]=v.useState(""),[rn,Mi]=v.useState({accuracy:50,context:50,usability:50}),[Li,ei]=v.useState(!1),[Di,Yn]=v.useState(null),[hn,Pr]=v.useState(!1),[Mr,j]=v.useState(!1),[R,z]=v.useState(!1),[X,le]=v.useState(!1),[Ee,Me]=v.useState(null),[ye,we]=v.useState(!1),[ge,ve]=v.useState(null),[Fe,ze]=v.useState(!1),[Pt,Ye]=v.useState(null),[Ge,Xe]=v.useState(!1),[Pn,pn]=v.useState(null),[Mn,Ve]=v.useState(!1),[Oi,At]=v.useState(""),[zn,mn]=v.useState(!1),[ti,He]=v.useState(null),[nt,_t]=v.useState(!1),[Lr,Ze]=v.useState(null),[pr,Dr]=v.useState(0);w.current=i,C.current=lt;const Or=k=>!k||xt.length===0?k:xt.find(Ne=>Ne.s_code===k||Ne.label===k)?.s_code||k,po=k=>{$(Or(k||""))},mo=k=>Z(k||""),Ri=k=>O(k||""),ni=k=>ce(k||""),Su=k=>I(Array.isArray(k)?k:[]),bu=k=>he(k||""),oa=k=>_e(k||""),Cs=k=>ue(k||""),aa=k=>H(k||""),Ii=k=>Se(k||""),_u=k=>re(k||""),sa=k=>Q(k||""),tt=k=>et(k||""),Ss=k=>Wt(k||!1),bs=k=>bt(k||""),la=k=>wt(k||""),Ai=k=>o(k),_s=v.useCallback(()=>{N.length>1&&Dr(k=>k>0?k-1:N.length-1)},[N.length]),Es=v.useCallback(()=>{N.length>1&&Dr(k=>k{k>=0&&k{if(N.length<5){const k=document.createElement("input");k.type="file",k.accept=".jpg,.jpeg,.png,.tiff,.tif,.heic,.heif,.webp,.gif,.pdf",k.onchange=Pe=>{const Ne=Pe.target;if(Ne.files&&Ne.files[0]){const ke=Ne.files[0];Rr(ke)}},k.click()}},Xn=k=>{P(Pe=>{const Ne=Pe.filter((ke,pe)=>pe!==k);return Ne.length===1?b(Ne[0]):Ne.length===0&&b(null),Ne}),ht(Pe=>Pe.filter((Ne,ke)=>ke!==k))},mr=(k,Pe,Ne)=>{ht(ke=>{const pe=[...ke];return pe[k]||(pe[k]={source:"",eventType:"",epsg:"",countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""}),Pe==="source"?pe[k]={...pe[k],[Pe]:Or(Ne)}:pe[k]={...pe[k],[Pe]:Ne},pe})},Jn=k=>{const Pe=["image/jpeg","image/jpg","image/png"],Ne=[".jpg",".jpeg",".png"];let ke=!Pe.includes(k.type);if(!ke&&k.name){const pe=k.name.toLowerCase().substring(k.name.lastIndexOf("."));ke=!Ne.includes(pe)}return ke},ri=k=>{const Pe=["text/html","text/css","application/javascript","application/json","text/plain","application/xml","text/xml","application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","audio/","video/","text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];for(const Ne of Pe)if(k.type.startsWith(Ne))return!0;if(k.name){const Ne=k.name.toLowerCase().substring(k.name.lastIndexOf("."));if([".html",".htm",".css",".js",".json",".txt",".xml",".zip",".rar",".7z",".csv",".xlsx",".xls",".pptx",".ppt",".docx",".doc",".mp3",".mp4",".avi",".mov"].includes(Ne))return!0}return!1},Rr=k=>{if(k){if(console.log("File selected:",k.name,"Type:",k.type,"Size:",k.size),k.size/(1024*1024)>5&&(console.log("File too large, showing size warning modal"),Ze(k),_t(!0)),ri(k)){console.log("File format not supported at all, showing unsupported format modal"),He(k),mn(!0);return}Jn(k)?(console.log("File needs preprocessing, showing modal"),pn(k),Xe(!0)):(console.log("File does not need preprocessing, setting directly"),N.length===0?(b(k),P([k])):P(Ne=>[...Ne,k]))}},er=k=>{if(k){if(console.log("File changed:",k.name,"Type:",k.type,"Size:",k.size),k.size/(1024*1024)>5&&(console.log("File too large, showing size warning modal"),Ze(k),_t(!0)),ri(k)){console.log("File format not supported at all, showing unsupported format modal"),He(k),mn(!0);return}Jn(k)?(console.log("File needs preprocessing, showing modal"),pn(k),Xe(!0)):(console.log("File does not need preprocessing, replacing last file"),N.length>1?(P(Ne=>{const ke=[...Ne];return ke[ke.length-1]=k,ke}),N.length===1&&b(k)):(b(k),P([k])))}};async function $i(k){const Pe=await k.text();try{return Pe?JSON.parse(Pe):{}}catch{return{error:Pe}}}function go(k,Pe){const Ne=k instanceof Error?k.message:`Failed to ${Pe.toLowerCase()}`;alert(Ne)}async function ii(){if(N.length!==0){u(!0);try{N.length===1?await Eu():await ks()}catch(k){go(k,"Upload")}finally{u(!1)}}}async function Eu(){console.log("DEBUG: Starting single image upload");const k=new FormData;k.append("file",N[0]),k.append("title",U),k.append("image_type",K),L&&k.append("source",L),q&&k.append("event_type",q),fe&&k.append("epsg",fe),de.length>0&&de.forEach(pe=>k.append("countries",pe)),K==="drone_image"&&(ne&&k.append("center_lon",ne),Ce&&k.append("center_lat",Ce),G&&k.append("amsl_m",G),T&&k.append("agl_m",T),oe&&k.append("heading_deg",oe),se&&k.append("yaw_deg",se),ee&&k.append("pitch_deg",ee),Y&&k.append("roll_deg",Y),tn&&k.append("rtk_fix",tn.toString()),ot&&k.append("std_h_m",ot),st&&k.append("std_v_m",st));const Pe=localStorage.getItem(Bl);Pe&&k.append("model_name",Pe);const Ne=await fetch("/api/images/",{method:"POST",body:k}),ke=await $i(Ne);if(!Ne.ok)throw new Error(ke.error||"Upload failed");console.log("DEBUG: Single upload response:",ke),await zi(ke,!1)}async function ks(){console.log("DEBUG: Starting multi-image upload");const k=new FormData;N.forEach(pe=>k.append("files",pe)),k.append("title",U),k.append("image_type",K),ft.forEach((pe,Re)=>{pe.source&&k.append(`source_${Re}`,pe.source),pe.eventType&&k.append(`event_type_${Re}`,pe.eventType),pe.epsg&&k.append(`epsg_${Re}`,pe.epsg),pe.countries.length>0&&pe.countries.forEach(Ot=>k.append(`countries_${Re}`,Ot)),K==="drone_image"&&(pe.centerLon&&k.append(`center_lon_${Re}`,pe.centerLon),pe.centerLat&&k.append(`center_lat_${Re}`,pe.centerLat),pe.amslM&&k.append(`amsl_m_${Re}`,pe.amslM),pe.aglM&&k.append(`agl_m_${Re}`,pe.aglM),pe.headingDeg&&k.append(`heading_deg_${Re}`,pe.headingDeg),pe.yawDeg&&k.append(`yaw_deg_${Re}`,pe.yawDeg),pe.pitchDeg&&k.append(`pitch_deg_${Re}`,pe.pitchDeg),pe.rollDeg&&k.append(`roll_deg_${Re}`,pe.rollDeg),pe.rtkFix&&k.append(`rtk_fix_${Re}`,pe.rtkFix.toString()),pe.stdHM&&k.append(`std_h_m_${Re}`,pe.stdHM),pe.stdVM&&k.append(`std_v_m_${Re}`,pe.stdVM))});const Pe=localStorage.getItem(Bl);Pe&&k.append("model_name",Pe);const Ne=await fetch("/api/images/multi",{method:"POST",body:k}),ke=await $i(Ne);if(!Ne.ok)throw new Error(ke.error||"Upload failed");console.log("DEBUG: Multi upload response:",ke),await zi(ke,!0)}async function zi(k,Pe){dn(k.image_url),k.preprocessing_info&&typeof k.preprocessing_info=="object"&&"was_preprocessed"in k.preprocessing_info&&k.preprocessing_info.was_preprocessed===!0&&(Ye(k.preprocessing_info),ze(!0));const Ne=k.image_id;if(!Ne)throw new Error("Upload failed: image_id not found");if(Dt(Ne),Pe)if(k.image_ids&&Array.isArray(k.image_ids)){const ut=k.image_ids;console.log("DEBUG: Storing image IDs for multi-upload:",ut),pt(ut)}else console.log("DEBUG: Multi-upload but no image_ids found, using single ID"),pt([Ne]);else console.log("DEBUG: Storing single image ID:",Ne),pt([Ne]);const ke=k,pe=ke.raw_json,Re=pe?.fallback_used,Ot=pe?.original_model,Nt=pe?.fallback_reason,Bn=ke.model;Re&&Ot&&Nt&&(ve({originalModel:Ot,fallbackModel:Bn,reason:Nt}),we(!0));const Un=ke.raw_json?.metadata;if(Un){const ut=Un.metadata||Un;if(ut&&typeof ut=="object"){const nr=[];if(Pe){const ct=ut.metadata_images;if(ct&&typeof ct=="object")for(let rr=1;rr<=N.length;rr++){const ai=`image${rr}`,Ir=ct[ai];if(Ir&&typeof Ir=="object"){const gn=Ir,yo=gn.source||"",js=Or(yo);nr.push({source:js,eventType:gn.type||"",epsg:gn.epsg||"",countries:Array.isArray(gn.countries)?gn.countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""})}else nr.push({source:"",eventType:"",epsg:"",countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""})}else{const rr=ut.source||"",Ir={source:Or(rr),eventType:ut.type||"",epsg:ut.epsg||"",countries:Array.isArray(ut.countries)?ut.countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""};for(let gn=0;gn0){const ct=nr[0];if(ut&&typeof ut=="object"){const rr=ut.title;rr&&W(rr||"")}$(ct.source||""),Z(ct.eventType||""),O(ct.epsg||""),I(ct.countries||[]),K==="drone_image"&&(he(ct.centerLon||""),_e(ct.centerLat||""),ue(ct.amslM||""),H(ct.aglM||""),Se(ct.headingDeg||""),re(ct.yawDeg||""),Q(ct.pitchDeg||""),et(ct.rollDeg||""),Wt(ct.rtkFix||!1),bt(ct.stdHM||""),wt(ct.stdVM||""))}}}const gt=ke.raw_json?.metadata;gt&&(gt.description&&Nr(gt.description),gt.analysis&&$n(gt.analysis),gt.recommended_actions&&fn(gt.recommended_actions)),ke.generated&&Pi(ke.generated),Ai("2a")}async function Ns(){if(console.log("handleSubmit called with:",{uploadedImageId:lt,title:U,draft:ji}),!lt)return alert("No image to submit");if(!hn){j(!0);return}y(!0);try{const k=Qt.length>0?Qt:[lt];console.log("DEBUG: Submit - Using image IDs:",k),console.log("DEBUG: Submit - uploadedImageIds:",Qt),console.log("DEBUG: Submit - uploadedImageId:",lt);for(let Re=0;Re{if(b!==void 0){x(b);const E=b.split(` +`),P=E.findIndex(H=>H.startsWith("Description:")),L=E.findIndex(H=>H.startsWith("Analysis:")),$=E.findIndex(H=>H.startsWith("Recommended Actions:"));if(P!==-1&&L!==-1&&$!==-1){const H=E.slice(P+1,L).join(` +`).trim(),Z=E.slice(L+1,$).join(` +`).trim(),de=E.slice($+1).join(` +`).trim();H!==e&&o(H),Z!==n&&s(Z),de!==i&&u(de)}}};return g.jsxs(dr,{heading:"Generated Text",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[g.jsx("div",{className:"text-left space-y-4",children:g.jsx("div",{children:g.jsx(kT,{name:"generatedContent",value:m,onChange:N,rows:12,placeholder:"AI-generated content will appear here..."})})}),g.jsxs("div",{className:q.submitSection,children:[g.jsx(Ue,{name:"back",variant:"secondary",onClick:d,children:"Back"}),w&&y&&g.jsx(Ue,{name:"edit-ratings",variant:"secondary",onClick:y,children:"Edit Ratings"}),g.jsx(hf,{name:"delete",variant:"tertiary",onClick:f,title:"Delete",ariaLabel:"Delete uploaded image",children:g.jsx(df,{})}),g.jsx(Ue,{name:"submit",onClick:p,disabled:C,children:"Submit"})]})]})}function Xj({isOpen:e,imageUrl:n,preview:i,selectedImageData:o,onClose:s,isLoading:u=!1}){if(!e)return null;let d,f;return o?(d=URL.createObjectURL(o.file),f=`Image ${o.index+1}: ${o.file.name}`):(d=n||i||void 0,f="Full size map"),g.jsx("div",{className:q.fullSizeModalOverlay,onClick:s,children:g.jsxs("div",{className:q.fullSizeModalContent,onClick:p=>p.stopPropagation(),children:[g.jsx("div",{className:q.fullSizeModalHeader,children:g.jsx(Ue,{name:"close-modal",variant:"tertiary",size:1,onClick:s,children:"✕"})}),g.jsx("div",{className:q.fullSizeModalImage,children:u?g.jsxs("div",{className:q.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:q.loadingText,children:"Loading image..."})]}):g.jsx("img",{src:d,alt:f})})]})})}function Jj({isOpen:e,onClose:n}){return e?g.jsx("div",{className:q.fullSizeModalOverlay,onClick:n,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:i=>i.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"Please Confirm Your Ratings"}),g.jsx("p",{className:q.ratingWarningText,children:'You must confirm your performance ratings before submitting. Please go back to the rating section and click "Confirm Ratings".'}),g.jsx("div",{className:q.ratingWarningButtons,children:g.jsx(Ue,{name:"close-warning",variant:"secondary",onClick:n,children:"Close"})})]})})}):null}function eP({isOpen:e,onConfirm:n,onCancel:i}){return e?g.jsx("div",{className:q.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"Delete Image?"}),g.jsx("p",{className:q.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this uploaded image?"}),g.jsxs("div",{className:q.ratingWarningButtons,children:[g.jsx(Ue,{name:"confirm-delete",variant:"secondary",onClick:n,children:"Delete"}),g.jsx(Ue,{name:"cancel-delete",variant:"tertiary",onClick:i,children:"Cancel"})]})]})})}):null}function tP({isOpen:e,onConfirm:n,onCancel:i}){return e?g.jsx("div",{className:q.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"Leave Page?"}),g.jsx("p",{className:q.ratingWarningText,children:"Your uploaded image will be deleted if you leave this page. Are you sure you want to continue?"}),g.jsxs("div",{className:q.ratingWarningButtons,children:[g.jsx(Ue,{name:"confirm-navigation",variant:"secondary",onClick:n,children:"Leave Page"}),g.jsx(Ue,{name:"cancel-navigation",variant:"tertiary",onClick:i,children:"Stay"})]})]})})}):null}function nP({isOpen:e,fallbackInfo:n,onClose:i}){if(!e||!n)return null;const s=(u=>u.includes("quota")||u.includes("credits")?"API quota exceeded - you've used up your monthly free credits":u.includes("rate")||u.includes("429")?"Rate limit exceeded - too many requests":u.includes("loading")||u.includes("503")?"Model is currently loading or unavailable":u.includes("network")||u.includes("timeout")?"Network connection issue":u.includes("MODEL_UNAVAILABLE")?"Model service is temporarily unavailable":u)(n.reason);return g.jsx("div",{className:q.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:u=>u.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"⚠️ Model Changed"}),g.jsxs("p",{className:q.ratingWarningText,children:[g.jsx("strong",{children:n.originalModel})," is currently unavailable. We've automatically switched to ",g.jsx("strong",{children:n.fallbackModel})," to complete your request."]}),g.jsxs("div",{className:q.fallbackReasonBox,children:[g.jsx("p",{className:q.fallbackReasonTitle,children:"Reason:"}),g.jsx("p",{className:q.fallbackReasonText,children:s})]}),g.jsx("div",{className:q.ratingWarningButtons,children:g.jsx(Ue,{name:"close-fallback",variant:"secondary",onClick:i,children:"Got it"})})]})})})}function rP({isOpen:e,preprocessingInfo:n,onClose:i}){return!e||!n?null:g.jsx("div",{className:q.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"File Converted"}),g.jsxs("p",{className:q.ratingWarningText,children:["Your file ",g.jsx("strong",{children:n.original_filename})," has been converted from",g.jsxs("strong",{children:[" ",n.original_mime_type]})," to",g.jsxs("strong",{children:[" ",n.processed_mime_type]})," for optimal processing.",g.jsx("br",{}),g.jsx("br",{}),"This conversion ensures your file is in the best format for our AI models to analyze."]}),g.jsx("div",{className:q.ratingWarningButtons,children:g.jsx(Ue,{name:"close-preprocessing",variant:"secondary",onClick:i,children:"Got it"})})]})})})}function iP({isOpen:e,isPreprocessing:n,preprocessingProgress:i,onConfirm:o,onCancel:s}){return e?g.jsx("div",{className:q.fullSizeModalOverlay,onClick:n?void 0:s,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:u=>u.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"File Conversion Required"}),g.jsx("p",{className:q.ratingWarningText,children:"The file you selected will be converted to PNG format. This ensures optimal compatibility and processing by our AI models."}),!n&&g.jsxs("div",{className:q.ratingWarningButtons,children:[g.jsx(Ue,{name:"confirm-preprocessing",variant:"secondary",onClick:o,children:"Convert File"}),g.jsx(Ue,{name:"cancel-preprocessing",variant:"tertiary",onClick:s,children:"Cancel"})]}),n&&g.jsxs("div",{className:q.preprocessingProgress,children:[g.jsx("p",{children:i}),g.jsx(Wo,{className:"text-ifrcRed"})]})]})})}):null}function oP({isOpen:e,unsupportedFile:n,onClose:i}){return!e||!n?null:g.jsx("div",{className:q.fullSizeModalOverlay,onClick:i,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"Unsupported File Format"}),g.jsxs("p",{className:q.ratingWarningText,children:["The file ",g.jsx("strong",{children:n.name})," is not supported for upload.",g.jsx("br",{}),g.jsx("br",{}),g.jsx("strong",{children:"Supported formats:"}),g.jsx("br",{}),"• Images: JPEG, PNG, TIFF, HEIC, WebP, GIF",g.jsx("br",{}),"• Documents: PDF (will be converted to image)",g.jsx("br",{}),g.jsx("br",{}),g.jsx("strong",{children:"Recommendation:"})," Convert your file to JPEG or PNG format for best compatibility."]}),g.jsx("div",{className:q.ratingWarningButtons,children:g.jsx(Ue,{name:"close-unsupported",variant:"secondary",onClick:i,children:"Got it"})})]})})})}function aP({isOpen:e,oversizedFile:n,onClose:i,onCancel:o}){return!e||!n?null:g.jsx("div",{className:q.lightModalOverlay,onClick:o,children:g.jsx("div",{className:q.fullSizeModalContent,onClick:s=>s.stopPropagation(),children:g.jsxs("div",{className:q.ratingWarningContent,children:[g.jsx("h3",{className:q.ratingWarningTitle,children:"File Size Warning"}),g.jsxs("p",{className:q.ratingWarningText,children:["The file ",g.jsx("strong",{children:n.name})," is large (",(n.size/(1024*1024)).toFixed(1),"MB).",g.jsx("br",{}),g.jsx("br",{}),g.jsx("strong",{children:"Warning:"})," This file size might exceed the limits of the AI models we use.",g.jsx("br",{}),g.jsx("br",{}),"You can still proceed, but consider using a smaller file if you encounter issues."]}),g.jsxs("div",{className:q.ratingWarningButtons,children:[g.jsx(Ue,{name:"continue-size-warning",variant:"secondary",onClick:i,children:"Continue"}),g.jsx(Ue,{name:"cancel-size-warning",variant:"tertiary",onClick:o,children:"Cancel"})]})]})})})}const Bl="selectedVlmModel";function $g(){let e,n;try{[e]=Dx(),n=hs()}catch(k){console.warn("Router context not available, using fallback:",k),e=new URLSearchParams,n=()=>{}}const[i,o]=v.useState(1),[s,u]=v.useState(!1),[d,f]=v.useState(!1),[p,y]=v.useState(!1),w=v.useRef(i),C=v.useRef(null),[m,x]=v.useState(null),[N,b]=v.useState(null),[E,P]=v.useState([]),[L,$]=v.useState(""),[H,Z]=v.useState(""),[de,O]=v.useState(""),[K,ce]=v.useState("crisis_map"),[fe,I]=v.useState([]),[U,W]=v.useState(""),[ne,he]=v.useState(""),[Ce,_e]=v.useState(""),[G,ue]=v.useState(""),[T,V]=v.useState(""),[oe,Se]=v.useState(""),[se,re]=v.useState(""),[ee,Q]=v.useState(""),[Y,et]=v.useState(""),[tn,Wt]=v.useState(!1),[ot,bt]=v.useState(""),[st,wt]=v.useState(""),[ft,ht]=v.useState([]),[xt,nn]=v.useState([]),[Tn,ln]=v.useState([]),[jn,Jr]=v.useState([]),[un,cn]=v.useState([]),[Er,Kn]=v.useState([]),[lt,Dt]=v.useState(null),[Qt,pt]=v.useState([]),[Kt,dn]=v.useState(null),[ji,Pi]=v.useState(""),[kr,Nr]=v.useState(""),[Tr,$n]=v.useState(""),[jr,fn]=v.useState(""),[rn,Mi]=v.useState({accuracy:50,context:50,usability:50}),[Li,ei]=v.useState(!1),[Di,Yn]=v.useState(null),[hn,Pr]=v.useState(!1),[Mr,j]=v.useState(!1),[R,z]=v.useState(!1),[X,le]=v.useState(!1),[Ee,Me]=v.useState(null),[ye,we]=v.useState(!1),[ge,ve]=v.useState(null),[Fe,ze]=v.useState(!1),[Pt,Ye]=v.useState(null),[Ge,Xe]=v.useState(!1),[Pn,pn]=v.useState(null),[Mn,Ve]=v.useState(!1),[Oi,At]=v.useState(""),[zn,mn]=v.useState(!1),[ti,He]=v.useState(null),[nt,_t]=v.useState(!1),[Lr,Ze]=v.useState(null),[pr,Dr]=v.useState(0);w.current=i,C.current=lt;const Or=k=>!k||xt.length===0?k:xt.find(Ne=>Ne.s_code===k||Ne.label===k)?.s_code||k,po=k=>{$(Or(k||""))},mo=k=>Z(k||""),Ri=k=>O(k||""),ni=k=>ce(k||""),Su=k=>I(Array.isArray(k)?k:[]),bu=k=>he(k||""),oa=k=>_e(k||""),Cs=k=>ue(k||""),aa=k=>V(k||""),Ii=k=>Se(k||""),_u=k=>re(k||""),sa=k=>Q(k||""),tt=k=>et(k||""),Ss=k=>Wt(k||!1),bs=k=>bt(k||""),la=k=>wt(k||""),Ai=k=>o(k),_s=v.useCallback(()=>{E.length>1&&Dr(k=>k>0?k-1:E.length-1)},[E.length]),Es=v.useCallback(()=>{E.length>1&&Dr(k=>k{k>=0&&k{if(E.length<5){const k=document.createElement("input");k.type="file",k.accept=".jpg,.jpeg,.png,.tiff,.tif,.heic,.heif,.webp,.gif,.pdf",k.onchange=Pe=>{const Ne=Pe.target;if(Ne.files&&Ne.files[0]){const ke=Ne.files[0];Rr(ke)}},k.click()}},Xn=k=>{P(Pe=>{const Ne=Pe.filter((ke,pe)=>pe!==k);return Ne.length===1?b(Ne[0]):Ne.length===0&&b(null),Ne}),ht(Pe=>Pe.filter((Ne,ke)=>ke!==k))},mr=(k,Pe,Ne)=>{ht(ke=>{const pe=[...ke];return pe[k]||(pe[k]={source:"",eventType:"",epsg:"",countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""}),Pe==="source"?pe[k]={...pe[k],[Pe]:Or(Ne)}:pe[k]={...pe[k],[Pe]:Ne},pe})},Jn=k=>{const Pe=["image/jpeg","image/jpg","image/png"],Ne=[".jpg",".jpeg",".png"];let ke=!Pe.includes(k.type);if(!ke&&k.name){const pe=k.name.toLowerCase().substring(k.name.lastIndexOf("."));ke=!Ne.includes(pe)}return ke},ri=k=>{const Pe=["text/html","text/css","application/javascript","application/json","text/plain","application/xml","text/xml","application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","audio/","video/","text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];for(const Ne of Pe)if(k.type.startsWith(Ne))return!0;if(k.name){const Ne=k.name.toLowerCase().substring(k.name.lastIndexOf("."));if([".html",".htm",".css",".js",".json",".txt",".xml",".zip",".rar",".7z",".csv",".xlsx",".xls",".pptx",".ppt",".docx",".doc",".mp3",".mp4",".avi",".mov"].includes(Ne))return!0}return!1},Rr=k=>{if(k){if(console.log("File selected:",k.name,"Type:",k.type,"Size:",k.size),k.size/(1024*1024)>5&&(console.log("File too large, showing size warning modal"),Ze(k),_t(!0)),ri(k)){console.log("File format not supported at all, showing unsupported format modal"),He(k),mn(!0);return}Jn(k)?(console.log("File needs preprocessing, showing modal"),pn(k),Xe(!0)):(console.log("File does not need preprocessing, setting directly"),E.length===0?(b(k),P([k])):P(Ne=>[...Ne,k]))}},er=k=>{if(k){if(console.log("File changed:",k.name,"Type:",k.type,"Size:",k.size),k.size/(1024*1024)>5&&(console.log("File too large, showing size warning modal"),Ze(k),_t(!0)),ri(k)){console.log("File format not supported at all, showing unsupported format modal"),He(k),mn(!0);return}Jn(k)?(console.log("File needs preprocessing, showing modal"),pn(k),Xe(!0)):(console.log("File does not need preprocessing, replacing last file"),E.length>1?(P(Ne=>{const ke=[...Ne];return ke[ke.length-1]=k,ke}),E.length===1&&b(k)):(b(k),P([k])))}};async function $i(k){const Pe=await k.text();try{return Pe?JSON.parse(Pe):{}}catch{return{error:Pe}}}function go(k,Pe){const Ne=k instanceof Error?k.message:`Failed to ${Pe.toLowerCase()}`;alert(Ne)}async function ii(){if(E.length!==0){u(!0);try{E.length===1?await Eu():await ks()}catch(k){go(k,"Upload")}finally{u(!1)}}}async function Eu(){console.log("DEBUG: Starting single image upload");const k=new FormData;k.append("file",E[0]),k.append("title",U),k.append("image_type",K),L&&k.append("source",L),H&&k.append("event_type",H),de&&k.append("epsg",de),fe.length>0&&fe.forEach(pe=>k.append("countries",pe)),K==="drone_image"&&(ne&&k.append("center_lon",ne),Ce&&k.append("center_lat",Ce),G&&k.append("amsl_m",G),T&&k.append("agl_m",T),oe&&k.append("heading_deg",oe),se&&k.append("yaw_deg",se),ee&&k.append("pitch_deg",ee),Y&&k.append("roll_deg",Y),tn&&k.append("rtk_fix",tn.toString()),ot&&k.append("std_h_m",ot),st&&k.append("std_v_m",st));const Pe=localStorage.getItem(Bl);Pe&&k.append("model_name",Pe);const Ne=await fetch("/api/images/",{method:"POST",body:k}),ke=await $i(Ne);if(!Ne.ok)throw new Error(ke.error||"Upload failed");console.log("DEBUG: Single upload response:",ke),await zi(ke,!1)}async function ks(){console.log("DEBUG: Starting multi-image upload");const k=new FormData;E.forEach(pe=>k.append("files",pe)),k.append("title",U),k.append("image_type",K),ft.forEach((pe,Re)=>{pe.source&&k.append(`source_${Re}`,pe.source),pe.eventType&&k.append(`event_type_${Re}`,pe.eventType),pe.epsg&&k.append(`epsg_${Re}`,pe.epsg),pe.countries.length>0&&pe.countries.forEach(Ot=>k.append(`countries_${Re}`,Ot)),K==="drone_image"&&(pe.centerLon&&k.append(`center_lon_${Re}`,pe.centerLon),pe.centerLat&&k.append(`center_lat_${Re}`,pe.centerLat),pe.amslM&&k.append(`amsl_m_${Re}`,pe.amslM),pe.aglM&&k.append(`agl_m_${Re}`,pe.aglM),pe.headingDeg&&k.append(`heading_deg_${Re}`,pe.headingDeg),pe.yawDeg&&k.append(`yaw_deg_${Re}`,pe.yawDeg),pe.pitchDeg&&k.append(`pitch_deg_${Re}`,pe.pitchDeg),pe.rollDeg&&k.append(`roll_deg_${Re}`,pe.rollDeg),pe.rtkFix&&k.append(`rtk_fix_${Re}`,pe.rtkFix.toString()),pe.stdHM&&k.append(`std_h_m_${Re}`,pe.stdHM),pe.stdVM&&k.append(`std_v_m_${Re}`,pe.stdVM))});const Pe=localStorage.getItem(Bl);Pe&&k.append("model_name",Pe);const Ne=await fetch("/api/images/multi",{method:"POST",body:k}),ke=await $i(Ne);if(!Ne.ok)throw new Error(ke.error||"Upload failed");console.log("DEBUG: Multi upload response:",ke),await zi(ke,!0)}async function zi(k,Pe){dn(k.image_url),k.preprocessing_info&&typeof k.preprocessing_info=="object"&&"was_preprocessed"in k.preprocessing_info&&k.preprocessing_info.was_preprocessed===!0&&(Ye(k.preprocessing_info),ze(!0));const Ne=k.image_id;if(!Ne)throw new Error("Upload failed: image_id not found");if(Dt(Ne),Pe)if(k.image_ids&&Array.isArray(k.image_ids)){const ut=k.image_ids;console.log("DEBUG: Storing image IDs for multi-upload:",ut),pt(ut)}else console.log("DEBUG: Multi-upload but no image_ids found, using single ID"),pt([Ne]);else console.log("DEBUG: Storing single image ID:",Ne),pt([Ne]);const ke=k,pe=ke.raw_json,Re=pe?.fallback_used,Ot=pe?.original_model,Nt=pe?.fallback_reason,Bn=ke.model;Re&&Ot&&Nt&&(ve({originalModel:Ot,fallbackModel:Bn,reason:Nt}),we(!0));const Un=ke.raw_json?.metadata;if(Un){const ut=Un.metadata||Un;if(ut&&typeof ut=="object"){const nr=[];if(Pe){const ct=ut.metadata_images;if(ct&&typeof ct=="object")for(let rr=1;rr<=E.length;rr++){const ai=`image${rr}`,Ir=ct[ai];if(Ir&&typeof Ir=="object"){const gn=Ir,yo=gn.source||"",js=Or(yo);nr.push({source:js,eventType:gn.type||"",epsg:gn.epsg||"",countries:Array.isArray(gn.countries)?gn.countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""})}else nr.push({source:"",eventType:"",epsg:"",countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""})}else{const rr=ut.source||"",Ir={source:Or(rr),eventType:ut.type||"",epsg:ut.epsg||"",countries:Array.isArray(ut.countries)?ut.countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""};for(let gn=0;gn0){const ct=nr[0];if(ut&&typeof ut=="object"){const rr=ut.title;rr&&W(rr||"")}$(ct.source||""),Z(ct.eventType||""),O(ct.epsg||""),I(ct.countries||[]),K==="drone_image"&&(he(ct.centerLon||""),_e(ct.centerLat||""),ue(ct.amslM||""),V(ct.aglM||""),Se(ct.headingDeg||""),re(ct.yawDeg||""),Q(ct.pitchDeg||""),et(ct.rollDeg||""),Wt(ct.rtkFix||!1),bt(ct.stdHM||""),wt(ct.stdVM||""))}}}const gt=ke.raw_json?.metadata;gt&&(gt.description&&Nr(gt.description),gt.analysis&&$n(gt.analysis),gt.recommended_actions&&fn(gt.recommended_actions)),ke.generated&&Pi(ke.generated),Ai("2a")}async function Ns(){if(console.log("handleSubmit called with:",{uploadedImageId:lt,title:U,draft:ji}),!lt)return alert("No image to submit");if(!hn){j(!0);return}y(!0);try{const k=Qt.length>0?Qt:[lt];console.log("DEBUG: Submit - Using image IDs:",k),console.log("DEBUG: Submit - uploadedImageIds:",Qt),console.log("DEBUG: Submit - uploadedImageId:",lt);for(let Re=0;Re{Pr(!1),o(1),b(null),P([]),x(null),Dt(null),pt([]),dn(null),W(""),$(""),Z(""),O(""),I([]),he(""),_e(""),ue(""),H(""),Se(""),re(""),Q(""),et(""),Wt(!1),bt(""),wt(""),Mi({accuracy:50,context:50,usability:50}),Pi(""),Nr(""),$n(""),fn(""),ht([]),we(!1),ve(null),ze(!1),Ye(null),Xe(!1),pn(null),Ve(!1),At(""),mn(!1),He(null),_t(!1),Ze(null),n("/upload",{replace:!0})},tr=v.useCallback(k=>{k==="/upload"||k==="/"||(C.current?(Me(k),le(!0)):n(k))},[n]);async function vo(){if(Ee&&C.current)try{await fetch(`/api/images/${C.current}`,{method:"DELETE"}),le(!1),Me(null),n(Ee)}catch(k){console.error("Failed to delete image before navigation:",k),le(!1),Me(null),n(Ee)}}const ku=async()=>{if(Pn){Ve(!0),At("Starting file conversion...");try{const k=new FormData;k.append("file",Pn),k.append("preprocess_only","true"),At("Converting file format...");const Pe=await fetch("/api/images/preprocess",{method:"POST",body:k});if(!Pe.ok)throw new Error("Preprocessing failed");const Ne=await Pe.json();At("Finalizing conversion...");const ke=atob(Ne.processed_content),pe=new Uint8Array(ke.length);for(let Nt=0;Nt[...Nt,Re]),x(Ot),At("Conversion complete!"),setTimeout(()=>{Xe(!1),pn(null),Ve(!1),At("")},1e3)}catch(k){console.error("Preprocessing error:",k),At("Conversion failed. Please try again."),setTimeout(()=>{Xe(!1),pn(null),Ve(!1),At("")},2e3)}}},Nu=()=>{Xe(!1),pn(null),Ve(!1),At("")},ca=async k=>{f(!0);try{const Pe=k.map(async Re=>{const Ot=await fetch(`/api/images/${Re}`);if(!Ot.ok)throw new Error(`Failed to fetch image ${Re}`);const Nt=await Ot.json(),Bn=await fetch(`/api/images/${Re}/file`);if(!Bn.ok)throw new Error(`Failed to fetch image file ${Re}`);const Un=await Bn.blob(),gt=Nt.file_key.split("/").pop()||`contributed_${Re}.png`;return{file:new File([Un],gt,{type:Un.type}),imageData:Nt}}),Ne=await Promise.all(Pe),ke=Ne.map(Re=>Re.file),pe=Ne[0]?.imageData;P(ke),pt(k),k.length===1&&Dt(k[0]),ke.length>=1&&b(ke[0]),pe?.image_type&&ce(pe.image_type)}catch(Pe){console.error("Failed to fetch contributed images:",Pe),alert(`Failed to load contributed images: ${Pe instanceof Error?Pe.message:"Unknown error"}`)}finally{f(!1)}};return v.useEffect(()=>{Promise.all([fetch("/api/sources").then(k=>k.json()),fetch("/api/types").then(k=>k.json()),fetch("/api/spatial-references").then(k=>k.json()),fetch("/api/image-types").then(k=>k.json()),fetch("/api/countries").then(k=>k.json()),fetch("/api/models").then(k=>k.json())]).then(([k,Pe,Ne,ke,pe,Re])=>{!localStorage.getItem(Bl)&&Re?.length&&localStorage.setItem(Bl,Re[0].m_code),nn(k),ln(Pe),Jr(Ne),cn(ke),Kn(pe),k.length>0&&$(k[0].s_code),Z("OTHER"),O("OTHER"),ke.length>0&&!e.get("imageType")&&!K&&ce(ke[0].image_type)})},[e,K]),v.useEffect(()=>(window.confirmNavigationIfNeeded=k=>{tr(k)},()=>{delete window.confirmNavigationIfNeeded}),[tr]),v.useEffect(()=>{const k=ke=>{if(C.current){const pe="You have an uploaded image that will be deleted if you leave this page. Are you sure you want to leave?";return ke.preventDefault(),ke.returnValue=pe,pe}},Pe=()=>{C.current&&fetch(`/api/images/${C.current}`,{method:"DELETE"}).catch(console.error)},Ne=ke=>{const pe=ke.target,Re=pe.closest("a[href]")||pe.closest("[data-navigate]");if(Re&&C.current){const Ot=Re.getAttribute("href")||Re.getAttribute("data-navigate");Ot&&Ot!=="#"&&!Ot.startsWith("javascript:")&&!Ot.startsWith("mailto:")&&(ke.preventDefault(),ke.stopPropagation(),tr(Ot))}};return window.addEventListener("beforeunload",k),document.addEventListener("click",Ne,!0),()=>{window.removeEventListener("beforeunload",k),document.removeEventListener("click",Ne,!0),Pe()}},[tr]),v.useEffect(()=>{if(!E){x(null);return}const k=URL.createObjectURL(E);return x(k),()=>URL.revokeObjectURL(k)},[E]),v.useEffect(()=>{const k=e.get("contribute"),Pe=e.get("imageIds");if(k==="true"&&Pe){const Ne=Pe.split(",").filter(ke=>ke.trim());Ne.length>0&&ca(Ne)}},[e]),v.useEffect(()=>{i==="2b"&&Dr(0)},[i]),g.jsxs(Qf,{children:[i!==3&&g.jsx("div",{className:"max-w-7xl mx-auto",children:g.jsxs("div",{className:V.uploadContainer,"data-step":i,children:[i===1&&!e.get("step")&&!d&&g.jsx(Ag,{files:N,file:E,preview:m,imageType:K,onFileChange:Rr,onRemoveImage:Xn,onAddImage:Fi,onImageTypeChange:ni,onChangeFile:er}),i===1&&e.get("contribute")==="true"&&!d&&N.length>0&&g.jsx(Ag,{files:N,file:E,preview:m,imageType:K,onFileChange:Rr,onRemoveImage:Xn,onAddImage:Fi,onImageTypeChange:ni,onChangeFile:er}),s&&g.jsxs("div",{className:V.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:V.loadingText,children:"Generating..."})]}),d&&g.jsxs("div",{className:V.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:V.loadingText,children:"Loading contribution..."})]}),(i===1&&!s&&!d||i===1&&e.get("contribute")==="true"&&!s&&!d&&N.length>0)&&g.jsx("div",{className:V.generateButtonContainer,children:Kt?g.jsx(Ue,{name:"generate-from-url",onClick:ii,children:"Generate Caption"}):g.jsx(Ue,{name:"generate",disabled:N.length===0,onClick:ii,children:"Generate"})}),i==="2a"&&g.jsxs("div",{className:V.step2Layout,children:[g.jsx("div",{className:V.mapColumn,children:g.jsx(Fg,{files:N,imageUrl:Kt,preview:m,onViewFullSize:k=>{Yn(k||null),ei(!0)}})}),g.jsx("div",{className:V.contentColumn,children:g.jsxs("div",{className:V.metadataSectionCard,children:[g.jsx(Qj,{files:N,imageType:K,title:U,source:L,eventType:q,epsg:fe,countries:de,centerLon:ne,centerLat:Ce,amslM:G,aglM:T,headingDeg:oe,yawDeg:se,pitchDeg:ee,rollDeg:Y,rtkFix:tn,stdHM:ot,stdVM:st,metadataArray:ft,sources:xt,types:Tn,spatialReferences:jn,imageTypes:un,countriesOptions:Er,onTitleChange:k=>W(k||""),onSourceChange:po,onEventTypeChange:mo,onEpsgChange:Ri,onCountriesChange:Su,onCenterLonChange:bu,onCenterLatChange:oa,onAmslMChange:Cs,onAglMChange:aa,onHeadingDegChange:Ii,onYawDegChange:_u,onPitchDegChange:sa,onRollDegChange:tt,onRtkFixChange:Ss,onStdHMChange:bs,onStdVMChange:la,onImageTypeChange:ni,updateMetadataForImage:mr}),g.jsxs("div",{className:V.confirmSection,children:[g.jsx(hf,{name:"delete",variant:"tertiary",onClick:Ts,title:"Delete",ariaLabel:"Delete uploaded image",children:g.jsx(df,{})}),g.jsx(Ue,{name:"confirm-metadata",onClick:()=>Ai("2b"),children:"Next"})]})]})})]}),i==="2b"&&g.jsxs("div",{className:V.step2bLayout,children:[p&&g.jsxs("div",{className:V.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:V.loadingText,children:"Submitting..."})]}),g.jsxs("div",{className:`${V.topRow} ${hn?V.ratingHidden:""}`,children:[g.jsx("div",{className:V.imageSection,children:g.jsx(Fg,{files:N,imageUrl:Kt,preview:m,onViewFullSize:k=>{Yn(k||null),ei(!0)},currentImageIndex:pr,onGoToPrevious:_s,onGoToNext:Es,onGoToImage:ua,showCarousel:!0})}),!hn&&g.jsx("div",{className:V.metadataSectionCard,children:g.jsx(Kj,{isPerformanceConfirmed:hn,scores:rn,onScoreChange:(k,Pe)=>Mi(Ne=>({...Ne,[k]:Pe})),onConfirmRatings:()=>Pr(!0),onEditRatings:()=>Pr(!1)})})]}),g.jsx("div",{className:V.metadataSectionCard,children:g.jsx(Yj,{description:kr,analysis:Tr,recommendedActions:jr,onDescriptionChange:k=>Nr(k||""),onAnalysisChange:k=>$n(k||""),onRecommendedActionsChange:k=>fn(k||""),onBack:()=>Ai("2a"),onDelete:Ts,onSubmit:Ns,onEditRatings:()=>Pr(!1),isPerformanceConfirmed:hn,isSubmitting:p})})]})]})}),i===3&&g.jsxs("div",{className:V.successContainer,children:[g.jsx(ro,{level:2,className:V.successHeading,children:"Saved!"}),g.jsx("p",{className:V.successText,children:e.get("contribute")==="true"?"Your contribution has been successfully saved.":"Your caption has been successfully saved."}),g.jsx("div",{className:V.successButton,children:g.jsx(Ue,{name:"upload-another",onClick:()=>{oi()},children:"Upload Another"})})]}),g.jsx(Xj,{isOpen:Li,imageUrl:Kt,preview:m,selectedImageData:Di,onClose:()=>{ei(!1),Yn(null)}}),g.jsx(Jj,{isOpen:Mr,onClose:()=>j(!1)}),g.jsx(eP,{isOpen:R,onConfirm:Bi,onCancel:()=>z(!1)}),g.jsx(tP,{isOpen:X,onConfirm:vo,onCancel:()=>le(!1)}),g.jsx(nP,{isOpen:ye,fallbackInfo:ge,onClose:()=>we(!1)}),g.jsx(rP,{isOpen:Fe,preprocessingInfo:Pt,onClose:()=>ze(!1)}),g.jsx(iP,{isOpen:Ge,preprocessingFile:Pn,isPreprocessing:Mn,preprocessingProgress:Oi,onConfirm:ku,onCancel:Nu}),g.jsx(oP,{isOpen:zn,unsupportedFile:ti,onClose:()=>mn(!1)}),g.jsx(aP,{isOpen:nt,oversizedFile:Lr,onClose:()=>_t(!1),onCancel:()=>_t(!1)})]})}const sP="_helpContainer_1wavj_1",lP="_helpSection_1wavj_13",uP="_sectionHeader_1wavj_49",cP="_sectionTitle_1wavj_91",dP="_sectionContent_1wavj_105",fP="_guidelinesList_1wavj_119",hP="_buttonContainer_1wavj_181",dt={helpContainer:sP,helpSection:lP,sectionHeader:uP,sectionTitle:cP,sectionContent:dP,guidelinesList:fP,buttonContainer:hP};function pP(){const e=hs(),{setShowReferenceExamples:n}=Zj(),i=()=>{e("/upload")},o=()=>{n(!0),e("/explore")},s=()=>{e("/analytics?view=crisis_maps")};return g.jsx(Qf,{className:"py-10",children:g.jsx("div",{className:dt.helpContainer,children:g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Introduction"})}),g.jsx("div",{className:dt.sectionContent,children:"In collaboration with the IFRC, PromptAid Vision is a tool that generates textual descriptions of crisis maps/crisis drone images utiliing Visual language models. This prototype is for collecting data for the fine-tuning of our own models. We aim to utilize AI tools to support national societies with rapid decision making during emergencies."}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"upload-now",variant:"secondary",onClick:i,children:"Upload now →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Guidelines"})}),g.jsxs("div",{className:dt.sectionContent,children:["To make the process smoother, please follow the guidelines below:",g.jsxs("ul",{className:dt.guidelinesList,children:[g.jsx("li",{children:"Avoid uploading images that are not crisis maps/crisis drone images."}),g.jsx("li",{children:"Confirm the image details prior to modifying the description."}),g.jsx("li",{children:"Before the modification, please read the description generated and provide a rating via the rating sliders."}),g.jsx("li",{children:'Click the "Submit" button to save the description.'})]})]}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"see-examples",variant:"secondary",onClick:o,children:"See examples →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"VLMs"})}),g.jsx("div",{className:dt.sectionContent,children:"PromptAid Vision uses a variety of Visual Language Models (VLMs). A random VLM is selected for each upload. Therefore feel free to delete and reupload. You can view performance details here:"}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"view-vlm-details",variant:"secondary",onClick:s,children:"View VLM details →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Dataset"})}),g.jsx("div",{className:dt.sectionContent,children:"All users are able to export the dataset. You could apply filters when exporting, and it have the option to organize based on model fine-tuning formats."}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"export-dataset",variant:"secondary",onClick:()=>{n(!1),e("/explore"),setTimeout(()=>{const u=document.querySelector('[name="export-dataset"]');u&&u.click()},100)},children:"Export dataset →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Contact us"})}),g.jsx("div",{className:dt.sectionContent,children:"Need help or have questions about PromptAid Vision? Our team is here to support you."}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"contact-support",variant:"secondary",disabled:!0,children:"Get in touch →"})})]})]})})})}const mP=v.createContext(void 0),gP=({children:e})=>{const[n,i]=v.useState(!1),[o,s]=v.useState(!0),u=async()=>{const y=localStorage.getItem("adminToken");if(!y){i(!1),s(!1);return}try{(await fetch("/api/admin/verify",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${y}`}})).ok?i(!0):(localStorage.removeItem("adminToken"),i(!1))}catch(w){console.error("Error verifying admin token:",w),localStorage.removeItem("adminToken"),i(!1)}finally{s(!1)}},d=async y=>{try{const w=await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:y})});if(w.ok){const C=await w.json();return localStorage.setItem("adminToken",C.access_token),i(!0),!0}else return!1}catch(w){return console.error("Login error:",w),!1}},f=()=>{localStorage.removeItem("adminToken"),i(!1)};v.useEffect(()=>{u()},[]);const p={isAuthenticated:n,isLoading:o,login:d,logout:f,verifyToken:u};return g.jsx(mP.Provider,{value:p,children:e})},vP=v.lazy(()=>Qn(()=>import("./index-D3L5y9N7.js"),__vite__mapDeps([0,1]))),yP=v.lazy(()=>Qn(()=>import("./index-hD4RFL5O.js"),__vite__mapDeps([2,3,4,5,6]))),wP=v.lazy(()=>Qn(()=>import("./AdminPage-DLWomD88.js"),__vite__mapDeps([7,3,8]))),xP=v.lazy(()=>Qn(()=>import("./index-BTevbmbp.js"),__vite__mapDeps([9,3,4,5,10])));class CP extends v.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,i){console.error("Error caught by boundary:",n,i)}render(){return this.state.hasError?g.jsxs("div",{style:{padding:"20px",textAlign:"center"},children:[g.jsx("h2",{children:"Something went wrong"}),g.jsx("p",{children:"Please refresh the page to try again."}),g.jsx("button",{onClick:()=>window.location.reload(),children:"Refresh Page"})]}):this.props.children}}const bi=e=>{const n=e();return n.catch(()=>{}),n},SP=()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{bi(()=>Qn(()=>import("./index-D3L5y9N7.js"),__vite__mapDeps([0,1]))),bi(()=>Qn(()=>import("./index-hD4RFL5O.js"),__vite__mapDeps([2,3,4,5,6]))),bi(()=>Qn(()=>import("./AdminPage-DLWomD88.js"),__vite__mapDeps([7,3,8]))),bi(()=>Qn(()=>import("./index-BTevbmbp.js"),__vite__mapDeps([9,3,4,5,10])))}):setTimeout(()=>{bi(()=>Qn(()=>import("./index-D3L5y9N7.js"),__vite__mapDeps([0,1]))),bi(()=>Qn(()=>import("./index-hD4RFL5O.js"),__vite__mapDeps([2,3,4,5,6]))),bi(()=>Qn(()=>import("./AdminPage-DLWomD88.js"),__vite__mapDeps([7,3,8]))),bi(()=>Qn(()=>import("./index-BTevbmbp.js"),__vite__mapDeps([9,3,4,5,10])))},1e3)},bP=vx([{element:g.jsx(LT,{}),children:[{path:"/",element:g.jsx($g,{})},{path:"/upload",element:g.jsx($g,{})},{path:"/analytics",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Analytics..."}),children:g.jsx(vP,{})})},{path:"/explore",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Explore..."}),children:g.jsx(yP,{})})},{path:"/help",element:g.jsx(pP,{})},{path:"/admin",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Admin..."}),children:g.jsx(wP,{})})},{path:"/map/:mapId",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Map Details..."}),children:g.jsx(xP,{})})}]}],{basename:"/"});function _P(){const[e,n]=v.useState([]);v.useEffect(()=>{SP()},[]);const i=v.useCallback(f=>{n(p=>Bx([...p,f],y=>y.name)??p)},[n]),o=v.useCallback(f=>{n(p=>{const y=p.findIndex(C=>C.name===f);if(y===-1)return p;const w=[...p];return w.splice(y,1),w})},[n]),s=v.useCallback((f,p)=>{n(y=>{const w=y.findIndex(m=>m.name===f);if(w===-1)return y;const C=[...y];return C[w]={...C[w],...p},C})},[n]),u=v.useMemo(()=>({alerts:e,addAlert:i,removeAlert:o,updateAlert:s}),[e,i,o,s]),d=v.useMemo(()=>({languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{},currentLanguage:"en",setCurrentLanguage:()=>{},strings:{},setStrings:()=>{},registerNamespace:()=>{}}),[]);return g.jsx(CP,{children:g.jsx(Fx.Provider,{value:u,children:g.jsx(o0.Provider,{value:d,children:g.jsx(gP,{children:g.jsx(Gj,{children:g.jsx(kx,{router:bP})})})})})})}function EP(){return g.jsx(_P,{})}console.log("React version at runtime:",v.version,"createContext exists?",!!v.createContext);V1.createRoot(document.getElementById("root")).render(g.jsx(v.StrictMode,{children:g.jsx(EP,{})}));export{_C as A,ra as B,TP as C,Zj as D,MP as E,df as F,Qn as G,ro as H,V as I,eo as J,NP as K,_T as L,Xj as M,Qf as N,jt as O,jC as P,DP as Q,c0 as R,TC as S,d0 as T,LP as U,Lg as V,mP as W,kP as X,Bg as Y,Wo as _,$e as a,Lt as b,IP as c,AP as d,jP as e,SC as f,l0 as g,RP as h,OP as i,g as j,fr as k,qx as l,FE as m,Ue as n,Oe as o,Zx as p,Ka as q,v as r,u0 as s,o0 as t,Dx as u,PC as v,MC as w,hs as x,PP as y,dr as z}; +Recommended Actions: ${jr}`,Ne={title:U,edited:Pe,accuracy:rn.accuracy,context:rn.context,usability:rn.usability};console.log("Updating caption:",Ne);const ke=await fetch(`/api/images/${lt}/caption`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne)}),pe=await $i(ke);if(!ke.ok)throw new Error(pe.error||"Caption update failed");Dt(null),pt([]),Ai(3)}catch(k){go(k,"Submit")}finally{y(!1)}}async function Ts(){if(console.log("handleDelete called with uploadedImageId:",lt),!lt){alert("No image to delete. Please try refreshing the page.");return}z(!0)}async function Bi(){try{console.log("Deleting image with ID:",lt);const k=await fetch(`/api/images/${lt}`,{method:"DELETE"});if(!k.ok){const Pe=await $i(k);throw new Error(Pe.error||`Delete failed with status ${k.status}`)}z(!1),oi()}catch(k){go(k,"Delete")}}const oi=()=>{Pr(!1),o(1),b(null),P([]),x(null),Dt(null),pt([]),dn(null),W(""),$(""),Z(""),O(""),I([]),he(""),_e(""),ue(""),V(""),Se(""),re(""),Q(""),et(""),Wt(!1),bt(""),wt(""),Mi({accuracy:50,context:50,usability:50}),Pi(""),Nr(""),$n(""),fn(""),ht([]),we(!1),ve(null),ze(!1),Ye(null),Xe(!1),pn(null),Ve(!1),At(""),mn(!1),He(null),_t(!1),Ze(null),n("/upload",{replace:!0})},tr=v.useCallback(k=>{k==="/upload"||k==="/"||(C.current?(Me(k),le(!0)):n(k))},[n]);async function vo(){if(Ee&&C.current)try{await fetch(`/api/images/${C.current}`,{method:"DELETE"}),le(!1),Me(null),n(Ee)}catch(k){console.error("Failed to delete image before navigation:",k),le(!1),Me(null),n(Ee)}}const ku=async()=>{if(Pn){Ve(!0),At("Starting file conversion...");try{const k=new FormData;k.append("file",Pn),k.append("preprocess_only","true"),At("Converting file format...");const Pe=await fetch("/api/images/preprocess",{method:"POST",body:k});if(!Pe.ok)throw new Error("Preprocessing failed");const Ne=await Pe.json();At("Finalizing conversion...");const ke=atob(Ne.processed_content),pe=new Uint8Array(ke.length);for(let Nt=0;Nt[...Nt,Re]),x(Ot),At("Conversion complete!"),setTimeout(()=>{Xe(!1),pn(null),Ve(!1),At("")},1e3)}catch(k){console.error("Preprocessing error:",k),At("Conversion failed. Please try again."),setTimeout(()=>{Xe(!1),pn(null),Ve(!1),At("")},2e3)}}},Nu=()=>{Xe(!1),pn(null),Ve(!1),At("")},ca=async k=>{f(!0);try{const Pe=k.map(async Re=>{const Ot=await fetch(`/api/images/${Re}`);if(!Ot.ok)throw new Error(`Failed to fetch image ${Re}`);const Nt=await Ot.json(),Bn=await fetch(`/api/images/${Re}/file`);if(!Bn.ok)throw new Error(`Failed to fetch image file ${Re}`);const Un=await Bn.blob(),gt=Nt.file_key.split("/").pop()||`contributed_${Re}.png`;return{file:new File([Un],gt,{type:Un.type}),imageData:Nt}}),Ne=await Promise.all(Pe),ke=Ne.map(Re=>Re.file),pe=Ne[0]?.imageData;P(ke),pt(k),k.length===1&&Dt(k[0]),ke.length>=1&&b(ke[0]),pe?.image_type&&ce(pe.image_type)}catch(Pe){console.error("Failed to fetch contributed images:",Pe),alert(`Failed to load contributed images: ${Pe instanceof Error?Pe.message:"Unknown error"}`)}finally{f(!1)}};return v.useEffect(()=>{Promise.all([fetch("/api/sources").then(k=>k.json()),fetch("/api/types").then(k=>k.json()),fetch("/api/spatial-references").then(k=>k.json()),fetch("/api/image-types").then(k=>k.json()),fetch("/api/countries").then(k=>k.json()),fetch("/api/models").then(k=>k.json())]).then(([k,Pe,Ne,ke,pe,Re])=>{!localStorage.getItem(Bl)&&Re?.length&&localStorage.setItem(Bl,Re[0].m_code),nn(k),ln(Pe),Jr(Ne),cn(ke),Kn(pe),k.length>0&&$(k[0].s_code),Z("OTHER"),O("OTHER"),ke.length>0&&!e.get("imageType")&&!K&&ce(ke[0].image_type)})},[e,K]),v.useEffect(()=>(window.confirmNavigationIfNeeded=k=>{tr(k)},()=>{delete window.confirmNavigationIfNeeded}),[tr]),v.useEffect(()=>{const k=ke=>{if(C.current){const pe="You have an uploaded image that will be deleted if you leave this page. Are you sure you want to leave?";return ke.preventDefault(),ke.returnValue=pe,pe}},Pe=()=>{C.current&&fetch(`/api/images/${C.current}`,{method:"DELETE"}).catch(console.error)},Ne=ke=>{const pe=ke.target,Re=pe.closest("a[href]")||pe.closest("[data-navigate]");if(Re&&C.current){const Ot=Re.getAttribute("href")||Re.getAttribute("data-navigate");Ot&&Ot!=="#"&&!Ot.startsWith("javascript:")&&!Ot.startsWith("mailto:")&&(ke.preventDefault(),ke.stopPropagation(),tr(Ot))}};return window.addEventListener("beforeunload",k),document.addEventListener("click",Ne,!0),()=>{window.removeEventListener("beforeunload",k),document.removeEventListener("click",Ne,!0),Pe()}},[tr]),v.useEffect(()=>{if(!N){x(null);return}const k=URL.createObjectURL(N);return x(k),()=>URL.revokeObjectURL(k)},[N]),v.useEffect(()=>{const k=e.get("contribute"),Pe=e.get("imageIds");if(k==="true"&&Pe){const Ne=Pe.split(",").filter(ke=>ke.trim());Ne.length>0&&ca(Ne)}},[e]),v.useEffect(()=>{i==="2b"&&Dr(0)},[i]),g.jsxs(Qf,{children:[i!==3&&g.jsx("div",{className:"max-w-7xl mx-auto",children:g.jsxs("div",{className:q.uploadContainer,"data-step":i,children:[i===1&&!e.get("step")&&!d&&g.jsx(Ag,{files:E,file:N,preview:m,imageType:K,onFileChange:Rr,onRemoveImage:Xn,onAddImage:Fi,onImageTypeChange:ni,onChangeFile:er}),i===1&&e.get("contribute")==="true"&&!d&&E.length>0&&g.jsx(Ag,{files:E,file:N,preview:m,imageType:K,onFileChange:Rr,onRemoveImage:Xn,onAddImage:Fi,onImageTypeChange:ni,onChangeFile:er}),s&&g.jsxs("div",{className:q.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:q.loadingText,children:"Generating..."})]}),d&&g.jsxs("div",{className:q.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:q.loadingText,children:"Loading contribution..."})]}),(i===1&&!s&&!d||i===1&&e.get("contribute")==="true"&&!s&&!d&&E.length>0)&&g.jsx("div",{className:q.generateButtonContainer,children:Kt?g.jsx(Ue,{name:"generate-from-url",onClick:ii,children:"Generate Caption"}):g.jsx(Ue,{name:"generate",disabled:E.length===0,onClick:ii,children:"Generate"})}),i==="2a"&&g.jsxs("div",{className:q.step2Layout,children:[g.jsx("div",{className:q.mapColumn,children:g.jsx(Fg,{files:E,imageUrl:Kt,preview:m,onViewFullSize:k=>{Yn(k||null),ei(!0)}})}),g.jsx("div",{className:q.contentColumn,children:g.jsxs("div",{className:q.metadataSectionCard,children:[g.jsx(Qj,{files:E,imageType:K,title:U,source:L,eventType:H,epsg:de,countries:fe,centerLon:ne,centerLat:Ce,amslM:G,aglM:T,headingDeg:oe,yawDeg:se,pitchDeg:ee,rollDeg:Y,rtkFix:tn,stdHM:ot,stdVM:st,metadataArray:ft,sources:xt,types:Tn,spatialReferences:jn,imageTypes:un,countriesOptions:Er,onTitleChange:k=>W(k||""),onSourceChange:po,onEventTypeChange:mo,onEpsgChange:Ri,onCountriesChange:Su,onCenterLonChange:bu,onCenterLatChange:oa,onAmslMChange:Cs,onAglMChange:aa,onHeadingDegChange:Ii,onYawDegChange:_u,onPitchDegChange:sa,onRollDegChange:tt,onRtkFixChange:Ss,onStdHMChange:bs,onStdVMChange:la,onImageTypeChange:ni,updateMetadataForImage:mr}),g.jsxs("div",{className:q.confirmSection,children:[g.jsx(hf,{name:"delete",variant:"tertiary",onClick:Ts,title:"Delete",ariaLabel:"Delete uploaded image",children:g.jsx(df,{})}),g.jsx(Ue,{name:"confirm-metadata",onClick:()=>Ai("2b"),children:"Next"})]})]})})]}),i==="2b"&&g.jsxs("div",{className:q.step2bLayout,children:[p&&g.jsxs("div",{className:q.loadingContainer,children:[g.jsx(Wo,{className:"text-ifrcRed"}),g.jsx("p",{className:q.loadingText,children:"Submitting..."})]}),g.jsxs("div",{className:`${q.topRow} ${hn?q.ratingHidden:""}`,children:[g.jsx("div",{className:q.imageSection,children:g.jsx(Fg,{files:E,imageUrl:Kt,preview:m,onViewFullSize:k=>{Yn(k||null),ei(!0)},currentImageIndex:pr,onGoToPrevious:_s,onGoToNext:Es,onGoToImage:ua,showCarousel:!0})}),!hn&&g.jsx("div",{className:q.metadataSectionCard,children:g.jsx(Kj,{isPerformanceConfirmed:hn,scores:rn,onScoreChange:(k,Pe)=>Mi(Ne=>({...Ne,[k]:Pe})),onConfirmRatings:()=>Pr(!0),onEditRatings:()=>Pr(!1)})})]}),g.jsx("div",{className:q.metadataSectionCard,children:g.jsx(Yj,{description:kr,analysis:Tr,recommendedActions:jr,onDescriptionChange:k=>Nr(k||""),onAnalysisChange:k=>$n(k||""),onRecommendedActionsChange:k=>fn(k||""),onBack:()=>Ai("2a"),onDelete:Ts,onSubmit:Ns,onEditRatings:()=>Pr(!1),isPerformanceConfirmed:hn,isSubmitting:p})})]})]})}),i===3&&g.jsxs("div",{className:q.successContainer,children:[g.jsx(ro,{level:2,className:q.successHeading,children:"Saved!"}),g.jsx("p",{className:q.successText,children:e.get("contribute")==="true"?"Your contribution has been successfully saved.":"Your caption has been successfully saved."}),g.jsx("div",{className:q.successButton,children:g.jsx(Ue,{name:"upload-another",onClick:()=>{oi()},children:"Upload Another"})})]}),g.jsx(Xj,{isOpen:Li,imageUrl:Kt,preview:m,selectedImageData:Di,onClose:()=>{ei(!1),Yn(null)}}),g.jsx(Jj,{isOpen:Mr,onClose:()=>j(!1)}),g.jsx(eP,{isOpen:R,onConfirm:Bi,onCancel:()=>z(!1)}),g.jsx(tP,{isOpen:X,onConfirm:vo,onCancel:()=>le(!1)}),g.jsx(nP,{isOpen:ye,fallbackInfo:ge,onClose:()=>we(!1)}),g.jsx(rP,{isOpen:Fe,preprocessingInfo:Pt,onClose:()=>ze(!1)}),g.jsx(iP,{isOpen:Ge,preprocessingFile:Pn,isPreprocessing:Mn,preprocessingProgress:Oi,onConfirm:ku,onCancel:Nu}),g.jsx(oP,{isOpen:zn,unsupportedFile:ti,onClose:()=>mn(!1)}),g.jsx(aP,{isOpen:nt,oversizedFile:Lr,onClose:()=>_t(!1),onCancel:()=>_t(!1)})]})}const sP="_helpContainer_1wavj_1",lP="_helpSection_1wavj_13",uP="_sectionHeader_1wavj_49",cP="_sectionTitle_1wavj_91",dP="_sectionContent_1wavj_105",fP="_guidelinesList_1wavj_119",hP="_buttonContainer_1wavj_181",dt={helpContainer:sP,helpSection:lP,sectionHeader:uP,sectionTitle:cP,sectionContent:dP,guidelinesList:fP,buttonContainer:hP};function pP(){const e=hs(),{setShowReferenceExamples:n}=Zj(),i=()=>{e("/upload")},o=()=>{n(!0),e("/explore")},s=()=>{e("/analytics?view=crisis_maps")};return g.jsx(Qf,{className:"py-10",children:g.jsx("div",{className:dt.helpContainer,children:g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Introduction"})}),g.jsx("div",{className:dt.sectionContent,children:"In collaboration with the IFRC, PromptAid Vision is a tool that generates textual descriptions of crisis maps/crisis drone images utiliing Visual language models. This prototype is for collecting data for the fine-tuning of our own models. We aim to utilize AI tools to support national societies with rapid decision making during emergencies."}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"upload-now",variant:"secondary",onClick:i,children:"Upload now →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Guidelines"})}),g.jsxs("div",{className:dt.sectionContent,children:["To make the process smoother, please follow the guidelines below:",g.jsxs("ul",{className:dt.guidelinesList,children:[g.jsx("li",{children:"Avoid uploading images that are not crisis maps/crisis drone images."}),g.jsx("li",{children:"Confirm the image details prior to modifying the description."}),g.jsx("li",{children:"Before the modification, please read the description generated and provide a rating via the rating sliders."}),g.jsx("li",{children:'Click the "Submit" button to save the description.'})]})]}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"see-examples",variant:"secondary",onClick:o,children:"See examples →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"VLMs"})}),g.jsx("div",{className:dt.sectionContent,children:"PromptAid Vision uses a variety of Visual Language Models (VLMs). A random VLM is selected for each upload. Therefore feel free to delete and reupload. You can view performance details here:"}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"view-vlm-details",variant:"secondary",onClick:s,children:"View VLM details →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Dataset"})}),g.jsx("div",{className:dt.sectionContent,children:"All users are able to export the dataset. You could apply filters when exporting, and it have the option to organize based on model fine-tuning formats."}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"export-dataset",variant:"secondary",onClick:()=>{n(!1),e("/explore"),setTimeout(()=>{const u=document.querySelector('[name="export-dataset"]');u&&u.click()},100)},children:"Export dataset →"})})]}),g.jsxs("div",{className:dt.helpSection,children:[g.jsx("div",{className:dt.sectionHeader,children:g.jsx(ro,{level:3,className:dt.sectionTitle,children:"Contact us"})}),g.jsx("div",{className:dt.sectionContent,children:"Need help or have questions about PromptAid Vision? Our team is here to support you."}),g.jsx("div",{className:dt.buttonContainer,children:g.jsx(Ue,{name:"contact-support",variant:"secondary",disabled:!0,children:"Get in touch →"})})]})]})})})}const mP=v.createContext(void 0),gP=({children:e})=>{const[n,i]=v.useState(!1),[o,s]=v.useState(!0),u=async()=>{const y=localStorage.getItem("adminToken");if(!y){i(!1),s(!1);return}try{(await fetch("/api/admin/verify",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${y}`}})).ok?i(!0):(localStorage.removeItem("adminToken"),i(!1))}catch(w){console.error("Error verifying admin token:",w),localStorage.removeItem("adminToken"),i(!1)}finally{s(!1)}},d=async y=>{try{const w=await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:y})});if(w.ok){const C=await w.json();return localStorage.setItem("adminToken",C.access_token),i(!0),!0}else return!1}catch(w){return console.error("Login error:",w),!1}},f=()=>{localStorage.removeItem("adminToken"),i(!1)};v.useEffect(()=>{u()},[]);const p={isAuthenticated:n,isLoading:o,login:d,logout:f,verifyToken:u};return g.jsx(mP.Provider,{value:p,children:e})},vP=v.lazy(()=>Qn(()=>import("./index--kE6PMOO.js"),__vite__mapDeps([0,1]))),yP=v.lazy(()=>Qn(()=>import("./index-DYN5AjU6.js"),__vite__mapDeps([2,3,4,5,6]))),wP=v.lazy(()=>Qn(()=>import("./AdminPage-Cm0ZXhfF.js"),__vite__mapDeps([7,3,8]))),xP=v.lazy(()=>Qn(()=>import("./index-Ccygiftu.js"),__vite__mapDeps([9,3,4,5,10])));class CP extends v.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,i){console.error("Error caught by boundary:",n,i)}render(){return this.state.hasError?g.jsxs("div",{style:{padding:"20px",textAlign:"center"},children:[g.jsx("h2",{children:"Something went wrong"}),g.jsx("p",{children:"Please refresh the page to try again."}),g.jsx("button",{onClick:()=>window.location.reload(),children:"Refresh Page"})]}):this.props.children}}const bi=e=>{const n=e();return n.catch(()=>{}),n},SP=()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{bi(()=>Qn(()=>import("./index--kE6PMOO.js"),__vite__mapDeps([0,1]))),bi(()=>Qn(()=>import("./index-DYN5AjU6.js"),__vite__mapDeps([2,3,4,5,6]))),bi(()=>Qn(()=>import("./AdminPage-Cm0ZXhfF.js"),__vite__mapDeps([7,3,8]))),bi(()=>Qn(()=>import("./index-Ccygiftu.js"),__vite__mapDeps([9,3,4,5,10])))}):setTimeout(()=>{bi(()=>Qn(()=>import("./index--kE6PMOO.js"),__vite__mapDeps([0,1]))),bi(()=>Qn(()=>import("./index-DYN5AjU6.js"),__vite__mapDeps([2,3,4,5,6]))),bi(()=>Qn(()=>import("./AdminPage-Cm0ZXhfF.js"),__vite__mapDeps([7,3,8]))),bi(()=>Qn(()=>import("./index-Ccygiftu.js"),__vite__mapDeps([9,3,4,5,10])))},1e3)},bP=vx([{element:g.jsx(LT,{}),children:[{path:"/",element:g.jsx($g,{})},{path:"/upload",element:g.jsx($g,{})},{path:"/analytics",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Analytics..."}),children:g.jsx(vP,{})})},{path:"/explore",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Explore..."}),children:g.jsx(yP,{})})},{path:"/help",element:g.jsx(pP,{})},{path:"/admin",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Admin..."}),children:g.jsx(wP,{})})},{path:"/map/:mapId",element:g.jsx(v.Suspense,{fallback:g.jsx("div",{children:"Loading Map Details..."}),children:g.jsx(xP,{})})}]}],{basename:"/"});function _P(){const[e,n]=v.useState([]);v.useEffect(()=>{SP()},[]);const i=v.useCallback(f=>{n(p=>Bx([...p,f],y=>y.name)??p)},[n]),o=v.useCallback(f=>{n(p=>{const y=p.findIndex(C=>C.name===f);if(y===-1)return p;const w=[...p];return w.splice(y,1),w})},[n]),s=v.useCallback((f,p)=>{n(y=>{const w=y.findIndex(m=>m.name===f);if(w===-1)return y;const C=[...y];return C[w]={...C[w],...p},C})},[n]),u=v.useMemo(()=>({alerts:e,addAlert:i,removeAlert:o,updateAlert:s}),[e,i,o,s]),d=v.useMemo(()=>({languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{},currentLanguage:"en",setCurrentLanguage:()=>{},strings:{},setStrings:()=>{},registerNamespace:()=>{}}),[]);return g.jsx(CP,{children:g.jsx(Fx.Provider,{value:u,children:g.jsx(o0.Provider,{value:d,children:g.jsx(gP,{children:g.jsx(Gj,{children:g.jsx(kx,{router:bP})})})})})})}function EP(){return g.jsx(_P,{})}console.log("React version at runtime:",v.version,"createContext exists?",!!v.createContext);V1.createRoot(document.getElementById("root")).render(g.jsx(v.StrictMode,{children:g.jsx(EP,{})}));export{_C as A,ra as B,TP as C,Zj as D,MP as E,df as F,Qn as G,ro as H,q as I,eo as J,NP as K,_T as L,Xj as M,Qf as N,jt as O,jC as P,DP as Q,c0 as R,TC as S,d0 as T,LP as U,Lg as V,mP as W,kP as X,Bg as Y,Wo as _,$e as a,Lt as b,IP as c,AP as d,jP as e,SC as f,l0 as g,RP as h,OP as i,g as j,fr as k,qx as l,FE as m,Ue as n,Oe as o,Zx as p,Ka as q,v as r,u0 as s,o0 as t,Dx as u,PC as v,MC as w,hs as x,PP as y,dr as z}; diff --git a/py_backend/static/assets/index-hD4RFL5O.js b/py_backend/static/assets/index-hD4RFL5O.js deleted file mode 100644 index 1b5e199f04a343a906492c62bcc09d04ab0e73b6..0000000000000000000000000000000000000000 --- a/py_backend/static/assets/index-hD4RFL5O.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-zGid42TK.js","assets/index-w0OOMPwN.js","assets/index-cCOeofBN.css"])))=>i.map(i=>d[i]); -import{j as t,z as b,n as w,v as Fe,w as De,x as Oe,B as Le,r,D as Me,N as Re,_ as me,L as Je,F as ze,G as We}from"./index-w0OOMPwN.js";import{u as Ue}from"./useAdmin-avReXN15.js";import{F as Be,E as He}from"./ExportModal-C5df6JIW.js";const Ve="_paginatorContainer_1l5ti_1",Ae="_paginationControls_1l5ti_19",ge={paginatorContainer:Ve,paginationControls:Ae};function Ge({currentPage:N,totalPages:u,onPageChange:$,className:z=""}){if(u<=1)return null;const f=(()=>{const h=[];if(u<=5)for(let p=1;p<=u;p++)h.push(p);else{let p=Math.max(1,N-2);const _=Math.min(u,p+5-1);_===u&&(p=Math.max(1,_-5+1));for(let y=p;y<=_;y++)h.push(y)}return h})();return t.jsx("div",{className:`${ge.paginatorContainer} ${z}`,children:t.jsxs("div",{className:ge.paginationControls,children:[t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsxs(w,{name:"prev-page",variant:"tertiary",size:1,onClick:()=>$(Math.max(1,N-1)),disabled:N===1,title:"Previous page",children:[t.jsx(Fe,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Previous"})]})}),t.jsxs("div",{className:"flex items-center gap-1",children:[f[0]>1&&t.jsxs(t.Fragment,{children:[t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx(w,{name:"page-1",variant:"tertiary",size:1,onClick:()=>$(1),children:"1"})}),f[0]>2&&t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx("span",{className:"px-2 text-gray-500",children:"..."})})]}),f.map(h=>t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx(w,{name:`page-${h}`,variant:N===h?"primary":"tertiary",size:1,onClick:()=>$(h),children:h})},h)),f[f.length-1]$(u),children:u})})]})]}),t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsxs(w,{name:"next-page",variant:"tertiary",size:1,onClick:()=>$(Math.min(u,N+1)),disabled:N===u,title:"Next page",children:[t.jsx("span",{className:"hidden sm:inline",children:"Next"}),t.jsx(De,{className:"w-4 h-4"})]})})]})})}const Ze="_tabSelector_o9y1f_1",qe="_metadataTags_o9y1f_8",Ke="_metadataTag_o9y1f_8",Qe="_metadataTagSource_o9y1f_32",Xe="_metadataTagType_o9y1f_43",Ye="_mapItem_o9y1f_54",et="_mapItemImage_o9y1f_72",tt="_mapItemContent_o9y1f_92",at="_mapItemTitle_o9y1f_97",st="_mapItemMetadata_o9y1f_105",it="_fullSizeModalOverlay_o9y1f_134",nt="_fullSizeModalContent_o9y1f_148",lt="_ratingWarningContent_o9y1f_159",rt="_ratingWarningTitle_o9y1f_165",ot="_ratingWarningText_o9y1f_172",ct="_ratingWarningButtons_o9y1f_179",m={tabSelector:Ze,metadataTags:qe,metadataTag:Ke,metadataTagSource:Qe,metadataTagType:Xe,mapItem:Ye,mapItemImage:et,mapItemContent:tt,mapItemTitle:at,mapItemMetadata:st,fullSizeModalOverlay:it,fullSizeModalContent:nt,ratingWarningContent:lt,ratingWarningTitle:rt,ratingWarningText:ot,ratingWarningButtons:ct};function pt(){const N=Oe(),u=Le(),{isAuthenticated:$}=Ue(),[z,Y]=r.useState("explore"),[f,h]=r.useState([]),{search:S,srcFilter:p,catFilter:_,regionFilter:y,countryFilter:E,imageTypeFilter:I,uploadTypeFilter:k,showReferenceExamples:T,setShowReferenceExamples:pe}=Me(),[V,ue]=r.useState([]),[A,fe]=r.useState([]),[ee,he]=r.useState([]),[xe,_e]=r.useState([]),[te,ye]=r.useState([]),[je,ae]=r.useState(!0),[W,se]=r.useState(!0),[Ne,G]=r.useState(!1),[ve,Z]=r.useState(!1),[be,q]=r.useState(!1),[we,U]=r.useState(!1),[B,ie]=r.useState(""),[K,ne]=r.useState(!1),[L,le]=r.useState(1),[M]=r.useState(10),[Q,re]=r.useState(0),[Se,oe]=r.useState(0),Te=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],H=r.useCallback(()=>{se(!0);const e=new URLSearchParams({page:L.toString(),limit:M.toString()});S&&e.append("search",S),p&&e.append("source",p),_&&e.append("event_type",_),y&&e.append("region",y),E&&e.append("country",E),I&&e.append("image_type",I),k&&e.append("upload_type",k),T&&e.append("starred_only","true"),fetch(`/api/images/grouped?${e.toString()}`).then(s=>s.ok?s.json():(console.error("ExplorePage: Grouped endpoint failed, trying legacy endpoint"),fetch("/api/captions/legacy").then(c=>c.ok?c.json():(console.error("ExplorePage: Legacy endpoint failed, trying regular images endpoint"),fetch("/api/images").then(j=>{if(!j.ok)throw new Error(`HTTP ${j.status}: ${j.statusText}`);return j.json()}))))).then(s=>{console.log("ExplorePage: Fetched captions:",s),h(s)}).catch(s=>{console.error("ExplorePage: Error fetching captions:",s),h([])}).finally(()=>{se(!1)})},[L,S,p,_,y,E,I,k,T,M]),ce=r.useCallback(()=>{const e=new URLSearchParams;S&&e.append("search",S),p&&e.append("source",p),_&&e.append("event_type",_),y&&e.append("region",y),E&&e.append("country",E),I&&e.append("image_type",I),k&&e.append("upload_type",k),T&&e.append("starred_only","true"),fetch(`/api/images/grouped/count?${e.toString()}`).then(s=>s.ok?s.json():(console.error("ExplorePage: Count endpoint failed"),{total_count:0})).then(s=>{console.log("ExplorePage: Total count:",s.total_count),re(s.total_count),oe(Math.ceil(s.total_count/M))}).catch(s=>{console.error("ExplorePage: Error fetching total count:",s),re(0),oe(0)})},[S,p,_,y,E,I,k,T,M]);r.useEffect(()=>{H(),ce()},[H,ce]),r.useEffect(()=>{L!==1&&le(1)},[L]),r.useEffect(()=>{const e=()=>{document.hidden||H()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[H]),r.useEffect(()=>{new URLSearchParams(u.search).get("export")==="true"&&(G(!0),N("/explore",{replace:!0}))},[u.search,N,S,p,_,y,E,I,T]),r.useEffect(()=>{ae(!0),Promise.all([fetch("/api/sources").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/regions").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/countries").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/image-types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()})]).then(([e,s,c,j,P])=>{ue(e),fe(s),he(c),_e(j),ye(P)}).catch(()=>{}).finally(()=>{ae(!1)})},[]);const C=f,Ee=async(e,s="fine-tuning")=>{if(e.length===0){alert("No images to export");return}Z(!0),q(!1);try{const c=(await We(async()=>{const{default:i}=await import("./jszip.min-zGid42TK.js").then(F=>F.j);return{default:i}},__vite__mapDeps([0,1,2]))).default,j=new c,P=e.filter(i=>i.image_type==="crisis_map"),R=e.filter(i=>i.image_type==="drone_image");if(P.length>0){const i=j.folder("crisis_maps_dataset"),F=i?.folder("images");if(F){let D=1;for(const a of P)try{const v=a.image_count&&a.image_count>1?a.all_image_ids||[a.image_id]:[a.image_id],X=v.map(async(n,x)=>{try{const l=await fetch(`/api/images/${n}/file`);if(!l.ok)throw new Error(`Failed to fetch image ${n}`);const o=await l.blob(),d=a.file_key.split(".").pop()||"jpg",g=`${String(D).padStart(4,"0")}_${String(x+1).padStart(2,"0")}.${d}`;return F.file(g,o),{success:!0,fileName:g,imageId:n}}catch(l){return console.error(`Failed to process image ${n}:`,l),{success:!1,fileName:"",imageId:n}}}),O=(await Promise.all(X)).filter(n=>n.success);if(O.length>0){if(s==="fine-tuning"){const n=O.map(o=>`images/${o.fileName}`),x=Math.random(),l={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:v,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};if(!i)continue;if(x<.8){const o=i.file("train.jsonl");if(o){const d=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);d.push(l),i.file("train.jsonl",JSON.stringify(d,null,2))}else i.file("train.jsonl",JSON.stringify([l],null,2))}else if(x<.9){const o=i.file("test.jsonl");if(o){const d=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);d.push(l),i.file("test.jsonl",JSON.stringify(d,null,2))}else i.file("test.jsonl",JSON.stringify([l],null,2))}else{const o=i.file("val.jsonl");if(o){const d=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);d.push(l),i.file("val.jsonl",JSON.stringify(d,null,2))}else i.file("val.jsonl",JSON.stringify([l],null,2))}}else{const n=O.map(l=>`images/${l.fileName}`),x={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:v,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};i&&i.file(`${String(D).padStart(4,"0")}.json`,JSON.stringify(x,null,2))}D++}}catch(v){console.error(`Failed to process caption ${a.image_id}:`,v)}}}if(R.length>0){const i=j.folder("drone_images_dataset"),F=i?.folder("images");if(F){let D=1;for(const a of R)try{const v=a.image_count&&a.image_count>1?a.all_image_ids||[a.image_id]:[a.image_id],X=v.map(async(n,x)=>{try{const l=await fetch(`/api/images/${n}/file`);if(!l.ok)throw new Error(`Failed to fetch image ${n}`);const o=await l.blob(),d=a.file_key.split(".").pop()||"jpg",g=`${String(D).padStart(4,"0")}_${String(x+1).padStart(2,"0")}.${d}`;return F.file(g,o),{success:!0,fileName:g,imageId:n}}catch(l){return console.error(`Failed to process image ${n}:`,l),{success:!1,fileName:"",imageId:n}}}),O=(await Promise.all(X)).filter(n=>n.success);if(O.length>0){if(s==="fine-tuning"){const n=O.map(o=>`images/${o.fileName}`),x=Math.random(),l={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:v,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};if(!i)continue;if(x<.8){const o=i.file("train.jsonl");if(o){const d=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);d.push(l),i.file("train.jsonl",JSON.stringify(d,null,2))}else i.file("train.jsonl",JSON.stringify([l],null,2))}else if(x<.9){const o=i.file("test.jsonl");if(o){const d=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);d.push(l),i.file("test.jsonl",JSON.stringify(d,null,2))}else i.file("test.jsonl",JSON.stringify([l],null,2))}else{const o=i.file("val.jsonl");if(o){const d=await o.async("string").then(g=>JSON.parse(g||"[]")).catch(()=>[]);d.push(l),i.file("val.jsonl",JSON.stringify(d,null,2))}else i.file("val.jsonl",JSON.stringify([l],null,2))}}else{const n=O.map(l=>`images/${l.fileName}`),x={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:v,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};i&&i.file(`${String(D).padStart(4,"0")}.json`,JSON.stringify(x,null,2))}D++}}catch(v){console.error(`Failed to process caption ${a.image_id}:`,v)}}}const $e=await j.generateAsync({type:"blob"}),de=URL.createObjectURL($e),J=document.createElement("a");J.href=de,J.download=`datasets_${s}_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(J),J.click(),document.body.removeChild(J),URL.revokeObjectURL(de);const ke=(P.length||0)+(R.length||0);console.log(`Exported ${s} datasets with ${ke} total images:`),P.length>0&&console.log(`- Crisis maps: ${P.length} images`),R.length>0&&console.log(`- Drone images: ${R.length} images`),q(!0)}catch(c){console.error("Export failed:",c),alert("Failed to export dataset. Please try again.")}finally{Z(!1)}},Ie=e=>{ie(e),U(!0)},Ce=async()=>{if(B){ne(!0);try{console.log("Deleting image with ID:",B),(await fetch(`/api/images/${B}`,{method:"DELETE"})).ok?(h(s=>s.filter(c=>c.image_id!==B)),U(!1),ie("")):(console.error("Delete failed"),alert("Failed to delete image. Please try again."))}catch(e){console.error("Delete failed:",e),alert("Failed to delete image. Please try again.")}finally{ne(!1)}}};return t.jsxs(Re,{children:[W?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[60vh]",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsx(me,{className:"text-ifrcRed"}),t.jsx("div",{children:"Loading examples..."})]})}):t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:m.tabSelector,children:[t.jsx(Je,{name:"explore-view",value:z,onChange:e=>{(e==="explore"||e==="mapDetails")&&(Y(e),e==="mapDetails"&&f.length>0&&(f[0]?.image_id&&f[0].image_id!=="undefined"&&f[0].image_id!=="null"?N(`/map/${f[0].image_id}`):console.error("Invalid image_id for navigation:",f[0]?.image_id)))},options:Te,keySelector:e=>e.key,labelSelector:e=>e.label}),t.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsxs(w,{name:"reference-examples",variant:T?"primary":"secondary",onClick:()=>pe(!T),className:"whitespace-nowrap",children:[t.jsx("span",{className:"mr-2",children:T?t.jsx("span",{className:"text-yellow-400",children:"★"}):t.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),t.jsx(w,{name:"export-dataset",variant:"secondary",onClick:()=>G(!0),children:"Export"})]})]}),z==="explore"?t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"mb-6 space-y-4",children:t.jsx("div",{className:"flex flex-wrap items-center gap-4",children:t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:t.jsx(Be,{sources:V,types:A,regions:ee,countries:xe,imageTypes:te,isLoadingFilters:je})})})}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"flex justify-between items-center",children:t.jsxs("p",{className:"text-sm text-gray-600",children:[C.length," of ",Q," examples"]})}),W&&t.jsx("div",{className:"text-center py-12",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsx(me,{className:"text-ifrcRed"}),t.jsx("div",{children:"Loading examples..."})]})}),!W&&t.jsxs("div",{className:"space-y-4",children:[C.map(e=>t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("div",{className:`${m.mapItem} flex-1`,onClick:()=>{console.log("ExplorePage: Clicking on image with ID:",e.image_id),console.log("ExplorePage: Image data:",e),e.image_id&&e.image_id!=="undefined"&&e.image_id!=="null"?(console.log("ExplorePage: Navigating to:",`/map/${e.image_id}`),console.log("ExplorePage: Full navigation URL:",`/#/map/${e.image_id}`),N(`/map/${e.image_id}`)):(console.error("Invalid image_id for navigation:",e.image_id),console.error("Full item data:",JSON.stringify(e,null,2)),alert(`Cannot navigate: Invalid image ID (${e.image_id})`))},children:[t.jsx("div",{className:m.mapItemImage,style:{width:"120px",height:"80px"},children:e.thumbnail_url?t.jsxs(t.Fragment,{children:[console.log("ExplorePage: Using thumbnail for fast loading:",e.thumbnail_url),t.jsx("img",{src:e.thumbnail_url,alt:e.file_key,onError:s=>{console.error("ExplorePage: Thumbnail failed to load, falling back to original:",e.thumbnail_url);const c=s.target;e.image_url?c.src=e.image_url:(c.style.display="none",c.parentElement.innerHTML="Img")},onLoad:()=>console.log("ExplorePage: Thumbnail loaded successfully:",e.thumbnail_url)})]}):e.image_url?t.jsxs(t.Fragment,{children:[console.log("ExplorePage: No thumbnail available, using original image:",e.image_url),t.jsx("img",{src:e.image_url,alt:e.file_key,onError:s=>{console.error("ExplorePage: Original image failed to load:",e.image_url);const c=s.target;c.style.display="none",c.parentElement.innerHTML="Img"},onLoad:()=>console.log("ExplorePage: Original image loaded successfully:",e.image_url)})]}):t.jsxs(t.Fragment,{children:[console.log("ExplorePage: No image_url or thumbnail provided for item:",e),"'Img'"]})}),t.jsxs("div",{className:m.mapItemContent,children:[t.jsx("h3",{className:m.mapItemTitle,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{children:e.title||"Untitled"}),e.starred&&t.jsx("span",{className:"text-red-500 text-lg",title:"Starred image",children:"★"})]})}),t.jsx("div",{className:m.mapItemMetadata,children:t.jsxs("div",{className:m.metadataTags,children:[e.image_type!=="drone_image"&&t.jsx("span",{className:m.metadataTagSource,children:e.source&&e.source.includes(", ")?e.source.split(", ").map(s=>V.find(c=>c.s_code===s.trim())?.label||s.trim()).join(", "):V.find(s=>s.s_code===e.source)?.label||e.source}),t.jsx("span",{className:m.metadataTagType,children:e.event_type&&e.event_type.includes(", ")?e.event_type.split(", ").map(s=>A.find(c=>c.t_code===s.trim())?.label||s.trim()).join(", "):A.find(s=>s.t_code===e.event_type)?.label||e.event_type}),t.jsx("span",{className:m.metadataTag,children:te.find(s=>s.image_type===e.image_type)?.label||e.image_type}),e.image_count&&e.image_count>1&&t.jsxs("span",{className:m.metadataTag,title:`Multi-upload with ${e.image_count} images`,children:["📷 ",e.image_count]}),(!e.image_count||e.image_count<=1)&&t.jsx("span",{className:m.metadataTag,title:"Single Upload",children:"Single"}),e.countries&&e.countries.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:m.metadataTag,children:ee.find(s=>s.r_code===e.countries[0].r_code)?.label||"Unknown Region"}),t.jsx("span",{className:m.metadataTag,children:e.countries.map(s=>s.label).join(", ")})]})]})})]})]}),$&&t.jsx(b,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx(w,{name:`delete-${e.image_id}`,variant:"tertiary",size:1,className:"bg-red-50 hover:bg-red-100 text-red-700 border border-red-200 hover:border-red-300",onClick:()=>Ie(e.image_id),title:"Delete","aria-label":"Delete saved image",children:t.jsx(ze,{className:"w-4 h-4"})})})]},e.image_id)),!C.length&&t.jsx("div",{className:"text-center py-12",children:t.jsx("p",{className:"text-gray-500",children:"No examples found."})}),!W&&C.length>0&&t.jsx(Ge,{currentPage:L,totalPages:Se,totalItems:Q,itemsPerPage:M,onPageChange:le})]})]})]}):t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"text-center py-12",children:[t.jsx("p",{className:"text-gray-500",children:"Map Details view coming soon..."}),t.jsx("p",{className:"text-sm text-gray-400 mt-2",children:"This will show detailed information about individual maps"})]})})]}),we&&t.jsx("div",{className:m.fullSizeModalOverlay,onClick:()=>U(!1),children:t.jsx("div",{className:m.fullSizeModalContent,onClick:e=>e.stopPropagation(),children:t.jsxs("div",{className:m.ratingWarningContent,children:[t.jsx("h3",{className:m.ratingWarningTitle,children:"Delete Image?"}),t.jsx("p",{className:m.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this saved image and all related data?"}),t.jsxs("div",{className:m.ratingWarningButtons,children:[t.jsx(w,{name:"confirm-delete",variant:"secondary",onClick:Ce,disabled:K,children:K?"Deleting...":"Delete"}),t.jsx(w,{name:"cancel-delete",variant:"tertiary",onClick:()=>U(!1),disabled:K,children:"Cancel"})]})]})})}),t.jsx(He,{isOpen:Ne,onClose:()=>{G(!1),q(!1),Z(!1)},onExport:(e,s)=>{const c=C.filter(j=>s.includes(j.image_type));Ee(c,e)},filteredCount:C.length,totalCount:Q,hasFilters:!!(S||p||_||y||E||I||k||T),crisisMapsCount:C.filter(e=>e.image_type==="crisis_map").length,droneImagesCount:C.filter(e=>e.image_type==="drone_image").length,isLoading:ve,exportSuccess:be})]})}export{pt as default}; diff --git a/py_backend/static/assets/jszip.min-zGid42TK.js b/py_backend/static/assets/jszip.min-Du5pcDB6.js similarity index 99% rename from py_backend/static/assets/jszip.min-zGid42TK.js rename to py_backend/static/assets/jszip.min-Du5pcDB6.js index 46537dc5fa69b5c5d0455885937529c21fbe9ab1..b2caabcefd625626529a02a0342eb8db6bb5e0bd 100644 --- a/py_backend/static/assets/jszip.min-zGid42TK.js +++ b/py_backend/static/assets/jszip.min-Du5pcDB6.js @@ -1,4 +1,4 @@ -import{X as bt,Y as It}from"./index-w0OOMPwN.js";function vt(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kt={exports:{}};/*! +import{X as bt,Y as It}from"./index-DuuohOak.js";function vt(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kt={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files diff --git a/py_backend/static/assets/useAdmin-avReXN15.js b/py_backend/static/assets/useAdmin-Cd7hRYKP.js similarity index 65% rename from py_backend/static/assets/useAdmin-avReXN15.js rename to py_backend/static/assets/useAdmin-Cd7hRYKP.js index 6cdc04936d2f2ff046cda7d156b39a43cd38c12d..5b9d8669e3b2f3374b5494df8efd529d1b4de52f 100644 --- a/py_backend/static/assets/useAdmin-avReXN15.js +++ b/py_backend/static/assets/useAdmin-Cd7hRYKP.js @@ -1 +1 @@ -import{r,W as e}from"./index-w0OOMPwN.js";const o=()=>{const t=r.useContext(e);if(t===void 0)throw new Error("useAdmin must be used within an AdminProvider");return t};export{o as u}; +import{r,W as e}from"./index-DuuohOak.js";const o=()=>{const t=r.useContext(e);if(t===void 0)throw new Error("useAdmin must be used within an AdminProvider");return t};export{o as u}; diff --git a/py_backend/static/index.html b/py_backend/static/index.html index 20c8dcaae6b3a3ef585beec4f412867e44be865e..99cedfe60680598fd7f2045b37b05f7436b4646b 100644 --- a/py_backend/static/index.html +++ b/py_backend/static/index.html @@ -42,7 +42,7 @@ }); } - +