@mobielnl/elements 0.13.15 → 0.13.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/elements.umd.cjs
CHANGED
|
@@ -89,7 +89,7 @@ spurious results.`)}}return!1};class GE{constructor(t,r="GraphQL request",n={lin
|
|
|
89
89
|
`))}function Uv(e){var t;return(t=e?.some(r=>r.includes(`
|
|
90
90
|
`)))!==null&&t!==void 0?t:!1}const YE="Accept",Hv="Content-Type",qv="application/json",JE="application/graphql-response+json",XE=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),lq=e=>{const t=e.toLowerCase();return t.includes(JE)||t.includes(qv)},QE=e=>{try{if(Array.isArray(e))return{_tag:"Batch",executionResults:e.map(eT)};if(wp(e))return{_tag:"Single",executionResult:eT(e)};throw new Error(`Invalid execution result: result is not object or array.
|
|
91
91
|
Got:
|
|
92
|
-
${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw new Error("Invalid execution result: result is not object");let t,r,n;if("errors"in e){if(!wp(e.errors)&&!Array.isArray(e.errors))throw new Error("Invalid execution result: errors is not plain object OR array");t=e.errors}if("data"in e){if(!wp(e.data)&&e.data!==null)throw new Error("Invalid execution result: data is not plain object");r=e.data}if("extensions"in e){if(!wp(e.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=e.extensions}return{data:r,errors:t,extensions:n}},uq=e=>e._tag==="Batch"?e.executionResults.some(tT):tT(e.executionResult),tT=e=>Array.isArray(e.errors)?e.errors.length>0:!!e.errors,rT=e=>typeof e=="object"&&e!==null&&"kind"in e&&e.kind===We.OPERATION_DEFINITION,cq=e=>{let t;const r=e.definitions.filter(rT);return r.length===1&&(t=r[0].name?.value),t},dq=e=>{let t=!1;const r=e.definitions.filter(rT);return r.length===1&&(t=r[0].operation==="mutation"),t},Gv=(e,t)=>{const r=typeof e=="string"||"kind"in e?e:String(e),n=typeof r=="string"?r:iq(r);let o=!1,i;if(t)return{expression:n,isMutation:o,operationName:i};const s=gH(()=>typeof r=="string"?YH(r):r);return s instanceof Error?{expression:n,isMutation:o,operationName:i}:(i=cq(s),o=dq(s),{expression:n,operationName:i,isMutation:o})},Zv=JSON,Yv=async e=>{const t={...e,method:e.request._tag==="Single"?e.request.document.isMutation?"POST":DE(e.method??"post"):e.request.hasMutations?"POST":DE(e.method??"post"),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??"none"}},n=await pq(t.method)(t),o=await n.text();let i;try{i=fq(o,n.headers.get(Hv),e.fetchOptions.jsonSerializer??Zv)}catch(a){i=a}const s={status:n.status,headers:n.headers,body:o};if(!n.ok){if(i instanceof Error)return new La({...s},{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables});const a=i._tag==="Batch"?{...i.executionResults,...s}:{...i.executionResult,...s};return new La(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}if(i instanceof Error)throw i;if(uq(i)&&t.fetchOptions.errorPolicy==="none"){const a=i._tag==="Batch"?{...i.executionResults,...s}:{...i.executionResult,...s};return new La(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}switch(i._tag){case"Single":return{...s,...nT(t)(i.executionResult)};case"Batch":return{...s,data:i.executionResults.map(nT(t))};default:Fv(i)}},nT=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy==="all"?t.errors:void 0}),fq=(e,t,r)=>t&&lq(t)?QE(r.parse(e)):QE(e),pq=e=>async t=>{const r=new Headers(t.headers);let n=null,o;r.has(YE)||r.set(YE,[JE,qv].join(", ")),e==="POST"?(o=(t.fetchOptions.jsonSerializer??Zv).stringify(hq(t)),typeof o=="string"&&!r.has(Hv)&&r.set(Hv,qv)):n=mq(t);const i={method:e,headers:r,body:o,...t.fetchOptions};let s=new URL(t.url),a=i;if(t.middleware){const c=await Promise.resolve(t.middleware({...i,url:t.url,operationName:t.request._tag==="Single"?t.request.document.operationName:void 0,variables:t.request.variables})),{url:d,...f}=c;s=new URL(d),a=f}return n&&n.forEach((c,d)=>{s.searchParams.append(d,c)}),await(t.fetch??fetch)(s,a)},hq=e=>{switch(e.request._tag){case"Single":return{query:e.request.document.expression,variables:e.request.variables,operationName:e.request.document.operationName};case"Batch":return ME(e.request.query,e.request.variables??[]).map(([t,r])=>({query:t,variables:r}));default:throw Fv(e.request)}},mq=e=>{const t=e.fetchOptions.jsonSerializer??Zv,r=new URLSearchParams;switch(e.request._tag){case"Single":return r.append("query",XE(e.request.document.expression)),e.request.variables&&r.append("variables",t.stringify(e.request.variables)),e.request.document.operationName&&r.append("operationName",e.request.document.operationName),r;case"Batch":{const n=e.request.variables?.map(s=>t.stringify(s))??[],o=e.request.query.map(XE),i=ME(o,n).map(([s,a])=>({query:s,variables:a}));return r.append("query",t.stringify(i)),r}default:throw Fv(e.request)}};class gq{url;requestConfig;constructor(t,r={}){this.url=t,this.requestConfig=r}rawRequest=async(...t)=>{const[r,n,o]=t,i=yH(r,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:f,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=Gv(i.query,f),y=await Yv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Zl(Lv(s)),...Zl(i.requestHeaders)},fetch:a,method:l,fetchOptions:m,middleware:c});if(d&&await d(y,{operationName:b.operationName,variables:n,url:this.url}),y instanceof Error)throw y;return y};async request(t,...r){const[n,o]=r,i=bq(t,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:f,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=Gv(i.document,f),y=await Yv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Zl(Lv(s)),...Zl(i.requestHeaders)},fetch:a,method:l,fetchOptions:m,middleware:c});if(d&&await d(y,{operationName:b.operationName,variables:i.variables,url:this.url}),y instanceof Error)throw y;return y.data}async batchRequests(t,r){const n=vH(t,r),{headers:o,excludeOperationName:i,...s}=this.requestConfig;n.signal!==void 0&&(s.signal=n.signal);const a=n.documents.map(({document:m})=>Gv(m,i)),l=a.map(({expression:m})=>m),c=a.some(({isMutation:m})=>m),d=n.documents.map(({variables:m})=>m),f=await Yv({url:this.url,request:{_tag:"Batch",operationName:void 0,query:l,hasMutations:c,variables:d},headers:{...Zl(Lv(o)),...Zl(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(f,{operationName:void 0,variables:d,url:this.url}),f instanceof Error)throw f;return f.data}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const bq=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},
|
|
92
|
+
${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw new Error("Invalid execution result: result is not object");let t,r,n;if("errors"in e){if(!wp(e.errors)&&!Array.isArray(e.errors))throw new Error("Invalid execution result: errors is not plain object OR array");t=e.errors}if("data"in e){if(!wp(e.data)&&e.data!==null)throw new Error("Invalid execution result: data is not plain object");r=e.data}if("extensions"in e){if(!wp(e.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=e.extensions}return{data:r,errors:t,extensions:n}},uq=e=>e._tag==="Batch"?e.executionResults.some(tT):tT(e.executionResult),tT=e=>Array.isArray(e.errors)?e.errors.length>0:!!e.errors,rT=e=>typeof e=="object"&&e!==null&&"kind"in e&&e.kind===We.OPERATION_DEFINITION,cq=e=>{let t;const r=e.definitions.filter(rT);return r.length===1&&(t=r[0].name?.value),t},dq=e=>{let t=!1;const r=e.definitions.filter(rT);return r.length===1&&(t=r[0].operation==="mutation"),t},Gv=(e,t)=>{const r=typeof e=="string"||"kind"in e?e:String(e),n=typeof r=="string"?r:iq(r);let o=!1,i;if(t)return{expression:n,isMutation:o,operationName:i};const s=gH(()=>typeof r=="string"?YH(r):r);return s instanceof Error?{expression:n,isMutation:o,operationName:i}:(i=cq(s),o=dq(s),{expression:n,operationName:i,isMutation:o})},Zv=JSON,Yv=async e=>{const t={...e,method:e.request._tag==="Single"?e.request.document.isMutation?"POST":DE(e.method??"post"):e.request.hasMutations?"POST":DE(e.method??"post"),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??"none"}},n=await pq(t.method)(t),o=await n.text();let i;try{i=fq(o,n.headers.get(Hv),e.fetchOptions.jsonSerializer??Zv)}catch(a){i=a}const s={status:n.status,headers:n.headers,body:o};if(!n.ok){if(i instanceof Error)return new La({...s},{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables});const a=i._tag==="Batch"?{...i.executionResults,...s}:{...i.executionResult,...s};return new La(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}if(i instanceof Error)throw i;if(uq(i)&&t.fetchOptions.errorPolicy==="none"){const a=i._tag==="Batch"?{...i.executionResults,...s}:{...i.executionResult,...s};return new La(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}switch(i._tag){case"Single":return{...s,...nT(t)(i.executionResult)};case"Batch":return{...s,data:i.executionResults.map(nT(t))};default:Fv(i)}},nT=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy==="all"?t.errors:void 0}),fq=(e,t,r)=>t&&lq(t)?QE(r.parse(e)):QE(e),pq=e=>async t=>{const r=new Headers(t.headers);let n=null,o;r.has(YE)||r.set(YE,[JE,qv].join(", ")),e==="POST"?(o=(t.fetchOptions.jsonSerializer??Zv).stringify(hq(t)),typeof o=="string"&&!r.has(Hv)&&r.set(Hv,qv)):n=mq(t);const i={method:e,headers:r,body:o,...t.fetchOptions};let s=new URL(t.url),a=i;if(t.middleware){const c=await Promise.resolve(t.middleware({...i,url:t.url,operationName:t.request._tag==="Single"?t.request.document.operationName:void 0,variables:t.request.variables})),{url:d,...f}=c;s=new URL(d),a=f}return n&&n.forEach((c,d)=>{s.searchParams.append(d,c)}),await(t.fetch??fetch)(s,a)},hq=e=>{switch(e.request._tag){case"Single":return{query:e.request.document.expression,variables:e.request.variables,operationName:e.request.document.operationName};case"Batch":return ME(e.request.query,e.request.variables??[]).map(([t,r])=>({query:t,variables:r}));default:throw Fv(e.request)}},mq=e=>{const t=e.fetchOptions.jsonSerializer??Zv,r=new URLSearchParams;switch(e.request._tag){case"Single":return r.append("query",XE(e.request.document.expression)),e.request.variables&&r.append("variables",t.stringify(e.request.variables)),e.request.document.operationName&&r.append("operationName",e.request.document.operationName),r;case"Batch":{const n=e.request.variables?.map(s=>t.stringify(s))??[],o=e.request.query.map(XE),i=ME(o,n).map(([s,a])=>({query:s,variables:a}));return r.append("query",t.stringify(i)),r}default:throw Fv(e.request)}};class gq{url;requestConfig;constructor(t,r={}){this.url=t,this.requestConfig=r}rawRequest=async(...t)=>{const[r,n,o]=t,i=yH(r,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:f,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=Gv(i.query,f),y=await Yv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Zl(Lv(s)),...Zl(i.requestHeaders)},fetch:a,method:l,fetchOptions:m,middleware:c});if(d&&await d(y,{operationName:b.operationName,variables:n,url:this.url}),y instanceof Error)throw y;return y};async request(t,...r){const[n,o]=r,i=bq(t,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:f,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=Gv(i.document,f),y=await Yv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Zl(Lv(s)),...Zl(i.requestHeaders)},fetch:a,method:l,fetchOptions:m,middleware:c});if(d&&await d(y,{operationName:b.operationName,variables:i.variables,url:this.url}),y instanceof Error)throw y;return y.data}async batchRequests(t,r){const n=vH(t,r),{headers:o,excludeOperationName:i,...s}=this.requestConfig;n.signal!==void 0&&(s.signal=n.signal);const a=n.documents.map(({document:m})=>Gv(m,i)),l=a.map(({expression:m})=>m),c=a.some(({isMutation:m})=>m),d=n.documents.map(({variables:m})=>m),f=await Yv({url:this.url,request:{_tag:"Batch",operationName:void 0,query:l,hasMutations:c,variables:d},headers:{...Zl(Lv(o)),...Zl(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(f,{operationName:void 0,variables:d,url:this.url}),f instanceof Error)throw f;return f.data}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const bq=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},ft=(e,...t)=>e.reduce((r,n,o)=>`${r}${n}${o in t?String(t[o]):""}`,"");let oT;function vq(){const e={"MobielNl-Application":"elements-client"},t="https://graph.mobiel.nl/api";return oT=new gq(t,{headers:e}),oT}function Jv(e,t={}){return vq().request(e,t)}function nn([e,t]){return Jv(e,t)}function Yn(e){return(t,r,n)=>{const o=x.useRef(void 0),i=e(t,r,n);x.useEffect(()=>{i.data!==void 0&&(o.current=i.data)},[i.data]);const s=x.useCallback(()=>{o.current=void 0},[]),a=i.data===void 0?o.current:i.data,l=i.data===void 0&&o.current!==void 0;return Object.assign({},i,{data:a,isSticky:l,resetSticky:s})}}const Xv=ft`
|
|
93
93
|
fragment PhoneSelectorPhone on Product {
|
|
94
94
|
slug
|
|
95
95
|
fullName
|
|
@@ -171,7 +171,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
`,yq=
|
|
174
|
+
`,yq=ft`
|
|
175
175
|
${Xv}
|
|
176
176
|
|
|
177
177
|
query phoneSelectorPhones($brand: Value) {
|
|
@@ -188,7 +188,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
`;function xq(e){const{data:t,error:r,isLoading:n}=Vo(e&&e!=="popular"?[yq,{brand:e}]:null,{use:[Yn],fetcher:nn});return{phones:t?.searchProducts?.records||[],isLoading:n,error:r}}const wq=
|
|
191
|
+
`;function xq(e){const{data:t,error:r,isLoading:n}=Vo(e&&e!=="popular"?[yq,{brand:e}]:null,{use:[Yn],fetcher:nn});return{phones:t?.searchProducts?.records||[],isLoading:n,error:r}}const wq=ft`
|
|
192
192
|
query phoneSelectorBrands {
|
|
193
193
|
searchBrands(query: {
|
|
194
194
|
where: [
|
|
@@ -203,7 +203,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
`,Cq=
|
|
206
|
+
`,Cq=ft`
|
|
207
207
|
${Xv}
|
|
208
208
|
|
|
209
209
|
query phoneSelectorPopularPhones {
|
|
@@ -223,7 +223,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
223
223
|
`;function Sq(){const{data:e,error:t,isLoading:r}=Vo([wq],{use:[Yn],fetcher:nn}),{data:n,error:o,isLoading:i}=Vo([Cq],{use:[Yn],fetcher:nn}),s=e?.searchBrands.records.sort((l,c)=>l.rankingConnected-c.rankingConnected)||[];return{popularPhones:n?.searchProducts?.records||[],brands:s,isLoading:r||i,error:t||o}}const iT=new WeakMap;function Tp(e,t,r){if(!e)return"";typeof t=="string"&&(t=t.replace(/\s+/g,""));let n=iT.get(e);return process.env.NODE_ENV!=="production"&&!n&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${n}-${r}-${t}`}function Qv(e){return OF()?e.altKey:e.ctrlKey}function Ap(e,t){var r,n;let o=`[data-key="${CSS.escape(String(t))}"]`,i=(r=e.current)===null||r===void 0?void 0:r.dataset.collection;return i&&(o=`[data-collection="${CSS.escape(i)}"]${o}`),(n=e.current)===null||n===void 0?void 0:n.querySelector(o)}const sT=new WeakMap;function kq(e){let t=rn();return sT.set(e,t),t}function Pq(e){return sT.get(e)}const Eq=1e3;function aT(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:n}=e,o=x.useRef({search:"",timeout:void 0}).current,i=s=>{let a=Tq(s.key);if(!(!a||s.ctrlKey||s.metaKey||!s.currentTarget.contains(s.target)||o.search.length===0&&a===" ")){if(a===" "&&o.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),o.search+=a,t.getKeyForSearch!=null){let l=t.getKeyForSearch(o.search,r.focusedKey);l==null&&(l=t.getKeyForSearch(o.search)),l!=null&&(r.setFocusedKey(l),n&&n(l))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},Eq)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:void 0}}}function Tq(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function e0(e){let{selectionManager:t,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:s=!1,disallowSelectAll:a=!1,escapeKeyBehavior:l="clearSelection",selectOnFocus:c=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:m=!1,isVirtualized:g,scrollRef:b=n,linkBehavior:y="action"}=e,{direction:v}=jn(),C=Xu(),S=B=>{var U;if(B.altKey&&B.key==="Tab"&&B.preventDefault(),!(!((U=n.current)===null||U===void 0)&&U.contains(B.target)))return;const W=(te,ge)=>{if(te!=null){if(t.isLink(te)&&y==="selection"&&c&&!Qv(B)){ds.flushSync(()=>{t.setFocusedKey(te,ge)});let Se=Ap(n,te),pe=t.getItemProps(te);Se&&C.open(Se,B,pe.href,pe.routerOptions);return}if(t.setFocusedKey(te,ge),t.isLink(te)&&y==="override")return;B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(te):c&&!Qv(B)&&t.replaceSelection(te)}};switch(B.key){case"ArrowDown":if(r.getKeyBelow){var L,Z,T;let te=t.focusedKey!=null?(L=r.getKeyBelow)===null||L===void 0?void 0:L.call(r,t.focusedKey):(Z=r.getFirstKey)===null||Z===void 0?void 0:Z.call(r);te==null&&i&&(te=(T=r.getFirstKey)===null||T===void 0?void 0:T.call(r,t.focusedKey)),te!=null&&(B.preventDefault(),W(te))}break;case"ArrowUp":if(r.getKeyAbove){var F,_,H;let te=t.focusedKey!=null?(F=r.getKeyAbove)===null||F===void 0?void 0:F.call(r,t.focusedKey):(_=r.getLastKey)===null||_===void 0?void 0:_.call(r);te==null&&i&&(te=(H=r.getLastKey)===null||H===void 0?void 0:H.call(r,t.focusedKey)),te!=null&&(B.preventDefault(),W(te))}break;case"ArrowLeft":if(r.getKeyLeftOf){var Y,X,oe;let te=t.focusedKey!=null?(Y=r.getKeyLeftOf)===null||Y===void 0?void 0:Y.call(r,t.focusedKey):null;te==null&&i&&(te=v==="rtl"?(X=r.getFirstKey)===null||X===void 0?void 0:X.call(r,t.focusedKey):(oe=r.getLastKey)===null||oe===void 0?void 0:oe.call(r,t.focusedKey)),te!=null&&(B.preventDefault(),W(te,v==="rtl"?"first":"last"))}break;case"ArrowRight":if(r.getKeyRightOf){var Q,le,ue;let te=t.focusedKey!=null?(Q=r.getKeyRightOf)===null||Q===void 0?void 0:Q.call(r,t.focusedKey):null;te==null&&i&&(te=v==="rtl"?(le=r.getLastKey)===null||le===void 0?void 0:le.call(r,t.focusedKey):(ue=r.getFirstKey)===null||ue===void 0?void 0:ue.call(r,t.focusedKey)),te!=null&&(B.preventDefault(),W(te,v==="rtl"?"last":"first"))}break;case"Home":if(r.getFirstKey){if(t.focusedKey===null&&B.shiftKey)return;B.preventDefault();let te=r.getFirstKey(t.focusedKey,Al(B));t.setFocusedKey(te),te!=null&&(Al(B)&&B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(te):c&&t.replaceSelection(te))}break;case"End":if(r.getLastKey){if(t.focusedKey===null&&B.shiftKey)return;B.preventDefault();let te=r.getLastKey(t.focusedKey,Al(B));t.setFocusedKey(te),te!=null&&(Al(B)&&B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(te):c&&t.replaceSelection(te))}break;case"PageDown":if(r.getKeyPageBelow&&t.focusedKey!=null){let te=r.getKeyPageBelow(t.focusedKey);te!=null&&(B.preventDefault(),W(te))}break;case"PageUp":if(r.getKeyPageAbove&&t.focusedKey!=null){let te=r.getKeyPageAbove(t.focusedKey);te!=null&&(B.preventDefault(),W(te))}break;case"a":Al(B)&&t.selectionMode==="multiple"&&a!==!0&&(B.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(B.stopPropagation(),B.preventDefault(),t.clearSelection());break;case"Tab":if(!m){if(B.shiftKey)n.current.focus();else{let te=Gn(n.current,{tabbable:!0}),ge,Se;do Se=te.lastChild(),Se&&(ge=Se);while(Se);ge&&(!ge.contains(document.activeElement)||document.activeElement&&!wS(document.activeElement))&&fo(ge)}break}}},k=x.useRef({top:0,left:0});lf(b,"scroll",g?void 0:()=>{var B,U,W,L;k.current={top:(W=(B=b.current)===null||B===void 0?void 0:B.scrollTop)!==null&&W!==void 0?W:0,left:(L=(U=b.current)===null||U===void 0?void 0:U.scrollLeft)!==null&&L!==void 0?L:0}});let P=B=>{if(t.isFocused){B.currentTarget.contains(B.target)||t.setFocused(!1);return}if(B.currentTarget.contains(B.target)){if(t.setFocused(!0),t.focusedKey==null){var U,W;let T=_=>{_!=null&&(t.setFocusedKey(_),c&&!t.isSelected(_)&&t.replaceSelection(_))},F=B.relatedTarget;var L,Z;F&&B.currentTarget.compareDocumentPosition(F)&Node.DOCUMENT_POSITION_FOLLOWING?T((L=t.lastSelectedKey)!==null&&L!==void 0?L:(U=r.getLastKey)===null||U===void 0?void 0:U.call(r)):T((Z=t.firstSelectedKey)!==null&&Z!==void 0?Z:(W=r.getFirstKey)===null||W===void 0?void 0:W.call(r))}else!g&&b.current&&(b.current.scrollTop=k.current.top,b.current.scrollLeft=k.current.left);if(t.focusedKey!=null&&b.current){let T=Ap(n,t.focusedKey);T instanceof HTMLElement&&(!T.contains(document.activeElement)&&!f&&fo(T),fc()==="keyboard"&&xs(T,{containingElement:n.current}))}}},E=B=>{B.currentTarget.contains(B.relatedTarget)||t.setFocused(!1)},$=x.useRef(!1);lf(n,JF,f?B=>{let{detail:U}=B;B.stopPropagation(),t.setFocused(!0),U?.focusStrategy==="first"&&($.current=!0)}:void 0),mS(()=>{if($.current){var B,U;let W=(U=(B=r.getFirstKey)===null||B===void 0?void 0:B.call(r))!==null&&U!==void 0?U:null;if(W==null){let L=cn();a3(n.current),l3(L,null),t.collection.size>0&&($.current=!1)}else t.setFocusedKey(W),$.current=!1}},[t.collection]),mS(()=>{t.collection.size>0&&($.current=!1)},[t.focusedKey]),lf(n,YF,f?B=>{var U;B.stopPropagation(),t.setFocused(!1),!((U=B.detail)===null||U===void 0)&&U.clearFocusKey&&t.setFocusedKey(null)}:void 0);const O=x.useRef(o),N=x.useRef(!1);x.useEffect(()=>{if(O.current){var B,U;let Z=null;var W;o==="first"&&(Z=(W=(B=r.getFirstKey)===null||B===void 0?void 0:B.call(r))!==null&&W!==void 0?W:null);var L;o==="last"&&(Z=(L=(U=r.getLastKey)===null||U===void 0?void 0:U.call(r))!==null&&L!==void 0?L:null);let T=t.selectedKeys;if(T.size){for(let F of T)if(t.canSelectItem(F)){Z=F;break}}t.setFocused(!0),t.setFocusedKey(Z),Z==null&&!f&&n.current&&wn(n.current),t.collection.size>0&&(O.current=!1,N.current=!0)}});let D=x.useRef(t.focusedKey),M=x.useRef(null);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==D.current||N.current)&&b.current&&n.current){let B=fc(),U=Ap(n,t.focusedKey);if(!(U instanceof HTMLElement))return;(B==="keyboard"||N.current)&&(M.current&&cancelAnimationFrame(M.current),M.current=requestAnimationFrame(()=>{b.current&&(vS(b.current,U),B!=="virtual"&&xs(U,{containingElement:n.current}))}))}!f&&t.isFocused&&t.focusedKey==null&&D.current!=null&&n.current&&wn(n.current),D.current=t.focusedKey,N.current=!1}),x.useEffect(()=>()=>{M.current&&cancelAnimationFrame(M.current)},[]),lf(n,"react-aria-focus-scope-restore",B=>{B.preventDefault(),t.setFocused(!0)});let V={onKeyDown:S,onFocus:P,onBlur:E,onMouseDown(B){b.current===B.target&&B.preventDefault()}},{typeSelectProps:R}=aT({keyboardDelegate:r,selectionManager:t});d||(V=it(R,V));let K;f||(K=t.focusedKey==null?0:-1);let j=kq(t.collection);return{collectionProps:it(V,{tabIndex:K,"data-collection":j})}}function _p(e){let{id:t,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:s,focus:a,isDisabled:l,onAction:c,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=e,m=Xu();t=rn(t);let g=T=>{if(T.pointerType==="keyboard"&&Qv(T))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(f==="selection"&&o.current){let F=r.getItemProps(n);m.open(o.current,T,F.href,F.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(f==="override"||f==="none")return}r.selectionMode==="single"?r.isSelected(n)&&!r.disallowEmptySelection?r.toggleSelection(n):r.replaceSelection(n):T&&T.shiftKey?r.extendSelection(n):r.selectionBehavior==="toggle"||T&&(Al(T)||T.pointerType==="touch"||T.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};x.useEffect(()=>{n===r.focusedKey&&r.isFocused&&(s?a3(o.current):a?a():document.activeElement!==o.current&&o.current&&wn(o.current))},[o,n,r.focusedKey,r.childFocusStrategy,r.isFocused,s]),l=l||r.isDisabled(n);let b={};!s&&!l?b={tabIndex:n===r.focusedKey?0:-1,onFocus(T){T.target===o.current&&r.setFocusedKey(n)}}:l&&(b.onMouseDown=T=>{T.preventDefault()});let y=r.isLink(n)&&f==="override",v=c&&e.UNSTABLE_itemBehavior==="action",C=r.isLink(n)&&f!=="selection"&&f!=="none",S=!l&&r.canSelectItem(n)&&!y&&!v,k=(c||C)&&!l,P=k&&(r.selectionBehavior==="replace"?!S:!S||r.isEmpty),E=k&&S&&r.selectionBehavior==="replace",$=P||E,O=x.useRef(null),N=$&&S,D=x.useRef(!1),M=x.useRef(!1),V=r.getItemProps(n),R=T=>{if(c){var F;c(),(F=o.current)===null||F===void 0||F.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))}C&&o.current&&m.open(o.current,T,V.href,V.routerOptions)},K={ref:o};if(i?(K.onPressStart=T=>{O.current=T.pointerType,D.current=N,T.pointerType==="keyboard"&&(!$||uT())&&g(T)},d?(K.onPressUp=P?void 0:T=>{T.pointerType==="mouse"&&S&&g(T)},K.onPress=P?R:T=>{T.pointerType!=="keyboard"&&T.pointerType!=="mouse"&&S&&g(T)}):K.onPress=T=>{if(P||E&&T.pointerType!=="mouse"){if(T.pointerType==="keyboard"&&!lT())return;R(T)}else T.pointerType!=="keyboard"&&S&&g(T)}):(K.onPressStart=T=>{O.current=T.pointerType,D.current=N,M.current=P,S&&(T.pointerType==="mouse"&&!P||T.pointerType==="keyboard"&&(!k||uT()))&&g(T)},K.onPress=T=>{(T.pointerType==="touch"||T.pointerType==="pen"||T.pointerType==="virtual"||T.pointerType==="keyboard"&&$&&lT()||T.pointerType==="mouse"&&M.current)&&($?R(T):S&&g(T))}),b["data-collection"]=Pq(r.collection),b["data-key"]=n,K.preventFocusOnPress=s,s&&(K=it(K,{onPressStart(T){T.pointerType!=="touch"&&(r.setFocused(!0),r.setFocusedKey(n))},onPress(T){T.pointerType==="touch"&&(r.setFocused(!0),r.setFocusedKey(n))}})),V)for(let T of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])V[T]&&(K[T]=gs(K[T],V[T]));let{pressProps:j,isPressed:B}=xn(K),U=E?T=>{O.current==="mouse"&&(T.stopPropagation(),T.preventDefault(),R(T))}:void 0,{longPressProps:W}=e3({isDisabled:!N,onLongPress(T){T.pointerType==="touch"&&(g(T),r.setSelectionBehavior("toggle"))}}),L=T=>{O.current==="touch"&&D.current&&T.preventDefault()},Z=f!=="none"&&r.isLink(n)?T=>{ji.isOpening||T.preventDefault()}:void 0;return{itemProps:it(b,S||P||s&&!l?j:{},N?W:{},{onDoubleClick:U,onDragStartCapture:L,onClick:Z,id:t},s?{onMouseDown:T=>T.preventDefault()}:void 0),isPressed:B,isSelected:r.isSelected(n),isFocused:r.isFocused&&r.focusedKey===n,isDisabled:l,allowsSelection:S,hasAction:$}}function lT(){let e=window.event;return e?.key==="Enter"}function uT(){let e=window.event;return e?.key===" "||e?.code==="Space"}let t0=class{getItemRect(t){let r=this.ref.current;if(!r)return null;let n=t!=null?Ap(this.ref,t):null;if(!n)return null;let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left-r.clientLeft+r.scrollLeft,y:i.top-o.top-r.clientTop+r.scrollTop,width:i.width,height:i.height}}getContentSize(){let t=this.ref.current;var r,n;return{width:(r=t?.scrollWidth)!==null&&r!==void 0?r:0,height:(n=t?.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let t=this.ref.current;var r,n,o,i;return{x:(r=t?.scrollLeft)!==null&&r!==void 0?r:0,y:(n=t?.scrollTop)!==null&&n!==void 0?n:0,width:(o=t?.clientWidth)!==null&&o!==void 0?o:0,height:(i=t?.clientHeight)!==null&&i!==void 0?i:0}}constructor(t){this.ref=t}},cT=class{isDisabled(t){var r;return this.disabledBehavior==="all"&&(((r=t.props)===null||r===void 0?void 0:r.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,r){let n=t;for(;n!=null;){let o=this.collection.getItem(n);if(o?.type==="item"&&!this.isDisabled(o))return n;n=r(n)}return null}getNextKey(t){let r=t;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,n=>this.collection.getKeyAfter(n))}getPreviousKey(t){let r=t;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,n=>this.collection.getKeyBefore(n))}findKey(t,r,n){let o=t,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let s=i;do{if(o=r(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(s,i)&&o!=null);return o}isSameRow(t,r){return t.y===r.y||t.x!==r.x}isSameColumn(t,r){return t.x===r.x||t.y!==r.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,r=>this.getNextKey(r),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,r=>this.getPreviousKey(r),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,r){return r?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(t=this.layoutDelegate[r](t),this.findNextNonDisabled(t,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(t=this.layoutDelegate[r](t),this.findNextNonDisabled(t,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,r=>this.collection.getKeyAfter(r))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,r=>this.collection.getKeyBefore(r))}getKeyPageAbove(t){let r=this.ref.current,n=this.layoutDelegate.getItemRect(t);if(!n)return null;if(r&&!Tl(r))return this.getFirstKey();let o=t;if(this.orientation==="horizontal"){let i=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(t){let r=this.ref.current,n=this.layoutDelegate.getItemRect(t);if(!n)return null;if(r&&!Tl(r))return this.getLastKey();let o=t;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(t,r){if(!this.collator)return null;let n=this.collection,o=r||this.getFirstKey();for(;o!=null;){let i=n.getItem(o);if(!i)return null;let s=i.textValue.slice(0,t.length);if(i.textValue&&this.collator.compare(s,t)===0)return o;o=this.getNextKey(o)}return null}constructor(...t){if(t.length===1){let r=t[0];this.collection=r.collection,this.ref=r.ref,this.collator=r.collator,this.disabledKeys=r.disabledKeys||new Set,this.disabledBehavior=r.disabledBehavior||"all",this.orientation=r.orientation||"vertical",this.direction=r.direction,this.layout=r.layout||"stack",this.layoutDelegate=r.layoutDelegate||new t0(r.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new t0(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function Aq(e){let{selectionManager:t,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:s}=e,a=ff({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,c=x.useMemo(()=>i||new cT({collection:r,disabledKeys:n,disabledBehavior:l,ref:o,collator:a,layoutDelegate:s}),[i,s,r,n,o,a,l]),{collectionProps:d}=e0({...e,ref:o,selectionManager:t,keyboardDelegate:c});return{listProps:d}}function _q(e,t,r){let{key:n,isDisabled:o,shouldSelectOnPressUp:i}=e,{selectionManager:s,selectedKey:a}=t,l=n===a,c=o||t.isDisabled||t.selectionManager.isDisabled(n),{itemProps:d,isPressed:f}=_p({selectionManager:s,key:n,ref:r,isDisabled:c,shouldSelectOnPressUp:i,linkBehavior:"selection"}),m=Tp(t,n,"tab"),g=Tp(t,n,"tabpanel"),{tabIndex:b}=d,y=t.collection.getItem(n),v=Ln(y?.props,{labelable:!0});delete v.id;let C=vg(y?.props),{focusableProps:S}=Bi({isDisabled:c},r);return{tabProps:it(v,S,C,d,{id:m,"aria-selected":l,"aria-disabled":c||void 0,"aria-controls":l?g:void 0,tabIndex:c?void 0:b,role:"tab"}),isSelected:l,isDisabled:c,isPressed:f}}function $q(e,t,r){let n=s3(r)?void 0:0;var o;const i=Tp(t,(o=e.id)!==null&&o!==void 0?o:t?.selectedKey,"tabpanel"),s=sf({...e,id:i,"aria-labelledby":Tp(t,t?.selectedKey,"tab")});return{tabPanelProps:it(s,{tabIndex:n,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class Iq{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}isDisabled(t){var r,n;return this.disabledKeys.has(t)||!!(!((n=this.collection.getItem(t))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(t)}getNextKey(t){let r=t;do r=this.collection.getKeyAfter(r),r==null&&(r=this.collection.getFirstKey());while(r!=null&&this.isDisabled(r));return r}getPreviousKey(t){let r=t;do r=this.collection.getKeyBefore(r),r==null&&(r=this.collection.getLastKey());while(r!=null&&this.isDisabled(r));return r}constructor(t,r,n,o=new Set){this.collection=t,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=o,this.tabDirection=n==="horizontal"}}function Nq(e,t,r){let{orientation:n="horizontal",keyboardActivation:o="automatic"}=e,{collection:i,selectionManager:s,disabledKeys:a}=t,{direction:l}=jn(),c=x.useMemo(()=>new Iq(i,l,n,a),[i,a,n,l]),{collectionProps:d}=e0({ref:r,selectionManager:s,keyboardDelegate:c,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),f=rn();iT.set(t,f);let m=sf({...e,id:f});return{tabListProps:{...it(d,m),role:"tablist","aria-orientation":n,tabIndex:void 0}}}var dT=Xe((e,t)=>{var r,n;const{as:o,tabKey:i,destroyInactiveTabPanel:s,state:a,className:l,slots:c,classNames:d,...f}=e,m=o||"div",g=ot(t),{tabPanelProps:b}=$q({...e,id:String(i)},a,g),{focusProps:y,isFocused:v,isFocusVisible:C}=Ir(),S=a.selectedItem,k=a.collection.getItem(i).props.children,P=A(d?.panel,l,(r=S?.props)==null?void 0:r.className),E=i===S?.key;return!k||!E&&s?null:h.jsx(m,{ref:g,"data-focus":v,"data-focus-visible":C,"data-inert":E?void 0:"true",inert:uj(!E),...E&&Oe(b,y,f),className:(n=c.panel)==null?void 0:n.call(c,{class:P}),"data-slot":"panel",children:k})});dT.displayName="HeroUI.TabPanel";var Dq=dT;const fT=e=>typeof e=="object"&&e!=null&&e.nodeType===1,pT=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",$p=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return pT(r.overflowY,t)||pT(r.overflowX,t)||(n=>{const o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},Ip=(e,t,r,n,o,i,s,a)=>i<e&&s>t||i>e&&s<t?0:i<=e&&a<=r||s>=t&&a>=r?i-e-n:s>t&&a<r||i<e&&a>r?s-t+o:0,Mq=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},hT=(e,t)=>{var r,n,o,i;if(typeof document>"u")return[];const{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:d}=t,f=typeof c=="function"?c:U=>U!==c;if(!fT(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,g=[];let b=e;for(;fT(b)&&f(b);){if(b=Mq(b),b===m){g.push(b);break}b!=null&&b===document.body&&$p(b)&&!$p(document.documentElement)||b!=null&&$p(b,d)&&g.push(b)}const y=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,{scrollX:C,scrollY:S}=window,{height:k,width:P,top:E,right:$,bottom:O,left:N}=e.getBoundingClientRect(),{top:D,right:M,bottom:V,left:R}=(U=>{const W=window.getComputedStyle(U);return{top:parseFloat(W.scrollMarginTop)||0,right:parseFloat(W.scrollMarginRight)||0,bottom:parseFloat(W.scrollMarginBottom)||0,left:parseFloat(W.scrollMarginLeft)||0}})(e);let K=a==="start"||a==="nearest"?E-D:a==="end"?O+V:E+k/2-D+V,j=l==="center"?N+P/2-R+M:l==="end"?$+M:N-R;const B=[];for(let U=0;U<g.length;U++){const W=g[U],{height:L,width:Z,top:T,right:F,bottom:_,left:H}=W.getBoundingClientRect();if(s==="if-needed"&&E>=0&&N>=0&&O<=v&&$<=y&&(W===m&&!$p(W)||E>=T&&O<=_&&N>=H&&$<=F))return B;const Y=getComputedStyle(W),X=parseInt(Y.borderLeftWidth,10),oe=parseInt(Y.borderTopWidth,10),Q=parseInt(Y.borderRightWidth,10),le=parseInt(Y.borderBottomWidth,10);let ue=0,te=0;const ge="offsetWidth"in W?W.offsetWidth-W.clientWidth-X-Q:0,Se="offsetHeight"in W?W.offsetHeight-W.clientHeight-oe-le:0,pe="offsetWidth"in W?W.offsetWidth===0?0:Z/W.offsetWidth:0,we="offsetHeight"in W?W.offsetHeight===0?0:L/W.offsetHeight:0;if(m===W)ue=a==="start"?K:a==="end"?K-v:a==="nearest"?Ip(S,S+v,v,oe,le,S+K,S+K+k,k):K-v/2,te=l==="start"?j:l==="center"?j-y/2:l==="end"?j-y:Ip(C,C+y,y,X,Q,C+j,C+j+P,P),ue=Math.max(0,ue+S),te=Math.max(0,te+C);else{ue=a==="start"?K-T-oe:a==="end"?K-_+le+Se:a==="nearest"?Ip(T,_,L,oe,le+Se,K,K+k,k):K-(T+L/2)+Se/2,te=l==="start"?j-H-X:l==="center"?j-(H+Z/2)+ge/2:l==="end"?j-F+Q+ge:Ip(H,F,Z,X,Q+ge,j,j+P,P);const{scrollLeft:be,scrollTop:re}=W;ue=we===0?0:Math.max(0,Math.min(re+ue/we,W.scrollHeight-L/we+Se)),te=pe===0?0:Math.max(0,Math.min(be+te/pe,W.scrollWidth-Z/pe+ge)),K+=re-ue,j+=be-te}B.push({el:W,top:ue,left:te})}return B},Oq=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function jq(e,t){if(!e.isConnected||!(n=>{let o=n;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;if((n=>typeof n=="object"&&typeof n.behavior=="function")(t))return t.behavior(hT(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:n,top:o,left:i}of hT(e,Oq(t)))n.scroll({top:o,left:i,behavior:r})}var mT=Xe((e,t)=>{var r;const{className:n,as:o,item:i,state:s,classNames:a,isDisabled:l,listRef:c,slots:d,shouldSelectOnPressUp:f,tabRef:m,...g}=e,{key:b}=i,y=ot(t),v=o||(e.href?"a":"button"),C=typeof v=="string",{tabProps:S,isSelected:k,isDisabled:P,isPressed:E}=_q({key:b,isDisabled:l,shouldSelectOnPressUp:f},s,y);e.children==null&&delete S["aria-controls"];const $=l||P,{focusProps:O,isFocused:N,isFocusVisible:D}=Ir(),{hoverProps:M,isHovered:V}=dn({isDisabled:$}),R=A(a?.tab,n),K=()=>{!y?.current||!c?.current||jq(y.current,{scrollMode:"if-needed",behavior:"smooth",block:"end",inline:"end",boundary:c?.current})};return h.jsx(v,{ref:fg(y,m),"data-disabled":ae(P),"data-focus":ae(N),"data-focus-visible":ae(D),"data-hover":ae(V),"data-hover-unselected":ae((V||E)&&!k),"data-key":b,"data-pressed":ae(E),"data-selected":ae(k),"data-slot":"tab",...Oe(S,$?{}:{...O,...M},Lt(g,{enabled:C,omitPropNames:new Set(["title"]),omitEventNames:new Set(["onClick"])}),{onClick:co(K,S.onClick)}),className:(r=d.tab)==null?void 0:r.call(d,{class:R}),title:g?.titleValue,type:v==="button"?"button":void 0,children:h.jsx("div",{className:d.tabContent({class:a?.tabContent}),"data-slot":"tabContent",children:i.rendered})})});mT.displayName="HeroUI.Tab";var Lq=mT;class gT{*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){let r=this.keyMap.get(t);return r?.childNodes||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let l of a.childNodes)r(l)};for(let a of t)r(a);let n=null,o=0,i=0;for(let[a,l]of this.keyMap)n?(n.nextKey=a,l.prevKey=n.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=o++),(l.type==="section"||l.type==="item")&&i++,n=l,n.nextKey=void 0;this._size=i;var s;this.lastKey=(s=n?.key)!==null&&s!==void 0?s:null}}class Wo extends Set{constructor(t,r,n){super(t),t instanceof Wo?(this.anchorKey=r??t.anchorKey,this.currentKey=n??t.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function Fq(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function bT(e){let{selectionMode:t="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=e,s=x.useRef(!1),[,a]=x.useState(!1),l=x.useRef(null),c=x.useRef(null),[,d]=x.useState(null),f=x.useMemo(()=>vT(e.selectedKeys),[e.selectedKeys]),m=x.useMemo(()=>vT(e.defaultSelectedKeys,new Wo),[e.defaultSelectedKeys]),[g,b]=jo(f,m,e.onSelectionChange),y=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[v,C]=x.useState(o);o==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&C("replace");let S=x.useRef(o);return x.useEffect(()=>{o!==S.current&&(C(o),S.current=o)},[o]),{selectionMode:t,disallowEmptySelection:r,selectionBehavior:v,setSelectionBehavior:C,get isFocused(){return s.current},setFocused(k){s.current=k,a(k)},get focusedKey(){return l.current},get childFocusStrategy(){return c.current},setFocusedKey(k,P="first"){l.current=k,c.current=P,d(k)},selectedKeys:g,setSelectedKeys(k){(n||!Fq(k,g))&&b(k)},disabledKeys:y,disabledBehavior:i}}function vT(e,t){return e?e==="all"?"all":new Wo(e):t}function yT(e){return null}yT.getCollectionNode=function*(t,r){let{childItems:n,title:o,children:i}=t,s=t.title||t.children,a=t.textValue||(typeof s=="string"?s:"")||t["aria-label"]||"";!a&&!r?.suppressTextValueWarning&&process.env.NODE_ENV!=="production"&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:t,rendered:s,textValue:a,"aria-label":t["aria-label"],hasChildNodes:Bq(t),*childNodes(){if(n)for(let l of n)yield{type:"item",value:l};else if(o){let l=[];x.Children.forEach(i,c=>{l.push({type:"item",element:c})}),yield*l}}}};function Bq(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&x.Children.count(e.children)>0)}let xT=yT;class zq{build(t,r){return this.context=r,wT(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:r,items:n}=t;if(x.isValidElement(r)&&r.type===x.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];x.Children.forEach(r,s=>{s&&o.push(s)});let i=0;for(let s of o){let a=this.getFullNode({element:s,index:i},{});for(let l of a)i++,yield l}}}getKey(t,r,n,o){if(t.key!=null)return t.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){var s;let a=(s=i.key)!==null&&s!==void 0?s:i.id;if(a==null)throw new Error("No key found for item");return a}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(t,r){return{renderer:r.renderer||t.renderer}}*getFullNode(t,r,n,o){if(x.isValidElement(t.element)&&t.element.type===x.Fragment){let v=[];x.Children.forEach(t.element.props.children,S=>{v.push(S)});var i;let C=(i=t.index)!==null&&i!==void 0?i:0;for(const S of v)yield*this.getFullNode({element:S,index:C++},r,n,o);return}let s=t.element;if(!s&&t.value&&r&&r.renderer){let v=this.cache.get(t.value);if(v&&(!v.shouldInvalidate||!v.shouldInvalidate(this.context))){v.index=t.index,v.parentKey=o?o.key:null,yield v;return}s=r.renderer(t.value)}if(x.isValidElement(s)){let v=s.type;if(typeof v!="function"&&typeof v.getCollectionNode!="function"){let P=s.type;throw new Error(`Unknown element <${P}> in collection.`)}let C=v.getCollectionNode(s.props,this.context);var a;let S=(a=t.index)!==null&&a!==void 0?a:0,k=C.next();for(;!k.done&&k.value;){let P=k.value;t.index=S;var l;let E=(l=P.key)!==null&&l!==void 0?l:null;E==null&&(E=P.element?null:this.getKey(s,t,r,n));let O=[...this.getFullNode({...P,key:E,index:S,wrapper:Kq(t.wrapper,P.wrapper)},this.getChildState(r,P),n?`${n}${s.key}`:s.key,o)];for(let N of O){var c,d;N.value=(d=(c=P.value)!==null&&c!==void 0?c:t.value)!==null&&d!==void 0?d:null,N.value&&this.cache.set(N.value,N);var f;if(t.type&&N.type!==t.type)throw new Error(`Unsupported type <${r0(N.type)}> in <${r0((f=o?.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${r0(t.type)}> is supported.`);S++,yield N}k=C.next(O)}return}if(t.key==null||t.type==null)return;let m=this;var g,b;let y={type:t.type,props:t.props,key:t.key,parentKey:o?o.key:null,value:(g=t.value)!==null&&g!==void 0?g:null,level:o?o.level+1:0,index:t.index,rendered:t.rendered,textValue:(b=t.textValue)!==null&&b!==void 0?b:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:wT(function*(){if(!t.hasChildNodes||!t.childNodes)return;let v=0;for(let C of t.childNodes()){C.key!=null&&(C.key=`${y.key}${C.key}`);let S=m.getFullNode({...C,index:v},m.getChildState(r,C),y.key,y);for(let k of S)v++,yield k}})};yield y}constructor(){this.cache=new WeakMap}}function wT(e){let t=[],r=null;return{*[Symbol.iterator](){for(let n of t)yield n;r||(r=e());for(let n of r)t.push(n),yield n}}}function Kq(e,t){if(e&&t)return r=>e(t(r));if(e)return e;if(t)return t}function r0(e){return e[0].toUpperCase()+e.slice(1)}function CT(e,t,r){let n=x.useMemo(()=>new zq,[]),{children:o,items:i,collection:s}=e;return x.useMemo(()=>{if(s)return s;let l=n.build({children:o,items:i},r);return t(l)},[n,o,i,s,r,t])}function Qr(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function Wi(e){return Pc(e,0)}function Pc(e,t){if(t<0)return;let r=0;for(let n of e){if(r===t)return n;r++}}function Ls(e){let t;for(let r of e)t=r;return t}function n0(e,t,r){if(t.parentKey===r.parentKey)return t.index-r.index;let n=[...ST(e,t),t],o=[...ST(e,r),r],i=n.slice(0,o.length).findIndex((s,a)=>s!==o[a]);return i!==-1?(t=n[i],r=o[i],t.index-r.index):n.findIndex(s=>s===r)>=0?1:(o.findIndex(s=>s===t)>=0,-1)}function ST(e,t){let r=[],n=t;for(;n?.parentKey!=null;)n=e.getItem(n.parentKey),n&&r.unshift(n);return r}const kT=new WeakMap;function Vq(e){let t=kT.get(e);if(t!=null)return t;let r=0,n=o=>{for(let i of o)i.type==="section"?n(Qr(i,e)):i.type==="item"&&r++};return n(e),kT.set(e,r),r}class Np{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,r){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let r=this.getKey(t);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),r=this.state.selectedKeys;return this._isSelectAll=t.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!t||o&&n0(this.collection,o,t)<0)&&(t=o)}var r;return(r=t?.key)!==null&&r!==void 0?r:null}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!t||o&&n0(this.collection,o,t)>0)&&(t=o)}var r;return(r=t?.key)!==null&&r!==void 0?r:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let r=this.getKey(t);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new Wo([r],r,r);else{let s=this.state.selectedKeys;var o;let a=(o=s.anchorKey)!==null&&o!==void 0?o:r;n=new Wo(s,a,r);var i;for(let l of this.getKeyRange(a,(i=s.currentKey)!==null&&i!==void 0?i:r))n.delete(l);for(let l of this.getKeyRange(r,a))this.canSelectItem(l)&&n.add(l)}this.state.setSelectedKeys(n)}getKeyRange(t,r){let n=this.collection.getItem(t),o=this.collection.getItem(r);return n&&o?n0(this.collection,n,o)<=0?this.getKeyRangeInternal(t,r):this.getKeyRangeInternal(r,t):[]}getKeyRangeInternal(t,r){var n;if(!((n=this.layoutDelegate)===null||n===void 0)&&n.getKeyRange)return this.layoutDelegate.getKeyRange(t,r);let o=[],i=t;for(;i!=null;){let s=this.collection.getItem(i);if(s&&(s.type==="item"||s.type==="cell"&&this.allowsCellSelection)&&o.push(i),i===r)return o;i=this.collection.getKeyAfter(i)}return[]}getKey(t){let r=this.collection.getItem(t);if(!r||r.type==="cell"&&this.allowsCellSelection)return t;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let r=this.getKey(t);if(r==null)return;let n=new Wo(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none")return;let r=this.getKey(t);if(r==null)return;let n=this.canSelectItem(r)?new Wo([r],r,r):new Wo;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let r=new Wo;for(let n of t){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let t=[],r=n=>{for(;n!=null;){if(this.canSelectItem(n)){var o;let s=this.collection.getItem(n);s?.type==="item"&&t.push(n);var i;s?.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&r((i=(o=Wi(Qr(s,this.collection)))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null)}n=this.collection.getKeyAfter(n)}};return r(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Wo)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(t.size!==r.size)return!1;for(let n of t)if(!r.has(n))return!1;for(let n of r)if(!t.has(n))return!1;return!0}canSelectItem(t){var r;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let n=this.collection.getItem(t);return!(!n||!(n==null||(r=n.props)===null||r===void 0)&&r.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var r,n;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((n=this.collection.getItem(t))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.isDisabled))}isLink(t){var r,n;return!!(!((n=this.collection.getItem(t))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.href)}getItemProps(t){var r;return(r=this.collection.getItem(t))===null||r===void 0?void 0:r.props}withCollection(t){return new Np(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,r,n){this.collection=t,this.state=r;var o;this.allowsCellSelection=(o=n?.allowsCellSelection)!==null&&o!==void 0?o:!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}}function o0(e){let{filter:t,layoutDelegate:r}=e,n=bT(e),o=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=x.useCallback(c=>t?new gT(t(c)):new gT(c),[t]),s=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),a=CT(e,i,s),l=x.useMemo(()=>new Np(a,n,{layoutDelegate:r}),[a,n,r]);return Rq(a,l),{collection:a,disabledKeys:o,selectionManager:l}}function Rq(e,t){const r=x.useRef(null);x.useEffect(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&r.current){const d=r.current.getItem(t.focusedKey),f=[...r.current.getKeys()].map(C=>{const S=r.current.getItem(C);return S?.type==="item"?S:null}).filter(C=>C!==null),m=[...e.getKeys()].map(C=>{const S=e.getItem(C);return S?.type==="item"?S:null}).filter(C=>C!==null);var n,o;const g=((n=f?.length)!==null&&n!==void 0?n:0)-((o=m?.length)!==null&&o!==void 0?o:0);var i,s,a;let b=Math.min(g>1?Math.max(((i=d?.index)!==null&&i!==void 0?i:0)-g+1,0):(s=d?.index)!==null&&s!==void 0?s:0,((a=m?.length)!==null&&a!==void 0?a:0)-1),y=null,v=!1;for(;b>=0;){if(!t.isDisabled(m[b].key)){y=m[b];break}if(b<m.length-1&&!v)b++;else{v=!0;var l,c;b>((l=d?.index)!==null&&l!==void 0?l:0)&&(b=(c=d?.index)!==null&&c!==void 0?c:0),b--}}t.setFocusedKey(y?y.key:null)}r.current=e},[e,t])}function Wq(e){var t;let[r,n]=jo(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),o=x.useMemo(()=>r!=null?[r]:[],[r]),{collection:i,disabledKeys:s,selectionManager:a}=o0({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:c=>{if(c==="all")return;var d;let f=(d=c.values().next().value)!==null&&d!==void 0?d:null;f===r&&e.onSelectionChange&&e.onSelectionChange(f),n(f)}}),l=r!=null?i.getItem(r):null;return{collection:i,disabledKeys:s,selectionManager:a,selectedKey:r,setSelectedKey:n,selectedItem:l}}function Uq(e){var t,r;let n=Wq({...e,onSelectionChange:e.onSelectionChange?l=>{var c;l!=null&&((c=e.onSelectionChange)===null||c===void 0||c.call(e,l))}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:(r=(t=e.defaultSelectedKey)!==null&&t!==void 0?t:PT(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set))!==null&&r!==void 0?r:void 0}),{selectionManager:o,collection:i,selectedKey:s}=n,a=x.useRef(s);return x.useEffect(()=>{let l=s;e.selectedKey==null&&(o.isEmpty||l==null||!i.getItem(l))&&(l=PT(i,n.disabledKeys),l!=null&&o.setSelectedKeys([l])),(l!=null&&o.focusedKey==null||!o.isFocused&&l!==a.current)&&o.setFocusedKey(l),a.current=l}),{...n,isDisabled:e.isDisabled||!1}}function PT(e,t){let r=null;if(e){var n,o,i,s;for(r=e.getFirstKey();r!=null&&(t.has(r)||!((o=e.getItem(r))===null||o===void 0||(n=o.props)===null||n===void 0)&&n.isDisabled)&&r!==e.getLastKey();)r=e.getKeyAfter(r);r!=null&&(t.has(r)||!((s=e.getItem(r))===null||s===void 0||(i=s.props)===null||i===void 0)&&i.isDisabled)&&r===e.getLastKey()&&(r=e.getFirstKey())}return r}function Hq(e){var t,r,n;const o=ur(),[i,s]=qr(e,qC.variantKeys),{ref:a,as:l,className:c,classNames:d,children:f,disableCursorAnimation:m,isVertical:g=!1,shouldSelectOnPressUp:b=!0,destroyInactiveTabPanel:y=!0,...v}=i,C=l||"div",S=typeof C=="string",k=ot(a),P=(r=(t=e?.disableAnimation)!=null?t:o?.disableAnimation)!=null?r:!1,E=(n=s.placement)!=null?n:g?"start":"top",$=g||E==="start"||E==="end"?"vertical":"horizontal",O=Uq({children:f,...v}),{tabListProps:N}=Nq({...v,orientation:$},O,k),D=x.useMemo(()=>qC({...s,disableAnimation:P,...g?{placement:"start"}:{}}),[jr(s),P,g]),M=A(d?.base,c),V=x.useMemo(()=>({state:O,slots:D,classNames:d,disableAnimation:P,listRef:k,shouldSelectOnPressUp:b,disableCursorAnimation:m,isDisabled:e?.isDisabled}),[O,D,k,P,m,b,e?.isDisabled,d]),R=x.useCallback(U=>({"data-slot":"base",className:D.base({class:A(M,U?.className)}),...Oe(Lt(v,{enabled:S}),U)}),[M,v,D]),K=x.useCallback(U=>({"data-slot":"tabWrapper",className:D.tabWrapper({class:A(d?.tabWrapper,U?.className)}),"data-placement":E,"data-vertical":g||E==="start"||E==="end"?"vertical":"horizontal"}),[d,D,E,g]),j=x.useCallback(U=>({ref:k,"data-slot":"tabList",className:D.tabList({class:A(d?.tabList,U?.className)}),...Oe(N,U)}),[k,N,d,D]),B=x.useCallback(U=>({"data-slot":"cursor",className:D.cursor({class:A(d?.cursor,U?.className)})}),[d,D]);return{Component:C,domRef:k,state:O,values:V,destroyInactiveTabPanel:y,getBaseProps:R,getTabListProps:j,getWrapperProps:K,getTabCursorProps:B}}var qq=Xe(function(t,r){const{Component:n,values:o,state:i,domRef:s,destroyInactiveTabPanel:a,getBaseProps:l,getTabListProps:c,getWrapperProps:d,getTabCursorProps:f}=Hq({...t,ref:r}),m={state:i,listRef:o.listRef,slots:o.slots,classNames:o.classNames,isDisabled:o.isDisabled,shouldSelectOnPressUp:o.shouldSelectOnPressUp},g=[...i.collection].map(R=>h.jsx(Lq,{item:R,...m,...R.props},R.key)),b=t?.variant,y=x.useRef(void 0),v=t?.isVertical,C=x.useRef(void 0),S=t?.placement,k=x.useRef(void 0),P=x.useRef(null),E=i.selectedItem,$=E?.key,O=x.useCallback(R=>b==="underlined"?{left:`${R.left+R.width*.1}px`,top:`${R.top+R.height-2}px`,width:`${R.width*.8}px`,height:""}:{left:`${R.left}px`,top:`${R.top}px`,width:`${R.width}px`,height:`${R.height}px`},[b]),N=x.useCallback(R=>{var K;(b!==y.current||v!==C.current||S!==k.current)&&((K=P.current)==null||K.removeAttribute("data-animated")),R(),y.current=b,C.current=v,k.current=S,requestAnimationFrame(()=>{var j,B;(j=P.current)==null||j.setAttribute("data-animated","true"),(B=P.current)==null||B.setAttribute("data-initialized","true")})},[v,b,S]),D=x.useCallback(R=>{if(!P.current)return;const K={width:R.offsetWidth,height:R.offsetHeight,left:R.offsetLeft,top:R.offsetTop},j=O(K);N(()=>{P.current.style.left=j.left,P.current.style.top=j.top,P.current.style.width=j.width,P.current.style.height=j.height})},[P.current,O,N]),M=x.useCallback(R=>{const K=R[0].contentRect;K.width===0&&K.height===0||D(R[0].target)},[D]);x.useEffect(()=>{var R;const K=(R=s.current)==null?void 0:R.querySelector(`[data-key="${$}"]`);if(!K)return;const j=new ResizeObserver(M);return j.observe(K),()=>j.disconnect()},[s.current,M,$]);const V=x.useMemo(()=>h.jsxs(h.Fragment,{children:[h.jsx("div",{...l(),children:h.jsxs(n,{...c(),children:[!o.disableAnimation&&!o.disableCursorAnimation&&$!=null&&h.jsx("span",{...f(),ref:P}),g]})}),[...i.collection].map(R=>h.jsx(Dq,{classNames:o.classNames,destroyInactiveTabPanel:a,slots:o.slots,state:o.state,tabKey:R.key},R.key))]}),[n,l,c,f,g,$,i.collection,o.disableAnimation,o.disableCursorAnimation,o.classNames,o.slots,o.state,a,s,P,b,v]);return"placement"in t||"isVertical"in t?h.jsx("div",{...d(),children:V}):V}),ET=qq,TT=e=>{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},AT=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],Gq=(e,t)=>{if(t.includes("-")){const[r]=t.split("-");if(r.includes(e))return!1}return!0},Dp=(e,t)=>{if(t.includes("-")){const[,r]=t.split("-");return`${e}-${r}`}return e},Ec=new WeakMap,Bn=[];function Zq(e,t=document.body){let r=new Set(e),n=new Set,o=l=>{for(let m of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(m);let c=m=>{if(r.has(m)||m.parentElement&&n.has(m.parentElement)&&m.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let g of r)if(m.contains(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),f=c(l);if(f===NodeFilter.FILTER_ACCEPT&&i(l),f!==NodeFilter.FILTER_REJECT){let m=d.nextNode();for(;m!=null;)i(m),m=d.nextNode()}},i=l=>{var c;let d=(c=Ec.get(l))!=null?c:0;l.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&l.setAttribute("aria-hidden","true"),n.add(l),Ec.set(l,d+1))};Bn.length&&Bn[Bn.length-1].disconnect(),o(t);let s=new MutationObserver(l=>{for(let c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...r,...n].some(d=>d.contains(c.target))){for(let d of c.removedNodes)d instanceof Element&&(r.delete(d),n.delete(d));for(let d of c.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?r.add(d):d instanceof Element&&o(d)}});s.observe(t,{childList:!0,subtree:!0});let a={visibleNodes:r,hiddenNodes:n,observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Bn.push(a),()=>{s.disconnect();for(let l of n){let c=Ec.get(l);c!=null&&(c===1?(l.removeAttribute("aria-hidden"),Ec.delete(l)):Ec.set(l,c-1))}a===Bn[Bn.length-1]?(Bn.pop(),Bn.length&&Bn[Bn.length-1].observe()):Bn.splice(Bn.indexOf(a),1)}}function Yq(e){let t=Bn[Bn.length-1];if(t&&!t.visibleNodes.has(e))return t.visibleNodes.add(e),()=>{t.visibleNodes.delete(e)}}var Jq=xT,Xl=Jq;function Xq({brands:e,selectedBrandSlug:t,onBrandChange:r,classNames:n}){const{t:o}=Je(),i=x.useRef(null),[s,a]=x.useState(t);x.useEffect(()=>{s!==t&&a(t)},[t]),x.useEffect(()=>{const c=i.current;if(!c)return;const d=c.querySelector(`[data-slot="tab"][data-key="${CSS.escape(s)}"]`);if(!d)return;const f=d.offsetLeft-c.clientWidth/2+d.offsetWidth/2;c.scrollTo({left:Math.max(0,f),behavior:"smooth"})},[s,e.length]);function l(c){a(c),r(c)}return h.jsxs(ET,{ref:i,selectedKey:s,color:"primary",size:"sm","aria-label":o("phoneSelector.selectBrand"),classNames:{base:A("w-full",n?.base),...n},children:[h.jsx(Xl,{title:o("phoneSelector.popular"),onClick:()=>l("popular")},"popular"),e.map(c=>h.jsx(Xl,{title:c.name,onClick:()=>l(c.slug)},c.slug))]})}var Qq=xT,Ba=Qq;const i0=new WeakMap;function eG(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function tG(e,t){let r=i0.get(e);if(!r)throw new Error("Unknown list");return`${r.id}-option-${eG(t)}`}function Mp(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=rn(t);let s=rn(),a={};r?(n=n?`${s} ${n}`:s,a={id:s,htmlFor:i==="label"?t:void 0}):!n&&!o&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=sf({id:t,"aria-label":o,"aria-labelledby":n});return{labelProps:a,fieldProps:l}}function Op(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:s}=Mp(e),a=Yu([!!t,!!r,n,o]),l=Yu([!!t,!!r,n,o]);return s=it(s,{"aria-describedby":[a,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:s,descriptionProps:{id:a},errorMessageProps:{id:l}}}function rG(e,t,r){let n=Ln(e,{labelable:!0}),o=e.selectionBehavior||"toggle",i=e.linkBehavior||(o==="replace"?"action":"override");o==="toggle"&&i==="action"&&(i="override");let{listProps:s}=Aq({...e,ref:r,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,linkBehavior:i}),{focusWithinProps:a}=Ia({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),l=rn(e.id);i0.set(t,{id:l,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:i,UNSTABLE_itemBehavior:e.UNSTABLE_itemBehavior});let{labelProps:c,fieldProps:d}=Mp({...e,id:l,labelElementType:"span"});return{labelProps:c,listBoxProps:it(n,a,t.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...it(d,s)})}}function nG(e,t,r){var n,o;let{key:i}=e,s=i0.get(t);var a;let l=(a=e.isDisabled)!==null&&a!==void 0?a:t.selectionManager.isDisabled(i);var c;let d=(c=e.isSelected)!==null&&c!==void 0?c:t.selectionManager.isSelected(i);var f;let m=(f=e.shouldSelectOnPressUp)!==null&&f!==void 0?f:s?.shouldSelectOnPressUp;var g;let b=(g=e.shouldFocusOnHover)!==null&&g!==void 0?g:s?.shouldFocusOnHover;var y;let v=(y=e.shouldUseVirtualFocus)!==null&&y!==void 0?y:s?.shouldUseVirtualFocus;var C;let S=(C=e.isVirtualized)!==null&&C!==void 0?C:s?.isVirtualized,k=Yu(),P=Yu(),E={role:"option","aria-disabled":l||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?d:void 0};bs()&&bg()||(E["aria-label"]=e["aria-label"],E["aria-labelledby"]=k,E["aria-describedby"]=P);let $=t.collection.getItem(i);if(S){let W=Number($?.index);E["aria-posinset"]=Number.isNaN(W)?void 0:W+1,E["aria-setsize"]=Vq(t.collection)}let O=s?.onAction?()=>{var W;return s==null||(W=s.onAction)===null||W===void 0?void 0:W.call(s,i)}:void 0,N=tG(t,i),{itemProps:D,isPressed:M,isFocused:V,hasAction:R,allowsSelection:K}=_p({selectionManager:t.selectionManager,key:i,ref:r,shouldSelectOnPressUp:m,allowsDifferentPressOrigin:m&&b,isVirtualized:S,shouldUseVirtualFocus:v,isDisabled:l,onAction:O||!($==null||(n=$.props)===null||n===void 0)&&n.onAction?gs($==null||(o=$.props)===null||o===void 0?void 0:o.onAction,O):void 0,linkBehavior:s?.linkBehavior,UNSTABLE_itemBehavior:s?.UNSTABLE_itemBehavior,id:N}),{hoverProps:j}=dn({isDisabled:l||!b,onHoverStart(){Kl()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i))}}),B=Ln($?.props);delete B.id;let U=vg($?.props);return{optionProps:{...E,...it(B,D,j,U),id:N},labelProps:{id:k},descriptionProps:{id:P},isFocused:V,isFocusVisible:V&&t.selectionManager.isFocused&&Kl(),isSelected:d,isDisabled:l,isPressed:M,allowsSelection:K,hasAction:R}}function oG(e){let{heading:t,"aria-label":r}=e,n=rn();return{itemProps:{role:"presentation"},headingProps:t?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":t?n:void 0}}}function iG(e){var t;const r=ur(),{ref:n,as:o,state:i,variant:s,color:a,onAction:l,children:c,onSelectionChange:d,disableAnimation:f=(t=r?.disableAnimation)!=null?t:!1,itemClasses:m,className:g,topContent:b,bottomContent:y,emptyContent:v="No items.",hideSelectedIcon:C=!1,hideEmptyContent:S=!1,shouldHighlightOnFocus:k=!1,classNames:P,...E}=e,$=o||"ul",O=typeof $=="string",N=ot(n),D=o0({...e,children:c,onSelectionChange:d}),M=i||D,{listBoxProps:V}=rG({...e,onAction:l},M,N),R=x.useMemo(()=>oj(),[]),K=A(P?.base,g);return{Component:$,state:M,variant:s,color:a,slots:R,classNames:P,topContent:b,bottomContent:y,emptyContent:v,hideEmptyContent:S,shouldHighlightOnFocus:k,hideSelectedIcon:C,disableAnimation:f,className:g,itemClasses:m,getBaseProps:(W={})=>({ref:N,"data-slot":"base",className:R.base({class:K}),...Lt(E,{enabled:O}),...W}),getListProps:(W={})=>({"data-slot":"list",className:R.list({class:P?.list}),...V,...W}),getEmptyContentProps:(W={})=>({"data-slot":"empty-content",children:v,className:R.emptyContent({class:P?.emptyContent}),...W})}}function sG(e){const{isSelected:t,disableAnimation:r,...n}=e;return h.jsx("svg",{"aria-hidden":"true","data-selected":t,role:"presentation",viewBox:"0 0 17 18",...n,children:h.jsx("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,style:r?{}:{transition:"stroke-dashoffset 200ms ease"}})})}var aG=700;function lG(){return kl()||typeof window>"u"?!1:window.screen.width<=aG}function uG(e){var t,r;const n=ur(),[o,i]=qr(e,ZC.variantKeys),{as:s,item:a,state:l,description:c,startContent:d,endContent:f,isVirtualized:m,selectedIcon:g,className:b,classNames:y,autoFocus:v,onPress:C,onPressUp:S,onPressStart:k,onPressEnd:P,onPressChange:E,onClick:$,shouldHighlightOnFocus:O,hideSelectedIcon:N=!1,isReadOnly:D=!1,...M}=o,V=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,R=x.useRef(null),K=s||(e.href?"a":"li"),j=typeof K=="string",{rendered:B,key:U}=a,W=l.disabledKeys.has(U)||e.isDisabled,L=l.selectionManager.selectionMode!=="none",Z=lG(),{pressProps:T,isPressed:F}=xn({ref:R,isDisabled:W,onClick:$,onPress:C,onPressUp:S,onPressStart:k,onPressEnd:P,onPressChange:E}),{isHovered:_,hoverProps:H}=dn({isDisabled:W}),{isFocusVisible:Y,focusProps:X}=Ir({autoFocus:v}),{isFocused:oe,isSelected:Q,optionProps:le,labelProps:ue,descriptionProps:te}=nG({key:U,isDisabled:W,"aria-label":o["aria-label"],isVirtualized:m},l,R);let ge=le;const Se=x.useMemo(()=>ZC({...i,isDisabled:W,disableAnimation:V,hasTitleTextChild:typeof B=="string",hasDescriptionTextChild:typeof c=="string"}),[jr(i),W,V,B,c]),pe=A(y?.base,b);D&&(ge=bj(ge));const we=O&&oe||(Z?_||F:_||oe&&!Y),be=(Pe={})=>({ref:R,...Oe(ge,D?{}:Oe(X,T),H,Lt(M,{enabled:j}),Pe),"data-selectable":ae(L),"data-focus":ae(oe),"data-hover":ae(we),"data-disabled":ae(W),"data-selected":ae(Q),"data-pressed":ae(F),"data-focus-visible":ae(Y),className:Se.base({class:A(pe,Pe.className)})}),re=(Pe={})=>({...Oe(ue,Pe),"data-label":ae(!0),className:Se.title({class:y?.title})}),ke=(Pe={})=>({...Oe(te,Pe),className:Se.description({class:y?.description})}),Ne=(Pe={})=>({...Oe(Pe),className:Se.wrapper({class:y?.wrapper})}),Me=x.useCallback((Pe={})=>({"aria-hidden":ae(!0),"data-disabled":ae(W),className:Se.selectedIcon({class:y?.selectedIcon}),...Pe}),[W,Se,y]);return{Component:K,domRef:R,slots:Se,classNames:y,isSelectable:L,isSelected:Q,isDisabled:W,rendered:B,description:c,startContent:d,endContent:f,selectedIcon:g,hideSelectedIcon:N,disableAnimation:V,getItemProps:be,getLabelProps:re,getWrapperProps:Ne,getDescriptionProps:ke,getSelectedIconProps:Me}}var _T=e=>{const{Component:t,rendered:r,description:n,isSelectable:o,isSelected:i,isDisabled:s,selectedIcon:a,startContent:l,endContent:c,hideSelectedIcon:d,disableAnimation:f,getItemProps:m,getLabelProps:g,getWrapperProps:b,getDescriptionProps:y,getSelectedIconProps:v}=uG(e),C=x.useMemo(()=>{const S=h.jsx(sG,{disableAnimation:f,isSelected:i});return typeof a=="function"?a({icon:S,isSelected:i,isDisabled:s}):a||S},[a,i,s,f]);return h.jsxs(t,{...m(),children:[l,n?h.jsxs("div",{...b(),children:[h.jsx("span",{...g(),children:r}),h.jsx("span",{...y(),children:n})]}):h.jsx("span",{...g(),children:r}),o&&!d&&h.jsx("span",{...v(),children:C}),c]})};_T.displayName="HeroUI.ListboxItem";var s0=_T;function cG(e){let t=Lt(e,{enabled:typeof e.elementType=="string"}),r;return e.orientation==="vertical"&&(r="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":r}}:{separatorProps:t}}function dG(e){const{as:t,className:r,orientation:n,...o}=e;let i=t||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:s}=cG({elementType:typeof i=="string"?i:"hr",orientation:n}),a=x.useMemo(()=>e4({orientation:n,className:r}),[n,r]),l=x.useCallback((c={})=>({className:a,role:"separator","data-orientation":n,...s,...o,...c}),[a,n,s,o]);return{Component:i,getDividerProps:l}}var $T=Xe((e,t)=>{const{Component:r,getDividerProps:n}=dG({...e});return h.jsx(r,{ref:t,...n()})});$T.displayName="HeroUI.Divider";var Ql=$T,IT=Xe(({item:e,state:t,as:r,variant:n,color:o,disableAnimation:i,className:s,classNames:a,hideSelectedIcon:l,showDivider:c=!1,dividerProps:d={},itemClasses:f,title:m,items:g,...b},y)=>{const v=r||"li",C=x.useMemo(()=>ij(),[]),S=A(a?.base,s),k=A(a?.divider,d?.className),{itemProps:P,headingProps:E,groupProps:$}=oG({heading:e.rendered,"aria-label":e["aria-label"]});return h.jsxs(v,{"data-slot":"base",...Oe(P,b),className:C.base({class:S}),children:[e.rendered&&h.jsx("span",{...E,className:C.heading({class:a?.heading}),"data-slot":"heading",children:e.rendered}),h.jsxs("ul",{...$,className:C.group({class:a?.group}),"data-has-title":!!e.rendered,"data-slot":"group",children:[[...e.childNodes].map(O=>{const{key:N,props:D}=O;let M=h.jsx(s0,{classNames:f,color:o,disableAnimation:i,hideSelectedIcon:l,item:O,state:t,variant:n,...D},N);return O.wrapper&&(M=O.wrapper(M)),M}),c&&h.jsx(Ql,{as:"li",className:C.divider({class:k}),...d})]})]},e.key)});IT.displayName="HeroUI.ListboxSection";var NT=IT;function eu(e,t,r){let n=r.initialDeps??[],o;return()=>{var i,s,a,l;let c;r.key&&((i=r.debug)!=null&&i.call(r))&&(c=Date.now());const d=e();if(!(d.length!==n.length||d.some((g,b)=>n[b]!==g)))return o;n=d;let m;if(r.key&&((s=r.debug)!=null&&s.call(r))&&(m=Date.now()),o=t(...d),r.key&&((a=r.debug)!=null&&a.call(r))){const g=Math.round((Date.now()-c)*100)/100,b=Math.round((Date.now()-m)*100)/100,y=b/16,v=(C,S)=>{for(C=String(C);C.length<S;)C=" "+C;return C};console.info(`%c⏱ ${v(b,5)} /${v(g,5)} ms`,`
|
|
224
224
|
font-size: .6rem;
|
|
225
225
|
font-weight: bold;
|
|
226
|
-
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,r?.key)}return(l=r?.onChange)==null||l.call(r,o),o}}function a0(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const fG=(e,t)=>Math.abs(e-t)<1,pG=(e,t,r)=>{let n;return function(...o){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,o),r)}},hG=e=>e,mG=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let o=t;o<=r;o++)n.push(o);return n},gG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const o=s=>{const{width:a,height:l}=s;t({width:Math.round(a),height:Math.round(l)})};if(o(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const i=new n.ResizeObserver(s=>{const a=s[0];if(a?.borderBoxSize){const l=a.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(r.getBoundingClientRect())});return i.observe(r,{box:"border-box"}),()=>{i.unobserve(r)}},DT={passive:!0},bG=typeof window>"u"?!0:"onscrollend"in window,vG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const i=e.options.useScrollendEvent&&bG?()=>{}:pG(n,()=>{t(o,!1)},e.options.isScrollingResetDelay),s=c=>()=>{const{horizontal:d,isRtl:f}=e.options;o=d?r.scrollLeft*(f&&-1||1):r.scrollTop,i(),t(o,c)},a=s(!0),l=s(!1);return l(),r.addEventListener("scroll",a,DT),r.addEventListener("scrollend",l,DT),()=>{r.removeEventListener("scroll",a),r.removeEventListener("scrollend",l)}},yG=(e,t,r)=>{if(t?.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])},xG=(e,{adjustments:t=0,behavior:r},n)=>{var o,i;const s=e+t;(i=(o=n.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[n.options.horizontal?"left":"top"]:s,behavior:r})};class wG{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;(o=n())==null||o.disconnect(),r=null},observe:o=>{var i;return(i=n())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=n())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,o])=>{typeof o>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:hG,rangeExtractor:mG,onChange:()=>{},measureElement:yG,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...r}},this.notify=r=>{var n,o;(o=(n=this.options).onChange)==null||o.call(n,this,r)},this.maybeNotify=eu(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const o=new Map,i=new Map;for(let s=n-1;s>=0;s--){const a=r[s];if(o.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=eu(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,o,i,s)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:o,getItemKey:i,enabled:s}),{key:!1}),this.getMeasurements=eu(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:o,getItemKey:i,enabled:s},a)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let d=l;d<r;d++){const f=i(d),m=this.options.lanes===1?c[d-1]:this.getFurthestMeasurement(c,d),g=m?m.end+this.options.gap:n+o,b=a.get(f),y=typeof b=="number"?b:this.options.estimateSize(d),v=g+y,C=m?m.lane:d%this.options.lanes;c[d]={index:d,start:g,size:y,end:v,key:f,lane:C}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=eu(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,o)=>this.range=r.length>0&&n>0?CG({measurements:r,outerSize:n,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=eu(()=>{let r=null,n=null;const o=this.calculateRange();return o&&(r=o.startIndex,n=o.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,o,i,s)=>i===null||s===null?[]:r({startIndex:i,endIndex:s,overscan:n,count:o}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,o=r.getAttribute(n);return o?parseInt(o,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const o=this.indexFromElement(r),i=this.measurementsCache[o];if(!i)return;const s=i.key,a=this.elementsCache.get(s);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(s,r)),r.isConnected&&this.resizeItem(o,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const o=this.measurementsCache[r];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,s=n-i;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((n,o)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(o))});return}this._measureElement(r,void 0)},this.getVirtualItems=eu(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{const o=[];for(let i=0,s=r.length;i<s;i++){const a=r[i],l=n[a];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return a0(n[MT(0,n.length-1,o=>a0(n[o]).start,r)])},this.getOffsetForAlignment=(r,n)=>{const o=this.getSize(),i=this.getScrollOffset();n==="auto"&&r>=i+o&&(n="end"),n==="end"&&(r-=o);const s=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-o;return Math.max(Math.min(l,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.measurementsCache[r];if(!o)return;const i=this.getSize(),s=this.getScrollOffset();if(n==="auto")if(o.end>=s+i-this.options.scrollPaddingEnd)n="end";else if(o.start<=s+this.options.scrollPaddingStart)n="start";else return[s,n];const a=o.start-this.options.scrollPaddingStart+(o.size-i)/2;switch(n){case"center":return[this.getOffsetForAlignment(a,n),n];case"end":return[this.getOffsetForAlignment(o.end+this.options.scrollPaddingEnd,n),n];default:return[this.getOffsetForAlignment(o.start-this.options.scrollPaddingStart,n),n]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:o})},this.scrollToIndex=(r,{align:n="auto",behavior:o}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(r,n);if(!i)return;const[s,a]=i;this._scrollToOffset(s,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(r))){const[c]=a0(this.getOffsetForIndex(r,a));fG(c,this.getScrollOffset())||this.scrollToIndex(r,{align:a,behavior:o})}else this.scrollToIndex(r,{align:a,behavior:o})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let o;return n.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(i=>i.end)),Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:o})=>{this.options.scrollToFn(r,{behavior:o,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const MT=(e,t,r,n)=>{for(;e<=t;){const o=(e+t)/2|0,i=r(o);if(i<n)e=o+1;else if(i>n)t=o-1;else return o}return e>0?e-1:0};function CG({measurements:e,outerSize:t,scrollOffset:r}){const n=e.length-1,i=MT(0,n,a=>e[a].start,r);let s=i;for(;s<n&&e[s].end<r+t;)s++;return{startIndex:i,endIndex:s}}const OT=typeof document<"u"?Er.useLayoutEffect:Er.useEffect;function SG(e){const t=Er.useReducer(()=>({}),{})[1],r={...e,onChange:(o,i)=>{var s;i?ds.flushSync(t):t(),(s=e.onChange)==null||s.call(e,o,i)}},[n]=Er.useState(()=>new wG(r));return n.setOptions(r),OT(()=>n._didMount(),[]),OT(()=>n._willUpdate()),n}function jT(e){return SG({observeElementRect:gG,observeElementOffset:vG,scrollToFn:xG,...e})}function kG(e={}){const{domRef:t,isEnabled:r=!0,overflowCheck:n="vertical",visibility:o="auto",offset:i=0,onVisibilityChange:s,updateDeps:a=[]}=e,l=x.useRef(o);x.useEffect(()=>{const c=t?.current;if(!c||!r)return;const d=(g,b,y,v,C)=>{if(o==="auto"){const S=`${v}${o4(C)}Scroll`;b&&y?(c.dataset[S]="true",c.removeAttribute(`data-${v}-scroll`),c.removeAttribute(`data-${C}-scroll`)):(c.dataset[`${v}Scroll`]=b.toString(),c.dataset[`${C}Scroll`]=y.toString(),c.removeAttribute(`data-${v}-${C}-scroll`))}else{const S=b&&y?"both":b?v:y?C:"none";S!==l.current&&(s?.(S),l.current=S)}},f=()=>{var g,b;const y=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],v=c.querySelector('ul[data-slot="list"]'),C=+((g=v?.getAttribute("data-virtual-scroll-height"))!=null?g:c.scrollHeight),S=+((b=v?.getAttribute("data-virtual-scroll-top"))!=null?b:c.scrollTop);for(const{type:k,prefix:P,suffix:E}of y)if(n===k||n==="both"){const $=k==="vertical"?S>i:c.scrollLeft>i,O=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,$,O,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return f(),c.addEventListener("scroll",f,!0),o!=="auto"&&(m(),o==="both"?(c.dataset.topBottomScroll=String(n==="vertical"),c.dataset.leftRightScroll=String(n==="horizontal")):(c.dataset.topBottomScroll="false",c.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(g=>{c.dataset[`${g}Scroll`]=String(o===g)}))),()=>{c.removeEventListener("scroll",f,!0),m()}},[...a,r,o,n,s,t])}function PG(e){var t;const[r,n]=qr(e,Md.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:f="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);kG({domRef:v,offset:d,visibility:f,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>Md({...n,className:a}),[jr(n),a]);return{Component:y,styles:C,domRef:v,children:s,getBaseProps:(k={})=>{var P;return{ref:v,className:C,"data-orientation":(P=e.orientation)!=null?P:"vertical",style:{"--scroll-shadow-size":`${c}px`,...l,...k.style},...b,...k}}}}var EG=(e,t)=>{const r=[];for(const n of e)n.type==="section"?r.push(([...n.childNodes].length+1)*t):r.push(t);return r},TG=e=>{if(!e||e.scrollTop===void 0||e.clientHeight===void 0||e.scrollHeight===void 0)return{isTop:!1,isBottom:!1,isMiddle:!1};const t=e.scrollTop===0,r=Math.ceil(e.scrollTop+e.clientHeight)>=e.scrollHeight;return{isTop:t,isBottom:r,isMiddle:!t&&!r}},AG=e=>{var t;const{Component:r,state:n,color:o,variant:i,itemClasses:s,getBaseProps:a,topContent:l,bottomContent:c,hideEmptyContent:d,hideSelectedIcon:f,shouldHighlightOnFocus:m,disableAnimation:g,getEmptyContentProps:b,getListProps:y,scrollShadowProps:v}=e,{virtualization:C}=e;if(!C||!hs(C)&&!C.maxListboxHeight&&!C.itemHeight)throw new Error("You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox.");const{maxListboxHeight:S,itemHeight:k}=C,P=Math.min(S,k*n.collection.size),E=x.useRef(null),$=x.useMemo(()=>EG([...n.collection],k),[n.collection,k]),O=jT({count:[...n.collection].length,getScrollElement:()=>E.current,estimateSize:B=>$[B]}),N=O.getVirtualItems(),D=O.getTotalSize(),{getBaseProps:M}=PG({...v}),V=B=>{var U;const W=[...n.collection][B.index];if(!W)return null;const L={color:o,item:W,state:n,variant:i,disableAnimation:g,hideSelectedIcon:f,...W.props},Z={position:"absolute",top:0,left:0,width:"100%",height:`${B.size}px`,transform:`translateY(${B.start}px)`};if(W.type==="section")return h.jsx(NT,{...L,itemClasses:s,style:{...Z,...L.style}},W.key);let T=h.jsx(s0,{...L,classNames:Oe(s,(U=W.props)==null?void 0:U.classNames),shouldHighlightOnFocus:m,style:{...Z,...L.style}},W.key);return W.wrapper&&(T=W.wrapper(T)),T},[R,K]=x.useState({isTop:!1,isBottom:!0,isMiddle:!1}),j=h.jsxs(r,{...y(),"data-virtual-scroll-height":D,"data-virtual-scroll-top":(t=E?.current)==null?void 0:t.scrollTop,children:[!n.collection.size&&!d&&h.jsx("li",{children:h.jsx("div",{...b()})}),h.jsx("div",{...Lt(M()),ref:E,style:{height:S,overflow:"auto"},onScroll:B=>{K(TG(B.target))},children:P>0&&k>0&&h.jsx("div",{style:{height:`${D}px`,width:"100%",position:"relative"},children:N.map(B=>V(B))})})]});return h.jsxs("div",{...a(),children:[l,j,c]})},_G=AG,$G=Xe(function(t,r){const{isVirtualized:n,...o}=t,i=iG({...o,ref:r}),{Component:s,state:a,color:l,variant:c,itemClasses:d,getBaseProps:f,topContent:m,bottomContent:g,hideEmptyContent:b,hideSelectedIcon:y,shouldHighlightOnFocus:v,disableAnimation:C,getEmptyContentProps:S,getListProps:k}=i;if(n)return h.jsx(_G,{...t,...i});const P=h.jsxs(s,{...k(),children:[!a.collection.size&&!b&&h.jsx("li",{children:h.jsx("div",{...S()})}),[...a.collection].map(E=>{var $;const O={color:l,item:E,state:a,variant:c,disableAnimation:C,hideSelectedIcon:y,...E.props};if(E.type==="section")return h.jsx(NT,{...O,itemClasses:d},E.key);let N=h.jsx(s0,{...O,classNames:Oe(d,($=E.props)==null?void 0:$.classNames),shouldHighlightOnFocus:v},E.key);return E.wrapper&&(N=E.wrapper(N)),N})]});return h.jsxs("div",{...f(),children:[m,P,g]})}),l0=$G;function IG(e){var t,r;const n=ur(),[o,i]=qr(e,XC.variantKeys),{as:s,children:a,isLoaded:l=!1,className:c,classNames:d,...f}=o,m=s||"div",g=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,b=x.useMemo(()=>XC({...i,disableAnimation:g}),[jr(i),g,a]),y=A(d?.base,c);return{Component:m,children:a,slots:b,classNames:d,getSkeletonProps:(S={})=>({"data-loaded":ae(l),className:b.base({class:A(y,S?.className)}),...f}),getContentProps:(S={})=>({className:b.content({class:A(d?.content,S?.className)})})}}var LT=Xe((e,t)=>{const{Component:r,children:n,getSkeletonProps:o,getContentProps:i}=IG({...e});return h.jsx(r,{ref:t,...o(),children:h.jsx("div",{...i(),children:n})})});LT.displayName="HeroUI.Skeleton";var Tr=LT;function NG({isLoading:e,phones:t,selectedPhoneSlug:r,onPhoneSelect:n,classNames:o}){const i=x.useCallback(s=>{if(s==="all")return;const a=Array.from(s)[0];n(a)},[n]);return e?h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx("ul",{className:"w-full flex flex-col gap-0.5",children:Array.from({length:10},(s,a)=>h.jsxs("li",{className:"px-2 py-1.5 w-full h-full flex items-center gap-3 rounded-lg",children:[h.jsx(Tr,{className:"rounded-full shrink-0 bg-primary-100 w-10 h-10"}),h.jsx(Tr,{className:"rounded-lg h-4 w-40 bg-content2"})]},`skeleton-${a}`))})}):h.jsx(l0,{selectionMode:"single",variant:"flat","aria-label":"Kies een telefoon",selectedKeys:r?[r]:[],onSelectionChange:i,classNames:{base:A("flex-1 min-h-0 overflow-y-auto p-0",o?.base),...o},children:t.map(s=>h.jsx(Ba,{textValue:s.fullName,children:h.jsxs("div",{className:"flex items-center gap-3",children:[s.productVersion?.media?.main?.url?h.jsx(Hl,{alt:s.productVersion.media.main.altText||s.fullName,src:yv(s.productVersion.media.main.url,64,64),size:"md",radius:"full",color:"primary",classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}):h.jsx(Hl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(cg,{size:24,className:"text-primary"}),classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}),h.jsx("span",{className:"text-sm font-medium",children:s.fullName})]})},s.slug))})}var[DG,u0]=Ca({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),FT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=u0(),f=A(d?.body,o);return h.jsx(a,{ref:l,className:(r=c.body)==null?void 0:r.call(c,{class:f}),...s,children:i})});FT.displayName="HeroUI.CardBody";var BT=FT,zT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=u0(),f=A(d?.footer,o);return h.jsx(a,{ref:l,className:(r=c.footer)==null?void 0:r.call(c,{class:f}),...s,children:i})});zT.displayName="HeroUI.CardFooter";var MG=zT,KT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=u0(),f=A(d?.header,o);return h.jsx(a,{ref:l,className:(r=c.header)==null?void 0:r.call(c,{class:f}),...s,children:i})});KT.displayName="HeroUI.CardHeader";var OG=KT;function jG(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,zC.variantKeys),{ref:l,as:c,children:d,onClick:f,onPress:m,autoFocus:g,className:b,classNames:y,allowTextSelectionOnPress:v=!0,...C}=s,S=ot(l),k=c||(e.isPressable?"button":"div"),P=typeof k=="string",E=(r=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?r:!1,$=(o=(n=e.disableRipple)!=null?n:i?.disableRipple)!=null?o:!1,O=A(y?.base,b),{onClear:N,onPress:D,ripples:M}=ZP(),V=x.useCallback(H=>{$||E||S.current&&D(H)},[$,E,S,D]),{buttonProps:R,isPressed:K}=fp({onPress:co(m,V),elementType:c,isDisabled:!e.isPressable,onClick:f,allowTextSelectionOnPress:v,...C},S),{hoverProps:j,isHovered:B}=dn({isDisabled:!e.isHoverable,...C}),{isFocusVisible:U,isFocused:W,focusProps:L}=Ir({autoFocus:g}),Z=x.useMemo(()=>zC({...a,disableAnimation:E}),[jr(a),E]),T=x.useMemo(()=>({slots:Z,classNames:y,disableAnimation:E,isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,fullWidth:e.fullWidth}),[Z,y,e.isDisabled,e.isFooterBlurred,E,e.fullWidth]),F=x.useCallback((H={})=>({ref:S,className:Z.base({class:O}),tabIndex:e.isPressable?0:-1,"data-hover":ae(B),"data-pressed":ae(K),"data-focus":ae(W),"data-focus-visible":ae(U),"data-disabled":ae(e.isDisabled),...Oe(e.isPressable?{...R,...L,role:"button"}:{},e.isHoverable?j:{},Lt(C,{enabled:P}),Lt(H))}),[S,Z,O,P,e.isPressable,e.isHoverable,e.isDisabled,B,K,U,R,L,j,C]),_=x.useCallback(()=>({ripples:M,onClear:N}),[M,N]);return{context:T,domRef:S,Component:k,classNames:y,children:d,isHovered:B,isPressed:K,disableAnimation:E,isPressable:e.isPressable,isHoverable:e.isHoverable,disableRipple:$,handlePress:V,isFocusVisible:U,getCardProps:F,getRippleProps:_}}var VT=Xe((e,t)=>{const{children:r,context:n,Component:o,isPressable:i,disableAnimation:s,disableRipple:a,getCardProps:l,getRippleProps:c}=jG({...e,ref:t});return h.jsxs(o,{...l(),children:[h.jsx(DG,{value:n,children:r}),i&&!s&&!a&&h.jsx(GP,{...c()})]})});VT.displayName="HeroUI.Card";var Fs=VT;function LG(e){const{collection:t,disabledKeys:r,selectionManager:n,selectionManager:{setSelectedKeys:o,selectedKeys:i,selectionMode:s}}=o0(e),a=x.useMemo(()=>!e.isLoading&&i.size!==0?Array.from(i).filter(Boolean).filter(c=>!t.getItem(c)):[],[i,t]),l=i.size!==0?Array.from(i).map(c=>t.getItem(c)).filter(Boolean):null;return a.length&&console.warn(`Select: Keys "${a.join(", ")}" passed to "selectedKeys" are not present in the collection.`),{collection:t,disabledKeys:r,selectionManager:n,selectionMode:s,selectedKeys:i,setSelectedKeys:o.bind(n),selectedItems:l}}function FG(e){let t=mp(e),[r,n]=x.useState(null),[o,i]=x.useState([]),s=()=>{i([]),t.close()};return{focusStrategy:r,...t,open(c=null){n(c),t.open()},toggle(c=null){n(c),t.toggle()},close(){s()},expandedKeysStack:o,openSubmenu:(c,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),c])},closeSubmenu:(c,d)=>{i(f=>f[d]===c?f.slice(0,d):f)}}}const c0={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},RT={...c0,customError:!0,valid:!1},tu={isInvalid:!1,validationDetails:c0,validationErrors:[]},WT=x.createContext({}),jp="__formValidationState"+Date.now();function ru(e){if(e[jp]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[jp];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return BG(e)}function BG(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:s,validationBehavior:a="aria"}=e;r&&(t||(t=r==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:RT}:null,c=x.useMemo(()=>{if(!s||o==null)return null;let M=zG(s,o);return UT(M)},[s,o]);i?.validationDetails.valid&&(i=void 0);let d=x.useContext(WT),f=x.useMemo(()=>n?Array.isArray(n)?n.flatMap(M=>d0(d[M])):d0(d[n]):[],[d,n]),[m,g]=x.useState(d),[b,y]=x.useState(!1);d!==m&&(g(d),y(!1));let v=x.useMemo(()=>UT(b?[]:f),[b,f]),C=x.useRef(tu),[S,k]=x.useState(tu),P=x.useRef(tu),E=()=>{if(!$)return;O(!1);let M=c||i||C.current;f0(M,P.current)||(P.current=M,k(M))},[$,O]=x.useState(!1);return x.useEffect(E),{realtimeValidation:l||v||c||i||tu,displayValidation:a==="native"?l||v||S:l||v||c||i||S,updateValidation(M){a==="aria"&&!f0(S,M)?k(M):C.current=M},resetValidation(){let M=tu;f0(M,P.current)||(P.current=M,k(M)),a==="native"&&O(!1),y(!0)},commitValidation(){a==="native"&&O(!0),y(!0)}}}function d0(e){return e?Array.isArray(e)?e:[e]:[]}function zG(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return d0(r)}return[]}function UT(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:RT}:null}function f0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,n)=>r===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([r,n])=>t.validationDetails[r]===n)}function KG(...e){let t=new Set,r=!1,n={...c0};for(let s of e){var o,i;for(let a of s.validationErrors)t.add(a);r||(r=s.isInvalid);for(let a in n)(o=n)[i=a]||(o[i]=s.validationDetails[a])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}function VG({validate:e,validationBehavior:t,...r}){const[n,o]=x.useState(!1),[i,s]=x.useState(null),a=FG(r),l=LG({...r,onSelectionChange:f=>{r.onSelectionChange!=null&&(f==="all"?r.onSelectionChange(new Set(l.collection.getKeys())):r.onSelectionChange(f)),r.selectionMode==="single"&&a.close()}}),c=ru({...r,validationBehavior:t,validate:f=>{if(!e)return;const m=Array.from(f);return e(r.selectionMode==="single"?m[0]:m)},value:l.selectedKeys}),d=l.collection.size===0&&r.hideEmptyContent;return{...c,...l,...a,focusStrategy:i,close(){a.close()},open(f=null){d||(s(f),a.open())},toggle(f=null){d||(s(f),a.toggle())},isFocused:n,setFocused:o}}var HT={};HT={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var qT={};qT={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var GT={};GT={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var ZT={};ZT={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var YT={};YT={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var JT={};JT={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var XT={};XT={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var QT={};QT={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var e5={};e5={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var t5={};t5={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var r5={};r5={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var n5={};n5={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var o5={};o5={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var i5={};i5={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var s5={};s5={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var a5={};a5={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var l5={};l5={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var u5={};u5={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var c5={};c5={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var d5={};d5={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var f5={};f5={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var p5={};p5={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var h5={};h5={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var m5={};m5={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var g5={};g5={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var b5={};b5={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var v5={};v5={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var y5={};y5={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var x5={};x5={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var w5={};w5={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var C5={};C5={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var S5={};S5={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var k5={};k5={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var P5={};P5={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var E5={};E5={"ar-AE":HT,"bg-BG":qT,"cs-CZ":GT,"da-DK":ZT,"de-DE":YT,"el-GR":JT,"en-US":XT,"es-ES":QT,"et-EE":e5,"fi-FI":t5,"fr-FR":r5,"he-IL":n5,"hr-HR":o5,"hu-HU":i5,"it-IT":s5,"ja-JP":a5,"ko-KR":l5,"lt-LT":u5,"lv-LV":c5,"nb-NO":d5,"nl-NL":f5,"pl-PL":p5,"pt-BR":h5,"pt-PT":m5,"ro-RO":g5,"ru-RU":b5,"sk-SK":v5,"sl-SI":y5,"sr-SP":x5,"sv-SE":w5,"tr-TR":C5,"uk-UA":S5,"zh-CN":k5,"zh-TW":P5};function RG(e){return e&&e.__esModule?e.default:e}function WG(e,t,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=e,s=rn(),{triggerProps:a,overlayProps:l}=u3({type:n},t,r),c=g=>{if(!o&&!(i==="longPress"&&!g.altKey)&&r&&r.current)switch(g.key){case"Enter":case" ":if(i==="longPress"||g.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in g||g.stopPropagation(),g.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in g||g.stopPropagation(),g.preventDefault(),t.toggle("last");break;default:"continuePropagation"in g&&g.continuePropagation()}},d=ms(RG(E5),"@react-aria/menu"),{longPressProps:f}=e3({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}}),m={preventFocusOnPress:!0,onPressStart(g){g.pointerType!=="touch"&&g.pointerType!=="keyboard"&&!o&&(fo(g.target),t.open(g.pointerType==="virtual"?"first":null))},onPress(g){g.pointerType==="touch"&&!o&&(fo(g.target),t.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?m:f,id:s,onKeyDown:c},menuProps:{...l,"aria-labelledby":s,autoFocus:t.focusStrategy||!0,onClose:t.close}}}function UG(e,t,r){const{disallowEmptySelection:n,isDisabled:o}=e,i=ff({usage:"search",sensitivity:"base"}),s=x.useMemo(()=>new cT(t.collection,t.disabledKeys,null,i),[t.collection,t.disabledKeys,i]),{menuTriggerProps:a,menuProps:l}=WG({isDisabled:o,type:"listbox"},t,r),c=E=>{if(t.selectionMode==="single")switch(E.key){case"ArrowLeft":{E.preventDefault();const $=t.selectedKeys.size>0?s.getKeyAbove(t.selectedKeys.values().next().value):s.getFirstKey();$&&t.setSelectedKeys([$]);break}case"ArrowRight":{E.preventDefault();const $=t.selectedKeys.size>0?s.getKeyBelow(t.selectedKeys.values().next().value):s.getFirstKey();$&&t.setSelectedKeys([$]);break}}},{typeSelectProps:d}=aT({keyboardDelegate:s,selectionManager:t.selectionManager,onTypeSelect(E){t.setSelectedKeys([E])}}),{isInvalid:f,validationErrors:m,validationDetails:g}=t.displayValidation,{labelProps:b,fieldProps:y,descriptionProps:v,errorMessageProps:C}=Op({...e,labelElementType:"span",isInvalid:f,errorMessage:e.errorMessage||m});d.onKeyDown=d.onKeyDownCapture,delete d.onKeyDownCapture,a.onPressStart=E=>{E.pointerType!=="touch"&&E.pointerType!=="keyboard"&&!o&&t.toggle(E.pointerType==="virtual"?"first":null)};const S=Ln(e,{labelable:!0}),k=it(d,a,y),P=rn();return{labelProps:{...b,onClick:()=>{var E;e.isDisabled||((E=r.current)==null||E.focus(),zb("keyboard"))}},triggerProps:it(S,{...k,onKeyDown:gs(k.onKeyDown,c,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[P,k["aria-labelledby"],k["aria-label"]&&!k["aria-labelledby"]?k.id:null].join(" "),onFocus(E){t.isFocused||(e.onFocus&&e.onFocus(E),t.setFocused(!0))},onBlur(E){t.isOpen||(e.onBlur&&e.onBlur(E),t.setFocused(!1))}}),valueProps:{id:P},menuProps:{...l,disallowEmptySelection:n,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,onBlur:E=>{E.currentTarget.contains(E.relatedTarget)||(e.onBlur&&e.onBlur(E),t.setFocused(!1))},onFocus:l?.onFocus,"aria-labelledby":[y["aria-labelledby"],k["aria-label"]&&!y["aria-labelledby"]?k.id:null].filter(Boolean).join(" ")},descriptionProps:v,errorMessageProps:C,isInvalid:f,validationErrors:m,validationDetails:g}}var T5=Symbol("default");function HG(e){const t=x.useRef(null),r=x.useRef(void 0),n=x.useCallback(o=>{if(typeof e=="function"){const i=e,s=i(o);return()=>{typeof s=="function"?s():i(null)}}else if(e)return e.current=o,()=>{e.current=null}},[e]);return x.useMemo(()=>({get current(){return t.current},set current(o){t.current=o,r.current&&(r.current(),r.current=void 0),o!=null&&(r.current=n(o))}}),[n])}function nu(e,t){let r=x.useContext(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=new Intl.ListFormat().format(Object.keys(r.slots).map(i=>`"${i}"`));if(!t&&!r.slots[T5])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let o=t||T5;if(!r.slots[o])throw new Error(`Invalid slot "${t}". Valid slot names are ${n}.`);return r.slots[o]}return r}function qG(e,t,r){let n=nu(r,e.slot)||{},{ref:o,...i}=n,s=HG(x.useMemo(()=>qm(t,o),[t,o])),a=Oe(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?a.style=l=>{let c=typeof i.style=="function"?i.style(l):i.style,d={...l.defaultStyle,...c},f=typeof e.style=="function"?e.style({...l,defaultStyle:d}):e.style;return{...d,...f}}:a.style={...i.style,...e.style}),[a,s]}var za=x.createContext(null);x.forwardRef(function(t,r){[t,r]=qG(t,r,za);let{validationErrors:n,validationBehavior:o="native",children:i,className:s,...a}=t;const l=x.useMemo(()=>lj({className:s}),[s]);return h.jsx("form",{noValidate:o!=="native",...a,ref:r,className:l,children:h.jsx(za.Provider,{value:{...t,validationBehavior:o},children:h.jsx(WT.Provider,{value:n??{},children:i})})})});var A5=new WeakMap;function GG(e){var t,r,n,o,i,s;const a=ur(),{validationBehavior:l}=nu(za)||{},[c,d]=qr(e,GC.variantKeys),f=(r=(t=e.disableAnimation)!=null?t:a?.disableAnimation)!=null?r:!1,{ref:m,as:g,label:b,name:y,isLoading:v,selectorIcon:C,isOpen:S,defaultOpen:k,onOpenChange:P,startContent:E,endContent:$,description:O,renderValue:N,onSelectionChange:D,placeholder:M,isVirtualized:V,itemHeight:R=36,maxListboxHeight:K=256,children:j,disallowEmptySelection:B=!1,selectionMode:U="single",spinnerRef:W,scrollRef:L,popoverProps:Z={},scrollShadowProps:T={},listboxProps:F={},spinnerProps:_={},validationState:H,onChange:Y,onClose:X,className:oe,classNames:Q,validationBehavior:le=(n=l??a?.validationBehavior)!=null?n:"native",hideEmptyContent:ue=!1,onClear:te,...ge}=c,Se=ot(L),pe={popoverProps:Oe({placement:"bottom",triggerScaleOnOpen:!1,offset:5,disableAnimation:f},Z),scrollShadowProps:Oe({ref:Se,isEnabled:(o=e.showScrollIndicators)!=null?o:!0,hideScrollBar:!0,offset:15},T),listboxProps:Oe({disableAnimation:f},F)},we=g||"button",be=typeof we=="string",re=ot(m),ke=x.useRef(null),Ne=x.useRef(null),Me=x.useRef(null);let Pe=VG({...c,isOpen:S,selectionMode:U,disallowEmptySelection:B,validationBehavior:le,children:j,isRequired:e.isRequired,isDisabled:e.isDisabled,isInvalid:e.isInvalid,defaultOpen:k,hideEmptyContent:ue,onOpenChange:_e=>{P?.(_e),_e||X?.()},onSelectionChange:_e=>{D?.(_e),Y&&typeof Y=="function"&&Y({target:{...re.current&&{...re.current,name:re.current.name},value:Array.from(_e).join(",")}}),Pe.commitValidation()}});Pe={...Pe,...e.isDisabled&&{disabledKeys:new Set([...Pe.collection.getKeys()])}},ja(()=>{var _e;(_e=re.current)!=null&&_e.value&&Pe.setSelectedKeys(new Set([...Pe.selectedKeys,re.current.value]))},[re.current]);const{labelProps:Ae,triggerProps:xe,valueProps:Ie,menuProps:et,descriptionProps:wt,errorMessageProps:lt,isInvalid:Ut,validationErrors:ut,validationDetails:Ue}=UG({...c,disallowEmptySelection:B,isDisabled:e.isDisabled},Pe,ke),Vt=x.useCallback(()=>{var _e;Pe.setSelectedKeys(new Set([])),te?.(),(_e=ke.current)==null||_e.focus()},[te,Pe]),{pressProps:Jt}=xn({isDisabled:!!e?.isDisabled,onPress:Vt}),Xt=e.isInvalid||H==="invalid"||Ut,{isPressed:sr,buttonProps:Ct}=fp(xe,ke),{focusProps:Sr,isFocused:dr,isFocusVisible:kr}=Ir(),{focusProps:$t,isFocusVisible:tt}=Ir(),{isHovered:It,hoverProps:ar}=dn({isDisabled:e.isDisabled}),er=eP({labelPlacement:e.labelPlacement,label:b}),Yr=!!M,en=er==="outside-left"||er==="outside"||er==="outside-top",ki=er==="inside",hn=er==="outside-left",to=e.isClearable,Ur=Pe.isOpen||Yr||!!((i=Pe.selectedItems)!=null&&i.length)||!!E||!!$||!!e.isMultiline,jt=!!((s=Pe.selectedItems)!=null&&s.length),Qi=!!b,oa=Qi&&(hn||en&&Yr),Jo=A(Q?.base,oe),St=x.useMemo(()=>GC({...d,isInvalid:Xt,isClearable:to,labelPlacement:er,disableAnimation:f}),[jr(d),Xt,er,f]);Hb({isDisabled:!Pe.isOpen});const Xo=typeof c.errorMessage=="function"?c.errorMessage({isInvalid:Xt,validationErrors:ut,validationDetails:Ue}):c.errorMessage||ut?.join(" "),Pi=!!O||!!Xo,es=!!$;x.useEffect(()=>{if(Pe.isOpen&&Me.current&&ke.current){let _e=ke.current.getBoundingClientRect(),ro=Me.current;ro.style.width=_e.width+"px"}},[Pe.isOpen]);const nl=x.useCallback((_e={})=>({"data-slot":"base","data-filled":ae(Ur),"data-has-value":ae(jt),"data-has-label":ae(Qi),"data-has-helper":ae(Pi),"data-has-end-content":ae(es),"data-invalid":ae(Xt),"data-has-label-outside":ae(oa),className:St.base({class:A(Jo,_e.className)}),..._e}),[St,Pi,jt,Qi,oa,Ur,Jo]),ol=x.useCallback((_e={})=>({ref:ke,"data-slot":"trigger","data-open":ae(Pe.isOpen),"data-disabled":ae(e?.isDisabled),"data-focus":ae(dr),"data-pressed":ae(sr),"data-focus-visible":ae(kr),"data-hover":ae(It),className:St.trigger({class:Q?.trigger}),...Oe(Ct,Sr,ar,Lt(ge,{enabled:be}),Lt(_e))}),[St,ke,Pe.isOpen,Q?.trigger,e?.isDisabled,dr,sr,kr,It,Ct,Sr,ar,ge,be]),ia=x.useCallback((_e={})=>({state:Pe,triggerRef:ke,selectRef:re,selectionMode:U,label:e?.label,name:e?.name,isRequired:e?.isRequired,autoComplete:e?.autoComplete,isDisabled:e?.isDisabled,form:e?.form,onChange:Y,..._e}),[Pe,U,e?.label,e?.autoComplete,e?.name,e?.isDisabled,ke]),Ei=x.useCallback((_e={})=>({"data-slot":"label",className:St.label({class:A(Q?.label,_e.className)}),...Ae,..._e}),[St,Q?.label,Ae]),rt=x.useCallback((_e={})=>({"data-slot":"value",className:St.value({class:A(Q?.value,_e.className)}),...Ie,..._e}),[St,Q?.value,Ie]),Qo=x.useCallback((_e={})=>({"data-slot":"listboxWrapper",className:St.listboxWrapper({class:A(Q?.listboxWrapper,_e?.className)}),style:{maxHeight:K??256,..._e.style},...Oe(pe.scrollShadowProps,_e)}),[St.listboxWrapper,Q?.listboxWrapper,pe.scrollShadowProps,K]),vu=(_e={})=>{const ro=V??Pe.collection.size>50;return{state:Pe,ref:Ne,isVirtualized:ro,virtualization:ro?{maxListboxHeight:K,itemHeight:R}:void 0,"data-slot":"listbox",className:St.listbox({class:A(Q?.listbox,_e?.className)}),scrollShadowProps:pe.scrollShadowProps,...Oe(pe.listboxProps,_e,et)}},an=x.useCallback((_e={})=>{var ro,Ti;const To=Oe(pe.popoverProps,_e);return{state:Pe,triggerRef:ke,ref:Me,"data-slot":"popover",scrollRef:Ne,triggerType:"listbox",classNames:{content:St.popoverContent({class:A(Q?.popoverContent,_e.className)})},...To,offset:Pe.selectedItems&&Pe.selectedItems.length>0?Pe.selectedItems.length*1e-8+(((ro=pe.popoverProps)==null?void 0:ro.offset)||0):(Ti=pe.popoverProps)==null?void 0:Ti.offset}},[St,Q?.popoverContent,pe.popoverProps,ke,Pe,Pe.selectedItems]),yu=x.useCallback(()=>({"data-slot":"selectorIcon","aria-hidden":ae(!0),"data-open":ae(Pe.isOpen),className:St.selectorIcon({class:Q?.selectorIcon})}),[St,Q?.selectorIcon,Pe.isOpen]),sa=x.useCallback((_e={})=>({..._e,"data-slot":"innerWrapper",className:St.innerWrapper({class:A(Q?.innerWrapper,_e?.className)})}),[St,Q?.innerWrapper]),il=x.useCallback((_e={})=>({..._e,"data-slot":"helperWrapper",className:St.helperWrapper({class:A(Q?.helperWrapper,_e?.className)})}),[St,Q?.helperWrapper]),aa=x.useCallback((_e={})=>({..._e,...wt,"data-slot":"description",className:St.description({class:A(Q?.description,_e?.className)})}),[St,Q?.description]),od=x.useCallback((_e={})=>({..._e,"data-slot":"mainWrapper",className:St.mainWrapper({class:A(Q?.mainWrapper,_e?.className)})}),[St,Q?.mainWrapper]),ts=x.useCallback((_e={})=>({..._e,"data-slot":"end-wrapper",className:St.endWrapper({class:A(Q?.endWrapper,_e?.className)})}),[St,Q?.endWrapper]),sl=x.useCallback((_e={})=>({..._e,"data-slot":"end-content",className:St.endContent({class:A(Q?.endContent,_e?.className)})}),[St,Q?.endContent]),rs=x.useCallback((_e={})=>({..._e,...lt,"data-slot":"error-message",className:St.errorMessage({class:A(Q?.errorMessage,_e?.className)})}),[St,lt,Q?.errorMessage]),Dr=x.useCallback((_e={})=>({"aria-hidden":ae(!0),"data-slot":"spinner",color:"current",size:"sm",..._,..._e,ref:W,className:St.spinner({class:A(Q?.spinner,_e?.className)})}),[St,W,_,Q?.spinner]),Eo=x.useCallback((_e={})=>({..._e,type:"button",tabIndex:-1,"aria-label":"clear selection","data-slot":"clear-button","data-focus-visible":ae(tt),className:St.clearButton({class:A(Q?.clearButton,_e?.className)}),...Oe(Jt,$t)}),[St,tt,Jt,$t,Q?.clearButton]);return A5.set(Pe,{isDisabled:e?.isDisabled,isRequired:e?.isRequired,name:e?.name,isInvalid:Xt,validationBehavior:le}),{Component:we,domRef:re,state:Pe,label:b,name:y,triggerRef:ke,isLoading:v,placeholder:M,startContent:E,endContent:$,description:O,selectorIcon:C,hasHelper:Pi,labelPlacement:er,hasPlaceholder:Yr,renderValue:N,selectionMode:U,disableAnimation:f,isOutsideLeft:hn,shouldLabelBeOutside:en,shouldLabelBeInside:ki,isInvalid:Xt,errorMessage:Xo,isClearable:to,getClearButtonProps:Eo,getBaseProps:nl,getTriggerProps:ol,getLabelProps:Ei,getValueProps:rt,getListboxProps:vu,getPopoverProps:an,getSpinnerProps:Dr,getMainWrapperProps:od,getListboxWrapperProps:Qo,getHiddenSelectProps:ia,getInnerWrapperProps:sa,getHelperWrapperProps:il,getDescriptionProps:aa,getErrorMessageProps:rs,getSelectorIconProps:yu,getEndWrapperProps:ts,getEndContentProps:sl}}var ZG=typeof document<"u"?x.useLayoutEffect:()=>{};function YG(e){const t=x.useRef(null);return ZG(()=>{t.current=e},[e]),x.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function JG(e,t,r){let n=x.useRef(t),o=YG(()=>{r&&r(n.current)});x.useEffect(()=>{var i;let s=(i=e?.current)==null?void 0:i.form;return s?.addEventListener("reset",o),()=>{s?.removeEventListener("reset",o)}},[e,o])}function Lp(e,t,r){let{validationBehavior:n,focus:o}=e;Gt(()=>{if(n==="native"&&r?.current&&!r.current.disabled){let c=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(c),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(QG(r.current))}});let i=x.useRef(!1),s=vn(()=>{i.current||t.resetValidation()}),a=vn(c=>{var d;t.displayValidation.isInvalid||t.commitValidation();let f=r==null||(d=r.current)===null||d===void 0?void 0:d.form;if(!c.defaultPrevented&&r&&f&&eZ(f)===r.current){var m;o?o():(m=r.current)===null||m===void 0||m.focus(),zb("keyboard")}c.preventDefault()}),l=vn(()=>{t.commitValidation()});x.useEffect(()=>{let c=r?.current;if(!c)return;let d=c.form,f=d?.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,f?.call(d),i.current=!1}),c.addEventListener("invalid",a),c.addEventListener("change",l),d?.addEventListener("reset",s),()=>{c.removeEventListener("invalid",a),c.removeEventListener("change",l),d?.removeEventListener("reset",s),d&&(d.reset=f)}},[r,n])}function XG(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function QG(e){return{isInvalid:!e.validity.valid,validationDetails:XG(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function eZ(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}function tZ(e,t,r){var n;let o=A5.get(t)||{},{autoComplete:i,name:s=o.name,isDisabled:a=o.isDisabled,selectionMode:l,onChange:c,form:d}=e,{validationBehavior:f,isRequired:m,isInvalid:g}=o,{visuallyHiddenProps:b}=Y3();return JG(e.selectRef,t.selectedKeys,t.setSelectedKeys),Lp({validationBehavior:f,focus:()=>{var y;return(y=r.current)==null?void 0:y.focus()}},t,e.selectRef),{containerProps:{...b,"aria-hidden":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{form:d,autoComplete:i,disabled:a,"aria-invalid":g||void 0,"aria-required":m&&f==="aria"||void 0,required:m&&f==="native",name:s,tabIndex:-1,value:l==="multiple"?[...t.selectedKeys].map(y=>String(y)):(n=[...t.selectedKeys][0])!=null?n:"",multiple:l==="multiple",onChange:y=>{t.setSelectedKeys(y.target.value),c?.(y)}}}}function rZ(e){var t;let{state:r,triggerRef:n,selectRef:o,label:i,name:s,isDisabled:a,form:l}=e,{containerProps:c,selectProps:d}=tZ({...e,selectRef:o},r,n);return r.collection.size<=300?h.jsx("div",{...c,"data-testid":"hidden-select-container",children:h.jsxs("label",{children:[i,h.jsxs("select",{...d,ref:o,children:[h.jsx("option",{}),[...r.collection.getKeys()].map(f=>{let m=r.collection.getItem(f);if(m?.type==="item")return h.jsx("option",{value:m.key,children:m.textValue},m.key)})]})]})}):s?h.jsx("input",{autoComplete:d.autoComplete,disabled:a,form:l,name:s,type:"hidden",value:(t=[...r.selectedKeys].join(","))!=null?t:""}):null}function nZ(e,t){const{groupRef:r,triggerRef:n,popoverRef:o,showArrow:i,offset:s=7,crossOffset:a=0,scrollRef:l,shouldFlip:c,boundaryElement:d,isDismissable:f=!0,shouldCloseOnBlur:m=!0,shouldCloseOnScroll:g=!0,placement:b="top",containerPadding:y,shouldCloseOnInteractOutside:v,isNonModal:C,isKeyboardDismissDisabled:S,updatePositionDeps:k=[],...P}=e,E=C??!0,$=P.trigger==="SubmenuTrigger",{overlayProps:O,underlayProps:N}=wv({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:m,isDismissable:f||$,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:v||(j=>{var B;return!((B=n.current)!=null&&B.contains(j))}),disableOutsideEvents:!E},o),{overlayProps:D,arrowProps:M,placement:V,updatePosition:R,triggerAnchorPoint:K}=Nk({...P,shouldFlip:c,crossOffset:a,targetRef:n,overlayRef:o,isOpen:t.isOpen,scrollRef:l,boundaryElement:d,containerPadding:y,placement:AT(b),offset:i?s+3:s,onClose:E&&!$&&g?t.close:()=>{}});return ja(()=>{k.length&&R()},k),x.useEffect(()=>{var j,B;if(t.isOpen&&o.current)return E?Yq((j=r?.current)!=null?j:o.current):Zq([(B=r?.current)!=null?B:o.current])},[E,t.isOpen,o,r]),{popoverProps:Oe(O,D),arrowProps:M,underlayProps:N,placement:V,triggerAnchorPoint:K}}var oZ="top";function iZ(e){var t,r,n;const o=ur(),[i,s]=qr(e,Dd.variantKeys),{as:a,ref:l,children:c,state:d,triggerRef:f,scrollRef:m,defaultOpen:g,onOpenChange:b,isOpen:y,isNonModal:v=!0,shouldFlip:C=!0,containerPadding:S=12,shouldBlockScroll:k=!1,isDismissable:P=!0,shouldCloseOnBlur:E,portalContainer:$,updatePositionDeps:O,dialogProps:N,placement:D=oZ,triggerType:M="dialog",showArrow:V=!1,offset:R=7,crossOffset:K=0,boundaryElement:j,isKeyboardDismissDisabled:B,shouldCloseOnInteractOutside:U,shouldCloseOnScroll:W,triggerAnchorPoint:L,motionProps:Z,className:T,classNames:F,onClose:_,...H}=i,Y=a||"div",X=ot(l),oe=x.useRef(null),Q=x.useRef(!1),le=f||oe,ue=(r=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?r:!1,te=mp({isOpen:y,defaultOpen:g,onOpenChange:Ue=>{b?.(Ue),Ue||_?.()}}),ge=d||te,{popoverProps:Se,underlayProps:pe,placement:we}=nZ({triggerRef:le,isNonModal:v,popoverRef:X,placement:D,offset:R,scrollRef:m,isDismissable:P,shouldCloseOnBlur:E,boundaryElement:j,crossOffset:K,shouldFlip:C,containerPadding:S,updatePositionDeps:O,isKeyboardDismissDisabled:B,shouldCloseOnScroll:W,shouldCloseOnInteractOutside:U,triggerAnchorPoint:L},ge),be=x.useMemo(()=>we?Gq(we,D)?we:D:null,[we,D]),{triggerProps:re}=u3({type:M},ge,le),{isFocusVisible:ke,isFocused:Ne,focusProps:Me}=Ir(),Pe=x.useMemo(()=>Dd({...s}),[jr(s)]),Ae=A(F?.base,T),xe={"--trigger-anchor-point":L?`${L.x}px ${L.y}px`:void 0};Hb({isDisabled:!(k&&ge.isOpen)});const Ie=(Ue={})=>({ref:X,...Oe(Se,H,Ue),style:Oe(Se.style,H.style,Ue.style)}),et=(Ue={})=>({"data-slot":"base","data-open":ae(ge.isOpen),"data-focus":ae(Ne),"data-arrow":ae(V),"data-focus-visible":ae(ke),"data-placement":we?Dp(we,D):void 0,...Oe(Me,N,Ue),className:Pe.base({class:A(Ae)}),style:{outline:"none",...xe}}),wt=x.useCallback((Ue={})=>({"data-slot":"content","data-open":ae(ge.isOpen),"data-arrow":ae(V),"data-placement":we?Dp(we,D):void 0,className:Pe.content({class:A(F?.content,Ue.className)})}),[Pe,ge.isOpen,V,be,D,F,we]),lt=x.useCallback(Ue=>{var Vt;let Jt;return Ue.pointerType==="touch"&&(e?.backdrop==="blur"||e?.backdrop==="opaque")?Jt=setTimeout(()=>{Q.current=!0},100):Q.current=!0,(Vt=re.onPress)==null||Vt.call(re,Ue),()=>{clearTimeout(Jt)}},[re?.onPress]),Ut=x.useCallback((Ue={},Vt=null)=>{const{isDisabled:Jt,...Xt}=Ue;return{"data-slot":"trigger",...Oe({"aria-haspopup":"dialog"},re,Xt),onPress:lt,isDisabled:Jt,className:Pe.trigger({class:A(F?.trigger,Ue.className),isTriggerDisabled:Jt}),ref:qm(Vt,le)}},[ge,re,lt,le]),ut=x.useCallback((Ue={})=>({"data-slot":"backdrop",className:Pe.backdrop({class:F?.backdrop}),onClick:Vt=>{if(!Q.current){Vt.preventDefault();return}ge.close(),Q.current=!1},...pe,...Ue}),[Pe,ge.isOpen,F,pe]);return{state:ge,Component:Y,children:c,classNames:F,showArrow:V,triggerRef:le,placement:be,isNonModal:v,popoverRef:X,portalContainer:$,isOpen:ge.isOpen,onClose:ge.close,disableAnimation:ue,shouldBlockScroll:k,backdrop:(n=e.backdrop)!=null?n:"transparent",motionProps:Z,getBackdropProps:ut,getPopoverProps:Ie,getTriggerProps:Ut,getDialogProps:et,getContentProps:wt}}var _5=()=>Promise.resolve().then(()=>nd).then(e=>e.default),$5=Xe(({children:e,motionProps:t,placement:r,disableAnimation:n,style:o={},transformOrigin:i={},...s},a)=>{let l=o;return i.originX!==void 0||i.originY!==void 0?l={...l,transformOrigin:i}:r&&(l={...l,...TT(r==="center"?"top":r)}),n?h.jsx("div",{...s,ref:a,children:e}):h.jsx(Ps,{features:_5,children:h.jsx(Es.div,{ref:a,animate:"enter",exit:"exit",initial:"initial",style:l,variants:hp.scaleSpringOpacity,...Oe(s,t),children:e})})});$5.displayName="HeroUI.FreeSoloPopoverWrapper";var I5=Xe(({children:e,transformOrigin:t,disableDialogFocus:r=!1,...n},o)=>{const{Component:i,state:s,placement:a,backdrop:l,portalContainer:c,disableAnimation:d,motionProps:f,isNonModal:m,getPopoverProps:g,getBackdropProps:b,getDialogProps:y,getContentProps:v}=iZ({...n,ref:o}),C=Er.useRef(null),{dialogProps:S,titleProps:k}=dE({},C),P=y({...!r&&{ref:C},...S}),E=Er.useMemo(()=>l==="transparent"?null:d?h.jsx("div",{...b()}):h.jsx(Ps,{features:_5,children:h.jsx(Es.div,{animate:"enter",exit:"exit",initial:"exit",variants:hp.fade,...b()})}),[l,d,b]);return h.jsxs(X3,{portalContainer:c,children:[!m&&E,h.jsx(i,{...g(),children:h.jsxs($5,{disableAnimation:d,motionProps:f,placement:a,tabIndex:-1,transformOrigin:t,...P,children:[!m&&h.jsx(Jf,{onDismiss:s.close}),h.jsx("div",{...v(),children:typeof e=="function"?e(k):e}),h.jsx(Jf,{onDismiss:s.close})]})})]})});I5.displayName="HeroUI.FreeSoloPopover";var sZ=I5;function aZ(e={}){const{domRef:t,isEnabled:r=!0,overflowCheck:n="vertical",visibility:o="auto",offset:i=0,onVisibilityChange:s,updateDeps:a=[]}=e,l=x.useRef(o);x.useEffect(()=>{const c=t?.current;if(!c||!r)return;const d=(g,b,y,v,C)=>{if(o==="auto"){const S=`${v}${o4(C)}Scroll`;b&&y?(c.dataset[S]="true",c.removeAttribute(`data-${v}-scroll`),c.removeAttribute(`data-${C}-scroll`)):(c.dataset[`${v}Scroll`]=b.toString(),c.dataset[`${C}Scroll`]=y.toString(),c.removeAttribute(`data-${v}-${C}-scroll`))}else{const S=b&&y?"both":b?v:y?C:"none";S!==l.current&&(s?.(S),l.current=S)}},f=()=>{var g,b;const y=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],v=c.querySelector('ul[data-slot="list"]'),C=+((g=v?.getAttribute("data-virtual-scroll-height"))!=null?g:c.scrollHeight),S=+((b=v?.getAttribute("data-virtual-scroll-top"))!=null?b:c.scrollTop);for(const{type:k,prefix:P,suffix:E}of y)if(n===k||n==="both"){const $=k==="vertical"?S>i:c.scrollLeft>i,O=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,$,O,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return f(),c.addEventListener("scroll",f,!0),o!=="auto"&&(m(),o==="both"?(c.dataset.topBottomScroll=String(n==="vertical"),c.dataset.leftRightScroll=String(n==="horizontal")):(c.dataset.topBottomScroll="false",c.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(g=>{c.dataset[`${g}Scroll`]=String(o===g)}))),()=>{c.removeEventListener("scroll",f,!0),m()}},[...a,r,o,n,s,t])}function lZ(e){var t;const[r,n]=qr(e,Md.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:f="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);aZ({domRef:v,offset:d,visibility:f,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>Md({...n,className:a}),[jr(n),a]);return{Component:y,styles:C,domRef:v,children:s,getBaseProps:(k={})=>{var P;return{ref:v,className:C,"data-orientation":(P=e.orientation)!=null?P:"vertical",style:{"--scroll-shadow-size":`${c}px`,...l,...k.style},...b,...k}}}}var N5=Xe((e,t)=>{const{Component:r,children:n,getBaseProps:o}=lZ({...e,ref:t});return h.jsx(r,{...o(),children:n})});N5.displayName="HeroUI.ScrollShadow";var p0=N5,uZ=Xe(function(t,r){var n;const{Component:o,state:i,label:s,hasHelper:a,isLoading:l,triggerRef:c,selectorIcon:d=h.jsx(cE,{}),description:f,errorMessage:m,isInvalid:g,startContent:b,endContent:y,placeholder:v,renderValue:C,shouldLabelBeOutside:S,disableAnimation:k,getBaseProps:P,getLabelProps:E,getTriggerProps:$,getValueProps:O,getListboxProps:N,getPopoverProps:D,getSpinnerProps:M,getMainWrapperProps:V,getInnerWrapperProps:R,getHiddenSelectProps:K,getHelperWrapperProps:j,getListboxWrapperProps:B,getDescriptionProps:U,getErrorMessageProps:W,getSelectorIconProps:L,isClearable:Z,getClearButtonProps:T,getEndWrapperProps:F,getEndContentProps:_}=GG({...t,ref:r}),H=s?h.jsx("label",{...E(),children:s}):null,Y=x.cloneElement(d,L()),X=x.useMemo(()=>{var ge;return Z&&((ge=i.selectedItems)!=null&&ge.length)?h.jsx("span",{...T(),children:h.jsx(xv,{})}):null},[Z,T,(n=i.selectedItems)==null?void 0:n.length]),oe=x.useMemo(()=>X?h.jsxs("div",{...F(),children:[X,y&&h.jsx("span",{..._(),children:y})]}):y&&h.jsx("span",{..._(),children:y}),[X,y,F,_]),Q=x.useMemo(()=>{const ge=g&&m;return!a||!(ge||f)?null:h.jsx("div",{...j(),children:ge?h.jsx("div",{...W(),children:m}):h.jsx("div",{...U(),children:f})})},[a,g,m,f,j,W,U]),le=x.useMemo(()=>{var ge;if(!((ge=i.selectedItems)!=null&&ge.length))return v;if(C&&typeof C=="function"){const Se=[...i.selectedItems].map(pe=>({key:pe.key,data:pe.value,type:pe.type,props:pe.props,textValue:pe.textValue,rendered:pe.rendered,"aria-label":pe["aria-label"]}));return C(Se)}return i.selectedItems.map(Se=>Se.textValue).join(", ")},[i.selectedItems,C,v]),ue=x.useMemo(()=>l?h.jsx(JP,{...M()}):Y,[l,Y,M]),te=x.useMemo(()=>i.isOpen?h.jsx(sZ,{...D(),children:h.jsx(p0,{...B(),children:h.jsx(l0,{...N()})})}):null,[i.isOpen,D,i,c,B,N]);return h.jsxs("div",{...P(),children:[h.jsx(rZ,{...K()}),S?H:null,h.jsxs("div",{...V(),children:[h.jsxs(o,{...$(),children:[S?null:H,h.jsxs("div",{...R(),children:[b,h.jsx("span",{...O(),children:le}),y&&i.selectedItems&&h.jsx(Vl,{elementType:"span",children:","}),oe]}),ue]}),Q]}),k?te:h.jsx(lc,{children:te})]})}),Tc=uZ;const cZ=dt`
|
|
226
|
+
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,r?.key)}return(l=r?.onChange)==null||l.call(r,o),o}}function a0(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const fG=(e,t)=>Math.abs(e-t)<1,pG=(e,t,r)=>{let n;return function(...o){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,o),r)}},hG=e=>e,mG=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let o=t;o<=r;o++)n.push(o);return n},gG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const o=s=>{const{width:a,height:l}=s;t({width:Math.round(a),height:Math.round(l)})};if(o(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const i=new n.ResizeObserver(s=>{const a=s[0];if(a?.borderBoxSize){const l=a.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(r.getBoundingClientRect())});return i.observe(r,{box:"border-box"}),()=>{i.unobserve(r)}},DT={passive:!0},bG=typeof window>"u"?!0:"onscrollend"in window,vG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const i=e.options.useScrollendEvent&&bG?()=>{}:pG(n,()=>{t(o,!1)},e.options.isScrollingResetDelay),s=c=>()=>{const{horizontal:d,isRtl:f}=e.options;o=d?r.scrollLeft*(f&&-1||1):r.scrollTop,i(),t(o,c)},a=s(!0),l=s(!1);return l(),r.addEventListener("scroll",a,DT),r.addEventListener("scrollend",l,DT),()=>{r.removeEventListener("scroll",a),r.removeEventListener("scrollend",l)}},yG=(e,t,r)=>{if(t?.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])},xG=(e,{adjustments:t=0,behavior:r},n)=>{var o,i;const s=e+t;(i=(o=n.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[n.options.horizontal?"left":"top"]:s,behavior:r})};class wG{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;(o=n())==null||o.disconnect(),r=null},observe:o=>{var i;return(i=n())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=n())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,o])=>{typeof o>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:hG,rangeExtractor:mG,onChange:()=>{},measureElement:yG,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...r}},this.notify=r=>{var n,o;(o=(n=this.options).onChange)==null||o.call(n,this,r)},this.maybeNotify=eu(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const o=new Map,i=new Map;for(let s=n-1;s>=0;s--){const a=r[s];if(o.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=eu(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,o,i,s)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:o,getItemKey:i,enabled:s}),{key:!1}),this.getMeasurements=eu(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:o,getItemKey:i,enabled:s},a)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let d=l;d<r;d++){const f=i(d),m=this.options.lanes===1?c[d-1]:this.getFurthestMeasurement(c,d),g=m?m.end+this.options.gap:n+o,b=a.get(f),y=typeof b=="number"?b:this.options.estimateSize(d),v=g+y,C=m?m.lane:d%this.options.lanes;c[d]={index:d,start:g,size:y,end:v,key:f,lane:C}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=eu(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,o)=>this.range=r.length>0&&n>0?CG({measurements:r,outerSize:n,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=eu(()=>{let r=null,n=null;const o=this.calculateRange();return o&&(r=o.startIndex,n=o.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,o,i,s)=>i===null||s===null?[]:r({startIndex:i,endIndex:s,overscan:n,count:o}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,o=r.getAttribute(n);return o?parseInt(o,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const o=this.indexFromElement(r),i=this.measurementsCache[o];if(!i)return;const s=i.key,a=this.elementsCache.get(s);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(s,r)),r.isConnected&&this.resizeItem(o,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const o=this.measurementsCache[r];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,s=n-i;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((n,o)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(o))});return}this._measureElement(r,void 0)},this.getVirtualItems=eu(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{const o=[];for(let i=0,s=r.length;i<s;i++){const a=r[i],l=n[a];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return a0(n[MT(0,n.length-1,o=>a0(n[o]).start,r)])},this.getOffsetForAlignment=(r,n)=>{const o=this.getSize(),i=this.getScrollOffset();n==="auto"&&r>=i+o&&(n="end"),n==="end"&&(r-=o);const s=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-o;return Math.max(Math.min(l,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.measurementsCache[r];if(!o)return;const i=this.getSize(),s=this.getScrollOffset();if(n==="auto")if(o.end>=s+i-this.options.scrollPaddingEnd)n="end";else if(o.start<=s+this.options.scrollPaddingStart)n="start";else return[s,n];const a=o.start-this.options.scrollPaddingStart+(o.size-i)/2;switch(n){case"center":return[this.getOffsetForAlignment(a,n),n];case"end":return[this.getOffsetForAlignment(o.end+this.options.scrollPaddingEnd,n),n];default:return[this.getOffsetForAlignment(o.start-this.options.scrollPaddingStart,n),n]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:o})},this.scrollToIndex=(r,{align:n="auto",behavior:o}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(r,n);if(!i)return;const[s,a]=i;this._scrollToOffset(s,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(r))){const[c]=a0(this.getOffsetForIndex(r,a));fG(c,this.getScrollOffset())||this.scrollToIndex(r,{align:a,behavior:o})}else this.scrollToIndex(r,{align:a,behavior:o})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let o;return n.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(i=>i.end)),Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:o})=>{this.options.scrollToFn(r,{behavior:o,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const MT=(e,t,r,n)=>{for(;e<=t;){const o=(e+t)/2|0,i=r(o);if(i<n)e=o+1;else if(i>n)t=o-1;else return o}return e>0?e-1:0};function CG({measurements:e,outerSize:t,scrollOffset:r}){const n=e.length-1,i=MT(0,n,a=>e[a].start,r);let s=i;for(;s<n&&e[s].end<r+t;)s++;return{startIndex:i,endIndex:s}}const OT=typeof document<"u"?Er.useLayoutEffect:Er.useEffect;function SG(e){const t=Er.useReducer(()=>({}),{})[1],r={...e,onChange:(o,i)=>{var s;i?ds.flushSync(t):t(),(s=e.onChange)==null||s.call(e,o,i)}},[n]=Er.useState(()=>new wG(r));return n.setOptions(r),OT(()=>n._didMount(),[]),OT(()=>n._willUpdate()),n}function jT(e){return SG({observeElementRect:gG,observeElementOffset:vG,scrollToFn:xG,...e})}function kG(e={}){const{domRef:t,isEnabled:r=!0,overflowCheck:n="vertical",visibility:o="auto",offset:i=0,onVisibilityChange:s,updateDeps:a=[]}=e,l=x.useRef(o);x.useEffect(()=>{const c=t?.current;if(!c||!r)return;const d=(g,b,y,v,C)=>{if(o==="auto"){const S=`${v}${o4(C)}Scroll`;b&&y?(c.dataset[S]="true",c.removeAttribute(`data-${v}-scroll`),c.removeAttribute(`data-${C}-scroll`)):(c.dataset[`${v}Scroll`]=b.toString(),c.dataset[`${C}Scroll`]=y.toString(),c.removeAttribute(`data-${v}-${C}-scroll`))}else{const S=b&&y?"both":b?v:y?C:"none";S!==l.current&&(s?.(S),l.current=S)}},f=()=>{var g,b;const y=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],v=c.querySelector('ul[data-slot="list"]'),C=+((g=v?.getAttribute("data-virtual-scroll-height"))!=null?g:c.scrollHeight),S=+((b=v?.getAttribute("data-virtual-scroll-top"))!=null?b:c.scrollTop);for(const{type:k,prefix:P,suffix:E}of y)if(n===k||n==="both"){const $=k==="vertical"?S>i:c.scrollLeft>i,O=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,$,O,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return f(),c.addEventListener("scroll",f,!0),o!=="auto"&&(m(),o==="both"?(c.dataset.topBottomScroll=String(n==="vertical"),c.dataset.leftRightScroll=String(n==="horizontal")):(c.dataset.topBottomScroll="false",c.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(g=>{c.dataset[`${g}Scroll`]=String(o===g)}))),()=>{c.removeEventListener("scroll",f,!0),m()}},[...a,r,o,n,s,t])}function PG(e){var t;const[r,n]=qr(e,Md.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:f="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);kG({domRef:v,offset:d,visibility:f,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>Md({...n,className:a}),[jr(n),a]);return{Component:y,styles:C,domRef:v,children:s,getBaseProps:(k={})=>{var P;return{ref:v,className:C,"data-orientation":(P=e.orientation)!=null?P:"vertical",style:{"--scroll-shadow-size":`${c}px`,...l,...k.style},...b,...k}}}}var EG=(e,t)=>{const r=[];for(const n of e)n.type==="section"?r.push(([...n.childNodes].length+1)*t):r.push(t);return r},TG=e=>{if(!e||e.scrollTop===void 0||e.clientHeight===void 0||e.scrollHeight===void 0)return{isTop:!1,isBottom:!1,isMiddle:!1};const t=e.scrollTop===0,r=Math.ceil(e.scrollTop+e.clientHeight)>=e.scrollHeight;return{isTop:t,isBottom:r,isMiddle:!t&&!r}},AG=e=>{var t;const{Component:r,state:n,color:o,variant:i,itemClasses:s,getBaseProps:a,topContent:l,bottomContent:c,hideEmptyContent:d,hideSelectedIcon:f,shouldHighlightOnFocus:m,disableAnimation:g,getEmptyContentProps:b,getListProps:y,scrollShadowProps:v}=e,{virtualization:C}=e;if(!C||!hs(C)&&!C.maxListboxHeight&&!C.itemHeight)throw new Error("You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox.");const{maxListboxHeight:S,itemHeight:k}=C,P=Math.min(S,k*n.collection.size),E=x.useRef(null),$=x.useMemo(()=>EG([...n.collection],k),[n.collection,k]),O=jT({count:[...n.collection].length,getScrollElement:()=>E.current,estimateSize:B=>$[B]}),N=O.getVirtualItems(),D=O.getTotalSize(),{getBaseProps:M}=PG({...v}),V=B=>{var U;const W=[...n.collection][B.index];if(!W)return null;const L={color:o,item:W,state:n,variant:i,disableAnimation:g,hideSelectedIcon:f,...W.props},Z={position:"absolute",top:0,left:0,width:"100%",height:`${B.size}px`,transform:`translateY(${B.start}px)`};if(W.type==="section")return h.jsx(NT,{...L,itemClasses:s,style:{...Z,...L.style}},W.key);let T=h.jsx(s0,{...L,classNames:Oe(s,(U=W.props)==null?void 0:U.classNames),shouldHighlightOnFocus:m,style:{...Z,...L.style}},W.key);return W.wrapper&&(T=W.wrapper(T)),T},[R,K]=x.useState({isTop:!1,isBottom:!0,isMiddle:!1}),j=h.jsxs(r,{...y(),"data-virtual-scroll-height":D,"data-virtual-scroll-top":(t=E?.current)==null?void 0:t.scrollTop,children:[!n.collection.size&&!d&&h.jsx("li",{children:h.jsx("div",{...b()})}),h.jsx("div",{...Lt(M()),ref:E,style:{height:S,overflow:"auto"},onScroll:B=>{K(TG(B.target))},children:P>0&&k>0&&h.jsx("div",{style:{height:`${D}px`,width:"100%",position:"relative"},children:N.map(B=>V(B))})})]});return h.jsxs("div",{...a(),children:[l,j,c]})},_G=AG,$G=Xe(function(t,r){const{isVirtualized:n,...o}=t,i=iG({...o,ref:r}),{Component:s,state:a,color:l,variant:c,itemClasses:d,getBaseProps:f,topContent:m,bottomContent:g,hideEmptyContent:b,hideSelectedIcon:y,shouldHighlightOnFocus:v,disableAnimation:C,getEmptyContentProps:S,getListProps:k}=i;if(n)return h.jsx(_G,{...t,...i});const P=h.jsxs(s,{...k(),children:[!a.collection.size&&!b&&h.jsx("li",{children:h.jsx("div",{...S()})}),[...a.collection].map(E=>{var $;const O={color:l,item:E,state:a,variant:c,disableAnimation:C,hideSelectedIcon:y,...E.props};if(E.type==="section")return h.jsx(NT,{...O,itemClasses:d},E.key);let N=h.jsx(s0,{...O,classNames:Oe(d,($=E.props)==null?void 0:$.classNames),shouldHighlightOnFocus:v},E.key);return E.wrapper&&(N=E.wrapper(N)),N})]});return h.jsxs("div",{...f(),children:[m,P,g]})}),l0=$G;function IG(e){var t,r;const n=ur(),[o,i]=qr(e,XC.variantKeys),{as:s,children:a,isLoaded:l=!1,className:c,classNames:d,...f}=o,m=s||"div",g=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,b=x.useMemo(()=>XC({...i,disableAnimation:g}),[jr(i),g,a]),y=A(d?.base,c);return{Component:m,children:a,slots:b,classNames:d,getSkeletonProps:(S={})=>({"data-loaded":ae(l),className:b.base({class:A(y,S?.className)}),...f}),getContentProps:(S={})=>({className:b.content({class:A(d?.content,S?.className)})})}}var LT=Xe((e,t)=>{const{Component:r,children:n,getSkeletonProps:o,getContentProps:i}=IG({...e});return h.jsx(r,{ref:t,...o(),children:h.jsx("div",{...i(),children:n})})});LT.displayName="HeroUI.Skeleton";var Tr=LT;function NG({isLoading:e,phones:t,selectedPhoneSlug:r,onPhoneSelect:n,classNames:o}){const i=x.useCallback(s=>{if(s==="all")return;const a=Array.from(s)[0];n(a)},[n]);return e?h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx("ul",{className:"w-full flex flex-col gap-0.5",children:Array.from({length:10},(s,a)=>h.jsxs("li",{className:"px-2 py-1.5 w-full h-full flex items-center gap-3 rounded-lg",children:[h.jsx(Tr,{className:"rounded-full shrink-0 bg-primary-100 w-10 h-10"}),h.jsx(Tr,{className:"rounded-lg h-4 w-40 bg-content2"})]},`skeleton-${a}`))})}):h.jsx(l0,{selectionMode:"single",variant:"flat","aria-label":"Kies een telefoon",selectedKeys:r?[r]:[],onSelectionChange:i,classNames:{base:A("flex-1 min-h-0 overflow-y-auto p-0",o?.base),...o},children:t.map(s=>h.jsx(Ba,{textValue:s.fullName,children:h.jsxs("div",{className:"flex items-center gap-3",children:[s.productVersion?.media?.main?.url?h.jsx(Hl,{alt:s.productVersion.media.main.altText||s.fullName,src:yv(s.productVersion.media.main.url,64,64),size:"md",radius:"full",color:"primary",classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}):h.jsx(Hl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(cg,{size:24,className:"text-primary"}),classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}),h.jsx("span",{className:"text-sm font-medium",children:s.fullName})]})},s.slug))})}var[DG,u0]=Ca({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),FT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=u0(),f=A(d?.body,o);return h.jsx(a,{ref:l,className:(r=c.body)==null?void 0:r.call(c,{class:f}),...s,children:i})});FT.displayName="HeroUI.CardBody";var BT=FT,zT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=u0(),f=A(d?.footer,o);return h.jsx(a,{ref:l,className:(r=c.footer)==null?void 0:r.call(c,{class:f}),...s,children:i})});zT.displayName="HeroUI.CardFooter";var MG=zT,KT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=u0(),f=A(d?.header,o);return h.jsx(a,{ref:l,className:(r=c.header)==null?void 0:r.call(c,{class:f}),...s,children:i})});KT.displayName="HeroUI.CardHeader";var OG=KT;function jG(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,zC.variantKeys),{ref:l,as:c,children:d,onClick:f,onPress:m,autoFocus:g,className:b,classNames:y,allowTextSelectionOnPress:v=!0,...C}=s,S=ot(l),k=c||(e.isPressable?"button":"div"),P=typeof k=="string",E=(r=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?r:!1,$=(o=(n=e.disableRipple)!=null?n:i?.disableRipple)!=null?o:!1,O=A(y?.base,b),{onClear:N,onPress:D,ripples:M}=ZP(),V=x.useCallback(H=>{$||E||S.current&&D(H)},[$,E,S,D]),{buttonProps:R,isPressed:K}=fp({onPress:co(m,V),elementType:c,isDisabled:!e.isPressable,onClick:f,allowTextSelectionOnPress:v,...C},S),{hoverProps:j,isHovered:B}=dn({isDisabled:!e.isHoverable,...C}),{isFocusVisible:U,isFocused:W,focusProps:L}=Ir({autoFocus:g}),Z=x.useMemo(()=>zC({...a,disableAnimation:E}),[jr(a),E]),T=x.useMemo(()=>({slots:Z,classNames:y,disableAnimation:E,isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,fullWidth:e.fullWidth}),[Z,y,e.isDisabled,e.isFooterBlurred,E,e.fullWidth]),F=x.useCallback((H={})=>({ref:S,className:Z.base({class:O}),tabIndex:e.isPressable?0:-1,"data-hover":ae(B),"data-pressed":ae(K),"data-focus":ae(W),"data-focus-visible":ae(U),"data-disabled":ae(e.isDisabled),...Oe(e.isPressable?{...R,...L,role:"button"}:{},e.isHoverable?j:{},Lt(C,{enabled:P}),Lt(H))}),[S,Z,O,P,e.isPressable,e.isHoverable,e.isDisabled,B,K,U,R,L,j,C]),_=x.useCallback(()=>({ripples:M,onClear:N}),[M,N]);return{context:T,domRef:S,Component:k,classNames:y,children:d,isHovered:B,isPressed:K,disableAnimation:E,isPressable:e.isPressable,isHoverable:e.isHoverable,disableRipple:$,handlePress:V,isFocusVisible:U,getCardProps:F,getRippleProps:_}}var VT=Xe((e,t)=>{const{children:r,context:n,Component:o,isPressable:i,disableAnimation:s,disableRipple:a,getCardProps:l,getRippleProps:c}=jG({...e,ref:t});return h.jsxs(o,{...l(),children:[h.jsx(DG,{value:n,children:r}),i&&!s&&!a&&h.jsx(GP,{...c()})]})});VT.displayName="HeroUI.Card";var Fs=VT;function LG(e){const{collection:t,disabledKeys:r,selectionManager:n,selectionManager:{setSelectedKeys:o,selectedKeys:i,selectionMode:s}}=o0(e),a=x.useMemo(()=>!e.isLoading&&i.size!==0?Array.from(i).filter(Boolean).filter(c=>!t.getItem(c)):[],[i,t]),l=i.size!==0?Array.from(i).map(c=>t.getItem(c)).filter(Boolean):null;return a.length&&console.warn(`Select: Keys "${a.join(", ")}" passed to "selectedKeys" are not present in the collection.`),{collection:t,disabledKeys:r,selectionManager:n,selectionMode:s,selectedKeys:i,setSelectedKeys:o.bind(n),selectedItems:l}}function FG(e){let t=mp(e),[r,n]=x.useState(null),[o,i]=x.useState([]),s=()=>{i([]),t.close()};return{focusStrategy:r,...t,open(c=null){n(c),t.open()},toggle(c=null){n(c),t.toggle()},close(){s()},expandedKeysStack:o,openSubmenu:(c,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),c])},closeSubmenu:(c,d)=>{i(f=>f[d]===c?f.slice(0,d):f)}}}const c0={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},RT={...c0,customError:!0,valid:!1},tu={isInvalid:!1,validationDetails:c0,validationErrors:[]},WT=x.createContext({}),jp="__formValidationState"+Date.now();function ru(e){if(e[jp]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[jp];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return BG(e)}function BG(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:s,validationBehavior:a="aria"}=e;r&&(t||(t=r==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:RT}:null,c=x.useMemo(()=>{if(!s||o==null)return null;let M=zG(s,o);return UT(M)},[s,o]);i?.validationDetails.valid&&(i=void 0);let d=x.useContext(WT),f=x.useMemo(()=>n?Array.isArray(n)?n.flatMap(M=>d0(d[M])):d0(d[n]):[],[d,n]),[m,g]=x.useState(d),[b,y]=x.useState(!1);d!==m&&(g(d),y(!1));let v=x.useMemo(()=>UT(b?[]:f),[b,f]),C=x.useRef(tu),[S,k]=x.useState(tu),P=x.useRef(tu),E=()=>{if(!$)return;O(!1);let M=c||i||C.current;f0(M,P.current)||(P.current=M,k(M))},[$,O]=x.useState(!1);return x.useEffect(E),{realtimeValidation:l||v||c||i||tu,displayValidation:a==="native"?l||v||S:l||v||c||i||S,updateValidation(M){a==="aria"&&!f0(S,M)?k(M):C.current=M},resetValidation(){let M=tu;f0(M,P.current)||(P.current=M,k(M)),a==="native"&&O(!1),y(!0)},commitValidation(){a==="native"&&O(!0),y(!0)}}}function d0(e){return e?Array.isArray(e)?e:[e]:[]}function zG(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return d0(r)}return[]}function UT(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:RT}:null}function f0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,n)=>r===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([r,n])=>t.validationDetails[r]===n)}function KG(...e){let t=new Set,r=!1,n={...c0};for(let s of e){var o,i;for(let a of s.validationErrors)t.add(a);r||(r=s.isInvalid);for(let a in n)(o=n)[i=a]||(o[i]=s.validationDetails[a])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}function VG({validate:e,validationBehavior:t,...r}){const[n,o]=x.useState(!1),[i,s]=x.useState(null),a=FG(r),l=LG({...r,onSelectionChange:f=>{r.onSelectionChange!=null&&(f==="all"?r.onSelectionChange(new Set(l.collection.getKeys())):r.onSelectionChange(f)),r.selectionMode==="single"&&a.close()}}),c=ru({...r,validationBehavior:t,validate:f=>{if(!e)return;const m=Array.from(f);return e(r.selectionMode==="single"?m[0]:m)},value:l.selectedKeys}),d=l.collection.size===0&&r.hideEmptyContent;return{...c,...l,...a,focusStrategy:i,close(){a.close()},open(f=null){d||(s(f),a.open())},toggle(f=null){d||(s(f),a.toggle())},isFocused:n,setFocused:o}}var HT={};HT={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var qT={};qT={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var GT={};GT={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var ZT={};ZT={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var YT={};YT={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var JT={};JT={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var XT={};XT={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var QT={};QT={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var e5={};e5={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var t5={};t5={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var r5={};r5={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var n5={};n5={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var o5={};o5={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var i5={};i5={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var s5={};s5={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var a5={};a5={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var l5={};l5={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var u5={};u5={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var c5={};c5={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var d5={};d5={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var f5={};f5={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var p5={};p5={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var h5={};h5={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var m5={};m5={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var g5={};g5={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var b5={};b5={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var v5={};v5={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var y5={};y5={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var x5={};x5={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var w5={};w5={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var C5={};C5={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var S5={};S5={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var k5={};k5={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var P5={};P5={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var E5={};E5={"ar-AE":HT,"bg-BG":qT,"cs-CZ":GT,"da-DK":ZT,"de-DE":YT,"el-GR":JT,"en-US":XT,"es-ES":QT,"et-EE":e5,"fi-FI":t5,"fr-FR":r5,"he-IL":n5,"hr-HR":o5,"hu-HU":i5,"it-IT":s5,"ja-JP":a5,"ko-KR":l5,"lt-LT":u5,"lv-LV":c5,"nb-NO":d5,"nl-NL":f5,"pl-PL":p5,"pt-BR":h5,"pt-PT":m5,"ro-RO":g5,"ru-RU":b5,"sk-SK":v5,"sl-SI":y5,"sr-SP":x5,"sv-SE":w5,"tr-TR":C5,"uk-UA":S5,"zh-CN":k5,"zh-TW":P5};function RG(e){return e&&e.__esModule?e.default:e}function WG(e,t,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=e,s=rn(),{triggerProps:a,overlayProps:l}=u3({type:n},t,r),c=g=>{if(!o&&!(i==="longPress"&&!g.altKey)&&r&&r.current)switch(g.key){case"Enter":case" ":if(i==="longPress"||g.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in g||g.stopPropagation(),g.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in g||g.stopPropagation(),g.preventDefault(),t.toggle("last");break;default:"continuePropagation"in g&&g.continuePropagation()}},d=ms(RG(E5),"@react-aria/menu"),{longPressProps:f}=e3({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}}),m={preventFocusOnPress:!0,onPressStart(g){g.pointerType!=="touch"&&g.pointerType!=="keyboard"&&!o&&(fo(g.target),t.open(g.pointerType==="virtual"?"first":null))},onPress(g){g.pointerType==="touch"&&!o&&(fo(g.target),t.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?m:f,id:s,onKeyDown:c},menuProps:{...l,"aria-labelledby":s,autoFocus:t.focusStrategy||!0,onClose:t.close}}}function UG(e,t,r){const{disallowEmptySelection:n,isDisabled:o}=e,i=ff({usage:"search",sensitivity:"base"}),s=x.useMemo(()=>new cT(t.collection,t.disabledKeys,null,i),[t.collection,t.disabledKeys,i]),{menuTriggerProps:a,menuProps:l}=WG({isDisabled:o,type:"listbox"},t,r),c=E=>{if(t.selectionMode==="single")switch(E.key){case"ArrowLeft":{E.preventDefault();const $=t.selectedKeys.size>0?s.getKeyAbove(t.selectedKeys.values().next().value):s.getFirstKey();$&&t.setSelectedKeys([$]);break}case"ArrowRight":{E.preventDefault();const $=t.selectedKeys.size>0?s.getKeyBelow(t.selectedKeys.values().next().value):s.getFirstKey();$&&t.setSelectedKeys([$]);break}}},{typeSelectProps:d}=aT({keyboardDelegate:s,selectionManager:t.selectionManager,onTypeSelect(E){t.setSelectedKeys([E])}}),{isInvalid:f,validationErrors:m,validationDetails:g}=t.displayValidation,{labelProps:b,fieldProps:y,descriptionProps:v,errorMessageProps:C}=Op({...e,labelElementType:"span",isInvalid:f,errorMessage:e.errorMessage||m});d.onKeyDown=d.onKeyDownCapture,delete d.onKeyDownCapture,a.onPressStart=E=>{E.pointerType!=="touch"&&E.pointerType!=="keyboard"&&!o&&t.toggle(E.pointerType==="virtual"?"first":null)};const S=Ln(e,{labelable:!0}),k=it(d,a,y),P=rn();return{labelProps:{...b,onClick:()=>{var E;e.isDisabled||((E=r.current)==null||E.focus(),zb("keyboard"))}},triggerProps:it(S,{...k,onKeyDown:gs(k.onKeyDown,c,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[P,k["aria-labelledby"],k["aria-label"]&&!k["aria-labelledby"]?k.id:null].join(" "),onFocus(E){t.isFocused||(e.onFocus&&e.onFocus(E),t.setFocused(!0))},onBlur(E){t.isOpen||(e.onBlur&&e.onBlur(E),t.setFocused(!1))}}),valueProps:{id:P},menuProps:{...l,disallowEmptySelection:n,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,onBlur:E=>{E.currentTarget.contains(E.relatedTarget)||(e.onBlur&&e.onBlur(E),t.setFocused(!1))},onFocus:l?.onFocus,"aria-labelledby":[y["aria-labelledby"],k["aria-label"]&&!y["aria-labelledby"]?k.id:null].filter(Boolean).join(" ")},descriptionProps:v,errorMessageProps:C,isInvalid:f,validationErrors:m,validationDetails:g}}var T5=Symbol("default");function HG(e){const t=x.useRef(null),r=x.useRef(void 0),n=x.useCallback(o=>{if(typeof e=="function"){const i=e,s=i(o);return()=>{typeof s=="function"?s():i(null)}}else if(e)return e.current=o,()=>{e.current=null}},[e]);return x.useMemo(()=>({get current(){return t.current},set current(o){t.current=o,r.current&&(r.current(),r.current=void 0),o!=null&&(r.current=n(o))}}),[n])}function nu(e,t){let r=x.useContext(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=new Intl.ListFormat().format(Object.keys(r.slots).map(i=>`"${i}"`));if(!t&&!r.slots[T5])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let o=t||T5;if(!r.slots[o])throw new Error(`Invalid slot "${t}". Valid slot names are ${n}.`);return r.slots[o]}return r}function qG(e,t,r){let n=nu(r,e.slot)||{},{ref:o,...i}=n,s=HG(x.useMemo(()=>qm(t,o),[t,o])),a=Oe(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?a.style=l=>{let c=typeof i.style=="function"?i.style(l):i.style,d={...l.defaultStyle,...c},f=typeof e.style=="function"?e.style({...l,defaultStyle:d}):e.style;return{...d,...f}}:a.style={...i.style,...e.style}),[a,s]}var za=x.createContext(null);x.forwardRef(function(t,r){[t,r]=qG(t,r,za);let{validationErrors:n,validationBehavior:o="native",children:i,className:s,...a}=t;const l=x.useMemo(()=>lj({className:s}),[s]);return h.jsx("form",{noValidate:o!=="native",...a,ref:r,className:l,children:h.jsx(za.Provider,{value:{...t,validationBehavior:o},children:h.jsx(WT.Provider,{value:n??{},children:i})})})});var A5=new WeakMap;function GG(e){var t,r,n,o,i,s;const a=ur(),{validationBehavior:l}=nu(za)||{},[c,d]=qr(e,GC.variantKeys),f=(r=(t=e.disableAnimation)!=null?t:a?.disableAnimation)!=null?r:!1,{ref:m,as:g,label:b,name:y,isLoading:v,selectorIcon:C,isOpen:S,defaultOpen:k,onOpenChange:P,startContent:E,endContent:$,description:O,renderValue:N,onSelectionChange:D,placeholder:M,isVirtualized:V,itemHeight:R=36,maxListboxHeight:K=256,children:j,disallowEmptySelection:B=!1,selectionMode:U="single",spinnerRef:W,scrollRef:L,popoverProps:Z={},scrollShadowProps:T={},listboxProps:F={},spinnerProps:_={},validationState:H,onChange:Y,onClose:X,className:oe,classNames:Q,validationBehavior:le=(n=l??a?.validationBehavior)!=null?n:"native",hideEmptyContent:ue=!1,onClear:te,...ge}=c,Se=ot(L),pe={popoverProps:Oe({placement:"bottom",triggerScaleOnOpen:!1,offset:5,disableAnimation:f},Z),scrollShadowProps:Oe({ref:Se,isEnabled:(o=e.showScrollIndicators)!=null?o:!0,hideScrollBar:!0,offset:15},T),listboxProps:Oe({disableAnimation:f},F)},we=g||"button",be=typeof we=="string",re=ot(m),ke=x.useRef(null),Ne=x.useRef(null),Me=x.useRef(null);let Pe=VG({...c,isOpen:S,selectionMode:U,disallowEmptySelection:B,validationBehavior:le,children:j,isRequired:e.isRequired,isDisabled:e.isDisabled,isInvalid:e.isInvalid,defaultOpen:k,hideEmptyContent:ue,onOpenChange:_e=>{P?.(_e),_e||X?.()},onSelectionChange:_e=>{D?.(_e),Y&&typeof Y=="function"&&Y({target:{...re.current&&{...re.current,name:re.current.name},value:Array.from(_e).join(",")}}),Pe.commitValidation()}});Pe={...Pe,...e.isDisabled&&{disabledKeys:new Set([...Pe.collection.getKeys()])}},ja(()=>{var _e;(_e=re.current)!=null&&_e.value&&Pe.setSelectedKeys(new Set([...Pe.selectedKeys,re.current.value]))},[re.current]);const{labelProps:Ae,triggerProps:xe,valueProps:Ie,menuProps:et,descriptionProps:wt,errorMessageProps:lt,isInvalid:Ut,validationErrors:ut,validationDetails:Ue}=UG({...c,disallowEmptySelection:B,isDisabled:e.isDisabled},Pe,ke),Vt=x.useCallback(()=>{var _e;Pe.setSelectedKeys(new Set([])),te?.(),(_e=ke.current)==null||_e.focus()},[te,Pe]),{pressProps:Jt}=xn({isDisabled:!!e?.isDisabled,onPress:Vt}),Xt=e.isInvalid||H==="invalid"||Ut,{isPressed:sr,buttonProps:Ct}=fp(xe,ke),{focusProps:Sr,isFocused:dr,isFocusVisible:kr}=Ir(),{focusProps:$t,isFocusVisible:tt}=Ir(),{isHovered:It,hoverProps:ar}=dn({isDisabled:e.isDisabled}),er=eP({labelPlacement:e.labelPlacement,label:b}),Yr=!!M,en=er==="outside-left"||er==="outside"||er==="outside-top",ki=er==="inside",hn=er==="outside-left",to=e.isClearable,Ur=Pe.isOpen||Yr||!!((i=Pe.selectedItems)!=null&&i.length)||!!E||!!$||!!e.isMultiline,jt=!!((s=Pe.selectedItems)!=null&&s.length),Qi=!!b,oa=Qi&&(hn||en&&Yr),Jo=A(Q?.base,oe),St=x.useMemo(()=>GC({...d,isInvalid:Xt,isClearable:to,labelPlacement:er,disableAnimation:f}),[jr(d),Xt,er,f]);Hb({isDisabled:!Pe.isOpen});const Xo=typeof c.errorMessage=="function"?c.errorMessage({isInvalid:Xt,validationErrors:ut,validationDetails:Ue}):c.errorMessage||ut?.join(" "),Pi=!!O||!!Xo,es=!!$;x.useEffect(()=>{if(Pe.isOpen&&Me.current&&ke.current){let _e=ke.current.getBoundingClientRect(),ro=Me.current;ro.style.width=_e.width+"px"}},[Pe.isOpen]);const nl=x.useCallback((_e={})=>({"data-slot":"base","data-filled":ae(Ur),"data-has-value":ae(jt),"data-has-label":ae(Qi),"data-has-helper":ae(Pi),"data-has-end-content":ae(es),"data-invalid":ae(Xt),"data-has-label-outside":ae(oa),className:St.base({class:A(Jo,_e.className)}),..._e}),[St,Pi,jt,Qi,oa,Ur,Jo]),ol=x.useCallback((_e={})=>({ref:ke,"data-slot":"trigger","data-open":ae(Pe.isOpen),"data-disabled":ae(e?.isDisabled),"data-focus":ae(dr),"data-pressed":ae(sr),"data-focus-visible":ae(kr),"data-hover":ae(It),className:St.trigger({class:Q?.trigger}),...Oe(Ct,Sr,ar,Lt(ge,{enabled:be}),Lt(_e))}),[St,ke,Pe.isOpen,Q?.trigger,e?.isDisabled,dr,sr,kr,It,Ct,Sr,ar,ge,be]),ia=x.useCallback((_e={})=>({state:Pe,triggerRef:ke,selectRef:re,selectionMode:U,label:e?.label,name:e?.name,isRequired:e?.isRequired,autoComplete:e?.autoComplete,isDisabled:e?.isDisabled,form:e?.form,onChange:Y,..._e}),[Pe,U,e?.label,e?.autoComplete,e?.name,e?.isDisabled,ke]),Ei=x.useCallback((_e={})=>({"data-slot":"label",className:St.label({class:A(Q?.label,_e.className)}),...Ae,..._e}),[St,Q?.label,Ae]),rt=x.useCallback((_e={})=>({"data-slot":"value",className:St.value({class:A(Q?.value,_e.className)}),...Ie,..._e}),[St,Q?.value,Ie]),Qo=x.useCallback((_e={})=>({"data-slot":"listboxWrapper",className:St.listboxWrapper({class:A(Q?.listboxWrapper,_e?.className)}),style:{maxHeight:K??256,..._e.style},...Oe(pe.scrollShadowProps,_e)}),[St.listboxWrapper,Q?.listboxWrapper,pe.scrollShadowProps,K]),vu=(_e={})=>{const ro=V??Pe.collection.size>50;return{state:Pe,ref:Ne,isVirtualized:ro,virtualization:ro?{maxListboxHeight:K,itemHeight:R}:void 0,"data-slot":"listbox",className:St.listbox({class:A(Q?.listbox,_e?.className)}),scrollShadowProps:pe.scrollShadowProps,...Oe(pe.listboxProps,_e,et)}},an=x.useCallback((_e={})=>{var ro,Ti;const To=Oe(pe.popoverProps,_e);return{state:Pe,triggerRef:ke,ref:Me,"data-slot":"popover",scrollRef:Ne,triggerType:"listbox",classNames:{content:St.popoverContent({class:A(Q?.popoverContent,_e.className)})},...To,offset:Pe.selectedItems&&Pe.selectedItems.length>0?Pe.selectedItems.length*1e-8+(((ro=pe.popoverProps)==null?void 0:ro.offset)||0):(Ti=pe.popoverProps)==null?void 0:Ti.offset}},[St,Q?.popoverContent,pe.popoverProps,ke,Pe,Pe.selectedItems]),yu=x.useCallback(()=>({"data-slot":"selectorIcon","aria-hidden":ae(!0),"data-open":ae(Pe.isOpen),className:St.selectorIcon({class:Q?.selectorIcon})}),[St,Q?.selectorIcon,Pe.isOpen]),sa=x.useCallback((_e={})=>({..._e,"data-slot":"innerWrapper",className:St.innerWrapper({class:A(Q?.innerWrapper,_e?.className)})}),[St,Q?.innerWrapper]),il=x.useCallback((_e={})=>({..._e,"data-slot":"helperWrapper",className:St.helperWrapper({class:A(Q?.helperWrapper,_e?.className)})}),[St,Q?.helperWrapper]),aa=x.useCallback((_e={})=>({..._e,...wt,"data-slot":"description",className:St.description({class:A(Q?.description,_e?.className)})}),[St,Q?.description]),od=x.useCallback((_e={})=>({..._e,"data-slot":"mainWrapper",className:St.mainWrapper({class:A(Q?.mainWrapper,_e?.className)})}),[St,Q?.mainWrapper]),ts=x.useCallback((_e={})=>({..._e,"data-slot":"end-wrapper",className:St.endWrapper({class:A(Q?.endWrapper,_e?.className)})}),[St,Q?.endWrapper]),sl=x.useCallback((_e={})=>({..._e,"data-slot":"end-content",className:St.endContent({class:A(Q?.endContent,_e?.className)})}),[St,Q?.endContent]),rs=x.useCallback((_e={})=>({..._e,...lt,"data-slot":"error-message",className:St.errorMessage({class:A(Q?.errorMessage,_e?.className)})}),[St,lt,Q?.errorMessage]),Dr=x.useCallback((_e={})=>({"aria-hidden":ae(!0),"data-slot":"spinner",color:"current",size:"sm",..._,..._e,ref:W,className:St.spinner({class:A(Q?.spinner,_e?.className)})}),[St,W,_,Q?.spinner]),Eo=x.useCallback((_e={})=>({..._e,type:"button",tabIndex:-1,"aria-label":"clear selection","data-slot":"clear-button","data-focus-visible":ae(tt),className:St.clearButton({class:A(Q?.clearButton,_e?.className)}),...Oe(Jt,$t)}),[St,tt,Jt,$t,Q?.clearButton]);return A5.set(Pe,{isDisabled:e?.isDisabled,isRequired:e?.isRequired,name:e?.name,isInvalid:Xt,validationBehavior:le}),{Component:we,domRef:re,state:Pe,label:b,name:y,triggerRef:ke,isLoading:v,placeholder:M,startContent:E,endContent:$,description:O,selectorIcon:C,hasHelper:Pi,labelPlacement:er,hasPlaceholder:Yr,renderValue:N,selectionMode:U,disableAnimation:f,isOutsideLeft:hn,shouldLabelBeOutside:en,shouldLabelBeInside:ki,isInvalid:Xt,errorMessage:Xo,isClearable:to,getClearButtonProps:Eo,getBaseProps:nl,getTriggerProps:ol,getLabelProps:Ei,getValueProps:rt,getListboxProps:vu,getPopoverProps:an,getSpinnerProps:Dr,getMainWrapperProps:od,getListboxWrapperProps:Qo,getHiddenSelectProps:ia,getInnerWrapperProps:sa,getHelperWrapperProps:il,getDescriptionProps:aa,getErrorMessageProps:rs,getSelectorIconProps:yu,getEndWrapperProps:ts,getEndContentProps:sl}}var ZG=typeof document<"u"?x.useLayoutEffect:()=>{};function YG(e){const t=x.useRef(null);return ZG(()=>{t.current=e},[e]),x.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function JG(e,t,r){let n=x.useRef(t),o=YG(()=>{r&&r(n.current)});x.useEffect(()=>{var i;let s=(i=e?.current)==null?void 0:i.form;return s?.addEventListener("reset",o),()=>{s?.removeEventListener("reset",o)}},[e,o])}function Lp(e,t,r){let{validationBehavior:n,focus:o}=e;Gt(()=>{if(n==="native"&&r?.current&&!r.current.disabled){let c=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(c),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(QG(r.current))}});let i=x.useRef(!1),s=vn(()=>{i.current||t.resetValidation()}),a=vn(c=>{var d;t.displayValidation.isInvalid||t.commitValidation();let f=r==null||(d=r.current)===null||d===void 0?void 0:d.form;if(!c.defaultPrevented&&r&&f&&eZ(f)===r.current){var m;o?o():(m=r.current)===null||m===void 0||m.focus(),zb("keyboard")}c.preventDefault()}),l=vn(()=>{t.commitValidation()});x.useEffect(()=>{let c=r?.current;if(!c)return;let d=c.form,f=d?.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,f?.call(d),i.current=!1}),c.addEventListener("invalid",a),c.addEventListener("change",l),d?.addEventListener("reset",s),()=>{c.removeEventListener("invalid",a),c.removeEventListener("change",l),d?.removeEventListener("reset",s),d&&(d.reset=f)}},[r,n])}function XG(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function QG(e){return{isInvalid:!e.validity.valid,validationDetails:XG(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function eZ(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}function tZ(e,t,r){var n;let o=A5.get(t)||{},{autoComplete:i,name:s=o.name,isDisabled:a=o.isDisabled,selectionMode:l,onChange:c,form:d}=e,{validationBehavior:f,isRequired:m,isInvalid:g}=o,{visuallyHiddenProps:b}=Y3();return JG(e.selectRef,t.selectedKeys,t.setSelectedKeys),Lp({validationBehavior:f,focus:()=>{var y;return(y=r.current)==null?void 0:y.focus()}},t,e.selectRef),{containerProps:{...b,"aria-hidden":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{form:d,autoComplete:i,disabled:a,"aria-invalid":g||void 0,"aria-required":m&&f==="aria"||void 0,required:m&&f==="native",name:s,tabIndex:-1,value:l==="multiple"?[...t.selectedKeys].map(y=>String(y)):(n=[...t.selectedKeys][0])!=null?n:"",multiple:l==="multiple",onChange:y=>{t.setSelectedKeys(y.target.value),c?.(y)}}}}function rZ(e){var t;let{state:r,triggerRef:n,selectRef:o,label:i,name:s,isDisabled:a,form:l}=e,{containerProps:c,selectProps:d}=tZ({...e,selectRef:o},r,n);return r.collection.size<=300?h.jsx("div",{...c,"data-testid":"hidden-select-container",children:h.jsxs("label",{children:[i,h.jsxs("select",{...d,ref:o,children:[h.jsx("option",{}),[...r.collection.getKeys()].map(f=>{let m=r.collection.getItem(f);if(m?.type==="item")return h.jsx("option",{value:m.key,children:m.textValue},m.key)})]})]})}):s?h.jsx("input",{autoComplete:d.autoComplete,disabled:a,form:l,name:s,type:"hidden",value:(t=[...r.selectedKeys].join(","))!=null?t:""}):null}function nZ(e,t){const{groupRef:r,triggerRef:n,popoverRef:o,showArrow:i,offset:s=7,crossOffset:a=0,scrollRef:l,shouldFlip:c,boundaryElement:d,isDismissable:f=!0,shouldCloseOnBlur:m=!0,shouldCloseOnScroll:g=!0,placement:b="top",containerPadding:y,shouldCloseOnInteractOutside:v,isNonModal:C,isKeyboardDismissDisabled:S,updatePositionDeps:k=[],...P}=e,E=C??!0,$=P.trigger==="SubmenuTrigger",{overlayProps:O,underlayProps:N}=wv({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:m,isDismissable:f||$,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:v||(j=>{var B;return!((B=n.current)!=null&&B.contains(j))}),disableOutsideEvents:!E},o),{overlayProps:D,arrowProps:M,placement:V,updatePosition:R,triggerAnchorPoint:K}=Nk({...P,shouldFlip:c,crossOffset:a,targetRef:n,overlayRef:o,isOpen:t.isOpen,scrollRef:l,boundaryElement:d,containerPadding:y,placement:AT(b),offset:i?s+3:s,onClose:E&&!$&&g?t.close:()=>{}});return ja(()=>{k.length&&R()},k),x.useEffect(()=>{var j,B;if(t.isOpen&&o.current)return E?Yq((j=r?.current)!=null?j:o.current):Zq([(B=r?.current)!=null?B:o.current])},[E,t.isOpen,o,r]),{popoverProps:Oe(O,D),arrowProps:M,underlayProps:N,placement:V,triggerAnchorPoint:K}}var oZ="top";function iZ(e){var t,r,n;const o=ur(),[i,s]=qr(e,Dd.variantKeys),{as:a,ref:l,children:c,state:d,triggerRef:f,scrollRef:m,defaultOpen:g,onOpenChange:b,isOpen:y,isNonModal:v=!0,shouldFlip:C=!0,containerPadding:S=12,shouldBlockScroll:k=!1,isDismissable:P=!0,shouldCloseOnBlur:E,portalContainer:$,updatePositionDeps:O,dialogProps:N,placement:D=oZ,triggerType:M="dialog",showArrow:V=!1,offset:R=7,crossOffset:K=0,boundaryElement:j,isKeyboardDismissDisabled:B,shouldCloseOnInteractOutside:U,shouldCloseOnScroll:W,triggerAnchorPoint:L,motionProps:Z,className:T,classNames:F,onClose:_,...H}=i,Y=a||"div",X=ot(l),oe=x.useRef(null),Q=x.useRef(!1),le=f||oe,ue=(r=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?r:!1,te=mp({isOpen:y,defaultOpen:g,onOpenChange:Ue=>{b?.(Ue),Ue||_?.()}}),ge=d||te,{popoverProps:Se,underlayProps:pe,placement:we}=nZ({triggerRef:le,isNonModal:v,popoverRef:X,placement:D,offset:R,scrollRef:m,isDismissable:P,shouldCloseOnBlur:E,boundaryElement:j,crossOffset:K,shouldFlip:C,containerPadding:S,updatePositionDeps:O,isKeyboardDismissDisabled:B,shouldCloseOnScroll:W,shouldCloseOnInteractOutside:U,triggerAnchorPoint:L},ge),be=x.useMemo(()=>we?Gq(we,D)?we:D:null,[we,D]),{triggerProps:re}=u3({type:M},ge,le),{isFocusVisible:ke,isFocused:Ne,focusProps:Me}=Ir(),Pe=x.useMemo(()=>Dd({...s}),[jr(s)]),Ae=A(F?.base,T),xe={"--trigger-anchor-point":L?`${L.x}px ${L.y}px`:void 0};Hb({isDisabled:!(k&&ge.isOpen)});const Ie=(Ue={})=>({ref:X,...Oe(Se,H,Ue),style:Oe(Se.style,H.style,Ue.style)}),et=(Ue={})=>({"data-slot":"base","data-open":ae(ge.isOpen),"data-focus":ae(Ne),"data-arrow":ae(V),"data-focus-visible":ae(ke),"data-placement":we?Dp(we,D):void 0,...Oe(Me,N,Ue),className:Pe.base({class:A(Ae)}),style:{outline:"none",...xe}}),wt=x.useCallback((Ue={})=>({"data-slot":"content","data-open":ae(ge.isOpen),"data-arrow":ae(V),"data-placement":we?Dp(we,D):void 0,className:Pe.content({class:A(F?.content,Ue.className)})}),[Pe,ge.isOpen,V,be,D,F,we]),lt=x.useCallback(Ue=>{var Vt;let Jt;return Ue.pointerType==="touch"&&(e?.backdrop==="blur"||e?.backdrop==="opaque")?Jt=setTimeout(()=>{Q.current=!0},100):Q.current=!0,(Vt=re.onPress)==null||Vt.call(re,Ue),()=>{clearTimeout(Jt)}},[re?.onPress]),Ut=x.useCallback((Ue={},Vt=null)=>{const{isDisabled:Jt,...Xt}=Ue;return{"data-slot":"trigger",...Oe({"aria-haspopup":"dialog"},re,Xt),onPress:lt,isDisabled:Jt,className:Pe.trigger({class:A(F?.trigger,Ue.className),isTriggerDisabled:Jt}),ref:qm(Vt,le)}},[ge,re,lt,le]),ut=x.useCallback((Ue={})=>({"data-slot":"backdrop",className:Pe.backdrop({class:F?.backdrop}),onClick:Vt=>{if(!Q.current){Vt.preventDefault();return}ge.close(),Q.current=!1},...pe,...Ue}),[Pe,ge.isOpen,F,pe]);return{state:ge,Component:Y,children:c,classNames:F,showArrow:V,triggerRef:le,placement:be,isNonModal:v,popoverRef:X,portalContainer:$,isOpen:ge.isOpen,onClose:ge.close,disableAnimation:ue,shouldBlockScroll:k,backdrop:(n=e.backdrop)!=null?n:"transparent",motionProps:Z,getBackdropProps:ut,getPopoverProps:Ie,getTriggerProps:Ut,getDialogProps:et,getContentProps:wt}}var _5=()=>Promise.resolve().then(()=>nd).then(e=>e.default),$5=Xe(({children:e,motionProps:t,placement:r,disableAnimation:n,style:o={},transformOrigin:i={},...s},a)=>{let l=o;return i.originX!==void 0||i.originY!==void 0?l={...l,transformOrigin:i}:r&&(l={...l,...TT(r==="center"?"top":r)}),n?h.jsx("div",{...s,ref:a,children:e}):h.jsx(Ps,{features:_5,children:h.jsx(Es.div,{ref:a,animate:"enter",exit:"exit",initial:"initial",style:l,variants:hp.scaleSpringOpacity,...Oe(s,t),children:e})})});$5.displayName="HeroUI.FreeSoloPopoverWrapper";var I5=Xe(({children:e,transformOrigin:t,disableDialogFocus:r=!1,...n},o)=>{const{Component:i,state:s,placement:a,backdrop:l,portalContainer:c,disableAnimation:d,motionProps:f,isNonModal:m,getPopoverProps:g,getBackdropProps:b,getDialogProps:y,getContentProps:v}=iZ({...n,ref:o}),C=Er.useRef(null),{dialogProps:S,titleProps:k}=dE({},C),P=y({...!r&&{ref:C},...S}),E=Er.useMemo(()=>l==="transparent"?null:d?h.jsx("div",{...b()}):h.jsx(Ps,{features:_5,children:h.jsx(Es.div,{animate:"enter",exit:"exit",initial:"exit",variants:hp.fade,...b()})}),[l,d,b]);return h.jsxs(X3,{portalContainer:c,children:[!m&&E,h.jsx(i,{...g(),children:h.jsxs($5,{disableAnimation:d,motionProps:f,placement:a,tabIndex:-1,transformOrigin:t,...P,children:[!m&&h.jsx(Jf,{onDismiss:s.close}),h.jsx("div",{...v(),children:typeof e=="function"?e(k):e}),h.jsx(Jf,{onDismiss:s.close})]})})]})});I5.displayName="HeroUI.FreeSoloPopover";var sZ=I5;function aZ(e={}){const{domRef:t,isEnabled:r=!0,overflowCheck:n="vertical",visibility:o="auto",offset:i=0,onVisibilityChange:s,updateDeps:a=[]}=e,l=x.useRef(o);x.useEffect(()=>{const c=t?.current;if(!c||!r)return;const d=(g,b,y,v,C)=>{if(o==="auto"){const S=`${v}${o4(C)}Scroll`;b&&y?(c.dataset[S]="true",c.removeAttribute(`data-${v}-scroll`),c.removeAttribute(`data-${C}-scroll`)):(c.dataset[`${v}Scroll`]=b.toString(),c.dataset[`${C}Scroll`]=y.toString(),c.removeAttribute(`data-${v}-${C}-scroll`))}else{const S=b&&y?"both":b?v:y?C:"none";S!==l.current&&(s?.(S),l.current=S)}},f=()=>{var g,b;const y=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],v=c.querySelector('ul[data-slot="list"]'),C=+((g=v?.getAttribute("data-virtual-scroll-height"))!=null?g:c.scrollHeight),S=+((b=v?.getAttribute("data-virtual-scroll-top"))!=null?b:c.scrollTop);for(const{type:k,prefix:P,suffix:E}of y)if(n===k||n==="both"){const $=k==="vertical"?S>i:c.scrollLeft>i,O=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,$,O,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return f(),c.addEventListener("scroll",f,!0),o!=="auto"&&(m(),o==="both"?(c.dataset.topBottomScroll=String(n==="vertical"),c.dataset.leftRightScroll=String(n==="horizontal")):(c.dataset.topBottomScroll="false",c.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(g=>{c.dataset[`${g}Scroll`]=String(o===g)}))),()=>{c.removeEventListener("scroll",f,!0),m()}},[...a,r,o,n,s,t])}function lZ(e){var t;const[r,n]=qr(e,Md.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:f="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);aZ({domRef:v,offset:d,visibility:f,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>Md({...n,className:a}),[jr(n),a]);return{Component:y,styles:C,domRef:v,children:s,getBaseProps:(k={})=>{var P;return{ref:v,className:C,"data-orientation":(P=e.orientation)!=null?P:"vertical",style:{"--scroll-shadow-size":`${c}px`,...l,...k.style},...b,...k}}}}var N5=Xe((e,t)=>{const{Component:r,children:n,getBaseProps:o}=lZ({...e,ref:t});return h.jsx(r,{...o(),children:n})});N5.displayName="HeroUI.ScrollShadow";var p0=N5,uZ=Xe(function(t,r){var n;const{Component:o,state:i,label:s,hasHelper:a,isLoading:l,triggerRef:c,selectorIcon:d=h.jsx(cE,{}),description:f,errorMessage:m,isInvalid:g,startContent:b,endContent:y,placeholder:v,renderValue:C,shouldLabelBeOutside:S,disableAnimation:k,getBaseProps:P,getLabelProps:E,getTriggerProps:$,getValueProps:O,getListboxProps:N,getPopoverProps:D,getSpinnerProps:M,getMainWrapperProps:V,getInnerWrapperProps:R,getHiddenSelectProps:K,getHelperWrapperProps:j,getListboxWrapperProps:B,getDescriptionProps:U,getErrorMessageProps:W,getSelectorIconProps:L,isClearable:Z,getClearButtonProps:T,getEndWrapperProps:F,getEndContentProps:_}=GG({...t,ref:r}),H=s?h.jsx("label",{...E(),children:s}):null,Y=x.cloneElement(d,L()),X=x.useMemo(()=>{var ge;return Z&&((ge=i.selectedItems)!=null&&ge.length)?h.jsx("span",{...T(),children:h.jsx(xv,{})}):null},[Z,T,(n=i.selectedItems)==null?void 0:n.length]),oe=x.useMemo(()=>X?h.jsxs("div",{...F(),children:[X,y&&h.jsx("span",{..._(),children:y})]}):y&&h.jsx("span",{..._(),children:y}),[X,y,F,_]),Q=x.useMemo(()=>{const ge=g&&m;return!a||!(ge||f)?null:h.jsx("div",{...j(),children:ge?h.jsx("div",{...W(),children:m}):h.jsx("div",{...U(),children:f})})},[a,g,m,f,j,W,U]),le=x.useMemo(()=>{var ge;if(!((ge=i.selectedItems)!=null&&ge.length))return v;if(C&&typeof C=="function"){const Se=[...i.selectedItems].map(pe=>({key:pe.key,data:pe.value,type:pe.type,props:pe.props,textValue:pe.textValue,rendered:pe.rendered,"aria-label":pe["aria-label"]}));return C(Se)}return i.selectedItems.map(Se=>Se.textValue).join(", ")},[i.selectedItems,C,v]),ue=x.useMemo(()=>l?h.jsx(JP,{...M()}):Y,[l,Y,M]),te=x.useMemo(()=>i.isOpen?h.jsx(sZ,{...D(),children:h.jsx(p0,{...B(),children:h.jsx(l0,{...N()})})}):null,[i.isOpen,D,i,c,B,N]);return h.jsxs("div",{...P(),children:[h.jsx(rZ,{...K()}),S?H:null,h.jsxs("div",{...V(),children:[h.jsxs(o,{...$(),children:[S?null:H,h.jsxs("div",{...R(),children:[b,h.jsx("span",{...O(),children:le}),y&&i.selectedItems&&h.jsx(Vl,{elementType:"span",children:","}),oe]}),ue]}),Q]}),k?te:h.jsx(lc,{children:te})]})}),Tc=uZ;const cZ=ft`
|
|
227
227
|
query phoneSelectorDefaultProductVersion($slug: String!) {
|
|
228
228
|
product(slug: $slug) {
|
|
229
229
|
fullName
|
|
@@ -262,7 +262,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
`,dZ=
|
|
265
|
+
`,dZ=ft`
|
|
266
266
|
query phoneSelectorProductVersion($slug: String!, $properties: [InputDistinctProperty!]!) {
|
|
267
267
|
product(slug: $slug) {
|
|
268
268
|
fullName
|
|
@@ -289,27 +289,27 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
`;function h0(e,t){const r=(t??[]).map(c=>({key:c.key,value:c.option.key})),{data:n,error:o,isLoading:i}=Vo(e&&r.length===0?[cZ,{slug:e}]:null,{use:[Yn],fetcher:nn}),{data:s,error:a,isLoading:l}=Vo(e&&r.length>0?[dZ,{slug:e,properties:r}]:null,{use:[Yn],fetcher:nn});return e?r.length===0?{product:n?.product,productVersion:n?.product?.productVersion,isLoading:i,error:o}:{product:s?.product,productVersion:s?.product?.productVersion,isLoading:l,error:a}:{product:null,productVersion:null,isLoading:!1,error:null}}var m0,D5;function fZ(){if(D5)return m0;D5=1;function e(){this.__data__=[],this.size=0}return m0=e,m0}var g0,M5;function O5(){if(M5)return g0;M5=1;function e(t,r){return t===r||t!==t&&r!==r}return g0=e,g0}var b0,j5;function Fp(){if(j5)return b0;j5=1;var e=O5();function t(r,n){for(var o=r.length;o--;)if(e(r[o][0],n))return o;return-1}return b0=t,b0}var v0,L5;function pZ(){if(L5)return v0;L5=1;var e=Fp(),t=Array.prototype,r=t.splice;function n(o){var i=this.__data__,s=e(i,o);if(s<0)return!1;var a=i.length-1;return s==a?i.pop():r.call(i,s,1),--this.size,!0}return v0=n,v0}var y0,F5;function hZ(){if(F5)return y0;F5=1;var e=Fp();function t(r){var n=this.__data__,o=e(n,r);return o<0?void 0:n[o][1]}return y0=t,y0}var x0,B5;function mZ(){if(B5)return x0;B5=1;var e=Fp();function t(r){return e(this.__data__,r)>-1}return x0=t,x0}var w0,z5;function gZ(){if(z5)return w0;z5=1;var e=Fp();function t(r,n){var o=this.__data__,i=e(o,r);return i<0?(++this.size,o.push([r,n])):o[i][1]=n,this}return w0=t,w0}var C0,K5;function Bp(){if(K5)return C0;K5=1;var e=fZ(),t=pZ(),r=hZ(),n=mZ(),o=gZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,C0=i,C0}var S0,V5;function bZ(){if(V5)return S0;V5=1;var e=Bp();function t(){this.__data__=new e,this.size=0}return S0=t,S0}var k0,R5;function vZ(){if(R5)return k0;R5=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return k0=e,k0}var P0,W5;function yZ(){if(W5)return P0;W5=1;function e(t){return this.__data__.get(t)}return P0=e,P0}var E0,U5;function xZ(){if(U5)return E0;U5=1;function e(t){return this.__data__.has(t)}return E0=e,E0}var T0,H5;function q5(){if(H5)return T0;H5=1;var e=typeof fs=="object"&&fs&&fs.Object===Object&&fs;return T0=e,T0}var A0,G5;function Ui(){if(G5)return A0;G5=1;var e=q5(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return A0=r,A0}var _0,Z5;function zp(){if(Z5)return _0;Z5=1;var e=Ui(),t=e.Symbol;return _0=t,_0}var $0,Y5;function wZ(){if(Y5)return $0;Y5=1;var e=zp(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function i(s){var a=r.call(s,o),l=s[o];try{s[o]=void 0;var c=!0}catch{}var d=n.call(s);return c&&(a?s[o]=l:delete s[o]),d}return $0=i,$0}var I0,J5;function CZ(){if(J5)return I0;J5=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return I0=r,I0}var N0,X5;function Ac(){if(X5)return N0;X5=1;var e=zp(),t=wZ(),r=CZ(),n="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function s(a){return a==null?a===void 0?o:n:i&&i in Object(a)?t(a):r(a)}return N0=s,N0}var D0,Q5;function M0(){if(Q5)return D0;Q5=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return D0=e,D0}var O0,eA;function tA(){if(eA)return O0;eA=1;var e=Ac(),t=M0(),r="[object AsyncFunction]",n="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function s(a){if(!t(a))return!1;var l=e(a);return l==n||l==o||l==r||l==i}return O0=s,O0}var j0,rA;function SZ(){if(rA)return j0;rA=1;var e=Ui(),t=e["__core-js_shared__"];return j0=t,j0}var L0,nA;function kZ(){if(nA)return L0;nA=1;var e=SZ(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return L0=r,L0}var F0,oA;function iA(){if(oA)return F0;oA=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return F0=r,F0}var B0,sA;function PZ(){if(sA)return B0;sA=1;var e=tA(),t=kZ(),r=M0(),n=iA(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,d=RegExp("^"+l.call(c).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(m){if(!r(m)||t(m))return!1;var g=e(m)?d:i;return g.test(n(m))}return B0=f,B0}var z0,aA;function EZ(){if(aA)return z0;aA=1;function e(t,r){return t?.[r]}return z0=e,z0}var K0,lA;function ou(){if(lA)return K0;lA=1;var e=PZ(),t=EZ();function r(n,o){var i=t(n,o);return e(i)?i:void 0}return K0=r,K0}var V0,uA;function R0(){if(uA)return V0;uA=1;var e=ou(),t=Ui(),r=e(t,"Map");return V0=r,V0}var W0,cA;function Kp(){if(cA)return W0;cA=1;var e=ou(),t=e(Object,"create");return W0=t,W0}var U0,dA;function TZ(){if(dA)return U0;dA=1;var e=Kp();function t(){this.__data__=e?e(null):{},this.size=0}return U0=t,U0}var H0,fA;function AZ(){if(fA)return H0;fA=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return H0=e,H0}var q0,pA;function _Z(){if(pA)return q0;pA=1;var e=Kp(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function o(i){var s=this.__data__;if(e){var a=s[i];return a===t?void 0:a}return n.call(s,i)?s[i]:void 0}return q0=o,q0}var G0,hA;function $Z(){if(hA)return G0;hA=1;var e=Kp(),t=Object.prototype,r=t.hasOwnProperty;function n(o){var i=this.__data__;return e?i[o]!==void 0:r.call(i,o)}return G0=n,G0}var Z0,mA;function IZ(){if(mA)return Z0;mA=1;var e=Kp(),t="__lodash_hash_undefined__";function r(n,o){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&o===void 0?t:o,this}return Z0=r,Z0}var Y0,gA;function NZ(){if(gA)return Y0;gA=1;var e=TZ(),t=AZ(),r=_Z(),n=$Z(),o=IZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Y0=i,Y0}var J0,bA;function DZ(){if(bA)return J0;bA=1;var e=NZ(),t=Bp(),r=R0();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return J0=n,J0}var X0,vA;function MZ(){if(vA)return X0;vA=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return X0=e,X0}var Q0,yA;function Vp(){if(yA)return Q0;yA=1;var e=MZ();function t(r,n){var o=r.__data__;return e(n)?o[typeof n=="string"?"string":"hash"]:o.map}return Q0=t,Q0}var ey,xA;function OZ(){if(xA)return ey;xA=1;var e=Vp();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return ey=t,ey}var ty,wA;function jZ(){if(wA)return ty;wA=1;var e=Vp();function t(r){return e(this,r).get(r)}return ty=t,ty}var ry,CA;function LZ(){if(CA)return ry;CA=1;var e=Vp();function t(r){return e(this,r).has(r)}return ry=t,ry}var ny,SA;function FZ(){if(SA)return ny;SA=1;var e=Vp();function t(r,n){var o=e(this,r),i=o.size;return o.set(r,n),this.size+=o.size==i?0:1,this}return ny=t,ny}var oy,kA;function iy(){if(kA)return oy;kA=1;var e=DZ(),t=OZ(),r=jZ(),n=LZ(),o=FZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,oy=i,oy}var sy,PA;function BZ(){if(PA)return sy;PA=1;var e=Bp(),t=R0(),r=iy(),n=200;function o(i,s){var a=this.__data__;if(a instanceof e){var l=a.__data__;if(!t||l.length<n-1)return l.push([i,s]),this.size=++a.size,this;a=this.__data__=new r(l)}return a.set(i,s),this.size=a.size,this}return sy=o,sy}var ay,EA;function TA(){if(EA)return ay;EA=1;var e=Bp(),t=bZ(),r=vZ(),n=yZ(),o=xZ(),i=BZ();function s(a){var l=this.__data__=new e(a);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=o,s.prototype.set=i,ay=s,ay}var ly,AA;function zZ(){if(AA)return ly;AA=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return ly=t,ly}var uy,_A;function KZ(){if(_A)return uy;_A=1;function e(t){return this.__data__.has(t)}return uy=e,uy}var cy,$A;function IA(){if($A)return cy;$A=1;var e=iy(),t=zZ(),r=KZ();function n(o){var i=-1,s=o==null?0:o.length;for(this.__data__=new e;++i<s;)this.add(o[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,cy=n,cy}var dy,NA;function VZ(){if(NA)return dy;NA=1;function e(t,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(t[n],n,t))return!0;return!1}return dy=e,dy}var fy,DA;function MA(){if(DA)return fy;DA=1;function e(t,r){return t.has(r)}return fy=e,fy}var py,OA;function jA(){if(OA)return py;OA=1;var e=IA(),t=VZ(),r=MA(),n=1,o=2;function i(s,a,l,c,d,f){var m=l&n,g=s.length,b=a.length;if(g!=b&&!(m&&b>g))return!1;var y=f.get(s),v=f.get(a);if(y&&v)return y==a&&v==s;var C=-1,S=!0,k=l&o?new e:void 0;for(f.set(s,a),f.set(a,s);++C<g;){var P=s[C],E=a[C];if(c)var $=m?c(E,P,C,a,s,f):c(P,E,C,s,a,f);if($!==void 0){if($)continue;S=!1;break}if(k){if(!t(a,function(O,N){if(!r(k,N)&&(P===O||d(P,O,l,c,f)))return k.push(N)})){S=!1;break}}else if(!(P===E||d(P,E,l,c,f))){S=!1;break}}return f.delete(s),f.delete(a),S}return py=i,py}var hy,LA;function RZ(){if(LA)return hy;LA=1;var e=Ui(),t=e.Uint8Array;return hy=t,hy}var my,FA;function WZ(){if(FA)return my;FA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o,i){n[++r]=[i,o]}),n}return my=e,my}var gy,BA;function by(){if(BA)return gy;BA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o){n[++r]=o}),n}return gy=e,gy}var vy,zA;function UZ(){if(zA)return vy;zA=1;var e=zp(),t=RZ(),r=O5(),n=jA(),o=WZ(),i=by(),s=1,a=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",m="[object Number]",g="[object RegExp]",b="[object Set]",y="[object String]",v="[object Symbol]",C="[object ArrayBuffer]",S="[object DataView]",k=e?e.prototype:void 0,P=k?k.valueOf:void 0;function E($,O,N,D,M,V,R){switch(N){case S:if($.byteLength!=O.byteLength||$.byteOffset!=O.byteOffset)return!1;$=$.buffer,O=O.buffer;case C:return!($.byteLength!=O.byteLength||!V(new t($),new t(O)));case l:case c:case m:return r(+$,+O);case d:return $.name==O.name&&$.message==O.message;case g:case y:return $==O+"";case f:var K=o;case b:var j=D&s;if(K||(K=i),$.size!=O.size&&!j)return!1;var B=R.get($);if(B)return B==O;D|=a,R.set($,O);var U=n(K($),K(O),D,M,V,R);return R.delete($),U;case v:if(P)return P.call($)==P.call(O)}return!1}return vy=E,vy}var yy,KA;function HZ(){if(KA)return yy;KA=1;function e(t,r){for(var n=-1,o=r.length,i=t.length;++n<o;)t[i+n]=r[n];return t}return yy=e,yy}var xy,VA;function Bs(){if(VA)return xy;VA=1;var e=Array.isArray;return xy=e,xy}var wy,RA;function qZ(){if(RA)return wy;RA=1;var e=HZ(),t=Bs();function r(n,o,i){var s=o(n);return t(n)?s:e(s,i(n))}return wy=r,wy}var Cy,WA;function GZ(){if(WA)return Cy;WA=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=0,s=[];++n<o;){var a=t[n];r(a,n,t)&&(s[i++]=a)}return s}return Cy=e,Cy}var Sy,UA;function ZZ(){if(UA)return Sy;UA=1;function e(){return[]}return Sy=e,Sy}var ky,HA;function YZ(){if(HA)return ky;HA=1;var e=GZ(),t=ZZ(),r=Object.prototype,n=r.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(s){return s==null?[]:(s=Object(s),e(o(s),function(a){return n.call(s,a)}))}:t;return ky=i,ky}var Py,qA;function JZ(){if(qA)return Py;qA=1;function e(t,r){for(var n=-1,o=Array(t);++n<t;)o[n]=r(n);return o}return Py=e,Py}var Ey,GA;function _c(){if(GA)return Ey;GA=1;function e(t){return t!=null&&typeof t=="object"}return Ey=e,Ey}var Ty,ZA;function XZ(){if(ZA)return Ty;ZA=1;var e=Ac(),t=_c(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return Ty=n,Ty}var Ay,YA;function JA(){if(YA)return Ay;YA=1;var e=XZ(),t=_c(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&n.call(s,"callee")&&!o.call(s,"callee")};return Ay=i,Ay}var $c={exports:{}},_y,XA;function QZ(){if(XA)return _y;XA=1;function e(){return!1}return _y=e,_y}$c.exports;var QA;function e_(){return QA||(QA=1,(function(e,t){var r=Ui(),n=QZ(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===o,a=s?r.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||n;e.exports=c})($c,$c.exports)),$c.exports}var $y,t_;function r_(){if(t_)return $y;t_=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,o){var i=typeof n;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<o}return $y=r,$y}var Iy,n_;function Ny(){if(n_)return Iy;n_=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Iy=t,Iy}var Dy,o_;function eY(){if(o_)return Dy;o_=1;var e=Ac(),t=Ny(),r=_c(),n="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",C="[object DataView]",S="[object Float32Array]",k="[object Float64Array]",P="[object Int8Array]",E="[object Int16Array]",$="[object Int32Array]",O="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",M="[object Uint32Array]",V={};V[S]=V[k]=V[P]=V[E]=V[$]=V[O]=V[N]=V[D]=V[M]=!0,V[n]=V[o]=V[v]=V[i]=V[C]=V[s]=V[a]=V[l]=V[c]=V[d]=V[f]=V[m]=V[g]=V[b]=V[y]=!1;function R(K){return r(K)&&t(K.length)&&!!V[e(K)]}return Dy=R,Dy}var My,i_;function tY(){if(i_)return My;i_=1;function e(t){return function(r){return t(r)}}return My=e,My}var Ic={exports:{}};Ic.exports;var s_;function rY(){return s_||(s_=1,(function(e,t){var r=q5(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===n,s=i&&r.process,a=(function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})(Ic,Ic.exports)),Ic.exports}var Oy,a_;function l_(){if(a_)return Oy;a_=1;var e=eY(),t=tY(),r=rY(),n=r&&r.isTypedArray,o=n?t(n):e;return Oy=o,Oy}var jy,u_;function nY(){if(u_)return jy;u_=1;var e=JZ(),t=JA(),r=Bs(),n=e_(),o=r_(),i=l_(),s=Object.prototype,a=s.hasOwnProperty;function l(c,d){var f=r(c),m=!f&&t(c),g=!f&&!m&&n(c),b=!f&&!m&&!g&&i(c),y=f||m||g||b,v=y?e(c.length,String):[],C=v.length;for(var S in c)(d||a.call(c,S))&&!(y&&(S=="length"||g&&(S=="offset"||S=="parent")||b&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||o(S,C)))&&v.push(S);return v}return jy=l,jy}var Ly,c_;function oY(){if(c_)return Ly;c_=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return Ly=t,Ly}var Fy,d_;function iY(){if(d_)return Fy;d_=1;function e(t,r){return function(n){return t(r(n))}}return Fy=e,Fy}var By,f_;function sY(){if(f_)return By;f_=1;var e=iY(),t=e(Object.keys,Object);return By=t,By}var zy,p_;function aY(){if(p_)return zy;p_=1;var e=oY(),t=sY(),r=Object.prototype,n=r.hasOwnProperty;function o(i){if(!e(i))return t(i);var s=[];for(var a in Object(i))n.call(i,a)&&a!="constructor"&&s.push(a);return s}return zy=o,zy}var Ky,h_;function lY(){if(h_)return Ky;h_=1;var e=tA(),t=Ny();function r(n){return n!=null&&t(n.length)&&!e(n)}return Ky=r,Ky}var Vy,m_;function g_(){if(m_)return Vy;m_=1;var e=nY(),t=aY(),r=lY();function n(o){return r(o)?e(o):t(o)}return Vy=n,Vy}var Ry,b_;function uY(){if(b_)return Ry;b_=1;var e=qZ(),t=YZ(),r=g_();function n(o){return e(o,r,t)}return Ry=n,Ry}var Wy,v_;function cY(){if(v_)return Wy;v_=1;var e=uY(),t=1,r=Object.prototype,n=r.hasOwnProperty;function o(i,s,a,l,c,d){var f=a&t,m=e(i),g=m.length,b=e(s),y=b.length;if(g!=y&&!f)return!1;for(var v=g;v--;){var C=m[v];if(!(f?C in s:n.call(s,C)))return!1}var S=d.get(i),k=d.get(s);if(S&&k)return S==s&&k==i;var P=!0;d.set(i,s),d.set(s,i);for(var E=f;++v<g;){C=m[v];var $=i[C],O=s[C];if(l)var N=f?l(O,$,C,s,i,d):l($,O,C,i,s,d);if(!(N===void 0?$===O||c($,O,a,l,d):N)){P=!1;break}E||(E=C=="constructor")}if(P&&!E){var D=i.constructor,M=s.constructor;D!=M&&"constructor"in i&&"constructor"in s&&!(typeof D=="function"&&D instanceof D&&typeof M=="function"&&M instanceof M)&&(P=!1)}return d.delete(i),d.delete(s),P}return Wy=o,Wy}var Uy,y_;function dY(){if(y_)return Uy;y_=1;var e=ou(),t=Ui(),r=e(t,"DataView");return Uy=r,Uy}var Hy,x_;function fY(){if(x_)return Hy;x_=1;var e=ou(),t=Ui(),r=e(t,"Promise");return Hy=r,Hy}var qy,w_;function C_(){if(w_)return qy;w_=1;var e=ou(),t=Ui(),r=e(t,"Set");return qy=r,qy}var Gy,S_;function pY(){if(S_)return Gy;S_=1;var e=ou(),t=Ui(),r=e(t,"WeakMap");return Gy=r,Gy}var Zy,k_;function hY(){if(k_)return Zy;k_=1;var e=dY(),t=R0(),r=fY(),n=C_(),o=pY(),i=Ac(),s=iA(),a="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",m="[object DataView]",g=s(e),b=s(t),y=s(r),v=s(n),C=s(o),S=i;return(e&&S(new e(new ArrayBuffer(1)))!=m||t&&S(new t)!=a||r&&S(r.resolve())!=c||n&&S(new n)!=d||o&&S(new o)!=f)&&(S=function(k){var P=i(k),E=P==l?k.constructor:void 0,$=E?s(E):"";if($)switch($){case g:return m;case b:return a;case y:return c;case v:return d;case C:return f}return P}),Zy=S,Zy}var Yy,P_;function mY(){if(P_)return Yy;P_=1;var e=TA(),t=jA(),r=UZ(),n=cY(),o=hY(),i=Bs(),s=e_(),a=l_(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function b(y,v,C,S,k,P){var E=i(y),$=i(v),O=E?d:o(y),N=$?d:o(v);O=O==c?f:O,N=N==c?f:N;var D=O==f,M=N==f,V=O==N;if(V&&s(y)){if(!s(v))return!1;E=!0,D=!1}if(V&&!D)return P||(P=new e),E||a(y)?t(y,v,C,S,k,P):r(y,v,O,C,S,k,P);if(!(C&l)){var R=D&&g.call(y,"__wrapped__"),K=M&&g.call(v,"__wrapped__");if(R||K){var j=R?y.value():y,B=K?v.value():v;return P||(P=new e),k(j,B,C,S,P)}}return V?(P||(P=new e),n(y,v,C,S,k,P)):!1}return Yy=b,Yy}var Jy,E_;function T_(){if(E_)return Jy;E_=1;var e=mY(),t=_c();function r(n,o,i,s,a){return n===o?!0:n==null||o==null||!t(n)&&!t(o)?n!==n&&o!==o:e(n,o,i,s,r,a)}return Jy=r,Jy}var Xy,A_;function gY(){if(A_)return Xy;A_=1;var e=TA(),t=T_(),r=1,n=2;function o(i,s,a,l){var c=a.length,d=c,f=!l;if(i==null)return!d;for(i=Object(i);c--;){var m=a[c];if(f&&m[2]?m[1]!==i[m[0]]:!(m[0]in i))return!1}for(;++c<d;){m=a[c];var g=m[0],b=i[g],y=m[1];if(f&&m[2]){if(b===void 0&&!(g in i))return!1}else{var v=new e;if(l)var C=l(b,y,g,i,s,v);if(!(C===void 0?t(y,b,r|n,l,v):C))return!1}}return!0}return Xy=o,Xy}var Qy,__;function $_(){if(__)return Qy;__=1;var e=M0();function t(r){return r===r&&!e(r)}return Qy=t,Qy}var ex,I_;function bY(){if(I_)return ex;I_=1;var e=$_(),t=g_();function r(n){for(var o=t(n),i=o.length;i--;){var s=o[i],a=n[s];o[i]=[s,a,e(a)]}return o}return ex=r,ex}var tx,N_;function D_(){if(N_)return tx;N_=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return tx=e,tx}var rx,M_;function vY(){if(M_)return rx;M_=1;var e=gY(),t=bY(),r=D_();function n(o){var i=t(o);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(s){return s===o||e(s,o,i)}}return rx=n,rx}var nx,O_;function ox(){if(O_)return nx;O_=1;var e=Ac(),t=_c(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return nx=n,nx}var ix,j_;function sx(){if(j_)return ix;j_=1;var e=Bs(),t=ox(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function o(i,s){if(e(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||s!=null&&i in Object(s)}return ix=o,ix}var ax,L_;function yY(){if(L_)return ax;L_=1;var e=iy(),t="Expected a function";function r(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var s=arguments,a=o?o.apply(this,s):s[0],l=i.cache;if(l.has(a))return l.get(a);var c=n.apply(this,s);return i.cache=l.set(a,c)||l,c};return i.cache=new(r.Cache||e),i}return r.Cache=e,ax=r,ax}var lx,F_;function xY(){if(F_)return lx;F_=1;var e=yY(),t=500;function r(n){var o=e(n,function(s){return i.size===t&&i.clear(),s}),i=o.cache;return o}return lx=r,lx}var ux,B_;function wY(){if(B_)return ux;B_=1;var e=xY(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(s,a,l,c){i.push(l?c.replace(r,"$1"):a||s)}),i});return ux=n,ux}var cx,z_;function CY(){if(z_)return cx;z_=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=Array(o);++n<o;)i[n]=r(t[n],n,t);return i}return cx=e,cx}var dx,K_;function SY(){if(K_)return dx;K_=1;var e=zp(),t=CY(),r=Bs(),n=ox(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function s(a){if(typeof a=="string")return a;if(r(a))return t(a,s)+"";if(n(a))return i?i.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return dx=s,dx}var fx,V_;function kY(){if(V_)return fx;V_=1;var e=SY();function t(r){return r==null?"":e(r)}return fx=t,fx}var px,R_;function W_(){if(R_)return px;R_=1;var e=Bs(),t=sx(),r=wY(),n=kY();function o(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return px=o,px}var hx,U_;function Rp(){if(U_)return hx;U_=1;var e=ox();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return hx=t,hx}var mx,H_;function q_(){if(H_)return mx;H_=1;var e=W_(),t=Rp();function r(n,o){o=e(o,n);for(var i=0,s=o.length;n!=null&&i<s;)n=n[t(o[i++])];return i&&i==s?n:void 0}return mx=r,mx}var gx,G_;function PY(){if(G_)return gx;G_=1;var e=q_();function t(r,n,o){var i=r==null?void 0:e(r,n);return i===void 0?o:i}return gx=t,gx}var bx,Z_;function EY(){if(Z_)return bx;Z_=1;function e(t,r){return t!=null&&r in Object(t)}return bx=e,bx}var vx,Y_;function TY(){if(Y_)return vx;Y_=1;var e=W_(),t=JA(),r=Bs(),n=r_(),o=Ny(),i=Rp();function s(a,l,c){l=e(l,a);for(var d=-1,f=l.length,m=!1;++d<f;){var g=i(l[d]);if(!(m=a!=null&&c(a,g)))break;a=a[g]}return m||++d!=f?m:(f=a==null?0:a.length,!!f&&o(f)&&n(g,f)&&(r(a)||t(a)))}return vx=s,vx}var yx,J_;function AY(){if(J_)return yx;J_=1;var e=EY(),t=TY();function r(n,o){return n!=null&&t(n,o,e)}return yx=r,yx}var xx,X_;function _Y(){if(X_)return xx;X_=1;var e=T_(),t=PY(),r=AY(),n=sx(),o=$_(),i=D_(),s=Rp(),a=1,l=2;function c(d,f){return n(d)&&o(f)?i(s(d),f):function(m){var g=t(m,d);return g===void 0&&g===f?r(m,d):e(f,g,a|l)}}return xx=c,xx}var wx,Q_;function $Y(){if(Q_)return wx;Q_=1;function e(t){return t}return wx=e,wx}var Cx,e$;function IY(){if(e$)return Cx;e$=1;function e(t){return function(r){return r?.[t]}}return Cx=e,Cx}var Sx,t$;function NY(){if(t$)return Sx;t$=1;var e=q_();function t(r){return function(n){return e(n,r)}}return Sx=t,Sx}var kx,r$;function DY(){if(r$)return kx;r$=1;var e=IY(),t=NY(),r=sx(),n=Rp();function o(i){return r(i)?e(n(i)):t(i)}return kx=o,kx}var Px,n$;function MY(){if(n$)return Px;n$=1;var e=vY(),t=_Y(),r=$Y(),n=Bs(),o=DY();function i(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?t(s[0],s[1]):e(s):o(s)}return Px=i,Px}var Ex,o$;function OY(){if(o$)return Ex;o$=1;function e(t,r,n,o){for(var i=t.length,s=n+(o?1:-1);o?s--:++s<i;)if(r(t[s],s,t))return s;return-1}return Ex=e,Ex}var Tx,i$;function jY(){if(i$)return Tx;i$=1;function e(t){return t!==t}return Tx=e,Tx}var Ax,s$;function LY(){if(s$)return Ax;s$=1;function e(t,r,n){for(var o=n-1,i=t.length;++o<i;)if(t[o]===r)return o;return-1}return Ax=e,Ax}var _x,a$;function FY(){if(a$)return _x;a$=1;var e=OY(),t=jY(),r=LY();function n(o,i,s){return i===i?r(o,i,s):e(o,t,s)}return _x=n,_x}var $x,l$;function BY(){if(l$)return $x;l$=1;var e=FY();function t(r,n){var o=r==null?0:r.length;return!!o&&e(r,n,0)>-1}return $x=t,$x}var Ix,u$;function zY(){if(u$)return Ix;u$=1;function e(t,r,n){for(var o=-1,i=t==null?0:t.length;++o<i;)if(n(r,t[o]))return!0;return!1}return Ix=e,Ix}var Nx,c$;function KY(){if(c$)return Nx;c$=1;function e(){}return Nx=e,Nx}var Dx,d$;function VY(){if(d$)return Dx;d$=1;var e=C_(),t=KY(),r=by(),n=1/0,o=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return Dx=o,Dx}var Mx,f$;function p$(){if(f$)return Mx;f$=1;var e=IA(),t=BY(),r=zY(),n=MA(),o=VY(),i=by(),s=200;function a(l,c,d){var f=-1,m=t,g=l.length,b=!0,y=[],v=y;if(d)b=!1,m=r;else if(g>=s){var C=c?null:o(l);if(C)return i(C);b=!1,m=n,v=new e}else v=c?[]:y;e:for(;++f<g;){var S=l[f],k=c?c(S):S;if(S=d||S!==0?S:0,b&&k===k){for(var P=v.length;P--;)if(v[P]===k)continue e;c&&v.push(k),y.push(S)}else m(v,k,d)||(v!==y&&v.push(k),y.push(S))}return y}return Mx=a,Mx}var Ox,h$;function RY(){if(h$)return Ox;h$=1;var e=MY(),t=p$();function r(n,o){return n&&n.length?t(n,e(o,2)):[]}return Ox=r,Ox}var WY=RY();const UY=ju(WY);function jx(e,t){return r=>{const n=r.distinctProperties.find(o=>o.key===e);return!!n&&n.option.slug===t}}function HY(e,t){return e?.map(r=>{const n=UY(r.options.filter(o=>t.some(jx(r.key,o.slug))),"slug");return{...r,options:n}})}function qY(e,t){const r=e?.find(i=>i.key==="color")?.options,o=e?.find(i=>i.key==="internal_storage")?.options?.flatMap(i=>r?.map(s=>({internalStorage:i,color:s}))??[]);return o?o.map(i=>{const s=t.find(a=>jx("internal_storage",i.internalStorage.slug)(a)&&jx("color",i.color.slug)(a)&&["AVAILABLE","AVAILABLE_IF_STOCK"].includes(a.status||""));return s?{productVersionId:s.id,combination:i}:null}).filter(i=>i!==null):[]}function GY(e){return e?[e.sort((t,r)=>t.key==="internal_storage"?-1:r.key==="internal_storage"?1:0).map(t=>t.option.slug).join(":")]:[]}function ZY(e,t){return e.split(":").map(r=>{const n=t.find(i=>i.options.some(s=>s.slug===r)),o=n?.options.find(i=>i.slug===r);if(!(!n||!o))return{key:n.key,label:n.label,option:o}}).filter(r=>r!==void 0)}function m$({colorHex:e,storage:t,color:r}){const n=e&&/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e),o=n?e:"#E5E7EB",i=[t,r].filter(Boolean).join(" • ")||"";return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-3 h-3 rounded-full shrink-0 border",style:{backgroundColor:o,borderColor:n?`color-mix(in srgb, ${o} 80%, black)`:"#D1D5DB"}}),h.jsx("span",{className:"text-sm text-foreground-600 truncate",children:i})]})}function g$({disabled:e,versions:t,onSelectionChange:r,classNames:n,distinctProperties:o,selectedDistinctProperties:i,selectedPhone:s,ref:a}){const l=HY(o,t),c=qY(l,t),{popoverProps:d}=Zn(),[f,m]=x.useState(!1),{productVersion:g}=h0(s?.slug,i);return s?h.jsx(Fs,{shadow:"sm",radius:"lg",className:A("shrink-0 scroll-mt-4",n?.base),ref:a,children:h.jsxs(BT,{className:A("space-y-3 overflow-hidden",n?.cardBody),children:[h.jsxs("div",{className:"flex items-center gap-3",children:[g?.media.main?.url?h.jsx(Hl,{alt:g.media.main.altText||s.fullName,src:yv(g.media.main.url,64,64),size:"md",radius:"full",color:"primary",classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}):h.jsx(Hl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(cg,{size:24,className:"text-primary"}),classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}),h.jsx("span",{className:"text-sm font-medium",children:s.fullName})]}),h.jsx(Tc,{variant:"bordered",placeholder:"Kies een versie","aria-label":"Kies een telefoon versie",isOpen:f,onOpenChange:b=>b!==f&&m(b),isDisabled:e,popoverProps:d,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:GY(i),radius:"sm",renderValue:b=>b.map(y=>{const v=c.find(C=>[C.combination.internalStorage.slug,C.combination.color.slug].join(":")===y.key);return h.jsx(m$,{colorHex:v?.combination.color.hex,storage:v?.combination.internalStorage.label,color:v?.combination.color.label},y.key)}),classNames:{...n,trigger:A("cursor-pointer border-small",n?.trigger)},children:c.map(b=>{const{color:y,internalStorage:v}=b.combination;if(!y||!v)return null;const C=[v.slug,y.slug].join(":");return h.jsx(Ba,{variant:"flat",textValue:`${v.label} • ${y.label}`,onClick:()=>{r(ZY(C,l||[]),b.productVersionId),m(!1)},children:h.jsx(m$,{colorHex:y.hex,storage:v.label,color:y.label})},[v.slug,y.slug].join(":"))})})]})}):null}function YY({onConfirm:e,classNames:t,brandSlug:r,phoneSlug:n,distinctProperties:o}){const{t:i}=Je(),{popularPhones:s,brands:a}=Sq(),{popoverProps:l,isShadowRoot:c}=Zn(),{isModalOpen:d,openModal:f,closeModal:m}=Qt(),g=x.useRef(null),[b,y]=x.useState(r||"popular"),[v,C]=x.useState(n),[S,k]=x.useState(o),P=d("phone-selector");x.useEffect(()=>{P&&(r&&y(r),C(n),k(o))},[P]);const E=R=>{C(R),k(void 0),setTimeout(()=>{!g.current||!R||g.current.scrollIntoView({behavior:"smooth"})},0)},{phones:$,isLoading:O}=xq(b),N=x.useMemo(()=>[...s,...$],[s,$]),D=x.useRef(null),M=x.useMemo(()=>{const R=N.find(K=>K.slug===v);if(R)return D.current=R,R;if(v&&D.current?.slug===v)return D.current;D.current=null},[N,v]),V=()=>{const R=S||M?.productVersion?.distinctProperties;if(!v||!R){e(void 0,[]),m("phone-selector");return}e(v,R),m("phone-selector")};return h.jsx(fi,{isOpen:P,onOpenChange:R=>R?f("phone-selector"):m("phone-selector"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!c,portalContainer:l.portalContainer,classNames:{backdrop:A(t?.modal?.backdrop),wrapper:A(t?.modal?.wrapper),base:A("m-0 max-h-[90vh] h-[90vh] sm:h-[80vh]",t?.modal?.base),header:A(t?.modal?.header),body:A(t?.modal?.body),footer:A(t?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:i("phoneSelector.selectPhone")}),h.jsxs(ai,{children:[h.jsx(g$,{ref:g,disabled:!M,versions:M?.productVersions||[],distinctProperties:M?.distinctProperties,selectedDistinctProperties:S||M?.productVersion?.distinctProperties,onSelectionChange:R=>k(R),selectedPhone:M,classNames:t?.variantList}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Xq,{brands:a,selectedBrandSlug:b,onBrandChange:y,classNames:t?.brandTabs}),h.jsx(NG,{isLoading:O&&b!=="popular",phones:b==="popular"?s:$,selectedPhoneSlug:v,onPhoneSelect:E,classNames:t?.phoneList})]})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium disabled:opacity-50 disabled:pointer-events-none",t?.confirmButton),onPress:V,color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,disabled:!v&&!n,children:i("common.confirm")})})]})})}function JY({onChange:e,classNames:t,disabled:r=!1,productSlug:n,selectedDistinctProperties:o=[]}){const{t:i}=Je(),{phoneSelectorButton:s}=vt(),{openModal:a}=Qt(),[l,c]=x.useState(n),[d,f]=x.useState(o),{product:m,productVersion:g}=h0(l,d);function b(v,C){c(v),f(C),e(v,C)}const y=[g?.distinctProperty?.internalStorage?.label,g?.distinctProperty?.color?.label].filter(Boolean).join(" • ");return x.useEffect(()=>{c(n)},[n]),x.useEffect(()=>{o.length===0&&f([])},[o.length]),x.useEffect(()=>{!l||d.length>0||!g||!("distinctProperties"in g)||b(l,g.distinctProperties)},[l,d.length,g?.distinctProperty?.color?.slug]),h.jsxs(h.Fragment,{children:[h.jsx(ql,{disabled:r,onClick:()=>!r&&a("phone-selector"),selected:!!g,imageUrl:g?.media?.main?.url,imageAlt:g?.media?.main?.altText,title:m?m.fullName:i("phoneSelector.phone"),description:g?y:i("phoneSelector.selectPhone"),Icon:cg,classNames:s}),h.jsx(YY,{phoneSlug:l,brandSlug:m?.brand.slug,distinctProperties:d,onConfirm:b,classNames:t})]})}function XY(e){var t,r;const n=ur(),[o,i]=qr(e,QC.variantKeys),{ref:s,as:a,src:l,className:c,classNames:d,loading:f,isBlurred:m,fallbackSrc:g,isLoading:b,disableSkeleton:y=!!g,removeWrapper:v=!1,onError:C,onLoad:S,srcSet:k,sizes:P,crossOrigin:E,...$}=o,O=RP({src:l,loading:f,onError:C,onLoad:S,ignoreFallback:!1,srcSet:k,sizes:P,crossOrigin:E,shouldBypassImageLoad:a!==void 0}),N=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,D=O==="loaded"&&!b,M=O==="loading"||b,V=e.isZoomed,R=a||"img",K=ot(s),{w:j,h:B}=x.useMemo(()=>({w:o.width?typeof o.width=="number"?`${o.width}px`:o.width:"fit-content",h:o.height?typeof o.height=="number"?`${o.height}px`:o.height:"auto"}),[o?.width,o?.height]),U=(!l||!D)&&!!g,W=M&&!y,L=x.useMemo(()=>QC({...i,disableAnimation:N,showSkeleton:W}),[jr(i),N,W]),Z=A(c,d?.img),T=(H={})=>{const Y=A(Z,H?.className);return{src:l,ref:K,"data-loaded":ae(D),className:L.img({class:Y}),loading:f,srcSet:k,sizes:P,crossOrigin:E,...$,style:{...$?.height&&{height:B},...H.style,...$.style}}},F=x.useCallback(()=>{const H=U?{backgroundImage:`url(${g})`}:{};return{className:L.wrapper({class:d?.wrapper}),style:{...H,maxWidth:j}}},[L,U,g,d?.wrapper,j]),_=x.useCallback(()=>({src:l,"aria-hidden":ae(!0),className:L.blurredImg({class:d?.blurredImg})}),[L,l,d?.blurredImg]);return{Component:R,domRef:K,slots:L,classNames:d,isBlurred:m,disableSkeleton:y,fallbackSrc:g,removeWrapper:v,isZoomed:V,isLoading:M,getImgProps:T,getWrapperProps:F,getBlurredImgProps:_}}var b$=Xe((e,t)=>{const{Component:r,domRef:n,slots:o,classNames:i,isBlurred:s,isZoomed:a,fallbackSrc:l,removeWrapper:c,disableSkeleton:d,getImgProps:f,getWrapperProps:m,getBlurredImgProps:g}=XY({...e,ref:t}),b=h.jsx(r,{ref:n,...f()});if(c)return b;const y=h.jsx("div",{className:o.zoomedWrapper({class:i?.zoomedWrapper}),children:b});return s?h.jsxs("div",{...m(),children:[a?y:b,x.cloneElement(b,g())]}):a||!d||l?h.jsxs("div",{...m(),children:[" ",a?y:b]}):b});b$.displayName="HeroUI.Image";var Ar=b$,Wp;function QY(e){if(!Wp)if(typeof document<"u")Wp=document.createElement("textarea");else return;var t="&"+e+";";Wp.innerHTML=t;var r=Wp.value;return r!==t?r:void 0}var Te=32,$e=9,Ka=13,Ke=10,Ot=96,Nr=126,cr=91,hi=94,yt=62,mi=35,Lx=37,ft=45,Jn=61,zr=92,mr=42,or=95,zt=60,Fx=64,yo=93,Sn=33,v$=38,kn=58,y$=70,Va=102,Nc=104,zs=119,iu=116,Bx=112,x$=115,eJ=160,tJ=12,rJ=44,w$=59,Dc=63,xo=46,xr=47,Ra=39,Wa=34,Ks=43,Kr=124,su=123,zx=125,Uo=40,Ho=41,Up=30,Kx=31,Tt=48,At=57,pt=65,xt=90,Yt=97,ir=122,Hp=128,qo=32,nJ={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22},ve=nJ;function oJ(e){if(!S$(e,"---"))return null;let t=3;for(;t<e.length&&(e[t]===" "||e[t]===" ");)t++;if(t<e.length&&e[t]==="\r"&&t++,t>=e.length||e[t]!==`
|
|
292
|
+
`;function h0(e,t){const r=(t??[]).map(c=>({key:c.key,value:c.option.key})),{data:n,error:o,isLoading:i}=Vo(e&&r.length===0?[cZ,{slug:e}]:null,{use:[Yn],fetcher:nn}),{data:s,error:a,isLoading:l}=Vo(e&&r.length>0?[dZ,{slug:e,properties:r}]:null,{use:[Yn],fetcher:nn});return e?r.length===0?{product:n?.product,productVersion:n?.product?.productVersion,isLoading:i,error:o}:{product:s?.product,productVersion:s?.product?.productVersion,isLoading:l,error:a}:{product:null,productVersion:null,isLoading:!1,error:null}}var m0,D5;function fZ(){if(D5)return m0;D5=1;function e(){this.__data__=[],this.size=0}return m0=e,m0}var g0,M5;function O5(){if(M5)return g0;M5=1;function e(t,r){return t===r||t!==t&&r!==r}return g0=e,g0}var b0,j5;function Fp(){if(j5)return b0;j5=1;var e=O5();function t(r,n){for(var o=r.length;o--;)if(e(r[o][0],n))return o;return-1}return b0=t,b0}var v0,L5;function pZ(){if(L5)return v0;L5=1;var e=Fp(),t=Array.prototype,r=t.splice;function n(o){var i=this.__data__,s=e(i,o);if(s<0)return!1;var a=i.length-1;return s==a?i.pop():r.call(i,s,1),--this.size,!0}return v0=n,v0}var y0,F5;function hZ(){if(F5)return y0;F5=1;var e=Fp();function t(r){var n=this.__data__,o=e(n,r);return o<0?void 0:n[o][1]}return y0=t,y0}var x0,B5;function mZ(){if(B5)return x0;B5=1;var e=Fp();function t(r){return e(this.__data__,r)>-1}return x0=t,x0}var w0,z5;function gZ(){if(z5)return w0;z5=1;var e=Fp();function t(r,n){var o=this.__data__,i=e(o,r);return i<0?(++this.size,o.push([r,n])):o[i][1]=n,this}return w0=t,w0}var C0,K5;function Bp(){if(K5)return C0;K5=1;var e=fZ(),t=pZ(),r=hZ(),n=mZ(),o=gZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,C0=i,C0}var S0,V5;function bZ(){if(V5)return S0;V5=1;var e=Bp();function t(){this.__data__=new e,this.size=0}return S0=t,S0}var k0,R5;function vZ(){if(R5)return k0;R5=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return k0=e,k0}var P0,W5;function yZ(){if(W5)return P0;W5=1;function e(t){return this.__data__.get(t)}return P0=e,P0}var E0,U5;function xZ(){if(U5)return E0;U5=1;function e(t){return this.__data__.has(t)}return E0=e,E0}var T0,H5;function q5(){if(H5)return T0;H5=1;var e=typeof fs=="object"&&fs&&fs.Object===Object&&fs;return T0=e,T0}var A0,G5;function Ui(){if(G5)return A0;G5=1;var e=q5(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return A0=r,A0}var _0,Z5;function zp(){if(Z5)return _0;Z5=1;var e=Ui(),t=e.Symbol;return _0=t,_0}var $0,Y5;function wZ(){if(Y5)return $0;Y5=1;var e=zp(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function i(s){var a=r.call(s,o),l=s[o];try{s[o]=void 0;var c=!0}catch{}var d=n.call(s);return c&&(a?s[o]=l:delete s[o]),d}return $0=i,$0}var I0,J5;function CZ(){if(J5)return I0;J5=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return I0=r,I0}var N0,X5;function Ac(){if(X5)return N0;X5=1;var e=zp(),t=wZ(),r=CZ(),n="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function s(a){return a==null?a===void 0?o:n:i&&i in Object(a)?t(a):r(a)}return N0=s,N0}var D0,Q5;function M0(){if(Q5)return D0;Q5=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return D0=e,D0}var O0,eA;function tA(){if(eA)return O0;eA=1;var e=Ac(),t=M0(),r="[object AsyncFunction]",n="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function s(a){if(!t(a))return!1;var l=e(a);return l==n||l==o||l==r||l==i}return O0=s,O0}var j0,rA;function SZ(){if(rA)return j0;rA=1;var e=Ui(),t=e["__core-js_shared__"];return j0=t,j0}var L0,nA;function kZ(){if(nA)return L0;nA=1;var e=SZ(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return L0=r,L0}var F0,oA;function iA(){if(oA)return F0;oA=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return F0=r,F0}var B0,sA;function PZ(){if(sA)return B0;sA=1;var e=tA(),t=kZ(),r=M0(),n=iA(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,d=RegExp("^"+l.call(c).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(m){if(!r(m)||t(m))return!1;var g=e(m)?d:i;return g.test(n(m))}return B0=f,B0}var z0,aA;function EZ(){if(aA)return z0;aA=1;function e(t,r){return t?.[r]}return z0=e,z0}var K0,lA;function ou(){if(lA)return K0;lA=1;var e=PZ(),t=EZ();function r(n,o){var i=t(n,o);return e(i)?i:void 0}return K0=r,K0}var V0,uA;function R0(){if(uA)return V0;uA=1;var e=ou(),t=Ui(),r=e(t,"Map");return V0=r,V0}var W0,cA;function Kp(){if(cA)return W0;cA=1;var e=ou(),t=e(Object,"create");return W0=t,W0}var U0,dA;function TZ(){if(dA)return U0;dA=1;var e=Kp();function t(){this.__data__=e?e(null):{},this.size=0}return U0=t,U0}var H0,fA;function AZ(){if(fA)return H0;fA=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return H0=e,H0}var q0,pA;function _Z(){if(pA)return q0;pA=1;var e=Kp(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function o(i){var s=this.__data__;if(e){var a=s[i];return a===t?void 0:a}return n.call(s,i)?s[i]:void 0}return q0=o,q0}var G0,hA;function $Z(){if(hA)return G0;hA=1;var e=Kp(),t=Object.prototype,r=t.hasOwnProperty;function n(o){var i=this.__data__;return e?i[o]!==void 0:r.call(i,o)}return G0=n,G0}var Z0,mA;function IZ(){if(mA)return Z0;mA=1;var e=Kp(),t="__lodash_hash_undefined__";function r(n,o){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&o===void 0?t:o,this}return Z0=r,Z0}var Y0,gA;function NZ(){if(gA)return Y0;gA=1;var e=TZ(),t=AZ(),r=_Z(),n=$Z(),o=IZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Y0=i,Y0}var J0,bA;function DZ(){if(bA)return J0;bA=1;var e=NZ(),t=Bp(),r=R0();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return J0=n,J0}var X0,vA;function MZ(){if(vA)return X0;vA=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return X0=e,X0}var Q0,yA;function Vp(){if(yA)return Q0;yA=1;var e=MZ();function t(r,n){var o=r.__data__;return e(n)?o[typeof n=="string"?"string":"hash"]:o.map}return Q0=t,Q0}var ey,xA;function OZ(){if(xA)return ey;xA=1;var e=Vp();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return ey=t,ey}var ty,wA;function jZ(){if(wA)return ty;wA=1;var e=Vp();function t(r){return e(this,r).get(r)}return ty=t,ty}var ry,CA;function LZ(){if(CA)return ry;CA=1;var e=Vp();function t(r){return e(this,r).has(r)}return ry=t,ry}var ny,SA;function FZ(){if(SA)return ny;SA=1;var e=Vp();function t(r,n){var o=e(this,r),i=o.size;return o.set(r,n),this.size+=o.size==i?0:1,this}return ny=t,ny}var oy,kA;function iy(){if(kA)return oy;kA=1;var e=DZ(),t=OZ(),r=jZ(),n=LZ(),o=FZ();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,oy=i,oy}var sy,PA;function BZ(){if(PA)return sy;PA=1;var e=Bp(),t=R0(),r=iy(),n=200;function o(i,s){var a=this.__data__;if(a instanceof e){var l=a.__data__;if(!t||l.length<n-1)return l.push([i,s]),this.size=++a.size,this;a=this.__data__=new r(l)}return a.set(i,s),this.size=a.size,this}return sy=o,sy}var ay,EA;function TA(){if(EA)return ay;EA=1;var e=Bp(),t=bZ(),r=vZ(),n=yZ(),o=xZ(),i=BZ();function s(a){var l=this.__data__=new e(a);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=o,s.prototype.set=i,ay=s,ay}var ly,AA;function zZ(){if(AA)return ly;AA=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return ly=t,ly}var uy,_A;function KZ(){if(_A)return uy;_A=1;function e(t){return this.__data__.has(t)}return uy=e,uy}var cy,$A;function IA(){if($A)return cy;$A=1;var e=iy(),t=zZ(),r=KZ();function n(o){var i=-1,s=o==null?0:o.length;for(this.__data__=new e;++i<s;)this.add(o[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,cy=n,cy}var dy,NA;function VZ(){if(NA)return dy;NA=1;function e(t,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(t[n],n,t))return!0;return!1}return dy=e,dy}var fy,DA;function MA(){if(DA)return fy;DA=1;function e(t,r){return t.has(r)}return fy=e,fy}var py,OA;function jA(){if(OA)return py;OA=1;var e=IA(),t=VZ(),r=MA(),n=1,o=2;function i(s,a,l,c,d,f){var m=l&n,g=s.length,b=a.length;if(g!=b&&!(m&&b>g))return!1;var y=f.get(s),v=f.get(a);if(y&&v)return y==a&&v==s;var C=-1,S=!0,k=l&o?new e:void 0;for(f.set(s,a),f.set(a,s);++C<g;){var P=s[C],E=a[C];if(c)var $=m?c(E,P,C,a,s,f):c(P,E,C,s,a,f);if($!==void 0){if($)continue;S=!1;break}if(k){if(!t(a,function(O,N){if(!r(k,N)&&(P===O||d(P,O,l,c,f)))return k.push(N)})){S=!1;break}}else if(!(P===E||d(P,E,l,c,f))){S=!1;break}}return f.delete(s),f.delete(a),S}return py=i,py}var hy,LA;function RZ(){if(LA)return hy;LA=1;var e=Ui(),t=e.Uint8Array;return hy=t,hy}var my,FA;function WZ(){if(FA)return my;FA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o,i){n[++r]=[i,o]}),n}return my=e,my}var gy,BA;function by(){if(BA)return gy;BA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o){n[++r]=o}),n}return gy=e,gy}var vy,zA;function UZ(){if(zA)return vy;zA=1;var e=zp(),t=RZ(),r=O5(),n=jA(),o=WZ(),i=by(),s=1,a=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",m="[object Number]",g="[object RegExp]",b="[object Set]",y="[object String]",v="[object Symbol]",C="[object ArrayBuffer]",S="[object DataView]",k=e?e.prototype:void 0,P=k?k.valueOf:void 0;function E($,O,N,D,M,V,R){switch(N){case S:if($.byteLength!=O.byteLength||$.byteOffset!=O.byteOffset)return!1;$=$.buffer,O=O.buffer;case C:return!($.byteLength!=O.byteLength||!V(new t($),new t(O)));case l:case c:case m:return r(+$,+O);case d:return $.name==O.name&&$.message==O.message;case g:case y:return $==O+"";case f:var K=o;case b:var j=D&s;if(K||(K=i),$.size!=O.size&&!j)return!1;var B=R.get($);if(B)return B==O;D|=a,R.set($,O);var U=n(K($),K(O),D,M,V,R);return R.delete($),U;case v:if(P)return P.call($)==P.call(O)}return!1}return vy=E,vy}var yy,KA;function HZ(){if(KA)return yy;KA=1;function e(t,r){for(var n=-1,o=r.length,i=t.length;++n<o;)t[i+n]=r[n];return t}return yy=e,yy}var xy,VA;function Bs(){if(VA)return xy;VA=1;var e=Array.isArray;return xy=e,xy}var wy,RA;function qZ(){if(RA)return wy;RA=1;var e=HZ(),t=Bs();function r(n,o,i){var s=o(n);return t(n)?s:e(s,i(n))}return wy=r,wy}var Cy,WA;function GZ(){if(WA)return Cy;WA=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=0,s=[];++n<o;){var a=t[n];r(a,n,t)&&(s[i++]=a)}return s}return Cy=e,Cy}var Sy,UA;function ZZ(){if(UA)return Sy;UA=1;function e(){return[]}return Sy=e,Sy}var ky,HA;function YZ(){if(HA)return ky;HA=1;var e=GZ(),t=ZZ(),r=Object.prototype,n=r.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(s){return s==null?[]:(s=Object(s),e(o(s),function(a){return n.call(s,a)}))}:t;return ky=i,ky}var Py,qA;function JZ(){if(qA)return Py;qA=1;function e(t,r){for(var n=-1,o=Array(t);++n<t;)o[n]=r(n);return o}return Py=e,Py}var Ey,GA;function _c(){if(GA)return Ey;GA=1;function e(t){return t!=null&&typeof t=="object"}return Ey=e,Ey}var Ty,ZA;function XZ(){if(ZA)return Ty;ZA=1;var e=Ac(),t=_c(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return Ty=n,Ty}var Ay,YA;function JA(){if(YA)return Ay;YA=1;var e=XZ(),t=_c(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&n.call(s,"callee")&&!o.call(s,"callee")};return Ay=i,Ay}var $c={exports:{}},_y,XA;function QZ(){if(XA)return _y;XA=1;function e(){return!1}return _y=e,_y}$c.exports;var QA;function e_(){return QA||(QA=1,(function(e,t){var r=Ui(),n=QZ(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===o,a=s?r.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||n;e.exports=c})($c,$c.exports)),$c.exports}var $y,t_;function r_(){if(t_)return $y;t_=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,o){var i=typeof n;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<o}return $y=r,$y}var Iy,n_;function Ny(){if(n_)return Iy;n_=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Iy=t,Iy}var Dy,o_;function eY(){if(o_)return Dy;o_=1;var e=Ac(),t=Ny(),r=_c(),n="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",C="[object DataView]",S="[object Float32Array]",k="[object Float64Array]",P="[object Int8Array]",E="[object Int16Array]",$="[object Int32Array]",O="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",M="[object Uint32Array]",V={};V[S]=V[k]=V[P]=V[E]=V[$]=V[O]=V[N]=V[D]=V[M]=!0,V[n]=V[o]=V[v]=V[i]=V[C]=V[s]=V[a]=V[l]=V[c]=V[d]=V[f]=V[m]=V[g]=V[b]=V[y]=!1;function R(K){return r(K)&&t(K.length)&&!!V[e(K)]}return Dy=R,Dy}var My,i_;function tY(){if(i_)return My;i_=1;function e(t){return function(r){return t(r)}}return My=e,My}var Ic={exports:{}};Ic.exports;var s_;function rY(){return s_||(s_=1,(function(e,t){var r=q5(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===n,s=i&&r.process,a=(function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})(Ic,Ic.exports)),Ic.exports}var Oy,a_;function l_(){if(a_)return Oy;a_=1;var e=eY(),t=tY(),r=rY(),n=r&&r.isTypedArray,o=n?t(n):e;return Oy=o,Oy}var jy,u_;function nY(){if(u_)return jy;u_=1;var e=JZ(),t=JA(),r=Bs(),n=e_(),o=r_(),i=l_(),s=Object.prototype,a=s.hasOwnProperty;function l(c,d){var f=r(c),m=!f&&t(c),g=!f&&!m&&n(c),b=!f&&!m&&!g&&i(c),y=f||m||g||b,v=y?e(c.length,String):[],C=v.length;for(var S in c)(d||a.call(c,S))&&!(y&&(S=="length"||g&&(S=="offset"||S=="parent")||b&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||o(S,C)))&&v.push(S);return v}return jy=l,jy}var Ly,c_;function oY(){if(c_)return Ly;c_=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return Ly=t,Ly}var Fy,d_;function iY(){if(d_)return Fy;d_=1;function e(t,r){return function(n){return t(r(n))}}return Fy=e,Fy}var By,f_;function sY(){if(f_)return By;f_=1;var e=iY(),t=e(Object.keys,Object);return By=t,By}var zy,p_;function aY(){if(p_)return zy;p_=1;var e=oY(),t=sY(),r=Object.prototype,n=r.hasOwnProperty;function o(i){if(!e(i))return t(i);var s=[];for(var a in Object(i))n.call(i,a)&&a!="constructor"&&s.push(a);return s}return zy=o,zy}var Ky,h_;function lY(){if(h_)return Ky;h_=1;var e=tA(),t=Ny();function r(n){return n!=null&&t(n.length)&&!e(n)}return Ky=r,Ky}var Vy,m_;function g_(){if(m_)return Vy;m_=1;var e=nY(),t=aY(),r=lY();function n(o){return r(o)?e(o):t(o)}return Vy=n,Vy}var Ry,b_;function uY(){if(b_)return Ry;b_=1;var e=qZ(),t=YZ(),r=g_();function n(o){return e(o,r,t)}return Ry=n,Ry}var Wy,v_;function cY(){if(v_)return Wy;v_=1;var e=uY(),t=1,r=Object.prototype,n=r.hasOwnProperty;function o(i,s,a,l,c,d){var f=a&t,m=e(i),g=m.length,b=e(s),y=b.length;if(g!=y&&!f)return!1;for(var v=g;v--;){var C=m[v];if(!(f?C in s:n.call(s,C)))return!1}var S=d.get(i),k=d.get(s);if(S&&k)return S==s&&k==i;var P=!0;d.set(i,s),d.set(s,i);for(var E=f;++v<g;){C=m[v];var $=i[C],O=s[C];if(l)var N=f?l(O,$,C,s,i,d):l($,O,C,i,s,d);if(!(N===void 0?$===O||c($,O,a,l,d):N)){P=!1;break}E||(E=C=="constructor")}if(P&&!E){var D=i.constructor,M=s.constructor;D!=M&&"constructor"in i&&"constructor"in s&&!(typeof D=="function"&&D instanceof D&&typeof M=="function"&&M instanceof M)&&(P=!1)}return d.delete(i),d.delete(s),P}return Wy=o,Wy}var Uy,y_;function dY(){if(y_)return Uy;y_=1;var e=ou(),t=Ui(),r=e(t,"DataView");return Uy=r,Uy}var Hy,x_;function fY(){if(x_)return Hy;x_=1;var e=ou(),t=Ui(),r=e(t,"Promise");return Hy=r,Hy}var qy,w_;function C_(){if(w_)return qy;w_=1;var e=ou(),t=Ui(),r=e(t,"Set");return qy=r,qy}var Gy,S_;function pY(){if(S_)return Gy;S_=1;var e=ou(),t=Ui(),r=e(t,"WeakMap");return Gy=r,Gy}var Zy,k_;function hY(){if(k_)return Zy;k_=1;var e=dY(),t=R0(),r=fY(),n=C_(),o=pY(),i=Ac(),s=iA(),a="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",m="[object DataView]",g=s(e),b=s(t),y=s(r),v=s(n),C=s(o),S=i;return(e&&S(new e(new ArrayBuffer(1)))!=m||t&&S(new t)!=a||r&&S(r.resolve())!=c||n&&S(new n)!=d||o&&S(new o)!=f)&&(S=function(k){var P=i(k),E=P==l?k.constructor:void 0,$=E?s(E):"";if($)switch($){case g:return m;case b:return a;case y:return c;case v:return d;case C:return f}return P}),Zy=S,Zy}var Yy,P_;function mY(){if(P_)return Yy;P_=1;var e=TA(),t=jA(),r=UZ(),n=cY(),o=hY(),i=Bs(),s=e_(),a=l_(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function b(y,v,C,S,k,P){var E=i(y),$=i(v),O=E?d:o(y),N=$?d:o(v);O=O==c?f:O,N=N==c?f:N;var D=O==f,M=N==f,V=O==N;if(V&&s(y)){if(!s(v))return!1;E=!0,D=!1}if(V&&!D)return P||(P=new e),E||a(y)?t(y,v,C,S,k,P):r(y,v,O,C,S,k,P);if(!(C&l)){var R=D&&g.call(y,"__wrapped__"),K=M&&g.call(v,"__wrapped__");if(R||K){var j=R?y.value():y,B=K?v.value():v;return P||(P=new e),k(j,B,C,S,P)}}return V?(P||(P=new e),n(y,v,C,S,k,P)):!1}return Yy=b,Yy}var Jy,E_;function T_(){if(E_)return Jy;E_=1;var e=mY(),t=_c();function r(n,o,i,s,a){return n===o?!0:n==null||o==null||!t(n)&&!t(o)?n!==n&&o!==o:e(n,o,i,s,r,a)}return Jy=r,Jy}var Xy,A_;function gY(){if(A_)return Xy;A_=1;var e=TA(),t=T_(),r=1,n=2;function o(i,s,a,l){var c=a.length,d=c,f=!l;if(i==null)return!d;for(i=Object(i);c--;){var m=a[c];if(f&&m[2]?m[1]!==i[m[0]]:!(m[0]in i))return!1}for(;++c<d;){m=a[c];var g=m[0],b=i[g],y=m[1];if(f&&m[2]){if(b===void 0&&!(g in i))return!1}else{var v=new e;if(l)var C=l(b,y,g,i,s,v);if(!(C===void 0?t(y,b,r|n,l,v):C))return!1}}return!0}return Xy=o,Xy}var Qy,__;function $_(){if(__)return Qy;__=1;var e=M0();function t(r){return r===r&&!e(r)}return Qy=t,Qy}var ex,I_;function bY(){if(I_)return ex;I_=1;var e=$_(),t=g_();function r(n){for(var o=t(n),i=o.length;i--;){var s=o[i],a=n[s];o[i]=[s,a,e(a)]}return o}return ex=r,ex}var tx,N_;function D_(){if(N_)return tx;N_=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return tx=e,tx}var rx,M_;function vY(){if(M_)return rx;M_=1;var e=gY(),t=bY(),r=D_();function n(o){var i=t(o);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(s){return s===o||e(s,o,i)}}return rx=n,rx}var nx,O_;function ox(){if(O_)return nx;O_=1;var e=Ac(),t=_c(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return nx=n,nx}var ix,j_;function sx(){if(j_)return ix;j_=1;var e=Bs(),t=ox(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function o(i,s){if(e(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||s!=null&&i in Object(s)}return ix=o,ix}var ax,L_;function yY(){if(L_)return ax;L_=1;var e=iy(),t="Expected a function";function r(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var s=arguments,a=o?o.apply(this,s):s[0],l=i.cache;if(l.has(a))return l.get(a);var c=n.apply(this,s);return i.cache=l.set(a,c)||l,c};return i.cache=new(r.Cache||e),i}return r.Cache=e,ax=r,ax}var lx,F_;function xY(){if(F_)return lx;F_=1;var e=yY(),t=500;function r(n){var o=e(n,function(s){return i.size===t&&i.clear(),s}),i=o.cache;return o}return lx=r,lx}var ux,B_;function wY(){if(B_)return ux;B_=1;var e=xY(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(s,a,l,c){i.push(l?c.replace(r,"$1"):a||s)}),i});return ux=n,ux}var cx,z_;function CY(){if(z_)return cx;z_=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=Array(o);++n<o;)i[n]=r(t[n],n,t);return i}return cx=e,cx}var dx,K_;function SY(){if(K_)return dx;K_=1;var e=zp(),t=CY(),r=Bs(),n=ox(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function s(a){if(typeof a=="string")return a;if(r(a))return t(a,s)+"";if(n(a))return i?i.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return dx=s,dx}var fx,V_;function kY(){if(V_)return fx;V_=1;var e=SY();function t(r){return r==null?"":e(r)}return fx=t,fx}var px,R_;function W_(){if(R_)return px;R_=1;var e=Bs(),t=sx(),r=wY(),n=kY();function o(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return px=o,px}var hx,U_;function Rp(){if(U_)return hx;U_=1;var e=ox();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return hx=t,hx}var mx,H_;function q_(){if(H_)return mx;H_=1;var e=W_(),t=Rp();function r(n,o){o=e(o,n);for(var i=0,s=o.length;n!=null&&i<s;)n=n[t(o[i++])];return i&&i==s?n:void 0}return mx=r,mx}var gx,G_;function PY(){if(G_)return gx;G_=1;var e=q_();function t(r,n,o){var i=r==null?void 0:e(r,n);return i===void 0?o:i}return gx=t,gx}var bx,Z_;function EY(){if(Z_)return bx;Z_=1;function e(t,r){return t!=null&&r in Object(t)}return bx=e,bx}var vx,Y_;function TY(){if(Y_)return vx;Y_=1;var e=W_(),t=JA(),r=Bs(),n=r_(),o=Ny(),i=Rp();function s(a,l,c){l=e(l,a);for(var d=-1,f=l.length,m=!1;++d<f;){var g=i(l[d]);if(!(m=a!=null&&c(a,g)))break;a=a[g]}return m||++d!=f?m:(f=a==null?0:a.length,!!f&&o(f)&&n(g,f)&&(r(a)||t(a)))}return vx=s,vx}var yx,J_;function AY(){if(J_)return yx;J_=1;var e=EY(),t=TY();function r(n,o){return n!=null&&t(n,o,e)}return yx=r,yx}var xx,X_;function _Y(){if(X_)return xx;X_=1;var e=T_(),t=PY(),r=AY(),n=sx(),o=$_(),i=D_(),s=Rp(),a=1,l=2;function c(d,f){return n(d)&&o(f)?i(s(d),f):function(m){var g=t(m,d);return g===void 0&&g===f?r(m,d):e(f,g,a|l)}}return xx=c,xx}var wx,Q_;function $Y(){if(Q_)return wx;Q_=1;function e(t){return t}return wx=e,wx}var Cx,e$;function IY(){if(e$)return Cx;e$=1;function e(t){return function(r){return r?.[t]}}return Cx=e,Cx}var Sx,t$;function NY(){if(t$)return Sx;t$=1;var e=q_();function t(r){return function(n){return e(n,r)}}return Sx=t,Sx}var kx,r$;function DY(){if(r$)return kx;r$=1;var e=IY(),t=NY(),r=sx(),n=Rp();function o(i){return r(i)?e(n(i)):t(i)}return kx=o,kx}var Px,n$;function MY(){if(n$)return Px;n$=1;var e=vY(),t=_Y(),r=$Y(),n=Bs(),o=DY();function i(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?t(s[0],s[1]):e(s):o(s)}return Px=i,Px}var Ex,o$;function OY(){if(o$)return Ex;o$=1;function e(t,r,n,o){for(var i=t.length,s=n+(o?1:-1);o?s--:++s<i;)if(r(t[s],s,t))return s;return-1}return Ex=e,Ex}var Tx,i$;function jY(){if(i$)return Tx;i$=1;function e(t){return t!==t}return Tx=e,Tx}var Ax,s$;function LY(){if(s$)return Ax;s$=1;function e(t,r,n){for(var o=n-1,i=t.length;++o<i;)if(t[o]===r)return o;return-1}return Ax=e,Ax}var _x,a$;function FY(){if(a$)return _x;a$=1;var e=OY(),t=jY(),r=LY();function n(o,i,s){return i===i?r(o,i,s):e(o,t,s)}return _x=n,_x}var $x,l$;function BY(){if(l$)return $x;l$=1;var e=FY();function t(r,n){var o=r==null?0:r.length;return!!o&&e(r,n,0)>-1}return $x=t,$x}var Ix,u$;function zY(){if(u$)return Ix;u$=1;function e(t,r,n){for(var o=-1,i=t==null?0:t.length;++o<i;)if(n(r,t[o]))return!0;return!1}return Ix=e,Ix}var Nx,c$;function KY(){if(c$)return Nx;c$=1;function e(){}return Nx=e,Nx}var Dx,d$;function VY(){if(d$)return Dx;d$=1;var e=C_(),t=KY(),r=by(),n=1/0,o=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return Dx=o,Dx}var Mx,f$;function p$(){if(f$)return Mx;f$=1;var e=IA(),t=BY(),r=zY(),n=MA(),o=VY(),i=by(),s=200;function a(l,c,d){var f=-1,m=t,g=l.length,b=!0,y=[],v=y;if(d)b=!1,m=r;else if(g>=s){var C=c?null:o(l);if(C)return i(C);b=!1,m=n,v=new e}else v=c?[]:y;e:for(;++f<g;){var S=l[f],k=c?c(S):S;if(S=d||S!==0?S:0,b&&k===k){for(var P=v.length;P--;)if(v[P]===k)continue e;c&&v.push(k),y.push(S)}else m(v,k,d)||(v!==y&&v.push(k),y.push(S))}return y}return Mx=a,Mx}var Ox,h$;function RY(){if(h$)return Ox;h$=1;var e=MY(),t=p$();function r(n,o){return n&&n.length?t(n,e(o,2)):[]}return Ox=r,Ox}var WY=RY();const UY=ju(WY);function jx(e,t){return r=>{const n=r.distinctProperties.find(o=>o.key===e);return!!n&&n.option.slug===t}}function HY(e,t){return e?.map(r=>{const n=UY(r.options.filter(o=>t.some(jx(r.key,o.slug))),"slug");return{...r,options:n}})}function qY(e,t){const r=e?.find(i=>i.key==="color")?.options,o=e?.find(i=>i.key==="internal_storage")?.options?.flatMap(i=>r?.map(s=>({internalStorage:i,color:s}))??[]);return o?o.map(i=>{const s=t.find(a=>jx("internal_storage",i.internalStorage.slug)(a)&&jx("color",i.color.slug)(a)&&["AVAILABLE","AVAILABLE_IF_STOCK"].includes(a.status||""));return s?{productVersionId:s.id,combination:i}:null}).filter(i=>i!==null):[]}function GY(e){return e?[e.sort((t,r)=>t.key==="internal_storage"?-1:r.key==="internal_storage"?1:0).map(t=>t.option.slug).join(":")]:[]}function ZY(e,t){return e.split(":").map(r=>{const n=t.find(i=>i.options.some(s=>s.slug===r)),o=n?.options.find(i=>i.slug===r);if(!(!n||!o))return{key:n.key,label:n.label,option:o}}).filter(r=>r!==void 0)}function m$({colorHex:e,storage:t,color:r}){const n=e&&/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e),o=n?e:"#E5E7EB",i=[t,r].filter(Boolean).join(" • ")||"";return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-3 h-3 rounded-full shrink-0 border",style:{backgroundColor:o,borderColor:n?`color-mix(in srgb, ${o} 80%, black)`:"#D1D5DB"}}),h.jsx("span",{className:"text-sm text-foreground-600 truncate",children:i})]})}function g$({disabled:e,versions:t,onSelectionChange:r,classNames:n,distinctProperties:o,selectedDistinctProperties:i,selectedPhone:s,ref:a}){const l=HY(o,t),c=qY(l,t),{popoverProps:d}=Zn(),[f,m]=x.useState(!1),{productVersion:g}=h0(s?.slug,i);return s?h.jsx(Fs,{shadow:"sm",radius:"lg",className:A("shrink-0 scroll-mt-4",n?.base),ref:a,children:h.jsxs(BT,{className:A("space-y-3 overflow-hidden",n?.cardBody),children:[h.jsxs("div",{className:"flex items-center gap-3",children:[g?.media.main?.url?h.jsx(Hl,{alt:g.media.main.altText||s.fullName,src:yv(g.media.main.url,64,64),size:"md",radius:"full",color:"primary",classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}):h.jsx(Hl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(cg,{size:24,className:"text-primary"}),classNames:{base:"w-10 h-10 bg-primary-100 shrink-0"}}),h.jsx("span",{className:"text-sm font-medium",children:s.fullName})]}),h.jsx(Tc,{variant:"bordered",placeholder:"Kies een versie","aria-label":"Kies een telefoon versie",isOpen:f,onOpenChange:b=>b!==f&&m(b),isDisabled:e,popoverProps:d,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:GY(i),radius:"sm",renderValue:b=>b.map(y=>{const v=c.find(C=>[C.combination.internalStorage.slug,C.combination.color.slug].join(":")===y.key);return h.jsx(m$,{colorHex:v?.combination.color.hex,storage:v?.combination.internalStorage.label,color:v?.combination.color.label},y.key)}),classNames:{...n,trigger:A("cursor-pointer border-small",n?.trigger)},children:c.map(b=>{const{color:y,internalStorage:v}=b.combination;if(!y||!v)return null;const C=[v.slug,y.slug].join(":");return h.jsx(Ba,{variant:"flat",textValue:`${v.label} • ${y.label}`,onClick:()=>{r(ZY(C,l||[]),b.productVersionId),m(!1)},children:h.jsx(m$,{colorHex:y.hex,storage:v.label,color:y.label})},[v.slug,y.slug].join(":"))})})]})}):null}function YY({onConfirm:e,classNames:t,brandSlug:r,phoneSlug:n,distinctProperties:o}){const{t:i}=Je(),{popularPhones:s,brands:a}=Sq(),{popoverProps:l,isShadowRoot:c}=Zn(),{isModalOpen:d,openModal:f,closeModal:m}=Qt(),g=x.useRef(null),[b,y]=x.useState(r||"popular"),[v,C]=x.useState(n),[S,k]=x.useState(o),P=d("phone-selector");x.useEffect(()=>{P&&(r&&y(r),C(n),k(o))},[P]);const E=R=>{C(R),k(void 0),setTimeout(()=>{!g.current||!R||g.current.scrollIntoView({behavior:"smooth"})},0)},{phones:$,isLoading:O}=xq(b),N=x.useMemo(()=>[...s,...$],[s,$]),D=x.useRef(null),M=x.useMemo(()=>{const R=N.find(K=>K.slug===v);if(R)return D.current=R,R;if(v&&D.current?.slug===v)return D.current;D.current=null},[N,v]),V=()=>{const R=S||M?.productVersion?.distinctProperties;if(!v||!R){e(void 0,[]),m("phone-selector");return}e(v,R),m("phone-selector")};return h.jsx(fi,{isOpen:P,onOpenChange:R=>R?f("phone-selector"):m("phone-selector"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!c,portalContainer:l.portalContainer,classNames:{backdrop:A(t?.modal?.backdrop),wrapper:A(t?.modal?.wrapper),base:A("m-0 max-h-[90vh] h-[90vh] sm:h-[80vh]",t?.modal?.base),header:A(t?.modal?.header),body:A(t?.modal?.body),footer:A(t?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:i("phoneSelector.selectPhone")}),h.jsxs(ai,{children:[h.jsx(g$,{ref:g,disabled:!M,versions:M?.productVersions||[],distinctProperties:M?.distinctProperties,selectedDistinctProperties:S||M?.productVersion?.distinctProperties,onSelectionChange:R=>k(R),selectedPhone:M,classNames:t?.variantList}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Xq,{brands:a,selectedBrandSlug:b,onBrandChange:y,classNames:t?.brandTabs}),h.jsx(NG,{isLoading:O&&b!=="popular",phones:b==="popular"?s:$,selectedPhoneSlug:v,onPhoneSelect:E,classNames:t?.phoneList})]})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium disabled:opacity-50 disabled:pointer-events-none",t?.confirmButton),onPress:V,color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,disabled:!v&&!n,children:i("common.confirm")})})]})})}function JY({onChange:e,classNames:t,disabled:r=!1,productSlug:n,selectedDistinctProperties:o=[]}){const{t:i}=Je(),{phoneSelectorButton:s}=vt(),{openModal:a}=Qt(),[l,c]=x.useState(n),[d,f]=x.useState(o),{product:m,productVersion:g}=h0(l,d);function b(v,C){c(v),f(C),e(v,C)}const y=[g?.distinctProperty?.internalStorage?.label,g?.distinctProperty?.color?.label].filter(Boolean).join(" • ");return x.useEffect(()=>{c(n)},[n]),x.useEffect(()=>{o.length===0&&f([])},[o.length]),x.useEffect(()=>{!l||d.length>0||!g||!("distinctProperties"in g)||b(l,g.distinctProperties)},[l,d.length,g?.distinctProperty?.color?.slug]),h.jsxs(h.Fragment,{children:[h.jsx(ql,{disabled:r,onClick:()=>!r&&a("phone-selector"),selected:!!g,imageUrl:g?.media?.main?.url,imageAlt:g?.media?.main?.altText,title:m?m.fullName:i("phoneSelector.phone"),description:g?y:i("phoneSelector.selectPhone"),Icon:cg,classNames:s}),h.jsx(YY,{phoneSlug:l,brandSlug:m?.brand.slug,distinctProperties:d,onConfirm:b,classNames:t})]})}function XY(e){var t,r;const n=ur(),[o,i]=qr(e,QC.variantKeys),{ref:s,as:a,src:l,className:c,classNames:d,loading:f,isBlurred:m,fallbackSrc:g,isLoading:b,disableSkeleton:y=!!g,removeWrapper:v=!1,onError:C,onLoad:S,srcSet:k,sizes:P,crossOrigin:E,...$}=o,O=RP({src:l,loading:f,onError:C,onLoad:S,ignoreFallback:!1,srcSet:k,sizes:P,crossOrigin:E,shouldBypassImageLoad:a!==void 0}),N=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,D=O==="loaded"&&!b,M=O==="loading"||b,V=e.isZoomed,R=a||"img",K=ot(s),{w:j,h:B}=x.useMemo(()=>({w:o.width?typeof o.width=="number"?`${o.width}px`:o.width:"fit-content",h:o.height?typeof o.height=="number"?`${o.height}px`:o.height:"auto"}),[o?.width,o?.height]),U=(!l||!D)&&!!g,W=M&&!y,L=x.useMemo(()=>QC({...i,disableAnimation:N,showSkeleton:W}),[jr(i),N,W]),Z=A(c,d?.img),T=(H={})=>{const Y=A(Z,H?.className);return{src:l,ref:K,"data-loaded":ae(D),className:L.img({class:Y}),loading:f,srcSet:k,sizes:P,crossOrigin:E,...$,style:{...$?.height&&{height:B},...H.style,...$.style}}},F=x.useCallback(()=>{const H=U?{backgroundImage:`url(${g})`}:{};return{className:L.wrapper({class:d?.wrapper}),style:{...H,maxWidth:j}}},[L,U,g,d?.wrapper,j]),_=x.useCallback(()=>({src:l,"aria-hidden":ae(!0),className:L.blurredImg({class:d?.blurredImg})}),[L,l,d?.blurredImg]);return{Component:R,domRef:K,slots:L,classNames:d,isBlurred:m,disableSkeleton:y,fallbackSrc:g,removeWrapper:v,isZoomed:V,isLoading:M,getImgProps:T,getWrapperProps:F,getBlurredImgProps:_}}var b$=Xe((e,t)=>{const{Component:r,domRef:n,slots:o,classNames:i,isBlurred:s,isZoomed:a,fallbackSrc:l,removeWrapper:c,disableSkeleton:d,getImgProps:f,getWrapperProps:m,getBlurredImgProps:g}=XY({...e,ref:t}),b=h.jsx(r,{ref:n,...f()});if(c)return b;const y=h.jsx("div",{className:o.zoomedWrapper({class:i?.zoomedWrapper}),children:b});return s?h.jsxs("div",{...m(),children:[a?y:b,x.cloneElement(b,g())]}):a||!d||l?h.jsxs("div",{...m(),children:[" ",a?y:b]}):b});b$.displayName="HeroUI.Image";var Ar=b$,Wp;function QY(e){if(!Wp)if(typeof document<"u")Wp=document.createElement("textarea");else return;var t="&"+e+";";Wp.innerHTML=t;var r=Wp.value;return r!==t?r:void 0}var Te=32,$e=9,Ka=13,Ke=10,Ot=96,Nr=126,cr=91,hi=94,yt=62,mi=35,Lx=37,dt=45,Jn=61,zr=92,mr=42,or=95,zt=60,Fx=64,yo=93,Sn=33,v$=38,kn=58,y$=70,Va=102,Nc=104,zs=119,iu=116,Bx=112,x$=115,eJ=160,tJ=12,rJ=44,w$=59,Dc=63,xo=46,xr=47,Ra=39,Wa=34,Ks=43,Kr=124,su=123,zx=125,Uo=40,Ho=41,Up=30,Kx=31,Tt=48,At=57,pt=65,xt=90,Yt=97,ir=122,Hp=128,qo=32,nJ={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22},ve=nJ;function oJ(e){if(!S$(e,"---"))return null;let t=3;for(;t<e.length&&(e[t]===" "||e[t]===" ");)t++;if(t<e.length&&e[t]==="\r"&&t++,t>=e.length||e[t]!==`
|
|
293
293
|
`)return null;t++;let r=!1;for(;t<e.length;){let n=t;for(;t<e.length&&e[t]!==`
|
|
294
294
|
`&&e[t]!=="\r";)t++;if(t>=e.length)break;let o=t;if(e[t]==="\r"&&t++,t<e.length&&e[t]===`
|
|
295
|
-
`&&t++,S$(e,"---",n))return{endPos:t,hasValidYaml:r};if(!r){let i=gJ(e,n,o);if(i<o){let s=e.charCodeAt(i);if(s>=Yt&&s<=ir||s>=pt&&s<=xt||s>=Tt&&s<=At||s===or){for(i++;i<o&&(s=e.charCodeAt(i),s>=Yt&&s<=ir||s>=pt&&s<=xt||s>=Tt&&s<=At||s===or||s===
|
|
296
|
-
`),o=i+1):s===0&&(o<i&&Ua.push(e.slice(o,i)),Ua.push("�"),o=i+1)}return o<n&&Ua.push(e.slice(o)),Ua.join("")}function gJ(e,t,r){let n=r??e.length;for(;t<n&&(e[t]===" "||e[t]===" ");)t++;return t}function Rx(e,t,r){for(var n=e,o=t.split("."),i=0;i<o.length&&(n=n?.[o[i]],n!==void 0);)i++;return n||r}function bJ(e){for(var t=!1,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=Te||n===Wa||n===Lx||n===zt||n===yt||n===cr||n===zr||n===yo||n===hi||n===Ot||n>=123){t=!0;break}}if(!t)return e;for(var o="",r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n===Lx&&r+2<e.length){var i=e.charCodeAt(r+1),s=e.charCodeAt(r+2);if((i>=Tt&&i<=At||i>=pt&&i<=y$||i>=Yt&&i<=Va)&&(s>=Tt&&s<=At||s>=pt&&s<=y$||s>=Yt&&s<=Va)){o+=e[r]+e[r+1]+e[r+2],r+=2;continue}}o+=encodeURI(e[r])}return o}function vJ(...e){return e.filter(Boolean).join(" ")}var yJ=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),Gp=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function A$(e){return yJ.has(e.toLowerCase())}function xJ(e){return Gp.lastIndex=0,Gp.test(e)}function _$(e){return Gp.lastIndex=0,e.replace(Gp,function(t,r,n,o){return"<"+r+n+o})}var wJ=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,CJ=/^<[A-Z]/,Wx=["script","pre","style","textarea"],Oc=new Set(Wx),SJ=/<(?:pre|script|style|textarea)\b/i,$$=/<(?:pre|script|style|textarea)\b/iy,I$=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,N$=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,D$=new Uint8Array(128);(function(){for(var e=[Ot,mr,or,Nr,Jn,cr,Sn,zt,zr,Kx,Nc,zs,Va],t=0;t<e.length;t++)D$[e[t]]=1})();var M$=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function kJ(e){return Oc.has(e)}function PJ(e){return SJ.test(e)}function O$(e,t,r){for(var n=t,o=r;n<o&&(e.charCodeAt(n)===Te||e.charCodeAt(n)===$e);)n++;if(n>=o)return!1;e.charCodeAt(n)===Kr&&n++;for(var i=0;n<o;){for(;n<o&&(e.charCodeAt(n)===Te||e.charCodeAt(n)===$e);)n++;if(n>=o)break;if(e.charCodeAt(n)===Kr&&i>0){for(var s=n+1;s<o&&(e.charCodeAt(s)===Te||e.charCodeAt(s)===$e);)s++;if(s>=o)return!0}if(e.charCodeAt(n)===kn&&n++,n>=o||e.charCodeAt(n)!==
|
|
297
|
-
`,n),l=a<0?o:a,c=n,d=0;c<l&&d<4;)if(e.charCodeAt(c)===Te)d++,c++;else if(e.charCodeAt(c)===$e)d+=4,c++;else break;if(c>=l){i=!1,n=a<0?o:a+1;continue}if(d<4){var f=e.charCodeAt(c);if(f===Ot||f===Nr){for(var m=f,g=0,b=c;b<l&&e.charCodeAt(b)===m;)g++,b++;if(g>=3){var y=!0;if(m===Ot){for(var v=b;v<l;v++)if(e.charCodeAt(v)===Ot){y=!1;break}}if(y){i=!1;for(var C=a<0?o:a+1;C<o;){for(var S=C,k=0;S<o&&k<4;){var P=e.charCodeAt(S);if(P===Te)k++,S++;else if(P===$e)k+=4,S++;else break}if(k<4&&S<o&&e.charCodeAt(S)===m){for(var E=0;S<o&&e.charCodeAt(S)===m;)E++,S++;if(E>=g){for(;S<o&&(e.charCodeAt(S)===Te||e.charCodeAt(S)===$e);)S++;if(S>=o||e.charCodeAt(S)===Ke){n=S>=o?o:S+1;break}}}for(;C<o&&e.charCodeAt(C)!==Ke;)C++;C<o&&C++}C>=o&&(n=o,s=!0);continue}}}}for(var $=c;$<l&&e.charCodeAt($)===yt;){$++,$<l&&e.charCodeAt($)===Te&&$++;for(var O=0;$<l&&O<4;)if(e.charCodeAt($)===Te)O++,$++;else if(e.charCodeAt($)===$e)O+=4,$++;else break;if(O>=4)break;i=!1}if(!i&&d<4&&$<l&&e.charCodeAt($)===cr&&!($+1<o&&e.charCodeAt($+1)===hi)){var N=j$(e,$,t);if(N){n=N,i=!1;continue}}var D=e.charCodeAt(c);if(D===mi&&d<4)i=!1;else if(d<4&&(D===
|
|
295
|
+
`&&t++,S$(e,"---",n))return{endPos:t,hasValidYaml:r};if(!r){let i=gJ(e,n,o);if(i<o){let s=e.charCodeAt(i);if(s>=Yt&&s<=ir||s>=pt&&s<=xt||s>=Tt&&s<=At||s===or){for(i++;i<o&&(s=e.charCodeAt(i),s>=Yt&&s<=ir||s>=pt&&s<=xt||s>=Tt&&s<=At||s===or||s===dt||s===xo);)i++;i<o&&e.charCodeAt(i)===kn&&(i++,i>=o?r=!0:(s=e.charCodeAt(i),(s===Te||s===$e)&&(r=!0)))}}}}return null}var iJ=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,sJ={class:"className",for:"htmlFor",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",autocomplete:"autoComplete",autofocus:"autoFocus",autoplay:"autoPlay",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",classid:"classId",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",crossorigin:"crossOrigin",enctype:"encType",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",inputmode:"inputMode",keyparams:"keyParams",keytype:"keyType",marginheight:"marginHeight",marginwidth:"marginWidth",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",novalidate:"noValidate",radiogroup:"radioGroup",readonly:"readOnly",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",viewbox:"viewBox"};function Xn(e){var t={};for(var r in e){var n=r.toLowerCase(),o=sJ[n];if(o)t[o]=e[r];else{var i=r.indexOf(":");i!==-1?t[r.slice(0,i)+r[i+1].toUpperCase()+r.slice(i+2)]=e[r]:t[r]=e[r]}}return t}var aJ=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function qp(e){return e.indexOf("&")===-1?e:e.replace(iJ,(t,r)=>{var n=QY(r);if(n)return n;if(r[0]==="#"){var o=r[1]==="x"||r[1]==="X"?parseInt(r.slice(2),16):parseInt(r.slice(1),10);return o===0||o>=55296&&o<=57343||o>1114111?"�":o<=65535?String.fromCharCode(o):String.fromCharCode(55296+(o-65536>>10),56320+(o-65536&1023))}return t})}var C$=/(javascript|vbscript|data(?!:image)):/i;function Vx(e){if(C$.test(e))return null;if(e.indexOf("%")===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(C$.test(t))return null}catch{return null}return e}var fn={},Pn,Vr;for(Pn=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],Vr=0;Vr<Pn.length;Vr++)fn[Pn[Vr]]="a";for(fn[231]=fn[199]="c",fn[240]=fn[208]="d",Pn=[200,201,202,203,233,232,234,235],Vr=0;Vr<Pn.length;Vr++)fn[Pn[Vr]]="e";for(Pn=[207,239,206,238,205,237,204,236],Vr=0;Vr<Pn.length;Vr++)fn[Pn[Vr]]="i";for(fn[209]=fn[241]="n",Pn=[248,216,339,338,213,245,212,244,211,243,210,242],Vr=0;Vr<Pn.length;Vr++)fn[Pn[Vr]]="o";for(Pn=[220,252,219,251,218,250,217,249],Vr=0;Vr<Pn.length;Vr++)fn[Pn[Vr]]="u";fn[376]=fn[255]=fn[221]=fn[253]="y";function wo(e){for(var t="",r=-1,n=e.length,o=0;o<n;o++){var i=e.charCodeAt(o);if(i>=Yt&&i<=ir||i>=Tt&&i<=At){r<0&&(r=o);continue}if(i>=pt&&i<=xt){r>=0&&(t+=e.slice(r,o),r=-1),t+=String.fromCharCode(i+qo);continue}if(i===Te||i===dt){r>=0&&(t+=e.slice(r,o),r=-1),t+="-";continue}r>=0&&(t+=e.slice(r,o),r=-1);var s=fn[i];s&&(t+=s)}return r>=0&&(t+=e.slice(r)),t}function S$(e,t,r){return e.startsWith(t,r)}var k$=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","circle","ellipse","line","path","polygon","polyline","rect","use","stop","animate","set"]);function Mc(e){let t=e.toLowerCase();if(k$.has(t))return!0;let r=t.indexOf(":");return r!==-1?(t=t.slice(r+1),k$.has(t)):!1}var Vs=1,P$=2,au=4,E$=8,lJ=16,Go=32,Rs=64,T$=1,uJ=2,cJ=3,dJ=4,fJ=(function(){var e=new Uint8Array(128),t;for(e[$e]=Vs,e[Ke]=Vs|P$,e[tJ]=Vs,e[Ka]=Vs|P$,e[Te]=Vs,t=Sn;t<=xr;t++)e[t]=au;for(t=kn;t<=Fx;t++)e[t]=au;for(t=cr;t<=Ot;t++)e[t]=au;for(t=su;t<=Nr;t++)e[t]=au;for(t=Tt;t<=At;t++)e[t]=lJ;for(t=pt;t<=xt;t++)e[t]=E$;for(t=Yt;t<=ir;t++)e[t]=E$;return e})();(function(){let e=new Uint8Array(128);return e[zr]=uJ,e[cr]=dJ,e[mr]=e[or]=e[Nr]=e[Jn]=cJ,e[Ot]=e[zt]=e[Fx]=e[yo]=e[Ke]=e[Te]=e[Sn]=T$,e[Va]=e[Nc]=e[zs]=T$,e})();var pJ=/[\p{P}\p{S}]/u,hJ=new RegExp("\\p{Zs}","u"),Ua=[];function mJ(e){var t=e.indexOf("\r"),r=e.indexOf("\0");if(t===-1&&r===-1)return e;var n=e.length;Ua.length=0;var o=0,i=0;for(t===-1?i=r:r===-1?i=t:i=t<r?t:r;i<n;i++){var s=e.charCodeAt(i);s===Ka?(o<i&&Ua.push(e.slice(o,i)),i+1<n&&e.charCodeAt(i+1)===Ke&&i++,Ua.push(`
|
|
296
|
+
`),o=i+1):s===0&&(o<i&&Ua.push(e.slice(o,i)),Ua.push("�"),o=i+1)}return o<n&&Ua.push(e.slice(o)),Ua.join("")}function gJ(e,t,r){let n=r??e.length;for(;t<n&&(e[t]===" "||e[t]===" ");)t++;return t}function Rx(e,t,r){for(var n=e,o=t.split("."),i=0;i<o.length&&(n=n?.[o[i]],n!==void 0);)i++;return n||r}function bJ(e){for(var t=!1,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=Te||n===Wa||n===Lx||n===zt||n===yt||n===cr||n===zr||n===yo||n===hi||n===Ot||n>=123){t=!0;break}}if(!t)return e;for(var o="",r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n===Lx&&r+2<e.length){var i=e.charCodeAt(r+1),s=e.charCodeAt(r+2);if((i>=Tt&&i<=At||i>=pt&&i<=y$||i>=Yt&&i<=Va)&&(s>=Tt&&s<=At||s>=pt&&s<=y$||s>=Yt&&s<=Va)){o+=e[r]+e[r+1]+e[r+2],r+=2;continue}}o+=encodeURI(e[r])}return o}function vJ(...e){return e.filter(Boolean).join(" ")}var yJ=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),Gp=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function A$(e){return yJ.has(e.toLowerCase())}function xJ(e){return Gp.lastIndex=0,Gp.test(e)}function _$(e){return Gp.lastIndex=0,e.replace(Gp,function(t,r,n,o){return"<"+r+n+o})}var wJ=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,CJ=/^<[A-Z]/,Wx=["script","pre","style","textarea"],Oc=new Set(Wx),SJ=/<(?:pre|script|style|textarea)\b/i,$$=/<(?:pre|script|style|textarea)\b/iy,I$=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,N$=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,D$=new Uint8Array(128);(function(){for(var e=[Ot,mr,or,Nr,Jn,cr,Sn,zt,zr,Kx,Nc,zs,Va],t=0;t<e.length;t++)D$[e[t]]=1})();var M$=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function kJ(e){return Oc.has(e)}function PJ(e){return SJ.test(e)}function O$(e,t,r){for(var n=t,o=r;n<o&&(e.charCodeAt(n)===Te||e.charCodeAt(n)===$e);)n++;if(n>=o)return!1;e.charCodeAt(n)===Kr&&n++;for(var i=0;n<o;){for(;n<o&&(e.charCodeAt(n)===Te||e.charCodeAt(n)===$e);)n++;if(n>=o)break;if(e.charCodeAt(n)===Kr&&i>0){for(var s=n+1;s<o&&(e.charCodeAt(s)===Te||e.charCodeAt(s)===$e);)s++;if(s>=o)return!0}if(e.charCodeAt(n)===kn&&n++,n>=o||e.charCodeAt(n)!==dt)return!1;for(;n<o&&e.charCodeAt(n)===dt;)n++;for(n<o&&e.charCodeAt(n)===kn&&n++,i++;n<o&&(e.charCodeAt(n)===Te||e.charCodeAt(n)===$e);)n++;if(n<o)if(e.charCodeAt(n)===Kr)n++;else return!1}return i>0}function Hi(e,t){if(e.charCodeAt(t)!==zt)return null;let r=t+1,n=e.length,o=!1;e.charCodeAt(r)===xr&&(r++,o=!0);let i=r,s=e.charCodeAt(r);if(!(s>=Yt&&s<=ir||s>=pt&&s<=xt))return null;for(;r<n&&(e.charCodeAt(r)>=Yt&&e.charCodeAt(r)<=ir||e.charCodeAt(r)>=pt&&e.charCodeAt(r)<=xt||e.charCodeAt(r)>=Tt&&e.charCodeAt(r)<=At||e.charCodeAt(r)===dt);)r++;let a=e.slice(i,r);if(!a)return null;let l=r;for(;r<n&&(e.charCodeAt(r)===Te||e.charCodeAt(r)===$e||e.charCodeAt(r)===Ke);)r++;let c=e.slice(l,r);if(r===l&&r<n){var d=e.charCodeAt(r);if(d!==yt&&d!==xr)return null}let f=r,m={},g=!1;for(;r<n;){let O=e.charCodeAt(r);if(O===yt){let N=e.slice(f,r);return{tag:a,attrs:m,selfClosing:!1,end:r+1,rawAttrs:N,whitespaceBeforeAttrs:c,isClosing:o,hasSpaceBeforeSlash:g}}if(O===Te||O===$e||O===Ke){r++;continue}if(O===xr&&r+1<n&&e.charCodeAt(r+1)===yt){let N=e.slice(f,r);return g=r>f&&e.charCodeAt(r-1)===Te,{tag:a,attrs:m,selfClosing:!0,end:r+2,rawAttrs:N,whitespaceBeforeAttrs:c,isClosing:o,hasSpaceBeforeSlash:g}}var b=r,y=e.charCodeAt(r);if(!(y>=Yt&&y<=ir||y>=pt&&y<=xt||y===or||y===kn))return null;for(r++;r<n;){var v=e.charCodeAt(r);if(v>=Yt&&v<=ir||v>=pt&&v<=xt||v>=Tt&&v<=At||v===or||v===xo||v===kn||v===dt)r++;else break}for(var C=e.slice(b,r);r<n&&(e.charCodeAt(r)===Te||e.charCodeAt(r)===$e);)r++;if(e.charCodeAt(r)!==Jn){m[C]="";continue}for(r++;r<n&&(e.charCodeAt(r)===Te||e.charCodeAt(r)===$e);)r++;var S=e.charCodeAt(r);if(S===Wa||S===Ra){r++;for(var k=r;r<n&&e.charCodeAt(r)!==S;)r++;if(r>=n)return null;if(m[C]=e.slice(k,r),r++,r<n){var P=e.charCodeAt(r);if(P!==Te&&P!==$e&&P!==Ke&&P!==yt&&P!==xr)return null}}else if(S===su){var E=1,k=r;for(r++;r<n&&E>0;){var v=e.charCodeAt(r);v===su?E++:v===zx&&E--,r++}m[C]=e.slice(k,r)}else{for(var k=r;r<n;){var $=e.charCodeAt(r);if($===Te||$===$e||$===yt||$===Ke||$===Wa||$===Ra||$===Jn||$===zt||$===Ot)break;r++}if(r===k)return null;m[C]=e.slice(k,r)}}return null}function EJ(e,t,r){if(!r.streaming&&!r.optimizeForStreaming&&e.indexOf("[")===-1)return!1;for(var n=0,o=e.length,i=!1,s=!1;n<o;){for(var a=e.indexOf(`
|
|
297
|
+
`,n),l=a<0?o:a,c=n,d=0;c<l&&d<4;)if(e.charCodeAt(c)===Te)d++,c++;else if(e.charCodeAt(c)===$e)d+=4,c++;else break;if(c>=l){i=!1,n=a<0?o:a+1;continue}if(d<4){var f=e.charCodeAt(c);if(f===Ot||f===Nr){for(var m=f,g=0,b=c;b<l&&e.charCodeAt(b)===m;)g++,b++;if(g>=3){var y=!0;if(m===Ot){for(var v=b;v<l;v++)if(e.charCodeAt(v)===Ot){y=!1;break}}if(y){i=!1;for(var C=a<0?o:a+1;C<o;){for(var S=C,k=0;S<o&&k<4;){var P=e.charCodeAt(S);if(P===Te)k++,S++;else if(P===$e)k+=4,S++;else break}if(k<4&&S<o&&e.charCodeAt(S)===m){for(var E=0;S<o&&e.charCodeAt(S)===m;)E++,S++;if(E>=g){for(;S<o&&(e.charCodeAt(S)===Te||e.charCodeAt(S)===$e);)S++;if(S>=o||e.charCodeAt(S)===Ke){n=S>=o?o:S+1;break}}}for(;C<o&&e.charCodeAt(C)!==Ke;)C++;C<o&&C++}C>=o&&(n=o,s=!0);continue}}}}for(var $=c;$<l&&e.charCodeAt($)===yt;){$++,$<l&&e.charCodeAt($)===Te&&$++;for(var O=0;$<l&&O<4;)if(e.charCodeAt($)===Te)O++,$++;else if(e.charCodeAt($)===$e)O+=4,$++;else break;if(O>=4)break;i=!1}if(!i&&d<4&&$<l&&e.charCodeAt($)===cr&&!($+1<o&&e.charCodeAt($+1)===hi)){var N=j$(e,$,t);if(N){n=N,i=!1;continue}}var D=e.charCodeAt(c);if(D===mi&&d<4)i=!1;else if(d<4&&(D===dt||D===mr||D===or)){for(var M=c,V=0;M<l;){var R=e.charCodeAt(M);if(R===D)V++;else if(R!==Te&&R!==$e)break;M++}i=!(V>=3&&M>=l)}else i=!0;n=a<0?o:a+1}return s}function j$(e,t,r){let n=e.length;if(e.charCodeAt(t)!==cr)return null;let o=t+1<n&&e.charCodeAt(t+1)===hi,i=t+1;for(;i<n;){var s=e.charCodeAt(i);if(s===yo){i++;break}if(s===cr)return null;s===zr&&i+1<n&&i++,i++}if(i>n||e.charCodeAt(i-1)!==yo)return null;let a=e.slice(t+1,i-1);if(a.length>999)return null;let l=Yp(a);if(!l||i>=n||e.charCodeAt(i)!==kn)return null;i++;let c=!1;for(;i<n;){let K=e.charCodeAt(i);if(K===Te||K===$e)i++;else if(K===Ke&&!c)c=!0,i++;else break}if(o){let K=e.indexOf(`
|
|
298
298
|
`,i),j=K<0?n:K,B=e.slice(i,j).trim();return r[l]={target:B,title:void 0},K<0?n:K+1}var d;if(i<n&&e.charCodeAt(i)===zt){i++;for(var f=i;i<n&&e.charCodeAt(i)!==yt&&e.charCodeAt(i)!==Ke;)e.charCodeAt(i)===zr&&i+1<n&&i++,i++;if(i>=n||e.charCodeAt(i)!==yt)return null;d=e.slice(f,i),i++;for(var m=e.indexOf(`
|
|
299
299
|
`,i),g=m<0?n:m,b=i;b<g&&(e.charCodeAt(b)===Te||e.charCodeAt(b)===$e);)b++;if(b<g){if(b===i)return null;var y=e.charCodeAt(b);if(y!==Wa&&y!==Ra&&y!==Uo)return null}}else{for(var f=i,v=0;i<n;){var s=e.charCodeAt(i);if(s===Uo)v++;else if(s===Ho){if(v===0)break;v--}else{if(s===Te||s===$e||s===Ke)break;s===zr&&i+1<n&&i++}i++}if(d=e.slice(f,i),!d)return null}for(;i<n&&(e.charCodeAt(i)===Te||e.charCodeAt(i)===$e);)i++;var C=e.indexOf(`
|
|
300
|
-
`,i),S=C<0?n:C,k,P=!1,E=i,$=i;if(i===S&&i<n)for($=i+1;$<n&&(e.charCodeAt($)===Te||e.charCodeAt($)===$e);)$++;if($<n){var O=e.charCodeAt($);if(O===Wa||O===Ra||O===Uo){for(var N=O===Uo?41:O,D=$+1,M=D;D<n;){var V=e.charCodeAt(D);if(V===N){for(var R=D+1;R<n&&(e.charCodeAt(R)===Te||e.charCodeAt(R)===$e);)R++;(R>=n||e.charCodeAt(R)===Ke)&&(k=e.slice(M,D),P=!0,E=R<n?R+1:n);break}if(V===zr&&D+1<n){D+=2;continue}if(V===Ke&&D+1<n&&e.charCodeAt(D+1)===Ke)break;D++}if(!P&&$===i)return null}}if(P)return r[l]||(r[l]={target:lu(d),title:k!==void 0?qp(lu(k)):k}),E;for(;i<S&&(e.charCodeAt(i)===Te||e.charCodeAt(i)===$e);)i++;return i<S?null:(r[l]||(r[l]={target:lu(d),title:k}),C<0?n:C+1)}var En=new Uint8Array(fJ);for(En[Kx]=Vs,En[mi]|=Go,En[yt]|=Go,En[
|
|
301
|
-
`,t);return r<0?e.length:r}function Et(e,t){let r=Kt(e,t);return r<e.length?r+1:r}function jc(e,t,r){for(;t<r;){let n=e.charCodeAt(t);if(n!==Te&&n!==$e)break;t++}return t}function K$(e,t){let r=Et(e,t);for(;r<e.length;){let n=Kt(e,r);if(zn(e,r,n))return r;r=Et(e,r)}return e.length}function qi(e,t,r,n){let o=0;for(;t+o<r&&e.charCodeAt(t+o)===n;)o++;return o}var Ft=0,Bt=0;function wr(e,t,r){for(Ft=0,Bt=0;t+Bt<r;){let n=e.charCodeAt(t+Bt);if(n===$e)Ft+=4-Ft%4;else if(n===Te)Ft++;else break;Bt++}}function zn(e,t,r){return jc(e,t,r)>=r}function V$(e,t,r,n){let o=Kt(e,t);if(wr(e,t,o),Ft>3)return null;let i=t+Bt;if(e.charCodeAt(i)!==mi)return null;let s=qi(e,i,o,35);if(s<1||s>6||(i+=s,i<o&&e.charCodeAt(i)!==Te&&e.charCodeAt(i)!==$e))return null;i=jc(e,i,o);for(var a=o;a>i&&e.charCodeAt(a-1)===Te;)a--;for(var l=a;a>i&&e.charCodeAt(a-1)===mi;)a--;if(a<l)if(a===i||e.charCodeAt(a-1)===Te)for(;a>i&&e.charCodeAt(a-1)===Te;)a--;else a=l;let c=e.slice(i,a),d=Tn(c,0,c.length,r,n),f=(n?.slugify||wo)(c);return{node:{type:ve.heading,level:s,children:d,id:f},end:Et(e,o)}}function TJ(e,t,r){var n=e.charCodeAt(t);if(n!==Jn&&n!==
|
|
300
|
+
`,i),S=C<0?n:C,k,P=!1,E=i,$=i;if(i===S&&i<n)for($=i+1;$<n&&(e.charCodeAt($)===Te||e.charCodeAt($)===$e);)$++;if($<n){var O=e.charCodeAt($);if(O===Wa||O===Ra||O===Uo){for(var N=O===Uo?41:O,D=$+1,M=D;D<n;){var V=e.charCodeAt(D);if(V===N){for(var R=D+1;R<n&&(e.charCodeAt(R)===Te||e.charCodeAt(R)===$e);)R++;(R>=n||e.charCodeAt(R)===Ke)&&(k=e.slice(M,D),P=!0,E=R<n?R+1:n);break}if(V===zr&&D+1<n){D+=2;continue}if(V===Ke&&D+1<n&&e.charCodeAt(D+1)===Ke)break;D++}if(!P&&$===i)return null}}if(P)return r[l]||(r[l]={target:lu(d),title:k!==void 0?qp(lu(k)):k}),E;for(;i<S&&(e.charCodeAt(i)===Te||e.charCodeAt(i)===$e);)i++;return i<S?null:(r[l]||(r[l]={target:lu(d),title:k}),C<0?n:C+1)}var En=new Uint8Array(fJ);for(En[Kx]=Vs,En[mi]|=Go,En[yt]|=Go,En[dt]|=Go|Rs,En[Ks]|=Go,En[mr]|=Go|Rs,En[or]|=Go|Rs,En[Ot]|=Go|Rs,En[Nr]|=Go|Rs,En[zt]|=Go|Rs,En[cr]|=Rs,En[Sn]|=Rs,En[Kr]|=Go,Zp=Tt;Zp<=At;Zp++)En[Zp]|=Go;var Zp;function L$(e){if(e.indexOf("[")<0&&e.indexOf("]")<0)return!1;for(var t=0;t<e.length;t++){if(e.charCodeAt(t)===zr){t++;continue}if(e.charCodeAt(t)===cr||e.charCodeAt(t)===yo)return!0}return!1}function Yp(e){var t=e.replace(/\s+/g," ").trim();return t.indexOf("ẞ")!==-1?t.replace(/\u1E9E/g,"ss").toLowerCase():t.toLowerCase()}function Ux(e){return e<Hp?En[e]:e===eJ?Vs:0}function lu(e){return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,"$1")}var F$=null,B$=-1,z$=-1;function Kt(e,t){if(t===B$&&e===F$)return z$;var r=e.indexOf(`
|
|
301
|
+
`,t);return r<0?e.length:r}function Et(e,t){let r=Kt(e,t);return r<e.length?r+1:r}function jc(e,t,r){for(;t<r;){let n=e.charCodeAt(t);if(n!==Te&&n!==$e)break;t++}return t}function K$(e,t){let r=Et(e,t);for(;r<e.length;){let n=Kt(e,r);if(zn(e,r,n))return r;r=Et(e,r)}return e.length}function qi(e,t,r,n){let o=0;for(;t+o<r&&e.charCodeAt(t+o)===n;)o++;return o}var Ft=0,Bt=0;function wr(e,t,r){for(Ft=0,Bt=0;t+Bt<r;){let n=e.charCodeAt(t+Bt);if(n===$e)Ft+=4-Ft%4;else if(n===Te)Ft++;else break;Bt++}}function zn(e,t,r){return jc(e,t,r)>=r}function V$(e,t,r,n){let o=Kt(e,t);if(wr(e,t,o),Ft>3)return null;let i=t+Bt;if(e.charCodeAt(i)!==mi)return null;let s=qi(e,i,o,35);if(s<1||s>6||(i+=s,i<o&&e.charCodeAt(i)!==Te&&e.charCodeAt(i)!==$e))return null;i=jc(e,i,o);for(var a=o;a>i&&e.charCodeAt(a-1)===Te;)a--;for(var l=a;a>i&&e.charCodeAt(a-1)===mi;)a--;if(a<l)if(a===i||e.charCodeAt(a-1)===Te)for(;a>i&&e.charCodeAt(a-1)===Te;)a--;else a=l;let c=e.slice(i,a),d=Tn(c,0,c.length,r,n),f=(n?.slugify||wo)(c);return{node:{type:ve.heading,level:s,children:d,id:f},end:Et(e,o)}}function TJ(e,t,r){var n=e.charCodeAt(t);if(n!==Jn&&n!==dt)return!1;for(var o=t;o<r&&e.charCodeAt(o)===n;)o++;for(;o<r&&(e.charCodeAt(o)===Te||e.charCodeAt(o)===$e);)o++;return o>=r}function Ws(e,t){let r=Kt(e,t);if(wr(e,t,r),Ft>3)return null;let n=t+Bt,o=e.charCodeAt(n);if(o!==dt&&o!==mr&&o!==or)return null;let i=0;for(;n<r;){let s=e.charCodeAt(n);if(s===o)i++;else if(s!==Te&&s!==$e)return null;n++}return i<3?null:{node:{type:ve.breakThematic},end:Et(e,r)}}function AJ(e,t,r){let n=Kt(e,t);if(wr(e,t,n),Ft>3)return null;let o=Ft,i=t+Bt,s=e.charCodeAt(i);if(s!==Ot&&s!==Nr)return null;let a=qi(e,i,n,s);if(a<3)return null;i+=a;let l=jc(e,i,n),c=n;if(s===Ot){for(let N=l;N<n;N++)if(e.charCodeAt(N)===Ot)return null}for(;c>l&&(e.charCodeAt(c-1)===Te||e.charCodeAt(c-1)===$e);)c--;let d=e.slice(l,c),f="",m="",g=d.indexOf(" ");g===-1?f=d:(f=d.slice(0,g),m=d.slice(g+1).trim()),f=lu(f);var b=void 0;if(m){M$.lastIndex=0;for(var y;(y=M$.exec(m))!==null;)b||(b={}),b[y[1]]=y[2]!==void 0?y[2]:y[3]}let v=Et(e,n),C=v,S=e.length;for(;C<e.length;){let N=Kt(e,C);if(wr(e,C,N),Ft<4){let D=C+Bt;var k=qi(e,D,N,s);if(k>=a){let M=D+k;if(zn(e,M,N)){S=Et(e,N);break}}}C=Et(e,N)}var P;if(o===0)P=C>v&&e.charCodeAt(C-1)===Ke?e.slice(v,C-1):e.slice(v,C);else{P="";for(var E=v;E<C;){var $=Kt(e,E);wr(e,E,$);var O=Math.min(Bt,o);P+=e.slice(E+O,$)+`
|
|
302
302
|
`,E=Et(e,$)}P.length>0&&P.charCodeAt(P.length-1)===Ke&&(P=P.slice(0,-1))}return{node:{type:ve.codeBlock,lang:f||void 0,text:P,infoString:m||void 0,attrs:b},end:S}}function _J(e,t){let r=Kt(e,t);if(wr(e,t,r),Ft<4)return null;let n="",o=t;for(;o<e.length;){let g=Kt(e,o);if(wr(e,o,g),zn(e,o,g)){for(var i=0,s=Et(e,g);s<e.length;){var a=Kt(e,s);if(zn(e,s,a)){i++,s=Et(e,a);continue}if(wr(e,s,a),Ft>=4){for(var l=0;l<=i;l++)n+=`
|
|
303
303
|
`;o=s;break}break}if(o!==s)break;continue}if(Ft<4)break;let b=0,y=0;var c=0;for(let v=o;v<g&&y<4;v++){if(e.charCodeAt(v)===$e){var d=4-y%4;y+d>4&&(c=y+d-4),y+=d}else y++;b++}var f="";if(c>0)for(var m=0;m<c;m++)f+=" ";f+=e.slice(o+b,g),n+=f+`
|
|
304
304
|
`,o=Et(e,g)}for(;n.length>0&&n.charCodeAt(n.length-1)===Ke;)n=n.slice(0,-1);for(;n.length>0&&n.charCodeAt(n.length-1)===Ke;)n=n.slice(0,-1);return n?{node:{type:ve.codeBlock,lang:void 0,text:n,infoString:void 0,attrs:void 0},end:o}:null}function $J(e,t,r,n){let o=Kt(e,t);if(wr(e,t,o),Ft>3)return null;let i=t+Bt;if(e.charCodeAt(i)!==yt)return null;let s="",a=t,l,c=!1,d=!1,f=!1;for(;a<e.length;){let B=Kt(e,a);wr(e,a,B);let U=a+Bt;if(e.charCodeAt(U)===yt){let W=U+1;var m=Ft+1,g=!1;if(W<B){var b=e.charCodeAt(W);b===Te?(W++,m++,g=!0):b===$e&&(g=!0)}for(var y="",v=!1,C=W;C<B;C++)if(e.charCodeAt(C)===$e){v=!0;break}if(v){var S=m;if(g&&W<B&&e.charCodeAt(W)===$e){for(var k=4-S%4,P=0;P<k-1;P++)y+=" ";S+=k,W++}for(var E=W;E<B;E++)if(e.charCodeAt(E)===$e){for(var $=4-S%4,O=0;O<$;O++)y+=" ";S+=$}else y+=e[E],S++}else y=e.slice(W,B);if(!s&&!l){let L=y.match(/^\[!([A-Za-z]+)\]\s*$/);if(L){l=L[1].toUpperCase(),a=Et(e,B);continue}}s+=y+`
|
|
305
|
-
`;var N=y.trimStart();N.startsWith("```")||N.startsWith("~~~")?f=!f:y.startsWith(" ")||y.startsWith(" ")?f=!0:N.length>0&&!f&&(f=!1),d=N.length>0,a=Et(e,B)}else if(s&&!zn(e,a,B)&&d){if(Ft<4){var D=a+Bt,M=D<B?e.charCodeAt(D):0;if(M===mi||M===yt||M===Ot||M===Nr||M===zt||(M===
|
|
306
|
-
`,c=!0,a=Et(e,B)}else break}if(!s&&!l)return null;var{inBlockQuote:R,g:K}=r;r.inBlockQuote=!0,c&&(r.g=!0);let j=qs(s||"",r,n);return r.inBlockQuote=R,r.g=K,{node:{type:ve.blockQuote,children:j,alert:l||void 0},end:a}}function R$(e,t,r){for(var n=0,o=t;o<r;o++)e.charCodeAt(o)===$e?n+=4-n%4:n++;return n}function Us(e,t,r){if(wr(e,t,r),Ft>3)return null;var n=t+Bt;if(n>=r)return null;var o=e.charCodeAt(n),i=Ft,s=n;if(o===
|
|
305
|
+
`;var N=y.trimStart();N.startsWith("```")||N.startsWith("~~~")?f=!f:y.startsWith(" ")||y.startsWith(" ")?f=!0:N.length>0&&!f&&(f=!1),d=N.length>0,a=Et(e,B)}else if(s&&!zn(e,a,B)&&d){if(Ft<4){var D=a+Bt,M=D<B?e.charCodeAt(D):0;if(M===mi||M===yt||M===Ot||M===Nr||M===zt||(M===dt||M===mr||M===or)&&Ws(e,a)||(M===dt||M===mr||M===Ks)&&D+1<B&&(e.charCodeAt(D+1)===Te||e.charCodeAt(D+1)===$e))break;if(M>=Tt&&M<=At){for(var V=D;V<B&&e.charCodeAt(V)>=Tt&&e.charCodeAt(V)<=At;)V++;if(V<B&&(e.charCodeAt(V)===xo||e.charCodeAt(V)===Ho))break}}if(f)break;s+=e.slice(a,B)+`
|
|
306
|
+
`,c=!0,a=Et(e,B)}else break}if(!s&&!l)return null;var{inBlockQuote:R,g:K}=r;r.inBlockQuote=!0,c&&(r.g=!0);let j=qs(s||"",r,n);return r.inBlockQuote=R,r.g=K,{node:{type:ve.blockQuote,children:j,alert:l||void 0},end:a}}function R$(e,t,r){for(var n=0,o=t;o<r;o++)e.charCodeAt(o)===$e?n+=4-n%4:n++;return n}function Us(e,t,r){if(wr(e,t,r),Ft>3)return null;var n=t+Bt;if(n>=r)return null;var o=e.charCodeAt(n),i=Ft,s=n;if(o===dt||o===mr||o===Ks){if(s=n+1,s<r&&e.charCodeAt(s)!==Te&&e.charCodeAt(s)!==$e&&e.charCodeAt(s)!==Ke)return null}else if(o>=Tt&&o<=At){for(var a=n;a<r&&a-n<9;){var l=e.charCodeAt(a);if(l<Tt||l>At)break;a++}if(a>n&&a<r){var c=e.charCodeAt(a);if(c===xo||c===Ho){if(s=a+1,s<r&&e.charCodeAt(s)!==Te&&e.charCodeAt(s)!==$e&&e.charCodeAt(s)!==Ke)return null}else return null}else return null}else return null;var d=s,f=R$(e,t,s),m=0,g=d,b=f;if(d>=r)return{ordered:o>=Tt&&o<=At,marker:o>=Tt&&o<=At?e[a]:e[n],start:o>=Tt&&o<=At?parseInt(e.slice(n,a),10):void 0,contentStart:d,contentCol:f+1,markerCol:i,isEmpty:!0};for(;g<r&&(e.charCodeAt(g)===Te||e.charCodeAt(g)===$e);){if(e.charCodeAt(g)===$e){var y=4-b%4;b+=y}else b++;g++,m++}var v=g>=r,C=b-f;return v||C>4?(b=f+1,g=d+1,m=1):m===0&&(b=f+1,g=d,m=1),{ordered:o>=Tt&&o<=At,marker:o>=Tt&&o<=At?e[a]:e[n],start:o>=Tt&&o<=At?parseInt(e.slice(n,a),10):void 0,contentStart:g,contentCol:b,markerCol:i,isEmpty:v}}var Jp=0;function IJ(e,t,r,n){var o=0,i=t;for(Jp=0;i<r&&o<n;){var s=e.charCodeAt(i);if(s===$e){var a=4-o%4;if(o+a>n){Jp=o+a-n,i++,o=n;break}o+=a}else if(s===Te)o++;else break;i++}return i}function W$(e,t,r,n){var o=Kt(e,t),i=Us(e,t,o);if(!i)return null;var s=[],a=t,l=i.contentCol,c="",d=i.isEmpty,f=!1,m=!1;if(!i.isEmpty){for(var g=!1,b=i.contentStart;b<o;b++)if(e.charCodeAt(b)===$e){g=!0;break}if(g){var y="",v=R$(e,t,i.contentStart),C=v-i.contentCol;if(C>0)for(var S=0;S<C;S++)y+=" ";for(var k=i.contentStart;k<o;k++)if(e.charCodeAt(k)===$e){for(var P=4-v%4,E=0;E<P;E++)y+=" ";v+=P}else y+=e[k],v++;c=y+`
|
|
307
307
|
`}else c=e.slice(i.contentStart,o)+`
|
|
308
|
-
`}for(a=Et(e,o);a<e.length;){var $=Kt(e,a);wr(e,a,$);var O=e.charCodeAt(a+Bt);if(Ft<l&&(O===
|
|
308
|
+
`}for(a=Et(e,o);a<e.length;){var $=Kt(e,a);wr(e,a,$);var O=e.charCodeAt(a+Bt);if(Ft<l&&(O===dt||O===mr||O===or)&&Ft<=3&&Ws(e,a))break;var N=Us(e,a,$);if(N&&N.ordered===i.ordered&&N.marker===i.marker&&N.markerCol<l){s.push({contentCol:l,raw:c,hasBlankAfter:f,isEmpty:d}),f&&(m=!0),l=N.contentCol,d=N.isEmpty,f=!1,c=N.isEmpty?"":e.slice(N.contentStart,$)+`
|
|
309
309
|
`,a=Et(e,$);continue}if(zn(e,a,$)){c+=`
|
|
310
|
-
`,a=Et(e,$);for(var D=!1,M=0;M<c.length;M++){var V=c.charCodeAt(M);if(V!==Ke&&V!==Ka&&V!==Te&&V!==$e){D=!0;break}}if(d&&!D)if(a<e.length){var R=Kt(e,a),K=Us(e,a,R);if(!K||K.ordered!==i.ordered||K.marker!==i.marker)break;f=!0}else break;if(a<e.length){var j=Kt(e,a);wr(e,a,j);var B=e.charCodeAt(a+Bt);if((B===
|
|
310
|
+
`,a=Et(e,$);for(var D=!1,M=0;M<c.length;M++){var V=c.charCodeAt(M);if(V!==Ke&&V!==Ka&&V!==Te&&V!==$e){D=!0;break}}if(d&&!D)if(a<e.length){var R=Kt(e,a),K=Us(e,a,R);if(!K||K.ordered!==i.ordered||K.marker!==i.marker)break;f=!0}else break;if(a<e.length){var j=Kt(e,a);wr(e,a,j);var B=e.charCodeAt(a+Bt);if((B===dt||B===mr||B===or)&&Ft<=3&&Ws(e,a))break;var U=Us(e,a,j);if(U&&U.ordered===i.ordered&&U.marker===i.marker&&U.markerCol<l){f=!0;continue}if(!zn(e,a,j)&&Ft<l)break}continue}if(Ft>=l){var W=IJ(e,a,$,l);if(Jp>0){for(var L="",Z=l,T=0;T<Jp;T++)L+=" ",Z++;for(var F=W;F<$;F++)if(e.charCodeAt(F)===$e){for(var _=4-Z%4,H=0;H<_;H++)L+=" ";Z+=_}else L+=e[F],Z++;c+=L+`
|
|
311
311
|
`}else c+=e.slice(W,$)+`
|
|
312
|
-
`;a=Et(e,$);continue}for(var Y=!1,X=0;X<c.length;X++){var oe=c.charCodeAt(X);if(oe!==Ke&&oe!==Ka&&oe!==Te&&oe!==$e){Y=!0;break}}if(!f&&Y&&!d){var Q=a+Bt,le=e.charCodeAt(Q),ue=le===mi||le===yt||le===zt||le===Ot||le===Nr||(le===
|
|
312
|
+
`;a=Et(e,$);continue}for(var Y=!1,X=0;X<c.length;X++){var oe=c.charCodeAt(X);if(oe!==Ke&&oe!==Ka&&oe!==Te&&oe!==$e){Y=!0;break}}if(!f&&Y&&!d){var Q=a+Bt,le=e.charCodeAt(Q),ue=le===mi||le===yt||le===zt||le===Ot||le===Nr||(le===dt||le===mr||le===or||le===Ks)&&(Ws(e,a)!==null||Us(e,a,$)!==null)||le>=Tt&&le<=At&&Us(e,a,$)!==null;if(!ue){c+=""+e.slice(Q,$)+`
|
|
313
313
|
`,a=Et(e,$);continue}}break}if(s.push({contentCol:l,raw:c,hasBlankAfter:f,isEmpty:d}),s.length===0)return null;var te=m;if(!te)for(var ge=0;ge<s.length;ge++){if(s[ge].hasBlankAfter&&ge<s.length-1){te=!0;break}if(!s[ge].isEmpty){for(var Se=s[ge].raw,pe=Se.length,we=0,be=!1,re=!1,ke=!1,Ne=!1,Me=0,Pe=0,Ae=-1;we<pe;){var xe=Se.indexOf(`
|
|
314
314
|
`,we);if(xe<0&&(xe=pe),Ne){wr(Se,we,xe);for(var Ie=Se.slice(we+Bt,xe),et=0;et<Ie.length&&Ie.charCodeAt(et)===Me;)et++;et>=Pe&&Ie.slice(et).trim()===""&&(Ne=!1),we=xe<pe?xe+1:pe;continue}if(zn(Se,we,xe)){Ae>=0?ke=!0:be&&(re=!0),we=xe<pe?xe+1:pe;continue}if(wr(Se,we,xe),Ae>=0){if(Ft>=Ae){we=xe<pe?xe+1:pe;continue}var wt=Us(Se,we,xe);if(wt&&wt.markerCol<Ae&&wt.contentCol<=Ae){we=xe<pe?xe+1:pe;continue}if(wt){we=xe<pe?xe+1:pe;continue}Ae=-1,ke&&(re=!0,ke=!1)}var lt=Se.slice(we+Bt,xe),Ut=lt.charCodeAt(0);if((Ut===Ot||Ut===Nr)&&Ft<=3){for(var ut=0;ut<lt.length&<.charCodeAt(ut)===Ut;)ut++;if(ut>=3){if(re&&be){te=!0;break}Ne=!0,Me=Ut,Pe=ut,be=!0,we=xe<pe?xe+1:pe;continue}}var Ue=Ft<=3?Us(Se,we,xe):null;if(Ue&&be){if(re){te=!0;break}Ae=Ue.contentCol,ke=!1,we=xe<pe?xe+1:pe,be=!0;continue}if(re){te=!0;break}be=!0,we=xe<pe?xe+1:pe}if(te)break}}for(var Vt=[],Jt=0;Jt<s.length;Jt++){for(var Xt=s[Jt],sr=Xt.raw,Ct=sr.length;Ct>0&&sr.charCodeAt(Ct-1)===Ke;)Ct--;var Sr=Ct<sr.length?sr.slice(0,Ct):sr,dr=null;if(Sr.length>=3&&Sr.charCodeAt(0)===cr){var kr=Sr[1];(kr===" "||kr==="x"||kr==="X")&&Sr.charCodeAt(2)===yo&&(dr={type:ve.gfmTask,completed:kr==="x"||kr==="X"},Sr=Sr.slice(3))}var $t;if(Xt.isEmpty&&Sr.trim()==="")$t=[];else if(te){var tt=r.inList;r.inList=!0,$t=qs(Sr,r,n),r.inList=tt}else{var It=r.inList;if(r.inList=!0,$t=qs(Sr,r,n),r.inList=It,$t.length===1&&$t[0].type===ve.paragraph)$t=$t[0].children;else{for(var ar=[],er=0;er<$t.length;er++)if($t[er].type===ve.paragraph)for(var Yr=$t[er].children,en=0;en<Yr.length;en++)ar.push(Yr[en]);else ar.push($t[er]);$t=ar}}dr?Vt.push([dr,{type:ve.text,text:" "},...$t]):Vt.push($t)}return{node:{type:i.ordered?ve.orderedList:ve.unorderedList,start:i.ordered?i.start:void 0,items:Vt},end:a}}var Xp=new Set(["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]);function Gi(e,t,r){let n={};for(let[s,a]of Object.entries(e)){let l=s,c=s.toLowerCase();if(c==="style"&&typeof a=="string"){let d={},f=[],m=0,g=0;for(let y=0;y<a.length;y++){let v=a.charCodeAt(y);v===Uo?m++:v===Ho?m--:v===w$&&m===0&&(f.push(a.slice(g,y)),g=y+1)}g<a.length&&f.push(a.slice(g));let b=!1;f.forEach(y=>{let v=y.indexOf(":");if(v===-1)return;let C=y.slice(0,v).trim(),S=y.slice(v+1).trim();if(C&&S){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(S)){b=!0;return}let k=C.indexOf("-")!==-1?C.replace(/-([a-z])/g,(P,E)=>E.toUpperCase()):C;d[k]=S}}),!b&&Object.keys(d).length>0&&(n[l]=d)}else if((c==="href"||c==="src")&&r?.sanitizer){let d=r.sanitizer(a,t,c);d!==null&&(n[l]=d)}else if(a==="")n[l]=!0;else if(a.length>=2&&a.charCodeAt(0)===su&&a.charCodeAt(a.length-1)===zx){var o=a.slice(1,-1);if(o.length>0){var i=o.charCodeAt(0);if(i===cr||i===su)try{n[l]=JSON.parse(o);continue}catch{}}if(o==="true"){n[l]=!0;continue}if(o==="false"){n[l]=!1;continue}if(r?.evalUnserializableExpressions)try{n[l]=(0,eval)("("+o+")");continue}catch{}n[l]=o}else n[l]=a}return n}function Hs(e,t,r){let n=t.length;if(n===0)return r;var o=t.charCodeAt(0),i=o>=pt&&o<=xt||o>=Yt&&o<=ir;if(!i){for(var s=String.fromCharCode(o),a=e.length-n,l=r;l<=a;){var c=e.indexOf(s,l);if(c===-1||c>a)return-1;for(var d=!0,f=1;f<n;f++){var m=e.charCodeAt(c+f),g=t.charCodeAt(f);if(m>=pt&&m<=xt&&(m+=qo),g>=pt&&g<=xt&&(g+=qo),m!==g){d=!1;break}}if(d)return c;l=c+1}return-1}o>=pt&&o<=xt&&(o+=qo);for(let y=r;y<=e.length-n;y++){var b=e.charCodeAt(y);if(b>=pt&&b<=xt&&(b+=qo),b!==o)continue;let v=!0;for(let C=1;C<n;C++){let S=e.charCodeAt(y+C),k=t.charCodeAt(C);if(S>=pt&&S<=xt&&(S+=qo),k>=pt&&k<=xt&&(k+=qo),S!==k){v=!1;break}}if(v)return y}return-1}function NJ(e,t,r){let n=t.length;var o=t.charCodeAt(0);o>=pt&&o<=xt&&(o+=qo);for(let s=Math.min(r,e.length-n);s>=0;s--){var i=e.charCodeAt(s);if(i>=pt&&i<=xt&&(i+=qo),i!==o)continue;let a=!0;for(let l=1;l<n;l++){let c=e.charCodeAt(s+l),d=t.charCodeAt(l);if(c>=pt&&c<=xt&&(c+=qo),d>=pt&&d<=xt&&(d+=qo),c!==d){a=!1;break}}if(a)return s}return-1}var Qp=-1;function Hx(e,t,r){let n=r.toLowerCase(),o="<"+n,i="</"+n,s=1,a=t,l=e.length;for(Qp=-1;a<l&&s>0;){let f=Hs(e,o,a),m=Hs(e,i,a);if(m===-1)return-1;if(f!==-1&&f<m){let g=Hi(e,f);g?(g.tag.toLowerCase()===n&&!g.isClosing&&!g.selfClosing&&!Mc(g.tag)&&s++,a=g.end):a=f+1}else{var c=m+i.length,d=c<l?e.charCodeAt(c):62;if((d===yt||d===Te||d===$e||d===Ke)&&(s--,s===0)){Qp=m;let g=m+i.length;for(;g<l&&e.charCodeAt(g)!==yt;)g++;return g+1}a=m+1}}return-1}function U$(e,t,r,n){if(n.ignoreHTMLBlocks||n.disableParsingRawHTML)return null;var o=Kt(e,t);if(wr(e,t,o),Ft>3&&!r.inHTML)return null;var i=t+Bt;if(e.charCodeAt(i)!==zt)return null;var s=e.indexOf(">",i+1);if(s!==-1&&s<o){var a=e.slice(i+1,s);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(a)||/^[^\s@]+@[^\s@]+$/.test(a))return null}var l=DJ(e,i);if(l>=1&&l<=5){var c=e.length;if(l===1){for(var d=e.length,f=0;f<Wx.length;f++){var m=Hs(e,"</"+Wx[f]+">",i);m>=0&&m<d&&(d=m)}if(d<e.length){var g=e.indexOf(">",d);c=g>=0?Et(e,g+1):e.length}}else{var b=l===2?"-->":l===3?"?>":l===4?">":"]]>",y=e.indexOf(b,i);y>=0&&(c=Et(e,y+b.length))}var v=e.slice(i,c);if(l>=2)return{node:{type:ve.htmlComment,text:v,h:!1,raw:!0,endPos:c},end:c};var C="div",S=v.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);S&&(C=S[1]);var k=Hi(e,i),P={},E;k&&!k.isClosing&&(P=Gi(k.attrs,C,n),E=k.whitespaceBeforeAttrs+k.rawAttrs);var $=[],O=C.toLowerCase(),N="</"+O,D=Hs(v,N,0),M=v,V="";if(k&&k.isClosing)for(M=v.slice(k.end-i);M.length>0&&M.charCodeAt(M.length-1)===Ke;)M=M.slice(0,-1);else if(k&&!k.isClosing){var R=k.end-i;if(D!==-1)for(M=v.slice(R),M.charCodeAt(0)===Ke&&(M=M.slice(1));M.length>0&&M.charCodeAt(M.length-1)===Ke;)M=M.slice(0,-1);else for(M=v;M.length>0&&M.charCodeAt(M.length-1)===Ke;)M=M.slice(0,-1);if(D!==-1){var K=v.slice(R,D);V=K.trim()}}var j=k?k.isClosing:!1;return{node:{type:ve.htmlBlock,tag:C,attrs:P,f:E,children:$,a:M,text:V,c:!0,b:j,endPos:c,e:!0},end:c}}if(l===6||l===7){var B=K$(e,t),U=B<e.length?B:e.length,W=e.slice(i,U),L=B<e.length?Et(e,B):e.length,Z=Hi(e,i);if(Z){var T=Z.tag,F=T.toLowerCase(),_=Z.isClosing;if(_){var H=e.slice(Z.end,U);return{node:{type:ve.htmlBlock,tag:T,attrs:{},children:[],a:H,text:H,c:!0,b:!0,endPos:U,e:l===6},end:L}}if(Z.selfClosing||Mc(T))return{node:{type:ve.htmlBlock,tag:T,attrs:Gi(Z.attrs,T,n),f:Z.whitespaceBeforeAttrs+Z.rawAttrs,children:[],a:"",text:"",c:!1,b:!1,endPos:Z.end,e:l===6},end:Z.end<e.length&&e.charCodeAt(Z.end)===Ke?Z.end+1:Z.end};var Y=r.d||0,X=e.slice(i,U),oe=-1,Q=-1;if(Y<10){for(var le="</"+F,ue=Z.end-i,te=1,ge=ue;ge<X.length&&te>0;){var Se=Hs(X,"<"+F,ge),pe=Hs(X,le,ge);if(pe===-1)break;if(Se!==-1&&Se<pe){var we=Se+F.length+1;if(we<X.length){var be=X.charCodeAt(we);(be===Te||be===$e||be===Ke||be===yt||be===xr)&&te++}ge=Se+1}else{var re=pe+le.length;if(re<X.length){var ke=X.charCodeAt(re);if((ke===yt||ke===Te||ke===$e||ke===Ke)&&(te--,te===0)){oe=pe;for(var Ne=re;Ne<X.length&&X.charCodeAt(Ne)!==yt;)Ne++;Q=Ne+1;break}}else if(te--,te===0){oe=pe,Q=X.length;break}ge=pe+1}}var Me=!1;if(oe===-1&&l===6&&!Z.isClosing){var Pe=Hx(e,Z.end,F);if(Pe!==-1){for(var Ae=Qp,xe=Z.end,Ie=!1,et=!1,wt=!1,lt=0,Ut=!1,ut=!1,Ue=xe;Ue<Ae;){var Vt=e.charCodeAt(Ue);if(Vt===Ke)ut&&(Ie=!0),Ut||lt++,ut=!0,Ue++;else if(Vt===Te||Vt===$e)Ue++;else{if(!Ut&&(Ut=!0,lt>=2&&Vt===zt)){wt=!0;break}if(ut=!1,Vt===zt){var Jt=e.charCodeAt(Ue+1)|32;if((Jt===Bx||Jt===x$||Jt===iu)&&($$.lastIndex=Ue,$$.test(e))){et=!0;break}}Ue++}}if(Ie&&!wt&&!et){var Xt=Kt(e,Pe);U=Xt,L=Et(e,Xt),X=e.slice(i,U),W=e.slice(i,U),oe=Ae-i,Q=Pe-i,Me=!0}}}}var sr=Z.rawAttrs.indexOf(`
|
|
315
315
|
`)!==-1||Z.whitespaceBeforeAttrs.indexOf(`
|
|
@@ -317,28 +317,28 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
317
317
|
|
|
318
318
|
`)!==-1,Pi=I$.test(jt),es=N$.test(jt),nl=Xo||Pi||r.inHTML&&es,ol=Ur.length>=2&&Ur.charCodeAt(0)===Ke&&Ur.charCodeAt(Ur.length-1)===Ke&&!Xo;ol&&!Pi&&!es?to=[{type:ve.text,text:jt}]:nl||es?(r.inline=!1,to=qs(Ur,r,n)):(r.inline=!0,to=Tn(jt,0,jt.length,r,n))}r.inline=Qi,r.inHTML=oa,r.d=Jo}}var ia=!1;if(l===6&&oe!==-1&&!r.inHTML&&!sr){var Ei=Ur,rt=/<[a-zA-Z][^>]*>/.test(Ei),Qo=/\n\n/.test(Ei)||/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Ei);rt&&!Qo&&(ia=!0)}var vu=!Me&&(r.inHTML||l===7||sr||!Ct||ia);if(vu){var an;if(oe!==-1&&dr){var yu=!1;if(r.inHTML&&Q<X.length){for(var sa=Q;sa<X.length&&X.charCodeAt(sa)!==Ke;)sa++;var il=X.slice(Q,sa).trim();yu=il.length>1&&il.charCodeAt(0)===zt&&il.charCodeAt(1)!==xr}an=yu?X.slice(Z.end-i):Ur}else(l===7||r.inHTML)&&oe!==-1?(an=X.slice(Z.end-i),an.charCodeAt(0)===Ke&&(an=an.slice(1))):dr?an=e.slice(i,kr):sr?an=W:(an=X.slice(Z.end-i),an.charCodeAt(0)===Ke&&(an=an.slice(1)));return{node:{type:ve.htmlBlock,tag:T,attrs:Gi(Z.attrs,T,n),f:Z.whitespaceBeforeAttrs+Z.rawAttrs,children:to,a:an,text:an,c:!0,b:!1,endPos:kr,e:l===6},end:$t}}return{node:{type:ve.htmlBlock,tag:T,attrs:Gi(Z.attrs,T,n),f:Z.whitespaceBeforeAttrs+Z.rawAttrs,children:to,a:Me?"":Ur,text:Ur,c:!1,b:!1,endPos:kr,e:l===6},end:$t}}var aa=W.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),od=aa?aa[2]:"div",ts=aa?aa[1]==="/":!1,sl=W;if(ts){var rs=W.indexOf(">");rs!==-1&&(sl=W.slice(rs+1))}return{node:{type:ve.htmlBlock,tag:od,attrs:{},children:[],a:sl,text:sl,c:!0,b:ts,endPos:U,e:l===6},end:L}}var Dr=Hi(e,i);if(!Dr)return null;var Eo=Dr.tag,_e=Eo.toLowerCase(),ro=Eo.charCodeAt(0),Ti=ro>=pt&&ro<=xt;if(!Ti&&!Xp.has(_e)&&!Oc.has(_e)&&!_e.includes("-"))return null;if(Dr.isClosing)return{node:{type:ve.htmlSelfClosing,tag:Eo,attrs:{},a:e.slice(i,Dr.end),b:!0,endPos:Dr.end},end:Dr.end};var To=Hx(e,Dr.end,Eo),al=[];if(To!==-1){var iw=Qp,xu=e.slice(Dr.end,iw),ll=xu.trim();if(ll){var Wh=xu.indexOf(`
|
|
319
319
|
|
|
320
|
-
`)!==-1,Uh=I$.test(ll),Hh=N$.test(ll),id=r.inline,sw=r.inHTML,qh=r.d;r.inHTML=!0,r.d=(r.d||0)+1,Wh||Uh||Hh?(r.inline=!1,al=qs(xu,r,n)):(r.inline=!0,al=Tn(ll,0,ll.length,r,n)),r.inline=id,r.inHTML=sw,r.d=qh}var wu=Kt(e,To),Gh=e.slice(To,wu).trim(),sd=Gh?To:Et(e,To),ad=Ti?e.slice(i,To):e.slice(i,sd),Zh=Ti?To:sd;return{node:{type:ve.htmlBlock,tag:Eo,attrs:Gi(Dr.attrs,Eo,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:al,a:ad,text:Ti?xu:ad,c:!0,b:!1,endPos:Zh,e:!1},end:sd}}var Ai=K$(e,Dr.end),aw=Ai<e.length?Et(e,Ai):Ai,Cu=e.slice(Dr.end,Ai);if(Cu.trim()){var{inline:ld,inHTML:ud,d:la}=r;r.inline=!1,r.inHTML=!0,r.d=(r.d||0)+1,al=qs(Cu,r,n),r.inline=ld,r.inHTML=ud,r.d=la}var Yh=e.slice(Dr.end,Ai);return{node:{type:ve.htmlBlock,tag:Eo,attrs:Gi(Dr.attrs,Eo,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:al,a:Yh,text:Cu,c:!0,b:!1,endPos:Ai,e:!1},end:aw}}function DJ(e,t){if(e.charCodeAt(t)!==zt)return 0;var r=t+1,n=e.length;if(e.charCodeAt(r)===Sn&&e.charCodeAt(r+1)===
|
|
320
|
+
`)!==-1,Uh=I$.test(ll),Hh=N$.test(ll),id=r.inline,sw=r.inHTML,qh=r.d;r.inHTML=!0,r.d=(r.d||0)+1,Wh||Uh||Hh?(r.inline=!1,al=qs(xu,r,n)):(r.inline=!0,al=Tn(ll,0,ll.length,r,n)),r.inline=id,r.inHTML=sw,r.d=qh}var wu=Kt(e,To),Gh=e.slice(To,wu).trim(),sd=Gh?To:Et(e,To),ad=Ti?e.slice(i,To):e.slice(i,sd),Zh=Ti?To:sd;return{node:{type:ve.htmlBlock,tag:Eo,attrs:Gi(Dr.attrs,Eo,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:al,a:ad,text:Ti?xu:ad,c:!0,b:!1,endPos:Zh,e:!1},end:sd}}var Ai=K$(e,Dr.end),aw=Ai<e.length?Et(e,Ai):Ai,Cu=e.slice(Dr.end,Ai);if(Cu.trim()){var{inline:ld,inHTML:ud,d:la}=r;r.inline=!1,r.inHTML=!0,r.d=(r.d||0)+1,al=qs(Cu,r,n),r.inline=ld,r.inHTML=ud,r.d=la}var Yh=e.slice(Dr.end,Ai);return{node:{type:ve.htmlBlock,tag:Eo,attrs:Gi(Dr.attrs,Eo,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:al,a:Yh,text:Cu,c:!0,b:!1,endPos:Ai,e:!1},end:aw}}function DJ(e,t){if(e.charCodeAt(t)!==zt)return 0;var r=t+1,n=e.length;if(e.charCodeAt(r)===Sn&&e.charCodeAt(r+1)===dt&&e.charCodeAt(r+2)===dt)return 2;if(e.charCodeAt(r)===Dc)return 3;if(e.charCodeAt(r)===Sn){var o=e.charCodeAt(r+1);if(o>=pt&&o<=xt)return 4;if(e.slice(r+1,r+8)==="[CDATA[")return 5}for(var i=e.charCodeAt(r)===xr,s=i?r+1:r,a=s;a<n;){var l=e.charCodeAt(a);if(l>=pt&&l<=xt||l>=Yt&&l<=ir||l>=Tt&&l<=At||l===dt)a++;else break}if(a===s)return 0;var c=e.slice(s,a);if(Oc.has(c.toLowerCase())){if(i)return 0;var d=e.charCodeAt(a);return d===Te||d===$e||d===yt||d===Ke||a>=n?1:0}if(Xp.has(c.toLowerCase())){if(i){for(var f=a;f<n&&(e.charCodeAt(f)===Te||e.charCodeAt(f)===$e);)f++;return f<n&&e.charCodeAt(f)===yt?6:0}var m=a<n?e.charCodeAt(a):-1;return m===Te||m===$e||m===yt||m===Ke||m===xr||m===-1?6:0}if(i){for(var g=a;g<n&&(e.charCodeAt(g)===Te||e.charCodeAt(g)===$e);)g++;if(g<n&&e.charCodeAt(g)===yt){var b=Kt(e,t),y=e.slice(g+1,b).trim();if(y==="")return 7}}else{var v=Kt(e,t),C=Hi(e,t);if(C&&C.end<=v){var S=e.slice(C.end,v).trim();if(S==="")return 7}}return 0}function H$(e,t,r){for(var n=0,o=e.length;n<o&&(e.charCodeAt(n)===Te||e.charCodeAt(n)===$e);)n++;for(;o>n&&(e.charCodeAt(o-1)===Te||e.charCodeAt(o-1)===$e);)o--;n<o&&e.charCodeAt(n)===Kr&&n++,o>n&&e.charCodeAt(o-1)===Kr&&(o-2<n||e.charCodeAt(o-2)!==zr)&&o--;for(var i=[],s=n,a=!1,l=[],c=n;c<o;){var d=e.charCodeAt(c);if(d===zr&&c+1<o){e.charCodeAt(c+1)===Kr?(a||(a=!0,l=[]),l.push(e.slice(s,c)),l.push("|"),c+=2,s=c):c+=2;continue}if(d===Ot){for(var f=0;c<o&&e.charCodeAt(c)===Ot;)f++,c++;for(var m=!1;c<o&&!m;){for(var g=0;c<o&&e.charCodeAt(c)===Ot;)g++,c++;g===f?m=!0:g===0&&c++}continue}if(d===Kr){var b=a?(l.push(e.slice(s,c)),l.join("")):e.slice(s,c);i.push(b.trim()),c++,s=c,a=!1,l=[];continue}c++}var y=a?(l.push(e.slice(s,o)),l.join("")):e.slice(s,o);return i.push(y.trim()),i.map(function(v){var C=v.indexOf("\\|")!==-1?v.replace(/\\\|/g,"|"):v;return Tn(C,0,C.length,t,r)})}function q$(e,t,r,n){let o=Kt(e,t);var i=e.indexOf("|",t);if(i<0||i>=o)return null;let s=Et(e,o);if(s>=e.length)return null;let a=Kt(e,s);if(!O$(e,s,a))return null;let l=e.slice(t,o),c=e.slice(s,a);for(var d=[],f=0,m=c.length;f<m&&(c.charCodeAt(f)===Te||c.charCodeAt(f)===$e);)f++;for(f<m&&c.charCodeAt(f)===Kr&&f++;f<m;){for(;f<m&&(c.charCodeAt(f)===Te||c.charCodeAt(f)===$e);)f++;if(f>=m||c.charCodeAt(f)===Kr)break;var g=c.charCodeAt(f)===kn;for(g&&f++;f<m&&c.charCodeAt(f)===dt;)f++;var b=f<m&&c.charCodeAt(f)===kn;for(b&&f++,d.push(g&&b?"center":b?"right":g?"left":null);f<m&&(c.charCodeAt(f)===Te||c.charCodeAt(f)===$e);)f++;f<m&&c.charCodeAt(f)===Kr&&f++}let y=H$(l,r,n);if(d.length!==y.length)return null;let v=[],C=Et(e,a);for(;C<e.length;){let O=Kt(e,C),N=e.slice(C,O);if(zn(e,C,O))break;if(wr(e,C,O),Ft<4){var S=e.charCodeAt(C+Bt);if(S===yt||S===mi||(S===dt||S===mr||S===or)&&Ws(e,C))break;if(S===Ot||S===Nr){for(var k=C+Bt,P=0;k<O&&e.charCodeAt(k)===S;)P++,k++;if(P>=3)break}}v.push(H$(N,r,n)),C=Et(e,O)}if((n.streaming||n.optimizeForStreaming)&&v.length===0)return null;for(var E=y.length,$=0;$<v.length;$++)if(v[$].length<E)for(;v[$].length<E;)v[$].push([]);else v[$].length>E&&(v[$].length=E);return{node:{type:ve.table,header:y,cells:v,align:d},end:C}}function MJ(e,t,r){var n=Kt(e,t);if(wr(e,t,n),Ft>3)return null;var o=t+Bt;if(e.charCodeAt(o)!==cr)return null;if(o+1<e.length&&e.charCodeAt(o+1)===hi){var i=OJ(e,o,r);return i||null}r.refs||(r.refs={});var s=j$(e,o,r.refs);return s===null?null:{node:{type:ve.refCollection},end:s}}function OJ(e,t,r){var n=e.length;if(e.charCodeAt(t)!==cr||t+1>=n||e.charCodeAt(t+1)!==hi)return null;for(var o=t+2,i=o;o<n&&e.charCodeAt(o)!==yo;){if(e.charCodeAt(o)===Ke)return null;o++}if(o>=n)return null;var s=("^"+e.slice(i,o)).toLowerCase();if(o++,o>=n||e.charCodeAt(o)!==kn)return null;for(o++;o<n&&(e.charCodeAt(o)===Te||e.charCodeAt(o)===$e);)o++;if(o<n&&e.charCodeAt(o)===Ke)for(o++;o<n&&(e.charCodeAt(o)===Te||e.charCodeAt(o)===$e);)o++;var a=e.indexOf(`
|
|
321
321
|
`,o);a<0&&(a=n);for(var l=e.slice(o,a).trim(),c=a<n?a+1:n;c<n;){var d=Kt(e,c);if(wr(e,c,d),Ft>=2&&!zn(e,c,d))l+=`
|
|
322
322
|
`+e.slice(c,d),c=Et(e,d);else if(zn(e,c,d)){var f=Et(e,d);if(f<n){var m=Kt(e,f);if(wr(e,f,m),Ft>=2){l+=`
|
|
323
|
-
`,c=Et(e,d);continue}}break}else break}return r.refs[s]||(r.refs[s]={target:l,title:void 0}),{node:{type:ve.footnote},end:c}}function jJ(e,t,r,n){let o=t,i=0,s=0,a=-1;for(;o<e.length;){let V=a>=0?a:Kt(e,o);if(a=-1,zn(e,o,V))break;if(wr(e,o,V),Ft<4&&s>0&&!r.g){let K=e.charCodeAt(o+Bt);if(K===Jn||K===
|
|
323
|
+
`,c=Et(e,d);continue}}break}else break}return r.refs[s]||(r.refs[s]={target:l,title:void 0}),{node:{type:ve.footnote},end:c}}function jJ(e,t,r,n){let o=t,i=0,s=0,a=-1;for(;o<e.length;){let V=a>=0?a:Kt(e,o);if(a=-1,zn(e,o,V))break;if(wr(e,o,V),Ft<4&&s>0&&!r.g){let K=e.charCodeAt(o+Bt);if(K===Jn||K===dt){let j=o+Bt;for(;j<V&&e.charCodeAt(j)===K;)j++;for(;j<V&&(e.charCodeAt(j)===Te||e.charCodeAt(j)===$e);)j++;if(j>=V){i=K===Jn?1:2,o=Et(e,V);break}}}s=V;let R=Et(e,V);if(R<e.length){if(e.charCodeAt(R)===Up){var l=Kt(e,R);o=Et(e,l),s=l;continue}let K=Kt(e,R);if(a=K,wr(e,R,K),Ft<4){let j=e.charCodeAt(R+Bt);if(j===yt){o=R;break}if(j===mi&&V$(e,R,r,n)){o=R;break}if(j===Ot||j===Nr){for(var c=R+Bt,d=0;c<K&&e.charCodeAt(c)===j;)d++,c++;if(d>=3){o=R;break}}if(j===zt){var f=R+Bt+1,m=f<K?e.charCodeAt(f):0,g=m===Sn||m===Dc;if(!g&&m===xr){for(var b=f+1,y=b;y<K&&(e.charCodeAt(y)>=pt&&e.charCodeAt(y)<=xt||e.charCodeAt(y)>=Yt&&e.charCodeAt(y)<=ir||e.charCodeAt(y)>=Tt&&e.charCodeAt(y)<=At||e.charCodeAt(y)===dt);)y++;y>b&&(g=Xp.has(e.slice(b,y).toLowerCase()))}else if(!g){for(var v=f;v<K&&(e.charCodeAt(v)>=pt&&e.charCodeAt(v)<=xt||e.charCodeAt(v)>=Yt&&e.charCodeAt(v)<=ir||e.charCodeAt(v)>=Tt&&e.charCodeAt(v)<=At||e.charCodeAt(v)===dt);)v++;if(v>f){var C=e.slice(f,v).toLowerCase();g=Xp.has(C)||Oc.has(C)}}if(g&&U$(e,R,r,n)){o=R;break}}if(j===dt||j===mr||j===Ks){let B=R+Bt+1;if(B<K&&(e.charCodeAt(B)===Te||e.charCodeAt(B)===$e)){var S=jc(e,B,K);if(S<K&&!Ws(e,R)){o=R;break}}}if(j>=Tt&&j<=At){let B=R+Bt;for(;B<K&&e.charCodeAt(B)>=Tt&&e.charCodeAt(B)<=At;)B++;if(B<K&&(e.charCodeAt(B)===xo||e.charCodeAt(B)===Ho)&&B-(R+Bt)===1&&e.charCodeAt(R+Bt)===49){var k=B+1;if(k<K&&(e.charCodeAt(k)===Te||e.charCodeAt(k)===$e)){var P=jc(e,k,K);if(P<K){o=R;break}}}}if(j===Kr){let B=Et(e,K);if(B<e.length){let U=Kt(e,B);if(O$(e,B,U)){o=R;break}}}if((j===dt||j===mr||j===or)&&Ws(e,R)){if(j!==dt){o=R;break}let B=R+Bt;for(;B<K&&e.charCodeAt(B)===dt;)B++;for(;B<K&&(e.charCodeAt(B)===Te||e.charCodeAt(B)===$e);)B++;if(B<K){o=R;break}}}}o=Et(e,V)}for(var E=i?s:o;E>t&&(e.charCodeAt(E-1)===Ke||e.charCodeAt(E-1)===Ka||e.charCodeAt(E-1)===Te||e.charCodeAt(E-1)===$e);)E--;for(var $=t;$<E&&(e.charCodeAt($)===Te||e.charCodeAt($)===$e);)$++;if($>=E)return null;for(var O=!1,N=$;N<E;N++)if(e.charCodeAt(N)===Up){O=!0;break}var D=O?e.slice($,E).replace(/\u001E/g,""):e.slice($,E);if(!D)return null;let M=LJ(D,0,D.length,r,n);if(i){let V=(n?.slugify||wo)(D);return{node:{type:ve.heading,level:i,children:M,id:V},end:o}}return{node:{type:ve.paragraph,children:M},end:o}}function LJ(e,t,r,n,o){var i=e.indexOf(`
|
|
324
324
|
`,t);if(i<0||i>=r)return Tn(e,t,r,n,o);for(var s="",a=t,l=t;l<r;){var c=e.charCodeAt(l);if(c===Ot){var d=eh(e,l,r);if(d>l){for(var f=!1,m=l;m<d;m++)if(e.charCodeAt(m)===Ke){f=!0;break}f&&(s+=e.slice(a,l),s+=e.slice(l,d).replace(/\n/g," "),a=d),l=d;continue}}if(c===zt){var g=G$(e,l,r);if(g>l){l=g;continue}}if(c===Ke){var b=!1,y=0;if(l>t&&e.charCodeAt(l-1)===zr)b=!0,y=1;else{for(var v=0,C=l-1;C>=t&&e.charCodeAt(C)===Te;)v++,C--;v>=2&&(b=!0,y=v)}if(b)s+=e.slice(a,l-y),s+="";else{for(var S=l;S>a&&e.charCodeAt(S-1)===Te;)S--;s+=e.slice(a,S)+`
|
|
325
|
-
`}for(l++;l<r&&e.charCodeAt(l)===Te;)l++;a=l;continue}l++}return a<r&&(s+=e.slice(a,r)),Tn(s,0,s.length,n,o)}function FJ(e,t,r){if(e.charCodeAt(t)!==Ot)return null;let n=qi(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return null;let s=qi(e,i,r,96);if(s===n){let a=e.slice(t+n,i);return a=a.replace(/\n/g," "),a.length>0&&a[0]===" "&&a[a.length-1]===" "&&a.trim().length>0&&(a=a.slice(1,-1)),{node:{type:ve.codeInline,text:a},end:i+s}}o=i+s}return null}function eh(e,t,r){if(e.charCodeAt(t)!==Ot)return t;let n=qi(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return t;let s=qi(e,i,r,96);if(s===n)return i+s;o=i+s}return t}function G$(e,t,r){if(e.charCodeAt(t)!==zt)return t;if(t+1<r&&e.charCodeAt(t+1)===xr){let c=t+2;for(;c<r&&e.charCodeAt(c)!==yt;)c++;return c<r?c+1:t}if(t+3<r&&e.charCodeAt(t+1)===Sn&&e.charCodeAt(t+2)===ft&&e.charCodeAt(t+3)===ft){let c=e.indexOf("-->",t+4);return c>=0?c+3:t}let n=t+1,o=n;for(;n<r;){let c=e.charCodeAt(n);if(c>=pt&&c<=xt||c>=Yt&&c<=ir||c>=Tt&&c<=At||c===ft)n++;else break}if(n===o)return t;let i=e.slice(o,n).toLowerCase(),s=!1;for(;n<r;){let c=e.charCodeAt(n);if(c===yt){n++;break}if(c===xr&&n+1<r&&e.charCodeAt(n+1)===yt){n+=2,s=!0;break}if(c===Wa||c===Ra){var a=c;for(n++;n<r&&e.charCodeAt(n)!==a;)n++;n<r&&n++;continue}if(c===Ke)return t;n++}if(s||Mc(i))return n;let l=1;for(;n<r&&l>0;)if(e.charCodeAt(n)===zt)if(n+1<r&&e.charCodeAt(n+1)===xr){let c=n+2,d=c;for(;d<r&&(e.charCodeAt(d)>=pt&&e.charCodeAt(d)<=xt||e.charCodeAt(d)>=Yt&&e.charCodeAt(d)<=ir);)d++;if(e.slice(c,d).toLowerCase()===i){for(;d<r&&e.charCodeAt(d)!==yt;)d++;if(d<r&&d++,l--,l===0)return d}n=d}else{let c=n+1,d=c;for(;d<r&&(e.charCodeAt(d)>=pt&&e.charCodeAt(d)<=xt||e.charCodeAt(d)>=Yt&&e.charCodeAt(d)<=ir);)d++;e.slice(c,d).toLowerCase()===i&&l++,n++}else n++;return n}function BJ(e,t,r,n,o){if(e.charCodeAt(t)!==Nr||t+1>=r||e.charCodeAt(t+1)!==Nr)return null;let i=t+2;for(;i+1<r;){let s=e.charCodeAt(i);if(s===Ot){let a=eh(e,i,r);if(a>i){i=a;continue}}if(s===Nr&&e.charCodeAt(i+1)===Nr){let a=e.slice(t+2,i),l=Tn(a,0,a.length,n,o);return{node:{type:ve.textFormatted,tag:"del",children:l},end:i+2}}s===zr&&i+1<r&&i++,i++}return null}function zJ(e,t,r,n,o){if(e.charCodeAt(t)!==Jn||t+1>=r||e.charCodeAt(t+1)!==Jn)return null;let i=t+2;for(;i+1<r;){let s=e.charCodeAt(i);if(s===Ot){let a=eh(e,i,r);if(a>i){i=a;continue}}if(s===Jn&&e.charCodeAt(i+1)===Jn&&i>t+2){let a=e.slice(t+2,i),l=Tn(a,0,a.length,n,o);return{node:{type:ve.textFormatted,tag:"mark",children:l},end:i+2}}s===zr&&i+1<r&&i++,i++}return null}function Z$(e,t,r){return e<Hp?!!(Ux(e)&au):pJ.test(t[r])}function Y$(e,t,r){return e<Hp?!!(Ux(e)&Vs):hJ.test(t[r])}function KJ(e,t,r){var n=e.charCodeAt(t);if(n!==mr&&n!==or)return null;var o=qi(e,t,r,n);if(o===0)return null;var i=t>0?e.charCodeAt(t-1):32,s=t+o<r?e.charCodeAt(t+o):32,a=Y$(i,e,t-1),l=Y$(s,e,t+o),c=t>0?Z$(i,e,t-1):!1,d=t+o<r?Z$(s,e,t+o):!1,f=!l&&(!d||a||c),m=!a&&(!c||l||d),g,b;return n===mr?(g=f,b=m):(g=f&&(!m||c),b=m&&(!f||d)),{len:o,canOpen:g,canClose:b}}function VJ(e,t,r,n){if(t.length!==0){for(var o=[],i=0;i<12;i++)o[i]=-1;for(var s=0;s<t.length;){var a=t[s];if(!a.active||!a.canClose){s++;continue}for(var l=a.ch===mr?0:1,c=l*6+a.len%3*2+(a.canOpen?1:0),d=o[c]!==void 0?o[c]:-1,f=-1,m=s-1;m>d;m--){var g=t[m];if(!(!g.active||g.ch!==a.ch||!g.canOpen)&&!((a.canOpen||g.canClose)&&(g.len+a.len)%3===0&&g.len%3!==0)){f=m;break}}if(f<0){o[c]=s-1,!a.canOpen&&(a.active=!1),s++;continue}var b=t[f],y=b.len>=2&&a.len>=2,v=y?2:1;b.len-=v,a.len-=v;var C=e[b.idx],S=e[a.idx];C.text=C.text.slice(0,C.text.length-v),S.text=S.text.slice(v);var k=b.idx+1,P=a.idx,E=e.slice(k,P),$={type:ve.textFormatted,tag:y?"strong":"em",children:E};e.splice(k,P-k,$);for(var O=P-k-1,N=0;N<t.length;N++)t[N].idx>b.idx&&(t[N].idx-=O);for(var D=f+1;D<s;D++)t[D].active=!1;if(b.len===0&&(b.active=!1,C.text==="")){e.splice(b.idx,1);for(var M=0;M<t.length;M++)t[M].idx>b.idx?t[M].idx--:t[M].idx===b.idx&&(t[M].idx=-1)}if(a.len===0){a.active=!1;var V=a.idx;if(S.text===""){e.splice(V,1);for(var R=0;R<t.length;R++)t[R].idx>V?t[R].idx--:t[R].idx===V&&(t[R].idx=-1)}}else continue;s++}for(var K=0,j=0;j<e.length;j++){var B=e[j];if(B.type===ve.text){var U=B;if(U.text==="")continue;if(K>0&&e[K-1].type===ve.text){e[K-1].text+=U.text;continue}}e[K++]=B}e.length=K}}function J$(e,t,r,n,o){let i=e.charCodeAt(t)===Sn,s=i?t+1:t;if(e.charCodeAt(s)!==cr)return null;var a=e.indexOf("]",s+1);if(a<0||a>=r)return null;for(var l=s+1,c=-1,d=1;l<r&&d>0;){var f=e.charCodeAt(l);if(f===zr&&l+1<r){l+=2;continue}if(f===Ot){var m=eh(e,l,r);if(m>l){l=m;continue}}if(f===zt){var g=X$(e,l,r);if(g){l=g.end;continue}var b=G$(e,l,r);if(b>l){l=b;continue}}f===cr?d++:f===yo&&d--,l++}if(d!==0)return null;var y=l-1,v=e.slice(s+1,y),C=l<r?e.charCodeAt(l):0,S=!1;if(C===Uo){var k=!0;for(l++;l<r&&(e.charCodeAt(l)===Te||e.charCodeAt(l)===Ke);)l++;var P="",E=l;if(l<r&&e.charCodeAt(l)===zt){for(l++,E=l;E<r&&e.charCodeAt(E)!==yt;){if(e.charCodeAt(E)===zr&&E+1<r){E+=2;continue}if(e.charCodeAt(E)===Ke){k=!1;break}E++}k&&(E>=r||e.charCodeAt(E)!==yt)&&(k=!1),k&&(P=e.slice(l,E),E++)}else if(k){for(var $=0;E<r;){var O=e.charCodeAt(E);if(O===zr&&E+1<r){E+=2;continue}if(O===Uo)$++;else if(O===Ho){if($===0)break;$--}else if(O===Te||O===Ke)break;E++}P=e.slice(l,E)}if(k){for(l=E;l<r&&(e.charCodeAt(l)===Te||e.charCodeAt(l)===Ke);)l++;var N;if(l<r){var D=e.charCodeAt(l);if(D===Wa||D===Ra||D===Uo){var M=D===Uo?41:D;l++;for(var V=l;l<r&&e.charCodeAt(l)!==M;)e.charCodeAt(l)===zr&&l+1<r&&l++,l++;l>=r?k=!1:(N=e.slice(V,l),l++)}}if(k){for(;l<r&&(e.charCodeAt(l)===Te||e.charCodeAt(l)===Ke);)l++;(l>=r||e.charCodeAt(l)!==Ho)&&(k=!1)}}if(k){l++,P=lu(P),N!==void 0&&(N=qp(lu(N)));var R=o?.sanitizer||Vx,K=R(P,i?"img":"a",i?"src":"href"),j=K===null?null:P;if(i){var B=Tn(v,0,v.length,n,o),U=th(B);return{node:{type:ve.image,target:j,alt:U,title:N},end:l}}else{var W=n.inAnchor;n.inAnchor=!0;var X=W?[{type:ve.text,text:v}]:Tn(v,0,v.length,n,o);return n.inAnchor=W,!n.inAnchor&&qx(X)?null:{node:{type:ve.link,target:j,title:N,children:X},end:l}}}else l=y+1,S=!0}var L="",Z=l;if(!S&&C===cr){var T=l+1;Z=T;for(var F=!1;Z<r&&e.charCodeAt(Z)!==yo;){if(e.charCodeAt(Z)===zr&&Z+1<r){Z+=2;continue}if(e.charCodeAt(Z)===cr){F=!0;break}Z++}if(F||Z>=r)return null;var _=e.slice(T,Z);if(_.trim())L=Yp(_);else{if(L$(v))return null;L=Yp(v)}Z=Z+1}else{if(L$(v))return null;L=Yp(v)}var H=n.refs[L];if(!H)return null;if(i)return{node:{type:ve.image,target:H.target,alt:th(Tn(v,0,v.length,n,o)),title:H.title},end:Z};var Y=n.inAnchor;n.inAnchor=!0;var X=Y?[{type:ve.text,text:v}]:Tn(v,0,v.length,n,o);return n.inAnchor=Y,!n.inAnchor&&qx(X)?null:{node:{type:ve.link,target:H.target,title:H.title,children:X},end:Z}}function X$(e,t,r){if(e.charCodeAt(t)!==zt)return null;for(var n=t+1;n<r;){var o=e.charCodeAt(n);if(o===yt)break;if(o===Te||o===Ke||o===Ka||o===zt)return null;n++}if(n>=r||e.charCodeAt(n)!==yt)return null;var i=e.slice(t+1,n),s=i.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/);return s?{node:{type:ve.link,target:i,title:void 0,children:[{type:ve.text,text:i}]},end:n+1}:i.indexOf("@")!==-1&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(i)?{node:{type:ve.link,target:"mailto:"+i,title:void 0,children:[{type:ve.text,text:i}]},end:n+1}:null}function RJ(e,t,r,n){if(e.charCodeAt(t)!==cr||t+1>=r||e.charCodeAt(t+1)!==hi)return null;let o=t+2;for(;o<r&&e.charCodeAt(o)!==yo&&e.charCodeAt(o)!==Ke;)o++;if(o>=r||e.charCodeAt(o)!==yo)return null;let i=e.slice(t+2,o);return i?{node:{type:ve.footnoteReference,target:"#"+wo(i),text:i},end:o+1}:null}function WJ(e,t,r,n){if(n.disableBareUrls)return null;var o="",i=!1,s=e.charCodeAt(t);if(s===Nc||s===72?t+8<=r&&e.charCodeAt(t+1)===iu&&e.charCodeAt(t+2)===iu&&e.charCodeAt(t+3)===Bx&&(e.charCodeAt(t+4)===x$&&e.charCodeAt(t+5)===kn&&e.charCodeAt(t+6)===xr&&e.charCodeAt(t+7)===xr?o="https://":e.charCodeAt(t+4)===kn&&e.charCodeAt(t+5)===xr&&e.charCodeAt(t+6)===xr&&(o="http://")):s===Va||s===70?t+6<=r&&e.charCodeAt(t+1)===iu&&e.charCodeAt(t+2)===Bx&&e.charCodeAt(t+3)===kn&&e.charCodeAt(t+4)===xr&&e.charCodeAt(t+5)===xr&&(o="ftp://"):(s===zs||s===87)&&t+4<=r&&e.charCodeAt(t+1)===zs&&e.charCodeAt(t+2)===zs&&e.charCodeAt(t+3)===xo&&(o="www.",i=!0),!o)return null;let a=t+o.length;for(;a<r;){let $=e.charCodeAt(a);if($===Te||$===Ke||$===$e||$===Ka||$===zt||$===yt)break;a++}for(var l=0,c=0,d=t;d<a;d++){var f=e.charCodeAt(d);f===Uo?l++:f===Ho&&c++}let m=a;for(;m>t+o.length;){let $=e.charCodeAt(m-1);if($===xo||$===rJ||$===kn||$===Sn||$===Dc||$===Ho||$===mr||$===or||$===Nr){if($===Ho){if(l>=c)break;c--}m--}else if($===w$){for(var g=m-2;g>t&&(e.charCodeAt(g)>=pt&&e.charCodeAt(g)<=xt||e.charCodeAt(g)>=Yt&&e.charCodeAt(g)<=ir||e.charCodeAt(g)>=Tt&&e.charCodeAt(g)<=At);)g--;g>=t&&e.charCodeAt(g)===v$?m=g:m--}else break}if(m<=t+o.length)return null;var b=t+(i?4:o.length),y=e.indexOf("/",b);if((y<0||y>m)&&(y=m),i&&e.indexOf(".",b)===-1)return null;for(var v=-1,C=-1,S=y-1;S>=b;S--)if(e.charCodeAt(S)===xo)if(v<0)v=S;else{C=S;break}for(var k=C>=0?C+1:b,S=k;S<y;S++)if(e.charCodeAt(S)===or)return null;var P=e.slice(t,m),E=i?"http://"+P:P;return{node:{type:ve.link,target:E,title:void 0,children:[{type:ve.text,text:P}]},end:m}}function UJ(e,t,r,n){if(n.disableBareUrls)return null;for(var o=t,i=o;o<r;){var s=e.charCodeAt(o);if(s>=pt&&s<=xt||s>=Yt&&s<=ir||s>=Tt&&s<=At||s===xo||s===Sn||s===mi||s===36||s===Lx||s===v$||s===Ra||s===mr||s===Ks||s===xr||s===Jn||s===Dc||s===hi||s===or||s===Ot||s===su||s===Kr||s===zx||s===Nr||s===ft)o++;else break}if(o===i||o>=r||e.charCodeAt(o)!==Fx)return null;o++;for(var a=o,l=-1,c=o;o<r;){var s=e.charCodeAt(o);if(s>=pt&&s<=xt||s>=Yt&&s<=ir||s>=Tt&&s<=At)o++;else if((s===ft||s===or)&&o>a)o++;else if(s===xo){if(o===a)break;var d=e.charCodeAt(o-1);if(d===ft||d===or||o-c>63)break;if(o+1<r){var f=e.charCodeAt(o+1);if(f>=pt&&f<=xt||f>=Yt&&f<=ir||f>=Tt&&f<=At)l=o,c=o+1,o++;else break}else break}else break}if(o-c>63||l<0)return null;var m=e.charCodeAt(o-1);if(!(m>=pt&&m<=xt||m>=Yt&&m<=ir||m>=Tt&&m<=At)||o<=l+1)return null;for(var g=-1,b=l-1;b>=a;b--)if(e.charCodeAt(b)===xo){g=b;break}for(var y=g>=0?g+1:a,b=y;b<o;b++)if(e.charCodeAt(b)===or)return null;var v=e.slice(t,o);return{node:{type:ve.link,target:"mailto:"+v,title:void 0,children:[{type:ve.text,text:v}]},end:o}}function qx(e){for(var t=0;t<e.length;t++)if(e[t].type===ve.link||"children"in e[t]&&Array.isArray(e[t].children)&&qx(e[t].children))return!0;return!1}function th(e){for(var t="",r=0;r<e.length;r++){var n=e[r];n.type===ve.text?t+=n.text:n.type===ve.breakLine?t+=" ":n.type===ve.codeInline?t+=n.text:"children"in n&&Array.isArray(n.children)?t+=th(n.children):n.type===ve.image?t+=n.alt||"":n.type===ve.link&&(t+=th(n.children))}return t}function Ha(e){let t=e.includes("&")?qp(e):e;return{type:ve.text,text:t}}function HJ(e,t,r,n,o){if(e.charCodeAt(t)!==zt)return null;var i=t+1;if(i>=r)return null;var s=e.charCodeAt(i);if(s===Sn&&i+1<r&&e.charCodeAt(i+1)===ft&&i+2<r&&e.charCodeAt(i+2)===ft){var a=i+3;if(a<r&&e.charCodeAt(a)===yt)return{node:{type:ve.htmlComment,text:"",h:!0},end:a+1};if(a+1<r&&e.charCodeAt(a)===ft&&e.charCodeAt(a+1)===yt)return{node:{type:ve.htmlComment,text:"-",h:!0},end:a+2};var l=e.indexOf("-->",a);return l!==-1&&l<=r-3?{node:{type:ve.htmlComment,text:e.slice(t+4,l),h:!1},end:l+3}:null}if(s===Dc){var c=e.indexOf("?>",i+1);return c!==-1&&c<r?{node:{type:ve.htmlSelfClosing,tag:"?",attrs:{},a:e.slice(t,c+2),b:!1},end:c+2}:null}if(s===Sn&&i+1<r){var d=e.charCodeAt(i+1);if(d===cr&&e.slice(i+1,i+8)==="[CDATA["){var f=e.indexOf("]]>",i+8);return f!==-1&&f<r?{node:{type:ve.htmlSelfClosing,tag:"![CDATA[",attrs:{},a:e.slice(t,f+3),b:!1},end:f+3}:null}if(d>=pt&&d<=xt){var m=e.indexOf(">",i+2);return m!==-1&&m<r?{node:{type:ve.htmlSelfClosing,tag:"!"+e.slice(i+1,m),attrs:{},a:e.slice(t,m+1),b:!1},end:m+1}:null}}if(s===xr){var g=i+1;if(g>=r)return null;var b=e.charCodeAt(g);if(!(b>=pt&&b<=xt||b>=Yt&&b<=ir))return null;for(g++;g<r;){var y=e.charCodeAt(g);if(y>=pt&&y<=xt||y>=Yt&&y<=ir||y>=Tt&&y<=At||y===ft)g++;else break}for(;g<r&&(e.charCodeAt(g)===Te||e.charCodeAt(g)===$e||e.charCodeAt(g)===Ke);)g++;if(g<r&&e.charCodeAt(g)===yt){var v=e.slice(i+1,g).trim();return{node:{type:ve.htmlSelfClosing,tag:v,attrs:{},a:e.slice(t,g+1),b:!0},end:g+1}}return null}if(!(s>=pt&&s<=xt||s>=Yt&&s<=ir))return null;var C=Hi(e,t);if(!C)return null;var S=C.tag,k=S.toLowerCase(),P=C.selfClosing;if(P||Mc(S))return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Gi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var E=Oc.has(k),$=Hx(e.slice(0,r),C.end,S);if($===-1)return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Gi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var O=NJ(e,"</"+k,$),N=e.slice(C.end,O),D=[];if(E)N.trim()&&(D=[{type:ve.text,text:N}]);else{var M=N.trim();if(M){var{inAnchor:V,inline:R}=n;k==="a"&&(n.inAnchor=!0);var K=M.indexOf(`
|
|
325
|
+
`}for(l++;l<r&&e.charCodeAt(l)===Te;)l++;a=l;continue}l++}return a<r&&(s+=e.slice(a,r)),Tn(s,0,s.length,n,o)}function FJ(e,t,r){if(e.charCodeAt(t)!==Ot)return null;let n=qi(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return null;let s=qi(e,i,r,96);if(s===n){let a=e.slice(t+n,i);return a=a.replace(/\n/g," "),a.length>0&&a[0]===" "&&a[a.length-1]===" "&&a.trim().length>0&&(a=a.slice(1,-1)),{node:{type:ve.codeInline,text:a},end:i+s}}o=i+s}return null}function eh(e,t,r){if(e.charCodeAt(t)!==Ot)return t;let n=qi(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return t;let s=qi(e,i,r,96);if(s===n)return i+s;o=i+s}return t}function G$(e,t,r){if(e.charCodeAt(t)!==zt)return t;if(t+1<r&&e.charCodeAt(t+1)===xr){let c=t+2;for(;c<r&&e.charCodeAt(c)!==yt;)c++;return c<r?c+1:t}if(t+3<r&&e.charCodeAt(t+1)===Sn&&e.charCodeAt(t+2)===dt&&e.charCodeAt(t+3)===dt){let c=e.indexOf("-->",t+4);return c>=0?c+3:t}let n=t+1,o=n;for(;n<r;){let c=e.charCodeAt(n);if(c>=pt&&c<=xt||c>=Yt&&c<=ir||c>=Tt&&c<=At||c===dt)n++;else break}if(n===o)return t;let i=e.slice(o,n).toLowerCase(),s=!1;for(;n<r;){let c=e.charCodeAt(n);if(c===yt){n++;break}if(c===xr&&n+1<r&&e.charCodeAt(n+1)===yt){n+=2,s=!0;break}if(c===Wa||c===Ra){var a=c;for(n++;n<r&&e.charCodeAt(n)!==a;)n++;n<r&&n++;continue}if(c===Ke)return t;n++}if(s||Mc(i))return n;let l=1;for(;n<r&&l>0;)if(e.charCodeAt(n)===zt)if(n+1<r&&e.charCodeAt(n+1)===xr){let c=n+2,d=c;for(;d<r&&(e.charCodeAt(d)>=pt&&e.charCodeAt(d)<=xt||e.charCodeAt(d)>=Yt&&e.charCodeAt(d)<=ir);)d++;if(e.slice(c,d).toLowerCase()===i){for(;d<r&&e.charCodeAt(d)!==yt;)d++;if(d<r&&d++,l--,l===0)return d}n=d}else{let c=n+1,d=c;for(;d<r&&(e.charCodeAt(d)>=pt&&e.charCodeAt(d)<=xt||e.charCodeAt(d)>=Yt&&e.charCodeAt(d)<=ir);)d++;e.slice(c,d).toLowerCase()===i&&l++,n++}else n++;return n}function BJ(e,t,r,n,o){if(e.charCodeAt(t)!==Nr||t+1>=r||e.charCodeAt(t+1)!==Nr)return null;let i=t+2;for(;i+1<r;){let s=e.charCodeAt(i);if(s===Ot){let a=eh(e,i,r);if(a>i){i=a;continue}}if(s===Nr&&e.charCodeAt(i+1)===Nr){let a=e.slice(t+2,i),l=Tn(a,0,a.length,n,o);return{node:{type:ve.textFormatted,tag:"del",children:l},end:i+2}}s===zr&&i+1<r&&i++,i++}return null}function zJ(e,t,r,n,o){if(e.charCodeAt(t)!==Jn||t+1>=r||e.charCodeAt(t+1)!==Jn)return null;let i=t+2;for(;i+1<r;){let s=e.charCodeAt(i);if(s===Ot){let a=eh(e,i,r);if(a>i){i=a;continue}}if(s===Jn&&e.charCodeAt(i+1)===Jn&&i>t+2){let a=e.slice(t+2,i),l=Tn(a,0,a.length,n,o);return{node:{type:ve.textFormatted,tag:"mark",children:l},end:i+2}}s===zr&&i+1<r&&i++,i++}return null}function Z$(e,t,r){return e<Hp?!!(Ux(e)&au):pJ.test(t[r])}function Y$(e,t,r){return e<Hp?!!(Ux(e)&Vs):hJ.test(t[r])}function KJ(e,t,r){var n=e.charCodeAt(t);if(n!==mr&&n!==or)return null;var o=qi(e,t,r,n);if(o===0)return null;var i=t>0?e.charCodeAt(t-1):32,s=t+o<r?e.charCodeAt(t+o):32,a=Y$(i,e,t-1),l=Y$(s,e,t+o),c=t>0?Z$(i,e,t-1):!1,d=t+o<r?Z$(s,e,t+o):!1,f=!l&&(!d||a||c),m=!a&&(!c||l||d),g,b;return n===mr?(g=f,b=m):(g=f&&(!m||c),b=m&&(!f||d)),{len:o,canOpen:g,canClose:b}}function VJ(e,t,r,n){if(t.length!==0){for(var o=[],i=0;i<12;i++)o[i]=-1;for(var s=0;s<t.length;){var a=t[s];if(!a.active||!a.canClose){s++;continue}for(var l=a.ch===mr?0:1,c=l*6+a.len%3*2+(a.canOpen?1:0),d=o[c]!==void 0?o[c]:-1,f=-1,m=s-1;m>d;m--){var g=t[m];if(!(!g.active||g.ch!==a.ch||!g.canOpen)&&!((a.canOpen||g.canClose)&&(g.len+a.len)%3===0&&g.len%3!==0)){f=m;break}}if(f<0){o[c]=s-1,!a.canOpen&&(a.active=!1),s++;continue}var b=t[f],y=b.len>=2&&a.len>=2,v=y?2:1;b.len-=v,a.len-=v;var C=e[b.idx],S=e[a.idx];C.text=C.text.slice(0,C.text.length-v),S.text=S.text.slice(v);var k=b.idx+1,P=a.idx,E=e.slice(k,P),$={type:ve.textFormatted,tag:y?"strong":"em",children:E};e.splice(k,P-k,$);for(var O=P-k-1,N=0;N<t.length;N++)t[N].idx>b.idx&&(t[N].idx-=O);for(var D=f+1;D<s;D++)t[D].active=!1;if(b.len===0&&(b.active=!1,C.text==="")){e.splice(b.idx,1);for(var M=0;M<t.length;M++)t[M].idx>b.idx?t[M].idx--:t[M].idx===b.idx&&(t[M].idx=-1)}if(a.len===0){a.active=!1;var V=a.idx;if(S.text===""){e.splice(V,1);for(var R=0;R<t.length;R++)t[R].idx>V?t[R].idx--:t[R].idx===V&&(t[R].idx=-1)}}else continue;s++}for(var K=0,j=0;j<e.length;j++){var B=e[j];if(B.type===ve.text){var U=B;if(U.text==="")continue;if(K>0&&e[K-1].type===ve.text){e[K-1].text+=U.text;continue}}e[K++]=B}e.length=K}}function J$(e,t,r,n,o){let i=e.charCodeAt(t)===Sn,s=i?t+1:t;if(e.charCodeAt(s)!==cr)return null;var a=e.indexOf("]",s+1);if(a<0||a>=r)return null;for(var l=s+1,c=-1,d=1;l<r&&d>0;){var f=e.charCodeAt(l);if(f===zr&&l+1<r){l+=2;continue}if(f===Ot){var m=eh(e,l,r);if(m>l){l=m;continue}}if(f===zt){var g=X$(e,l,r);if(g){l=g.end;continue}var b=G$(e,l,r);if(b>l){l=b;continue}}f===cr?d++:f===yo&&d--,l++}if(d!==0)return null;var y=l-1,v=e.slice(s+1,y),C=l<r?e.charCodeAt(l):0,S=!1;if(C===Uo){var k=!0;for(l++;l<r&&(e.charCodeAt(l)===Te||e.charCodeAt(l)===Ke);)l++;var P="",E=l;if(l<r&&e.charCodeAt(l)===zt){for(l++,E=l;E<r&&e.charCodeAt(E)!==yt;){if(e.charCodeAt(E)===zr&&E+1<r){E+=2;continue}if(e.charCodeAt(E)===Ke){k=!1;break}E++}k&&(E>=r||e.charCodeAt(E)!==yt)&&(k=!1),k&&(P=e.slice(l,E),E++)}else if(k){for(var $=0;E<r;){var O=e.charCodeAt(E);if(O===zr&&E+1<r){E+=2;continue}if(O===Uo)$++;else if(O===Ho){if($===0)break;$--}else if(O===Te||O===Ke)break;E++}P=e.slice(l,E)}if(k){for(l=E;l<r&&(e.charCodeAt(l)===Te||e.charCodeAt(l)===Ke);)l++;var N;if(l<r){var D=e.charCodeAt(l);if(D===Wa||D===Ra||D===Uo){var M=D===Uo?41:D;l++;for(var V=l;l<r&&e.charCodeAt(l)!==M;)e.charCodeAt(l)===zr&&l+1<r&&l++,l++;l>=r?k=!1:(N=e.slice(V,l),l++)}}if(k){for(;l<r&&(e.charCodeAt(l)===Te||e.charCodeAt(l)===Ke);)l++;(l>=r||e.charCodeAt(l)!==Ho)&&(k=!1)}}if(k){l++,P=lu(P),N!==void 0&&(N=qp(lu(N)));var R=o?.sanitizer||Vx,K=R(P,i?"img":"a",i?"src":"href"),j=K===null?null:P;if(i){var B=Tn(v,0,v.length,n,o),U=th(B);return{node:{type:ve.image,target:j,alt:U,title:N},end:l}}else{var W=n.inAnchor;n.inAnchor=!0;var X=W?[{type:ve.text,text:v}]:Tn(v,0,v.length,n,o);return n.inAnchor=W,!n.inAnchor&&qx(X)?null:{node:{type:ve.link,target:j,title:N,children:X},end:l}}}else l=y+1,S=!0}var L="",Z=l;if(!S&&C===cr){var T=l+1;Z=T;for(var F=!1;Z<r&&e.charCodeAt(Z)!==yo;){if(e.charCodeAt(Z)===zr&&Z+1<r){Z+=2;continue}if(e.charCodeAt(Z)===cr){F=!0;break}Z++}if(F||Z>=r)return null;var _=e.slice(T,Z);if(_.trim())L=Yp(_);else{if(L$(v))return null;L=Yp(v)}Z=Z+1}else{if(L$(v))return null;L=Yp(v)}var H=n.refs[L];if(!H)return null;if(i)return{node:{type:ve.image,target:H.target,alt:th(Tn(v,0,v.length,n,o)),title:H.title},end:Z};var Y=n.inAnchor;n.inAnchor=!0;var X=Y?[{type:ve.text,text:v}]:Tn(v,0,v.length,n,o);return n.inAnchor=Y,!n.inAnchor&&qx(X)?null:{node:{type:ve.link,target:H.target,title:H.title,children:X},end:Z}}function X$(e,t,r){if(e.charCodeAt(t)!==zt)return null;for(var n=t+1;n<r;){var o=e.charCodeAt(n);if(o===yt)break;if(o===Te||o===Ke||o===Ka||o===zt)return null;n++}if(n>=r||e.charCodeAt(n)!==yt)return null;var i=e.slice(t+1,n),s=i.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/);return s?{node:{type:ve.link,target:i,title:void 0,children:[{type:ve.text,text:i}]},end:n+1}:i.indexOf("@")!==-1&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(i)?{node:{type:ve.link,target:"mailto:"+i,title:void 0,children:[{type:ve.text,text:i}]},end:n+1}:null}function RJ(e,t,r,n){if(e.charCodeAt(t)!==cr||t+1>=r||e.charCodeAt(t+1)!==hi)return null;let o=t+2;for(;o<r&&e.charCodeAt(o)!==yo&&e.charCodeAt(o)!==Ke;)o++;if(o>=r||e.charCodeAt(o)!==yo)return null;let i=e.slice(t+2,o);return i?{node:{type:ve.footnoteReference,target:"#"+wo(i),text:i},end:o+1}:null}function WJ(e,t,r,n){if(n.disableBareUrls)return null;var o="",i=!1,s=e.charCodeAt(t);if(s===Nc||s===72?t+8<=r&&e.charCodeAt(t+1)===iu&&e.charCodeAt(t+2)===iu&&e.charCodeAt(t+3)===Bx&&(e.charCodeAt(t+4)===x$&&e.charCodeAt(t+5)===kn&&e.charCodeAt(t+6)===xr&&e.charCodeAt(t+7)===xr?o="https://":e.charCodeAt(t+4)===kn&&e.charCodeAt(t+5)===xr&&e.charCodeAt(t+6)===xr&&(o="http://")):s===Va||s===70?t+6<=r&&e.charCodeAt(t+1)===iu&&e.charCodeAt(t+2)===Bx&&e.charCodeAt(t+3)===kn&&e.charCodeAt(t+4)===xr&&e.charCodeAt(t+5)===xr&&(o="ftp://"):(s===zs||s===87)&&t+4<=r&&e.charCodeAt(t+1)===zs&&e.charCodeAt(t+2)===zs&&e.charCodeAt(t+3)===xo&&(o="www.",i=!0),!o)return null;let a=t+o.length;for(;a<r;){let $=e.charCodeAt(a);if($===Te||$===Ke||$===$e||$===Ka||$===zt||$===yt)break;a++}for(var l=0,c=0,d=t;d<a;d++){var f=e.charCodeAt(d);f===Uo?l++:f===Ho&&c++}let m=a;for(;m>t+o.length;){let $=e.charCodeAt(m-1);if($===xo||$===rJ||$===kn||$===Sn||$===Dc||$===Ho||$===mr||$===or||$===Nr){if($===Ho){if(l>=c)break;c--}m--}else if($===w$){for(var g=m-2;g>t&&(e.charCodeAt(g)>=pt&&e.charCodeAt(g)<=xt||e.charCodeAt(g)>=Yt&&e.charCodeAt(g)<=ir||e.charCodeAt(g)>=Tt&&e.charCodeAt(g)<=At);)g--;g>=t&&e.charCodeAt(g)===v$?m=g:m--}else break}if(m<=t+o.length)return null;var b=t+(i?4:o.length),y=e.indexOf("/",b);if((y<0||y>m)&&(y=m),i&&e.indexOf(".",b)===-1)return null;for(var v=-1,C=-1,S=y-1;S>=b;S--)if(e.charCodeAt(S)===xo)if(v<0)v=S;else{C=S;break}for(var k=C>=0?C+1:b,S=k;S<y;S++)if(e.charCodeAt(S)===or)return null;var P=e.slice(t,m),E=i?"http://"+P:P;return{node:{type:ve.link,target:E,title:void 0,children:[{type:ve.text,text:P}]},end:m}}function UJ(e,t,r,n){if(n.disableBareUrls)return null;for(var o=t,i=o;o<r;){var s=e.charCodeAt(o);if(s>=pt&&s<=xt||s>=Yt&&s<=ir||s>=Tt&&s<=At||s===xo||s===Sn||s===mi||s===36||s===Lx||s===v$||s===Ra||s===mr||s===Ks||s===xr||s===Jn||s===Dc||s===hi||s===or||s===Ot||s===su||s===Kr||s===zx||s===Nr||s===dt)o++;else break}if(o===i||o>=r||e.charCodeAt(o)!==Fx)return null;o++;for(var a=o,l=-1,c=o;o<r;){var s=e.charCodeAt(o);if(s>=pt&&s<=xt||s>=Yt&&s<=ir||s>=Tt&&s<=At)o++;else if((s===dt||s===or)&&o>a)o++;else if(s===xo){if(o===a)break;var d=e.charCodeAt(o-1);if(d===dt||d===or||o-c>63)break;if(o+1<r){var f=e.charCodeAt(o+1);if(f>=pt&&f<=xt||f>=Yt&&f<=ir||f>=Tt&&f<=At)l=o,c=o+1,o++;else break}else break}else break}if(o-c>63||l<0)return null;var m=e.charCodeAt(o-1);if(!(m>=pt&&m<=xt||m>=Yt&&m<=ir||m>=Tt&&m<=At)||o<=l+1)return null;for(var g=-1,b=l-1;b>=a;b--)if(e.charCodeAt(b)===xo){g=b;break}for(var y=g>=0?g+1:a,b=y;b<o;b++)if(e.charCodeAt(b)===or)return null;var v=e.slice(t,o);return{node:{type:ve.link,target:"mailto:"+v,title:void 0,children:[{type:ve.text,text:v}]},end:o}}function qx(e){for(var t=0;t<e.length;t++)if(e[t].type===ve.link||"children"in e[t]&&Array.isArray(e[t].children)&&qx(e[t].children))return!0;return!1}function th(e){for(var t="",r=0;r<e.length;r++){var n=e[r];n.type===ve.text?t+=n.text:n.type===ve.breakLine?t+=" ":n.type===ve.codeInline?t+=n.text:"children"in n&&Array.isArray(n.children)?t+=th(n.children):n.type===ve.image?t+=n.alt||"":n.type===ve.link&&(t+=th(n.children))}return t}function Ha(e){let t=e.includes("&")?qp(e):e;return{type:ve.text,text:t}}function HJ(e,t,r,n,o){if(e.charCodeAt(t)!==zt)return null;var i=t+1;if(i>=r)return null;var s=e.charCodeAt(i);if(s===Sn&&i+1<r&&e.charCodeAt(i+1)===dt&&i+2<r&&e.charCodeAt(i+2)===dt){var a=i+3;if(a<r&&e.charCodeAt(a)===yt)return{node:{type:ve.htmlComment,text:"",h:!0},end:a+1};if(a+1<r&&e.charCodeAt(a)===dt&&e.charCodeAt(a+1)===yt)return{node:{type:ve.htmlComment,text:"-",h:!0},end:a+2};var l=e.indexOf("-->",a);return l!==-1&&l<=r-3?{node:{type:ve.htmlComment,text:e.slice(t+4,l),h:!1},end:l+3}:null}if(s===Dc){var c=e.indexOf("?>",i+1);return c!==-1&&c<r?{node:{type:ve.htmlSelfClosing,tag:"?",attrs:{},a:e.slice(t,c+2),b:!1},end:c+2}:null}if(s===Sn&&i+1<r){var d=e.charCodeAt(i+1);if(d===cr&&e.slice(i+1,i+8)==="[CDATA["){var f=e.indexOf("]]>",i+8);return f!==-1&&f<r?{node:{type:ve.htmlSelfClosing,tag:"![CDATA[",attrs:{},a:e.slice(t,f+3),b:!1},end:f+3}:null}if(d>=pt&&d<=xt){var m=e.indexOf(">",i+2);return m!==-1&&m<r?{node:{type:ve.htmlSelfClosing,tag:"!"+e.slice(i+1,m),attrs:{},a:e.slice(t,m+1),b:!1},end:m+1}:null}}if(s===xr){var g=i+1;if(g>=r)return null;var b=e.charCodeAt(g);if(!(b>=pt&&b<=xt||b>=Yt&&b<=ir))return null;for(g++;g<r;){var y=e.charCodeAt(g);if(y>=pt&&y<=xt||y>=Yt&&y<=ir||y>=Tt&&y<=At||y===dt)g++;else break}for(;g<r&&(e.charCodeAt(g)===Te||e.charCodeAt(g)===$e||e.charCodeAt(g)===Ke);)g++;if(g<r&&e.charCodeAt(g)===yt){var v=e.slice(i+1,g).trim();return{node:{type:ve.htmlSelfClosing,tag:v,attrs:{},a:e.slice(t,g+1),b:!0},end:g+1}}return null}if(!(s>=pt&&s<=xt||s>=Yt&&s<=ir))return null;var C=Hi(e,t);if(!C)return null;var S=C.tag,k=S.toLowerCase(),P=C.selfClosing;if(P||Mc(S))return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Gi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var E=Oc.has(k),$=Hx(e.slice(0,r),C.end,S);if($===-1)return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Gi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var O=NJ(e,"</"+k,$),N=e.slice(C.end,O),D=[];if(E)N.trim()&&(D=[{type:ve.text,text:N}]);else{var M=N.trim();if(M){var{inAnchor:V,inline:R}=n;k==="a"&&(n.inAnchor=!0);var K=M.indexOf(`
|
|
326
326
|
|
|
327
|
-
`)!==-1||/^#{1,6}\s/.test(M);K?(n.inline=!1,D=qs(M,n,o)):D=Tn(M,0,M.length,n,o),n.inAnchor=V,n.inline=R}}return{node:{type:ve.htmlBlock,tag:S,attrs:Gi(C.attrs,S,o),f:C.rawAttrs,children:D,a:void 0,text:N,c:!1,b:!1,endPos:$,e:!1},end:$}}var qJ=200,Lc=0;function Tn(e,t,r,n,o){if(Lc++,Lc>qJ)return Lc--,[{type:ve.text,text:e.slice(t,r)}];let i=n;if(o.streaming||o.optimizeForStreaming){let be=function(Ae,xe){for(var Ie=1,et=xe+1;et<Ae.length;et++){var wt=Ae.charCodeAt(et);if(wt===cr)Ie++;else if(wt===yo&&(Ie--,Ie===0))return et}return-1},re=e.slice(t,r),ke=re;for(var s=0,a=0,l=0,c=0,d=0,f=-1,m=-1,g=-1,b=-1,y=-1,v=0;v<re.length;v++){var C=re.charCodeAt(v);C===mr?v+1<re.length&&re.charCodeAt(v+1)===mr?(s++,f=v,v++):(a++,m=v):C===or?v+1<re.length&&re.charCodeAt(v+1)===or?(l++,g=v,v++):(c++,b=v):C===Nr&&v+1<re.length&&re.charCodeAt(v+1)===Nr&&(d++,y=v,v++)}var S=[];d%2===1&&y>=0&&S.push([y,2]),l%2===1&&g>=0&&S.push([g,2]),c%2===1&&b>=0&&S.push([b,1]),s%2===1&&f>=0&&S.push([f,2]),a%2===1&&m>=0&&S.push([m,1]),S.sort(function(Ae,xe){return xe[0]-Ae[0]});for(var k=0;k<S.length;k++){var P=S[k][0],E=S[k][1];re=re.slice(0,P)+re.slice(P+E)}let Ne=0,Me=-1;for(let Ae=0;Ae<re.length;Ae++)re.charCodeAt(Ae)===Ot&&(Ne++,Me=Ae);if(Ne%2===1&&Me!==-1){let Ae=!1,xe=-1,Ie=0;for(;Ie<re.length;)re.charCodeAt(Ie)===Ot&&(Ae?(Ae=!1,xe=-1):(xe=Ie,Ae=!0)),Ie++;Ae&&xe!==-1&&(re=re.slice(0,xe))}for(var $=!0;$;){$=!1;for(var O=-1,N=-1,D=-1,M=!1,V=0;V<re.length;V++){var R=re.charCodeAt(V);if(R===cr&&(V===0||re.charCodeAt(V-1)!==zr)){var K=V>0&&re.charCodeAt(V-1)===Sn,j=K?V-1:V,B=be(re,V);if(B===-1)O=j,M=K,N=V+1,D=re.length;else{var U=B+1;if(U>=re.length)O=j,M=K,N=V+1,D=B;else if(re.charCodeAt(U)===Uo){var W=re.indexOf(")",U+1);W===-1?(O=j,M=K,N=V+1,D=B,V=re.length):V=W}else if(re.charCodeAt(U)===cr){var L=re.indexOf("]",U+1);L===-1?(O=j,M=K,N=V+1,D=B,V=re.length):V=L}else V=B}}}if(O>=0){var Z=M?"":re.slice(N,D);re=re.slice(0,O)+Z,$=!0}}let Pe=re.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(Pe&&Pe.index!==void 0){var T=Pe[0].length-Pe[2].length,F=T>=2&&Pe[0].charCodeAt(T-2)===xr;if(!F){for(var _=!1,H=0,Y=0;Y<Pe.index;Y++)re.charCodeAt(Y)===Ot&&H++;if(_=H%2===1,!_){let Ae=Pe[1];Hs(re,"</"+Ae,0)===-1&&(re=re.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/,"$1"))}}}re!==ke&&(e=e.slice(0,t)+re,r=t+re.length)}let X=[];var oe=[];let Q=t;var le=o.disableAutoLink||o.disableBareUrls||i.inAnchor?-1:e.indexOf("@",t);for(le>=r&&(le=-1);t<r;){let be=e.charCodeAt(t),re=null;if(be===Ot){if(re=FJ(e,t,r),!re){var ue=qi(e,t,r,Ot);t+=ue-1}}else if(be===mr||be===or){var te=KJ(e,t,r);if(te){if(te.canOpen||te.canClose){t>Q&&X.push(Ha(e.slice(Q,t)));var ge=e.slice(t,t+te.len),Se=Ha(ge);oe.push({idx:X.length,ch:be,len:te.len,canOpen:te.canOpen,canClose:te.canClose,active:!0}),X.push(Se),t+=te.len,Q=t;continue}t+=te.len-1}}else if(be===Nr)re=BJ(e,t,r,i,o);else if(be===Jn)re=zJ(e,t,r,i,o);else if(be===cr)t+1<r&&e.charCodeAt(t+1)===hi&&(re=RJ(e,t,r)),re||(re=J$(e,t,r,i,o));else if(be===Sn&&t+1<r&&e.charCodeAt(t+1)===cr)re=J$(e,t,r,i,o);else if(be===zt)re=X$(e,t,r),!re&&!o.disableParsingRawHTML&&!o.ignoreHTMLBlocks&&(re=HJ(e,t,r,i,o));else if((be===Nc||be===zs||be===Va)&&!i.inAnchor&&!o.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==zt)){var pe=t+1<r?e.charCodeAt(t+1):0;(be===Nc&&pe===iu||be===Va&&pe===iu||be===zs&&pe===zs)&&(re=WJ(e,t,r,o))}if(!re&&le>=0&&le-t<=64&&!i.inAnchor&&!o.disableAutoLink&&!o.disableBareUrls&&(be>=pt&&be<=xt||be>=Yt&&be<=ir||be>=Tt&&be<=At)&&(re=UJ(e,t,r,o),!re&&t>=le&&(le=e.indexOf("@",t+1),le>=r&&(le=-1))),be===Kx){t>Q&&X.push(Ha(e.slice(Q,t))),X.push({type:ve.breakLine}),t++,Q=t;continue}if(re)t>Q&&X.push(Ha(e.slice(Q,t))),X.push(re.node),t=re.end,Q=t;else{if(be===zr&&t+1<r){let ke=e.charCodeAt(t+1);if(Ux(ke)&au){t>Q&&X.push(Ha(e.slice(Q,t))),X.push(Ha(e[t+1])),t+=2,Q=t;continue}}if(t++,le<0||le-t>64)for(;t<r;){var we=e.charCodeAt(t);if(we<Hp&&!D$[we])t++;else break}}}if(r>Q){let be=e.slice(Q,r);be&&X.push(Ha(be))}return oe.length>0&&VJ(X,oe),Lc--,X}var GJ=500;function qs(e,t,r){var n=t.i||0;if(n>GJ)return[{type:ve.text,text:e}];if(t.i=n+1,(r.streaming||r.optimizeForStreaming)&&!t.j){var o=e.length;o>0&&e.charCodeAt(o-1)===Ke&&o--;for(var i=o;i>0&&e.charCodeAt(i-1)!==Ke;)i--;if(i>0&&e.charCodeAt(i)===Kr){for(var s=!0,a=i;a<o;a++){var l=e.charCodeAt(a);if(l!==Te&&l!==$e&&l!==
|
|
328
|
-
`),m=f===-1?d:d.slice(f+1);if(m.length>0&&m.charCodeAt(0)===Kr){for(var g=!1,b=!1,y=1;y<m.length;y++){var v=m.charCodeAt(y);v===Kr&&(g=!0),v===
|
|
329
|
-
`),_=F===-1?0:F+1,H=T,Y=_,X=0;Y<H&&e.charCodeAt(Y)===Te&&X<3;)Y++,X++;if(Y<H){var oe=e.charCodeAt(Y),Q=!1;if(oe===mr||oe===
|
|
327
|
+
`)!==-1||/^#{1,6}\s/.test(M);K?(n.inline=!1,D=qs(M,n,o)):D=Tn(M,0,M.length,n,o),n.inAnchor=V,n.inline=R}}return{node:{type:ve.htmlBlock,tag:S,attrs:Gi(C.attrs,S,o),f:C.rawAttrs,children:D,a:void 0,text:N,c:!1,b:!1,endPos:$,e:!1},end:$}}var qJ=200,Lc=0;function Tn(e,t,r,n,o){if(Lc++,Lc>qJ)return Lc--,[{type:ve.text,text:e.slice(t,r)}];let i=n;if(o.streaming||o.optimizeForStreaming){let be=function(Ae,xe){for(var Ie=1,et=xe+1;et<Ae.length;et++){var wt=Ae.charCodeAt(et);if(wt===cr)Ie++;else if(wt===yo&&(Ie--,Ie===0))return et}return-1},re=e.slice(t,r),ke=re;for(var s=0,a=0,l=0,c=0,d=0,f=-1,m=-1,g=-1,b=-1,y=-1,v=0;v<re.length;v++){var C=re.charCodeAt(v);C===mr?v+1<re.length&&re.charCodeAt(v+1)===mr?(s++,f=v,v++):(a++,m=v):C===or?v+1<re.length&&re.charCodeAt(v+1)===or?(l++,g=v,v++):(c++,b=v):C===Nr&&v+1<re.length&&re.charCodeAt(v+1)===Nr&&(d++,y=v,v++)}var S=[];d%2===1&&y>=0&&S.push([y,2]),l%2===1&&g>=0&&S.push([g,2]),c%2===1&&b>=0&&S.push([b,1]),s%2===1&&f>=0&&S.push([f,2]),a%2===1&&m>=0&&S.push([m,1]),S.sort(function(Ae,xe){return xe[0]-Ae[0]});for(var k=0;k<S.length;k++){var P=S[k][0],E=S[k][1];re=re.slice(0,P)+re.slice(P+E)}let Ne=0,Me=-1;for(let Ae=0;Ae<re.length;Ae++)re.charCodeAt(Ae)===Ot&&(Ne++,Me=Ae);if(Ne%2===1&&Me!==-1){let Ae=!1,xe=-1,Ie=0;for(;Ie<re.length;)re.charCodeAt(Ie)===Ot&&(Ae?(Ae=!1,xe=-1):(xe=Ie,Ae=!0)),Ie++;Ae&&xe!==-1&&(re=re.slice(0,xe))}for(var $=!0;$;){$=!1;for(var O=-1,N=-1,D=-1,M=!1,V=0;V<re.length;V++){var R=re.charCodeAt(V);if(R===cr&&(V===0||re.charCodeAt(V-1)!==zr)){var K=V>0&&re.charCodeAt(V-1)===Sn,j=K?V-1:V,B=be(re,V);if(B===-1)O=j,M=K,N=V+1,D=re.length;else{var U=B+1;if(U>=re.length)O=j,M=K,N=V+1,D=B;else if(re.charCodeAt(U)===Uo){var W=re.indexOf(")",U+1);W===-1?(O=j,M=K,N=V+1,D=B,V=re.length):V=W}else if(re.charCodeAt(U)===cr){var L=re.indexOf("]",U+1);L===-1?(O=j,M=K,N=V+1,D=B,V=re.length):V=L}else V=B}}}if(O>=0){var Z=M?"":re.slice(N,D);re=re.slice(0,O)+Z,$=!0}}let Pe=re.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(Pe&&Pe.index!==void 0){var T=Pe[0].length-Pe[2].length,F=T>=2&&Pe[0].charCodeAt(T-2)===xr;if(!F){for(var _=!1,H=0,Y=0;Y<Pe.index;Y++)re.charCodeAt(Y)===Ot&&H++;if(_=H%2===1,!_){let Ae=Pe[1];Hs(re,"</"+Ae,0)===-1&&(re=re.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/,"$1"))}}}re!==ke&&(e=e.slice(0,t)+re,r=t+re.length)}let X=[];var oe=[];let Q=t;var le=o.disableAutoLink||o.disableBareUrls||i.inAnchor?-1:e.indexOf("@",t);for(le>=r&&(le=-1);t<r;){let be=e.charCodeAt(t),re=null;if(be===Ot){if(re=FJ(e,t,r),!re){var ue=qi(e,t,r,Ot);t+=ue-1}}else if(be===mr||be===or){var te=KJ(e,t,r);if(te){if(te.canOpen||te.canClose){t>Q&&X.push(Ha(e.slice(Q,t)));var ge=e.slice(t,t+te.len),Se=Ha(ge);oe.push({idx:X.length,ch:be,len:te.len,canOpen:te.canOpen,canClose:te.canClose,active:!0}),X.push(Se),t+=te.len,Q=t;continue}t+=te.len-1}}else if(be===Nr)re=BJ(e,t,r,i,o);else if(be===Jn)re=zJ(e,t,r,i,o);else if(be===cr)t+1<r&&e.charCodeAt(t+1)===hi&&(re=RJ(e,t,r)),re||(re=J$(e,t,r,i,o));else if(be===Sn&&t+1<r&&e.charCodeAt(t+1)===cr)re=J$(e,t,r,i,o);else if(be===zt)re=X$(e,t,r),!re&&!o.disableParsingRawHTML&&!o.ignoreHTMLBlocks&&(re=HJ(e,t,r,i,o));else if((be===Nc||be===zs||be===Va)&&!i.inAnchor&&!o.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==zt)){var pe=t+1<r?e.charCodeAt(t+1):0;(be===Nc&&pe===iu||be===Va&&pe===iu||be===zs&&pe===zs)&&(re=WJ(e,t,r,o))}if(!re&&le>=0&&le-t<=64&&!i.inAnchor&&!o.disableAutoLink&&!o.disableBareUrls&&(be>=pt&&be<=xt||be>=Yt&&be<=ir||be>=Tt&&be<=At)&&(re=UJ(e,t,r,o),!re&&t>=le&&(le=e.indexOf("@",t+1),le>=r&&(le=-1))),be===Kx){t>Q&&X.push(Ha(e.slice(Q,t))),X.push({type:ve.breakLine}),t++,Q=t;continue}if(re)t>Q&&X.push(Ha(e.slice(Q,t))),X.push(re.node),t=re.end,Q=t;else{if(be===zr&&t+1<r){let ke=e.charCodeAt(t+1);if(Ux(ke)&au){t>Q&&X.push(Ha(e.slice(Q,t))),X.push(Ha(e[t+1])),t+=2,Q=t;continue}}if(t++,le<0||le-t>64)for(;t<r;){var we=e.charCodeAt(t);if(we<Hp&&!D$[we])t++;else break}}}if(r>Q){let be=e.slice(Q,r);be&&X.push(Ha(be))}return oe.length>0&&VJ(X,oe),Lc--,X}var GJ=500;function qs(e,t,r){var n=t.i||0;if(n>GJ)return[{type:ve.text,text:e}];if(t.i=n+1,(r.streaming||r.optimizeForStreaming)&&!t.j){var o=e.length;o>0&&e.charCodeAt(o-1)===Ke&&o--;for(var i=o;i>0&&e.charCodeAt(i-1)!==Ke;)i--;if(i>0&&e.charCodeAt(i)===Kr){for(var s=!0,a=i;a<o;a++){var l=e.charCodeAt(a);if(l!==Te&&l!==$e&&l!==dt&&l!==kn&&l!==Kr){s=!1;break}}if(s){for(var c=i-1;c>0&&e.charCodeAt(c-1)!==Ke;)c--;e.charCodeAt(c)===Kr&&(e=e.slice(0,c).trimEnd())}}var d=e.trim(),f=d.lastIndexOf(`
|
|
328
|
+
`),m=f===-1?d:d.slice(f+1);if(m.length>0&&m.charCodeAt(0)===Kr){for(var g=!1,b=!1,y=1;y<m.length;y++){var v=m.charCodeAt(y);v===Kr&&(g=!0),v===dt&&(b=!0)}g&&b&&(e=f===-1?"":e.slice(0,e.lastIndexOf(m)).trimEnd())}for(var C=-1,S=-1,k=-1,P=e.length-1;P>=0;P--)if(e.charCodeAt(P)===zt){var E=P+1<e.length?e.charCodeAt(P+1):0;if(E>=pt&&E<=xt||E>=Yt&&E<=ir){for(var $=P+2;$<e.length;){var O=e.charCodeAt($);if(O>=pt&&O<=xt||O>=Yt&&O<=ir||O>=Tt&&O<=At)$++;else break}for(var N=$;N<e.length&&e.charCodeAt(N)!==yt;)N++;if(N<e.length&&e.charCodeAt(N-1)!==xr){for(var D=!1,M=N+1;M<e.length;M++)if(e.charCodeAt(M)===zt){D=!0;break}D||(C=P,S=$,k=N+1)}}break}if(C>=0){for(var V=0,R=0;R<C;R++)e.charCodeAt(R)===Ot&&V++;if(V%2===0){var K=e.slice(C+1,S);Hs(e,"</"+K,0)===-1&&(e=e.slice(0,C)+e.slice(k))}}for(var j=e.length;j>0&&e.charCodeAt(j-1)===Ke;)j--;if(j>0){for(var B=j;B>0&&e.charCodeAt(B-1)!==Ke;)B--;for(var U=B,W=0;U<j&&e.charCodeAt(U)===Te&&W<3;)U++,W++;if(B>0&&U<j&&TJ(e,U,j)){for(var L=B-1,Z=L;Z>0&&e.charCodeAt(Z-1)!==Ke;)Z--;zn(e,Z,L)||(e=e.slice(0,B).trimEnd())}}var T=e.length;if(T>0){for(var F=e.lastIndexOf(`
|
|
329
|
+
`),_=F===-1?0:F+1,H=T,Y=_,X=0;Y<H&&e.charCodeAt(Y)===Te&&X<3;)Y++,X++;if(Y<H){var oe=e.charCodeAt(Y),Q=!1;if(oe===mr||oe===dt||oe===Ks){var le=Y+1;if(le>=H||e.charCodeAt(le)===Te||e.charCodeAt(le)===$e){for(var ue=le;ue<H&&(e.charCodeAt(ue)===Te||e.charCodeAt(ue)===$e);)ue++;ue>=H&&(Q=!0)}}else if(oe>=Tt&&oe<=At){for(var te=Y;te<H&&e.charCodeAt(te)>=Tt&&e.charCodeAt(te)<=At;)te++;if(te<H&&(e.charCodeAt(te)===xo||e.charCodeAt(te)===Ho)){var ge=te+1;if(ge>=H||e.charCodeAt(ge)===Te||e.charCodeAt(ge)===$e){for(var Se=ge;Se<H&&(e.charCodeAt(Se)===Te||e.charCodeAt(Se)===$e);)Se++;Se>=H&&(Q=!0)}}}Q&&(e=e.slice(0,_).trimEnd())}}}if(t.inline)return Tn(e,0,e.length,t,r);let pe=[],we=0,be=e.length;if(we===0&&!r.disableFrontmatter&&e.startsWith("---")){let Ae=oJ(e);if(Ae&&Ae.hasValidYaml){if(r.preserveFrontmatter!==!1){let xe=e.slice(0,Ae.endPos).trimEnd();pe.push({type:ve.frontmatter,text:xe})}we=Ae.endPos}}for(;we<be;){for(var re=e.indexOf(`
|
|
330
330
|
`,we),ke=re<0?be:re;we<be&&zn(e,we,ke);)we=ke<be?ke+1:ke,we<be&&(re=e.indexOf(`
|
|
331
|
-
`,we),ke=re<0?be:re);if(we>=be)break;e.charCodeAt(we),wr(e,we,ke);let Ae=null;if(F$=e,B$=we,z$=ke,e.charCodeAt(we)!==Up&&Ft>=4&&!t.inHTML)Ae=_J(e,we);else if(e.charCodeAt(we)!==Up){let xe=we+Bt,Ie=e.charCodeAt(xe);Ie===mi?Ae=V$(e,we,t,r):Ie===yt?Ae=$J(e,we,t,r):Ie===Ot||Ie===Nr?Ae=AJ(e,we):Ie===
|
|
331
|
+
`,we),ke=re<0?be:re);if(we>=be)break;e.charCodeAt(we),wr(e,we,ke);let Ae=null;if(F$=e,B$=we,z$=ke,e.charCodeAt(we)!==Up&&Ft>=4&&!t.inHTML)Ae=_J(e,we);else if(e.charCodeAt(we)!==Up){let xe=we+Bt,Ie=e.charCodeAt(xe);Ie===mi?Ae=V$(e,we,t,r):Ie===yt?Ae=$J(e,we,t,r):Ie===Ot||Ie===Nr?Ae=AJ(e,we):Ie===dt||Ie===mr||Ie===or?(Ae=Ws(e,we),!Ae&&(Ae=W$(e,we,t,r))):Ie===Ks||Ie>=Tt&&Ie<=At?Ae=W$(e,we,t,r):Ie===zt?Ae=U$(e,we,t,r):Ie===Kr?Ae=q$(e,we,t,r):Ie===cr&&(Ae=MJ(e,we,t))}if(!Ae){for(var Ne=!1,Me=we;Me<ke;Me++)if(e.charCodeAt(Me)===Kr){Ne=!0;break}Ne&&(Ae=q$(e,we,t,r))}if(Ae||(Ae=jJ(e,we,t,r)),Ae)Ae.node.type!==ve.refCollection&&pe.push(Ae.node),we=Ae.end;else{var Pe=e.indexOf(`
|
|
332
332
|
`,we);we=Pe<0?be:Pe+1}}return t.i=n,pe}function ZJ(e,t,r,n){var o=Hi(e,t);return o?{tagName:o.tag,tagLower:o.tag.toLowerCase(),attrs:o.rawAttrs,whitespaceBeforeAttrs:o.whitespaceBeforeAttrs,isSelfClosing:o.selfClosing,hasSpaceBeforeSlash:o.hasSpaceBeforeSlash,isClosing:o.isClosing,hasNewline:o.whitespaceBeforeAttrs.includes(`
|
|
333
333
|
`)||o.rawAttrs.includes(`
|
|
334
334
|
`),endPos:o.end}:null}function Gx(e,t,r){Lc=0,e=mJ(e),!t.refs&&(t.refs={}),t.j=EJ(e,t.refs,r);let n=qs(e,t,r);return t.refs&&Object.keys(t.refs).length>0?[{type:ve.refCollection,refs:t.refs},...n]:n}var YJ=/^\n+/,Zx;try{Zx=Er.createElement("div").$$typeof}catch{Zx=Symbol.for("react.transitional.element")}function Yx(e,t,r){return{$$typeof:Zx,type:e,key:r!=null?""+r:null,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var JJ=typeof Er.createContext<"u"?Er.createContext(void 0):void 0;function Q$(e,t,r,n,o,i,s,a,l){switch(e.type){case ve.blockQuote:{let v={key:r.key};return e.alert&&(v.className="markdown-alert-"+i(e.alert.toLowerCase(),wo),e.children.unshift({attrs:{},children:[{type:ve.text,text:e.alert}],c:!0,type:ve.htmlBlock,tag:"header"})),n("blockquote",v,t(e.children,r))}case ve.breakLine:return n("br",{key:r.key});case ve.breakThematic:return n("hr",{key:r.key});case ve.frontmatter:return a.preserveFrontmatter?n("pre",{key:r.key},e.text):null;case ve.codeBlock:let y=e.lang?qp(e.lang):"";return n("pre",{key:r.key},n("code",{...Xn(e.attrs||{}),className:y?`language-${y} lang-${y}`:""},e.text));case ve.codeInline:return n("code",{key:r.key},e.text);case ve.footnoteReference:return n("a",{key:r.key,href:o(e.target,"a","href")||void 0},n("sup",{key:r.key},e.text));case ve.gfmTask:return n("input",{checked:e.completed,key:r.key,readOnly:!0,type:"checkbox"});case ve.heading:return n(`h${e.level}`,{id:e.id,key:r.key},t(e.children,r));case ve.htmlBlock:{let v=e;if(a.tagfilter&&A$(v.tag)){var c="";if(v.attrs)for(var d in v.attrs){var f=v.attrs[d];f===!0?c+=" "+d:f!=null&&f!==!1&&(c+=" "+d+'="'+String(f)+'"')}return n("span",{key:r.key},"<"+v.tag+c+">")}if(v.a&&v.c){let C=function(W){if((W.type===ve.htmlSelfClosing||W.type===ve.htmlBlock)&&W.b)return[];if(W.type===ve.paragraph){let L=W.children;return L?L.flatMap(C):[]}return W.type===ve.text?W.text?.trim()?[W]:[]:W.type===ve.htmlBlock&&W.children?[{...W,children:W.children?.flatMap(C)}]:[W]},S=function(W){for(var L=0;L<W.length;L++)W[L].type===ve.htmlBlock&&(W[L].c=!1),"children"in W[L]&&W[L].children&&S(W[L].children)},k=function(W,L){for(var Z=0;Z<W.length;Z++){var T=W[Z];if(T.type===ve.paragraph&&T.children)for(var F=T.children,_=0;_<F.length;_++){var H=F[_];if(H.type===ve.htmlSelfClosing&&H.b&&H.tag.toLowerCase()===L){var Y=W.slice(0,Z);_>0&&Y.push({type:ve.paragraph,children:F.slice(0,_)});var X=[];if(_+1<F.length){var oe=F.slice(_+1);oe=oe.filter(function(Q){return!(Q.type===ve.htmlSelfClosing&&Q.b)}),oe.length>0&&(X=oe)}return X=X.concat(W.slice(Z+1)),{found:!0,beforeClose:Y,afterClose:X}}}if((T.type===ve.htmlSelfClosing||T.type===ve.htmlBlock)&&T.b&&T.tag.toLowerCase()===L)return{found:!0,beforeClose:W.slice(0,Z),afterClose:W.slice(Z+1)}}return{found:!1,beforeClose:W,afterClose:[]}},P=v.tag.toLowerCase(),E=kJ(P),$=v.children&&v.children.length>0,O=/<[a-z][^>]{0,100}>/i.test(v.a);if(E){let W=v.a.replace(new RegExp("\\s*</"+P+">\\s*$","i"),"");return a.tagfilter&&(W=_$(W)),O?l(e.tag,{key:r.key,...Xn(e.attrs||{}),dangerouslySetInnerHTML:{__html:W}}):l(e.tag,{key:r.key,...Xn(e.attrs||{})},W)}let N=new RegExp(`^<${v.tag}(\\s|>)`,"i").test(v.a);if($&&!N&&a.tagfilter&&xJ(v.a))return l(e.tag,{key:r.key,...Xn(e.attrs||{})},t(v.children,r));if(PJ(v.a)){let W=a.tagfilter?_$(v.a):v.a;return l(e.tag,{key:r.key,...Xn(e.attrs||{}),dangerouslySetInnerHTML:{__html:W}})}let D={slugify:W=>i(W,wo),sanitizer:o,tagfilter:!0},M=v.a.replace(/>\s+</g,"><").replace(/\n+/g," ").trim();if(new RegExp(`^<${v.tag}(\\s[^>]*)?>(\\s*</${v.tag}>)?$`,"i").test(M))return v.children&&v.children.length>0?l(e.tag,{key:r.key,...Xn(e.attrs||{})},t(v.children,r)):l(e.tag,{key:r.key,...Xn(e.attrs||{})});let V=Gx(M,{inline:!1,refs:s,inHTML:!1},D);S(V);let R=v.tag.toLowerCase(),K="</"+R+">",j=new RegExp(`^<${v.tag}(\\s|>)`,"i").test(M),B=M.toLowerCase().trimEnd().endsWith(K),U=j&&B;if(U&&$)return l(e.tag,{key:r.key,...Xn(e.attrs||{})},t(v.children,r));if(U)return t(V.flatMap(C),r);var m=k(V,R);if(m.found&&m.afterClose.length>0){var g=m.beforeClose.flatMap(C),b=m.afterClose.flatMap(C);return Yx(Er.Fragment,{children:[l(e.tag,{key:r.key,...Xn(e.attrs||{})},t(g,r)),t(b,r)]},null)}return l(e.tag,{key:r.key,...Xn(e.attrs||{})},t(V.flatMap(C),r))}return Mc(e.tag)?l(e.tag,{key:r.key,...Xn(e.attrs||{})}):l(e.tag,{key:r.key,...Xn(e.attrs||{})},e.children?t(e.children,r):"")}case ve.htmlSelfClosing:{let v=e;if(a.tagfilter&&A$(v.tag)){var c="";if(v.attrs)for(var d in v.attrs){var f=v.attrs[d];f===!0?c+=" "+d:f!=null&&f!==!1&&(c+=" "+d+'="'+String(f)+'"')}return n("span",{key:r.key},"<"+v.tag+c+" />")}return l(e.tag,{key:r.key,...Xn(e.attrs||{})})}case ve.image:{let v=e.target!=null?o(e.target,"img","src"):null;return n("img",{key:r.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:v||void 0})}case ve.link:{let v={key:r.key};return e.target!=null&&(v.href=bJ(e.target)),e.title&&(v.title=e.title),n("a",v,t(e.children,r))}case ve.table:{let v=e;return n("table",{key:r.key},n("thead",{key:"thead"},n("tr",null,v.header.map(function(C,S){return n("th",{key:S,style:v.align[S]==null?{}:{textAlign:v.align[S]}},t(C,r))}))),v.cells.length>0&&n("tbody",{key:"tbody"},v.cells.map(function(C,S){return n("tr",{key:S},C.map(function(k,P){return n("td",{key:P,style:v.align[P]==null?{}:{textAlign:v.align[P]}},t(k,r))}))})))}case ve.text:return e.text;case ve.textFormatted:return n(e.tag,{key:r.key},t(e.children,r));case ve.orderedList:case ve.unorderedList:{let v=e.type===ve.orderedList?"ol":"ul";return n(v,{key:r.key,start:e.type===ve.orderedList?e.start:void 0},e.items.map(function(C,S){return n("li",{key:S},t(C,r))}))}case ve.paragraph:return n("p",{key:r.key},t(e.children,r));case ve.ref:return null;default:return null}}var XJ=(e,t,r,n,o,i,s)=>{var a=c=>c.map(function(d){return"text"in d?d.text:""}),l=(c,d={})=>{var f=(d.renderDepth||0)+1;if(f>2500)return a(c);d.renderDepth=f;for(var m=d.key,g=[],b=!1,y=0;y<c.length;y++){d.key=y;var v;if(e){var C=Q$.bind(null,c[y],l,d,t,r,n,o,i,s);v=e(C,c[y],l,d)}else v=Q$(c[y],l,d,t,r,n,o,i,s);var S=typeof v=="string";if(S&&b)g[g.length-1]+=v;else if(v!==null)if(Array.isArray(v))for(var k=0;k<v.length;k++)g.push(v[k]);else g.push(v);b=S}return d.key=m,d.renderDepth=f-1,g};return l},QJ=(e,t)=>{let r=Rx(t,e,void 0);return r?typeof r=="function"||typeof r=="object"&&"render"in r?r:Rx(t,`${e}.component`,e):e};function eX(e,t){let r={...t||{}};r.overrides=r.overrides||{};let n=r.slugify||wo,o=r.sanitizer||Vx,i=r.createElement,s=r.overrides&&Object.keys(r.overrides).length>0,a=k=>Jx(k,{...r,wrapper:null});function l(k){for(var P in k){var E=k[P];if(typeof E=="string"&&E.length>0&&E.charCodeAt(0)===zt&&(wJ.test(E)||CJ.test(E)||ZJ(E,0))){var $=a(E.trim());k[P]=P==="innerHTML"&&Array.isArray($)?$[0]:$}}}function c(k,P,...E){var $=P||{},O=k;if(s){var N=Rx(r.overrides,k+".props",{});O=QJ(k,r.overrides),$={...$,...N,className:vJ($.className,N.className)||void 0}}if(!i){var D=$.key;return D!=null&&delete $.key,E.length===1?$.children=E[0]:E.length>1&&($.children=E),Yx(O,$,D)}return i(O,$,...E)}function d(k,P,...E){return P&&l(P),c(k,P,...E)}let f={...r,slugify:r.slugify?k=>r.slugify(k,wo):wo,sanitizer:o,tagfilter:r.tagfilter!==!1},m=e[0]&&e[0].type===ve.refCollection?e[0].refs:{},g=XJ(r.renderRule,c,o,n,m,r,d),b=g(e,{inline:r.forceInline,refs:m}),y=[];for(let k in m)k.charCodeAt(0)===hi&&y.push({identifier:k,footnote:m[k].target});if(y.length&&b.push(c("footer",{key:"footer"},y.map(function(k){let P=k.identifier.charCodeAt(0)===hi?k.identifier.slice(1):k.identifier,E=Gx(k.footnote,{inline:!0,refs:m},f);return c("div",{id:n(P,wo),key:k.identifier},P+": ",g(E,{inline:!0,refs:m}))}))),r.wrapper===null)return b;let v=r.wrapper||(r.forceInline?"span":"div"),C;if(b.length>1||r.forceWrapper)C=b;else return b.length===1?b[0]:null;var S=r.wrapperProps?{...r.wrapperProps}:{};return S.children=C,Yx(v,S,"outer")}function Jx(e="",t={}){let r={...t||{}};r.overrides=r.overrides||{},r.slugify;let n=r.sanitizer||Vx;function o(s){let a=r.forceInline||!r.forceBlock&&!aJ.test(s),l={...r,slugify:r.slugify?m=>r.slugify(m,wo):wo,sanitizer:n,tagfilter:r.tagfilter!==!1},c=s;if(!a){let m=c.length;for(;m>0&&(c[m-1]===`
|
|
335
335
|
`||c[m-1]==="\r");)m--;c=c.slice(0,m),c=`${c.replace(YJ,"")}
|
|
336
336
|
|
|
337
|
-
`}if(r.optimizeForStreaming){var d=c.lastIndexOf("<");d!==-1&&c.indexOf(">",d)===-1&&(c=c.slice(0,d)),d=s.lastIndexOf("<"),d!==-1&&s.indexOf(">",d)===-1&&(s=s.slice(0,d))}let f=Gx(a?s:c,{inline:a,refs:i},l);return eX(f,{...l,forceInline:a})}let i={};return o(e)}var tX=({children:e,options:t,...r})=>{if(!(typeof Er.useContext<"u")){let s={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...r}};return Jx(e??"",s)}let n=Er.useContext(JJ),o=Er.useMemo(()=>({...n,...t,overrides:{...n?.overrides,...t?.overrides},wrapperProps:{...n?.wrapperProps,...t?.wrapperProps,...r}}),[n,t,r]),i=e??"";return Er.useMemo(()=>Jx(i,o),[i,o])},rX=tX;function nX(e,t){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:a,onPressChange:l,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:m,target:g,rel:b,type:y="button"}=e,v;r==="button"?v={type:y,disabled:n,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:v={role:"button",href:r==="a"&&!n?m:void 0,target:r==="a"?g:void 0,type:r==="input"?y:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?b:void 0};let{pressProps:C,isPressed:S}=EP({onPressStart:i,onPressEnd:s,onPressChange:l,onPress:o,onPressUp:a,onClick:f,isDisabled:n,preventFocusOnPress:c,ref:t}),{focusableProps:k}=fU(e,t);d&&(k.tabIndex=n?-1:k.tabIndex);let P=Ns(k,C,VW(e,{labelable:!0}));return{isPressed:S,buttonProps:Ns(v,P,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}const oX=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),iX=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function sX(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return oX.has(r.script)}let t=e.split("-")[0];return iX.has(t)}const e6=Symbol.for("react-aria.i18n.locale");function t6(){let e=typeof window<"u"&&window[e6]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:sX(e)?"rtl":"ltr"}}let Xx=t6(),Fc=new Set;function r6(){Xx=t6();for(let e of Fc)e(Xx)}function aX(){let e=oP(),[t,r]=x.useState(Xx);return x.useEffect(()=>(Fc.size===0&&window.addEventListener("languagechange",r6),Fc.add(r),()=>{Fc.delete(r),Fc.size===0&&window.removeEventListener("languagechange",r6)}),[]),e?{locale:typeof window<"u"&&window[e6]||"en-US",direction:"ltr"}:t}const lX=x.createContext(null);function n6(){let e=aX();return x.useContext(lX)||e}let Qx=new Map;function uX(e){let{locale:t}=n6(),r=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Qx.has(r))return Qx.get(r);let n=new Intl.Collator(t,e);return Qx.set(r,n),n}function cX(e,t,r){let{item:n,isDisabled:o}=e,i=n.key,s=t.selectionManager,a=x.useId(),l=x.useId(),c=t.disabledKeys.has(n.key)||o;x.useEffect(()=>{i===t.focusedKey&&document.activeElement!==r.current&&r.current&&up(r.current)},[r,i,t.focusedKey]);let d=x.useCallback(y=>{s.canSelectItem(i)&&(s.select(i,y),t.toggleKey(i))},[i,s]);const f=x.useCallback(y=>{s.selectionBehavior==="replace"&&s.extendSelection(y),s.setFocusedKey(y)},[s]),m=x.useCallback(y=>{const C={ArrowDown:()=>{const S=t.collection.getKeyAfter(i);if(S&&t.disabledKeys.has(S)){const k=t.collection.getKeyAfter(S);k&&f(k)}else S&&f(S)},ArrowUp:()=>{const S=t.collection.getKeyBefore(i);if(S&&t.disabledKeys.has(S)){const k=t.collection.getKeyBefore(S);k&&f(k)}else S&&f(S)},Home:()=>{const S=t.collection.getFirstKey();S&&f(S)},End:()=>{const S=t.collection.getLastKey();S&&f(S)}}[y.key];C&&(y.preventDefault(),s.canSelectItem(i)&&C(y))},[i,s]);let{buttonProps:g}=nX({id:a,elementType:"button",isDisabled:c,onKeyDown:m,onPress:d},r),b=t.selectionManager.isSelected(n.key);return{buttonProps:{...g,"aria-expanded":b,"aria-controls":b?l:void 0},regionProps:{id:l,role:"region","aria-labelledby":a}}}function o6(e){return lW()?e.altKey:e.ctrlKey}function rh(e,t){var r,n;let o=`[data-key="${CSS.escape(String(t))}"]`,i=(r=e.current)===null||r===void 0?void 0:r.dataset.collection;return i&&(o=`[data-collection="${CSS.escape(i)}"]${o}`),(n=e.current)===null||n===void 0?void 0:n.querySelector(o)}const dX=new WeakMap;function fX(e){let t=_W();return dX.set(e,t),t}const pX=1e3;function hX(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:n}=e,o=x.useRef({search:"",timeout:void 0}).current,i=s=>{let a=mX(s.key);if(!(!a||s.ctrlKey||s.metaKey||!Pt(s.currentTarget,Ze(s))||o.search.length===0&&a===" ")){if(a===" "&&o.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),o.search+=a,t.getKeyForSearch!=null){let l=t.getKeyForSearch(o.search,r.focusedKey);l==null&&(l=t.getKeyForSearch(o.search)),l!=null&&(r.setFocusedKey(l),n&&n(l))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},pX)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:void 0}}}function mX(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function gX(e){let{selectionManager:t,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:s=!1,disallowSelectAll:a=!1,escapeKeyBehavior:l="clearSelection",selectOnFocus:c=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:m=!1,scrollRef:g=n,linkBehavior:b="action"}=e,{direction:y}=n6(),v=gW(),C=j=>{if(j.altKey&&j.key==="Tab"&&j.preventDefault(),!n.current||!Pt(n.current,Ze(j)))return;const B=(le,ue)=>{if(le!=null){if(t.isLink(le)&&b==="selection"&&c&&!o6(j)){ds.flushSync(()=>{t.setFocusedKey(le,ue)});let te=rh(n,le),ge=t.getItemProps(le);te&&v.open(te,j,ge.href,ge.routerOptions);return}if(t.setFocusedKey(le,ue),t.isLink(le)&&b==="override")return;j.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&!o6(j)&&t.replaceSelection(le)}};switch(j.key){case"ArrowDown":if(r.getKeyBelow){var U,W,L;let le=t.focusedKey!=null?(U=r.getKeyBelow)===null||U===void 0?void 0:U.call(r,t.focusedKey):(W=r.getFirstKey)===null||W===void 0?void 0:W.call(r);le==null&&i&&(le=(L=r.getFirstKey)===null||L===void 0?void 0:L.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le))}break;case"ArrowUp":if(r.getKeyAbove){var Z,T,F;let le=t.focusedKey!=null?(Z=r.getKeyAbove)===null||Z===void 0?void 0:Z.call(r,t.focusedKey):(T=r.getLastKey)===null||T===void 0?void 0:T.call(r);le==null&&i&&(le=(F=r.getLastKey)===null||F===void 0?void 0:F.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le))}break;case"ArrowLeft":if(r.getKeyLeftOf){var _,H,Y;let le=t.focusedKey!=null?(_=r.getKeyLeftOf)===null||_===void 0?void 0:_.call(r,t.focusedKey):null;le==null&&i&&(le=y==="rtl"?(H=r.getFirstKey)===null||H===void 0?void 0:H.call(r,t.focusedKey):(Y=r.getLastKey)===null||Y===void 0?void 0:Y.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(r.getKeyRightOf){var X,oe,Q;let le=t.focusedKey!=null?(X=r.getKeyRightOf)===null||X===void 0?void 0:X.call(r,t.focusedKey):null;le==null&&i&&(le=y==="rtl"?(oe=r.getLastKey)===null||oe===void 0?void 0:oe.call(r,t.focusedKey):(Q=r.getFirstKey)===null||Q===void 0?void 0:Q.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le,y==="rtl"?"last":"first"))}break;case"Home":if(r.getFirstKey){if(t.focusedKey===null&&j.shiftKey)return;j.preventDefault();let le=r.getFirstKey(t.focusedKey,vc(j));t.setFocusedKey(le),le!=null&&(vc(j)&&j.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&t.replaceSelection(le))}break;case"End":if(r.getLastKey){if(t.focusedKey===null&&j.shiftKey)return;j.preventDefault();let le=r.getLastKey(t.focusedKey,vc(j));t.setFocusedKey(le),le!=null&&(vc(j)&&j.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&t.replaceSelection(le))}break;case"PageDown":if(r.getKeyPageBelow&&t.focusedKey!=null){let le=r.getKeyPageBelow(t.focusedKey);le!=null&&(j.preventDefault(),B(le))}break;case"PageUp":if(r.getKeyPageAbove&&t.focusedKey!=null){let le=r.getKeyPageAbove(t.focusedKey);le!=null&&(j.preventDefault(),B(le))}break;case"a":vc(j)&&t.selectionMode==="multiple"&&a!==!0&&(j.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(j.stopPropagation(),j.preventDefault(),t.clearSelection());break;case"Tab":if(!m){if(j.shiftKey)n.current.focus();else{let le=bU(n.current,{tabbable:!0}),ue,te;do te=le.lastChild(),te&&(ue=te);while(te);let ge=Bo();ue&&(!sP(ue)||ge&&!gP(ge))&&_s(ue)}break}}},S=x.useRef({top:0,left:0});np(g,"scroll",()=>{var j,B,U,W;S.current={top:(U=(j=g.current)===null||j===void 0?void 0:j.scrollTop)!==null&&U!==void 0?U:0,left:(W=(B=g.current)===null||B===void 0?void 0:B.scrollLeft)!==null&&W!==void 0?W:0}});let k=j=>{if(t.isFocused){Pt(j.currentTarget,Ze(j))||t.setFocused(!1);return}if(Pt(j.currentTarget,Ze(j))){if(t.setFocused(!0),t.focusedKey==null){var B,U;let Z=F=>{F!=null&&(t.setFocusedKey(F),c&&!t.isSelected(F)&&t.replaceSelection(F))},T=j.relatedTarget;var W,L;T&&j.currentTarget.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?Z((W=t.lastSelectedKey)!==null&&W!==void 0?W:(B=r.getLastKey)===null||B===void 0?void 0:B.call(r)):Z((L=t.firstSelectedKey)!==null&&L!==void 0?L:(U=r.getFirstKey)===null||U===void 0?void 0:U.call(r))}else g.current&&(g.current.scrollTop=S.current.top,g.current.scrollLeft=S.current.left);if(t.focusedKey!=null&&g.current){let Z=rh(n,t.focusedKey);Z instanceof HTMLElement&&(!sP(Z)&&!f&&_s(Z),mv()==="keyboard"&&hP(Z,{containingElement:n.current}))}}},P=j=>{Pt(j.currentTarget,j.relatedTarget)||t.setFocused(!1)},E=x.useRef(!1);np(n,sW,f?j=>{let{detail:B}=j;j.stopPropagation(),t.setFocused(!0),B?.focusStrategy==="first"&&(E.current=!0)}:void 0),dP(()=>{if(E.current){var j,B;let U=(B=(j=r.getFirstKey)===null||j===void 0?void 0:j.call(r))!==null&&B!==void 0?B:null;if(U==null){let W=Bo();vU(n.current),VP(W,null),t.collection.size>0&&(E.current=!1)}else t.setFocusedKey(U),E.current=!1}},[t.collection]),dP(()=>{t.collection.size>0&&(E.current=!1)},[t.focusedKey]),np(n,iW,f?j=>{var B;j.stopPropagation(),t.setFocused(!1),!((B=j.detail)===null||B===void 0)&&B.clearFocusKey&&t.setFocusedKey(null)}:void 0);const $=x.useRef(o),O=x.useRef(!1);x.useEffect(()=>{if($.current){var j,B;let L=null;var U;o==="first"&&(L=(U=(j=r.getFirstKey)===null||j===void 0?void 0:j.call(r))!==null&&U!==void 0?U:null);var W;o==="last"&&(L=(W=(B=r.getLastKey)===null||B===void 0?void 0:B.call(r))!==null&&W!==void 0?W:null);let Z=t.selectedKeys;if(Z.size){for(let T of Z)if(t.canSelectItem(T)){L=T;break}}t.setFocused(!0),t.setFocusedKey(L),L==null&&!f&&n.current&&up(n.current),t.collection.size>0&&($.current=!1,O.current=!0)}});let N=x.useRef(t.focusedKey),D=x.useRef(null);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==N.current||O.current)&&g.current&&n.current){let j=mv(),B=rh(n,t.focusedKey);if(!(B instanceof HTMLElement))return;(j==="keyboard"||O.current)&&(D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame(()=>{g.current&&(tv(g.current,B),j!=="virtual"&&hP(B,{containingElement:n.current}))}))}!f&&t.isFocused&&t.focusedKey==null&&N.current!=null&&n.current&&up(n.current),N.current=t.focusedKey,O.current=!1}),x.useEffect(()=>()=>{D.current&&cancelAnimationFrame(D.current)},[]),np(n,"react-aria-focus-scope-restore",j=>{j.preventDefault(),t.setFocused(!0)});let M={onKeyDown:C,onFocus:k,onBlur:P,onMouseDown(j){g.current===Ze(j)&&j.preventDefault()}},{typeSelectProps:V}=hX({keyboardDelegate:r,selectionManager:t});d||(M=Ns(V,M));let R;f||(R=t.focusedKey==null?0:-1);let K=fX(t.collection);return{collectionProps:Ns(M,{tabIndex:R,"data-collection":K})}}class i6{getItemRect(t){let r=this.ref.current;if(!r)return null;let n=t!=null?rh(this.ref,t):null;if(!n)return null;let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left-r.clientLeft+r.scrollLeft,y:i.top-o.top-r.clientTop+r.scrollTop,width:i.width,height:i.height}}getContentSize(){let t=this.ref.current;var r,n;return{width:(r=t?.scrollWidth)!==null&&r!==void 0?r:0,height:(n=t?.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let t=this.ref.current;var r,n,o,i;return{x:(r=t?.scrollLeft)!==null&&r!==void 0?r:0,y:(n=t?.scrollTop)!==null&&n!==void 0?n:0,width:(o=t?.clientWidth)!==null&&o!==void 0?o:0,height:(i=t?.clientHeight)!==null&&i!==void 0?i:0}}constructor(t){this.ref=t}}class bX{isDisabled(t){var r;return this.disabledBehavior==="all"&&(((r=t.props)===null||r===void 0?void 0:r.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,r){let n=t;for(;n!=null;){let o=this.collection.getItem(n);if(o?.type==="item"&&!this.isDisabled(o))return n;n=r(n)}return null}getNextKey(t){let r=t;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,n=>this.collection.getKeyAfter(n))}getPreviousKey(t){let r=t;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,n=>this.collection.getKeyBefore(n))}findKey(t,r,n){let o=t,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let s=i;do{if(o=r(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(s,i)&&o!=null);return o}isSameRow(t,r){return t.y===r.y||t.x!==r.x}isSameColumn(t,r){return t.x===r.x||t.y!==r.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,r=>this.getNextKey(r),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,r=>this.getPreviousKey(r),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,r){return r?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(t=this.layoutDelegate[r](t),this.findNextNonDisabled(t,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(t=this.layoutDelegate[r](t),this.findNextNonDisabled(t,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,r=>this.collection.getKeyAfter(r))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,r=>this.collection.getKeyBefore(r))}getKeyPageAbove(t){let r=this.ref.current,n=this.layoutDelegate.getItemRect(t);if(!n)return null;if(r&&!ev(r))return this.getFirstKey();let o=t;if(this.orientation==="horizontal"){let i=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(t){let r=this.ref.current,n=this.layoutDelegate.getItemRect(t);if(!n)return null;if(r&&!ev(r))return this.getLastKey();let o=t;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(t,r){if(!this.collator)return null;let n=this.collection,o=r||this.getFirstKey();for(;o!=null;){let i=n.getItem(o);if(!i)return null;let s=i.textValue.slice(0,t.length);if(i.textValue&&this.collator.compare(s,t)===0)return o;o=this.getNextKey(o)}return null}constructor(...t){if(t.length===1){let r=t[0];this.collection=r.collection,this.ref=r.ref,this.collator=r.collator,this.disabledKeys=r.disabledKeys||new Set,this.disabledBehavior=r.disabledBehavior||"all",this.orientation=r.orientation||"vertical",this.direction=r.direction,this.layout=r.layout||"stack",this.layoutDelegate=r.layoutDelegate||new i6(r.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new i6(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function vX(e){let{selectionManager:t,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:s}=e,a=uX({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,c=x.useMemo(()=>i||new bX({collection:r,disabledKeys:n,disabledBehavior:l,ref:o,collator:a,layoutDelegate:s}),[i,s,r,n,o,a,l]),{collectionProps:d}=gX({...e,ref:o,selectionManager:t,keyboardDelegate:c});return{listProps:d}}function yX(e,t,r){let{listProps:n}=vX({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:r});return delete n.onKeyDownCapture,{accordionProps:{...n,tabIndex:void 0}}}function xX(e){var t,r;const n=ur(),{ref:o,as:i,item:s,onFocusChange:a}=e,{state:l,className:c,indicator:d,children:f,title:m,subtitle:g,startContent:b,motionProps:y,focusedKey:v,variant:C,isCompact:S=!1,classNames:k={},isDisabled:P=!1,hideIndicator:E=!1,disableAnimation:$=(t=n?.disableAnimation)!=null?t:!1,keepContentMounted:O=!1,disableIndicatorAnimation:N=!1,HeadingComponent:D=i||"h2",onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:j,onClick:B,...U}=e,W=i||"div",L=typeof W=="string",Z=ot(o),T=l.disabledKeys.has(s.key)||P,F=l.selectionManager.isSelected(s.key),{buttonProps:_,regionProps:H}=cX({item:s,isDisabled:T},{...l,focusedKey:v},Z),{onFocus:Y,onBlur:X,...oe}=_,{isFocused:Q,isFocusVisible:le,focusProps:ue}=KP({autoFocus:(r=s.props)==null?void 0:r.autoFocus}),{isHovered:te,hoverProps:ge}=FP({isDisabled:T}),{pressProps:Se,isPressed:pe}=EP({ref:Z,isDisabled:T,onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:j}),we=x.useCallback(()=>{a?.(!0,s.key)},[]),be=x.useCallback(()=>{a?.(!1,s.key)},[]),re=x.useMemo(()=>({...k}),[jr(k)]),ke=x.useMemo(()=>nj({isCompact:S,isDisabled:T,hideIndicator:E,disableAnimation:$,disableIndicatorAnimation:N,variant:C}),[S,T,E,$,N,C]),Ne=A(re?.base,c),Me=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"base",className:ke.base({class:Ne}),...Oe(Lt(U,{enabled:L}),lt)}),[Ne,L,U,ke,s.props,F,T]),Pe=(lt={})=>{var Ut,ut;return{ref:Z,"data-open":ae(F),"data-focus":ae(Q),"data-focus-visible":ae(le),"data-disabled":ae(T),"data-hover":ae(te),"data-pressed":ae(pe),"data-slot":"trigger",className:ke.trigger({class:re?.trigger}),onFocus:i4(we,Y,ue.onFocus,U.onFocus,(Ut=s.props)==null?void 0:Ut.onFocus),onBlur:i4(be,X,ue.onBlur,U.onBlur,(ut=s.props)==null?void 0:ut.onBlur),...Oe(oe,ge,Se,lt,{onClick:co(Se.onClick,B)})}},Ae=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"content",className:ke.content({class:re?.content}),...Oe(H,lt)}),[ke,re,H,F,T,re?.content]),xe=x.useCallback((lt={})=>({"aria-hidden":ae(!0),"data-open":ae(F),"data-disabled":ae(T),"data-slot":"indicator",className:ke.indicator({class:re?.indicator}),...lt}),[ke,re?.indicator,F,T,re?.indicator]),Ie=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"heading",className:ke.heading({class:re?.heading}),...lt}),[ke,re?.heading,F,T,re?.heading]),et=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"title",className:ke.title({class:re?.title}),...lt}),[ke,re?.title,F,T,re?.title]),wt=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"subtitle",className:ke.subtitle({class:re?.subtitle}),...lt}),[ke,re,F,T,re?.subtitle]);return{Component:W,HeadingComponent:D,item:s,slots:ke,classNames:re,domRef:Z,indicator:d,children:f,title:m,subtitle:g,startContent:b,isOpen:F,isDisabled:T,hideIndicator:E,keepContentMounted:O,disableAnimation:$,motionProps:y,getBaseProps:Me,getHeadingProps:Ie,getButtonProps:Pe,getContentProps:Ae,getIndicatorProps:xe,getTitleProps:et,getSubtitleProps:wt}}var s6={collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},a6=()=>Promise.resolve().then(()=>nd).then(e=>e.default),l6=Xe((e,t)=>{const{Component:r,HeadingComponent:n,classNames:o,slots:i,indicator:s,children:a,title:l,subtitle:c,startContent:d,isOpen:f,isDisabled:m,hideIndicator:g,keepContentMounted:b,disableAnimation:y,motionProps:v,getBaseProps:C,getHeadingProps:S,getButtonProps:k,getTitleProps:P,getSubtitleProps:E,getContentProps:$,getIndicatorProps:O}=xX({...e,ref:t}),N=iR(),M=x.useMemo(()=>typeof s=="function"?s({indicator:h.jsx(lE,{}),isOpen:f,isDisabled:m}):s||null,[s,f,m])||h.jsx(lE,{}),V=x.useMemo(()=>{if(y)return b?h.jsx("div",{...$(),children:a}):f&&h.jsx("div",{...$(),children:a});const R={exit:{...s6.collapse.exit,overflowY:"hidden"},enter:{...s6.collapse.enter,overflowY:"unset"}};return b?h.jsx(Ps,{features:a6,children:h.jsx(Es.section,{animate:f?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...$(),children:a})},"accordion-content")}):h.jsx(lc,{initial:!1,children:f&&h.jsx(Ps,{features:a6,children:h.jsx(Es.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...$(),children:a})},"accordion-content")})})},[f,y,b,a,v]);return h.jsxs(r,{...C(),children:[h.jsx(n,{...S(),children:h.jsxs("button",{...k(),children:[d&&h.jsx("div",{className:i.startContent({class:o?.startContent}),children:d}),h.jsxs("div",{className:i.titleWrapper({class:o?.titleWrapper}),children:[l&&h.jsx("span",{...P(),children:l}),c&&h.jsx("span",{...E(),children:c})]}),!g&&M&&h.jsx("span",{...O(),children:M})]})}),V]})});l6.displayName="HeroUI.AccordionItem";var wX=l6;class CX{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}constructor(t,{expandedKeys:r}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,r=r||new Set;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||r.has(a.key)))for(let l of a.childNodes)n(l)};for(let a of t)n(a);let o=null,i=0;for(let[a,l]of this.keyMap)o?(o.nextKey=a,l.prevKey=o.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=i++),o=l,o.nextKey=void 0;var s;this.lastKey=(s=o?.key)!==null&&s!==void 0?s:null}}class Zo extends Set{constructor(t,r,n){super(t),t instanceof Zo?(this.anchorKey=r??t.anchorKey,this.currentKey=n??t.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}const SX=typeof document<"u"?x.useInsertionEffect??x.useLayoutEffect:()=>{};function kX(e,t,r){let[n,o]=x.useState(e||t),i=x.useRef(n),s=x.useRef(e!==void 0),a=e!==void 0;x.useEffect(()=>{let f=s.current;f!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),s.current=a},[a]);let l=a?e:n;SX(()=>{i.current=l});let[,c]=x.useReducer(()=>({}),{}),d=x.useCallback((f,...m)=>{let g=typeof f=="function"?f(i.current):f;Object.is(i.current,g)||(i.current=g,o(g),c(),r?.(g,...m))},[r]);return[l,d]}function PX(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function EX(e){let{selectionMode:t="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=e,s=x.useRef(!1),[,a]=x.useState(!1),l=x.useRef(null),c=x.useRef(null),[,d]=x.useState(null),f=x.useMemo(()=>u6(e.selectedKeys),[e.selectedKeys]),m=x.useMemo(()=>u6(e.defaultSelectedKeys,new Zo),[e.defaultSelectedKeys]),[g,b]=kX(f,m,e.onSelectionChange),y=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[v,C]=x.useState(o);o==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&C("replace");let S=x.useRef(o);return x.useEffect(()=>{o!==S.current&&(C(o),S.current=o)},[o]),{selectionMode:t,disallowEmptySelection:r,selectionBehavior:v,setSelectionBehavior:C,get isFocused(){return s.current},setFocused(k){s.current=k,a(k)},get focusedKey(){return l.current},get childFocusStrategy(){return c.current},setFocusedKey(k,P="first"){l.current=k,c.current=P,d(k)},selectedKeys:g,setSelectedKeys(k){(n||!PX(k,g))&&b(k)},disabledKeys:y,disabledBehavior:i}}function u6(e,t){return e?e==="all"?"all":new Zo(e):t}function TX(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function AX(e){return _X(e)}function _X(e,t){for(let r of e)return r}function e1(e,t,r){if(t.parentKey===r.parentKey)return t.index-r.index;let n=[...c6(e,t),t],o=[...c6(e,r),r],i=n.slice(0,o.length).findIndex((s,a)=>s!==o[a]);return i!==-1?(t=n[i],r=o[i],t.index-r.index):n.findIndex(s=>s===r)>=0?1:(o.findIndex(s=>s===t)>=0,-1)}function c6(e,t){let r=[],n=t;for(;n?.parentKey!=null;)n=e.getItem(n.parentKey),n&&r.unshift(n);return r}class t1{constructor(t,r,n){this.collection=t,this.state=r,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,r){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let r=this.getKey(t);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),r=this.state.selectedKeys;return this._isSelectAll=t.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!t||n&&e1(this.collection,n,t)<0)&&(t=n)}return t?.key??null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!t||n&&e1(this.collection,n,t)>0)&&(t=n)}return t?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let r=this.getKey(t);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new Zo([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new Zo(o,i,r);for(let s of this.getKeyRange(i,o.currentKey??r))n.delete(s);for(let s of this.getKeyRange(r,i))this.canSelectItem(s)&&n.add(s)}this.state.setSelectedKeys(n)}getKeyRange(t,r){let n=this.collection.getItem(t),o=this.collection.getItem(r);return n&&o?e1(this.collection,n,o)<=0?this.getKeyRangeInternal(t,r):this.getKeyRangeInternal(r,t):[]}getKeyRangeInternal(t,r){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(t,r);let n=[],o=t;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&n.push(o),o===r)return n;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let r=this.collection.getItem(t);if(!r||r.type==="cell"&&this.allowsCellSelection)return t;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let r=this.getKey(t);if(r==null)return;let n=new Zo(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none")return;let r=this.getKey(t);if(r==null)return;let n=this.canSelectItem(r)?new Zo([r],r,r):new Zo;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let r=new Zo;for(let n of t){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let t=this.fullCollection??this.collection,r=[],n=o=>{for(;o!=null;){if(this.canSelectItemIn(o,t)){let i=t.getItem(o);i?.type==="item"&&r.push(o),i?.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(AX(TX(i,t))?.key??null)}o=t.getKeyAfter(o)}};return n(t.getFirstKey()),r}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Zo)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(t.size!==r.size)return!1;for(let n of t)if(!r.has(n))return!1;for(let n of r)if(!t.has(n))return!1;return!0}canSelectItem(t){return this.canSelectItemIn(t,this.collection)}canSelectItemIn(t,r){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let n=r.getItem(t);return!(!n||n?.props?.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!this.collection.getItem(t)?.props?.isDisabled)}isLink(t){return!!this.collection.getItem(t)?.props?.href}getItemProps(t){return this.collection.getItem(t)?.props}withCollection(t){return new t1(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class $X{build(t,r){return this.context=r,d6(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:r,items:n}=t;if(x.isValidElement(r)&&r.type===x.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];x.Children.forEach(r,s=>{s&&o.push(s)});let i=0;for(let s of o){let a=this.getFullNode({element:s,index:i},{});for(let l of a)i++,yield l}}}getKey(t,r,n,o){if(t.key!=null)return t.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){let s=i.key??i.id;if(s==null)throw new Error("No key found for item");return s}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(t,r){return{renderer:r.renderer||t.renderer}}*getFullNode(t,r,n,o){if(x.isValidElement(t.element)&&t.element.type===x.Fragment){let l=[];x.Children.forEach(t.element.props.children,d=>{l.push(d)});let c=t.index??0;for(const d of l)yield*this.getFullNode({element:d,index:c++},r,n,o);return}let i=t.element;if(!i&&t.value&&r&&r.renderer){let l=this.cache.get(t.value);if(l&&(!l.shouldInvalidate||!l.shouldInvalidate(this.context))){l.index=t.index,l.parentKey=o?o.key:null,yield l;return}i=r.renderer(t.value)}if(x.isValidElement(i)){let l=i.type;if(typeof l!="function"&&typeof l.getCollectionNode!="function"){let m=i.type;throw new Error(`Unknown element <${m}> in collection.`)}let c=l.getCollectionNode(i.props,this.context),d=t.index??0,f=c.next();for(;!f.done&&f.value;){let m=f.value;t.index=d;let g=m.key??null;g==null&&(g=m.element?null:this.getKey(i,t,r,n));let y=[...this.getFullNode({...m,key:g,index:d,wrapper:IX(t.wrapper,m.wrapper)},this.getChildState(r,m),n?`${n}${i.key}`:i.key,o)];for(let v of y){if(v.value=m.value??t.value??null,v.value&&this.cache.set(v.value,v),t.type&&v.type!==t.type)throw new Error(`Unsupported type <${r1(v.type)}> in <${r1(o?.type??"unknown parent type")}>. Only <${r1(t.type)}> is supported.`);d++,yield v}f=c.next(y)}return}if(t.key==null||t.type==null)return;let s=this,a={type:t.type,props:t.props,key:t.key,parentKey:o?o.key:null,value:t.value??null,level:(o?.level??0)+(o?.type==="item"?1:0),index:t.index,rendered:t.rendered,textValue:t.textValue??"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:d6(function*(){if(!t.hasChildNodes||!t.childNodes)return;let l=0;for(let c of t.childNodes()){c.key!=null&&(c.key=`${a.key}${c.key}`);let d=s.getFullNode({...c,index:l},s.getChildState(r,c),a.key,a);for(let f of d)l++,yield f}})};yield a}constructor(){this.cache=new WeakMap}}function d6(e){let t=[],r=null;return{*[Symbol.iterator](){for(let n of t)yield n;r||(r=e());for(let n of r)t.push(n),yield n}}}function IX(e,t){if(e&&t)return r=>e(t(r));if(e)return e;if(t)return t}function r1(e){return e[0].toUpperCase()+e.slice(1)}function NX(e,t,r){let n=x.useMemo(()=>new $X,[]),{children:o,items:i,collection:s}=e;return x.useMemo(()=>{if(s)return s;let l=n.build({children:o,items:i},r);return t(l)},[n,o,i,s,r,t])}function DX(e){let{onExpandedChange:t}=e,[r,n]=jo(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),o=EX(e),i=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=NX(e,x.useCallback(l=>new CX(l,{expandedKeys:r}),[r]),null);return x.useEffect(()=>{o.focusedKey!=null&&!s.getItem(o.focusedKey)&&o.setFocusedKey(null)},[s,o.focusedKey]),{collection:s,expandedKeys:r,disabledKeys:i,toggleKey:l=>{n(MX(r,l))},setExpandedKeys:n,selectionManager:new t1(s,o)}}function MX(e,t){let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function OX(e){var t;const r=ur(),{ref:n,as:o,className:i,items:s,variant:a,motionProps:l,expandedKeys:c,disabledKeys:d,selectedKeys:f,children:m,defaultExpandedKeys:g,selectionMode:b="single",selectionBehavior:y="toggle",keepContentMounted:v=!1,disallowEmptySelection:C,defaultSelectedKeys:S,onExpandedChange:k,onSelectionChange:P,dividerProps:E={},isCompact:$=!1,isDisabled:O=!1,showDivider:N=!0,hideIndicator:D=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:V=!1,itemClasses:R,...K}=e,[j,B]=x.useState(null),U=o||"div",W=typeof U=="string",L=ot(n),Z=x.useMemo(()=>rj({variant:a,className:i}),[a,i]),F={children:x.useMemo(()=>{let ue=[];return x.Children.map(m,te=>{var ge;if(x.isValidElement(te)&&typeof((ge=te.props)==null?void 0:ge.children)!="string"){const Se=x.cloneElement(te,{hasChildItems:!1});ue.push(Se)}else ue.push(te)}),ue},[m]),items:s},_={expandedKeys:c,defaultExpandedKeys:g,onExpandedChange:k},H={disabledKeys:d,selectedKeys:f,selectionMode:b,selectionBehavior:y,disallowEmptySelection:C,defaultSelectedKeys:S??g,onSelectionChange:P,...F,..._},Y=DX(H);Y.selectionManager.setFocusedKey=ue=>{B(ue)};const{accordionProps:X}=yX({...F,..._},Y,L),oe=x.useMemo(()=>({state:Y,focusedKey:j,motionProps:l,isCompact:$,isDisabled:O,hideIndicator:D,disableAnimation:M,keepContentMounted:v,disableIndicatorAnimation:V}),[j,$,O,D,f,M,v,Y?.expandedKeys.values,V,Y.expandedKeys.size,Y.disabledKeys.size,Y.collection,l]),Q=x.useCallback((ue={})=>({ref:L,className:Z,"data-orientation":"vertical",...Oe(X,Lt(K,{enabled:W}),ue)}),[]),le=x.useCallback((ue,te)=>{ue&&B(te)},[]);return{Component:U,values:oe,state:Y,focusedKey:j,getBaseProps:Q,isSplitted:a==="splitted",classNames:Z,showDivider:N,dividerProps:E,disableAnimation:M,handleFocusChanged:le,itemClasses:R}}function jX(e){let t=Lt(e,{enabled:typeof e.elementType=="string"}),r;return e.orientation==="vertical"&&(r="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":r}}:{separatorProps:t}}function LX(e){const{as:t,className:r,orientation:n,...o}=e;let i=t||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:s}=jX({elementType:typeof i=="string"?i:"hr",orientation:n}),a=x.useMemo(()=>e4({orientation:n,className:r}),[n,r]),l=x.useCallback((c={})=>({className:a,role:"separator","data-orientation":n,...s,...o,...c}),[a,n,s,o]);return{Component:i,getDividerProps:l}}function FX(e){return x.forwardRef(e)}var f6=FX((e,t)=>{const{Component:r,getDividerProps:n}=LX({...e});return h.jsx(r,{ref:t,...n()})});f6.displayName="HeroUI.Divider";var BX=f6,p6=Xe((e,t)=>{const{Component:r,values:n,state:o,isSplitted:i,showDivider:s,getBaseProps:a,disableAnimation:l,handleFocusChanged:c,itemClasses:d,dividerProps:f}=OX({...e,ref:t}),m=x.useCallback((b,y)=>c(b,y),[c]),g=x.useMemo(()=>[...o.collection].map((b,y)=>{const v={...d,...b.props.classNames||{}};return h.jsxs(x.Fragment,{children:[h.jsx(wX,{item:b,variant:e.variant,onFocusChange:m,...n,...b.props,classNames:v}),!b.props.hidden&&!i&&s&&y<o.collection.size-1&&h.jsx(BX,{...f})]},b.key)}),[n,d,m,i,s,o.collection]);return h.jsx(r,{...a(),children:l?g:h.jsx(mV,{children:g})})});p6.displayName="HeroUI.Accordion";var zX=p6;function h6(e){return null}h6.getCollectionNode=function*(t,r){let{childItems:n,title:o,children:i}=t,s=t.title||t.children,a=t.textValue||(typeof s=="string"?s:"")||t["aria-label"]||"";!a&&!r?.suppressTextValueWarning&&process.env.NODE_ENV!=="production"&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:t,rendered:s,textValue:a,"aria-label":t["aria-label"],hasChildNodes:KX(t),*childNodes(){if(n)for(let l of n)yield{type:"item",value:l};else if(o){let l=[];x.Children.forEach(i,c=>{l.push({type:"item",element:c})}),yield*l}}}};function KX(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&x.Children.count(e.children)>0)}var VX=h6,RX=VX;function WX({title:e,children:t}){return h.jsxs("div",{children:[e&&h.jsx("h2",{className:"text-2xl font-bold mb-2 text-foreground",children:e}),h.jsx(zX,{className:"px-0",children:x.Children.map(t,r=>{if(!x.isValidElement(r))return null;const{props:n}=r;return h.jsx(RX,{title:n.title,"aria-label":n.title,children:n.children},n.title)})??null})]})}function UX({children:e,styleType:t="checkMark"}){return h.jsxs("div",{className:"flex flex-row items-center gap-1",children:[t==="checkMark"&&h.jsx(ug,{size:20,className:"shrink-0 stroke-success-600"}),e]})}function m6({children:e}){const[t,r]=Fn();return h.jsx("div",{className:"prose prose-sm max-w-none text-foreground",children:h.jsx(rX,{options:{overrides:{h1:{props:{class:"text-3xl font-bold mb-2 text-foreground"}},h2:{props:{class:"text-2xl font-bold mb-2 text-foreground"}},h3:{props:{class:"text-xl font-bold text-foreground"}},h4:{props:{class:"text-lg font-bold text-foreground"}},a:{props:{class:"text-primary-600 hover:underline cursor-pointer",target:"_blank"}},p:{props:{class:"mt-2 mb-4"}},ul:{props:{class:"list-disc pl-4 ml-2"}},ol:{props:{class:"list-decimal pl-4 ml-2"}},table:{props:{class:"mb-4"}},th:{props:{class:"text-left"}},td:{props:{class:"py-1 pr-4"}},img:({src:n,width:o,height:i,...s})=>h.jsx(Ar,{...s,src:t(n,o,i),srcSet:r(n,o,i),width:o,height:i}),ListItem:UX,Faq:WX}},children:e})})}const HX=dt`
|
|
337
|
+
`}if(r.optimizeForStreaming){var d=c.lastIndexOf("<");d!==-1&&c.indexOf(">",d)===-1&&(c=c.slice(0,d)),d=s.lastIndexOf("<"),d!==-1&&s.indexOf(">",d)===-1&&(s=s.slice(0,d))}let f=Gx(a?s:c,{inline:a,refs:i},l);return eX(f,{...l,forceInline:a})}let i={};return o(e)}var tX=({children:e,options:t,...r})=>{if(!(typeof Er.useContext<"u")){let s={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...r}};return Jx(e??"",s)}let n=Er.useContext(JJ),o=Er.useMemo(()=>({...n,...t,overrides:{...n?.overrides,...t?.overrides},wrapperProps:{...n?.wrapperProps,...t?.wrapperProps,...r}}),[n,t,r]),i=e??"";return Er.useMemo(()=>Jx(i,o),[i,o])},rX=tX;function nX(e,t){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:a,onPressChange:l,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:m,target:g,rel:b,type:y="button"}=e,v;r==="button"?v={type:y,disabled:n,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:v={role:"button",href:r==="a"&&!n?m:void 0,target:r==="a"?g:void 0,type:r==="input"?y:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?b:void 0};let{pressProps:C,isPressed:S}=EP({onPressStart:i,onPressEnd:s,onPressChange:l,onPress:o,onPressUp:a,onClick:f,isDisabled:n,preventFocusOnPress:c,ref:t}),{focusableProps:k}=fU(e,t);d&&(k.tabIndex=n?-1:k.tabIndex);let P=Ns(k,C,VW(e,{labelable:!0}));return{isPressed:S,buttonProps:Ns(v,P,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}const oX=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),iX=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function sX(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return oX.has(r.script)}let t=e.split("-")[0];return iX.has(t)}const e6=Symbol.for("react-aria.i18n.locale");function t6(){let e=typeof window<"u"&&window[e6]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:sX(e)?"rtl":"ltr"}}let Xx=t6(),Fc=new Set;function r6(){Xx=t6();for(let e of Fc)e(Xx)}function aX(){let e=oP(),[t,r]=x.useState(Xx);return x.useEffect(()=>(Fc.size===0&&window.addEventListener("languagechange",r6),Fc.add(r),()=>{Fc.delete(r),Fc.size===0&&window.removeEventListener("languagechange",r6)}),[]),e?{locale:typeof window<"u"&&window[e6]||"en-US",direction:"ltr"}:t}const lX=x.createContext(null);function n6(){let e=aX();return x.useContext(lX)||e}let Qx=new Map;function uX(e){let{locale:t}=n6(),r=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Qx.has(r))return Qx.get(r);let n=new Intl.Collator(t,e);return Qx.set(r,n),n}function cX(e,t,r){let{item:n,isDisabled:o}=e,i=n.key,s=t.selectionManager,a=x.useId(),l=x.useId(),c=t.disabledKeys.has(n.key)||o;x.useEffect(()=>{i===t.focusedKey&&document.activeElement!==r.current&&r.current&&up(r.current)},[r,i,t.focusedKey]);let d=x.useCallback(y=>{s.canSelectItem(i)&&(s.select(i,y),t.toggleKey(i))},[i,s]);const f=x.useCallback(y=>{s.selectionBehavior==="replace"&&s.extendSelection(y),s.setFocusedKey(y)},[s]),m=x.useCallback(y=>{const C={ArrowDown:()=>{const S=t.collection.getKeyAfter(i);if(S&&t.disabledKeys.has(S)){const k=t.collection.getKeyAfter(S);k&&f(k)}else S&&f(S)},ArrowUp:()=>{const S=t.collection.getKeyBefore(i);if(S&&t.disabledKeys.has(S)){const k=t.collection.getKeyBefore(S);k&&f(k)}else S&&f(S)},Home:()=>{const S=t.collection.getFirstKey();S&&f(S)},End:()=>{const S=t.collection.getLastKey();S&&f(S)}}[y.key];C&&(y.preventDefault(),s.canSelectItem(i)&&C(y))},[i,s]);let{buttonProps:g}=nX({id:a,elementType:"button",isDisabled:c,onKeyDown:m,onPress:d},r),b=t.selectionManager.isSelected(n.key);return{buttonProps:{...g,"aria-expanded":b,"aria-controls":b?l:void 0},regionProps:{id:l,role:"region","aria-labelledby":a}}}function o6(e){return lW()?e.altKey:e.ctrlKey}function rh(e,t){var r,n;let o=`[data-key="${CSS.escape(String(t))}"]`,i=(r=e.current)===null||r===void 0?void 0:r.dataset.collection;return i&&(o=`[data-collection="${CSS.escape(i)}"]${o}`),(n=e.current)===null||n===void 0?void 0:n.querySelector(o)}const dX=new WeakMap;function fX(e){let t=_W();return dX.set(e,t),t}const pX=1e3;function hX(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:n}=e,o=x.useRef({search:"",timeout:void 0}).current,i=s=>{let a=mX(s.key);if(!(!a||s.ctrlKey||s.metaKey||!Pt(s.currentTarget,Ze(s))||o.search.length===0&&a===" ")){if(a===" "&&o.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),o.search+=a,t.getKeyForSearch!=null){let l=t.getKeyForSearch(o.search,r.focusedKey);l==null&&(l=t.getKeyForSearch(o.search)),l!=null&&(r.setFocusedKey(l),n&&n(l))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},pX)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:void 0}}}function mX(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function gX(e){let{selectionManager:t,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:s=!1,disallowSelectAll:a=!1,escapeKeyBehavior:l="clearSelection",selectOnFocus:c=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:m=!1,scrollRef:g=n,linkBehavior:b="action"}=e,{direction:y}=n6(),v=gW(),C=j=>{if(j.altKey&&j.key==="Tab"&&j.preventDefault(),!n.current||!Pt(n.current,Ze(j)))return;const B=(le,ue)=>{if(le!=null){if(t.isLink(le)&&b==="selection"&&c&&!o6(j)){ds.flushSync(()=>{t.setFocusedKey(le,ue)});let te=rh(n,le),ge=t.getItemProps(le);te&&v.open(te,j,ge.href,ge.routerOptions);return}if(t.setFocusedKey(le,ue),t.isLink(le)&&b==="override")return;j.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&!o6(j)&&t.replaceSelection(le)}};switch(j.key){case"ArrowDown":if(r.getKeyBelow){var U,W,L;let le=t.focusedKey!=null?(U=r.getKeyBelow)===null||U===void 0?void 0:U.call(r,t.focusedKey):(W=r.getFirstKey)===null||W===void 0?void 0:W.call(r);le==null&&i&&(le=(L=r.getFirstKey)===null||L===void 0?void 0:L.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le))}break;case"ArrowUp":if(r.getKeyAbove){var Z,T,F;let le=t.focusedKey!=null?(Z=r.getKeyAbove)===null||Z===void 0?void 0:Z.call(r,t.focusedKey):(T=r.getLastKey)===null||T===void 0?void 0:T.call(r);le==null&&i&&(le=(F=r.getLastKey)===null||F===void 0?void 0:F.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le))}break;case"ArrowLeft":if(r.getKeyLeftOf){var _,H,Y;let le=t.focusedKey!=null?(_=r.getKeyLeftOf)===null||_===void 0?void 0:_.call(r,t.focusedKey):null;le==null&&i&&(le=y==="rtl"?(H=r.getFirstKey)===null||H===void 0?void 0:H.call(r,t.focusedKey):(Y=r.getLastKey)===null||Y===void 0?void 0:Y.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(r.getKeyRightOf){var X,oe,Q;let le=t.focusedKey!=null?(X=r.getKeyRightOf)===null||X===void 0?void 0:X.call(r,t.focusedKey):null;le==null&&i&&(le=y==="rtl"?(oe=r.getLastKey)===null||oe===void 0?void 0:oe.call(r,t.focusedKey):(Q=r.getFirstKey)===null||Q===void 0?void 0:Q.call(r,t.focusedKey)),le!=null&&(j.preventDefault(),B(le,y==="rtl"?"last":"first"))}break;case"Home":if(r.getFirstKey){if(t.focusedKey===null&&j.shiftKey)return;j.preventDefault();let le=r.getFirstKey(t.focusedKey,vc(j));t.setFocusedKey(le),le!=null&&(vc(j)&&j.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&t.replaceSelection(le))}break;case"End":if(r.getLastKey){if(t.focusedKey===null&&j.shiftKey)return;j.preventDefault();let le=r.getLastKey(t.focusedKey,vc(j));t.setFocusedKey(le),le!=null&&(vc(j)&&j.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&t.replaceSelection(le))}break;case"PageDown":if(r.getKeyPageBelow&&t.focusedKey!=null){let le=r.getKeyPageBelow(t.focusedKey);le!=null&&(j.preventDefault(),B(le))}break;case"PageUp":if(r.getKeyPageAbove&&t.focusedKey!=null){let le=r.getKeyPageAbove(t.focusedKey);le!=null&&(j.preventDefault(),B(le))}break;case"a":vc(j)&&t.selectionMode==="multiple"&&a!==!0&&(j.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(j.stopPropagation(),j.preventDefault(),t.clearSelection());break;case"Tab":if(!m){if(j.shiftKey)n.current.focus();else{let le=bU(n.current,{tabbable:!0}),ue,te;do te=le.lastChild(),te&&(ue=te);while(te);let ge=Bo();ue&&(!sP(ue)||ge&&!gP(ge))&&_s(ue)}break}}},S=x.useRef({top:0,left:0});np(g,"scroll",()=>{var j,B,U,W;S.current={top:(U=(j=g.current)===null||j===void 0?void 0:j.scrollTop)!==null&&U!==void 0?U:0,left:(W=(B=g.current)===null||B===void 0?void 0:B.scrollLeft)!==null&&W!==void 0?W:0}});let k=j=>{if(t.isFocused){Pt(j.currentTarget,Ze(j))||t.setFocused(!1);return}if(Pt(j.currentTarget,Ze(j))){if(t.setFocused(!0),t.focusedKey==null){var B,U;let Z=F=>{F!=null&&(t.setFocusedKey(F),c&&!t.isSelected(F)&&t.replaceSelection(F))},T=j.relatedTarget;var W,L;T&&j.currentTarget.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?Z((W=t.lastSelectedKey)!==null&&W!==void 0?W:(B=r.getLastKey)===null||B===void 0?void 0:B.call(r)):Z((L=t.firstSelectedKey)!==null&&L!==void 0?L:(U=r.getFirstKey)===null||U===void 0?void 0:U.call(r))}else g.current&&(g.current.scrollTop=S.current.top,g.current.scrollLeft=S.current.left);if(t.focusedKey!=null&&g.current){let Z=rh(n,t.focusedKey);Z instanceof HTMLElement&&(!sP(Z)&&!f&&_s(Z),mv()==="keyboard"&&hP(Z,{containingElement:n.current}))}}},P=j=>{Pt(j.currentTarget,j.relatedTarget)||t.setFocused(!1)},E=x.useRef(!1);np(n,sW,f?j=>{let{detail:B}=j;j.stopPropagation(),t.setFocused(!0),B?.focusStrategy==="first"&&(E.current=!0)}:void 0),dP(()=>{if(E.current){var j,B;let U=(B=(j=r.getFirstKey)===null||j===void 0?void 0:j.call(r))!==null&&B!==void 0?B:null;if(U==null){let W=Bo();vU(n.current),VP(W,null),t.collection.size>0&&(E.current=!1)}else t.setFocusedKey(U),E.current=!1}},[t.collection]),dP(()=>{t.collection.size>0&&(E.current=!1)},[t.focusedKey]),np(n,iW,f?j=>{var B;j.stopPropagation(),t.setFocused(!1),!((B=j.detail)===null||B===void 0)&&B.clearFocusKey&&t.setFocusedKey(null)}:void 0);const $=x.useRef(o),O=x.useRef(!1);x.useEffect(()=>{if($.current){var j,B;let L=null;var U;o==="first"&&(L=(U=(j=r.getFirstKey)===null||j===void 0?void 0:j.call(r))!==null&&U!==void 0?U:null);var W;o==="last"&&(L=(W=(B=r.getLastKey)===null||B===void 0?void 0:B.call(r))!==null&&W!==void 0?W:null);let Z=t.selectedKeys;if(Z.size){for(let T of Z)if(t.canSelectItem(T)){L=T;break}}t.setFocused(!0),t.setFocusedKey(L),L==null&&!f&&n.current&&up(n.current),t.collection.size>0&&($.current=!1,O.current=!0)}});let N=x.useRef(t.focusedKey),D=x.useRef(null);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==N.current||O.current)&&g.current&&n.current){let j=mv(),B=rh(n,t.focusedKey);if(!(B instanceof HTMLElement))return;(j==="keyboard"||O.current)&&(D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame(()=>{g.current&&(tv(g.current,B),j!=="virtual"&&hP(B,{containingElement:n.current}))}))}!f&&t.isFocused&&t.focusedKey==null&&N.current!=null&&n.current&&up(n.current),N.current=t.focusedKey,O.current=!1}),x.useEffect(()=>()=>{D.current&&cancelAnimationFrame(D.current)},[]),np(n,"react-aria-focus-scope-restore",j=>{j.preventDefault(),t.setFocused(!0)});let M={onKeyDown:C,onFocus:k,onBlur:P,onMouseDown(j){g.current===Ze(j)&&j.preventDefault()}},{typeSelectProps:V}=hX({keyboardDelegate:r,selectionManager:t});d||(M=Ns(V,M));let R;f||(R=t.focusedKey==null?0:-1);let K=fX(t.collection);return{collectionProps:Ns(M,{tabIndex:R,"data-collection":K})}}class i6{getItemRect(t){let r=this.ref.current;if(!r)return null;let n=t!=null?rh(this.ref,t):null;if(!n)return null;let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left-r.clientLeft+r.scrollLeft,y:i.top-o.top-r.clientTop+r.scrollTop,width:i.width,height:i.height}}getContentSize(){let t=this.ref.current;var r,n;return{width:(r=t?.scrollWidth)!==null&&r!==void 0?r:0,height:(n=t?.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let t=this.ref.current;var r,n,o,i;return{x:(r=t?.scrollLeft)!==null&&r!==void 0?r:0,y:(n=t?.scrollTop)!==null&&n!==void 0?n:0,width:(o=t?.clientWidth)!==null&&o!==void 0?o:0,height:(i=t?.clientHeight)!==null&&i!==void 0?i:0}}constructor(t){this.ref=t}}class bX{isDisabled(t){var r;return this.disabledBehavior==="all"&&(((r=t.props)===null||r===void 0?void 0:r.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,r){let n=t;for(;n!=null;){let o=this.collection.getItem(n);if(o?.type==="item"&&!this.isDisabled(o))return n;n=r(n)}return null}getNextKey(t){let r=t;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,n=>this.collection.getKeyAfter(n))}getPreviousKey(t){let r=t;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,n=>this.collection.getKeyBefore(n))}findKey(t,r,n){let o=t,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let s=i;do{if(o=r(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(s,i)&&o!=null);return o}isSameRow(t,r){return t.y===r.y||t.x!==r.x}isSameColumn(t,r){return t.x===r.x||t.y!==r.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,r=>this.getNextKey(r),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,r=>this.getPreviousKey(r),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,r){return r?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(t=this.layoutDelegate[r](t),this.findNextNonDisabled(t,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(t=this.layoutDelegate[r](t),this.findNextNonDisabled(t,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,r=>this.collection.getKeyAfter(r))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,r=>this.collection.getKeyBefore(r))}getKeyPageAbove(t){let r=this.ref.current,n=this.layoutDelegate.getItemRect(t);if(!n)return null;if(r&&!ev(r))return this.getFirstKey();let o=t;if(this.orientation==="horizontal"){let i=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(t){let r=this.ref.current,n=this.layoutDelegate.getItemRect(t);if(!n)return null;if(r&&!ev(r))return this.getLastKey();let o=t;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(t,r){if(!this.collator)return null;let n=this.collection,o=r||this.getFirstKey();for(;o!=null;){let i=n.getItem(o);if(!i)return null;let s=i.textValue.slice(0,t.length);if(i.textValue&&this.collator.compare(s,t)===0)return o;o=this.getNextKey(o)}return null}constructor(...t){if(t.length===1){let r=t[0];this.collection=r.collection,this.ref=r.ref,this.collator=r.collator,this.disabledKeys=r.disabledKeys||new Set,this.disabledBehavior=r.disabledBehavior||"all",this.orientation=r.orientation||"vertical",this.direction=r.direction,this.layout=r.layout||"stack",this.layoutDelegate=r.layoutDelegate||new i6(r.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new i6(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function vX(e){let{selectionManager:t,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:s}=e,a=uX({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,c=x.useMemo(()=>i||new bX({collection:r,disabledKeys:n,disabledBehavior:l,ref:o,collator:a,layoutDelegate:s}),[i,s,r,n,o,a,l]),{collectionProps:d}=gX({...e,ref:o,selectionManager:t,keyboardDelegate:c});return{listProps:d}}function yX(e,t,r){let{listProps:n}=vX({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:r});return delete n.onKeyDownCapture,{accordionProps:{...n,tabIndex:void 0}}}function xX(e){var t,r;const n=ur(),{ref:o,as:i,item:s,onFocusChange:a}=e,{state:l,className:c,indicator:d,children:f,title:m,subtitle:g,startContent:b,motionProps:y,focusedKey:v,variant:C,isCompact:S=!1,classNames:k={},isDisabled:P=!1,hideIndicator:E=!1,disableAnimation:$=(t=n?.disableAnimation)!=null?t:!1,keepContentMounted:O=!1,disableIndicatorAnimation:N=!1,HeadingComponent:D=i||"h2",onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:j,onClick:B,...U}=e,W=i||"div",L=typeof W=="string",Z=ot(o),T=l.disabledKeys.has(s.key)||P,F=l.selectionManager.isSelected(s.key),{buttonProps:_,regionProps:H}=cX({item:s,isDisabled:T},{...l,focusedKey:v},Z),{onFocus:Y,onBlur:X,...oe}=_,{isFocused:Q,isFocusVisible:le,focusProps:ue}=KP({autoFocus:(r=s.props)==null?void 0:r.autoFocus}),{isHovered:te,hoverProps:ge}=FP({isDisabled:T}),{pressProps:Se,isPressed:pe}=EP({ref:Z,isDisabled:T,onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:j}),we=x.useCallback(()=>{a?.(!0,s.key)},[]),be=x.useCallback(()=>{a?.(!1,s.key)},[]),re=x.useMemo(()=>({...k}),[jr(k)]),ke=x.useMemo(()=>nj({isCompact:S,isDisabled:T,hideIndicator:E,disableAnimation:$,disableIndicatorAnimation:N,variant:C}),[S,T,E,$,N,C]),Ne=A(re?.base,c),Me=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"base",className:ke.base({class:Ne}),...Oe(Lt(U,{enabled:L}),lt)}),[Ne,L,U,ke,s.props,F,T]),Pe=(lt={})=>{var Ut,ut;return{ref:Z,"data-open":ae(F),"data-focus":ae(Q),"data-focus-visible":ae(le),"data-disabled":ae(T),"data-hover":ae(te),"data-pressed":ae(pe),"data-slot":"trigger",className:ke.trigger({class:re?.trigger}),onFocus:i4(we,Y,ue.onFocus,U.onFocus,(Ut=s.props)==null?void 0:Ut.onFocus),onBlur:i4(be,X,ue.onBlur,U.onBlur,(ut=s.props)==null?void 0:ut.onBlur),...Oe(oe,ge,Se,lt,{onClick:co(Se.onClick,B)})}},Ae=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"content",className:ke.content({class:re?.content}),...Oe(H,lt)}),[ke,re,H,F,T,re?.content]),xe=x.useCallback((lt={})=>({"aria-hidden":ae(!0),"data-open":ae(F),"data-disabled":ae(T),"data-slot":"indicator",className:ke.indicator({class:re?.indicator}),...lt}),[ke,re?.indicator,F,T,re?.indicator]),Ie=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"heading",className:ke.heading({class:re?.heading}),...lt}),[ke,re?.heading,F,T,re?.heading]),et=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"title",className:ke.title({class:re?.title}),...lt}),[ke,re?.title,F,T,re?.title]),wt=x.useCallback((lt={})=>({"data-open":ae(F),"data-disabled":ae(T),"data-slot":"subtitle",className:ke.subtitle({class:re?.subtitle}),...lt}),[ke,re,F,T,re?.subtitle]);return{Component:W,HeadingComponent:D,item:s,slots:ke,classNames:re,domRef:Z,indicator:d,children:f,title:m,subtitle:g,startContent:b,isOpen:F,isDisabled:T,hideIndicator:E,keepContentMounted:O,disableAnimation:$,motionProps:y,getBaseProps:Me,getHeadingProps:Ie,getButtonProps:Pe,getContentProps:Ae,getIndicatorProps:xe,getTitleProps:et,getSubtitleProps:wt}}var s6={collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},a6=()=>Promise.resolve().then(()=>nd).then(e=>e.default),l6=Xe((e,t)=>{const{Component:r,HeadingComponent:n,classNames:o,slots:i,indicator:s,children:a,title:l,subtitle:c,startContent:d,isOpen:f,isDisabled:m,hideIndicator:g,keepContentMounted:b,disableAnimation:y,motionProps:v,getBaseProps:C,getHeadingProps:S,getButtonProps:k,getTitleProps:P,getSubtitleProps:E,getContentProps:$,getIndicatorProps:O}=xX({...e,ref:t}),N=iR(),M=x.useMemo(()=>typeof s=="function"?s({indicator:h.jsx(lE,{}),isOpen:f,isDisabled:m}):s||null,[s,f,m])||h.jsx(lE,{}),V=x.useMemo(()=>{if(y)return b?h.jsx("div",{...$(),children:a}):f&&h.jsx("div",{...$(),children:a});const R={exit:{...s6.collapse.exit,overflowY:"hidden"},enter:{...s6.collapse.enter,overflowY:"unset"}};return b?h.jsx(Ps,{features:a6,children:h.jsx(Es.section,{animate:f?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...$(),children:a})},"accordion-content")}):h.jsx(lc,{initial:!1,children:f&&h.jsx(Ps,{features:a6,children:h.jsx(Es.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...$(),children:a})},"accordion-content")})})},[f,y,b,a,v]);return h.jsxs(r,{...C(),children:[h.jsx(n,{...S(),children:h.jsxs("button",{...k(),children:[d&&h.jsx("div",{className:i.startContent({class:o?.startContent}),children:d}),h.jsxs("div",{className:i.titleWrapper({class:o?.titleWrapper}),children:[l&&h.jsx("span",{...P(),children:l}),c&&h.jsx("span",{...E(),children:c})]}),!g&&M&&h.jsx("span",{...O(),children:M})]})}),V]})});l6.displayName="HeroUI.AccordionItem";var wX=l6;class CX{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}constructor(t,{expandedKeys:r}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,r=r||new Set;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||r.has(a.key)))for(let l of a.childNodes)n(l)};for(let a of t)n(a);let o=null,i=0;for(let[a,l]of this.keyMap)o?(o.nextKey=a,l.prevKey=o.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=i++),o=l,o.nextKey=void 0;var s;this.lastKey=(s=o?.key)!==null&&s!==void 0?s:null}}class Zo extends Set{constructor(t,r,n){super(t),t instanceof Zo?(this.anchorKey=r??t.anchorKey,this.currentKey=n??t.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}const SX=typeof document<"u"?x.useInsertionEffect??x.useLayoutEffect:()=>{};function kX(e,t,r){let[n,o]=x.useState(e||t),i=x.useRef(n),s=x.useRef(e!==void 0),a=e!==void 0;x.useEffect(()=>{let f=s.current;f!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),s.current=a},[a]);let l=a?e:n;SX(()=>{i.current=l});let[,c]=x.useReducer(()=>({}),{}),d=x.useCallback((f,...m)=>{let g=typeof f=="function"?f(i.current):f;Object.is(i.current,g)||(i.current=g,o(g),c(),r?.(g,...m))},[r]);return[l,d]}function PX(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function EX(e){let{selectionMode:t="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=e,s=x.useRef(!1),[,a]=x.useState(!1),l=x.useRef(null),c=x.useRef(null),[,d]=x.useState(null),f=x.useMemo(()=>u6(e.selectedKeys),[e.selectedKeys]),m=x.useMemo(()=>u6(e.defaultSelectedKeys,new Zo),[e.defaultSelectedKeys]),[g,b]=kX(f,m,e.onSelectionChange),y=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[v,C]=x.useState(o);o==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&C("replace");let S=x.useRef(o);return x.useEffect(()=>{o!==S.current&&(C(o),S.current=o)},[o]),{selectionMode:t,disallowEmptySelection:r,selectionBehavior:v,setSelectionBehavior:C,get isFocused(){return s.current},setFocused(k){s.current=k,a(k)},get focusedKey(){return l.current},get childFocusStrategy(){return c.current},setFocusedKey(k,P="first"){l.current=k,c.current=P,d(k)},selectedKeys:g,setSelectedKeys(k){(n||!PX(k,g))&&b(k)},disabledKeys:y,disabledBehavior:i}}function u6(e,t){return e?e==="all"?"all":new Zo(e):t}function TX(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function AX(e){return _X(e)}function _X(e,t){for(let r of e)return r}function e1(e,t,r){if(t.parentKey===r.parentKey)return t.index-r.index;let n=[...c6(e,t),t],o=[...c6(e,r),r],i=n.slice(0,o.length).findIndex((s,a)=>s!==o[a]);return i!==-1?(t=n[i],r=o[i],t.index-r.index):n.findIndex(s=>s===r)>=0?1:(o.findIndex(s=>s===t)>=0,-1)}function c6(e,t){let r=[],n=t;for(;n?.parentKey!=null;)n=e.getItem(n.parentKey),n&&r.unshift(n);return r}class t1{constructor(t,r,n){this.collection=t,this.state=r,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,r){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let r=this.getKey(t);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),r=this.state.selectedKeys;return this._isSelectAll=t.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!t||n&&e1(this.collection,n,t)<0)&&(t=n)}return t?.key??null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!t||n&&e1(this.collection,n,t)>0)&&(t=n)}return t?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let r=this.getKey(t);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new Zo([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new Zo(o,i,r);for(let s of this.getKeyRange(i,o.currentKey??r))n.delete(s);for(let s of this.getKeyRange(r,i))this.canSelectItem(s)&&n.add(s)}this.state.setSelectedKeys(n)}getKeyRange(t,r){let n=this.collection.getItem(t),o=this.collection.getItem(r);return n&&o?e1(this.collection,n,o)<=0?this.getKeyRangeInternal(t,r):this.getKeyRangeInternal(r,t):[]}getKeyRangeInternal(t,r){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(t,r);let n=[],o=t;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&n.push(o),o===r)return n;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let r=this.collection.getItem(t);if(!r||r.type==="cell"&&this.allowsCellSelection)return t;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let r=this.getKey(t);if(r==null)return;let n=new Zo(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none")return;let r=this.getKey(t);if(r==null)return;let n=this.canSelectItem(r)?new Zo([r],r,r):new Zo;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let r=new Zo;for(let n of t){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let t=this.fullCollection??this.collection,r=[],n=o=>{for(;o!=null;){if(this.canSelectItemIn(o,t)){let i=t.getItem(o);i?.type==="item"&&r.push(o),i?.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(AX(TX(i,t))?.key??null)}o=t.getKeyAfter(o)}};return n(t.getFirstKey()),r}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Zo)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(t.size!==r.size)return!1;for(let n of t)if(!r.has(n))return!1;for(let n of r)if(!t.has(n))return!1;return!0}canSelectItem(t){return this.canSelectItemIn(t,this.collection)}canSelectItemIn(t,r){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let n=r.getItem(t);return!(!n||n?.props?.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!this.collection.getItem(t)?.props?.isDisabled)}isLink(t){return!!this.collection.getItem(t)?.props?.href}getItemProps(t){return this.collection.getItem(t)?.props}withCollection(t){return new t1(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class $X{build(t,r){return this.context=r,d6(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:r,items:n}=t;if(x.isValidElement(r)&&r.type===x.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];x.Children.forEach(r,s=>{s&&o.push(s)});let i=0;for(let s of o){let a=this.getFullNode({element:s,index:i},{});for(let l of a)i++,yield l}}}getKey(t,r,n,o){if(t.key!=null)return t.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){let s=i.key??i.id;if(s==null)throw new Error("No key found for item");return s}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(t,r){return{renderer:r.renderer||t.renderer}}*getFullNode(t,r,n,o){if(x.isValidElement(t.element)&&t.element.type===x.Fragment){let l=[];x.Children.forEach(t.element.props.children,d=>{l.push(d)});let c=t.index??0;for(const d of l)yield*this.getFullNode({element:d,index:c++},r,n,o);return}let i=t.element;if(!i&&t.value&&r&&r.renderer){let l=this.cache.get(t.value);if(l&&(!l.shouldInvalidate||!l.shouldInvalidate(this.context))){l.index=t.index,l.parentKey=o?o.key:null,yield l;return}i=r.renderer(t.value)}if(x.isValidElement(i)){let l=i.type;if(typeof l!="function"&&typeof l.getCollectionNode!="function"){let m=i.type;throw new Error(`Unknown element <${m}> in collection.`)}let c=l.getCollectionNode(i.props,this.context),d=t.index??0,f=c.next();for(;!f.done&&f.value;){let m=f.value;t.index=d;let g=m.key??null;g==null&&(g=m.element?null:this.getKey(i,t,r,n));let y=[...this.getFullNode({...m,key:g,index:d,wrapper:IX(t.wrapper,m.wrapper)},this.getChildState(r,m),n?`${n}${i.key}`:i.key,o)];for(let v of y){if(v.value=m.value??t.value??null,v.value&&this.cache.set(v.value,v),t.type&&v.type!==t.type)throw new Error(`Unsupported type <${r1(v.type)}> in <${r1(o?.type??"unknown parent type")}>. Only <${r1(t.type)}> is supported.`);d++,yield v}f=c.next(y)}return}if(t.key==null||t.type==null)return;let s=this,a={type:t.type,props:t.props,key:t.key,parentKey:o?o.key:null,value:t.value??null,level:(o?.level??0)+(o?.type==="item"?1:0),index:t.index,rendered:t.rendered,textValue:t.textValue??"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:d6(function*(){if(!t.hasChildNodes||!t.childNodes)return;let l=0;for(let c of t.childNodes()){c.key!=null&&(c.key=`${a.key}${c.key}`);let d=s.getFullNode({...c,index:l},s.getChildState(r,c),a.key,a);for(let f of d)l++,yield f}})};yield a}constructor(){this.cache=new WeakMap}}function d6(e){let t=[],r=null;return{*[Symbol.iterator](){for(let n of t)yield n;r||(r=e());for(let n of r)t.push(n),yield n}}}function IX(e,t){if(e&&t)return r=>e(t(r));if(e)return e;if(t)return t}function r1(e){return e[0].toUpperCase()+e.slice(1)}function NX(e,t,r){let n=x.useMemo(()=>new $X,[]),{children:o,items:i,collection:s}=e;return x.useMemo(()=>{if(s)return s;let l=n.build({children:o,items:i},r);return t(l)},[n,o,i,s,r,t])}function DX(e){let{onExpandedChange:t}=e,[r,n]=jo(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),o=EX(e),i=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=NX(e,x.useCallback(l=>new CX(l,{expandedKeys:r}),[r]),null);return x.useEffect(()=>{o.focusedKey!=null&&!s.getItem(o.focusedKey)&&o.setFocusedKey(null)},[s,o.focusedKey]),{collection:s,expandedKeys:r,disabledKeys:i,toggleKey:l=>{n(MX(r,l))},setExpandedKeys:n,selectionManager:new t1(s,o)}}function MX(e,t){let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function OX(e){var t;const r=ur(),{ref:n,as:o,className:i,items:s,variant:a,motionProps:l,expandedKeys:c,disabledKeys:d,selectedKeys:f,children:m,defaultExpandedKeys:g,selectionMode:b="single",selectionBehavior:y="toggle",keepContentMounted:v=!1,disallowEmptySelection:C,defaultSelectedKeys:S,onExpandedChange:k,onSelectionChange:P,dividerProps:E={},isCompact:$=!1,isDisabled:O=!1,showDivider:N=!0,hideIndicator:D=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:V=!1,itemClasses:R,...K}=e,[j,B]=x.useState(null),U=o||"div",W=typeof U=="string",L=ot(n),Z=x.useMemo(()=>rj({variant:a,className:i}),[a,i]),F={children:x.useMemo(()=>{let ue=[];return x.Children.map(m,te=>{var ge;if(x.isValidElement(te)&&typeof((ge=te.props)==null?void 0:ge.children)!="string"){const Se=x.cloneElement(te,{hasChildItems:!1});ue.push(Se)}else ue.push(te)}),ue},[m]),items:s},_={expandedKeys:c,defaultExpandedKeys:g,onExpandedChange:k},H={disabledKeys:d,selectedKeys:f,selectionMode:b,selectionBehavior:y,disallowEmptySelection:C,defaultSelectedKeys:S??g,onSelectionChange:P,...F,..._},Y=DX(H);Y.selectionManager.setFocusedKey=ue=>{B(ue)};const{accordionProps:X}=yX({...F,..._},Y,L),oe=x.useMemo(()=>({state:Y,focusedKey:j,motionProps:l,isCompact:$,isDisabled:O,hideIndicator:D,disableAnimation:M,keepContentMounted:v,disableIndicatorAnimation:V}),[j,$,O,D,f,M,v,Y?.expandedKeys.values,V,Y.expandedKeys.size,Y.disabledKeys.size,Y.collection,l]),Q=x.useCallback((ue={})=>({ref:L,className:Z,"data-orientation":"vertical",...Oe(X,Lt(K,{enabled:W}),ue)}),[]),le=x.useCallback((ue,te)=>{ue&&B(te)},[]);return{Component:U,values:oe,state:Y,focusedKey:j,getBaseProps:Q,isSplitted:a==="splitted",classNames:Z,showDivider:N,dividerProps:E,disableAnimation:M,handleFocusChanged:le,itemClasses:R}}function jX(e){let t=Lt(e,{enabled:typeof e.elementType=="string"}),r;return e.orientation==="vertical"&&(r="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":r}}:{separatorProps:t}}function LX(e){const{as:t,className:r,orientation:n,...o}=e;let i=t||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:s}=jX({elementType:typeof i=="string"?i:"hr",orientation:n}),a=x.useMemo(()=>e4({orientation:n,className:r}),[n,r]),l=x.useCallback((c={})=>({className:a,role:"separator","data-orientation":n,...s,...o,...c}),[a,n,s,o]);return{Component:i,getDividerProps:l}}function FX(e){return x.forwardRef(e)}var f6=FX((e,t)=>{const{Component:r,getDividerProps:n}=LX({...e});return h.jsx(r,{ref:t,...n()})});f6.displayName="HeroUI.Divider";var BX=f6,p6=Xe((e,t)=>{const{Component:r,values:n,state:o,isSplitted:i,showDivider:s,getBaseProps:a,disableAnimation:l,handleFocusChanged:c,itemClasses:d,dividerProps:f}=OX({...e,ref:t}),m=x.useCallback((b,y)=>c(b,y),[c]),g=x.useMemo(()=>[...o.collection].map((b,y)=>{const v={...d,...b.props.classNames||{}};return h.jsxs(x.Fragment,{children:[h.jsx(wX,{item:b,variant:e.variant,onFocusChange:m,...n,...b.props,classNames:v}),!b.props.hidden&&!i&&s&&y<o.collection.size-1&&h.jsx(BX,{...f})]},b.key)}),[n,d,m,i,s,o.collection]);return h.jsx(r,{...a(),children:l?g:h.jsx(mV,{children:g})})});p6.displayName="HeroUI.Accordion";var zX=p6;function h6(e){return null}h6.getCollectionNode=function*(t,r){let{childItems:n,title:o,children:i}=t,s=t.title||t.children,a=t.textValue||(typeof s=="string"?s:"")||t["aria-label"]||"";!a&&!r?.suppressTextValueWarning&&process.env.NODE_ENV!=="production"&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:t,rendered:s,textValue:a,"aria-label":t["aria-label"],hasChildNodes:KX(t),*childNodes(){if(n)for(let l of n)yield{type:"item",value:l};else if(o){let l=[];x.Children.forEach(i,c=>{l.push({type:"item",element:c})}),yield*l}}}};function KX(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&x.Children.count(e.children)>0)}var VX=h6,RX=VX;function WX({title:e,children:t}){return h.jsxs("div",{children:[e&&h.jsx("h2",{className:"text-2xl font-bold mb-2 text-foreground",children:e}),h.jsx(zX,{className:"px-0",children:x.Children.map(t,r=>{if(!x.isValidElement(r))return null;const{props:n}=r;return h.jsx(RX,{title:n.title,"aria-label":n.title,children:n.children},n.title)})??null})]})}function UX({children:e,styleType:t="checkMark"}){return h.jsxs("div",{className:"flex flex-row items-center gap-1",children:[t==="checkMark"&&h.jsx(ug,{size:20,className:"shrink-0 stroke-success-600"}),e]})}function m6({children:e}){const[t,r]=Fn();return h.jsx("div",{className:"prose prose-sm max-w-none text-foreground",children:h.jsx(rX,{options:{overrides:{h1:{props:{class:"text-3xl font-bold mb-2 text-foreground"}},h2:{props:{class:"text-2xl font-bold mb-2 text-foreground"}},h3:{props:{class:"text-xl font-bold text-foreground"}},h4:{props:{class:"text-lg font-bold text-foreground"}},a:{props:{class:"text-primary-600 hover:underline cursor-pointer",target:"_blank"}},p:{props:{class:"mt-2 mb-4"}},ul:{props:{class:"list-disc pl-4 ml-2"}},ol:{props:{class:"list-decimal pl-4 ml-2"}},table:{props:{class:"mb-4"}},th:{props:{class:"text-left"}},td:{props:{class:"py-1 pr-4"}},img:({src:n,width:o,height:i,...s})=>h.jsx(Ar,{...s,src:t(n,o,i),srcSet:r(n,o,i),width:o,height:i}),ListItem:UX,Faq:WX}},children:e})})}const HX=ft`
|
|
338
338
|
query textContent($key: String!) {
|
|
339
339
|
textContent(key: $key)
|
|
340
340
|
}
|
|
341
|
-
`;function g6(){const{t:e}=Je(),{results:{contentModal:t}={}}=vt(),{popoverProps:r,isShadowRoot:n}=Zn(),{modals:o,isModalOpen:i,openModal:s,closeModal:a}=Qt(),l=Object.keys(o).find(g=>g.includes("content-")),c=!!l&&i(l),d=l?.replace("content-",""),f=d?.startsWith("/")?d.replaceAll("/","_").slice(1):d,{data:{textContent:m}={}}=Vo(f?[HX,{key:f}]:null,{fetcher:nn});return x.useEffect(()=>{c&&(!m||m.trim().length===0)&&a(l)},[m]),!l||!m||m.trim().length===0?null:h.jsx(fi,{isOpen:c,onOpenChange:g=>g?s(l):a(l),placement:"bottom-center",scrollBehavior:"inside",size:"3xl",shouldBlockScroll:!n,portalContainer:r.portalContainer,classNames:{backdrop:A(t?.backdrop),wrapper:A(t?.wrapper),base:A("m-0 max-h-[90vh]",t?.base),header:A("py-6",t?.header),body:A("pt-0",t?.body),footer:A(t?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{}),h.jsx(ai,{children:h.jsx(m6,{children:m})}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",t?.primaryButton),onPress:()=>a(l),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:e("common.close")})})]})})}function qX(e){const[t,r]=qr(e,YC.variantKeys),{as:n,title:o,children:i,description:s,onClose:a,isClosable:l,ref:c,icon:d,startContent:f,endContent:m,isVisible:g,isDefaultVisible:b,onVisibleChange:y,closeButtonProps:v={size:"sm"},className:C,classNames:S,...k}=t,[P,E]=jo(g,b??!0,y),O=typeof(n||"div")=="string",N=ot(c),D=x.useCallback(()=>{E(!1),a?.()},[E,a]),M=A(S?.base,C),V=x.useMemo(()=>YC({hasContent:!hs(s)||!hs(i),...r}),[s,jr(r)]),R=x.useCallback(()=>({"data-visible":ae(P),"data-closeable":ae(l),"data-has-title":ae(!hs(o)),"data-has-description":ae(!hs(s)),...Oe(Lt(k,{enabled:O}),Lt(t)),className:V.base({class:M})}),[V,M]),K=x.useCallback(()=>({className:V.mainWrapper({class:S?.mainWrapper})}),[V,S?.mainWrapper]),j=x.useCallback(()=>({className:V.description({class:S?.description})}),[V,S?.description]),B=x.useCallback(()=>({className:V.title({class:S?.title})}),[V,S?.title]),U=x.useCallback(()=>({...v,className:V.closeButton({class:S?.closeButton})}),[V,S?.closeButton]),W=x.useCallback(()=>({className:V.alertIcon({class:S?.alertIcon})}),[V,S?.alertIcon]),L=x.useCallback(()=>({className:V.iconWrapper({class:S?.iconWrapper})}),[V,S?.iconWrapper]);return{title:o,icon:d,children:i,description:s,isClosable:l,domRef:N,endContent:m,startContent:f,getBaseProps:R,getMainWrapperProps:K,getDescriptionProps:j,getTitleProps:B,color:r.color,getCloseButtonProps:U,handleClose:D,isVisible:P,onClose:a,getAlertIconProps:W,getIconWrapperProps:L}}var b6={primary:aE,secondary:aE,success:$U,warning:IU,danger:DU},v6=Xe((e,t)=>{const{title:r,icon:n,children:o,description:i,endContent:s,startContent:a,isClosable:l,domRef:c,handleClose:d,getBaseProps:f,getMainWrapperProps:m,getDescriptionProps:g,getTitleProps:b,getCloseButtonProps:y,color:v,isVisible:C,onClose:S,getAlertIconProps:k,getIconWrapperProps:P}=qX({...e,ref:t});if(!C)return null;const E=n&&x.isValidElement(n)?x.cloneElement(n,k()):null,$=b6[v]||b6.primary;return h.jsxs("div",{ref:c,role:"alert",...f(),children:[a,h.jsx("div",{...P(),children:E||h.jsx($,{...k()})}),h.jsxs("div",{...m(),children:[!hs(r)&&h.jsx("div",{...b(),children:r}),!hs(i)&&h.jsx("div",{...g(),children:i}),o]}),s,(l||S)&&h.jsx(hr,{isIconOnly:!0,"aria-label":"Close",radius:"full",variant:"light",onPress:d,...y(),children:h.jsx(uE,{height:20,width:20})})]})});v6.displayName="HeroUI.Alert";var uu=v6;function GX(){const{errorAlert:e}=vt();return h.jsx("div",{className:A(e?.base),children:h.jsx(uu,{color:"danger",variant:"faded",title:"Er is een fout opgetreden",description:"Er ging iets mis bij het laden van de gegevens. Probeer de pagina te vernieuwen.",hideIconWrapper:!0,endContent:h.jsx(hr,{color:"danger",onPress:()=>window.location.reload(),className:A("font-medium ml-3",e?.button),radius:"full",disableAnimation:!0,disableRipple:!0,children:"Vernieuwen"}),classNames:{base:A(e?.alert?.base),title:A(e?.alert?.title),description:A(e?.alert?.description),mainWrapper:A(e?.alert?.mainWrapper),closeButton:A(e?.alert?.closeButton),iconWrapper:A(e?.alert?.iconWrapper),alertIcon:A(e?.alert?.alertIcon)}})})}class y6 extends x.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError?.(t)}render(){return this.state.hasError?this.props.fallback??h.jsx(GX,{}):this.props.children}}function ZX(e,t){const r=new Set(e.map(o=>o.slug)),n=t.filter(o=>!r.has(o.slug));return[...e,...n]}function n1({selectedFilters:e,defaultFilters:t,requiredFilters:r,removedDefaultFilters:n}){const o=t.filter(a=>!n.has(a.slug)),s=[...ZX(e,o),...r].reduce((a,l)=>(a.set(l.slug,l),a),new Map);return Array.from(s.values())}const x6=x.createContext({onAction:e=>{}});function w6({children:e,onAction:t}){const r=x.useCallback(n=>t?.(n),[t]);return h.jsx(x6,{value:{onAction:r},children:e})}function gi(){return x.useContext(x6)}const Qn=2147483647;function Co(e){if(!e||typeof e!="string")return{to:void 0,from:void 0};const[t,r]=e.split("-").map(parseFloat);return Number.isNaN(t)?{to:r}:Number.isNaN(r)?{from:t}:{from:t,to:r}}const C6=x.createContext({activeFilters:[],filterOptions:[],sortOptions:[],distinctProperties:[],setDistinctProperties:e=>{},handleFilterChange:e=>{},handleFilterRemove:e=>{},getActiveFilterValue:e=>[]});function qa(e,t){return e.find(r=>r.slug===t)}function bi(e,t){return e.find(r=>r.slug===t)?.value}function YX(e,t){if(!(t?.type!=="radio"||typeof e.value!="string"))return t.options[0]?.value}const JX=
|
|
341
|
+
`;function g6(){const{t:e}=Je(),{results:{contentModal:t}={}}=vt(),{popoverProps:r,isShadowRoot:n}=Zn(),{modals:o,isModalOpen:i,openModal:s,closeModal:a}=Qt(),l=Object.keys(o).find(g=>g.includes("content-")),c=!!l&&i(l),d=l?.replace("content-",""),f=d?.startsWith("/")?d.replaceAll("/","_").slice(1):d,{data:{textContent:m}={}}=Vo(f?[HX,{key:f}]:null,{fetcher:nn});return x.useEffect(()=>{c&&(!m||m.trim().length===0)&&a(l)},[m]),!l||!m||m.trim().length===0?null:h.jsx(fi,{isOpen:c,onOpenChange:g=>g?s(l):a(l),placement:"bottom-center",scrollBehavior:"inside",size:"3xl",shouldBlockScroll:!n,portalContainer:r.portalContainer,classNames:{backdrop:A(t?.backdrop),wrapper:A(t?.wrapper),base:A("m-0 max-h-[90vh]",t?.base),header:A("py-6",t?.header),body:A("pt-0",t?.body),footer:A(t?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{}),h.jsx(ai,{children:h.jsx(m6,{children:m})}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",t?.primaryButton),onPress:()=>a(l),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:e("common.close")})})]})})}function qX(e){const[t,r]=qr(e,YC.variantKeys),{as:n,title:o,children:i,description:s,onClose:a,isClosable:l,ref:c,icon:d,startContent:f,endContent:m,isVisible:g,isDefaultVisible:b,onVisibleChange:y,closeButtonProps:v={size:"sm"},className:C,classNames:S,...k}=t,[P,E]=jo(g,b??!0,y),O=typeof(n||"div")=="string",N=ot(c),D=x.useCallback(()=>{E(!1),a?.()},[E,a]),M=A(S?.base,C),V=x.useMemo(()=>YC({hasContent:!hs(s)||!hs(i),...r}),[s,jr(r)]),R=x.useCallback(()=>({"data-visible":ae(P),"data-closeable":ae(l),"data-has-title":ae(!hs(o)),"data-has-description":ae(!hs(s)),...Oe(Lt(k,{enabled:O}),Lt(t)),className:V.base({class:M})}),[V,M]),K=x.useCallback(()=>({className:V.mainWrapper({class:S?.mainWrapper})}),[V,S?.mainWrapper]),j=x.useCallback(()=>({className:V.description({class:S?.description})}),[V,S?.description]),B=x.useCallback(()=>({className:V.title({class:S?.title})}),[V,S?.title]),U=x.useCallback(()=>({...v,className:V.closeButton({class:S?.closeButton})}),[V,S?.closeButton]),W=x.useCallback(()=>({className:V.alertIcon({class:S?.alertIcon})}),[V,S?.alertIcon]),L=x.useCallback(()=>({className:V.iconWrapper({class:S?.iconWrapper})}),[V,S?.iconWrapper]);return{title:o,icon:d,children:i,description:s,isClosable:l,domRef:N,endContent:m,startContent:f,getBaseProps:R,getMainWrapperProps:K,getDescriptionProps:j,getTitleProps:B,color:r.color,getCloseButtonProps:U,handleClose:D,isVisible:P,onClose:a,getAlertIconProps:W,getIconWrapperProps:L}}var b6={primary:aE,secondary:aE,success:$U,warning:IU,danger:DU},v6=Xe((e,t)=>{const{title:r,icon:n,children:o,description:i,endContent:s,startContent:a,isClosable:l,domRef:c,handleClose:d,getBaseProps:f,getMainWrapperProps:m,getDescriptionProps:g,getTitleProps:b,getCloseButtonProps:y,color:v,isVisible:C,onClose:S,getAlertIconProps:k,getIconWrapperProps:P}=qX({...e,ref:t});if(!C)return null;const E=n&&x.isValidElement(n)?x.cloneElement(n,k()):null,$=b6[v]||b6.primary;return h.jsxs("div",{ref:c,role:"alert",...f(),children:[a,h.jsx("div",{...P(),children:E||h.jsx($,{...k()})}),h.jsxs("div",{...m(),children:[!hs(r)&&h.jsx("div",{...b(),children:r}),!hs(i)&&h.jsx("div",{...g(),children:i}),o]}),s,(l||S)&&h.jsx(hr,{isIconOnly:!0,"aria-label":"Close",radius:"full",variant:"light",onPress:d,...y(),children:h.jsx(uE,{height:20,width:20})})]})});v6.displayName="HeroUI.Alert";var uu=v6;function GX(){const{errorAlert:e}=vt();return h.jsx("div",{className:A(e?.base),children:h.jsx(uu,{color:"danger",variant:"faded",title:"Er is een fout opgetreden",description:"Er ging iets mis bij het laden van de gegevens. Probeer de pagina te vernieuwen.",hideIconWrapper:!0,endContent:h.jsx(hr,{color:"danger",onPress:()=>window.location.reload(),className:A("font-medium ml-3",e?.button),radius:"full",disableAnimation:!0,disableRipple:!0,children:"Vernieuwen"}),classNames:{base:A(e?.alert?.base),title:A(e?.alert?.title),description:A(e?.alert?.description),mainWrapper:A(e?.alert?.mainWrapper),closeButton:A(e?.alert?.closeButton),iconWrapper:A(e?.alert?.iconWrapper),alertIcon:A(e?.alert?.alertIcon)}})})}class y6 extends x.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError?.(t)}render(){return this.state.hasError?this.props.fallback??h.jsx(GX,{}):this.props.children}}function ZX(e,t){const r=new Set(e.map(o=>o.slug)),n=t.filter(o=>!r.has(o.slug));return[...e,...n]}function n1({selectedFilters:e,defaultFilters:t,requiredFilters:r,removedDefaultFilters:n}){const o=t.filter(a=>!n.has(a.slug)),s=[...ZX(e,o),...r].reduce((a,l)=>(a.set(l.slug,l),a),new Map);return Array.from(s.values())}const x6=x.createContext({onAction:e=>{}});function w6({children:e,onAction:t}){const r=x.useCallback(n=>t?.(n),[t]);return h.jsx(x6,{value:{onAction:r},children:e})}function gi(){return x.useContext(x6)}const Qn=2147483647;function Co(e){if(!e||typeof e!="string")return{to:void 0,from:void 0};const[t,r]=e.split("-").map(parseFloat);return Number.isNaN(t)?{to:r}:Number.isNaN(r)?{from:t}:{from:t,to:r}}const C6=x.createContext({activeFilters:[],filterOptions:[],sortOptions:[],distinctProperties:[],setDistinctProperties:e=>{},handleFilterChange:e=>{},handleFilterRemove:e=>{},getActiveFilterValue:e=>[]});function qa(e,t){return e.find(r=>r.slug===t)}function bi(e,t){return e.find(r=>r.slug===t)?.value}function YX(e,t){if(!(t?.type!=="radio"||typeof e.value!="string"))return t.options[0]?.value}const JX=ft`
|
|
342
342
|
query pageByPath($path: String) {
|
|
343
343
|
page(path: $path) {
|
|
344
344
|
productCategory
|
|
@@ -372,7 +372,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
`;function XX({path:e}){const{data:t}=Vo(e?[JX,{path:e}]:null,{use:[Yn],fetcher:nn});return t?.page}function S6(e){return e.filter(t=>Array.isArray(t.value)?t.value.length>0:t.value!==""&&t.value!==void 0&&t.value!==null)}function k6(e,t){return!e||e.trim()===""?[]:e.split("/").filter(r=>r.includes(":")).map(r=>{const n=r.split(":");if(n.length!==2)return null;const[o,i]=n,s=o.trim(),a=i.trim();if(a.endsWith("-")){const l=Number.parseInt(a.slice(0,-1),10);if(Number.isNaN(l))return null;const c=qa(t,s),d=c?.type==="range"?c.max:null;return{slug:s,value:`${l}-${d??Qn}`}}return{slug:s,value:a.includes(",")?a.split(",").map(l=>l.trim()):a}}).filter(r=>r!==null)}function QX(e){switch(e){case"sim-only-proposition":return"/elements/sim-only";case"fixed-proposition":return"/elements/internet-en-tv";case"smartphone-proposition":return"/elements/telefoon-met-abonnement";default:return}}function eQ(e,t){let r=!1;if(Array.isArray(e.value)?r=e.value.length>0:r=e.value!==""&&e.value!==void 0&&e.value!==null,r&&typeof e.value=="string"&&e.value.includes("-")){const n=qa(t,e.slug);if(n&&["range","min","max"].includes(n.type)){const{from:o,to:i}=Co(e.value);if(o!==void 0&&i!==void 0){const s=n.min||0,a=n.max||Qn;r=!(o<=s&&i>=a)}}}return r}function tQ({children:e,productCategory:t,initialSelectedFilters:r=[]}){const{onAction:n}=gi(),[o,i]=x.useState(S6(r)),[s,a]=x.useState(new Set),[l,c]=x.useState([]);zo(()=>{i(S6(r))},[JSON.stringify([...r].sort((k,P)=>k.slug.localeCompare(P.slug)))]);const d=XX({path:QX(t)}),f=(d?.pageFilters??[]).filter(k=>t!=="smartphone-proposition"||!bi(o,"telefoons")?!0:!["merk","opslag","kleur"].includes(k.slug)).sort((k,P)=>k.rank-P.rank),m=d?.filter?k6(d.filter,f):[],g=d?.filterDefaults?k6(d.filterDefaults,f):[],b=f.find(k=>k.slug==="sorteren")?.options??[],y=x.useMemo(()=>n1({selectedFilters:o,defaultFilters:g,requiredFilters:m,removedDefaultFilters:s}),[o,m,g,s]),v=x.useCallback(k=>{const P=bi(y,k.slug),E=eQ(k,f);i($=>{const O=$.filter(N=>N.slug!==k.slug);return E&&O.push(k),O}),a($=>{const O=new Set($);return O.delete(k.slug),O}),k.slug==="sorteren"?n({type:"sort_changed",from:Array.isArray(P)?P[0]:P,to:Array.isArray(k.value)?k.value[0]:k.value}):n({type:"filters_changed",filter:{slug:k.slug,from:P,to:k.value},activeFilters:n1({selectedFilters:o.filter($=>$.slug!==k.slug).concat(E?[k]:[]),defaultFilters:g,requiredFilters:m,removedDefaultFilters:new Set([...s].filter($=>$!==k.slug))})})},[f,y,n,g,s,o,m]),C=x.useCallback(k=>{const P=YX(k,qa(f,k.slug));if(P){k.value!==P&&v({slug:k.slug,value:P});return}const E=bi(y,k.slug),$=g.some(O=>O.slug===k.slug);i(O=>O.filter(N=>N.slug!==k.slug)),$&&a(O=>new Set([...O,k.slug])),n({type:"filters_changed",filter:{slug:k.slug,from:E,to:void 0},activeFilters:n1({selectedFilters:o.filter(O=>O.slug!==k.slug),defaultFilters:g,requiredFilters:m,removedDefaultFilters:$?new Set([...s,k.slug]):s})})},[g,y,n,s,o,m,f,v]),S=x.useCallback(k=>{const P=bi(y,k);return P===void 0?[]:Array.isArray(P)?P:[P]},[y]);return h.jsx(C6,{value:{activeFilters:y,filterOptions:f,sortOptions:b,distinctProperties:l,setDistinctProperties:c,handleFilterChange:v,handleFilterRemove:C,getActiveFilterValue:S},children:e})}function Yo(e,t){switch(t){case"price":return`€ ${e}`;case"data":return`${e===Qn?Ee.t("format.unlimited"):e/1e3} ${Ee.t("format.gigabyte")}`;case"minutes":return`${e===Qn?Ee.t("format.unlimited"):e} ${Ee.t("format.minutes_short")}`;case"sms":return`${e===Qn?Ee.t("format.unlimited"):e} ${Ee.t("format.sms")}`;case"months":return e%12===0?`${e/12} ${Ee.t("format.year",{count:e/12})}`:`${e} ${Ee.t("format.month",{count:e})}`;case"data_speed":return`${e/1e3} ${Ee.t("format.megabitPerSecond")}`;case"hours":return`${e} ${Ee.t("format.hour",{count:e})}`;case"inches":return`${e} ${Ee.t("format.inch")}`;case"centimeters":return`${e} ${Ee.t("format.centimeter")}`;case"milliamperes":return`${e} ${Ee.t("format.milliampere")}`;default:return`${e}`}}function rQ(e){return["ja","nee","0","1"].includes(e)}function P6(e){return new RegExp(/^\d*\.?\d*$/).test(e)}function E6(e){return new RegExp(/^\d*\.?\d*-\d*\.?\d*$/).test(e)}function T6(e){return!e.includes("nee")&&!e.includes("0")?[!0]:!e.includes("ja")&&!e.includes("1")?[!1]:[!0,!1]}function A6(e){return parseFloat(e)||0}function _6(e){if(e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return`${e[0]} ${Ee.t("format.or")} ${e[1]}`;const t=e.slice(0,-1),r=e[e.length-1];return`${t.join(", ")} ${Ee.t("format.or")} ${r}`}function nQ(e,t){const r=String(e||"");if(!r)return"";if(r.length<=t)return r;const n=r.substring(0,t-3),o=n.lastIndexOf(" ");return o>t*.6?`${n.substring(0,o)}...`:`${n}...`}function oQ(e,t){const r=Array.isArray(e.value)?e.value:[e.value];if(r.length!==0)return r.length<4?t.formatType?_6(r.map(n=>{const o=parseInt(n,10);return Number.isNaN(o)?t.options.find(i=>i.value===n)?.name||n:Yo(o,t.formatType)})):_6(r.map(n=>nQ(t.options.find(o=>o.value===n)?.name||n,20))):`${t.shortName} (${r.length})`}function iQ(e,t){const r=n=>`${t.shortName} (${n})`;switch(t.type){case"range":{const{from:n,to:o}=Co(e.value);return n===void 0||o===void 0?r(1):`${Yo(n,t.formatType)} - ${Yo(o,t.formatType)}`}case"min":{const{from:n}=Co(e.value);return n===void 0?r(1):`${Ee.t("format.startingFrom")} ${Yo(n,t.formatType)}`}case"max":{const{to:n}=Co(e.value);return n===void 0?r(1):`${Ee.t("format.to")} ${Yo(n,t.formatType)}`}case"checkbox":return oQ(e,t);case"radio":return typeof e.value!="string"?r(1):t.options.find(n=>n.value===e.value)?.name||e.value;default:return r(Array.isArray(e.value)?e.value.length:1)}}function Gs(e,t){return t.length===0?e:t.reduce((r,n)=>Math.abs(n-e)<Math.abs(r-e)?n:r)}var cu=(e=>(e.Avg="AVG",e.Cardinality="CARDINALITY",e.Max="MAX",e.Min="MIN",e.Sum="SUM",e))(cu||{});const o1=
|
|
375
|
+
`;function XX({path:e}){const{data:t}=Vo(e?[JX,{path:e}]:null,{use:[Yn],fetcher:nn});return t?.page}function S6(e){return e.filter(t=>Array.isArray(t.value)?t.value.length>0:t.value!==""&&t.value!==void 0&&t.value!==null)}function k6(e,t){return!e||e.trim()===""?[]:e.split("/").filter(r=>r.includes(":")).map(r=>{const n=r.split(":");if(n.length!==2)return null;const[o,i]=n,s=o.trim(),a=i.trim();if(a.endsWith("-")){const l=Number.parseInt(a.slice(0,-1),10);if(Number.isNaN(l))return null;const c=qa(t,s),d=c?.type==="range"?c.max:null;return{slug:s,value:`${l}-${d??Qn}`}}return{slug:s,value:a.includes(",")?a.split(",").map(l=>l.trim()):a}}).filter(r=>r!==null)}function QX(e){switch(e){case"sim-only-proposition":return"/elements/sim-only";case"fixed-proposition":return"/elements/internet-en-tv";case"smartphone-proposition":return"/elements/telefoon-met-abonnement";default:return}}function eQ(e,t){let r=!1;if(Array.isArray(e.value)?r=e.value.length>0:r=e.value!==""&&e.value!==void 0&&e.value!==null,r&&typeof e.value=="string"&&e.value.includes("-")){const n=qa(t,e.slug);if(n&&["range","min","max"].includes(n.type)){const{from:o,to:i}=Co(e.value);if(o!==void 0&&i!==void 0){const s=n.min||0,a=n.max||Qn;r=!(o<=s&&i>=a)}}}return r}function tQ({children:e,productCategory:t,initialSelectedFilters:r=[]}){const{onAction:n}=gi(),[o,i]=x.useState(S6(r)),[s,a]=x.useState(new Set),[l,c]=x.useState([]);zo(()=>{i(S6(r))},[JSON.stringify([...r].sort((k,P)=>k.slug.localeCompare(P.slug)))]);const d=XX({path:QX(t)}),f=(d?.pageFilters??[]).filter(k=>t!=="smartphone-proposition"||!bi(o,"telefoons")?!0:!["merk","opslag","kleur"].includes(k.slug)).sort((k,P)=>k.rank-P.rank),m=d?.filter?k6(d.filter,f):[],g=d?.filterDefaults?k6(d.filterDefaults,f):[],b=f.find(k=>k.slug==="sorteren")?.options??[],y=x.useMemo(()=>n1({selectedFilters:o,defaultFilters:g,requiredFilters:m,removedDefaultFilters:s}),[o,m,g,s]),v=x.useCallback(k=>{const P=bi(y,k.slug),E=eQ(k,f);i($=>{const O=$.filter(N=>N.slug!==k.slug);return E&&O.push(k),O}),a($=>{const O=new Set($);return O.delete(k.slug),O}),k.slug==="sorteren"?n({type:"sort_changed",from:Array.isArray(P)?P[0]:P,to:Array.isArray(k.value)?k.value[0]:k.value}):n({type:"filters_changed",filter:{slug:k.slug,from:P,to:k.value},activeFilters:n1({selectedFilters:o.filter($=>$.slug!==k.slug).concat(E?[k]:[]),defaultFilters:g,requiredFilters:m,removedDefaultFilters:new Set([...s].filter($=>$!==k.slug))})})},[f,y,n,g,s,o,m]),C=x.useCallback(k=>{const P=YX(k,qa(f,k.slug));if(P){k.value!==P&&v({slug:k.slug,value:P});return}const E=bi(y,k.slug),$=g.some(O=>O.slug===k.slug);i(O=>O.filter(N=>N.slug!==k.slug)),$&&a(O=>new Set([...O,k.slug])),n({type:"filters_changed",filter:{slug:k.slug,from:E,to:void 0},activeFilters:n1({selectedFilters:o.filter(O=>O.slug!==k.slug),defaultFilters:g,requiredFilters:m,removedDefaultFilters:$?new Set([...s,k.slug]):s})})},[g,y,n,s,o,m,f,v]),S=x.useCallback(k=>{const P=bi(y,k);return P===void 0?[]:Array.isArray(P)?P:[P]},[y]);return h.jsx(C6,{value:{activeFilters:y,filterOptions:f,sortOptions:b,distinctProperties:l,setDistinctProperties:c,handleFilterChange:v,handleFilterRemove:C,getActiveFilterValue:S},children:e})}function Yo(e,t){switch(t){case"price":return`€ ${e}`;case"data":return`${e===Qn?Ee.t("format.unlimited"):e/1e3} ${Ee.t("format.gigabyte")}`;case"minutes":return`${e===Qn?Ee.t("format.unlimited"):e} ${Ee.t("format.minutes_short")}`;case"sms":return`${e===Qn?Ee.t("format.unlimited"):e} ${Ee.t("format.sms")}`;case"months":return e%12===0?`${e/12} ${Ee.t("format.year",{count:e/12})}`:`${e} ${Ee.t("format.month",{count:e})}`;case"data_speed":return`${e/1e3} ${Ee.t("format.megabitPerSecond")}`;case"hours":return`${e} ${Ee.t("format.hour",{count:e})}`;case"inches":return`${e} ${Ee.t("format.inch")}`;case"centimeters":return`${e} ${Ee.t("format.centimeter")}`;case"milliamperes":return`${e} ${Ee.t("format.milliampere")}`;default:return`${e}`}}function rQ(e){return["ja","nee","0","1"].includes(e)}function P6(e){return new RegExp(/^\d*\.?\d*$/).test(e)}function E6(e){return new RegExp(/^\d*\.?\d*-\d*\.?\d*$/).test(e)}function T6(e){return!e.includes("nee")&&!e.includes("0")?[!0]:!e.includes("ja")&&!e.includes("1")?[!1]:[!0,!1]}function A6(e){return parseFloat(e)||0}function _6(e){if(e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return`${e[0]} ${Ee.t("format.or")} ${e[1]}`;const t=e.slice(0,-1),r=e[e.length-1];return`${t.join(", ")} ${Ee.t("format.or")} ${r}`}function nQ(e,t){const r=String(e||"");if(!r)return"";if(r.length<=t)return r;const n=r.substring(0,t-3),o=n.lastIndexOf(" ");return o>t*.6?`${n.substring(0,o)}...`:`${n}...`}function oQ(e,t){const r=Array.isArray(e.value)?e.value:[e.value];if(r.length!==0)return r.length<4?t.formatType?_6(r.map(n=>{const o=parseInt(n,10);return Number.isNaN(o)?t.options.find(i=>i.value===n)?.name||n:Yo(o,t.formatType)})):_6(r.map(n=>nQ(t.options.find(o=>o.value===n)?.name||n,20))):`${t.shortName} (${r.length})`}function iQ(e,t){const r=n=>`${t.shortName} (${n})`;switch(t.type){case"range":{const{from:n,to:o}=Co(e.value);return n===void 0||o===void 0?r(1):`${Yo(n,t.formatType)} - ${Yo(o,t.formatType)}`}case"min":{const{from:n}=Co(e.value);return n===void 0?r(1):`${Ee.t("format.startingFrom")} ${Yo(n,t.formatType)}`}case"max":{const{to:n}=Co(e.value);return n===void 0?r(1):`${Ee.t("format.to")} ${Yo(n,t.formatType)}`}case"checkbox":return oQ(e,t);case"radio":return typeof e.value!="string"?r(1):t.options.find(n=>n.value===e.value)?.name||e.value;default:return r(Array.isArray(e.value)?e.value.length:1)}}function Gs(e,t){return t.length===0?e:t.reduce((r,n)=>Math.abs(n-e)<Math.abs(r-e)?n:r)}var cu=(e=>(e.Avg="AVG",e.Cardinality="CARDINALITY",e.Max="MAX",e.Min="MIN",e.Sum="SUM",e))(cu||{});const o1=ft`
|
|
376
376
|
fragment PhoneSelectorPhone on Product {
|
|
377
377
|
slug
|
|
378
378
|
fullName
|
|
@@ -454,7 +454,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
`,$6=
|
|
457
|
+
`,$6=ft`
|
|
458
458
|
fragment ProductCardProduct on ProductVersion {
|
|
459
459
|
id
|
|
460
460
|
slug
|
|
@@ -535,7 +535,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
`,nh=
|
|
538
|
+
`,nh=ft`
|
|
539
539
|
fragment ProductCardProposition on Proposition {
|
|
540
540
|
key
|
|
541
541
|
creditFee
|
|
@@ -626,7 +626,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
626
626
|
stickerImageUrl
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
${$6}`;
|
|
629
|
+
${$6}`;ft`
|
|
630
630
|
query phoneSelectorPhones($brand: Value) {
|
|
631
631
|
searchProducts(
|
|
632
632
|
query: {where: [{col: "phone", value: true}, {col: "brand", value: $brand}, {col: "product_status", values: ["PREORDER", "PREPROCESSING", "NO_PROCESSING", "ACTIVE", "PHASING_OUT"]}], sort: "weight"}
|
|
@@ -636,7 +636,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
${o1}`,
|
|
639
|
+
${o1}`,ft`
|
|
640
640
|
query phoneSelectorBrands {
|
|
641
641
|
searchBrands(
|
|
642
642
|
query: {where: [{col: "product_status", values: ["PREORDER", "PREPROCESSING", "NO_PROCESSING", "ACTIVE", "PHASING_OUT"]}, {col: "phone", value: true}]}
|
|
@@ -648,7 +648,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
`,
|
|
651
|
+
`,ft`
|
|
652
652
|
query phoneSelectorDefaultProductVersion($slug: String!) {
|
|
653
653
|
product(slug: $slug) {
|
|
654
654
|
fullName
|
|
@@ -687,7 +687,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
`,
|
|
690
|
+
`,ft`
|
|
691
691
|
query phoneSelectorPopularPhones {
|
|
692
692
|
searchProducts(
|
|
693
693
|
query: {where: [{col: "phone", value: true}, {col: "product_status", values: ["PREORDER", "PREPROCESSING", "NO_PROCESSING", "ACTIVE", "PHASING_OUT"]}], sort: "weight", limit: 20}
|
|
@@ -697,7 +697,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
${o1}`,
|
|
700
|
+
${o1}`,ft`
|
|
701
701
|
query phoneSelectorProductVersion($slug: String!, $properties: [InputDistinctProperty!]!) {
|
|
702
702
|
product(slug: $slug) {
|
|
703
703
|
fullName
|
|
@@ -724,7 +724,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
`,
|
|
727
|
+
`,ft`
|
|
728
728
|
query getFixedProviderBlocks($version: String!, $productType: String!) {
|
|
729
729
|
modificationConfig(version: $version) {
|
|
730
730
|
fixedBlocks: blocks(types: ["fixed"], interface: $productType) {
|
|
@@ -737,7 +737,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
`,
|
|
740
|
+
`,ft`
|
|
741
741
|
query getOtherProviderBlocks($version: String!, $productType: String!) {
|
|
742
742
|
modificationConfig(version: $version) {
|
|
743
743
|
otherBlocks: blocks(types: ["segment", "mobile"], interface: $productType) {
|
|
@@ -752,7 +752,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
|
-
`;const sQ=
|
|
755
|
+
`;const sQ=ft`
|
|
756
756
|
query resultsFixedPropositions($query: ElasticQuery!, $modificationBlocks: [InputModificationBlock], $postcode: String, $number: Int, $numberAddon: String) {
|
|
757
757
|
fetchInfo(
|
|
758
758
|
productCategory: "fixed-proposition"
|
|
@@ -797,7 +797,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
-
${nh}`,aQ=
|
|
800
|
+
${nh}`,aQ=ft`
|
|
801
801
|
query resultsSimOnlyPropositions($query: ElasticQuery!, $modificationBlocks: [InputModificationBlock]) {
|
|
802
802
|
search: searchPropositions(
|
|
803
803
|
query: $query
|
|
@@ -832,7 +832,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
${nh}`,lQ=
|
|
835
|
+
${nh}`,lQ=ft`
|
|
836
836
|
query resultsSmartphonePropositions($query: ElasticQuery!, $modificationBlocks: [InputModificationBlock]) {
|
|
837
837
|
search: searchPropositions(
|
|
838
838
|
query: $query
|
|
@@ -867,7 +867,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
${nh}`,uQ=
|
|
870
|
+
${nh}`,uQ=ft`
|
|
871
871
|
query resultsSmartphonePropositionsExtended($query: ElasticQuery!, $modificationBlocks: [InputModificationBlock]) {
|
|
872
872
|
search: searchPropositions(
|
|
873
873
|
query: $query
|
|
@@ -893,7 +893,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
${nh}`;
|
|
896
|
+
${nh}`;ft`
|
|
897
897
|
query pageByPath($path: String) {
|
|
898
898
|
page(path: $path) {
|
|
899
899
|
productCategory
|
|
@@ -927,11 +927,11 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
`,
|
|
930
|
+
`,ft`
|
|
931
931
|
query textContent($key: String!) {
|
|
932
932
|
textContent(key: $key)
|
|
933
933
|
}
|
|
934
|
-
`,
|
|
934
|
+
`,ft`
|
|
935
935
|
query postcodeCheck($postcode: String!, $number: Int!, $numberAddon: String!) {
|
|
936
936
|
postcode(postcode: $postcode, number: $number, numberAddon: $numberAddon) {
|
|
937
937
|
address {
|
|
@@ -940,11 +940,11 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
|
-
`,
|
|
943
|
+
`,ft`
|
|
944
944
|
mutation addPartnerProfile($data: InputPartnerProfile!) {
|
|
945
945
|
addPartnerProfile(data: $data)
|
|
946
946
|
}
|
|
947
|
-
`,
|
|
947
|
+
`,ft`
|
|
948
948
|
mutation partnerCustomerSegment($msisdn: String!, $birthdate: String!, $providerSlug: String!, $origin: PartnerOrigin!) {
|
|
949
949
|
partnerCustomerSegment(
|
|
950
950
|
msisdn: $msisdn
|
|
@@ -956,11 +956,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
956
956
|
state
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
`,
|
|
960
|
-
query customerSegmentStale($providerSlug: String!, $lastCheckedAt: String!) {
|
|
961
|
-
customerSegmentStale(providerSlug: $providerSlug, lastCheckedAt: $lastCheckedAt)
|
|
962
|
-
}
|
|
963
|
-
`,dt`
|
|
959
|
+
`,ft`
|
|
964
960
|
query proposition($key: String!) {
|
|
965
961
|
proposition(key: $key, version: "release") {
|
|
966
962
|
key
|
|
@@ -1067,7 +1063,7 @@ ${String(e)}`)}catch(t){return t}},eT=e=>{if(typeof e!="object"||e===null)throw
|
|
|
1067
1063
|
}
|
|
1068
1064
|
}
|
|
1069
1065
|
${$6}
|
|
1070
|
-
${o1}`,
|
|
1066
|
+
${o1}`,ft`
|
|
1071
1067
|
query propositionSelector($key: String!, $productType: String!, $provider: String!, $currentProvider: String, $product: String, $modificationBlocks: [InputModificationBlock], $postcode: String, $number: Int, $numberAddon: String, $internal: Boolean) {
|
|
1072
1068
|
propositionSelector: bundleSelector(
|
|
1073
1069
|
version: "release"
|
|
@@ -1122,6 +1118,7 @@ ${o1}`,dt`
|
|
|
1122
1118
|
unitKey
|
|
1123
1119
|
name
|
|
1124
1120
|
label
|
|
1121
|
+
tooltipText
|
|
1125
1122
|
usps
|
|
1126
1123
|
requiredBundleTypeSetId
|
|
1127
1124
|
requiredModificationGroupId
|
|
@@ -1158,7 +1155,7 @@ ${o1}`,dt`
|
|
|
1158
1155
|
creditFee
|
|
1159
1156
|
}
|
|
1160
1157
|
}
|
|
1161
|
-
`,
|
|
1158
|
+
`,ft`
|
|
1162
1159
|
query searchAvailableFixedProposition($query: ElasticQuery!, $postcode: String!, $number: Int!, $numberAddon: String!) {
|
|
1163
1160
|
fetchInfo(
|
|
1164
1161
|
productCategory: "fixed-proposition"
|
|
@@ -1183,7 +1180,7 @@ ${o1}`,dt`
|
|
|
1183
1180
|
}
|
|
1184
1181
|
}
|
|
1185
1182
|
}
|
|
1186
|
-
`,
|
|
1183
|
+
`,ft`
|
|
1187
1184
|
query getModificationBlocks($version: String!, $productType: String!) {
|
|
1188
1185
|
modificationConfig(version: $version) {
|
|
1189
1186
|
fixedBlocks: blocks(types: ["fixed"], interface: $productType) {
|
|
@@ -1207,7 +1204,7 @@ ${o1}`,dt`
|
|
|
1207
1204
|
}
|
|
1208
1205
|
}
|
|
1209
1206
|
}
|
|
1210
|
-
`,
|
|
1207
|
+
`,ft`
|
|
1211
1208
|
query getAllProviders {
|
|
1212
1209
|
providers {
|
|
1213
1210
|
slug
|
|
@@ -1275,11 +1272,11 @@ ${r.join(`
|
|
|
1275
1272
|
|
|
1276
1273
|
`)}return v.write("payload.value = newResult;"),v.write("return payload;"),v.compile()};let s;const a=ah,l=!yi.jitless,d=l&&fee.value,f=t.catchall;let m;e._zod.parse=(g,b)=>{m??(m=n.value);const y=g.value;return a(y)?l&&d&&b?.async===!1&&b.jitless!==!0?(s||(s=i(t.shape)),g=s(g,b),f?_I([],y,g,b,m,e,b?.abortEarly===!0):g):r(g,b):(g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g)}});function $I(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!Ji(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>fu(s,n,Xs())))}),t)}const _re=ye("$ZodUnion",(e,t)=>{Rr.init(e,t),Zt(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Zt(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Zt(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),Zt(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){const o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>f1(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1;const s=[];for(const a of t.options){const l=a._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(a=>$I(a,n,e,o)):$I(s,n,e,o)}}),$re=ye("$ZodIntersection",(e,t)=>{Rr.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,c])=>II(r,l,c)):II(r,i,s)}});function T1(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(zc(e)&&zc(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const i of n){if(i==="__proto__")continue;const s=T1(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],s=T1(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function II(e,t,r){const n=new Map;let o;const i=new Map,s=(c,d)=>{let f;if(c.code==="unrecognized_keys"&&!c.path?.length)o??(o=c),f=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){const m=String(c.path[0]);i.has(m)||i.set(m,c),f=[m]}else return!1;for(const m of f)n.has(m)||n.set(m,{}),n.get(m)[d]=!0;return!0};for(const c of t.issues)s(c,"l")||e.issues.push(c);for(const c of r.issues)s(c,"r")||e.issues.push(c);const a=[...n].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(a.length){const c=o?a.filter(d=>o.keys.includes(d)):[];c.length&&e.issues.push({...o,keys:c});for(const d of a)!c.includes(d)&&i.has(d)&&e.issues.push(i.get(d))}const l=T1(t.value,r.value);if(!l.valid){if(Ji(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}const Ire=ye("$ZodEnum",(e,t)=>{Rr.init(e,t);const r=u1(t.entries),n=new Set(r);e._zod.values=n,Zt(e,"pattern",o=>{const i=u1(o.def.entries).filter(s=>pee.has(typeof s));return new RegExp(i.length?`^(${i.map(s=>lh(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{const s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),Nre=ye("$ZodTransform",(e,t)=>{Rr.init(e,t),e._zod.optin="optional",yi.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hI(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Xa;return r.value=o,r}});function NI(e,t){return e.value=t.issues.length?void 0:t.value,e}const DI=ye("$ZodOptional",(e,t)=>{Rr.init(e,t),Zt(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Zt(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),Zt(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${f1(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>NI(r,i)):NI(r,o)}return t.innerType._zod.run(r,n)}}),Dre=ye("$ZodExactOptional",(e,t)=>{DI.init(e,t),Zt(e,"values",r=>r.def.innerType._zod.values),Zt(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),Mre=ye("$ZodNullable",(e,t)=>{Rr.init(e,t),Zt(e,"optin",r=>r.def.innerType._zod.optin),Zt(e,"optout",r=>r.def.innerType._zod.optout),Zt(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${f1(n.source)}|null)$`):void 0}),Zt(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),Ore=ye("$ZodDefault",(e,t)=>{Rr.init(e,t),e._zod.optin="defaulted",Zt(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>MI(i,t)):MI(o,t)}});function MI(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const jre=ye("$ZodPrefault",(e,t)=>{Rr.init(e,t),e._zod.optin="defaulted",Zt(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),Lre=ye("$ZodNonOptional",(e,t)=>{Rr.init(e,t),Zt(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>OI(i,e)):OI(o,e)}});function OI(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function jI(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>fu(o,n,Xs()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Fre=ye("$ZodCatch",(e,t)=>{Rr.init(e,t),Zt(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Zt(e,"optout",r=>r.def.innerType._zod.optout),Zt(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>jI(r,i,t,n)):jI(r,o,t,n)}}),Bre=ye("$ZodPipe",(e,t)=>{Rr.init(e,t),Zt(e,"values",r=>r.def.in._zod.values),Zt(e,"optin",r=>r.def.in._zod.optin),Zt(e,"optout",r=>r.def.out._zod.optout),Zt(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>hh(s,t.in,n)):hh(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>hh(i,t.out,n)):hh(o,t.out,n)}});function hh(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const zre=ye("$ZodReadonly",(e,t)=>{Rr.init(e,t),Zt(e,"propValues",r=>r.def.innerType._zod.propValues),Zt(e,"values",r=>r.def.innerType._zod.values),Zt(e,"optin",r=>r.def.innerType?._zod?.optin),Zt(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(LI):LI(o)}});function LI(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Kre=ye("$ZodCustom",(e,t)=>{xi.init(e,t),Rr.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>FI(i,r,n,e));FI(o,r,n,e)}});function FI(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Vc(o))}}class Vre extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const A1="~memo",BI=[];function zI(e){return e!==null&&typeof e=="object"}function _1(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const KI=new WeakMap,Rc=0,mh=1,Wc=2;function gh(e,t,r){const n=KI.get(e);if(n!==void 0)return n?Wc:Rc;if(t.has(e))return Wc;t.add(e);let o=Rc;const i=d=>{if(o!==Wc&&d?._zod){const f=gh(d,t);f>o&&(o=f)}},s=(d,f)=>{let m=Rc;for(const g of Reflect.ownKeys(d)){const b=Object.getOwnPropertyDescriptor(d,g);if(!b.enumerable)continue;const y=b.get?mh:b.value?._zod?gh(b.value,t):Rc;y>m&&(m=y)}return m},a=d=>{d>o&&(o=d)},l=e._zod.def;switch(l.type){case"object":{const d=tI(l);a(d?s(d):mh),i(l.catchall);break}case"array":i(l.element);break;case"tuple":for(const d of l.items)i(d);i(l.rest);break;case"record":case"map":i(l.keyType),i(l.valueType);break;case"set":i(l.valueType);break;case"union":for(const d of l.options)i(d);break;case"intersection":i(l.left),i(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(l.innerType);break;case"pipe":i(l.in),i(l.out);break;case"function":i(l.input),i(l.output);break;case"lazy":{const d=l._cachedInner??void 0;a(d?gh(d,t):mh);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const d in l){const f=Object.getOwnPropertyDescriptor(l,d);if(!f||f.get)continue;const m=f.value;if(!(!m||typeof m!="object")){if(m._zod)i(m);else if(Array.isArray(m))for(const g of m)i(g)}}}return t.delete(e),Rre(e,o)}function Rre(e,t){return t!==mh&&KI.set(e,t===Wc),t}function Wre(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}let bh;const vh=[],Ure={alloc(e,t,r){const n=bh;if(!n)return r;bh=void 0;const o={value:r,issues:null};return n.set(t.value,o),vh.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&qre(i,o.value))throw new Vre;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const s=e._zod.parse,a=(l,c)=>{if(r===void 0){const C=gh(e,new Set);if(C===Rc)return e._zod.parse=s,e._zod.run===a&&(e._zod.run=s),s(l,c);C===Wc||n?r=!0:n=!0}const d=l.value;if(!zI(d))return s(l,c);let f=c[A1];f||(f={buckets:new WeakMap,backEdges:void 0},c[A1]=f);let m;o===c?m=i:(m=Wre(f,e),o=c,i=m);const g=m.get(d);if(g)return l.value=g.value,g.issues?g.issues.length&&l.issues.push(..._1(g.issues)):(l.memo=!0,f.backEdges??(f.backEdges=new WeakSet),f.backEdges.add(g.value)),l;bh=m;const b=vh.length,y=s(l,c);bh=void 0;const v=vh.length>b?vh.pop():void 0;return y instanceof Promise?y.then(C=>(v&&(v.issues=C.issues.length?_1(C.issues):BI),C)):(v&&(v.issues=y.issues.length?_1(y.issues):BI),y)};e._zod.parse=a,e._zod.run===s&&(e._zod.run=a)})}};function Hre(){return Ure}function qre(e,t){const r=e[A1]?.backEdges;return r!==void 0&&zI(t)&&r.has(t)}const Gre=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):n[i]??i}return i=>{switch(i.code){case"invalid_type":{const s=o(i.expected),a=Pee(i.input),l=o(a,i.input);return`Invalid input: expected ${s}, received ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${sI(i.values[0])}`:`Invalid option: expected one of ${eI(i.values,"|")}`;case"too_big":{const s=i.exact?"exactly ":i.inclusive?"<=":"<",a=t(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{const s=i.exact?"exactly ":i.inclusive?">=":">",a=t(i.origin);return a?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{const s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${eI(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(a=>`'${a}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Zre(){return{localeError:Gre()}}var VI;class Yre{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Jre(){return new Yre}(VI=globalThis).__zod_globalRegistry??(VI.__zod_globalRegistry=Jre());const Uc=globalThis.__zod_globalRegistry;function Xre(e){return e.checks&&(e.checks=[...e.checks]),e}function Qre(e,t){return new e(Xre({type:"string",...Qe(t)}))}function ene(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Qe(t)})}function tne(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Qe(t)})}function rne(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Qe(t)})}function nne(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Qe(t)})}function one(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Qe(t)})}function ine(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Qe(t)})}function sne(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Qe(t)})}function ane(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Qe(t)})}function lne(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Qe(t)})}function une(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Qe(t)})}function cne(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Qe(t)})}function dne(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Qe(t)})}function fne(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Qe(t)})}function pne(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Qe(t)})}function hne(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Qe(t)})}function mne(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Qe(t)})}function gne(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Qe(t)})}function bne(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Qe(t)})}function vne(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Qe(t)})}function yne(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Qe(t)})}function xne(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Qe(t)})}function wne(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Qe(t)})}function Cne(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Qe(t)})}function Sne(e,t){return new e({type:"string",format:"date",check:"string_format",...Qe(t)})}function kne(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Qe(t)})}function Pne(e,t){return new e({type:"string",format:"duration",check:"string_format",...Qe(t)})}function Ene(e,t){return new e({type:"boolean",...Qe(t)})}function Tne(e){return new e({type:"unknown"})}function Ane(e,t){return new e({type:"never",...Qe(t)})}function RI(e,t){return new _te({check:"max_length",...Qe(t),maximum:e})}function yh(e,t){return new $te({check:"min_length",...Qe(t),minimum:e})}function WI(e,t){return new Ite({check:"length_equals",...Qe(t),length:e})}function _ne(e,t){return new Nte({check:"string_format",format:"regex",...Qe(t),pattern:e})}function $ne(e){return new Dte({check:"string_format",format:"lowercase",...Qe(e)})}function Ine(e){return new Mte({check:"string_format",format:"uppercase",...Qe(e)})}function Nne(e,t){return new Ote({check:"string_format",format:"includes",...Qe(t),includes:e})}function Dne(e,t){return new jte({check:"string_format",format:"starts_with",...Qe(t),prefix:e})}function Mne(e,t){return new Lte({check:"string_format",format:"ends_with",...Qe(t),suffix:e})}function pu(e){return new Fte({check:"overwrite",tx:e})}function One(e){return pu(t=>t.normalize(e))}function jne(){return pu(e=>e.trim())}function Lne(){return pu(e=>e.toLowerCase())}function Fne(){return pu(e=>e.toUpperCase())}function Bne(){return pu(e=>dee(e))}function zne(e,t,r){return new e({type:"array",element:t,...Qe(r)})}function Kne(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Qe(r)})}function Vne(e,t){const r=Rne(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Vc(o,n.value,r._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(Vc(i))}},e(n.value,n)),t);return r}function Rne(e,t){const r=new xi({check:"custom",...Qe(t)});return r._zod.check=e,r}function Hc(e,...t){for(const r of t)for(const n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&Ya(e,n,r[n]);return e}function UI(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Uc,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function qc(e,t,r,n,o){const i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function on(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{const m=s.schema,g=t.processors[o.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);g(e,t,m,d)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),on(f,t,d),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Hc(s.schema,l),t.io==="input"&&An(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function HI(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function qI(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const n=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const l=n.get(a);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,m=e.external.uri??(b=>b);if(f)return{ref:m(f)};const g=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=g,{defId:g,ref:`${m("__shared")}#/${a}/${HI(g)}`}}const l="#",c=`${l}/${a}/`;if(s[1]===r&&!s[1].schema.id)return{ref:l};const d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+HI(d)}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:l,defId:c}=o(s);a.def={...a.schema},c&&(a.defId=c);const d=a.schema;for(const f in d)delete d[f];d.$ref=l};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
1277
1274
|
|
|
1278
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}a.count>1&&e.reused==="ref"&&i(s)}e.external&&(e.sharedDefsExtractedFor=e.external)}function GI(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const n of t){if(!n||typeof n!="object")return;GI(n);const o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;const i=n.type;for(const s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}const ZI=new Set(["type","properties","required","additionalProperties"]),YI=["oneOf","anyOf"];function JI(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function $1(e){const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const s in i)if(!ZI.has(s))return null;t.push(i)}const r={},n=new Set;for(const i of t){for(const s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;const a=[];for(const c of t){const d=c.properties?.[s]??JI(c);d!=null&&(a.some(f=>JSON.stringify(f)===JSON.stringify(d))||a.push(d))}const l=a.length===1?a[0]:$1(a)??{allOf:a};Ya(r,s,l)}for(const s of i.required??[])n.add(s)}const o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const s of t){const a=JI(s);a&&!i.some(l=>JSON.stringify(l)===JSON.stringify(a))&&i.push(a)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Wne(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of ZI)if(o in e)return;const r=t.filter(o=>YI.some(i=>Array.isArray(o[i])));let n=null;if(!r.length)n=$1(t);else{const o=r[0],i=YI.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;const s=t.filter(l=>l!==o),a=o[i].map(l=>$1([...s,l]));if(a.some(l=>!l))return;n={[i]:a}}n&&(delete e.allOf,Hc(e,n))}function XI(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const l=e.seen.get(a);if(l.ref===null)return;const c=l.def??l.schema,d={...c},f=l.ref;if(l.ref=null,f){n(f);const g=e.seen.get(f),b=g.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(b)):Hc(c,b),Hc(c,d),a._zod.parent===f)for(const v in c)v==="$ref"||v==="allOf"||v in d||delete c[v];if(b.$ref&&g.def)for(const v in c)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(c[v])===JSON.stringify(g.def[v])&&delete c[v]}const m=a._zod.parent;if(m&&m!==f){n(m);const g=e.seen.get(m);if(g?.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(const b in c)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(c[b])===JSON.stringify(g.def[b])&&delete c[b]}e.override({zodSchema:a,jsonSchema:c,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const a of[...e.seen.entries()].reverse())n(a[0]);if(e.target!=="openapi-3.0")for(const a of e.seen.entries())GI(a[1].def??a[1].schema);for(const a of e.deferred)a();if(e.intersections.length){const a=new Map;for(const l of e.seen.values())for(const c of[l.schema,l.def]){const d=c?.allOf;if(!Array.isArray(d))continue;const f=a.get(d);f?f.push(c):a.set(d,[c])}for(const l of e.intersections)for(const c of a.get(l)??[])Wne(c)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Hc(o,r.defId?r.schema:r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,Ya(s,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:xh(t,"input",e.processors),output:xh(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function An(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return An(n.element,r);if(n.type==="set")return An(n.valueType,r);if(n.type==="lazy")return An(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return An(n.innerType,r);if(n.type==="intersection")return An(n.left,r)||An(n.right,r);if(n.type==="record"||n.type==="map")return An(n.keyType,r)||An(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:An(n.in,r)||An(n.out,r);if(n.type==="object"){for(const o in n.shape)if(An(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(An(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(An(o,r))return!0;return!!(n.rest&&An(n.rest,r))}return!1}const Une=(e,t={})=>r=>{const n=UI({...r,processors:t});return on(e,n),qI(n,e),XI(n,e)},xh=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=UI({...o??{},target:i,io:t,processors:r});return on(e,s),qI(s,e),XI(s,e)},hu=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},mu=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},QI=(e,t)=>{hu(e,"minimum",t),mu(e,"maximum",t)},eN=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},tN=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},rN=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},nN=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},oN=(e,t)=>hu(e,"minimum",t.minimum),iN=(e,t)=>mu(e,"maximum",t.maximum),sN=e=>(t,r)=>{nN(t,r.format);const[n,o]=e[r.format];hu(t,"minimum",n),mu(t,"maximum",o)},Hne={greater_than:(e,t)=>hu(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>mu(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>eN(e,t.value),number_format:sN(mee),bigint_format:sN(gee),min_length:oN,max_length:iN,length_equals:(e,t)=>QI(e,t.length),min_size:oN,max_size:iN,size_equals:(e,t)=>QI(e,t.size),string_format:(e,t)=>{nN(e,t.format),t.pattern&&tN(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>rN(e,t.mime)};function Gc(e){const t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(const i of n)Hne[i._zod.def.check]?.(t,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&hu(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&hu(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&mu(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&mu(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&eN(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&rN(t,o.mime);for(const i of o.patterns??[])tN(t,i);return t}const qne={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Gne=new Map([[EI,bte],[E1,vte]]),Zne=e=>Gne.get(e)??e,Yne=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:l,contentEncoding:c,laxFormat:d}=Gc(e);if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=qne[a]??a,o.format===""&&delete o.format,(a==="time"||d)&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){const f=[...l].map(Zne);f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Jne=(e,t,r,n)=>{r.type="boolean"},Xne=(e,t,r,n)=>{r.not={}},Qne=(e,t,r,n)=>{},eoe=(e,t,r,n)=>{const o=e._zod.def,i=u1(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},toe=(e,t,r,n)=>{qc(e,t,r,n,"Custom types cannot be represented in JSON Schema")},roe=(e,t,r,n)=>{qc(e,t,r,n,"Transforms cannot be represented in JSON Schema")},noe=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=Gc(e);typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=on(i.element,t,{...n,path:[...n.path,"items"]})};function I1(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?I1(t.out):t.type==="catch"?I1(t.innerType):e._zod.optin}const ooe=(e,t,r,n)=>{const o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&qc(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const c in s)Ya(o.properties,c,on(s[c],t,{...n,path:[...n.path,"properties",c]}));const l=[];for(const c of Object.keys(s)){const d=i.shape[c];(t.io==="input"?I1(d)===void 0:d._zod.optout===void 0)&&l.push(c)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=on(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},ioe=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,l)=>on(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=s:r.anyOf=s},soe=(e,t,r,n)=>{const o=e._zod.def,i=on(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=on(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=l,t.intersections.push(l)},aoe=(e,t,r,n)=>{const o=e._zod.def,i=on(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},loe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},N1=Symbol();function aN(e,t,r,n,o){let i=!1;const s=JSON.stringify(e,(a,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(qc(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),N1):JSON.parse(s)}const uoe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;const s=aN(o.defaultValue,e,t,r,n);s!==N1&&(r.default=s)},coe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;const s=aN(o.defaultValue,e,t,r,n);s!==N1&&(r._prefault=s)},doe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{qc(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},foe=(e,t,r,n)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;on(s,t,n);const a=t.seen.get(e);a.ref=s},poe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},lN=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},uN=new WeakSet([Object.prototype,Error.prototype]);function wh(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}const So=ye("ZodError",(e,t)=>{Fee.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);uN.has(r)||(uN.add(r),wh(r,"format",n=>o=>Kee(n,o)),wh(r,"flatten",n=>o=>zee(n,o)),wh(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,c1,2)}),wh(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,c1,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),hoe=y1(So),moe=x1(So),goe=w1(So),boe=C1(So),voe=qee(So),yoe=Gee(So),xoe=Zee(So),woe=Yee(So),Coe=Jee(So),Soe=Xee(So),koe=Qee(So),Poe=ete(So);function Eoe(){yi.localeError||Xs(Zre())}function D1(){yi.memoizer||Xs({memoizer:Hre()})}const Wr=ye("ZodType",(e,t)=>(Eoe(),Rr.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(eo(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Zs(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Cie(e,t))},superRefine(e,t){return this.check(Sie(e,t))},overwrite(e){return this.check(pu(e))},optional(){return mN(this)},exactOptional(){return uie(this)},nullable(){return bN(this)},nullish(){return mN(bN(this))},nonoptional(e){return mie(this,e)},array(){return fN(this)},or(e){return oie([this,e])},and(e){return sie(this,e)},transform(e){return yN(this,lie(e))},default(e){return fie(this,e)},prefault(e){return hie(this,e)},catch(e){return bie(this,e)},pipe(e){return yN(this,e)},readonly(){return xie(this)},describe(e){const t=this.clone();return Uc.add(t,{description:e}),t},meta(...e){if(e.length===0)return Uc.get(this);const t=this.clone();return Uc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return dI(this,"~standard",{...xI(this),jsonSchema:{input:xh(this,"input"),output:xh(this,"output")}})},set"~standard"(e){Ys(this,"~standard",e)},parse:function e(t,r){return hoe(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await moe(this,t,r,{callee:e})},safeParse(e,t){return goe(this,e,t)},async safeParseAsync(e,t){return boe(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ys(this,"spa",e)},validate(e,t){return Wee(this,e,t)},validateAsync(e,t){return Hee(this,e,t)},encode:function e(t,r){return voe(this,t,r,{callee:e})},decode:function e(t,r){return yoe(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await xoe(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await woe(this,t,r,{callee:e})},safeEncode(e,t){return Coe(this,e,t)},safeDecode(e,t){return Soe(this,e,t)},async safeEncodeAsync(e,t){return koe(this,e,t)},async safeDecodeAsync(e,t){return Poe(this,e,t)},toJSONSchema(e){return Une(this,{})(e)},get description(){return Uc.get(this)?.description},get _def(){return this._zod.def}}),cN=ye("_ZodString",(e,t)=>{P1.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Yne(e,r,n)},Tee({format:e=>Gc(e).format??null,minLength:e=>Gc(e).minimum??null,maxLength:e=>Gc(e).maximum??null},{regex(...e){return this.check(_ne(...e))},includes(...e){return this.check(Nne(...e))},startsWith(...e){return this.check(Dne(...e))},endsWith(...e){return this.check(Mne(...e))},min(...e){return this.check(yh(...e))},max(...e){return this.check(RI(...e))},length(...e){return this.check(WI(...e))},nonempty(...e){return this.check(yh(1,...e))},lowercase(e){return this.check($ne(e))},uppercase(e){return this.check(Ine(e))},trim(){return this.check(jne())},normalize(...e){return this.check(One(...e))},toLowerCase(){return this.check(Lne())},toUpperCase(){return this.check(Fne())},slugify(){return this.check(Bne())}})),Toe=ye("ZodString",(e,t)=>{P1.init(e,t),cN.init(e,t)},{email(e){return this.check(ene(Noe,e))},url(e){return this.check(sne(Moe,e))},jwt(e){return this.check(wne(Zoe,e))},emoji(e){return this.check(ane(Ooe,e))},guid(e){return this.check(tne(Doe,e))},uuid(e){return this.check(rne(Ch,e))},uuidv4(e){return this.check(nne(Ch,e))},uuidv6(e){return this.check(one(Ch,e))},uuidv7(e){return this.check(ine(Ch,e))},nanoid(e){return this.check(lne(joe,e))},cuid(e){return this.check(une(Loe,e))},cuid2(e){return this.check(cne(Foe,e))},ulid(e){return this.check(dne(Boe,e))},base64(e){return this.check(vne(Hoe,e))},base64url(e){return this.check(yne(qoe,e))},xid(e){return this.check(fne(zoe,e))},ksuid(e){return this.check(pne(Koe,e))},ipv4(e){return this.check(hne(Voe,e))},ipv6(e){return this.check(mne(Roe,e))},cidrv4(e){return this.check(gne(Woe,e))},cidrv6(e){return this.check(bne(Uoe,e))},e164(e){return this.check(xne(Goe,e))},datetime(e){return this.check(Cne(Aoe,e))},date(e){return this.check(Sne(_oe,e))},time(e){return this.check(kne($oe,e))},duration(e){return this.check(Pne(Ioe,e))}});function ko(e){return Qre(Toe,e)}const Cr=ye("ZodStringFormat",(e,t)=>{gr.init(e,t),cN.init(e,t)}),Aoe=ye("ZodISODateTime",(e,t)=>{ore.init(e,t),Cr.init(e,t)}),_oe=ye("ZodISODate",(e,t)=>{ire.init(e,t),Cr.init(e,t)}),$oe=ye("ZodISOTime",(e,t)=>{sre.init(e,t),Cr.init(e,t)}),Ioe=ye("ZodISODuration",(e,t)=>{are.init(e,t),Cr.init(e,t)}),Noe=ye("ZodEmail",(e,t)=>{Wte.init(e,t),Cr.init(e,t)}),Doe=ye("ZodGUID",(e,t)=>{Vte.init(e,t),Cr.init(e,t)}),Ch=ye("ZodUUID",(e,t)=>{Rte.init(e,t),Cr.init(e,t)}),Moe=ye("ZodURL",(e,t)=>{Yte.init(e,t),Cr.init(e,t)}),Ooe=ye("ZodEmoji",(e,t)=>{Jte.init(e,t),Cr.init(e,t)}),joe=ye("ZodNanoID",(e,t)=>{Xte.init(e,t),Cr.init(e,t)}),Loe=ye("ZodCUID",(e,t)=>{Qte.init(e,t),Cr.init(e,t)}),Foe=ye("ZodCUID2",(e,t)=>{ere.init(e,t),Cr.init(e,t)}),Boe=ye("ZodULID",(e,t)=>{tre.init(e,t),Cr.init(e,t)}),zoe=ye("ZodXID",(e,t)=>{rre.init(e,t),Cr.init(e,t)}),Koe=ye("ZodKSUID",(e,t)=>{nre.init(e,t),Cr.init(e,t)}),Voe=ye("ZodIPv4",(e,t)=>{lre.init(e,t),Cr.init(e,t)}),Roe=ye("ZodIPv6",(e,t)=>{cre.init(e,t),Cr.init(e,t)}),Woe=ye("ZodCIDRv4",(e,t)=>{dre.init(e,t),Cr.init(e,t)}),Uoe=ye("ZodCIDRv6",(e,t)=>{pre.init(e,t),Cr.init(e,t)}),Hoe=ye("ZodBase64",(e,t)=>{hre.init(e,t),Cr.init(e,t)}),qoe=ye("ZodBase64URL",(e,t)=>{gre.init(e,t),Cr.init(e,t)}),Goe=ye("ZodE164",(e,t)=>{bre.init(e,t),Cr.init(e,t)}),Zoe=ye("ZodJWT",(e,t)=>{yre.init(e,t),Cr.init(e,t)}),Yoe=ye("ZodBoolean",(e,t)=>{xre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jne(e,r,n)});function Joe(e){return Ene(Yoe,e)}const Xoe=ye("ZodUnknown",(e,t)=>{wre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qne()});function dN(){return Tne(Xoe)}const Qoe=ye("ZodNever",(e,t)=>{Cre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xne(e,r,n)});function eie(e){return Ane(Qoe,e)}const tie=ye("ZodArray",(e,t)=>{D1(),Pre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>noe(e,r,n,o),e.element=t.element},{min(e,t){return this.check(yh(e,t))},nonempty(e){return this.check(yh(1,e))},max(e,t){return this.check(RI(e,t))},length(e,t){return this.check(WI(e,t))},unwrap(){return this.element}});function fN(e,t){return zne(tie,e,t)}const rie=ye("ZodObject",(e,t)=>{D1(),Are.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ooe(e,r,n,o),Iee(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return pN(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(eo(this._zod.def,{catchall:e}))},passthrough(){return this.clone(eo(this._zod.def,{catchall:dN()}))},loose(){return this.clone(eo(this._zod.def,{catchall:dN()}))},strict(){return this.clone(eo(this._zod.def,{catchall:eie()}))},strip(){return this.clone(eo(this._zod.def,{catchall:void 0}))},extend(e){return yee(this,e)},safeExtend(e){return xee(this,e)},merge(e){return wee(this,e)},pick(e){return bee(this,e)},omit(e){return vee(this,e)},partial(...e){return lI(hN,this,e[0])},exactPartial(...e){return lI(gN,this,e[0],"exactPartial")},required(...e){return Cee(vN,this,e[0])}});function M1(e,t){const r={type:"object",shape:e??{},...Qe(t)};return new rie(r)}const nie=ye("ZodUnion",(e,t)=>{_re.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ioe(e,r,n,o),e.options=t.options});function oie(e,t){return new nie({type:"union",options:e,...Qe(t)})}const iie=ye("ZodIntersection",(e,t)=>{$re.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>soe(e,r,n,o)});function sie(e,t){return new iie({type:"intersection",left:e,right:t})}const O1=ye("ZodEnum",(e,t)=>{Ire.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>eoe(e,n,o),e.enum=t.entries,e.options=[...e._zod.values];const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new O1({...t,checks:[],...Qe(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new O1({...t,checks:[],...Qe(o),entries:i})}});function pN(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new O1({type:"enum",entries:r,...Qe(t)})}const aie=ye("ZodTransform",(e,t)=>{D1(),Nre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>roe(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hI(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Vc(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Vc(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function lie(e){return new aie({type:"transform",transform:e})}const hN=ye("ZodOptional",(e,t)=>{DI.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lN(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function mN(e){return new hN({type:"optional",innerType:e})}const gN=ye("ZodExactOptional",(e,t)=>{Dre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lN(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function uie(e){return new gN({type:"optional",innerType:e})}const cie=ye("ZodNullable",(e,t)=>{Mre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>aoe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function bN(e){return new cie({type:"nullable",innerType:e})}const die=ye("ZodDefault",(e,t)=>{Ore.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>uoe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fie(e,t){return new die({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const pie=ye("ZodPrefault",(e,t)=>{jre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>coe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function hie(e,t){return new pie({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const vN=ye("ZodNonOptional",(e,t)=>{Lre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>loe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function mie(e,t){return new vN({type:"nonoptional",innerType:e,...Qe(t)})}const gie=ye("ZodCatch",(e,t)=>{Fre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>doe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bie(e,t){return new gie({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Dee(t)})}const vie=ye("ZodPipe",(e,t)=>{Bre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>foe(e,r,n,o),e.in=t.in,e.out=t.out});function yN(e,t){return new vie({type:"pipe",in:e,out:t})}const yie=ye("ZodReadonly",(e,t)=>{zre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>poe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function xie(e){return new yie({type:"readonly",innerType:e})}const wie=ye("ZodCustom",(e,t)=>{Kre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>toe(e,r,n,o)});function Cie(e,t={}){return Kne(wie,e,t)}function Sie(e,t){return Vne(e,t)}const kie=/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/i,j1=M1({postcode:ko().trim().min(1,{message:"Dit is een verplicht veld."}).regex(kie,{message:"Geef een geldige postcode op."}).max(6,{message:"De postcode is te lang."}),number:ko().min(1,{message:"Dit is een verplicht veld."}),numberAddon:ko().optional().transform(e=>e??void 0),street:ko().min(1,{message:"Vul de straat in."}),city:ko().min(1,{message:"Vul de woonplaats in."})}),xN=M1({keepCurrentMsisdn:Joe().optional(),currentMsisdn:ko().optional(),currentSubscriptionType:pN(["subscription","prepaid"]).optional(),currentProviderSlug:ko().optional(),currentFixedProviderScope:ko().optional(),currentMobileProviders:fN(M1({scope:ko(),value:ko()})).optional(),birthdate:ko().regex(/^[0-3]\d-(0\d|1[0-2])-(19|20)\d{2}$/).optional(),customerSegment:ko().nullish(),address:j1.optional()});function wN(){const e=window.sessionStorage.getItem("mobielnl-profile");if(!e)return{};const t=xN.safeParse(JSON.parse(e));return t.success?t.data:{}}function Pie(e){return!!e.address||!!e.currentMsisdn||!!e.birthdate}const Eie=dt`
|
|
1275
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}a.count>1&&e.reused==="ref"&&i(s)}e.external&&(e.sharedDefsExtractedFor=e.external)}function GI(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const n of t){if(!n||typeof n!="object")return;GI(n);const o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;const i=n.type;for(const s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}const ZI=new Set(["type","properties","required","additionalProperties"]),YI=["oneOf","anyOf"];function JI(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function $1(e){const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const s in i)if(!ZI.has(s))return null;t.push(i)}const r={},n=new Set;for(const i of t){for(const s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;const a=[];for(const c of t){const d=c.properties?.[s]??JI(c);d!=null&&(a.some(f=>JSON.stringify(f)===JSON.stringify(d))||a.push(d))}const l=a.length===1?a[0]:$1(a)??{allOf:a};Ya(r,s,l)}for(const s of i.required??[])n.add(s)}const o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const s of t){const a=JI(s);a&&!i.some(l=>JSON.stringify(l)===JSON.stringify(a))&&i.push(a)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Wne(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of ZI)if(o in e)return;const r=t.filter(o=>YI.some(i=>Array.isArray(o[i])));let n=null;if(!r.length)n=$1(t);else{const o=r[0],i=YI.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;const s=t.filter(l=>l!==o),a=o[i].map(l=>$1([...s,l]));if(a.some(l=>!l))return;n={[i]:a}}n&&(delete e.allOf,Hc(e,n))}function XI(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const l=e.seen.get(a);if(l.ref===null)return;const c=l.def??l.schema,d={...c},f=l.ref;if(l.ref=null,f){n(f);const g=e.seen.get(f),b=g.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(b)):Hc(c,b),Hc(c,d),a._zod.parent===f)for(const v in c)v==="$ref"||v==="allOf"||v in d||delete c[v];if(b.$ref&&g.def)for(const v in c)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(c[v])===JSON.stringify(g.def[v])&&delete c[v]}const m=a._zod.parent;if(m&&m!==f){n(m);const g=e.seen.get(m);if(g?.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(const b in c)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(c[b])===JSON.stringify(g.def[b])&&delete c[b]}e.override({zodSchema:a,jsonSchema:c,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const a of[...e.seen.entries()].reverse())n(a[0]);if(e.target!=="openapi-3.0")for(const a of e.seen.entries())GI(a[1].def??a[1].schema);for(const a of e.deferred)a();if(e.intersections.length){const a=new Map;for(const l of e.seen.values())for(const c of[l.schema,l.def]){const d=c?.allOf;if(!Array.isArray(d))continue;const f=a.get(d);f?f.push(c):a.set(d,[c])}for(const l of e.intersections)for(const c of a.get(l)??[])Wne(c)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Hc(o,r.defId?r.schema:r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,Ya(s,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:xh(t,"input",e.processors),output:xh(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function An(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return An(n.element,r);if(n.type==="set")return An(n.valueType,r);if(n.type==="lazy")return An(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return An(n.innerType,r);if(n.type==="intersection")return An(n.left,r)||An(n.right,r);if(n.type==="record"||n.type==="map")return An(n.keyType,r)||An(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:An(n.in,r)||An(n.out,r);if(n.type==="object"){for(const o in n.shape)if(An(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(An(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(An(o,r))return!0;return!!(n.rest&&An(n.rest,r))}return!1}const Une=(e,t={})=>r=>{const n=UI({...r,processors:t});return on(e,n),qI(n,e),XI(n,e)},xh=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=UI({...o??{},target:i,io:t,processors:r});return on(e,s),qI(s,e),XI(s,e)},hu=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},mu=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},QI=(e,t)=>{hu(e,"minimum",t),mu(e,"maximum",t)},eN=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},tN=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},rN=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},nN=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},oN=(e,t)=>hu(e,"minimum",t.minimum),iN=(e,t)=>mu(e,"maximum",t.maximum),sN=e=>(t,r)=>{nN(t,r.format);const[n,o]=e[r.format];hu(t,"minimum",n),mu(t,"maximum",o)},Hne={greater_than:(e,t)=>hu(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>mu(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>eN(e,t.value),number_format:sN(mee),bigint_format:sN(gee),min_length:oN,max_length:iN,length_equals:(e,t)=>QI(e,t.length),min_size:oN,max_size:iN,size_equals:(e,t)=>QI(e,t.size),string_format:(e,t)=>{nN(e,t.format),t.pattern&&tN(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>rN(e,t.mime)};function Gc(e){const t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(const i of n)Hne[i._zod.def.check]?.(t,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&hu(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&hu(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&mu(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&mu(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&eN(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&rN(t,o.mime);for(const i of o.patterns??[])tN(t,i);return t}const qne={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Gne=new Map([[EI,bte],[E1,vte]]),Zne=e=>Gne.get(e)??e,Yne=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:l,contentEncoding:c,laxFormat:d}=Gc(e);if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=qne[a]??a,o.format===""&&delete o.format,(a==="time"||d)&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){const f=[...l].map(Zne);f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Jne=(e,t,r,n)=>{r.type="boolean"},Xne=(e,t,r,n)=>{r.not={}},Qne=(e,t,r,n)=>{},eoe=(e,t,r,n)=>{const o=e._zod.def,i=u1(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},toe=(e,t,r,n)=>{qc(e,t,r,n,"Custom types cannot be represented in JSON Schema")},roe=(e,t,r,n)=>{qc(e,t,r,n,"Transforms cannot be represented in JSON Schema")},noe=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=Gc(e);typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=on(i.element,t,{...n,path:[...n.path,"items"]})};function I1(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?I1(t.out):t.type==="catch"?I1(t.innerType):e._zod.optin}const ooe=(e,t,r,n)=>{const o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&qc(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const c in s)Ya(o.properties,c,on(s[c],t,{...n,path:[...n.path,"properties",c]}));const l=[];for(const c of Object.keys(s)){const d=i.shape[c];(t.io==="input"?I1(d)===void 0:d._zod.optout===void 0)&&l.push(c)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=on(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},ioe=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,l)=>on(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=s:r.anyOf=s},soe=(e,t,r,n)=>{const o=e._zod.def,i=on(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=on(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=l,t.intersections.push(l)},aoe=(e,t,r,n)=>{const o=e._zod.def,i=on(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},loe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},N1=Symbol();function aN(e,t,r,n,o){let i=!1;const s=JSON.stringify(e,(a,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(qc(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),N1):JSON.parse(s)}const uoe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;const s=aN(o.defaultValue,e,t,r,n);s!==N1&&(r.default=s)},coe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;const s=aN(o.defaultValue,e,t,r,n);s!==N1&&(r._prefault=s)},doe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{qc(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},foe=(e,t,r,n)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;on(s,t,n);const a=t.seen.get(e);a.ref=s},poe=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},lN=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},uN=new WeakSet([Object.prototype,Error.prototype]);function wh(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}const So=ye("ZodError",(e,t)=>{Fee.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);uN.has(r)||(uN.add(r),wh(r,"format",n=>o=>Kee(n,o)),wh(r,"flatten",n=>o=>zee(n,o)),wh(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,c1,2)}),wh(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,c1,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),hoe=y1(So),moe=x1(So),goe=w1(So),boe=C1(So),voe=qee(So),yoe=Gee(So),xoe=Zee(So),woe=Yee(So),Coe=Jee(So),Soe=Xee(So),koe=Qee(So),Poe=ete(So);function Eoe(){yi.localeError||Xs(Zre())}function D1(){yi.memoizer||Xs({memoizer:Hre()})}const Wr=ye("ZodType",(e,t)=>(Eoe(),Rr.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(eo(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Zs(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Cie(e,t))},superRefine(e,t){return this.check(Sie(e,t))},overwrite(e){return this.check(pu(e))},optional(){return mN(this)},exactOptional(){return uie(this)},nullable(){return bN(this)},nullish(){return mN(bN(this))},nonoptional(e){return mie(this,e)},array(){return fN(this)},or(e){return oie([this,e])},and(e){return sie(this,e)},transform(e){return yN(this,lie(e))},default(e){return fie(this,e)},prefault(e){return hie(this,e)},catch(e){return bie(this,e)},pipe(e){return yN(this,e)},readonly(){return xie(this)},describe(e){const t=this.clone();return Uc.add(t,{description:e}),t},meta(...e){if(e.length===0)return Uc.get(this);const t=this.clone();return Uc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return dI(this,"~standard",{...xI(this),jsonSchema:{input:xh(this,"input"),output:xh(this,"output")}})},set"~standard"(e){Ys(this,"~standard",e)},parse:function e(t,r){return hoe(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await moe(this,t,r,{callee:e})},safeParse(e,t){return goe(this,e,t)},async safeParseAsync(e,t){return boe(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ys(this,"spa",e)},validate(e,t){return Wee(this,e,t)},validateAsync(e,t){return Hee(this,e,t)},encode:function e(t,r){return voe(this,t,r,{callee:e})},decode:function e(t,r){return yoe(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await xoe(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await woe(this,t,r,{callee:e})},safeEncode(e,t){return Coe(this,e,t)},safeDecode(e,t){return Soe(this,e,t)},async safeEncodeAsync(e,t){return koe(this,e,t)},async safeDecodeAsync(e,t){return Poe(this,e,t)},toJSONSchema(e){return Une(this,{})(e)},get description(){return Uc.get(this)?.description},get _def(){return this._zod.def}}),cN=ye("_ZodString",(e,t)=>{P1.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Yne(e,r,n)},Tee({format:e=>Gc(e).format??null,minLength:e=>Gc(e).minimum??null,maxLength:e=>Gc(e).maximum??null},{regex(...e){return this.check(_ne(...e))},includes(...e){return this.check(Nne(...e))},startsWith(...e){return this.check(Dne(...e))},endsWith(...e){return this.check(Mne(...e))},min(...e){return this.check(yh(...e))},max(...e){return this.check(RI(...e))},length(...e){return this.check(WI(...e))},nonempty(...e){return this.check(yh(1,...e))},lowercase(e){return this.check($ne(e))},uppercase(e){return this.check(Ine(e))},trim(){return this.check(jne())},normalize(...e){return this.check(One(...e))},toLowerCase(){return this.check(Lne())},toUpperCase(){return this.check(Fne())},slugify(){return this.check(Bne())}})),Toe=ye("ZodString",(e,t)=>{P1.init(e,t),cN.init(e,t)},{email(e){return this.check(ene(Noe,e))},url(e){return this.check(sne(Moe,e))},jwt(e){return this.check(wne(Zoe,e))},emoji(e){return this.check(ane(Ooe,e))},guid(e){return this.check(tne(Doe,e))},uuid(e){return this.check(rne(Ch,e))},uuidv4(e){return this.check(nne(Ch,e))},uuidv6(e){return this.check(one(Ch,e))},uuidv7(e){return this.check(ine(Ch,e))},nanoid(e){return this.check(lne(joe,e))},cuid(e){return this.check(une(Loe,e))},cuid2(e){return this.check(cne(Foe,e))},ulid(e){return this.check(dne(Boe,e))},base64(e){return this.check(vne(Hoe,e))},base64url(e){return this.check(yne(qoe,e))},xid(e){return this.check(fne(zoe,e))},ksuid(e){return this.check(pne(Koe,e))},ipv4(e){return this.check(hne(Voe,e))},ipv6(e){return this.check(mne(Roe,e))},cidrv4(e){return this.check(gne(Woe,e))},cidrv6(e){return this.check(bne(Uoe,e))},e164(e){return this.check(xne(Goe,e))},datetime(e){return this.check(Cne(Aoe,e))},date(e){return this.check(Sne(_oe,e))},time(e){return this.check(kne($oe,e))},duration(e){return this.check(Pne(Ioe,e))}});function ko(e){return Qre(Toe,e)}const Cr=ye("ZodStringFormat",(e,t)=>{gr.init(e,t),cN.init(e,t)}),Aoe=ye("ZodISODateTime",(e,t)=>{ore.init(e,t),Cr.init(e,t)}),_oe=ye("ZodISODate",(e,t)=>{ire.init(e,t),Cr.init(e,t)}),$oe=ye("ZodISOTime",(e,t)=>{sre.init(e,t),Cr.init(e,t)}),Ioe=ye("ZodISODuration",(e,t)=>{are.init(e,t),Cr.init(e,t)}),Noe=ye("ZodEmail",(e,t)=>{Wte.init(e,t),Cr.init(e,t)}),Doe=ye("ZodGUID",(e,t)=>{Vte.init(e,t),Cr.init(e,t)}),Ch=ye("ZodUUID",(e,t)=>{Rte.init(e,t),Cr.init(e,t)}),Moe=ye("ZodURL",(e,t)=>{Yte.init(e,t),Cr.init(e,t)}),Ooe=ye("ZodEmoji",(e,t)=>{Jte.init(e,t),Cr.init(e,t)}),joe=ye("ZodNanoID",(e,t)=>{Xte.init(e,t),Cr.init(e,t)}),Loe=ye("ZodCUID",(e,t)=>{Qte.init(e,t),Cr.init(e,t)}),Foe=ye("ZodCUID2",(e,t)=>{ere.init(e,t),Cr.init(e,t)}),Boe=ye("ZodULID",(e,t)=>{tre.init(e,t),Cr.init(e,t)}),zoe=ye("ZodXID",(e,t)=>{rre.init(e,t),Cr.init(e,t)}),Koe=ye("ZodKSUID",(e,t)=>{nre.init(e,t),Cr.init(e,t)}),Voe=ye("ZodIPv4",(e,t)=>{lre.init(e,t),Cr.init(e,t)}),Roe=ye("ZodIPv6",(e,t)=>{cre.init(e,t),Cr.init(e,t)}),Woe=ye("ZodCIDRv4",(e,t)=>{dre.init(e,t),Cr.init(e,t)}),Uoe=ye("ZodCIDRv6",(e,t)=>{pre.init(e,t),Cr.init(e,t)}),Hoe=ye("ZodBase64",(e,t)=>{hre.init(e,t),Cr.init(e,t)}),qoe=ye("ZodBase64URL",(e,t)=>{gre.init(e,t),Cr.init(e,t)}),Goe=ye("ZodE164",(e,t)=>{bre.init(e,t),Cr.init(e,t)}),Zoe=ye("ZodJWT",(e,t)=>{yre.init(e,t),Cr.init(e,t)}),Yoe=ye("ZodBoolean",(e,t)=>{xre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jne(e,r,n)});function Joe(e){return Ene(Yoe,e)}const Xoe=ye("ZodUnknown",(e,t)=>{wre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qne()});function dN(){return Tne(Xoe)}const Qoe=ye("ZodNever",(e,t)=>{Cre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xne(e,r,n)});function eie(e){return Ane(Qoe,e)}const tie=ye("ZodArray",(e,t)=>{D1(),Pre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>noe(e,r,n,o),e.element=t.element},{min(e,t){return this.check(yh(e,t))},nonempty(e){return this.check(yh(1,e))},max(e,t){return this.check(RI(e,t))},length(e,t){return this.check(WI(e,t))},unwrap(){return this.element}});function fN(e,t){return zne(tie,e,t)}const rie=ye("ZodObject",(e,t)=>{D1(),Are.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ooe(e,r,n,o),Iee(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return pN(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(eo(this._zod.def,{catchall:e}))},passthrough(){return this.clone(eo(this._zod.def,{catchall:dN()}))},loose(){return this.clone(eo(this._zod.def,{catchall:dN()}))},strict(){return this.clone(eo(this._zod.def,{catchall:eie()}))},strip(){return this.clone(eo(this._zod.def,{catchall:void 0}))},extend(e){return yee(this,e)},safeExtend(e){return xee(this,e)},merge(e){return wee(this,e)},pick(e){return bee(this,e)},omit(e){return vee(this,e)},partial(...e){return lI(hN,this,e[0])},exactPartial(...e){return lI(gN,this,e[0],"exactPartial")},required(...e){return Cee(vN,this,e[0])}});function M1(e,t){const r={type:"object",shape:e??{},...Qe(t)};return new rie(r)}const nie=ye("ZodUnion",(e,t)=>{_re.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ioe(e,r,n,o),e.options=t.options});function oie(e,t){return new nie({type:"union",options:e,...Qe(t)})}const iie=ye("ZodIntersection",(e,t)=>{$re.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>soe(e,r,n,o)});function sie(e,t){return new iie({type:"intersection",left:e,right:t})}const O1=ye("ZodEnum",(e,t)=>{Ire.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>eoe(e,n,o),e.enum=t.entries,e.options=[...e._zod.values];const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new O1({...t,checks:[],...Qe(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new O1({...t,checks:[],...Qe(o),entries:i})}});function pN(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new O1({type:"enum",entries:r,...Qe(t)})}const aie=ye("ZodTransform",(e,t)=>{D1(),Nre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>roe(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hI(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Vc(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Vc(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function lie(e){return new aie({type:"transform",transform:e})}const hN=ye("ZodOptional",(e,t)=>{DI.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lN(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function mN(e){return new hN({type:"optional",innerType:e})}const gN=ye("ZodExactOptional",(e,t)=>{Dre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lN(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function uie(e){return new gN({type:"optional",innerType:e})}const cie=ye("ZodNullable",(e,t)=>{Mre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>aoe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function bN(e){return new cie({type:"nullable",innerType:e})}const die=ye("ZodDefault",(e,t)=>{Ore.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>uoe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fie(e,t){return new die({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const pie=ye("ZodPrefault",(e,t)=>{jre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>coe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function hie(e,t){return new pie({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const vN=ye("ZodNonOptional",(e,t)=>{Lre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>loe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function mie(e,t){return new vN({type:"nonoptional",innerType:e,...Qe(t)})}const gie=ye("ZodCatch",(e,t)=>{Fre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>doe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bie(e,t){return new gie({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Dee(t)})}const vie=ye("ZodPipe",(e,t)=>{Bre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>foe(e,r,n,o),e.in=t.in,e.out=t.out});function yN(e,t){return new vie({type:"pipe",in:e,out:t})}const yie=ye("ZodReadonly",(e,t)=>{zre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>poe(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function xie(e){return new yie({type:"readonly",innerType:e})}const wie=ye("ZodCustom",(e,t)=>{Kre.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>toe(e,r,n,o)});function Cie(e,t={}){return Kne(wie,e,t)}function Sie(e,t){return Vne(e,t)}const kie=/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/i,j1=M1({postcode:ko().trim().min(1,{message:"Dit is een verplicht veld."}).regex(kie,{message:"Geef een geldige postcode op."}).max(6,{message:"De postcode is te lang."}),number:ko().min(1,{message:"Dit is een verplicht veld."}),numberAddon:ko().optional().transform(e=>e??void 0),street:ko().min(1,{message:"Vul de straat in."}),city:ko().min(1,{message:"Vul de woonplaats in."})}),xN=M1({keepCurrentMsisdn:Joe().optional(),currentMsisdn:ko().optional(),currentSubscriptionType:pN(["subscription","prepaid"]).optional(),currentProviderSlug:ko().optional(),currentFixedProviderScope:ko().optional(),currentMobileProviders:fN(M1({scope:ko(),value:ko()})).optional(),birthdate:ko().regex(/^[0-3]\d-(0\d|1[0-2])-(19|20)\d{2}$/).optional(),customerSegment:ko().nullish(),address:j1.optional()});function wN(){const e=window.sessionStorage.getItem("mobielnl-profile");if(!e)return{};const t=xN.safeParse(JSON.parse(e));return t.success?t.data:{}}function Pie(e){return!!e.address||!!e.currentMsisdn||!!e.birthdate}const Eie=ft`
|
|
1279
1276
|
mutation addPartnerProfile($data: InputPartnerProfile!) {
|
|
1280
1277
|
addPartnerProfile(data: $data)
|
|
1281
1278
|
}
|
|
1282
|
-
`;async function Tie(e){return(await Jv(Eie,{data:e}).catch(()=>{}))?.addPartnerProfile}async function Zc(e){const t={...wN(),...e};if(!Pie(t))return;const{address:r,currentMsisdn:n,birthdate:o}=t,i=await Tie({address:r?{postcode:r.postcode,number:r.number,numberAddon:r.numberAddon&&r.numberAddon.length>0?r.numberAddon:void 0}:void 0,currentMsisdn:n,birthdate:o});if(i)return Q6("mobielnl-ppt",{token:i},{expires:15/1440}),i}function CN(e,t){const r=!e.includes("fixed"),n=r?t.currentProviderSlug:t.currentFixedProviderScope?.split("/")[1];if(!(n==="other"||n==="none"||n===void 0)&&!(r&&!t.keepCurrentMsisdn)&&!(r&&t.currentSubscriptionType==="prepaid"))return n}function SN(e,t,r,n){const o=t.map(c=>c.name).join(" & "),i=o?` • ${o}`:"";if(n)return o.length>0?o:Ee.t("combiDeal.selectOtherSubscriptionsOnAddress");if(r==="other")return`${Ee.t("combiDeal.otherProvider")}${i}`;const s=r?.split("/")[1],a=e.find(c=>c.slug===s);if(!s||!a)return Ee.t("combiDeal.selectHomeProvider");const l=s.includes("internet")?"":` ${Ee.t("format.internet")}`;return`${a.name}${l}${i}`}function kN(e,t){if(e.keepCurrentMsisdn===!1)return Ee.t("profile.newNumber");if(e.keepCurrentMsisdn===void 0||!e.currentProviderSlug)return Ee.t("profile.askNumberPreservation");const r=e.currentMsisdn?`${e.currentMsisdn} • `:"",n=t.find(o=>o.slug===e.currentProviderSlug)?.name||Ee.t("numberPreservation.otherProvider");return`${r}${n}`}async function Aie(){const e=X6("mobielnl-ppt")?.token;return e||Zc()}function PN(e,t){if(!e||e.length===0||!t||t.length===0)return[];const r=new Set(e.map(n=>n.scope));return t.filter(n=>r.has(n.scope)).map(n=>({name:n.provider.name}))}function Yc(e,t,r){return[{amount:1,scope:e.includes("fixed")?"fixed/*":"mobile/*"},{amount:1,scope:t.currentFixedProviderScope},{amount:1,scope:t.customerSegment},...(t.currentMobileProviders||[]).filter(n=>r?n.scope.split("/").includes(r):!0).map(({scope:n,value:o})=>({amount:parseInt(o),scope:n}))].filter(n=>!!n.scope&&n.amount>0)}const EN=x.createContext({profile:{},setProfile:e=>{}});function _ie(e){const{success:t,data:r}=xN.safeParse(e);t&&window.sessionStorage.setItem("mobielnl-profile",JSON.stringify(r))}var Sh={},TN;function $ie(){if(TN)return Sh;TN=1,Object.defineProperty(Sh,"__esModule",{value:!0});var e=x,t=function(r,n){var o=e.useRef(function(){});e.useEffect(function(){o.current=r}),e.useEffect(function(){if(n!==null){var i=setInterval(function(){return o.current()},n||0);return function(){return clearInterval(i)}}},[n])};return Sh.default=t,Sh}var Iie=$ie();const Nie=ju(Iie),Die=
|
|
1279
|
+
`;async function Tie(e){return(await Jv(Eie,{data:e}).catch(()=>{}))?.addPartnerProfile}async function Zc(e){const t={...wN(),...e};if(!Pie(t))return;const{address:r,currentMsisdn:n,birthdate:o}=t,i=await Tie({address:r?{postcode:r.postcode,number:r.number,numberAddon:r.numberAddon&&r.numberAddon.length>0?r.numberAddon:void 0}:void 0,currentMsisdn:n,birthdate:o});if(i)return Q6("mobielnl-ppt",{token:i},{expires:15/1440}),i}function CN(e,t){const r=!e.includes("fixed"),n=r?t.currentProviderSlug:t.currentFixedProviderScope?.split("/")[1];if(!(n==="other"||n==="none"||n===void 0)&&!(r&&!t.keepCurrentMsisdn)&&!(r&&t.currentSubscriptionType==="prepaid"))return n}function SN(e,t,r,n){const o=t.map(c=>c.name).join(" & "),i=o?` • ${o}`:"";if(n)return o.length>0?o:Ee.t("combiDeal.selectOtherSubscriptionsOnAddress");if(r==="other")return`${Ee.t("combiDeal.otherProvider")}${i}`;const s=r?.split("/")[1],a=e.find(c=>c.slug===s);if(!s||!a)return Ee.t("combiDeal.selectHomeProvider");const l=s.includes("internet")?"":` ${Ee.t("format.internet")}`;return`${a.name}${l}${i}`}function kN(e,t){if(e.keepCurrentMsisdn===!1)return Ee.t("profile.newNumber");if(e.keepCurrentMsisdn===void 0||!e.currentProviderSlug)return Ee.t("profile.askNumberPreservation");const r=e.currentMsisdn?`${e.currentMsisdn} • `:"",n=t.find(o=>o.slug===e.currentProviderSlug)?.name||Ee.t("numberPreservation.otherProvider");return`${r}${n}`}async function Aie(){const e=X6("mobielnl-ppt")?.token;return e||Zc()}function PN(e,t){if(!e||e.length===0||!t||t.length===0)return[];const r=new Set(e.map(n=>n.scope));return t.filter(n=>r.has(n.scope)).map(n=>({name:n.provider.name}))}function Yc(e,t,r){return[{amount:1,scope:e.includes("fixed")?"fixed/*":"mobile/*"},{amount:1,scope:t.currentFixedProviderScope},{amount:1,scope:t.customerSegment},...(t.currentMobileProviders||[]).filter(n=>r?n.scope.split("/").includes(r):!0).map(({scope:n,value:o})=>({amount:parseInt(o),scope:n}))].filter(n=>!!n.scope&&n.amount>0)}const EN=x.createContext({profile:{},setProfile:e=>{}});function _ie(e){const{success:t,data:r}=xN.safeParse(e);t&&window.sessionStorage.setItem("mobielnl-profile",JSON.stringify(r))}var Sh={},TN;function $ie(){if(TN)return Sh;TN=1,Object.defineProperty(Sh,"__esModule",{value:!0});var e=x,t=function(r,n){var o=e.useRef(function(){});e.useEffect(function(){o.current=r}),e.useEffect(function(){if(n!==null){var i=setInterval(function(){return o.current()},n||0);return function(){return clearInterval(i)}}},[n])};return Sh.default=t,Sh}var Iie=$ie();const Nie=ju(Iie),Die=ft`
|
|
1283
1280
|
mutation partnerCustomerSegment(
|
|
1284
1281
|
$msisdn: String!
|
|
1285
1282
|
$birthdate: String!
|
|
@@ -1296,7 +1293,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1296
1293
|
state
|
|
1297
1294
|
}
|
|
1298
1295
|
}
|
|
1299
|
-
`;async function Mie({msisdn:e,birthdate:t,providerSlug:r}){return(await Jv(Die,{msisdn:e,birthdate:t,providerSlug:r,origin:window.location.hostname.split(".").at(-2)})).partnerCustomerSegment}const Oie=1e3,jie=3e4,AN="customerSegmentChecked";function _N(e,t,r){return[e,t,r].join("|")}function Lie(e,t,r){const[n,o]=x.useState({state:"pending",customerSegment:null}),[i,s]=x.useState(),[a,l]=x.useState(!1);x.useEffect(()=>{const f=[e,t,r].every(Boolean),m=sessionStorage.getItem(AN)===_N(t,e,r);f&&!m?(l(!0),s(Date.now())):l(!1)},[t,e,r]);const c=i?Date.now()-i>jie:!1;return Nie(()=>{!t||!e||!r||(i||s(Date.now()),Mie({msisdn:t,birthdate:e,providerSlug:r}).then(f=>{o(f),l(f.state==="pending"),f.state!=="pending"&&sessionStorage.setItem(AN,_N(t,e,r))}).catch(()=>{o({state:"failed",customerSegment:null}),l(!1)}))},a&&!c?Oie:null),n}function $N({children:e,initialProfile:t,onProfileChange:r}){const{onAction:n}=gi(),[o,i]=x.useState({...wN(),...t}),{profile:s}=x.useMemo(()=>({profile:o}),[o]),a=x.useCallback(c=>{i(d=>{const f={...d,...c};return r?.(f),_ie(f),n({type:"profile_changed",from:d,to:f}),f})},[r,n]),l=Lie(s.birthdate,s.currentMsisdn,s.currentProviderSlug);return x.useEffect(()=>{l.state!=="pending"&&a({customerSegment:l.customerSegment})},[l.customerSegment,l.state,a]),x.useEffect(()=>{t&&a(t)},[JSON.stringify(t),a]),h.jsx(EN,{value:{profile:s,setProfile:a},children:e})}function sn(){return x.useContext(EN)}const Fie=30;function Bie(){const[e,t]=x.useState(!1);return U4(()=>{X6("mobielnl-attribution-tracked")?.tracked===!0||t(!0)}),e?h.jsx("img",{src:`https://www.mobiel.nl/api/pixel?landing-page=${window.location.pathname}`,alt:"",width:1,height:1,className:"invisible",hidden:!0,"aria-hidden":"true",onLoad:()=>Q6("mobielnl-attribution-tracked",{tracked:!0},{expires:Fie})}):null}function IN(e,t){const r=e.map(n=>({slug:n.scope,name:n.provider.name,imageUrl:n.provider.imageUrl,Icon:void 0}));return[...t==="fixed"?[{name:Ee.t("combiDeal.movingOption"),slug:"other/moving",Icon:zL,imageUrl:void 0}]:[],...r,{name:Ee.t("combiDeal.otherProvider"),slug:"other",Icon:J4,imageUrl:void 0}]}const zie=
|
|
1296
|
+
`;async function Mie({msisdn:e,birthdate:t,providerSlug:r}){return(await Jv(Die,{msisdn:e,birthdate:t,providerSlug:r,origin:window.location.hostname.split(".").at(-2)})).partnerCustomerSegment}const Oie=1e3,jie=3e4,AN="customerSegmentChecked";function _N(e,t,r){return[e,t,r].join("|")}function Lie(e,t,r){const[n,o]=x.useState({state:"pending",customerSegment:null}),[i,s]=x.useState(),[a,l]=x.useState(!1);x.useEffect(()=>{const f=[e,t,r].every(Boolean),m=sessionStorage.getItem(AN)===_N(t,e,r);f&&!m?(l(!0),s(Date.now())):l(!1)},[t,e,r]);const c=i?Date.now()-i>jie:!1;return Nie(()=>{!t||!e||!r||(i||s(Date.now()),Mie({msisdn:t,birthdate:e,providerSlug:r}).then(f=>{o(f),l(f.state==="pending"),f.state!=="pending"&&sessionStorage.setItem(AN,_N(t,e,r))}).catch(()=>{o({state:"failed",customerSegment:null}),l(!1)}))},a&&!c?Oie:null),n}function $N({children:e,initialProfile:t,onProfileChange:r}){const{onAction:n}=gi(),[o,i]=x.useState({...wN(),...t}),{profile:s}=x.useMemo(()=>({profile:o}),[o]),a=x.useCallback(c=>{i(d=>{const f={...d,...c};return r?.(f),_ie(f),n({type:"profile_changed",from:d,to:f}),f})},[r,n]),l=Lie(s.birthdate,s.currentMsisdn,s.currentProviderSlug);return x.useEffect(()=>{l.state!=="pending"&&a({customerSegment:l.customerSegment})},[l.customerSegment,l.state,a]),x.useEffect(()=>{t&&a(t)},[JSON.stringify(t),a]),h.jsx(EN,{value:{profile:s,setProfile:a},children:e})}function sn(){return x.useContext(EN)}const Fie=30;function Bie(){const[e,t]=x.useState(!1);return U4(()=>{X6("mobielnl-attribution-tracked")?.tracked===!0||t(!0)}),e?h.jsx("img",{src:`https://www.mobiel.nl/api/pixel?landing-page=${window.location.pathname}`,alt:"",width:1,height:1,className:"invisible",hidden:!0,"aria-hidden":"true",onLoad:()=>Q6("mobielnl-attribution-tracked",{tracked:!0},{expires:Fie})}):null}function IN(e,t){const r=e.map(n=>({slug:n.scope,name:n.provider.name,imageUrl:n.provider.imageUrl,Icon:void 0}));return[...t==="fixed"?[{name:Ee.t("combiDeal.movingOption"),slug:"other/moving",Icon:zL,imageUrl:void 0}]:[],...r,{name:Ee.t("combiDeal.otherProvider"),slug:"other",Icon:J4,imageUrl:void 0}]}const zie=ft`
|
|
1300
1297
|
query getAllProviders {
|
|
1301
1298
|
providers {
|
|
1302
1299
|
slug
|
|
@@ -1308,7 +1305,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1308
1305
|
fixedRank
|
|
1309
1306
|
}
|
|
1310
1307
|
}
|
|
1311
|
-
`;function L1(e=!0,t=[]){const{data:r}=Vo(e?[zie]:null,{fetcher:nn});return r?r.providers.filter(n=>n.hasMobile&&!t.includes(n.slug)).sort((n,o)=>n.mobileRank-o.mobileRank):[]}const Kie=
|
|
1308
|
+
`;function L1(e=!0,t=[]){const{data:r}=Vo(e?[zie]:null,{fetcher:nn});return r?r.providers.filter(n=>n.hasMobile&&!t.includes(n.slug)).sort((n,o)=>n.mobileRank-o.mobileRank):[]}const Kie=ft`
|
|
1312
1309
|
query getModificationBlocks($version: String!, $productType: String!) {
|
|
1313
1310
|
modificationConfig(version: $version) {
|
|
1314
1311
|
fixedBlocks: blocks(types: ["fixed"], interface: $productType) {
|
|
@@ -1332,7 +1329,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1332
1329
|
}
|
|
1333
1330
|
}
|
|
1334
1331
|
}
|
|
1335
|
-
`;function kh(e,t=!0){const{data:r}=Vo(t?[Kie,{version:"release",productType:e}]:null,{fetcher:nn});return r?.modificationConfig?{fixedBlocks:r.modificationConfig.fixedBlocks.sort((n,o)=>n.provider.rank-o.provider.rank),otherBlocks:r.modificationConfig.otherBlocks.sort((n,o)=>n.provider.rank-o.provider.rank)}:{fixedBlocks:[],otherBlocks:[]}}function NN({isFixed:e=!1}){const{t}=Je(),{combiDealModal:r}=vt(),{profile:n,setProfile:o}=sn(),{popoverProps:i,isShadowRoot:s}=Zn(),[a]=Fn(),{isModalOpen:l,openModal:c,closeModal:d}=Qt(),f=e?"fixed":"mobile",m=kh(f),[g,b]=x.useState(!1),y=x.useMemo(()=>IN(m.fixedBlocks,f),[m.fixedBlocks.length]),v=t("format.internet"),C=x.useCallback(({slug:S,name:k})=>S.startsWith("other")||k.toLowerCase().includes("internet")?k:`${k} ${v}`,[v]);return h.jsx(fi,{isOpen:l("combi-deal"),onOpenChange:S=>S?c("combi-deal"):d("combi-deal"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(r?.modal?.backdrop),wrapper:A(r?.modal?.wrapper),base:A("m-0 max-h-[90vh]",r?.modal?.base),header:A(r?.modal?.header),body:A("pt-0",r?.modal?.body),footer:A(r?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",r?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:t("combiDeal.title")}),h.jsxs(ai,{children:[h.jsxs("div",{className:A("flex flex-col items-center justify-center",r?.header?.container),children:[h.jsx("div",{className:A("rounded-full bg-primary-100 p-4 w-fit",r?.header?.iconWrapper),children:h.jsx(qu,{size:48,className:A("stroke-primary",r?.header?.icon)})}),h.jsx("div",{className:A("text-xl font-bold mt-2 text-foreground",r?.header?.title),children:t("combiDeal.title")}),h.jsx("p",{className:A("text-sm text-center text-foreground-500 max-w-xs",r?.header?.description),children:t("combiDeal.description")})]}),f==="mobile"&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:A("text-base font-bold text-foreground",r?.providerSelection?.title),children:t("combiDeal.homeInternet")}),h.jsx(Tc,{variant:"bordered","aria-label":t("combiDeal.homeInternet"),placeholder:t("combiDeal.selectHomeProvider"),isOpen:g,onOpenChange:S=>S!==g&&b(S),popoverProps:i,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:n.currentFixedProviderScope?[n.currentFixedProviderScope]:void 0,radius:"sm",size:"lg",renderValue:S=>{const k=y.find(P=>P.slug===S[0]?.key);return k?h.jsxs("div",{className:A("flex items-center gap-3",r?.providerSelection?.select?.itemContainer),children:[k.imageUrl&&h.jsx(Ar,{src:a(k.imageUrl,120,60),alt:k.name,width:60,height:30,radius:"none"}),k.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(k.Icon,{size:24,className:A("stroke-primary-500",r?.providerSelection?.select?.icon)})}),C(k)]}):null},classNames:{...r?.providerSelection?.select,trigger:A("cursor-pointer border-small",r?.providerSelection?.select?.trigger)},children:y.map(S=>h.jsx(Ba,{variant:"flat",textValue:S.name,onClick:()=>{o({currentFixedProviderScope:S.slug}),b(!1)},children:h.jsxs("div",{className:A("flex items-center gap-3",r?.providerSelection?.select?.itemContainer),children:[S.imageUrl&&h.jsx(Ar,{src:a(S.imageUrl,120,60),alt:S.name,width:60,height:30,radius:"none"}),S.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(S.Icon,{size:24,className:A("stroke-primary-500",r?.providerSelection?.select?.icon)})}),C(S)]})},S.slug))})]}),(f==="fixed"||!!n.currentFixedProviderScope)&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:A("mt-3",r?.otherSubscriptions?.container),children:[h.jsx("p",{className:A("text-base font-bold text-foreground",r?.otherSubscriptions?.label),children:t("combiDeal.selectOtherSubscriptions")}),h.jsx("p",{className:A("text-sm text-foreground",r?.otherSubscriptions?.description),children:t("combiDeal.otherSubscriptionsDescription")})]}),h.jsx("div",{className:A("w-full border-small px-1 py-2 rounded-small border-default-200",r?.otherSubscriptions?.listboxContainer),children:h.jsx(l0,{selectedKeys:n.currentMobileProviders?.map(S=>S.scope)??[],selectionMode:"multiple",variant:"flat","aria-label":t("combiDeal.otherSubscriptions"),onSelectionChange:S=>o({currentMobileProviders:Array.from(S).map(k=>({scope:k.toString(),value:"1"}))}),classNames:{list:A(r?.otherSubscriptions?.listboxList)},children:m.otherBlocks.map(S=>h.jsx(Ba,{title:S.provider.name,description:t(`modificationBlocks.${S.scope}`,{defaultValue:S.description}),startContent:h.jsx(Ar,{src:a(S.provider.imageUrl,120,60),alt:S.provider.name,width:60,height:30,radius:"none",classNames:{wrapper:A("aspect-2/1 shrink-0",r?.otherSubscriptions?.listboxItem?.image)}}),classNames:{base:A(r?.otherSubscriptions?.listboxItem?.base),wrapper:A(r?.otherSubscriptions?.listboxItem?.wrapper),title:A("text-sm font-semibold",r?.otherSubscriptions?.listboxItem?.title),description:A("text-xs",r?.otherSubscriptions?.listboxItem?.description),selectedIcon:A(r?.otherSubscriptions?.listboxItem?.selectedIcon)}},S.scope))})})]})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",r?.submitButton),onPress:()=>d("combi-deal"),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:t("common.confirm")})})]})})}function Vie(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:s="text",validationBehavior:a="aria"}=e,[l,c]=jo(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Bi(e,t),f=ru({...e,value:l}),{isInvalid:m,validationErrors:g,validationDetails:b}=f.displayValidation,{labelProps:y,fieldProps:v,descriptionProps:C,errorMessageProps:S}=Op({...e,isInvalid:m,errorMessage:e.errorMessage||g}),k=Ln(e,{labelable:!0});const P={type:s,pattern:e.pattern};let[E]=x.useState(l);var $;return uf(t,($=e.defaultValue)!==null&&$!==void 0?$:E,c),Lp(e,f,t),{labelProps:y,inputProps:it(k,r==="input"?P:void 0,{disabled:n,readOnly:i,required:o&&a==="native","aria-required":o&&a==="aria"||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:O=>c(O.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(x.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...v}),descriptionProps:C,errorMessageProps:S,isInvalid:m,validationErrors:g,validationDetails:b}}function Rie(e){var t,r,n,o,i,s,a;const l=ur(),{validationBehavior:c}=nu(za)||{},[d,f]=qr(e,WC.variantKeys),{ref:m,as:g,type:b,label:y,baseRef:v,wrapperRef:C,description:S,className:k,classNames:P,autoFocus:E,startContent:$,endContent:O,onClear:N,onChange:D,validationState:M,validationBehavior:V=(t=c??l?.validationBehavior)!=null?t:"native",innerWrapperRef:R,onValueChange:K=()=>{},...j}=d,B=x.useCallback(rt=>{K(rt??"")},[K]),[U,W]=x.useState(!1),L=g||"div",Z=(n=(r=e.disableAnimation)!=null?r:l?.disableAnimation)!=null?n:!1,T=ot(m),F=ot(v),_=ot(C),H=ot(R),[Y,X]=jo(d.value,(o=d.defaultValue)!=null?o:"",B),oe=b==="file",Q=((a=(s=(i=T?.current)==null?void 0:i.files)==null?void 0:s.length)!=null?a:0)>0,le=["date","time","month","week","range"].includes(b),ue=!hs(Y)||le||Q,te=ue||U,ge=b==="hidden",Se=e.isMultiline,pe=A(P?.base,k,ue?"is-filled":""),we=x.useCallback(()=>{var rt;oe?T.current.value="":X(""),N?.(),(rt=T.current)==null||rt.focus()},[X,N,oe]);ja(()=>{T.current&&X(T.current.value)},[T.current]);const{labelProps:be,inputProps:re,isInvalid:ke,validationErrors:Ne,validationDetails:Me,descriptionProps:Pe,errorMessageProps:Ae}=Vie({...e,validationBehavior:V,autoCapitalize:e.autoCapitalize,value:Y,"aria-label":e.label?e["aria-label"]:Od(e["aria-label"],e.placeholder),inputElementType:Se?"textarea":"input",onChange:X},T);oe&&(delete re.value,delete re.onChange);const{isFocusVisible:xe,isFocused:Ie,focusProps:et}=Ir({autoFocus:E,isTextInput:!0}),{isHovered:wt,hoverProps:lt}=dn({isDisabled:!!e?.isDisabled}),{isHovered:Ut,hoverProps:ut}=dn({isDisabled:!!e?.isDisabled}),{focusProps:Ue,isFocusVisible:Vt}=Ir(),{focusWithinProps:Jt}=Ia({onFocusWithinChange:W}),{pressProps:Xt}=xn({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:we}),sr=M==="invalid"||ke,Ct=eP({labelPlacement:e.labelPlacement,label:y}),Sr=typeof d.errorMessage=="function"?d.errorMessage({isInvalid:sr,validationErrors:Ne,validationDetails:Me}):d.errorMessage||Ne?.join(" "),dr=!!N||e.isClearable,kr=!!y||!!S||!!Sr,$t=!!d.placeholder,tt=!!y,It=!!S||!!Sr,ar=Ct==="outside-left",er=Ct==="outside-top",Yr=Ct==="outside"||ar||er,en=Ct==="inside",ki=T.current?(!T.current.value||T.current.value===""||!Y||Y==="")&&$t:!1,hn=!!$,to=Yr?ar||er||$t||Ct==="outside"&&hn:!1,Ur=Ct==="outside"&&!$t&&!hn,jt=x.useMemo(()=>WC({...f,isInvalid:sr,labelPlacement:Ct,isClearable:dr,disableAnimation:Z}),[jr(f),sr,Ct,dr,hn,Z]),Qi=x.useCallback((rt={})=>({ref:F,className:jt.base({class:pe}),"data-slot":"base","data-filled":ae(ue||$t||hn||ki||oe),"data-filled-within":ae(te||$t||hn||ki||oe),"data-focus-within":ae(U),"data-focus-visible":ae(xe),"data-readonly":ae(e.isReadOnly),"data-focus":ae(Ie),"data-hover":ae(wt||Ut),"data-required":ae(e.isRequired),"data-invalid":ae(sr),"data-disabled":ae(e.isDisabled),"data-has-elements":ae(kr),"data-has-helper":ae(It),"data-has-label":ae(tt),"data-has-value":ae(!ki),"data-hidden":ae(ge),...Jt,...rt}),[jt,pe,ue,Ie,wt,Ut,sr,It,tt,kr,ki,hn,U,xe,te,$t,Jt,ge,e.isReadOnly,e.isRequired,e.isDisabled]),oa=x.useCallback((rt={})=>({"data-slot":"label",className:jt.label({class:P?.label}),...Oe(be,ut,rt)}),[jt,Ut,be,P?.label]),Jo=x.useCallback(rt=>{rt.key==="Escape"&&Y&&(dr||N)&&!e.isReadOnly&&(X(""),N?.())},[Y,X,N,dr,e.isReadOnly]),St=x.useCallback((rt={})=>({"data-slot":"input","data-filled":ae(ue),"data-filled-within":ae(te),"data-has-start-content":ae(hn),"data-has-end-content":ae(!!O),"data-type":b,className:jt.input({class:A(P?.input,ue?"is-filled":"",Se?"pe-0":"",b==="password"?"[&::-ms-reveal]:hidden":"")}),...Oe(et,re,Lt(j,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(re))}),rt),"aria-readonly":ae(e.isReadOnly),onChange:co(re.onChange,D),onKeyDown:co(re.onKeyDown,rt.onKeyDown,Jo),ref:T}),[jt,Y,et,re,j,ue,te,hn,O,P?.input,e.isReadOnly,e.isRequired,D,Jo]),Xo=x.useCallback((rt={})=>({ref:_,"data-slot":"input-wrapper","data-hover":ae(wt||Ut),"data-focus-visible":ae(xe),"data-focus":ae(Ie),className:jt.inputWrapper({class:A(P?.inputWrapper,ue?"is-filled":"")}),...Oe(rt,lt),onClick:Qo=>{T.current&&Qo.currentTarget===Qo.target&&T.current.focus()},style:{cursor:"text",...rt.style}}),[jt,wt,Ut,xe,Ie,Y,P?.inputWrapper]),Pi=x.useCallback((rt={})=>({...rt,ref:H,"data-slot":"inner-wrapper",onClick:Qo=>{T.current&&Qo.currentTarget===Qo.target&&T.current.focus()},className:jt.innerWrapper({class:A(P?.innerWrapper,rt?.className)})}),[jt,P?.innerWrapper]),es=x.useCallback((rt={})=>({...rt,"data-slot":"main-wrapper",className:jt.mainWrapper({class:A(P?.mainWrapper,rt?.className)})}),[jt,P?.mainWrapper]),nl=x.useCallback((rt={})=>({...rt,"data-slot":"helper-wrapper",className:jt.helperWrapper({class:A(P?.helperWrapper,rt?.className)})}),[jt,P?.helperWrapper]),ol=x.useCallback((rt={})=>({...rt,...Pe,"data-slot":"description",className:jt.description({class:A(P?.description,rt?.className)})}),[jt,P?.description]),ia=x.useCallback((rt={})=>({...rt,...Ae,"data-slot":"error-message",className:jt.errorMessage({class:A(P?.errorMessage,rt?.className)})}),[jt,Ae,P?.errorMessage]),Ei=x.useCallback((rt={})=>({...rt,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":ae(Vt),className:jt.clearButton({class:A(P?.clearButton,rt?.className)}),...Oe(Xt,Ue)}),[jt,Vt,Xt,Ue,P?.clearButton]);return{Component:L,classNames:P,domRef:T,label:y,description:S,startContent:$,endContent:O,labelPlacement:Ct,isClearable:dr,hasHelper:It,hasStartContent:hn,isLabelOutside:to,isOutsideLeft:ar,isOutsideTop:er,isLabelOutsideAsPlaceholder:Ur,shouldLabelBeOutside:Yr,shouldLabelBeInside:en,hasPlaceholder:$t,isInvalid:sr,errorMessage:Sr,getBaseProps:Qi,getLabelProps:oa,getInputProps:St,getMainWrapperProps:es,getInputWrapperProps:Xo,getInnerWrapperProps:Pi,getHelperWrapperProps:nl,getDescriptionProps:ol,getErrorMessageProps:ia,getClearButtonProps:Ei}}var DN=Xe((e,t)=>{const{Component:r,label:n,description:o,isClearable:i,startContent:s,endContent:a,labelPlacement:l,hasHelper:c,isOutsideLeft:d,isOutsideTop:f,shouldLabelBeOutside:m,errorMessage:g,isInvalid:b,getBaseProps:y,getLabelProps:v,getInputProps:C,getInnerWrapperProps:S,getInputWrapperProps:k,getMainWrapperProps:P,getHelperWrapperProps:E,getDescriptionProps:$,getErrorMessageProps:O,getClearButtonProps:N}=Rie({...e,ref:t}),D=n?h.jsx("label",{...v(),children:n}):null,M=x.useMemo(()=>i?h.jsx("button",{...N(),children:a||h.jsx(xv,{})}):a,[i,N]),V=x.useMemo(()=>{const j=b&&g;return!c||!(j||o)?null:h.jsx("div",{...E(),children:j?h.jsx("div",{...O(),children:g}):h.jsx("div",{...$(),children:o})})},[c,b,g,o,E,O,$]),R=x.useMemo(()=>h.jsxs("div",{...S(),children:[s,h.jsx("input",{...C()}),M]}),[s,M,C,S]),K=x.useMemo(()=>m?h.jsxs("div",{...P(),children:[h.jsxs("div",{...k(),children:[!d&&!f?D:null,R]}),V]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{...k(),children:[D,R]}),V]}),[l,V,m,D,R,g,o,P,k,O,$]);return h.jsxs(r,{...y(),children:[d||f?D:null,K]})});DN.displayName="HeroUI.Input";var wi=DN;function MN(){const{t:e}=Je(),{numberPreservationModal:t}=vt(),{isModalOpen:r,openModal:n,closeModal:o}=Qt(),{popoverProps:i,isShadowRoot:s}=Zn(),[a]=Fn(),{profile:l,setProfile:c}=sn(),[d,f]=x.useState(l.currentMsisdn??""),[m,g]=x.useState(),[b,y]=x.useState(),[v,C]=x.useState(!1),S=L1(),{width:k}=xa(),P=k>=1024,[E,$,O]=l.birthdate?l.birthdate.split("-"):[],[N,D]=x.useState(E??""),[M,V]=x.useState($??""),[R,K]=x.useState(O??""),j=l.currentProviderSlug==="odido",U=/^((06{1}[1-9]{1}[0-9]{7})|97([0-9]{9}))$/.test(d)||d.length===0||d==="",W=x.useMemo(()=>{if(!N||!M||!R||R.length!==4)return!1;const H=new Date(`${R}-${M}-${N}`);return!(H.toString()==="Invalid Date"||H.getFullYear()<1900||H.getFullYear()>new Date().getFullYear())},[N,M,R]),L=e("numberPreservation.otherProvider"),Z=x.useMemo(()=>[...S.map(Y=>({slug:Y.slug,name:Y.name,imageUrl:Y.imageUrl,Icon:void 0})),{name:L,slug:"other",Icon:J4,imageUrl:void 0}],[S.length,L]),T=x.useCallback(()=>{d!==l.currentMsisdn&&(Zc({currentMsisdn:d}),c({currentMsisdn:d,customerSegment:void 0}))},[d,c,l.currentMsisdn]);function F(){if(!W)return;const H=new Date(`${R}-${M}-${N}`).toLocaleDateString("nl-NL",{year:"numeric",month:"2-digit",day:"2-digit"});l.birthdate!==H&&(Zc({birthdate:H}),c({birthdate:H,customerSegment:void 0}))}x.useEffect(()=>{!l.keepCurrentMsisdn||l.currentSubscriptionType||c({currentSubscriptionType:"subscription"})},[l.keepCurrentMsisdn,l.currentSubscriptionType,c]);const _={base:A("inline-flex m-0 items-center justify-between border-medium border-default-200 hover:border-default-400","flex-row-reverse cursor-pointer rounded-large px-2 sm:px-4 py-3 @max-sm:min-w-full min-w-[calc(50%-0.25rem)] data-[selected=true]:border-primary",t?.options?.button),label:A("font-semibold",t?.options?.buttonLabel),description:A("text-sm",t?.options?.buttonDescription)};return h.jsx(fi,{isOpen:r("number-preservation"),onOpenChange:H=>H?n("number-preservation"):o("number-preservation"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(t?.modal?.backdrop),wrapper:A(t?.modal?.wrapper),base:A("m-0 max-h-[90vh]",t?.modal?.base),header:A(t?.modal?.header),body:A("pt-0",t?.modal?.body),footer:A(t?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e("numberPreservation.title")}),h.jsxs(ai,{children:[h.jsxs("div",{className:A("flex flex-col items-center justify-center",t?.header?.container),children:[h.jsx("div",{className:A("rounded-full bg-primary-100 p-4 w-fit",t?.header?.iconWrapper),children:h.jsx("div",{className:"text-primary text-4xl font-bold size-12 flex items-center justify-center",children:"06"})}),h.jsx("div",{className:A("text-xl font-bold mt-2 text-foreground",t?.header?.title),children:e("numberPreservation.title")}),h.jsx("p",{className:A("text-sm text-center text-foreground-500",t?.header?.description),children:e("numberPreservation.description")})]}),h.jsxs(ih,{orientation:"horizontal",value:l.keepCurrentMsisdn===void 0?void 0:l.keepCurrentMsisdn?"true":"false",onValueChange:H=>c({keepCurrentMsisdn:H==="true"}),classNames:{wrapper:A("@container",t?.options?.container)},children:[h.jsx(du,{value:"true",description:e("numberPreservation.keepCurrentNumber"),classNames:_,children:e("common.yes")}),h.jsx(du,{value:"false",description:e("numberPreservation.newNumber"),classNames:_,children:e("common.no")})]}),l.keepCurrentMsisdn&&h.jsxs("div",{className:"mt-2",children:[h.jsx(Tc,{variant:"bordered","aria-label":e("numberPreservation.currentProvider"),placeholder:e("numberPreservation.selectProvider"),isOpen:v,onOpenChange:H=>H!==v&&C(H),size:"lg",radius:"sm",popoverProps:i,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:l.currentProviderSlug?[l.currentProviderSlug]:void 0,classNames:{...t?.provider?.select,trigger:A("border-small cursor-pointer",t?.provider?.select?.trigger)},renderValue:H=>{const Y=Z.find(X=>X.slug===H[0]?.key);return Y?h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[Y.imageUrl&&h.jsx(Ar,{src:a(Y.imageUrl,120,60),alt:Y.name,width:60,height:30,radius:"none"}),Y.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(Y.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),Y.name]}):null},children:Z.map(H=>h.jsx(Ba,{variant:"flat",textValue:H.name,onClick:()=>{c({currentProviderSlug:H.slug,currentSubscriptionType:"subscription",customerSegment:void 0}),C(!1)},children:h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[H.imageUrl&&h.jsx(Ar,{src:a(H.imageUrl,120,60),alt:H.name,width:60,height:30,radius:"none"}),H.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(H.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),H.name]})},H.slug))}),h.jsx("div",{className:A("flex flex-col gap-2 my-2",t?.form?.container),children:h.jsx(wi,{variant:"bordered",placeholder:"0612345678",size:"lg",radius:"sm",autoComplete:"tel",type:"text",inputMode:"numeric",name:"msisdn",color:m?"danger":"default",value:d,onValueChange:H=>{f(H),m&&g(void 0)},onFocus:()=>{s&&!P&&setTimeout(()=>window.scrollTo(0,0),150)},onBlur:()=>{if(!U)return g(e("numberPreservation.invalidNumber"));T()},isInvalid:!!m,errorMessage:m,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}})}),h.jsxs(ih,{orientation:"horizontal",value:l.currentSubscriptionType,onValueChange:H=>c({currentSubscriptionType:H==="subscription"?"subscription":"prepaid"}),size:"sm",classNames:{base:A("justify-between",t?.radioGroup?.base),wrapper:A(t?.radioGroup?.wrapper),label:A(t?.radioGroup?.label),description:A(t?.radioGroup?.description),errorMessage:A(t?.radioGroup?.errorMessage)},children:[h.jsx(du,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"subscription",children:e("numberPreservation.subscription")}),h.jsx(du,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"prepaid",children:e("numberPreservation.prepaid")})]}),j&&h.jsxs("div",{className:"mt-4",children:[h.jsx("div",{className:A("text-lg font-bold text-foreground",t?.extraBenefit?.title),children:e("numberPreservation.extraBenefitTitle")}),h.jsx("p",{className:A("text-sm text-foreground-500",t?.extraBenefit?.description),children:e("numberPreservation.extraBenefitDescription",{providerName:Z.find(H=>H.slug===l.currentProviderSlug)?.name})}),h.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-2",children:[h.jsx(wi,{variant:"bordered",placeholder:"dag",size:"lg",radius:"sm",type:"number",name:"day",color:b?"danger":"default",step:1,min:1,max:31,value:N,onValueChange:H=>{D(H),b&&y(void 0)},isInvalid:!!b,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}}),h.jsx(wi,{variant:"bordered",placeholder:"maand",size:"lg",radius:"sm",type:"number",name:"month",color:b?"danger":"default",min:1,max:12,step:1,value:M,onValueChange:H=>{V(H),b&&y(void 0)},isInvalid:!!b,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}}),h.jsx(wi,{variant:"bordered",placeholder:"jaar",size:"lg",radius:"sm",type:"number",name:"year",color:b?"danger":"default",step:1,min:1900,max:new Date().getFullYear(),value:R,onValueChange:H=>{K(H),b&&y(void 0)},isInvalid:!!b,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}})]}),b&&h.jsx("p",{className:"text-base text-danger-500 mt-1",children:b})]})]})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",t?.submitButton),onPress:()=>{if(l.keepCurrentMsisdn&&!U)return g(e("numberPreservation.invalidNumber"));if(l.keepCurrentMsisdn&&j&&(N||M||R)){if(!W)return y(e("numberPreservation.invalidBirthdate"));F()}s&&T(),o("number-preservation")},color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:e("common.confirm")})})]})})}function ON(e,t=""){const r=e.replace(/ /g,"");if(r.match(/^[A-Za-z]/))return"";const n=r.match(/^(\d{1,3})[^0-9]+/);if(n)return n[1];const o=r.match(/^(\d{4})\d/);if(o)return o[1];const i=r.match(/^(\d{4}\w{1})[^A-Za-z]+/);if(i)return i[1];if(r.length>6)return r.slice(0,6);const s=r.match(/^(\d{4})(\w{1,2})$/i);return s?[s[1],s[2].toUpperCase()].join(t):r}const Wie=dt`
|
|
1332
|
+
`;function kh(e,t=!0){const{data:r}=Vo(t?[Kie,{version:"release",productType:e}]:null,{fetcher:nn});return r?.modificationConfig?{fixedBlocks:r.modificationConfig.fixedBlocks.sort((n,o)=>n.provider.rank-o.provider.rank),otherBlocks:r.modificationConfig.otherBlocks.sort((n,o)=>n.provider.rank-o.provider.rank)}:{fixedBlocks:[],otherBlocks:[]}}function NN({isFixed:e=!1}){const{t}=Je(),{combiDealModal:r}=vt(),{profile:n,setProfile:o}=sn(),{popoverProps:i,isShadowRoot:s}=Zn(),[a]=Fn(),{isModalOpen:l,openModal:c,closeModal:d}=Qt(),f=e?"fixed":"mobile",m=kh(f),[g,b]=x.useState(!1),y=x.useMemo(()=>IN(m.fixedBlocks,f),[m.fixedBlocks.length]),v=t("format.internet"),C=x.useCallback(({slug:S,name:k})=>S.startsWith("other")||k.toLowerCase().includes("internet")?k:`${k} ${v}`,[v]);return h.jsx(fi,{isOpen:l("combi-deal"),onOpenChange:S=>S?c("combi-deal"):d("combi-deal"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(r?.modal?.backdrop),wrapper:A(r?.modal?.wrapper),base:A("m-0 max-h-[90vh]",r?.modal?.base),header:A(r?.modal?.header),body:A("pt-0",r?.modal?.body),footer:A(r?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",r?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:t("combiDeal.title")}),h.jsxs(ai,{children:[h.jsxs("div",{className:A("flex flex-col items-center justify-center",r?.header?.container),children:[h.jsx("div",{className:A("rounded-full bg-primary-100 p-4 w-fit",r?.header?.iconWrapper),children:h.jsx(qu,{size:48,className:A("stroke-primary",r?.header?.icon)})}),h.jsx("div",{className:A("text-xl font-bold mt-2 text-foreground",r?.header?.title),children:t("combiDeal.title")}),h.jsx("p",{className:A("text-sm text-center text-foreground-500 max-w-xs",r?.header?.description),children:t("combiDeal.description")})]}),f==="mobile"&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:A("text-base font-bold text-foreground",r?.providerSelection?.title),children:t("combiDeal.homeInternet")}),h.jsx(Tc,{variant:"bordered","aria-label":t("combiDeal.homeInternet"),placeholder:t("combiDeal.selectHomeProvider"),isOpen:g,onOpenChange:S=>S!==g&&b(S),popoverProps:i,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:n.currentFixedProviderScope?[n.currentFixedProviderScope]:void 0,radius:"sm",size:"lg",renderValue:S=>{const k=y.find(P=>P.slug===S[0]?.key);return k?h.jsxs("div",{className:A("flex items-center gap-3",r?.providerSelection?.select?.itemContainer),children:[k.imageUrl&&h.jsx(Ar,{src:a(k.imageUrl,120,60),alt:k.name,width:60,height:30,radius:"none"}),k.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(k.Icon,{size:24,className:A("stroke-primary-500",r?.providerSelection?.select?.icon)})}),C(k)]}):null},classNames:{...r?.providerSelection?.select,trigger:A("cursor-pointer border-small",r?.providerSelection?.select?.trigger)},children:y.map(S=>h.jsx(Ba,{variant:"flat",textValue:S.name,onClick:()=>{o({currentFixedProviderScope:S.slug}),b(!1)},children:h.jsxs("div",{className:A("flex items-center gap-3",r?.providerSelection?.select?.itemContainer),children:[S.imageUrl&&h.jsx(Ar,{src:a(S.imageUrl,120,60),alt:S.name,width:60,height:30,radius:"none"}),S.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(S.Icon,{size:24,className:A("stroke-primary-500",r?.providerSelection?.select?.icon)})}),C(S)]})},S.slug))})]}),(f==="fixed"||!!n.currentFixedProviderScope)&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:A("mt-3",r?.otherSubscriptions?.container),children:[h.jsx("p",{className:A("text-base font-bold text-foreground",r?.otherSubscriptions?.label),children:t("combiDeal.selectOtherSubscriptions")}),h.jsx("p",{className:A("text-sm text-foreground",r?.otherSubscriptions?.description),children:t("combiDeal.otherSubscriptionsDescription")})]}),h.jsx("div",{className:A("w-full border-small px-1 py-2 rounded-small border-default-200",r?.otherSubscriptions?.listboxContainer),children:h.jsx(l0,{selectedKeys:n.currentMobileProviders?.map(S=>S.scope)??[],selectionMode:"multiple",variant:"flat","aria-label":t("combiDeal.otherSubscriptions"),onSelectionChange:S=>o({currentMobileProviders:Array.from(S).map(k=>({scope:k.toString(),value:"1"}))}),classNames:{list:A(r?.otherSubscriptions?.listboxList)},children:m.otherBlocks.map(S=>h.jsx(Ba,{title:S.provider.name,description:t(`modificationBlocks.${S.scope}`,{defaultValue:S.description}),startContent:h.jsx(Ar,{src:a(S.provider.imageUrl,120,60),alt:S.provider.name,width:60,height:30,radius:"none",classNames:{wrapper:A("aspect-2/1 shrink-0",r?.otherSubscriptions?.listboxItem?.image)}}),classNames:{base:A(r?.otherSubscriptions?.listboxItem?.base),wrapper:A(r?.otherSubscriptions?.listboxItem?.wrapper),title:A("text-sm font-semibold",r?.otherSubscriptions?.listboxItem?.title),description:A("text-xs",r?.otherSubscriptions?.listboxItem?.description),selectedIcon:A(r?.otherSubscriptions?.listboxItem?.selectedIcon)}},S.scope))})})]})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",r?.submitButton),onPress:()=>d("combi-deal"),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:t("common.confirm")})})]})})}function Vie(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:s="text",validationBehavior:a="aria"}=e,[l,c]=jo(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Bi(e,t),f=ru({...e,value:l}),{isInvalid:m,validationErrors:g,validationDetails:b}=f.displayValidation,{labelProps:y,fieldProps:v,descriptionProps:C,errorMessageProps:S}=Op({...e,isInvalid:m,errorMessage:e.errorMessage||g}),k=Ln(e,{labelable:!0});const P={type:s,pattern:e.pattern};let[E]=x.useState(l);var $;return uf(t,($=e.defaultValue)!==null&&$!==void 0?$:E,c),Lp(e,f,t),{labelProps:y,inputProps:it(k,r==="input"?P:void 0,{disabled:n,readOnly:i,required:o&&a==="native","aria-required":o&&a==="aria"||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:O=>c(O.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(x.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...v}),descriptionProps:C,errorMessageProps:S,isInvalid:m,validationErrors:g,validationDetails:b}}function Rie(e){var t,r,n,o,i,s,a;const l=ur(),{validationBehavior:c}=nu(za)||{},[d,f]=qr(e,WC.variantKeys),{ref:m,as:g,type:b,label:y,baseRef:v,wrapperRef:C,description:S,className:k,classNames:P,autoFocus:E,startContent:$,endContent:O,onClear:N,onChange:D,validationState:M,validationBehavior:V=(t=c??l?.validationBehavior)!=null?t:"native",innerWrapperRef:R,onValueChange:K=()=>{},...j}=d,B=x.useCallback(rt=>{K(rt??"")},[K]),[U,W]=x.useState(!1),L=g||"div",Z=(n=(r=e.disableAnimation)!=null?r:l?.disableAnimation)!=null?n:!1,T=ot(m),F=ot(v),_=ot(C),H=ot(R),[Y,X]=jo(d.value,(o=d.defaultValue)!=null?o:"",B),oe=b==="file",Q=((a=(s=(i=T?.current)==null?void 0:i.files)==null?void 0:s.length)!=null?a:0)>0,le=["date","time","month","week","range"].includes(b),ue=!hs(Y)||le||Q,te=ue||U,ge=b==="hidden",Se=e.isMultiline,pe=A(P?.base,k,ue?"is-filled":""),we=x.useCallback(()=>{var rt;oe?T.current.value="":X(""),N?.(),(rt=T.current)==null||rt.focus()},[X,N,oe]);ja(()=>{T.current&&X(T.current.value)},[T.current]);const{labelProps:be,inputProps:re,isInvalid:ke,validationErrors:Ne,validationDetails:Me,descriptionProps:Pe,errorMessageProps:Ae}=Vie({...e,validationBehavior:V,autoCapitalize:e.autoCapitalize,value:Y,"aria-label":e.label?e["aria-label"]:Od(e["aria-label"],e.placeholder),inputElementType:Se?"textarea":"input",onChange:X},T);oe&&(delete re.value,delete re.onChange);const{isFocusVisible:xe,isFocused:Ie,focusProps:et}=Ir({autoFocus:E,isTextInput:!0}),{isHovered:wt,hoverProps:lt}=dn({isDisabled:!!e?.isDisabled}),{isHovered:Ut,hoverProps:ut}=dn({isDisabled:!!e?.isDisabled}),{focusProps:Ue,isFocusVisible:Vt}=Ir(),{focusWithinProps:Jt}=Ia({onFocusWithinChange:W}),{pressProps:Xt}=xn({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:we}),sr=M==="invalid"||ke,Ct=eP({labelPlacement:e.labelPlacement,label:y}),Sr=typeof d.errorMessage=="function"?d.errorMessage({isInvalid:sr,validationErrors:Ne,validationDetails:Me}):d.errorMessage||Ne?.join(" "),dr=!!N||e.isClearable,kr=!!y||!!S||!!Sr,$t=!!d.placeholder,tt=!!y,It=!!S||!!Sr,ar=Ct==="outside-left",er=Ct==="outside-top",Yr=Ct==="outside"||ar||er,en=Ct==="inside",ki=T.current?(!T.current.value||T.current.value===""||!Y||Y==="")&&$t:!1,hn=!!$,to=Yr?ar||er||$t||Ct==="outside"&&hn:!1,Ur=Ct==="outside"&&!$t&&!hn,jt=x.useMemo(()=>WC({...f,isInvalid:sr,labelPlacement:Ct,isClearable:dr,disableAnimation:Z}),[jr(f),sr,Ct,dr,hn,Z]),Qi=x.useCallback((rt={})=>({ref:F,className:jt.base({class:pe}),"data-slot":"base","data-filled":ae(ue||$t||hn||ki||oe),"data-filled-within":ae(te||$t||hn||ki||oe),"data-focus-within":ae(U),"data-focus-visible":ae(xe),"data-readonly":ae(e.isReadOnly),"data-focus":ae(Ie),"data-hover":ae(wt||Ut),"data-required":ae(e.isRequired),"data-invalid":ae(sr),"data-disabled":ae(e.isDisabled),"data-has-elements":ae(kr),"data-has-helper":ae(It),"data-has-label":ae(tt),"data-has-value":ae(!ki),"data-hidden":ae(ge),...Jt,...rt}),[jt,pe,ue,Ie,wt,Ut,sr,It,tt,kr,ki,hn,U,xe,te,$t,Jt,ge,e.isReadOnly,e.isRequired,e.isDisabled]),oa=x.useCallback((rt={})=>({"data-slot":"label",className:jt.label({class:P?.label}),...Oe(be,ut,rt)}),[jt,Ut,be,P?.label]),Jo=x.useCallback(rt=>{rt.key==="Escape"&&Y&&(dr||N)&&!e.isReadOnly&&(X(""),N?.())},[Y,X,N,dr,e.isReadOnly]),St=x.useCallback((rt={})=>({"data-slot":"input","data-filled":ae(ue),"data-filled-within":ae(te),"data-has-start-content":ae(hn),"data-has-end-content":ae(!!O),"data-type":b,className:jt.input({class:A(P?.input,ue?"is-filled":"",Se?"pe-0":"",b==="password"?"[&::-ms-reveal]:hidden":"")}),...Oe(et,re,Lt(j,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(re))}),rt),"aria-readonly":ae(e.isReadOnly),onChange:co(re.onChange,D),onKeyDown:co(re.onKeyDown,rt.onKeyDown,Jo),ref:T}),[jt,Y,et,re,j,ue,te,hn,O,P?.input,e.isReadOnly,e.isRequired,D,Jo]),Xo=x.useCallback((rt={})=>({ref:_,"data-slot":"input-wrapper","data-hover":ae(wt||Ut),"data-focus-visible":ae(xe),"data-focus":ae(Ie),className:jt.inputWrapper({class:A(P?.inputWrapper,ue?"is-filled":"")}),...Oe(rt,lt),onClick:Qo=>{T.current&&Qo.currentTarget===Qo.target&&T.current.focus()},style:{cursor:"text",...rt.style}}),[jt,wt,Ut,xe,Ie,Y,P?.inputWrapper]),Pi=x.useCallback((rt={})=>({...rt,ref:H,"data-slot":"inner-wrapper",onClick:Qo=>{T.current&&Qo.currentTarget===Qo.target&&T.current.focus()},className:jt.innerWrapper({class:A(P?.innerWrapper,rt?.className)})}),[jt,P?.innerWrapper]),es=x.useCallback((rt={})=>({...rt,"data-slot":"main-wrapper",className:jt.mainWrapper({class:A(P?.mainWrapper,rt?.className)})}),[jt,P?.mainWrapper]),nl=x.useCallback((rt={})=>({...rt,"data-slot":"helper-wrapper",className:jt.helperWrapper({class:A(P?.helperWrapper,rt?.className)})}),[jt,P?.helperWrapper]),ol=x.useCallback((rt={})=>({...rt,...Pe,"data-slot":"description",className:jt.description({class:A(P?.description,rt?.className)})}),[jt,P?.description]),ia=x.useCallback((rt={})=>({...rt,...Ae,"data-slot":"error-message",className:jt.errorMessage({class:A(P?.errorMessage,rt?.className)})}),[jt,Ae,P?.errorMessage]),Ei=x.useCallback((rt={})=>({...rt,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":ae(Vt),className:jt.clearButton({class:A(P?.clearButton,rt?.className)}),...Oe(Xt,Ue)}),[jt,Vt,Xt,Ue,P?.clearButton]);return{Component:L,classNames:P,domRef:T,label:y,description:S,startContent:$,endContent:O,labelPlacement:Ct,isClearable:dr,hasHelper:It,hasStartContent:hn,isLabelOutside:to,isOutsideLeft:ar,isOutsideTop:er,isLabelOutsideAsPlaceholder:Ur,shouldLabelBeOutside:Yr,shouldLabelBeInside:en,hasPlaceholder:$t,isInvalid:sr,errorMessage:Sr,getBaseProps:Qi,getLabelProps:oa,getInputProps:St,getMainWrapperProps:es,getInputWrapperProps:Xo,getInnerWrapperProps:Pi,getHelperWrapperProps:nl,getDescriptionProps:ol,getErrorMessageProps:ia,getClearButtonProps:Ei}}var DN=Xe((e,t)=>{const{Component:r,label:n,description:o,isClearable:i,startContent:s,endContent:a,labelPlacement:l,hasHelper:c,isOutsideLeft:d,isOutsideTop:f,shouldLabelBeOutside:m,errorMessage:g,isInvalid:b,getBaseProps:y,getLabelProps:v,getInputProps:C,getInnerWrapperProps:S,getInputWrapperProps:k,getMainWrapperProps:P,getHelperWrapperProps:E,getDescriptionProps:$,getErrorMessageProps:O,getClearButtonProps:N}=Rie({...e,ref:t}),D=n?h.jsx("label",{...v(),children:n}):null,M=x.useMemo(()=>i?h.jsx("button",{...N(),children:a||h.jsx(xv,{})}):a,[i,N]),V=x.useMemo(()=>{const j=b&&g;return!c||!(j||o)?null:h.jsx("div",{...E(),children:j?h.jsx("div",{...O(),children:g}):h.jsx("div",{...$(),children:o})})},[c,b,g,o,E,O,$]),R=x.useMemo(()=>h.jsxs("div",{...S(),children:[s,h.jsx("input",{...C()}),M]}),[s,M,C,S]),K=x.useMemo(()=>m?h.jsxs("div",{...P(),children:[h.jsxs("div",{...k(),children:[!d&&!f?D:null,R]}),V]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{...k(),children:[D,R]}),V]}),[l,V,m,D,R,g,o,P,k,O,$]);return h.jsxs(r,{...y(),children:[d||f?D:null,K]})});DN.displayName="HeroUI.Input";var wi=DN;function MN(){const{t:e}=Je(),{numberPreservationModal:t}=vt(),{isModalOpen:r,openModal:n,closeModal:o}=Qt(),{popoverProps:i,isShadowRoot:s}=Zn(),[a]=Fn(),{profile:l,setProfile:c}=sn(),[d,f]=x.useState(l.currentMsisdn??""),[m,g]=x.useState(),[b,y]=x.useState(),[v,C]=x.useState(!1),S=L1(),{width:k}=xa(),P=k>=1024,[E,$,O]=l.birthdate?l.birthdate.split("-"):[],[N,D]=x.useState(E??""),[M,V]=x.useState($??""),[R,K]=x.useState(O??""),j=l.currentProviderSlug==="odido",U=/^((06{1}[1-9]{1}[0-9]{7})|97([0-9]{9}))$/.test(d)||d.length===0||d==="",W=x.useMemo(()=>{if(!N||!M||!R||R.length!==4)return!1;const H=new Date(`${R}-${M}-${N}`);return!(H.toString()==="Invalid Date"||H.getFullYear()<1900||H.getFullYear()>new Date().getFullYear())},[N,M,R]),L=e("numberPreservation.otherProvider"),Z=x.useMemo(()=>[...S.map(Y=>({slug:Y.slug,name:Y.name,imageUrl:Y.imageUrl,Icon:void 0})),{name:L,slug:"other",Icon:J4,imageUrl:void 0}],[S.length,L]),T=x.useCallback(()=>{d!==l.currentMsisdn&&(Zc({currentMsisdn:d}),c({currentMsisdn:d,customerSegment:void 0}))},[d,c,l.currentMsisdn]);function F(){if(!W)return;const H=new Date(`${R}-${M}-${N}`).toLocaleDateString("nl-NL",{year:"numeric",month:"2-digit",day:"2-digit"});l.birthdate!==H&&(Zc({birthdate:H}),c({birthdate:H,customerSegment:void 0}))}x.useEffect(()=>{!l.keepCurrentMsisdn||l.currentSubscriptionType||c({currentSubscriptionType:"subscription"})},[l.keepCurrentMsisdn,l.currentSubscriptionType,c]);const _={base:A("inline-flex m-0 items-center justify-between border-medium border-default-200 hover:border-default-400","flex-row-reverse cursor-pointer rounded-large px-2 sm:px-4 py-3 @max-sm:min-w-full min-w-[calc(50%-0.25rem)] data-[selected=true]:border-primary",t?.options?.button),label:A("font-semibold",t?.options?.buttonLabel),description:A("text-sm",t?.options?.buttonDescription)};return h.jsx(fi,{isOpen:r("number-preservation"),onOpenChange:H=>H?n("number-preservation"):o("number-preservation"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(t?.modal?.backdrop),wrapper:A(t?.modal?.wrapper),base:A("m-0 max-h-[90vh]",t?.modal?.base),header:A(t?.modal?.header),body:A("pt-0",t?.modal?.body),footer:A(t?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e("numberPreservation.title")}),h.jsxs(ai,{children:[h.jsxs("div",{className:A("flex flex-col items-center justify-center",t?.header?.container),children:[h.jsx("div",{className:A("rounded-full bg-primary-100 p-4 w-fit",t?.header?.iconWrapper),children:h.jsx("div",{className:"text-primary text-4xl font-bold size-12 flex items-center justify-center",children:"06"})}),h.jsx("div",{className:A("text-xl font-bold mt-2 text-foreground",t?.header?.title),children:e("numberPreservation.title")}),h.jsx("p",{className:A("text-sm text-center text-foreground-500",t?.header?.description),children:e("numberPreservation.description")})]}),h.jsxs(ih,{orientation:"horizontal",value:l.keepCurrentMsisdn===void 0?void 0:l.keepCurrentMsisdn?"true":"false",onValueChange:H=>c({keepCurrentMsisdn:H==="true"}),classNames:{wrapper:A("@container",t?.options?.container)},children:[h.jsx(du,{value:"true",description:e("numberPreservation.keepCurrentNumber"),classNames:_,children:e("common.yes")}),h.jsx(du,{value:"false",description:e("numberPreservation.newNumber"),classNames:_,children:e("common.no")})]}),l.keepCurrentMsisdn&&h.jsxs("div",{className:"mt-2",children:[h.jsx(Tc,{variant:"bordered","aria-label":e("numberPreservation.currentProvider"),placeholder:e("numberPreservation.selectProvider"),isOpen:v,onOpenChange:H=>H!==v&&C(H),size:"lg",radius:"sm",popoverProps:i,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:l.currentProviderSlug?[l.currentProviderSlug]:void 0,classNames:{...t?.provider?.select,trigger:A("border-small cursor-pointer",t?.provider?.select?.trigger)},renderValue:H=>{const Y=Z.find(X=>X.slug===H[0]?.key);return Y?h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[Y.imageUrl&&h.jsx(Ar,{src:a(Y.imageUrl,120,60),alt:Y.name,width:60,height:30,radius:"none"}),Y.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(Y.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),Y.name]}):null},children:Z.map(H=>h.jsx(Ba,{variant:"flat",textValue:H.name,onClick:()=>{c({currentProviderSlug:H.slug,currentSubscriptionType:"subscription",customerSegment:void 0}),C(!1)},children:h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[H.imageUrl&&h.jsx(Ar,{src:a(H.imageUrl,120,60),alt:H.name,width:60,height:30,radius:"none"}),H.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(H.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),H.name]})},H.slug))}),h.jsx("div",{className:A("flex flex-col gap-2 my-2",t?.form?.container),children:h.jsx(wi,{variant:"bordered",placeholder:"0612345678",size:"lg",radius:"sm",autoComplete:"tel",type:"text",inputMode:"numeric",name:"msisdn",color:m?"danger":"default",value:d,onValueChange:H=>{f(H),m&&g(void 0)},onFocus:()=>{s&&!P&&setTimeout(()=>window.scrollTo(0,0),150)},onBlur:()=>{if(!U)return g(e("numberPreservation.invalidNumber"));T()},isInvalid:!!m,errorMessage:m,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}})}),h.jsxs(ih,{orientation:"horizontal",value:l.currentSubscriptionType,onValueChange:H=>c({currentSubscriptionType:H==="subscription"?"subscription":"prepaid"}),size:"sm",classNames:{base:A("justify-between",t?.radioGroup?.base),wrapper:A(t?.radioGroup?.wrapper),label:A(t?.radioGroup?.label),description:A(t?.radioGroup?.description),errorMessage:A(t?.radioGroup?.errorMessage)},children:[h.jsx(du,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"subscription",children:e("numberPreservation.subscription")}),h.jsx(du,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"prepaid",children:e("numberPreservation.prepaid")})]}),j&&h.jsxs("div",{className:"mt-4",children:[h.jsx("div",{className:A("text-lg font-bold text-foreground",t?.extraBenefit?.title),children:e("numberPreservation.extraBenefitTitle")}),h.jsx("p",{className:A("text-sm text-foreground-500",t?.extraBenefit?.description),children:e("numberPreservation.extraBenefitDescription",{providerName:Z.find(H=>H.slug===l.currentProviderSlug)?.name})}),h.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-2",children:[h.jsx(wi,{variant:"bordered",placeholder:"dag",size:"lg",radius:"sm",type:"number",name:"day",color:b?"danger":"default",step:1,min:1,max:31,value:N,onValueChange:H=>{D(H),b&&y(void 0)},isInvalid:!!b,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}}),h.jsx(wi,{variant:"bordered",placeholder:"maand",size:"lg",radius:"sm",type:"number",name:"month",color:b?"danger":"default",min:1,max:12,step:1,value:M,onValueChange:H=>{V(H),b&&y(void 0)},isInvalid:!!b,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}}),h.jsx(wi,{variant:"bordered",placeholder:"jaar",size:"lg",radius:"sm",type:"number",name:"year",color:b?"danger":"default",step:1,min:1900,max:new Date().getFullYear(),value:R,onValueChange:H=>{K(H),b&&y(void 0)},isInvalid:!!b,classNames:{inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A(t?.form?.input?.input)}})]}),b&&h.jsx("p",{className:"text-base text-danger-500 mt-1",children:b})]})]})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",t?.submitButton),onPress:()=>{if(l.keepCurrentMsisdn&&!U)return g(e("numberPreservation.invalidNumber"));if(l.keepCurrentMsisdn&&j&&(N||M||R)){if(!W)return y(e("numberPreservation.invalidBirthdate"));F()}s&&T(),o("number-preservation")},color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:e("common.confirm")})})]})})}function ON(e,t=""){const r=e.replace(/ /g,"");if(r.match(/^[A-Za-z]/))return"";const n=r.match(/^(\d{1,3})[^0-9]+/);if(n)return n[1];const o=r.match(/^(\d{4})\d/);if(o)return o[1];const i=r.match(/^(\d{4}\w{1})[^A-Za-z]+/);if(i)return i[1];if(r.length>6)return r.slice(0,6);const s=r.match(/^(\d{4})(\w{1,2})$/i);return s?[s[1],s[2].toUpperCase()].join(t):r}const Wie=ft`
|
|
1336
1333
|
query postcodeCheck($postcode: String!, $number: Int!, $numberAddon: String!) {
|
|
1337
1334
|
postcode(postcode: $postcode, number: $number, numberAddon: $numberAddon) {
|
|
1338
1335
|
address {
|
|
@@ -1341,7 +1338,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1341
1338
|
}
|
|
1342
1339
|
}
|
|
1343
1340
|
}
|
|
1344
|
-
`;function jN(e,t,r,n="",o=!1){const[i,s]=x.useState(o),a=gp(t,500),l=gp(r,500),c=gp(n,500),{data:d,isValidating:f,error:m}=xp(a&&l?[Wie,{postcode:a,number:parseInt(l,10),numberAddon:c||""}]:null,nn,{revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1}),[g,b]=x.useState(null),y=x.useRef(e);return x.useEffect(()=>{y.current=e},[e]),x.useEffect(()=>{f||b(null)},[f]),zo(()=>{if(!(f||!a||!l)){if(m?.response?.errors?.length){if(m.response.errors[0]?.message==="postnl_api_error"){b(Ee.t("postcodeCheck.invalidAddressError"));return}b(Ee.t("postcodeCheck.invalidAddressError"));return}if(d?.postcode?.address){y.current(d.postcode.address),s(!1),b(null);return}!f&&a&&l&&!m&&!d?.postcode?.address&&b(Ee.t("postcodeCheck.invalidAddressError"))}},[d,m,f,a,l]),{manual:i,isLoading:f&&!!a&&!!l,error:g}}function Uie(){const{t:e}=Je(),{postcodeCheckModal:t}=vt(),{profile:r,setProfile:n}=sn(),{popoverProps:o,isShadowRoot:i}=Zn(),[s]=Fn(),{isModalOpen:a,openModal:l,closeModal:c}=Qt(),[d,f]=x.useState(r.address?.postcode||""),[m,g]=x.useState(r.address?.number||""),[b,y]=x.useState(r.address?.numberAddon||""),[v,C]=x.useState(r.address?.street||""),[S,k]=x.useState(r.address?.city||""),[P,E]=x.useState(!1),$=x.useRef(!!(r.address?.street&&r.address?.city)),O=kh("fixed"),{width:N}=xa(),D=N>=1024,M=x.useCallback(L=>{L.street!==void 0&&C(L.street),L.city!==void 0&&k(L.city)},[]);zo(()=>{const L=r.address;f(L?.postcode||""),g(L?.number||""),y(L?.numberAddon||""),C(L?.street||""),k(L?.city||""),$.current=!!(L?.street&&L?.city)},[r.address]);const{manual:V,error:R}=jN(M,d,m,b,$.current);zo(()=>{!V&&(!d||!m)&&(C(""),k(""))},[d,m,V]);const K=x.useMemo(()=>IN(O.fixedBlocks,"fixed"),[O.fixedBlocks.length]),j={inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A("absolute bottom-1.5",t?.form?.input?.input),label:A("top-1.5",t?.form?.input?.label)},B=x.useCallback(L=>{L.preventDefault();const Z=new FormData(L.target),T={...Object.fromEntries(Z.entries()),street:v,city:S},{success:F,data:_}=j1.safeParse(T);F&&(Zc({address:_}),n({address:_}),c("postcode-check"))},[v,S,n,c]),U=x.useCallback(({slug:L,name:Z})=>L.startsWith("other")||Z.toLowerCase().includes("internet")?Z:`${Z} Internet`,[]);function W(){i&&!D&&setTimeout(()=>window.scrollTo(0,0),150)}return h.jsx(fi,{isOpen:a("postcode-check"),onOpenChange:L=>L?l("postcode-check"):c("postcode-check"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!i,portalContainer:o.portalContainer,classNames:{backdrop:A(t?.modal?.backdrop),wrapper:A(t?.modal?.wrapper),base:A("m-0 max-h-[90vh]",t?.modal?.base),header:A(t?.modal?.header),body:A("pt-0",t?.modal?.body),footer:A(t?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e("postcodeCheck.title")}),h.jsxs(ai,{children:[h.jsxs("div",{className:A("flex flex-col items-center justify-center",t?.header?.container),children:[h.jsx("div",{className:A("rounded-full bg-primary-100 p-4 w-fit",t?.header?.iconWrapper),children:h.jsx(dg,{size:48,className:A("stroke-primary",t?.header?.icon)})}),h.jsx("div",{className:A("text-xl font-bold mt-2 text-foreground",t?.header?.title),children:e("postcodeCheck.title")}),h.jsx("p",{className:A("text-sm text-center text-foreground-500",t?.header?.description),children:e("postcodeCheck.description")})]}),h.jsxs("form",{id:"postcode-check-form",className:A("flex flex-col gap-2 mb-3",t?.form?.container),onSubmit:B,children:[h.jsx("p",{className:A("text-base font-bold text-foreground",t?.form?.addressLabel),children:"Adres"}),h.jsxs("div",{className:A("flex flex-row gap-2",t?.form?.inputsContainer),children:[h.jsx(wi,{variant:"bordered",placeholder:"1234AB",radius:"sm",type:"text",inputMode:d.length<4?"numeric":"text",name:"postcode",autoComplete:"postal-code",value:d,onValueChange:L=>f(ON(L)),onFocus:W,classNames:j,maxLength:6,label:e("postcodeCheck.postalCode"),isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"1",radius:"sm",type:"text",inputMode:"numeric",name:"number",autoComplete:"street-address",value:m,onValueChange:L=>g(L.replace(/\D/g,"")),onFocus:W,classNames:j,label:e("postcodeCheck.houseNumber"),isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"A",radius:"sm",type:"text",name:"numberAddon",value:b,onValueChange:L=>y(L.toUpperCase()),onFocus:W,classNames:j,label:e("postcodeCheck.houseNumberAddition")})]}),R&&h.jsx(uu,{color:"danger",variant:"faded",title:R,hideIconWrapper:!0,classNames:t?.form?.errorAlert})]}),h.jsx("p",{className:A("text-base font-bold text-foreground",t?.provider?.label),children:e("postcodeCheck.homeInternet")}),h.jsx(Tc,{variant:"bordered","aria-label":e("postcodeCheck.homeInternet"),placeholder:e("postcodeCheck.selectProvider"),isOpen:P,onOpenChange:L=>L!==P&&E(L),popoverProps:o,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:r.currentFixedProviderScope?[r.currentFixedProviderScope]:void 0,radius:"sm",size:"lg",renderValue:L=>{const Z=K.find(T=>T.slug===L[0]?.key);return Z?h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[Z.imageUrl&&h.jsx(Ar,{src:s(Z.imageUrl,120,60),alt:Z.name,width:60,height:30,radius:"none"}),Z.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(Z.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),U(Z)]}):null},classNames:{...t?.provider?.select,trigger:A("cursor-pointer border-small",t?.provider?.select?.trigger)},children:K.map(L=>h.jsx(Ba,{variant:"flat",textValue:L.name,onClick:()=>{n({currentFixedProviderScope:L.slug}),E(!1)},children:h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[L.imageUrl&&h.jsx(Ar,{src:s(L.imageUrl,120,60),alt:L.name,width:60,height:30,radius:"none"}),L.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(L.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),U(L)]})},L.slug))})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",t?.submitButton),type:"submit",form:"postcode-check-form",color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:e("common.confirm")})})]})})}function gu({variant:e="combiDeal",isFixed:t=!1}){const{t:r}=Je(),{profile:n,setProfile:o}=sn(),{profileBanner:i}=vt(),{openModal:s}=Qt(),a=x.useMemo(()=>{switch(e){case"numberPreservation":return{Icon:null,avatarName:"0 6",title:r("numberPreservation.title"),description:r("numberPreservation.question"),ctaYes:()=>{o({keepCurrentMsisdn:!0}),s("number-preservation")},ctaNo:()=>o({keepCurrentMsisdn:!1}),yes:r("numberPreservation.yes"),no:r("numberPreservation.no")};case"postcodeCheck":return{Icon:dg,title:r("postcodeCheck.currentProvider"),description:r("postcodeCheck.question"),ctaYes:()=>s("postcode-check"),ctaNo:()=>o({currentFixedProviderScope:"other"}),yes:r("postcodeCheck.yes"),no:r("postcodeCheck.no")};default:return{Icon:qu,title:r("combiDeal.customerBenefit"),description:r(t?"combiDeal.questionOtherSubscriptions":"combiDeal.question"),ctaYes:()=>s("combi-deal"),ctaNo:()=>o(t?{currentMobileProviders:[]}:{currentFixedProviderScope:"other"}),yes:r("combiDeal.yes"),no:r("combiDeal.no")}}},[e,t]);return e==="numberPreservation"&&n.keepCurrentMsisdn!==void 0||e==="postcodeCheck"&&n.currentFixedProviderScope||e==="combiDeal"&&t&&n.currentMobileProviders||e==="combiDeal"&&!t&&n.currentFixedProviderScope||e==="numberPreservation"&&t||e==="postcodeCheck"&&!t?null:h.jsxs("div",{className:A("flex md:items-center justify-between border-2 border-primary p-2 md:p-3 rounded-full w-full",i?.container),children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2 md:gap-3",children:[h.jsx("div",{className:"h-full flex items-center justify-center",children:h.jsx(HP,{color:"warning",content:"",shape:"circle",className:i?.badge,children:h.jsx(Hl,{size:"md",radius:"full",color:"warning",showFallback:!0,fallback:a.Icon&&h.jsx(a.Icon,{size:24,className:A("stroke-primary",i?.icon)}),name:a.avatarName,classNames:{...i?.avatar,name:A("text-primary font-bold flex items-center justify-center p-4"),base:A("size-8 md:size-10 bg-primary-100",i?.avatar?.base)}})})}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("div",{className:A("font-semibold text-left truncate w-full text-sm",i?.title),children:a.title}),h.jsx("div",{className:A("text-xs text-foreground-500 text-left truncate w-full overflow-hidden overflow-ellipsis whitespace-nowrap",i?.description),children:a.description})]})]}),h.jsxs("div",{className:"flex flex-row gap-2",children:[h.jsx(hr,{className:A("font-medium gap-1 rounded-full min-w-16",i?.button),color:"primary",size:"md",onPress:a.ctaYes,disableAnimation:!0,disableRipple:!0,children:a.yes}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full min-w-16",i?.button),color:"primary",size:"md",onPress:a.ctaNo,disableAnimation:!0,disableRipple:!0,children:a.no})]})]})}function Hie(e,t){return!e&&!t?"":t&&/^\d+$/.test(t)?`${e}/${t}`:`${e}${t??""}`}function qie({street:e,city:t,number:r,numberAddon:n}){if(!(!e||!r||!t))return`${e} ${Hie(r,n)}, ${t}`}function LN({isFixed:e=!1,showTitle:t=!0,showProfileBanner:r=!1}){const{t:n}=Je(),{profile:o}=sn(),{openModal:i}=Qt(),{profileButton:s}=vt(),a=L1(),l=kh(e?"fixed":"mobile"),c=PN(o.currentMobileProviders,l.otherBlocks);return h.jsxs("div",{className:"@container flex flex-col gap-3 mb-3",children:[t&&h.jsx("div",{className:"text-base font-bold text-foreground",children:n("profile.personalizeTitle")}),h.jsxs("div",{className:A("grid grid-cols-1 gap-3 w-full",r&&(e||o.keepCurrentMsisdn===void 0)?"@3xl:grid-cols-2":"@xl:grid-cols-2"),children:[e?!r||o.currentFixedProviderScope?h.jsx(ql,{title:n("profile.postcodeCheck"),description:o.address?qie(o.address):n("profile.enterPostcode"),selected:o.address!==void 0,onClick:()=>i("postcode-check"),Icon:dg,classNames:s}):h.jsx(gu,{variant:"postcodeCheck",isFixed:!0}):!r||o.keepCurrentMsisdn!==void 0?h.jsx(ql,{title:n("profile.numberPreservation"),description:kN(o,a),selected:o.keepCurrentMsisdn===!1||o.keepCurrentMsisdn&&!!o.currentProviderSlug,onClick:()=>i("number-preservation"),avatarName:"0 6",classNames:s}):h.jsx(gu,{variant:"numberPreservation"}),!r||(e?o.currentMobileProviders:o.currentFixedProviderScope)?h.jsx(ql,{title:n("profile.customerBenefit"),description:SN(l.fixedBlocks.map(d=>({slug:d.scope.split("/")[1]??"",name:d.provider.name})),c,o.currentFixedProviderScope,e),selected:e?o.currentMobileProviders?.some(d=>l.otherBlocks.some(f=>f.scope===d.scope)):l.fixedBlocks.some(d=>d.scope===o.currentFixedProviderScope)||o.currentFixedProviderScope==="other",onClick:()=>i("combi-deal"),Icon:qu,classNames:s}):h.jsx(gu,{variant:"combiDeal",isFixed:e})]})]})}function Gie(){const{t:e}=Je(),[t,r]=x.useState(!1),{sortSelect:n}=vt(),{popoverContent:o,listbox:i,...s}=n||{},{sortOptions:a,handleFilterChange:l,getActiveFilterValue:c}=vi(),{popoverProps:d,isShadowRoot:f}=Zn({classNames:o});return f?h.jsx("select",{name:e("filters.sort"),"aria-label":e("filters.sort"),value:c("sorteren")[0],onChange:m=>l({slug:"sorteren",value:m.target.value}),className:A("appearance-none min-w-1/2 lg:min-w-auto lg:w-[200px] h-10 cursor-pointer border-small rounded-small","bg-white px-3 shadow-xs outline-solid outline-transparent tap-highlight-transparent","border-default-200 hover:border-default-400 transition-[border-color] motion-reduce:transition-none",s?.trigger),style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")`,backgroundSize:"16px",backgroundRepeat:"no-repeat",backgroundPositionY:"center",backgroundPositionX:"95%"},children:a.map(m=>h.jsx("option",{value:m.value,children:e(`sortOptions.${m.value}`,{defaultValue:m.name})},m.value))}):h.jsx(Tc,{variant:"bordered","aria-label":e("filters.sort"),placeholder:e("filters.sort"),popoverProps:d,selectionMode:"single",disallowEmptySelection:!0,isOpen:t,onOpenChange:m=>m!==t&&r(m),selectedKeys:c("sorteren"),radius:"sm",listboxProps:{itemClasses:i},classNames:{...s,base:A("min-w-1/2 lg:min-w-auto lg:w-[200px]",s?.base),trigger:A("cursor-pointer border-small bg-white",s?.trigger)},children:a.map(m=>h.jsx(Ba,{variant:"flat",onClick:()=>{l({slug:"sorteren",value:m.value}),r(!1)},children:e(`sortOptions.${m.value}`,{defaultValue:m.name})},m.value))})}function Zie(e,t){return!e&&!t?"":t&&/^\d+$/.test(t)?`${e}/${t}`:`${e}${t??""}`}function Ve(e,t){if(e===void 0)return"";const r=e.toFixed(2).toString().replace(".",","),n=t?.symbol?`${t.symbol} ${r}`:r;return t?.dashed?n.replace(/,00$/,",-"):n}function F1(e){if(!e.productVersion)return;const r=parseFloat(e.productVersion.pricing.sellingPriceInclVat)-(e.creditFee+e.price);if(!(r<=0))return Ve(r,{dashed:!0})}function Qs(e,t,r){if(!(t===e[0].fee&&e[0].fee===e[e.length-1].fee))return t>r?`${Ee.t("format.from")} ${Ve(t,{dashed:!0})} ${Ee.t("format.for")}:`:`${e[0].term} ${Ee.t("format.month_short",{count:e[0].term})} ${Ee.t("format.from").toLowerCase()} ${Ve(t,{dashed:!0})} ${Ee.t("format.for")}:`}function B1(e){switch(e){case Qn:return Ee.t("format.unlimited_short");case 0:return"-";default:return e}}function bu(e,t){const r=e.minutes!==0?`${B1(e.minutes)} ${e.minutes===Qn?Ee.t("format.minutes_short"):Ee.t("format.minutes")}`:void 0,n=e.sms!==0?e.sms===e.minutes?Ee.t("format.sms"):`${B1(e.sms)} ${Ee.t("format.sms")}`:void 0,o=e.minutes===Qn&&e.sms===Qn||["minutes","sms"].every(s=>e.sharedCredits?.includes(s)),i=o?" / ":" + ";return!r&&!n?"":o?[r,Ee.t("format.sms")].join(i):[r,n].join(i)}function Jc(e){switch(e){case 24:return`2 ${Ee.t("format.year",{count:2})}`;case 12:return`1 ${Ee.t("format.year")}`;case 1:return Ee.t("format.monthly");default:return""}}function FN(e){switch(e){case 3:return"3G";case 4:return"4G";case 4.5:return"4G+";case 4.9:return"5G-ready";case 5:return"5G";default:return""}}function ea(e){const t=Jc(e.planVariant.contractTerm);if(e.productType==="fixed"){const i=`${e.content.dataSpeedDown/1e3} / ${e.content.dataSpeedUp/1e3} ${Ee.t("format.megabitPerSecond")}`;if(e.content.types&&!e.content.types.includes("tv"))return[{title:t,slug:"contract-term"},{title:i,slug:"internet-speed"}];const s=`${(e.content.channels||[]).length} (${(e.content.hdChannels||[]).length} HD)`;return[{title:t,slug:"contract-term"},{title:i,slug:"internet-speed"},{title:s,slug:"channels"}]}const r=`${e.content.dataSpeedDown/1e3} ${Ee.t("format.megabitPerSecond")}`,n=`${(e.provider.network||"").replace("-netwerk","")} ${FN(e.content.networkGeneration)}`,o=e.content.dataEu?"EU":"NL";return[{title:t,slug:"contract-term"},{title:r,slug:"data-speed-down"},{title:n,slug:"provider-network"},{title:o,slug:"data-eu"}]}function Kn(e,t){if(e===Qn)return`${Ee.t("format.unlimited_short")} ${t}`;const r=(e/1e3).toString().replace(".",",");return`${t===Ee.t("format.gigabyte")?r:e} ${t}`}const z1=["kpn","vodafone","odido"],Yie=[{type:"isRetention",rank:1,color:"primary",getDisplayName:e=>Ee.t("labels.renewWith",{providerName:e.provider.name}),isApplicable:(e,t)=>(t.isSimOnly||t.isSmartphone)&&e.planVariant.contractType==="retention",sortValue:e=>e.tcoPerMonth,limit:"unlimited",sortDirection:"asc"},{type:"isCheapestPhone",rank:2,color:"primary",getDisplayName:()=>Ee.t("labels.cheapestPhone"),isApplicable:(e,t)=>t.isSmartphone&&Number.isFinite(e.creditFee+e.price),sortValue:e=>e.creditFee+e.price,limit:1,sortDirection:"asc"},{type:"isBudget",rank:3,color:"primary",getDisplayName:()=>Ee.t("labels.budget"),isApplicable:(e,t)=>!t.isFixed&&Number.isFinite(e.tcoPerMonth),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isBudget1Year",rank:3,color:"primary",getDisplayName:()=>Ee.t("labels.budget1Year"),isApplicable:(e,t)=>t.isFixed&&e.planVariant.contractTerm===12&&Number.isFinite(e.tcoPerMonth),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isBudget2Year",rank:3,color:"primary",getDisplayName:()=>Ee.t("labels.budget2Year"),isApplicable:(e,t)=>t.isFixed&&e.planVariant.contractTerm===24&&Number.isFinite(e.tcoPerMonth),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isBudgetFiber",rank:4,color:"primary",getDisplayName:()=>Ee.t("labels.budgetFiber"),isApplicable:(e,t)=>t.isFixed&&(e.tags.find(r=>r.type==="internet")?.slug||"").includes("glasvezel"),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isCombi",rank:5,color:"primary",getDisplayName:e=>e.provider?.name?Ee.t("labels.combi",{providerName:e.provider.name}):Ee.t("labels.combiGeneric"),isApplicable:e=>e.key.includes("m"),sortValue:e=>e.tcoPerMonth,limit:"unlimited",sortDirection:"asc"},{type:"isBudgetOwnNetwork",rank:6,color:"primary",getDisplayName:()=>Ee.t("labels.budgetOwnNetwork"),isApplicable:(e,t)=>(t.isSimOnly||t.isSmartphone)&&z1.includes(e.provider.slug),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isFastestInternet",rank:7,color:"primary",getDisplayName:()=>Ee.t("labels.fastestInternet"),isApplicable:(e,t)=>t.fastestInternetPropositionKey?e.key===t.fastestInternetPropositionKey:Number.isFinite(e.content.dataSpeedDown),sortValue:e=>e.content.dataSpeedDown,limit:1,sortDirection:"desc"},{type:"isBudgetNetwork",rank:8,color:"primary",getDisplayName:e=>e.provider?.network?Ee.t("labels.budgetNetwork",{network:e.provider.network.replace("-netwerk","")}):Ee.t("labels.budgetNetworkGeneric"),isApplicable:(e,t)=>(t.isSimOnly||t.isSmartphone)&&t.budgetNetworkPropositionKeys.includes(e.key),sortValue:e=>e.tcoPerMonth,limit:z1.length,sortDirection:"asc"}];function K1({propositions:e,productCategory:t,labelColorConfig:r,fastestInternetPropositionKey:n}){const o=t==="fixed-proposition",i=t==="sim-only-proposition",s=t==="smartphone-proposition",a={isFixed:o,isSimOnly:i,isSmartphone:s,budgetNetworkPropositionKeys:i||s?Jie(e):[],fastestInternetPropositionKey:n},l=new Map;for(const m of Yie){const g=e.filter(v=>m.isApplicable(v,a));if(g.length===0)continue;const b=[...g].sort((v,C)=>{const S=m.sortValue(v),k=m.sortValue(C);return S===k?0:m.sortDirection==="asc"?S-k:k-S}),y=m.limit==="unlimited"?b.length:m.limit;b.slice(0,y).forEach(v=>{l.has(v.key)||l.set(v.key,{type:m.type,displayName:m.getDisplayName(v),rank:m.rank,color:r[m.type]??m.color})})}const c=Array.from(l.entries()).map(([m,g])=>{const b=e.find(y=>y.key===m);return b?{...b,label:g}:void 0}).filter(m=>!!m).sort((m,g)=>m.label.rank-g.label.rank),d=[],f=new Set;for(const m of c){if(d.length>=3)break;if(o){if(f.has(m.provider.slug))continue;f.add(m.provider.slug)}d.push(m)}return{top:d,all:e.map(m=>({...m,label:l.get(m.key)}))}}function Jie(e){return z1.map(t=>[...e].filter(r=>(r.provider?.network||"").replace("-netwerk","").toLowerCase()===t).sort((r,n)=>r.tcoPerMonth-n.tcoPerMonth)[0]?.key).filter(t=>!!t)}function Xie({channels:e,hdChannels:t,classNames:r}){const{t:n}=Je();return h.jsxs("div",{className:A("pb-4",r?.base),children:[h.jsx("div",{className:A(r?.description),children:n("detailsModal.channelsDescription",{channelsCount:e?.length})}),h.jsx("ul",{className:A("list-disc list-outside pl-6",r?.list),children:e.map(o=>h.jsx("li",{className:A("list-item",r?.listItem),children:h.jsxs("span",{className:A("flex items-center gap-2",r?.channelContainer),children:[o,t?.includes(o)&&h.jsx(NL,{size:24,className:A("stroke-foreground",r?.hdIcon)})]})},o))})]})}function Ph({label:e,originalPrice:t,currentPrice:r,hasMonthlyPrice:n=!0,classNames:o}){return h.jsxs("div",{className:A("flex justify-between",o?.container),children:[h.jsx("div",{className:A("flex items-center gap-1",o?.label),children:e}),n&&h.jsxs("div",{className:A("flex items-center gap-2",o?.priceContainer),children:[t&&h.jsx("div",{className:A("line-through text-foreground-400",o?.originalPrice),children:Ve(t)}),h.jsx("div",{className:A(o?.currentPrice),children:Ve(r)})]})]})}function BN({term:e,price:t,classNames:r}){return h.jsxs("div",{className:A("flex text-sm text-foreground-400 justify-between",r?.container),children:[h.jsxs("div",{className:A("flex items-center gap-1",r?.label),children:[h.jsx(lg,{size:16,className:A("stroke-foreground-400",r?.icon)}),Ee.t("format.afterMonth",{count:e})]}),h.jsx("div",{className:A(r?.price),children:Ve(t)})]})}function zN({proposition:e,classNames:t}){const{t:r}=Je(),{productType:n,provider:o,planVariant:i,bundles:s,monthlyFees:a,price:l,handsetCreditMonthlyFee:c,baseMonthlyFee:d,lifetimeMonthlyFee:f,productVersion:m}=e,g=a[a.length-1].fee,b=d>g?d:g,y=s.filter(N=>!N.contentTypes?.includes("handset_service")),v=y.filter(N=>N.contentTypes?.includes("combi_deal")),C=a&&a[a.length-1].fee!==f,S=a?.reduce((N,D)=>N+D.term,0),k=c>0?d-c:v.length?b-(v[0].baseMonthlyFee||0):b,P=c>0?a[0].fee-c:a[0].fee,E=P!==void 0&&k!==P,$=E?k:void 0,O=E?P:k;return h.jsxs("div",{className:A("mb-8",t?.monthlySection),children:[h.jsxs("div",{className:A("mb-2",t?.monthlyFeesContainer),children:[h.jsxs("div",{className:A("text-lg font-bold flex justify-between",t?.monthlyPriceHeader?.container),children:[h.jsx("div",{className:A(t?.monthlyPriceHeader?.label),children:r("format.monthly")}),h.jsx("div",{className:A(t?.monthlyPriceHeader?.price),children:Ve(a[0].fee)})]}),a?.map((N,D)=>{if(D+1===a?.length)return null;const M=a?.slice(0,D+1).reduce((V,R)=>V+R.term,0);return h.jsx(BN,{term:M,price:a[D+1]?.fee||0,classNames:t?.monthlyFeeTransition},N.term)}),C&&S&&f&&h.jsx(BN,{term:S,price:f,classNames:t?.lifetimeFee})]}),h.jsx(Ph,{label:h.jsxs(h.Fragment,{children:[o.name," ",i.contractType==="retention"?`${r("detailsModal.renewal").toLowerCase()} `:"",Jc(i.contractTerm)]}),originalPrice:$,currentPrice:O,classNames:t?.providerContract}),y.map(N=>{const D=N.contentTypes?.includes("combi_deal"),M=D&&N.promotionMonthlyFee||N.baseMonthlyFee||0,V=D?null:N.promotionMonthlyFee,R=typeof V=="number"&&M!==V,K=R&&M!==0?M:void 0,j=R?V:M,B=M!==0||typeof V=="number"&&V!==0;return h.jsx(Ph,{label:N.displayName,originalPrice:K,currentPrice:j,hasMonthlyPrice:B,classNames:{...t?.bundle,container:A("text-sm text-foreground-400",D&&"text-success",t?.bundle?.container),label:A("pl-4",t?.bundle?.label)}},N.displayName)}),c>0&&h.jsx(Ph,{label:r("detailsModal.deviceBundle"),currentPrice:c,classNames:{container:A("mt-2",t?.handsetBundle?.container),label:t?.handsetBundle?.label,priceContainer:t?.handsetBundle?.priceContainer,currentPrice:t?.handsetBundle?.currentPrice}}),n==="smartphone"&&h.jsxs(h.Fragment,{children:[h.jsx(Ql,{orientation:"horizontal",className:A("my-4",t?.separator)}),h.jsxs("div",{className:A("text-lg font-bold flex justify-between mb-1",t?.oneTimeSection?.header?.container),children:[h.jsx("div",{className:A("flex items-center gap-1",t?.oneTimeSection?.header?.label),children:r("format.oneTime")}),h.jsx("div",{className:A("flex items-center gap-2",t?.oneTimeSection?.header?.price),children:h.jsx("div",{children:Ve(l)})})]}),h.jsx(Ph,{label:h.jsx("div",{className:A("flex items-center gap-1",t?.oneTimeSection?.productRow?.label),children:m?.fullName}),currentPrice:l,classNames:t?.oneTimeSection?.productRow})]})]})}const V1=new WeakMap;function R1(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function Qie(e,t){let r=V1.get(e);if(!r)throw new Error("Unknown grid");return`${r}-${R1(t)}`}function KN(e,t,r){let n=V1.get(e);if(!n)throw new Error("Unknown grid");return`${n}-${R1(t)}-${R1(r)}`}function VN(e,t){return[...e.collection.rowHeaderColumnKeys].map(r=>KN(e,t,r)).join(" ")}var RN={};RN={ascending:"تصاعدي",ascendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تصاعدي`,columnSize:e=>`${e.value} بالبكسل`,descending:"تنازلي",descendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var WN={};WN={ascending:"възходящ",ascendingSort:e=>`сортирано по колона ${e.columnName} във възходящ ред`,columnSize:e=>`${e.value} пиксела`,descending:"низходящ",descendingSort:e=>`сортирано по колона ${e.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var UN={};UN={ascending:"vzestupně",ascendingSort:e=>`řazeno vzestupně podle sloupce ${e.columnName}`,columnSize:e=>`${e.value} pixelů`,descending:"sestupně",descendingSort:e=>`řazeno sestupně podle sloupce ${e.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var HN={};HN={ascending:"stigende",ascendingSort:e=>`sorteret efter kolonne ${e.columnName} i stigende rækkefølge`,columnSize:e=>`${e.value} pixels`,descending:"faldende",descendingSort:e=>`sorteret efter kolonne ${e.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var qN={};qN={ascending:"aufsteigend",ascendingSort:e=>`sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,columnSize:e=>`${e.value} Pixel`,descending:"absteigend",descendingSort:e=>`sortiert nach Spalte ${e.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var GN={};GN={ascending:"αύξουσα",ascendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε αύξουσα σειρά`,columnSize:e=>`${e.value} pixel`,descending:"φθίνουσα",descendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var ZN={};ZN={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:e=>`sorted by column ${e.columnName} in ascending order`,descendingSort:e=>`sorted by column ${e.columnName} in descending order`,columnSize:e=>`${e.value} pixels`,resizerDescription:"Press Enter to start resizing"};var YN={};YN={ascending:"ascendente",ascendingSort:e=>`ordenado por columna ${e.columnName} en sentido ascendente`,columnSize:e=>`${e.value} píxeles`,descending:"descendente",descendingSort:e=>`ordenado por columna ${e.columnName} en orden descendente`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var JN={};JN={ascending:"tõusev järjestus",ascendingSort:e=>`sorditud veeru järgi ${e.columnName} tõusvas järjestuses`,columnSize:e=>`${e.value} pikslit`,descending:"laskuv järjestus",descendingSort:e=>`sorditud veeru järgi ${e.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var XN={};XN={ascending:"nouseva",ascendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan nousevassa järjestyksessä`,columnSize:e=>`${e.value} pikseliä`,descending:"laskeva",descendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var QN={};QN={ascending:"croissant",ascendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre croissant`,columnSize:e=>`${e.value} pixels`,descending:"décroissant",descendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var eD={};eD={ascending:"עולה",ascendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר עולה`,columnSize:e=>`${e.value} פיקסלים`,descending:"יורד",descendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var tD={};tD={ascending:"rastući",ascendingSort:e=>`razvrstano po stupcima ${e.columnName} rastućem redoslijedom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`razvrstano po stupcima ${e.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var rD={};rD={ascending:"növekvő",ascendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, növekvő sorrendben`,columnSize:e=>`${e.value} képpont`,descending:"csökkenő",descendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var nD={};nD={ascending:"crescente",ascendingSort:e=>`in ordine crescente in base alla colonna ${e.columnName}`,columnSize:e=>`${e.value} pixel`,descending:"decrescente",descendingSort:e=>`in ordine decrescente in base alla colonna ${e.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var oD={};oD={ascending:"昇順",ascendingSort:e=>`列 ${e.columnName} を昇順で並べ替え`,columnSize:e=>`${e.value} ピクセル`,descending:"降順",descendingSort:e=>`列 ${e.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var iD={};iD={ascending:"오름차순",ascendingSort:e=>`${e.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:e=>`${e.value} 픽셀`,descending:"내림차순",descendingSort:e=>`${e.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var sD={};sD={ascending:"didėjančia tvarka",ascendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} didėjančia tvarka`,columnSize:e=>`${e.value} piks.`,descending:"mažėjančia tvarka",descendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var aD={};aD={ascending:"augošā secībā",ascendingSort:e=>`kārtots pēc kolonnas ${e.columnName} augošā secībā`,columnSize:e=>`${e.value} pikseļi`,descending:"dilstošā secībā",descendingSort:e=>`kārtots pēc kolonnas ${e.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var lD={};lD={ascending:"stigende",ascendingSort:e=>`sortert etter kolonne ${e.columnName} i stigende rekkefølge`,columnSize:e=>`${e.value} piksler`,descending:"synkende",descendingSort:e=>`sortert etter kolonne ${e.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var uD={};uD={ascending:"oplopend",ascendingSort:e=>`gesorteerd in oplopende volgorde in kolom ${e.columnName}`,columnSize:e=>`${e.value} pixels`,descending:"aflopend",descendingSort:e=>`gesorteerd in aflopende volgorde in kolom ${e.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var cD={};cD={ascending:"rosnąco",ascendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku rosnącym`,columnSize:e=>`Liczba pikseli: ${e.value}`,descending:"malejąco",descendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var dD={};dD={ascending:"crescente",ascendingSort:e=>`classificado pela coluna ${e.columnName} em ordem crescente`,columnSize:e=>`${e.value} pixels`,descending:"decrescente",descendingSort:e=>`classificado pela coluna ${e.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var fD={};fD={ascending:"ascendente",ascendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem ascendente`,columnSize:e=>`${e.value} pixels`,descending:"descendente",descendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var pD={};pD={ascending:"crescătoare",ascendingSort:e=>`sortate după coloana ${e.columnName} în ordine crescătoare`,columnSize:e=>`${e.value} pixeli`,descending:"descrescătoare",descendingSort:e=>`sortate după coloana ${e.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var hD={};hD={ascending:"возрастание",ascendingSort:e=>`сортировать столбец ${e.columnName} в порядке возрастания`,columnSize:e=>`${e.value} пикс.`,descending:"убывание",descendingSort:e=>`сортировать столбец ${e.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var mD={};mD={ascending:"vzostupne",ascendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,columnSize:e=>`Počet pixelov: ${e.value}`,descending:"zostupne",descendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var gD={};gD={ascending:"naraščajoče",ascendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v naraščajočem vrstnem redu`,columnSize:e=>`${e.value} slikovnih pik`,descending:"padajoče",descendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var bD={};bD={ascending:"rastući",ascendingSort:e=>`sortirano po kolonama ${e.columnName} rastućim redosledom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`sortirano po kolonama ${e.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var vD={};vD={ascending:"stigande",ascendingSort:e=>`sorterat på kolumn ${e.columnName} i stigande ordning`,columnSize:e=>`${e.value} pixlar`,descending:"fallande",descendingSort:e=>`sorterat på kolumn ${e.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var yD={};yD={ascending:"artan sırada",ascendingSort:e=>`${e.columnName} sütuna göre artan düzende sırala`,columnSize:e=>`${e.value} piksel`,descending:"azalan sırada",descendingSort:e=>`${e.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var xD={};xD={ascending:"висхідний",ascendingSort:e=>`відсортовано за стовпцем ${e.columnName} у висхідному порядку`,columnSize:e=>`${e.value} пікс.`,descending:"низхідний",descendingSort:e=>`відсортовано за стовпцем ${e.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var wD={};wD={ascending:"升序",ascendingSort:e=>`按列 ${e.columnName} 升序排序`,columnSize:e=>`${e.value} 像素`,descending:"降序",descendingSort:e=>`按列 ${e.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var CD={};CD={ascending:"遞增",ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:"遞減",descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var Eh={};Eh={"ar-AE":RN,"bg-BG":WN,"cs-CZ":UN,"da-DK":HN,"de-DE":qN,"el-GR":GN,"en-US":ZN,"es-ES":YN,"et-EE":JN,"fi-FI":XN,"fr-FR":QN,"he-IL":eD,"hr-HR":tD,"hu-HU":rD,"it-IT":nD,"ja-JP":oD,"ko-KR":iD,"lt-LT":sD,"lv-LV":aD,"nb-NO":lD,"nl-NL":uD,"pl-PL":cD,"pt-BR":dD,"pt-PT":fD,"ro-RO":pD,"ru-RU":hD,"sk-SK":mD,"sl-SI":gD,"sr-SP":bD,"sv-SE":vD,"tr-TR":yD,"uk-UA":xD,"zh-CN":wD,"zh-TW":CD};class SD{isCell(t){return t.type==="cell"}isRow(t){return t.type==="row"||t.type==="item"}isDisabled(t){var r;return this.disabledBehavior==="all"&&(((r=t.props)===null||r===void 0?void 0:r.isDisabled)||this.disabledKeys.has(t.key))}findPreviousKey(t,r){let n=t!=null?this.collection.getKeyBefore(t):this.collection.getLastKey();for(;n!=null;){let o=this.collection.getItem(n);if(!o)return null;if(!this.isDisabled(o)&&(!r||r(o)))return n;n=this.collection.getKeyBefore(n)}return null}findNextKey(t,r){let n=t!=null?this.collection.getKeyAfter(t):this.collection.getFirstKey();for(;n!=null;){let o=this.collection.getItem(n);if(!o)return null;if(!this.isDisabled(o)&&(!r||r(o)))return n;if(n=this.collection.getKeyAfter(n),n==null)return null}return null}getKeyForItemInRowByIndex(t,r=0){if(r<0)return null;let n=this.collection.getItem(t);if(!n)return null;let o=0;for(let a of Qr(n,this.collection)){var i;if(a.colSpan&&a.colSpan+o>r)return(i=a.key)!==null&&i!==void 0?i:null;a.colSpan&&(o=o+a.colSpan-1);var s;if(o===r)return(s=a.key)!==null&&s!==void 0?s:null;o++}return null}getKeyBelow(t){let r=t,n=this.collection.getItem(r);if(!n)return null;var o;if(this.isCell(n)&&(r=(o=n.parentKey)!==null&&o!==void 0?o:null),r==null)return null;if(r=this.findNextKey(r,i=>i.type==="item"),r!=null){if(this.isCell(n)){let i=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(r,i)}if(this.focusMode==="row")return r}return null}getKeyAbove(t){let r=t,n=this.collection.getItem(r);if(!n)return null;var o;if(this.isCell(n)&&(r=(o=n.parentKey)!==null&&o!==void 0?o:null),r==null)return null;if(r=this.findPreviousKey(r,i=>i.type==="item"),r!=null){if(this.isCell(n)){let i=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(r,i)}if(this.focusMode==="row")return r}return null}getKeyRightOf(t){let r=this.collection.getItem(t);if(!r)return null;if(this.isRow(r)){var n,o;let d=Qr(r,this.collection);var i;return(i=this.direction==="rtl"?(n=Ls(d))===null||n===void 0?void 0:n.key:(o=Wi(d))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null}if(this.isCell(r)&&r.parentKey!=null){let d=this.collection.getItem(r.parentKey);if(!d)return null;let f=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?Pc(f,r.index-1):Pc(f,r.index+1))!==null&&s!==void 0?s:null;var a;if(m)return(a=m.key)!==null&&a!==void 0?a:null;var l;if(this.focusMode==="row")return(l=r.parentKey)!==null&&l!==void 0?l:null;var c;return(c=this.direction==="rtl"?this.getFirstKey(t):this.getLastKey(t))!==null&&c!==void 0?c:null}return null}getKeyLeftOf(t){let r=this.collection.getItem(t);if(!r)return null;if(this.isRow(r)){var n,o;let d=Qr(r,this.collection);var i;return(i=this.direction==="rtl"?(n=Wi(d))===null||n===void 0?void 0:n.key:(o=Ls(d))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null}if(this.isCell(r)&&r.parentKey!=null){let d=this.collection.getItem(r.parentKey);if(!d)return null;let f=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?Pc(f,r.index+1):Pc(f,r.index-1))!==null&&s!==void 0?s:null;var a;if(m)return(a=m.key)!==null&&a!==void 0?a:null;var l;if(this.focusMode==="row")return(l=r.parentKey)!==null&&l!==void 0?l:null;var c;return(c=this.direction==="rtl"?this.getLastKey(t):this.getFirstKey(t))!==null&&c!==void 0?c:null}return null}getFirstKey(t,r){let n=t??null,o;if(n!=null){if(o=this.collection.getItem(n),!o)return null;if(this.isCell(o)&&!r&&o.parentKey!=null){var i;let c=this.collection.getItem(o.parentKey);if(!c)return null;var s;return(s=(i=Wi(Qr(c,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null}}if(n=this.findNextKey(void 0,c=>c.type==="item"),n!=null&&(o&&this.isCell(o)&&r||this.focusMode==="cell")){var a;let c=this.collection.getItem(n);if(!c)return null;var l;n=(l=(a=Wi(Qr(c,this.collection)))===null||a===void 0?void 0:a.key)!==null&&l!==void 0?l:null}return n}getLastKey(t,r){let n=t??null,o;if(n!=null){if(o=this.collection.getItem(n),!o)return null;if(this.isCell(o)&&!r&&o.parentKey!=null){var i;let c=this.collection.getItem(o.parentKey);if(!c)return null;let d=Qr(c,this.collection);var s;return(s=(i=Ls(d))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null}}if(n=this.findPreviousKey(void 0,c=>c.type==="item"),n!=null&&(o&&this.isCell(o)&&r||this.focusMode==="cell")){var a;let c=this.collection.getItem(n);if(!c)return null;let d=Qr(c,this.collection);var l;n=(l=(a=Ls(d))===null||a===void 0?void 0:a.key)!==null&&l!==void 0?l:null}return n}getKeyPageAbove(t){let r=t,n=this.layoutDelegate.getItemRect(r);if(!n)return null;let o=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>o&&r!=null;){var i;if(r=(i=this.getKeyAbove(r))!==null&&i!==void 0?i:null,r==null)break;n=this.layoutDelegate.getItemRect(r)}return r}getKeyPageBelow(t){let r=t,n=this.layoutDelegate.getItemRect(r);if(!n)return null;let o=this.layoutDelegate.getVisibleRect().height,i=Math.min(this.layoutDelegate.getContentSize().height,n.y+o);for(;n&&n.y+n.height<i;){let s=this.getKeyBelow(r);if(s==null)break;n=this.layoutDelegate.getItemRect(s),r=s}return r}getKeyForSearch(t,r){let n=r??null;if(!this.collator)return null;let o=this.collection;if(n=r??this.getFirstKey(),n==null)return null;let i=o.getItem(n);if(!i)return null;var s;i.type==="cell"&&(n=(s=i.parentKey)!==null&&s!==void 0?s:null);let a=!1;for(;n!=null;){let d=o.getItem(n);if(!d)return null;if(d.textValue){let f=d.textValue.slice(0,t.length);if(this.collator.compare(f,t)===0){var l,c;return this.isRow(d)&&this.focusMode==="cell"?(c=(l=Wi(Qr(d,this.collection)))===null||l===void 0?void 0:l.key)!==null&&c!==void 0?c:null:d.key}}n=this.findNextKey(n,f=>f.type==="item"),n==null&&!a&&(n=this.getFirstKey(),a=!0)}return null}constructor(t){if(this.collection=t.collection,this.disabledKeys=t.disabledKeys,this.disabledBehavior=t.disabledBehavior||"all",this.direction=t.direction,this.collator=t.collator,!t.layout&&!t.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=t.layoutDelegate||(t.layout?new ese(t.layout):new t0(t.ref));var r;this.focusMode=(r=t.focusMode)!==null&&r!==void 0?r:"row"}}class ese{getContentSize(){return this.layout.getContentSize()}getItemRect(t){var r;return((r=this.layout.getLayoutInfo(t))===null||r===void 0?void 0:r.rect)||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}constructor(t){this.layout=t}}const W1=new WeakMap;var kD={};kD={deselectedItem:e=>`${e.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${t.number(e.count)} عنصر محدد`,other:()=>`${t.number(e.count)} عنصر محدد`})}.`,selectedItem:e=>`${e.item} المحدد`};var PD={};PD={deselectedItem:e=>`${e.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Няма избрани елементи",one:()=>`${t.number(e.count)} избран елемент`,other:()=>`${t.number(e.count)} избрани елементи`})}.`,selectedItem:e=>`${e.item} избран.`};var ED={};ED={deselectedItem:e=>`Položka ${e.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${t.number(e.count)} položka`,other:()=>`Vybráno ${t.number(e.count)} položek`})}.`,selectedItem:e=>`Vybrána položka ${e.item}.`};var TD={};TD={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer valgt",one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var AD={};AD={deselectedItem:e=>`${e.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${t.number(e.count)} Element ausgewählt`,other:()=>`${t.number(e.count)} Elemente ausgewählt`})}.`,selectedItem:e=>`${e.item} ausgewählt.`};var _D={};_D={deselectedItem:e=>`Δεν επιλέχθηκε το στοιχείο ${e.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${t.number(e.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${t.number(e.count)} στοιχεία`})}.`,selectedItem:e=>`Επιλέχθηκε το στοιχείο ${e.item}.`};var $D={};$D={deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var ID={};ID={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ningún elemento seleccionado",one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var ND={};ND={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Üksusi pole valitud",one:()=>`${t.number(e.count)} üksus valitud`,other:()=>`${t.number(e.count)} üksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var DD={};DD={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var MD={};MD={deselectedItem:e=>`${e.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Aucun élément sélectionné",one:()=>`${t.number(e.count)} élément sélectionné`,other:()=>`${t.number(e.count)} éléments sélectionnés`})}.`,selectedItem:e=>`${e.item} sélectionné.`};var OD={};OD={deselectedItem:e=>`${e.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${t.number(e.count)} נבחר`,other:()=>`${t.number(e.count)} פריטים נבחרו`})}.`,selectedItem:e=>`${e.item} נבחר.`};var jD={};jD={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var LD={};LD={deselectedItem:e=>`${e.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${t.number(e.count)} elem kijelölve`,other:()=>`${t.number(e.count)} elem kijelölve`})}.`,selectedItem:e=>`${e.item} kijelölve.`};var FD={};FD={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nessun elemento selezionato",one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var BD={};BD={deselectedItem:e=>`${e.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"項目が選択されていません",one:()=>`${t.number(e.count)} 項目を選択しました`,other:()=>`${t.number(e.count)} 項目を選択しました`})}。`,selectedItem:e=>`${e.item} を選択しました。`};var zD={};zD={deselectedItem:e=>`${e.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"선택된 항목이 없습니다",one:()=>`${t.number(e.count)}개 항목이 선택되었습니다`,other:()=>`${t.number(e.count)}개 항목이 선택되었습니다`})}.`,selectedItem:e=>`${e.item}이(가) 선택되었습니다.`};var KD={};KD={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta elementų: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var VD={};VD={deselectedItem:e=>`Vienums ${e.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlasīts vienums ${e.item}.`};var RD={};RD={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer er valgt",one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var WD={};WD={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Geen items geselecteerd",one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var UD={};UD={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych elementów`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var HD={};HD={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var qD={};qD={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var GD={};GD={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Niciun element selectat",one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var ZD={};ZD={deselectedItem:e=>`${e.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Нет выбранных элементов",one:()=>`${t.number(e.count)} элемент выбран`,other:()=>`${t.number(e.count)} элементов выбрано`})}.`,selectedItem:e=>`${e.item} выбрано.`};var YD={};YD={deselectedItem:e=>`Nevybraté položky: ${e.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Žiadne vybraté položky",one:()=>`${t.number(e.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybraté položky: ${e.item}.`};var JD={};JD={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Noben element ni izbran",one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var XD={};XD={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var QD={};QD={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Inga markerade objekt",one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var e9={};e9={deselectedItem:e=>`${e.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${t.number(e.count)} öge seçildi`,other:()=>`${t.number(e.count)} öge seçildi`})}.`,selectedItem:e=>`${e.item} seçildi.`};var t9={};t9={deselectedItem:e=>`${e.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Жодних елементів не вибрано",one:()=>`${t.number(e.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} вибрано.`};var r9={};r9={deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`};var n9={};n9={deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未選取任何項目",one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`};var Th={};Th={"ar-AE":kD,"bg-BG":PD,"cs-CZ":ED,"da-DK":TD,"de-DE":AD,"el-GR":_D,"en-US":$D,"es-ES":ID,"et-EE":ND,"fi-FI":DD,"fr-FR":MD,"he-IL":OD,"hr-HR":jD,"hu-HU":LD,"it-IT":FD,"ja-JP":BD,"ko-KR":zD,"lt-LT":KD,"lv-LV":VD,"nb-NO":RD,"nl-NL":WD,"pl-PL":UD,"pt-BR":HD,"pt-PT":qD,"ro-RO":GD,"ru-RU":ZD,"sk-SK":YD,"sl-SI":JD,"sr-SP":XD,"sv-SE":QD,"tr-TR":e9,"uk-UA":t9,"zh-CN":r9,"zh-TW":n9};const o9=7e3;let Ci=null;function i9(e,t="assertive",r=o9){Ci?Ci.announce(e,t,r):(Ci=new tse,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Ci.announce(e,t,r):setTimeout(()=>{Ci?.isAttached()&&Ci?.announce(e,t,r)},100))}class tse{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",t),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,r="assertive",n=o9){var o,i;if(!this.node)return;let s=document.createElement("div");typeof t=="object"?(s.setAttribute("role","img"),s.setAttribute("aria-labelledby",t["aria-labelledby"])):s.textContent=t,r==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(s):(i=this.politeLog)===null||i===void 0||i.appendChild(s),t!==""&&setTimeout(()=>{s.remove()},n)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function rse(e){return e&&e.__esModule?e.default:e}function nse(e,t){let{getRowText:r=a=>{var l,c,d,f;return(f=(l=(c=t.collection).getTextValue)===null||l===void 0?void 0:l.call(c,a))!==null&&f!==void 0?f:(d=t.collection.getItem(a))===null||d===void 0?void 0:d.textValue}}=e,n=ms(rse(Th),"@react-aria/grid"),o=t.selectionManager.rawSelection,i=x.useRef(o),s=x.useCallback(()=>{var a;if(!t.selectionManager.isFocused||o===i.current){i.current=o;return}let l=s9(o,i.current),c=s9(i.current,o),d=t.selectionManager.selectionBehavior==="replace",f=[];if(t.selectionManager.selectedKeys.size===1&&d){let m=t.selectionManager.selectedKeys.keys().next().value;if(m!=null&&t.collection.getItem(m)){let g=r(m);g&&f.push(n.format("selectedItem",{item:g}))}}else if(l.size===1&&c.size===0){let m=l.keys().next().value;if(m!=null){let g=r(m);g&&f.push(n.format("selectedItem",{item:g}))}}else if(c.size===1&&l.size===0){let m=c.keys().next().value;if(m!=null&&t.collection.getItem(m)){let g=r(m);g&&f.push(n.format("deselectedItem",{item:g}))}}t.selectionManager.selectionMode==="multiple"&&(f.length===0||o==="all"||o.size>1||i.current==="all"||((a=i.current)===null||a===void 0?void 0:a.size)>1)&&f.push(o==="all"?n.format("selectedAll"):n.format("selectedCount",{count:o.size})),f.length>0&&i9(f.join(" ")),i.current=o},[o,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,r,n]);hS(()=>{if(t.selectionManager.isFocused)s();else{let a=requestAnimationFrame(s);return()=>cancelAnimationFrame(a)}},[o,t.selectionManager.isFocused])}function s9(e,t){let r=new Set;if(e==="all"||t==="all")return r;for(let n of e.keys())t.has(n)||r.add(n);return r}function ose(e){return e&&e.__esModule?e.default:e}function ise(e){let t=ms(ose(Th),"@react-aria/grid"),r=AR(),n=(r==="pointer"||r==="virtual"||r==null)&&typeof window<"u"&&"ontouchstart"in window,o=x.useMemo(()=>{let s=e.selectionManager.selectionMode,a=e.selectionManager.selectionBehavior,l;return n&&(l=t.format("longPressToSelect")),a==="replace"&&s!=="none"&&e.hasItemActions?l:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,n]);return af(o)}function sse(e,t,r){let{isVirtualized:n,disallowTypeAhead:o,keyboardDelegate:i,focusMode:s,scrollRef:a,getRowText:l,onRowAction:c,onCellAction:d,escapeKeyBehavior:f="clearSelection",shouldSelectOnPressUp:m}=e,{selectionManager:g}=t;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let b=ff({usage:"search",sensitivity:"base"}),{direction:y}=jn(),v=t.selectionManager.disabledBehavior,C=x.useMemo(()=>i||new SD({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:v,ref:r,direction:y,collator:b,focusMode:s}),[i,t.collection,t.disabledKeys,v,r,y,b,s]),{collectionProps:S}=e0({ref:r,selectionManager:g,keyboardDelegate:C,isVirtualized:n,scrollRef:a,disallowTypeAhead:o,escapeKeyBehavior:f}),k=rn(e.id);W1.set(t,{keyboardDelegate:C,actions:{onRowAction:c,onCellAction:d},shouldSelectOnPressUp:m});let P=ise({selectionManager:g,hasItemActions:!!(c||d)}),E=Ln(e,{labelable:!0}),$=x.useCallback(M=>{if(g.isFocused){M.currentTarget.contains(M.target)||g.setFocused(!1);return}M.currentTarget.contains(M.target)&&g.setFocused(!0)},[g]),O=x.useMemo(()=>({onBlur:S.onBlur,onFocus:$}),[$,S.onBlur]),N=s3(r,{isDisabled:t.collection.size!==0}),D=it(E,{role:"grid",id:k,"aria-multiselectable":g.selectionMode==="multiple"?"true":void 0},t.isKeyboardNavigationDisabled?O:S,t.collection.size===0&&{tabIndex:N?-1:0}||void 0,P);return n&&(D["aria-rowcount"]=t.collection.size,D["aria-colcount"]=t.collection.columnCount),nse({getRowText:l},t),{gridProps:D}}function ase(){return{rowGroupProps:{role:"rowgroup"}}}function lse(e,t,r){var n,o;let{node:i,isVirtualized:s,shouldSelectOnPressUp:a,onAction:l}=e,{actions:c,shouldSelectOnPressUp:d}=W1.get(t),f=c.onRowAction?()=>{var v;return(v=c.onRowAction)===null||v===void 0?void 0:v.call(c,i.key)}:l,{itemProps:m,...g}=_p({selectionManager:t.selectionManager,key:i.key,ref:r,isVirtualized:s,shouldSelectOnPressUp:d||a,onAction:f||!(i==null||(n=i.props)===null||n===void 0)&&n.onAction?gs(i==null||(o=i.props)===null||o===void 0?void 0:o.onAction,f):void 0,isDisabled:t.collection.size===0}),b=t.selectionManager.isSelected(i.key),y={role:"row","aria-selected":t.selectionManager.selectionMode!=="none"?b:void 0,"aria-disabled":g.isDisabled||void 0,...m};return s&&(y["aria-rowindex"]=i.index+1),{rowProps:y,...g}}function a9(e,t,r){let{node:n,isVirtualized:o,focusMode:i="child",shouldSelectOnPressUp:s,onAction:a}=e,{direction:l}=jn(),{keyboardDelegate:c,actions:{onCellAction:d}}=W1.get(t),f=x.useRef(null),m=()=>{if(r.current){let k=Gn(r.current);if(i==="child"){if(r.current.contains(document.activeElement)&&r.current!==document.activeElement)return;let P=t.selectionManager.childFocusStrategy==="last"?U1(k):k.firstChild();if(P){wn(P);return}}(f.current!=null&&n.key!==f.current||!r.current.contains(document.activeElement))&&wn(r.current)}},{itemProps:g,isPressed:b}=_p({selectionManager:t.selectionManager,key:n.key,ref:r,isVirtualized:o,focus:m,shouldSelectOnPressUp:s,onAction:d?()=>d(n.key):a,isDisabled:t.collection.size===0}),y=k=>{if(!k.currentTarget.contains(k.target)||t.isKeyboardNavigationDisabled||!r.current||!document.activeElement)return;let P=Gn(r.current);switch(P.currentNode=document.activeElement,k.key){case"ArrowLeft":{let M=l==="rtl"?P.nextNode():P.previousNode();if(i==="child"&&M===r.current&&(M=null),k.preventDefault(),k.stopPropagation(),M)wn(M),xs(M,{containingElement:ys(r.current)});else{var E;if(((E=c.getKeyLeftOf)===null||E===void 0?void 0:E.call(c,n.key))!==n.key){var $;($=r.current.parentElement)===null||$===void 0||$.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent));break}i==="cell"&&l==="rtl"?(wn(r.current),xs(r.current,{containingElement:ys(r.current)})):(P.currentNode=r.current,M=l==="rtl"?P.firstChild():U1(P),M&&(wn(M),xs(M,{containingElement:ys(r.current)})))}break}case"ArrowRight":{let M=l==="rtl"?P.previousNode():P.nextNode();if(i==="child"&&M===r.current&&(M=null),k.preventDefault(),k.stopPropagation(),M)wn(M),xs(M,{containingElement:ys(r.current)});else{var O;if(((O=c.getKeyRightOf)===null||O===void 0?void 0:O.call(c,n.key))!==n.key){var N;(N=r.current.parentElement)===null||N===void 0||N.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent));break}i==="cell"&&l==="ltr"?(wn(r.current),xs(r.current,{containingElement:ys(r.current)})):(P.currentNode=r.current,M=l==="rtl"?U1(P):P.firstChild(),M&&(wn(M),xs(M,{containingElement:ys(r.current)})))}break}case"ArrowUp":case"ArrowDown":if(!k.altKey&&r.current.contains(k.target)){var D;k.stopPropagation(),k.preventDefault(),(D=r.current.parentElement)===null||D===void 0||D.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent))}break}},v=k=>{if(f.current=n.key,k.target!==r.current){Kl()||t.selectionManager.setFocusedKey(n.key);return}requestAnimationFrame(()=>{i==="child"&&document.activeElement===r.current&&m()})},C=it(g,{role:"gridcell",onKeyDownCapture:y,"aria-colspan":n.colSpan,"aria-colindex":n.colIndex!=null?n.colIndex+1:void 0,colSpan:o?void 0:n.colSpan,onFocus:v});var S;return o&&(C["aria-colindex"]=((S=n.colIndex)!==null&&S!==void 0?S:n.index)+1),s&&C.tabIndex!=null&&C.onPointerDown==null&&(C.onPointerDown=k=>{let P=k.currentTarget,E=P.getAttribute("tabindex");P.removeAttribute("tabindex"),requestAnimationFrame(()=>{E!=null&&P.setAttribute("tabindex",E)})}),{gridCellProps:C,isPressed:b}}function U1(e){let t=null,r=null;do r=e.lastChild(),r&&(t=r);while(r);return t}function use(e){return e&&e.__esModule?e.default:e}function cse(e,t){let{key:r}=e,n=t.selectionManager,o=rn(),i=!t.selectionManager.canSelectItem(r),s=t.selectionManager.isSelected(r),a=()=>n.toggleSelection(r);const l=ms(use(Th),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":l.format("select"),isSelected:s,isDisabled:i,onChange:a}}}class dse extends SD{isCell(t){return t.type==="cell"||t.type==="rowheader"||t.type==="column"}getKeyBelow(t){let r=this.collection.getItem(t);if(!r)return null;if(r.type==="column"){let n=Wi(Qr(r,this.collection));if(n)return n.key;let o=this.getFirstKey();return o==null||!this.collection.getItem(o)?null:super.getKeyForItemInRowByIndex(o,r.index)}return super.getKeyBelow(t)}getKeyAbove(t){let r=this.collection.getItem(t);if(!r)return null;if(r.type==="column"){let i=r.parentKey!=null?this.collection.getItem(r.parentKey):null;return i&&i.type==="column"?i.key:null}let n=super.getKeyAbove(t),o=n!=null?this.collection.getItem(n):null;return o&&o.type!=="headerrow"?n:this.isCell(r)?this.collection.columns[r.index].key:this.collection.columns[0].key}findNextColumnKey(t){let r=this.findNextKey(t.key,o=>o.type==="column");if(r!=null)return r;let n=this.collection.headerRows[t.level];for(let o of Qr(n,this.collection))if(o.type==="column")return o.key;return null}findPreviousColumnKey(t){let r=this.findPreviousKey(t.key,i=>i.type==="column");if(r!=null)return r;let n=this.collection.headerRows[t.level],o=[...Qr(n,this.collection)];for(let i=o.length-1;i>=0;i--){let s=o[i];if(s.type==="column")return s.key}return null}getKeyRightOf(t){let r=this.collection.getItem(t);return r?r.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(r):this.findNextColumnKey(r):super.getKeyRightOf(t):null}getKeyLeftOf(t){let r=this.collection.getItem(t);return r?r.type==="column"?this.direction==="rtl"?this.findNextColumnKey(r):this.findPreviousColumnKey(r):super.getKeyLeftOf(t):null}getKeyForSearch(t,r){if(!this.collator)return null;let n=this.collection,o=r??this.getFirstKey();if(o==null)return null;let i=n.getItem(o);var s;i?.type==="cell"&&(o=(s=i.parentKey)!==null&&s!==void 0?s:null);let a=!1;for(;o!=null;){let l=n.getItem(o);if(!l)return null;if(l.textValue){let c=l.textValue.slice(0,t.length);if(this.collator.compare(c,t)===0)return l.key}for(let c of Qr(l,this.collection)){let d=n.columns[c.index];if(n.rowHeaderColumnKeys.has(d.key)&&c.textValue){let f=c.textValue.slice(0,t.length);if(this.collator.compare(f,t)===0){let m=r!=null?n.getItem(r):i;return m?.type==="cell"?c.key:l.key}}}o=this.getKeyBelow(o),o==null&&!a&&(o=this.getFirstKey(),a=!0)}return null}}function fse(e){return e&&e.__esModule?e.default:e}function pse(e,t,r){let{keyboardDelegate:n,isVirtualized:o,layoutDelegate:i,layout:s}=e,a=ff({usage:"search",sensitivity:"base"}),{direction:l}=jn(),c=t.selectionManager.disabledBehavior,d=x.useMemo(()=>n||new dse({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:c,ref:r,direction:l,collator:a,layoutDelegate:i,layout:s}),[n,t.collection,t.disabledKeys,c,r,l,a,i,s]),f=rn(e.id);V1.set(t,f);let{gridProps:m}=sse({...e,id:f,keyboardDelegate:d},t,r);o&&(m["aria-rowcount"]=t.collection.size+t.collection.headerRows.length),Gd()&&"expandedKeys"in t&&(m.role="treegrid");let{column:g,direction:b}=t.sortDescriptor||{},y=ms(fse(Eh),"@react-aria/table"),v=x.useMemo(()=>{var S,k;let P=(k=(S=t.collection.columns.find(E=>E.key===g))===null||S===void 0?void 0:S.textValue)!==null&&k!==void 0?k:"";return b&&g?y.format(`${b}Sort`,{columnName:P}):void 0},[b,g,t.collection.columns]),C=af(v);return hS(()=>{v&&i9(v,"assertive",500)},[v]),{gridProps:it(m,C,{"aria-describedby":[C["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")})}}function hse(e){return e&&e.__esModule?e.default:e}function l9(e,t,r){var n,o;let{node:i}=e,s=i.props.allowsSorting,{gridCellProps:a}=a9({...e,focusMode:"child"},t,r),l=i.props.isSelectionCell&&t.selectionManager.selectionMode==="single",{pressProps:c,isPressed:d}=xn({isDisabled:!s||l,onPress(){t.sort(i.key)},ref:r}),{focusableProps:f}=Bi({},r),m,g=((n=t.sortDescriptor)===null||n===void 0?void 0:n.column)===i.key,b=(o=t.sortDescriptor)===null||o===void 0?void 0:o.direction;i.props.allowsSorting&&!Ju()&&(m=g?b:"none");let y=ms(hse(Eh),"@react-aria/table"),v;s&&(v=`${y.format("sortable")}`,g&&b&&Ju()&&(v=`${v}, ${y.format(b)}`));let C=af(v),S=t.collection.size===0;return x.useEffect(()=>{S&&t.selectionManager.focusedKey===i.key&&t.selectionManager.setFocusedKey(null)},[S,t.selectionManager,i.key]),{columnHeaderProps:{...it(f,a,c,C,S?{tabIndex:-1}:null),role:"columnheader",id:Qie(t,i.key),"aria-colspan":i.colSpan&&i.colSpan>1?i.colSpan:void 0,"aria-sort":m},isPressed:d}}const u9={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function mse(e,t,r){let{node:n,isVirtualized:o}=e,{rowProps:i,...s}=lse(e,t,r),{direction:a}=jn();o&&!(Gd()&&"expandedKeys"in t)?i["aria-rowindex"]=n.index+1+t.collection.headerRows.length:delete i["aria-rowindex"];let l={};if(Gd()&&"expandedKeys"in t){let E=t.keyMap.get(n.key);if(E!=null){var c,d,f,m,g,b;let $=((c=E.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((f=E.props)===null||f===void 0||(d=f.children)===null||d===void 0?void 0:d.length)>t.userColumnCount;var y,v,C,S;l={onKeyDown:O=>{(O.key===u9.expand[a]&&t.selectionManager.focusedKey===E.key&&$&&t.expandedKeys!=="all"&&!t.expandedKeys.has(E.key)||O.key===u9.collapse[a]&&t.selectionManager.focusedKey===E.key&&$&&(t.expandedKeys==="all"||t.expandedKeys.has(E.key)))&&(t.toggleKey(E.key),O.stopPropagation())},"aria-expanded":$?t.expandedKeys==="all"||t.expandedKeys.has(n.key):void 0,"aria-level":E.level,"aria-posinset":((y=E.indexOfType)!==null&&y!==void 0?y:0)+1,"aria-setsize":E.level>1?((C=(m=Ls((v=(g=t.keyMap.get(E.parentKey))===null||g===void 0?void 0:g.childNodes)!==null&&v!==void 0?v:[]))===null||m===void 0?void 0:m.indexOfType)!==null&&C!==void 0?C:0)+1:((S=(b=Ls(t.collection.body.childNodes))===null||b===void 0?void 0:b.indexOfType)!==null&&S!==void 0?S:0)+1}}}let k=KF(n.props),P=s.hasAction?k:{};return{rowProps:{...it(i,l,P),"aria-labelledby":VN(t,n.key)},...s}}function gse(e,t,r){let{node:n,isVirtualized:o}=e,i={role:"row"};return o&&!(Gd()&&"expandedKeys"in t)&&(i["aria-rowindex"]=n.index+1),{rowProps:i}}function c9(e,t,r){var n;let{gridCellProps:o,isPressed:i}=a9(e,t,r),s=(n=e.node.column)===null||n===void 0?void 0:n.key;return s!=null&&t.collection.rowHeaderColumnKeys.has(s)&&(o.role="rowheader",o.id=KN(t,e.node.parentKey,s)),{gridCellProps:o,isPressed:i}}function bse(e){return e&&e.__esModule?e.default:e}function vse(e,t){let{key:r}=e;const{checkboxProps:n}=cse(e,t);return{checkboxProps:{...n,"aria-labelledby":`${n.id} ${VN(t,r)}`}}}function yse(e){let{isEmpty:t,isSelectAll:r,selectionMode:n}=e.selectionManager;return{checkboxProps:{"aria-label":ms(bse(Eh),"@react-aria/table").format(n==="single"?"select":"selectAll"),isSelected:r,isDisabled:n!=="multiple"||e.collection.size===0||e.collection.rows.length===1&&e.collection.rows[0].type==="loader",isIndeterminate:!t&&!r,onChange:()=>e.selectionManager.toggleSelectAll()}}}function H1(){return ase()}var d9=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,slots:a,state:l,selectionMode:c,color:d,checkboxesProps:f,disableAnimation:m,classNames:g,...b}=e,y=o||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=l9({node:s},l,C),{isFocusVisible:k,focusProps:P}=Ir(),{checkboxProps:E}=yse(l),$=A(g?.th,i,(r=s.props)==null?void 0:r.className),O=c==="single",{onChange:N,...D}=E;return h.jsx(y,{ref:C,"data-focus-visible":ae(k),...Oe(S,P,Lt(s.props,{enabled:v}),Lt(b,{enabled:v})),className:(n=a.th)==null?void 0:n.call(a,{class:$}),children:O?h.jsx(Vl,{children:E["aria-label"]}):h.jsx(sh,{color:d,disableAnimation:m,onValueChange:N,...Oe(f,D)})})});d9.displayName="HeroUI.TableSelectAllCheckbox";var f9=d9;function xse(e){let{collection:t,focusMode:r}=e,n=e.UNSAFE_selectionState||bT(e),o=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=n.setFocusedKey;n.setFocusedKey=(l,c)=>{if(r==="cell"&&l!=null){let b=t.getItem(l);if(b?.type==="item"){var d,f;let y=Qr(b,t);var m,g;c==="last"?l=(m=(d=Ls(y))===null||d===void 0?void 0:d.key)!==null&&m!==void 0?m:null:l=(g=(f=Wi(y))===null||f===void 0?void 0:f.key)!==null&&g!==void 0?g:null}}i(l,c)};let s=x.useMemo(()=>new Np(t,n),[t,n]);const a=x.useRef(null);return x.useEffect(()=>{if(n.focusedKey!=null&&a.current&&!t.getItem(n.focusedKey)){const l=a.current.getItem(n.focusedKey),c=l?.parentKey!=null&&(l.type==="cell"||l.type==="rowheader"||l.type==="column")?a.current.getItem(l.parentKey):l;if(!c){n.setFocusedKey(null);return}const d=a.current.rows,f=t.rows,m=d.length-f.length;let g=Math.min(m>1?Math.max(c.index-m+1,0):c.index,f.length-1),b=null;for(;g>=0;){if(!s.isDisabled(f[g].key)&&f[g].type!=="headerrow"){b=f[g];break}g<f.length-1?g++:(g>c.index&&(g=c.index),g--)}if(b){const y=b.hasChildNodes?[...Qr(b,t)]:[],v=b.hasChildNodes&&c!==l&&l&&l.index<y.length?y[l.index].key:b.key;n.setFocusedKey(v)}else n.setFocusedKey(null)}a.current=t},[t,s,n,n.focusedKey]),{collection:t,disabledKeys:o,isKeyboardNavigationDisabled:!1,selectionManager:s}}class wse{*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){var t;return(t=[...this.rows][0])===null||t===void 0?void 0:t.key}getLastKey(){var t;let r=[...this.rows];return(t=r[r.length-1])===null||t===void 0?void 0:t.key}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){let r=this.keyMap.get(t);return r?.childNodes||[]}constructor(t){this.keyMap=new Map,this.keyMap=new Map,this.columnCount=t?.columnCount,this.rows=[];let r=f=>{let m=this.keyMap.get(f.key);t.visitNode&&(f=t.visitNode(f)),this.keyMap.set(f.key,f);let g=new Set,b=null,y=!1;if(f.type==="item"){var v;for(let E of f.childNodes)if(((v=E.props)===null||v===void 0?void 0:v.colSpan)!==void 0){y=!0;break}}for(let E of f.childNodes){if(E.type==="cell"&&y){var C,S;E.colspan=(C=E.props)===null||C===void 0?void 0:C.colSpan,E.colSpan=(S=E.props)===null||S===void 0?void 0:S.colSpan;var k,P;E.colIndex=b?((k=b.colIndex)!==null&&k!==void 0?k:b.index)+((P=b.colSpan)!==null&&P!==void 0?P:1):E.index}E.type==="cell"&&E.parentKey==null&&(E.parentKey=f.key),g.add(E.key),b?(b.nextKey=E.key,E.prevKey=b.key):E.prevKey=null,r(E),b=E}if(b&&(b.nextKey=null),m)for(let E of m.childNodes)g.has(E.key)||n(E)},n=f=>{this.keyMap.delete(f.key);for(let m of f.childNodes)this.keyMap.get(m.key)===m&&n(m)},o=null;for(let[f,m]of t.items.entries()){var i,s,a,l,c,d;let g={...m,level:(i=m.level)!==null&&i!==void 0?i:0,key:(s=m.key)!==null&&s!==void 0?s:"row-"+f,type:(a=m.type)!==null&&a!==void 0?a:"row",value:(l=m.value)!==null&&l!==void 0?l:null,hasChildNodes:!0,childNodes:[...m.childNodes],rendered:m.rendered,textValue:(c=m.textValue)!==null&&c!==void 0?c:"",index:(d=m.index)!==null&&d!==void 0?d:f};o?(o.nextKey=g.key,g.prevKey=o.key):g.prevKey=null,this.rows.push(g),r(g),o=g}o&&(o.nextKey=null)}}const p9="row-header-column-"+Math.random().toString(36).slice(2);let q1="row-header-column-"+Math.random().toString(36).slice(2);for(;p9===q1;)q1="row-header-column-"+Math.random().toString(36).slice(2);function Cse(e,t){if(t.length===0)return[];let r=[],n=new Map;for(let d of t){let f=d.parentKey,m=[d];for(;f;){let g=e.get(f);if(!g)break;if(n.has(g)){var o,i;(i=(o=g).colSpan)!==null&&i!==void 0||(o.colSpan=0),g.colSpan++,g.colspan=g.colSpan;let{column:b,index:y}=n.get(g);if(y>m.length)break;for(let v=y;v<m.length;v++)b.splice(v,0,null);for(let v=m.length;v<b.length;v++)b[v]&&n.has(b[v])&&(n.get(b[v]).index=v)}else g.colSpan=1,g.colspan=1,m.push(g),n.set(g,{column:m,index:m.length-1});f=g.parentKey}r.push(m),d.index=r.length-1}let s=Math.max(...r.map(d=>d.length)),a=Array(s).fill(0).map(()=>[]),l=0;for(let d of r){let f=s-1;for(let m of d){if(m){let g=a[f],b=g.reduce((y,v)=>{var C;return y+((C=v.colSpan)!==null&&C!==void 0?C:1)},0);if(b<l){let y={type:"placeholder",key:"placeholder-"+m.key,colspan:l-b,colSpan:l-b,index:b,value:null,rendered:null,level:f,hasChildNodes:!1,childNodes:[],textValue:""};g.length>0&&(g[g.length-1].nextKey=y.key,y.prevKey=g[g.length-1].key),g.push(y)}g.length>0&&(g[g.length-1].nextKey=m.key,m.prevKey=g[g.length-1].key),m.level=f,m.colIndex=l,g.push(m)}f--}l++}let c=0;for(let d of a){let f=d.reduce((m,g)=>{var b;return m+((b=g.colSpan)!==null&&b!==void 0?b:1)},0);if(f<t.length){let m={type:"placeholder",key:"placeholder-"+d[d.length-1].key,colSpan:t.length-f,colspan:t.length-f,index:f,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:"",prevKey:d[d.length-1].key};d.push(m)}c++}return a.map((d,f)=>({type:"headerrow",key:"headerrow-"+f,index:f,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:d,textValue:""}))}class Sse extends wse{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return(n=r?.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return(n=r?.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){var t,r;return(r=(t=Wi(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&r!==void 0?r:null}getLastKey(){var t,r;return(r=(t=Ls(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&r!==void 0?r:null}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){return t===this.body.key?this.body.childNodes:super.getChildren(t)}getTextValue(t){let r=this.getItem(t);if(!r)return"";if(r.textValue)return r.textValue;let n=this.rowHeaderColumnKeys;if(n){let o=[];for(let i of r.childNodes){let s=this.columns[i.index];if(n.has(s.key)&&i.textValue&&o.push(i.textValue),o.length===n.size)break}return o.join(" ")}return""}constructor(t,r,n){let o=new Set,i=null,s=[];if(n?.showSelectionCheckboxes){let f={type:"column",key:p9,value:null,textValue:"",level:0,index:n?.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};s.unshift(f)}if(n?.showDragButtons){let f={type:"column",key:q1,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};s.unshift(f)}let a=[],l=new Map,c=f=>{switch(f.type){case"body":i=f;break;case"column":l.set(f.key,f),f.hasChildNodes||(s.push(f),f.props.isRowHeader&&o.add(f.key));break;case"item":a.push(f);return}for(let m of f.childNodes)c(m)};for(let f of t)c(f);let d=Cse(l,s);if(d.forEach((f,m)=>a.splice(m,0,f)),super({columnCount:s.length,items:a,visitNode:f=>(f.column=s[f.index],f)}),this._size=0,this.columns=s,this.rowHeaderColumnKeys=o,this.body=i,this.headerRows=d,this._size=[...i.childNodes].length,this.rowHeaderColumnKeys.size===0){let f=this.columns.find(m=>{var g,b;return!(!((g=m.props)===null||g===void 0)&&g.isDragButtonCell)&&!(!((b=m.props)===null||b===void 0)&&b.isSelectionCell)});f&&this.rowHeaderColumnKeys.add(f.key)}}}const kse={ascending:"descending",descending:"ascending"};function Pse(e){let[t,r]=x.useState(!1),{selectionMode:n="none",showSelectionCheckboxes:o,showDragButtons:i}=e,s=x.useMemo(()=>({showSelectionCheckboxes:o&&n!=="none",showDragButtons:i,selectionMode:n,columns:[]}),[e.children,o,n,i]),a=CT(e,x.useCallback(f=>new Sse(f,null,s),[s]),s),{disabledKeys:l,selectionManager:c}=xse({...e,collection:a,disabledBehavior:e.disabledBehavior||"selection"});var d;return{collection:a,disabledKeys:l,selectionManager:c,showSelectionCheckboxes:e.showSelectionCheckboxes||!1,sortDescriptor:(d=e.sortDescriptor)!==null&&d!==void 0?d:null,isKeyboardNavigationDisabled:a.size===0||t,setKeyboardNavigationDisabled:r,sort(f,m){var g,b;(b=e.onSortChange)===null||b===void 0||b.call(e,{column:f,direction:m??(((g=e.sortDescriptor)===null||g===void 0?void 0:g.column)===f?kse[e.sortDescriptor.direction]:"ascending")})}}}function h9(e){return null}h9.getCollectionNode=function*(t,r){let{children:n,columns:o}=t;if(r.columns=[],typeof n=="function"){if(!o)throw new Error("props.children was a function but props.columns is missing");for(let i of o)yield{type:"column",value:i,renderer:n}}else{let i=[];x.Children.forEach(n,s=>{i.push({type:"column",element:s})}),yield*i}};let Ese=h9;function m9(e){return null}m9.getCollectionNode=function*(t){let{children:r,items:n}=t;yield{type:"body",hasChildNodes:!0,props:t,*childNodes(){if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");for(let o of n)yield{type:"item",value:o,renderer:r}}else{let o=[];x.Children.forEach(r,i=>{o.push({type:"item",element:i})}),yield*o}}}};let Tse=m9;function g9(e){return null}g9.getCollectionNode=function*(t,r){let{title:n,children:o,childColumns:i}=t,s=n||o,a=t.textValue||(typeof s=="string"?s:"")||t["aria-label"],l=yield{type:"column",hasChildNodes:!!i||!!n&&x.Children.count(o)>0,rendered:s,textValue:a,props:t,*childNodes(){if(i)for(let d of i)yield{type:"column",value:d};else if(n){let d=[];x.Children.forEach(o,f=>{d.push({type:"column",element:f})}),yield*d}},shouldInvalidate(d){return c(d),!1}},c=d=>{for(let f of l)f.hasChildNodes||d.columns.push(f)};c(r)};let Ase=g9;function G1(e){return null}G1.getCollectionNode=function*(t,r){let{children:n,textValue:o,UNSTABLE_childItems:i}=t;yield{type:"item",props:t,textValue:o,"aria-label":t["aria-label"],hasChildNodes:!0,*childNodes(){if(r.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),r.showSelectionCheckboxes&&r.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof n=="function"){for(let s of r.columns)yield{type:"cell",element:n(s.key),key:s.key};if(i)for(let s of i)yield{type:"item",value:s}}else{let s=[],a=[],l=0;if(x.Children.forEach(n,c=>{if(c.type===G1){if(s.length<r.columns.length)throw new Error("All of a Row's child Cells must be positioned before any child Rows.");a.push({type:"item",element:c})}else{s.push({type:"cell",element:c});var d;l+=(d=c.props.colSpan)!==null&&d!==void 0?d:1}}),l!==r.columns.length)throw new Error(`Cell count must match column count. Found ${l} cells and ${r.columns.length} columns.`);yield*s,yield*a}},shouldInvalidate(s){return s.columns.length!==r.columns.length||s.columns.some((a,l)=>a.key!==r.columns[l].key)||s.showSelectionCheckboxes!==r.showSelectionCheckboxes||s.showDragButtons!==r.showDragButtons||s.selectionMode!==r.selectionMode}}};let _se=G1;function b9(e){return null}b9.getCollectionNode=function*(t){let{children:r}=t,n=t.textValue||(typeof r=="string"?r:"")||t["aria-label"]||"";yield{type:"cell",props:t,rendered:r,textValue:n,"aria-label":t["aria-label"],hasChildNodes:!1}};let $se=b9;function v9(e){var t;const r=ur(),[n,o]=qr(e,HC.variantKeys),{ref:i,as:s,baseRef:a,children:l,className:c,classNames:d,removeWrapper:f=!1,disableAnimation:m=(t=r?.disableAnimation)!=null?t:!1,isKeyboardNavigationDisabled:g=!1,selectionMode:b="none",topContentPlacement:y="inside",bottomContentPlacement:v="inside",selectionBehavior:C=b==="none"?null:"toggle",disabledBehavior:S="selection",showSelectionCheckboxes:k=b==="multiple"&&C!=="replace",BaseComponent:P="div",checkboxesProps:E,topContent:$,bottomContent:O,sortIcon:N,onRowAction:D,onCellAction:M,...V}=n,R=s||"table",K=typeof R=="string",j=ot(i),B=ot(a),U=Pse({...e,children:l,showSelectionCheckboxes:k});g&&!U.isKeyboardNavigationDisabled&&U.setKeyboardNavigationDisabled(!0);const{collection:W}=U,{layout:L,...Z}=e,{gridProps:T}=pse({...Z},U,j),F=b!=="none",_=b==="multiple",H=x.useMemo(()=>HC({...o,isSelectable:F,isMultiSelectable:_}),[jr(o),F,_]),Y=A(d?.base,c),X=x.useMemo(()=>{var ue;return{state:U,slots:H,isSelectable:F,collection:W,classNames:d,color:e?.color,disableAnimation:m,checkboxesProps:E,isHeaderSticky:(ue=e?.isHeaderSticky)!=null?ue:!1,selectionMode:b,selectionBehavior:C,disabledBehavior:S,showSelectionCheckboxes:k,onRowAction:D,onCellAction:M}},[H,U,W,F,d,b,C,E,S,m,k,e?.color,e?.isHeaderSticky,D,M]),oe=x.useCallback(ue=>({...ue,ref:B,className:H.base({class:A(Y,ue?.className)})}),[Y,H]),Q=x.useCallback(ue=>({...ue,ref:B,className:H.wrapper({class:A(d?.wrapper,ue?.className)})}),[d?.wrapper,H]),le=x.useCallback(ue=>({...Oe(T,Lt(V,{enabled:K}),ue),onKeyDownCapture:void 0,ref:j,className:H.table({class:A(d?.table,ue?.className)})}),[d?.table,K,H,T,V]);return{BaseComponent:P,Component:R,children:l,state:U,collection:W,values:X,topContent:$,bottomContent:O,removeWrapper:f,topContentPlacement:y,bottomContentPlacement:v,sortIcon:N,getBaseProps:oe,getWrapperProps:Q,getTableProps:le}}var y9=Xe((e,t)=>{var r,n,o;const{as:i,className:s,node:a,rowKey:l,slots:c,state:d,classNames:f,...m}=e,g=i||"td",b=typeof g=="string",y=ot(t),{gridCellProps:v}=c9({node:a},d,y),C=A(f?.td,s,(r=a.props)==null?void 0:r.className),{isFocusVisible:S,focusProps:k}=Ir(),P=d.selectionManager.isSelected(l),E=x.useMemo(()=>{const O=typeof a.rendered;return O!=="object"&&O!=="function"?h.jsx("span",{children:a.rendered}):a.rendered},[a.rendered]),$=((n=a.column)==null?void 0:n.props)||{};return h.jsx(g,{ref:y,"data-focus-visible":ae(S),"data-selected":ae(P),...Oe(v,k,Lt(a.props,{enabled:b}),m),className:(o=c.td)==null?void 0:o.call(c,{align:$.align,class:C}),children:E})});y9.displayName="HeroUI.TableCell";var x9=y9,w9=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,rowKey:a,slots:l,state:c,color:d,disableAnimation:f,checkboxesProps:m,selectionMode:g,classNames:b,...y}=e,v=o||"td",C=typeof v=="string",S=ot(t),{gridCellProps:k}=c9({node:s},c,S),{isFocusVisible:P,focusProps:E}=Ir(),{checkboxProps:$}=vse({key:s?.parentKey||s.key},c),O=A(b?.td,i,(r=s.props)==null?void 0:r.className),N=g==="single",{onChange:D,...M}=$,V=c.selectionManager.isSelected(a);return h.jsx(v,{ref:S,"data-focus-visible":ae(P),"data-selected":ae(V),...Oe(k,E,Lt(s.props,{enabled:C}),y),className:(n=l.td)==null?void 0:n.call(l,{class:O}),children:N?h.jsx(Vl,{children:$["aria-label"]}):h.jsx(sh,{color:d,disableAnimation:f,onValueChange:D,...Oe(m,M)})})});w9.displayName="HeroUI.TableCheckboxCell";var C9=w9,S9=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,state:c,isSelectable:d,classNames:f,...m}=e,g=o||(e?.href?"a":"tr"),b=typeof g=="string",y=ot(t),{rowProps:v}=mse({node:a},c,y),C=A(f?.tr,i,(r=a.props)==null?void 0:r.className),{isFocusVisible:S,focusProps:k}=Ir(),P=c.disabledKeys.has(a.key),E=c.selectionManager.isSelected(a.key),{isHovered:$,hoverProps:O}=dn({isDisabled:P}),{isFirst:N,isLast:D,isMiddle:M,isOdd:V}=x.useMemo(()=>{const R=a.key===c.collection.getFirstKey(),K=a.key===c.collection.getLastKey(),j=!R&&!K,B=a?.index?(a.index+1)%2===0:!1;return{isFirst:R,isLast:K,isMiddle:j,isOdd:B}},[a,c.collection]);return h.jsx(g,{ref:y,"data-disabled":ae(P),"data-first":ae(N),"data-focus-visible":ae(S),"data-hover":ae($),"data-last":ae(D),"data-middle":ae(M),"data-odd":ae(V),"data-selected":ae(E),...Oe(v,k,d?O:{},Lt(a.props,{enabled:b}),m),className:(n=l.tr)==null?void 0:n.call(l,{class:C}),children:s})});S9.displayName="HeroUI.TableRow";var k9=S9,P9=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:f,selectionMode:m,classNames:g,rowVirtualizer:b,...y}=e,v=n||"tbody",C=typeof v=="string",S=ot(t),{rowGroupProps:k}=H1(),P=A(g?.tbody,o),E=a?.body.props,$=E?.isLoading||E?.loadingState==="loading"||E?.loadingState==="loadingMore",O=[...a.body.childNodes],N=b.getVirtualItems();let D,M;return a.size===0&&E.emptyContent&&(D=h.jsx("tr",{role:"row",children:h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!$&&E.emptyContent})})),$&&E.loadingContent&&(M=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:i?.loadingWrapper({class:g?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:E.loadingContent}),!D&&a.size===0?h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper})}):null]})),h.jsxs(v,{ref:S,...Oe(k,Lt(E,{enabled:C}),y),className:(r=i.tbody)==null?void 0:r.call(i,{class:P}),"data-empty":ae(a.size===0),"data-loading":ae($),children:[N.map((V,R)=>{const K=O[V.index];return K?h.jsx(k9,{classNames:g,isSelectable:l,node:K,slots:i,state:s,style:{transform:`translateY(${V.start-R*V.size}px)`,height:`${V.size}px`},children:[...K.childNodes].map(j=>j.props.isSelectionCell?h.jsx(C9,{checkboxesProps:f,classNames:g,color:c,disableAnimation:d,node:j,rowKey:K.key,selectionMode:m,slots:i,state:s},String(j.key)):h.jsx(x9,{classNames:g,node:j,rowKey:K.key,slots:i,state:s},String(j.key)))},String(K.key)):null}),M,D]})});P9.displayName="HeroUI.VirtualizedTableBody";var Ise=P9,Z1=e=>typeof e=="number"?`${e}px`:e,E9=Xe((e,t)=>{var r,n,o,i,s;const{as:a,className:l,state:c,node:d,slots:f,classNames:m,sortIcon:g,...b}=e,y=a||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=l9({node:d},c,C),k=A(m?.th,l,(r=d.props)==null?void 0:r.className),{isFocusVisible:P,focusProps:E}=Ir(),{isHovered:$,hoverProps:O}=dn({}),{hideHeader:N,align:D,width:M,minWidth:V,maxWidth:R,...K}=d.props,j=K.allowsSorting,B={};M&&(B.width=Z1(M)),V&&(B.minWidth=Z1(V)),R&&(B.maxWidth=Z1(R));const U={"aria-hidden":!0,"data-direction":(n=c.sortDescriptor)==null?void 0:n.direction,"data-visible":ae(((o=c.sortDescriptor)==null?void 0:o.column)===d.key),className:(i=f.sortIcon)==null?void 0:i.call(f,{class:m?.sortIcon})},W=typeof g=="function"?g(U):x.isValidElement(g)&&x.cloneElement(g,U);return h.jsxs(y,{ref:C,colSpan:d.colspan,"data-focus-visible":ae(P),"data-hover":ae($),"data-sortable":ae(j),style:B,...Oe(S,E,Lt(K,{enabled:v}),j?O:{},b),className:(s=f.th)==null?void 0:s.call(f,{align:D,class:k}),children:[N?h.jsx(Vl,{children:d.rendered}):d.rendered,j&&(W||h.jsx(cE,{strokeWidth:3,...U}))]})});E9.displayName="HeroUI.TableColumnHeader";var T9=E9,A9=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,classNames:c,state:d,...f}=e,m=o||"tr",g=typeof m=="string",b=ot(t),{rowProps:y}=gse({node:a},d),v=A(c?.tr,i,(r=a.props)==null?void 0:r.className);return h.jsx(m,{ref:b,...Oe(y,Lt(a.props,{enabled:g}),f),className:(n=l.tr)==null?void 0:n.call(l,{class:v}),children:s})});A9.displayName="HeroUI.TableHeaderRow";var _9=A9,$9=x.forwardRef((e,t)=>{var r;const{as:n,className:o,children:i,slots:s,classNames:a,...l}=e,c=n||"thead",d=ot(t),{rowGroupProps:f}=H1(),m=A(a?.thead,o);return h.jsx(c,{ref:d,className:(r=s.thead)==null?void 0:r.call(s,{class:m}),...Oe(f,l),children:i})});$9.displayName="HeroUI.TableRowGroup";var I9=$9,N9=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,getBaseProps:d,getWrapperProps:f,getTableProps:m}=v9({...e,ref:t}),{rowHeight:g=40,maxTableHeight:b=600}=e,y=x.useCallback(({children:N})=>h.jsx(r,{...f(),ref:S,style:{height:b,display:"block"},children:N}),[f,b]),C=[...o.body.childNodes].length,S=x.useRef(null),[k,P]=x.useState(0),E=x.useRef(null);x.useLayoutEffect(()=>{E.current&&P(E.current.getBoundingClientRect().height)},[E]);const $=jT({count:C,getScrollElement:()=>S.current,estimateSize:()=>g,overscan:5}),O=m();return h.jsxs("div",{...d(),children:[a==="outside"&&s,h.jsx(y,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&s,h.jsxs(n,{...O,style:{height:`calc(${$.getTotalSize()+k}px)`,...O.style},children:[h.jsx(I9,{ref:E,classNames:i.classNames,slots:i.slots,children:o.headerRows.map(N=>h.jsx(_9,{classNames:i.classNames,node:N,slots:i.slots,state:i.state,children:[...N.childNodes].map(D=>{var M;return(M=D?.props)!=null&&M.isSelectionCell?h.jsx(f9,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,color:i.color,disableAnimation:i.disableAnimation,node:D,selectionMode:i.selectionMode,slots:i.slots,state:i.state},D?.key):h.jsx(T9,{classNames:i.classNames,node:D,slots:i.slots,state:i.state},D?.key)})},N?.key))}),h.jsx(Ise,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,collection:i.collection,color:i.color,disableAnimation:i.disableAnimation,isSelectable:i.isSelectable,rowVirtualizer:$,selectionMode:i.selectionMode,slots:i.slots,state:i.state})]}),l==="inside"&&c]})}),l==="outside"&&c]})});N9.displayName="HeroUI.VirtualizedTable";var Nse=N9,D9=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:f,selectionMode:m,classNames:g,...b}=e,y=n||"tbody",v=typeof y=="string",C=ot(t),{rowGroupProps:S}=H1(),k=A(g?.tbody,o),P=a?.body.props,E=P?.isLoading||P?.loadingState==="loading"||P?.loadingState==="loadingMore",$=x.useMemo(()=>[...a.body.childNodes].map(D=>h.jsx(k9,{classNames:g,isSelectable:l,node:D,slots:i,state:s,children:[...D.childNodes].map(M=>M.props.isSelectionCell?h.jsx(C9,{checkboxesProps:f,classNames:g,color:c,disableAnimation:d,node:M,rowKey:D.key,selectionMode:m,slots:i,state:s},M.key):h.jsx(x9,{classNames:g,node:M,rowKey:D.key,slots:i,state:s},M.key))},D.key)),[a.body.childNodes,g,l,i,s]);let O,N;return a.size===0&&P.emptyContent&&(O=h.jsx("tr",{role:"row",children:h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!E&&P.emptyContent})})),E&&P.loadingContent&&(N=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:i?.loadingWrapper({class:g?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:P.loadingContent}),!O&&a.size===0?h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper})}):null]})),h.jsxs(y,{ref:C,...Oe(S,Lt(P,{enabled:v}),b),className:(r=i.tbody)==null?void 0:r.call(i,{class:k}),"data-empty":ae(a.size===0),"data-loading":ae(E),children:[$,N,O]})});D9.displayName="HeroUI.TableBody";var Dse=D9,M9=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,removeWrapper:d,sortIcon:f,getBaseProps:m,getWrapperProps:g,getTableProps:b}=v9({...e,ref:t}),{isVirtualized:y,rowHeight:v=40,maxTableHeight:C=600}=e,S=y,k=x.useCallback(({children:P})=>d?P:h.jsx(r,{...g(),children:P}),[d,g]);return S?h.jsx(Nse,{...e,ref:t,maxTableHeight:C,rowHeight:v}):h.jsxs("div",{...m(),children:[a==="outside"&&s,h.jsx(k,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&s,h.jsxs(n,{...b(),children:[h.jsx(I9,{classNames:i.classNames,slots:i.slots,children:o.headerRows.map(P=>h.jsx(_9,{classNames:i.classNames,node:P,slots:i.slots,state:i.state,children:[...P.childNodes].map(E=>{var $;return($=E?.props)!=null&&$.isSelectionCell?h.jsx(f9,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,color:i.color,disableAnimation:i.disableAnimation,node:E,selectionMode:i.selectionMode,slots:i.slots,state:i.state},E?.key):h.jsx(T9,{classNames:i.classNames,node:E,slots:i.slots,sortIcon:f,state:i.state},E?.key)})},P?.key))}),h.jsx(Dse,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,collection:i.collection,color:i.color,disableAnimation:i.disableAnimation,isSelectable:i.isSelectable,selectionMode:i.selectionMode,slots:i.slots,state:i.state})]}),l==="inside"&&c]})}),l==="outside"&&c]})});M9.displayName="HeroUI.Table";var Ah=M9,Mse=Ase,_n=Mse,Ose=Ese,_h=Ose,jse=_se,$h=jse,Lse=Tse,Ih=Lse,Fse=$se,$n=Fse;function Si({title:e,rows:t,classNames:r}){return t.length===0?null:h.jsxs("div",{children:[h.jsx("div",{className:A("text-base font-semibold",r?.title),children:e}),h.jsxs(Ah,{removeWrapper:!0,hideHeader:!0,isCompact:!0,"aria-label":e,classNames:{base:A(r?.table?.base),wrapper:A(r?.table?.wrapper),table:A("table-fixed",r?.table?.table),thead:A(r?.table?.thead),tbody:A(r?.table?.tbody),tr:A("border-b border-default-100",r?.table?.tr),th:A(r?.table?.th),td:A(r?.table?.td)},children:[h.jsxs(_h,{children:[h.jsx(_n,{children:"Label"}),h.jsx(_n,{children:"Waarde"})]}),h.jsx(Ih,{children:t.map(n=>h.jsxs($h,{children:[h.jsx($n,{children:n.label}),h.jsx($n,{children:n.value})]},n.key))})]})]})}function Bse({proposition:e,classNames:t,buildClickOutUrl:r}){const{t:n}=Je(),o=e.bundles.filter(d=>d.isExtra),i=e.tags.find(d=>d.type==="internet"),s=e.productType==="fixed"?[{label:n("detailsModal.provider"),value:e.provider.name,key:"provider"},...e.provider.network?[{label:n("detailsModal.networkAdministrator"),value:e.provider.network.replace(/-netwerk/g,""),key:"networktype"}]:[],...i?[{label:n("detailsModal.networkType"),value:n(`fixedInternet.${i.slug}`,{defaultValue:i.label}),key:"networktype"}]:[]]:[{label:n("detailsModal.network"),value:`${e.provider.network?.replace(/-netwerk/g,"")} ${n("detailsModal.network").toLowerCase()}`,key:"network"},{label:n("detailsModal.networkCoverage"),value:e.provider.networkCoverage,key:"networktype"}],a=e.productType==="fixed"?[{label:n("detailsModal.contractTerm"),value:`${Jc(e.planVariant.contractTerm)}${e.planVariant.contractTerm===1?` ${n("detailsModal.contractTermTerminable")}`:""}`,key:"duration"}]:[{label:n("detailsModal.contractTerm"),value:`${Jc(e.planVariant.contractTerm)}${e.planVariant.contractTerm===1?` ${n("detailsModal.contractTermTerminable")}`:""}`,key:"duration"},{label:n("detailsModal.subscriptionType"),value:e.planVariant.name,key:"subscription-type"},{label:n("detailsModal.internet"),value:Kn(e.content.data,n("format.gigabyte")),key:"internet"},{label:n("detailsModal.calling"),value:Kn(e.content.minutes,n("format.minutes")),key:"calling"},{label:n("detailsModal.sms"),value:Kn(e.content.sms,n("format.sms")),key:"sms"},...o.length>0?[{label:n("detailsModal.extras"),value:o.map(d=>d.displayName).join(", "),key:"extras"}]:[]],l=e.productType==="fixed"?[]:[{label:n("detailsModal.networkGeneration"),value:FN(e.content.networkGeneration),key:"network-generation"},{label:n("detailsModal.downloadSpeed"),value:h.jsxs(h.Fragment,{children:[n("format.maximum")," ",e.content.dataSpeedDown/1e3," ",n("format.megabitPerSecond"),h.jsx("br",{}),n("format.average")," ",e.content.dataAvgSpeedDown/1e3," ",n("format.megabitPerSecond")]}),key:"download-speed"},{label:n("detailsModal.uploadSpeed"),value:h.jsxs(h.Fragment,{children:[n("format.maximum")," ",e.content.dataSpeedUp/1e3," ",n("format.megabitPerSecond"),h.jsx("br",{}),n("format.average")," ",e.content.dataAvgSpeedUp/1e3," ",n("format.megabitPerSecond")]}),key:"upload-speed"}],c=e.provider.termsAndConditionsUrl?[{label:e.provider.name,value:h.jsxs("button",{type:"button",onClick:()=>{r(`/${e.provider.termsAndConditionsUrl}`).then(d=>window.open(d,"_blank"))},className:A("text-primary-600 hover:underline flex items-center gap-0.5 cursor-pointer",t?.link),children:[n("detailsModal.termsAndConditions")," ",h.jsx(wa,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(Si,{title:n("detailsModal.network"),rows:s,classNames:t}),h.jsx(Si,{title:e.productType==="fixed"?n("detailsModal.subscription"):n("detailsModal.bundle"),rows:a,classNames:t}),h.jsx(Si,{title:n("detailsModal.bundleSpeed"),rows:l,classNames:t}),e.productType==="fixed"&&h.jsx(Si,{title:n("detailsModal.termsAndConditions"),rows:c,classNames:t})]})}function O9({proposition:e}){const{t}=Je(),{results:{creditInfo:r}={}}=vt(),{openModal:n}=Qt();function o(i){return{base:A(i,r?.table?.base),wrapper:A(r?.table?.wrapper),table:A("table-fixed border-collapse",r?.table?.table),thead:A(r?.table?.thead),tbody:A(r?.table?.tbody),tr:A(r?.table?.tr),th:A("first:pl-0 h-auto text-xs font-normal whitespace-break-spaces bg-transparent p-0 px-0.5",r?.table?.th),td:A("first:pl-0 py-0 px-0.5 text-xs font-medium text-foreground-500 first:whitespace-nowrap",r?.table?.td)}}return h.jsxs("div",{className:A("mt-1 border-small border-default-200 rounded-medium p-2",r?.base),children:[h.jsxs(p0,{orientation:"horizontal",hideScrollBar:!0,children:[h.jsxs(Ah,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o(),children:[h.jsxs(_h,{children:[h.jsx(_n,{children:t("creditInfo.totalDeviceCost")}),h.jsx(_n,{children:t("creditInfo.oneTimeFee")}),h.jsx(_n,{children:t("creditInfo.totalCreditAmount")})]}),h.jsx(Ih,{children:h.jsxs($h,{children:[h.jsx($n,{children:Ve(e.price+e.creditFee,{symbol:"€"})}),h.jsx($n,{children:Ve(e.price,{symbol:"€"})}),h.jsx($n,{children:Ve(e.creditFee,{symbol:"€"})})]})})]}),h.jsxs(Ah,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o("mt-4"),children:[h.jsxs(_h,{children:[h.jsx(_n,{children:t("creditInfo.monthlyPayment")}),h.jsx(_n,{children:t("creditInfo.contractTerm")}),h.jsx(_n,{children:t("creditInfo.fixedInterest")})]}),h.jsx(Ih,{children:h.jsxs($h,{children:[h.jsx($n,{children:Ve(e.handsetCreditMonthlyFee||0,{symbol:"€"})}),h.jsxs($n,{children:[e.planVariant.contractTerm," ",t("format.month",{count:e.planVariant.contractTerm})]}),h.jsx($n,{textValue:"0%",children:"0%"})]})})]})]}),h.jsxs("p",{className:A("mt-2 text-xs text-foreground-500",r?.description),children:[h.jsx(O4,{i18nKey:"creditInfo.creditBundleDescription",components:[h.jsx("button",{type:"button",onClick:()=>n("content-/vragen-en-contact/bestellen-betalen/wat-is-de-wet-financieel-toezicht/wet-financieel-toezicht"),className:A("text-primary-600 hover:underline cursor-pointer",r?.descriptionLink)},"credit-info-credit-bundle-description-link")],values:{creditPrice:Ve(250,{symbol:"€",dashed:!0}),creditProviderName:e.provider.creditProviderName}})," ",h.jsx("button",{type:"button",onClick:()=>n("content-/inkomens-en-lastentoets"),className:A("text-primary-600 hover:underline cursor-pointer",r?.descriptionLink),children:t("detailsModal.moreInformation")})]})]})}function zse(e,t){return e===0?Ee.t("format.firstMonth",{count:t}):Ee.t("format.thenMonth",{count:t})}function Po({label:e,price:t,classNames:r}){return h.jsxs("div",{className:A("flex justify-between items-center text-sm",r?.container),children:[h.jsx("div",{className:A(r?.label),children:e}),h.jsx("div",{className:A(r?.price),children:t})]})}function j9({icon:e,title:t,subtitle:r,price:n,classNames:o}){return h.jsxs("div",{className:A("flex justify-between items-center",o?.header),children:[h.jsxs("div",{className:A("flex items-center gap-1",o?.headerContent),children:[h.jsx("div",{className:A(o?.icon),children:e}),h.jsxs("div",{children:[h.jsx("div",{className:A("font-semibold text-sm",o?.title),children:t}),h.jsx("div",{className:A("text-xs text-foreground-500",o?.subtitle),children:r})]})]}),h.jsx("div",{className:A("text-sm font-semibold",o?.price),children:n})]})}function Kse({proposition:e,classNames:t}){const{t:r}=Je(),{productType:n,provider:o,monthlyFees:i,price:s,creditFee:a,tcoPerMonth:l,handsetCreditMonthlyFee:c,tcoTerm:d,tcoCorrection:f,activationFee:m,cashback:g,productVersion:b,installationFee:y}=e,v=t?.averageSection,C=t?.discountSection;return h.jsxs("div",{className:A("pb-4",t?.base),children:[h.jsxs("div",{className:A("bg-primary-50 px-3 py-2 rounded-large",v?.container),children:[h.jsx(j9,{icon:h.jsx(q4,{size:24,className:"stroke-foreground"}),title:r("detailsModal.costPerContractTermTitle"),subtitle:r("detailsModal.costPerContractTermSubtitle"),price:Ve(l),classNames:{header:v?.header,headerContent:v?.headerContent,icon:v?.icon,title:v?.title,subtitle:v?.subtitle,price:v?.price}}),h.jsx("div",{className:A("text-sm mt-2",v?.monthlyFeesContainer),children:i.map(({fee:S,term:k})=>h.jsx(Po,{label:`${r("format.monthly")} ${k} x ${Ve(S,{symbol:"€"})}`,price:Ve(S*k),classNames:v?.monthlyFee},`${k}-${S}`))}),s!==0&&h.jsx(Po,{label:r("format.oneTime"),price:Ve(s),classNames:v?.oneTimeFee}),h.jsx(Po,{label:`${o.name} ${r("detailsModal.activationFee")}`,price:Ve(m),classNames:v?.activationFee}),n==="fixed"&&h.jsx(Po,{label:`${o.name} ${r("detailsModal.installationFee")}`,price:Ve(y),classNames:v?.installationFee}),g!==0&&h.jsx(Po,{label:r("detailsModal.cashback"),price:`-${Ve(g)}`,classNames:v?.cashback}),f!==0&&h.jsx(Po,{label:r("detailsModal.cashback"),price:Ve(f),classNames:v?.cashback}),h.jsx(Ql,{orientation:"horizontal",className:A("my-3",v?.separator)}),h.jsx(Po,{label:r("detailsModal.totalCostsOverTerm",{count:d}),price:Ve(l*d),classNames:v?.totalCosts})]}),n==="smartphone"&&h.jsxs("div",{children:[h.jsxs("div",{className:A("bg-primary-50 px-3 py-2 rounded-large text-sm mt-3",C?.container),children:[h.jsx(j9,{icon:h.jsx(qu,{size:24,className:"stroke-foreground"}),title:r("detailsModal.deviceDiscountTitle"),subtitle:r("detailsModal.deviceDiscountSubtitle"),price:Ve(b?.pricing.sellingPriceInclVat?Number(b.pricing.sellingPriceInclVat)-(a+s):void 0),classNames:{header:C?.header,headerContent:C?.headerContent,icon:C?.icon,title:C?.title,subtitle:C?.subtitle,price:C?.price}}),h.jsx(Po,{label:r("detailsModal.priceWithoutSubscription"),price:Ve(Number(b?.pricing.sellingPriceInclVat)),classNames:{container:A("my-2",C?.priceWithoutSubscription?.container),label:C?.priceWithoutSubscription?.label,price:C?.priceWithoutSubscription?.price}}),i.map(({fee:S,term:k},P)=>h.jsxs("div",{children:[h.jsx(Po,{label:r("detailsModal.priceWithSubscription"),price:Ve(c*k+s),classNames:C?.priceWithSubscription}),h.jsx(Po,{label:h.jsxs(h.Fragment,{children:[P===i.length-1?r("detailsModal.deviceBundle"):zse(P,k)," ",k," x ",Ve(c,{symbol:"€"})]}),price:Ve(c*k),classNames:{container:A(C?.handsetCosts?.container),label:A("pl-4",C?.handsetCosts?.label),price:A(C?.handsetCosts?.price)}})]},`discount-${k}-${S}-${c}-${s}`)),h.jsx(Po,{label:r("detailsModal.devicePrice"),price:Ve(s),classNames:{container:A(C?.oneTimeFee?.container),label:A("pl-4",C?.oneTimeFee?.label),price:A(C?.oneTimeFee?.price)}}),h.jsx(Ql,{orientation:"horizontal",className:A("my-3",C?.separator)}),h.jsx(Po,{label:r("detailsModal.totalDeviceDiscount"),price:Ve(b?.pricing.sellingPriceInclVat?Number(b.pricing.sellingPriceInclVat)-(a+s):void 0),classNames:C?.totalDiscount})]}),h.jsx("div",{className:A("text-xs text-foreground-500 mt-6",t?.creditInfoLabel),children:r("creditInfo.creditBundleTitle")}),h.jsx(O9,{proposition:e})]})]})}function Vse({proposition:e,classNames:t,onChannelsClick:r,buildClickOutUrl:n}){const{t:o}=Je(),{plan:i,content:s,bundles:a,provider:l,productType:c}=e,{sharedCredits:d}=s,f=Kn(s.dataEu,o("format.gigabyte")),m=Kn(s.minutesEu,o("format.minutes")),g=Kn(s.minutesToEu,o("format.minutes")),b=["data","minutes"].every(k=>d?.includes(k))?"/":"+";if(c==="fixed"){const k=[{label:o("detailsModal.maximumDownloadSpeed"),value:`${s.dataSpeedDown/1e3} ${o("format.megabitPerSecond")}`,key:"download-speed"},{label:o("detailsModal.maximumUploadSpeed"),value:`${s.dataSpeedUp/1e3} ${o("format.megabitPerSecond")}`,key:"upload-speed"}],P=a.filter(E=>E.contentTypes?.includes("tv"))?.length>0?[{label:o("detailsModal.numberOfChannels"),value:h.jsxs("button",{type:"button",onClick:r,className:A("text-primary-600 hover:underline cursor-pointer",t?.link),children:[s.channels.length," (",s.hdChannels.length," HD)"]}),key:"channels"},{label:o("detailsModal.numberOfReceivers"),value:s.receivers,key:"receivers"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(Si,{title:o("detailsModal.internet"),rows:k,classNames:t}),P.length>0&&h.jsx(Si,{title:o("detailsModal.television"),rows:P,classNames:t})]})}const y=[{label:o("detailsModal.dataExceedance"),value:i.bundleExceedanceDataLimitReached,key:"data-exceedance"},{label:o("detailsModal.bundleExceedanceRates"),value:i.bundleExceedanceRate,key:"exceedance-rate"},{label:o("detailsModal.bundleExceedanceRateCeiling"),value:i.bundleExceedanceRateCeiling,key:"rate-ceiling"},{label:o("detailsModal.bundleExceedanceWarning"),value:i.bundleExceedanceWarning,key:"warning"},{label:o("detailsModal.bundleExceedanceMinutesRounding"),value:i.bundleExceedanceMinutesRounding,key:"minutes-rounding"}],v=[{label:o("detailsModal.upgradeBundle"),value:i.bundleUpgrade,key:"upgrade"},{label:o("detailsModal.downgradeBundle"),value:i.bundleDowngrade,key:"downgrade"}],C=[{label:o("detailsModal.insideEu"),value:s.minutesEu>0?`${f} ${b} ${m}`:f,key:"in-eu"},{label:o("detailsModal.outsideEu"),value:h.jsxs("button",{type:"button",onClick:()=>{n(`/tariefinformatie/${l.slug}`).then(k=>window.open(k,"_blank"))},className:A("text-primary-600 hover:underline flex items-center gap-0.5 cursor-pointer",t?.link),children:[o("detailsModal.moreInformation")," ",h.jsx(wa,{size:16})]}),key:"out-eu"},...s.minutesToEu>0?[{label:o("detailsModal.minutesToEu"),value:g,key:"to-eu"}]:[]],S=e.provider.termsAndConditionsUrl?[{label:e.provider.name,value:h.jsxs("button",{type:"button",onClick:()=>{n(`/${e.provider.termsAndConditionsUrl}`).then(k=>window.open(k,"_blank"))},className:A("text-primary-600 hover:underline flex items-center gap-0.5 cursor-pointer",t?.link),children:[o("detailsModal.termsAndConditions")," ",h.jsx(wa,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(Si,{title:o("detailsModal.outsideBundle"),rows:y,classNames:t}),h.jsx(Si,{title:o("detailsModal.subscriptionFlexibility"),rows:v,classNames:t}),h.jsx(Si,{title:o("detailsModal.abroad"),rows:C,classNames:t}),h.jsx(Si,{title:o("detailsModal.termsAndConditions"),rows:S,classNames:t})]})}function Rse(e){const t=[e.provider.name,e.plan?.name];return e.planVariant.contractTerm===24?t.push(`2 ${Ee.t("format.year",{count:2})}`):e.planVariant.contractTerm===12&&t.push(`1 ${Ee.t("format.year")}`),e.planVariant.contractType==="retention"&&t.push(Ee.t("detailsModal.renewal")),Array.from(new Set(t)).join(" ").trim()}function Xc({proposition:e,defaultTab:t="general",buildClickOutUrl:r}){const{t:n}=Je(),[o,i]=Fn(),{results:{detailsModal:s}={}}=vt(),{popoverProps:a,isShadowRoot:l}=Zn(),[c,d]=x.useState(t),{isModalOpen:f,openModal:m,closeModal:g}=Qt();if(x.useEffect(()=>{d(t)},[t]),!e)return null;const b=Kn(e.content.data,n("format.gigabyte")),{sharedCredits:y}=e.content,v=["data","minutes"].every(S=>y?.includes(S))?"/":"+",C=e.tags.find(S=>S.type==="internet");return h.jsx(fi,{isOpen:f("details"),onOpenChange:S=>S?m("details"):g("details"),placement:"bottom-center",scrollBehavior:"inside",size:"lg",shouldBlockScroll:!l,portalContainer:a.portalContainer,classNames:{backdrop:A(s?.modal?.backdrop),wrapper:A(s?.modal?.wrapper),base:A("m-0 max-h-[90vh]",s?.modal?.base),header:A(s?.modal?.header),body:A("pt-0",s?.modal?.body),footer:A(s?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",s?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:h.jsx("span",{children:n("detailsModal.title")})}),h.jsxs(ai,{onPointerDown:S=>S.stopPropagation(),children:[h.jsxs("div",{className:A("flex items-center gap-2",s?.propositionInfo?.container),children:[e.productType==="smartphone"&&e.productVersion?h.jsx(Ar,{src:o(e.productVersion.media.main?.url||"",64,64),srcSet:i(e.productVersion.media.main?.url||"",64,64),alt:e.productVersion.media.main?.altText||"",width:64,height:64,className:A(s?.propositionInfo?.image)}):h.jsx(Ar,{src:o(e.provider.imageUrl,48,24),srcSet:i(e.provider.imageUrl,48,24),alt:e.provider.name,width:48,height:24,className:A(s?.propositionInfo?.image)}),h.jsxs("div",{className:A("text-sm",s?.propositionInfo?.content),children:[e.productType!=="smartphone"&&h.jsx("div",{className:A("font-semibold",s?.propositionInfo?.name),children:Rse(e)}),e.productType==="fixed"?h.jsxs("div",{className:A(s?.propositionInfo?.details),children:[e.content.dataSpeedDown/1e3," ",n("format.megabitPerSecond")," ",C?n(`fixedInternet.${C.slug}`,{defaultValue:C.label}):""]}):h.jsx("div",{className:A(s?.propositionInfo?.details),children:e.content.minutes>0?h.jsxs("div",{children:[h.jsx("span",{children:b})," ",v," ",h.jsxs("span",{children:[B1(e.content.minutes)," ",n("format.minutes_short")]})]}):h.jsx("div",{children:b})}),e.productType==="smartphone"&&h.jsxs("div",{children:[h.jsxs("div",{className:A("font-semibold",s?.propositionInfo?.productName),children:[e.productVersion?.product.fullName," "]}),h.jsx("div",{className:A("text-xs",s?.propositionInfo?.productProperties),children:e.productVersion?.distinctProperties.map(S=>S.option.label).join(", ")})]})]})]}),h.jsxs(ET,{onPointerDown:S=>S.stopPropagation(),selectedKey:c,radius:"full",color:"primary","aria-label":n("detailsModal.chooseTab"),classNames:{base:A(s?.tabs?.base),tabList:A("relative",s?.tabs?.tabList),tab:A(s?.tabs?.tab),panel:A("h-[60vh]",s?.tabs?.panel),cursor:A(s?.tabs?.cursor)},children:[h.jsx(Xl,{title:n("detailsModal.general"),onClick:()=>d("general"),children:h.jsx(Bse,{proposition:e,classNames:s?.general,buildClickOutUrl:r})},"general"),h.jsx(Xl,{title:e.productType==="fixed"?n("detailsModal.bundles"):n("detailsModal.conditions"),onClick:()=>d("conditions"),children:h.jsx(Vse,{proposition:e,classNames:s?.terms,onChannelsClick:()=>d("channels"),buildClickOutUrl:r})},"conditions"),e.productType==="fixed"&&h.jsx(Xl,{title:n("detailsModal.channels"),onClick:()=>d("channels"),children:h.jsx(Xie,{channels:e.content.channels,hdChannels:e.content.hdChannels,classNames:s?.channels})},"channels"),h.jsx(Xl,{title:n("detailsModal.costs"),onClick:()=>d("costs"),children:h.jsxs("div",{className:A(s?.costOverview?.base),children:[h.jsx(zN,{proposition:e,classNames:s?.costOverview}),h.jsx(Kse,{proposition:e,classNames:s?.costOverview?.propositionOverview})]})},"costs")]})]})]})})}function L9({label:e,classNames:t}){return h.jsx("div",{className:A("px-4",t?.wrapper),children:h.jsx("div",{className:A("w-full text-background text-xs font-semibold text-center px-4 rounded-t-xl h-6 flex items-center justify-center shadow-small",{"bg-primary":e.color==="primary","bg-secondary":e.color==="secondary","bg-default":e.color==="default","bg-success":e.color==="success","bg-warning":e.color==="warning","bg-danger":e.color==="danger"},t?.text),tabIndex:-1,children:e.displayName})})}function F9({productStockStatus:e,classNames:t}){const{t:r}=Je(),n=r("propositionCard.availableStockStatus"),o=r("propositionCard.backorderedStockStatus"),i=r("propositionCard.preOrderStockStatus"),s=x.useMemo(()=>{switch(e){case"in_stock":return n;case"backordered":return o;case"preorder":return i;default:return null}},[e,n,o,i]);return s?h.jsxs("div",{className:A("text-center flex items-center justify-center gap-1.5",t?.wrapper),children:[h.jsx("div",{className:A("size-2 rounded-full",{"bg-success":e==="in_stock"||e==="preorder","bg-warning":e==="backordered"},t?.icon)}),h.jsx("span",{className:A("text-sm text-foreground",t?.text),children:s})]}):null}function B9({hasProduct:e,productImageUrl:t,productImageAlt:r,productStockStatus:n,propositionImageUrl:o,propositionImageAlt:i,horizontal:s,classNames:a}){const[l,c]=Fn();if(e){const d=s?140:200;return h.jsxs("div",{className:A("flex flex-col gap-2 items-center w-full",a?.phoneImage?.wrapper),children:[t&&r&&h.jsx(Ar,{alt:r,height:d,src:l(t,d,d),srcSet:c(t,d,d),width:d,classNames:{wrapper:A("mx-auto flex shrink-0",a?.phoneImage?.imageWrapper),img:A("aspect-square drop-shadow-lg",a?.phoneImage?.image)}}),h.jsx(F9,{productStockStatus:n,classNames:a?.phoneImage?.stockIndicator})]})}return h.jsx(Ar,{alt:i,height:70,src:l(o,140,70),srcSet:c(o,140,70),width:140,classNames:{wrapper:A("mx-auto flex shrink-0",a?.providerImage?.imageWrapper),img:A("aspect-2/1",a?.providerImage?.image)}})}function z9({monthlyFeePromotionText:e,monthlyFee:t,productPrice:r,tcoPerMonth:n,onInfoClick:o,classNames:i,horizontal:s}){const{t:a}=Je(),[l,c]=t.split(",");return h.jsxs("div",{className:A("flex flex-col",s&&"items-end text-right",i?.wrapper),children:[e&&h.jsx("div",{className:A("text-sm text-foreground-500 whitespace-nowrap",i?.promotionText),children:e}),h.jsxs("div",{className:A("flex items-end gap-1",i?.monthlyFeeWrapper),children:[h.jsxs("div",{className:A("flex items-start font-extrabold -tracking-[1px] text-foreground h-8 text-[32px] leading-8",i?.monthlyFeeValue),children:[h.jsx("span",{children:l}),h.jsx("span",{className:"font-bold mt-0.5 ml-[3px] text-[22px] leading-8",children:","}),h.jsx("span",{className:"font-bold -mt-[3px] -ml-[3px] text-lg leading-8",children:c})]}),h.jsxs("div",{className:A("text-sm text-foreground leading-none",i?.monthlyFeeLabel),children:["/ ",a("format.month")]})]}),r&&h.jsxs("div",{className:A("text-sm font-semibold text-foreground",i?.oneTimeFee),children:["+ ",h.jsx("span",{children:r})," ",a("propositionCard.oneTimeFee")]}),n&&h.jsxs("div",{className:A("flex items-center gap-1 text-sm mt-1",i?.averagePriceWrapper),children:[h.jsx(q4,{size:16,className:A("text-primary-600",i?.averagePriceIcon)}),h.jsxs("button",{type:"button",className:A("underline underline-offset-4 text-primary-600 cursor-pointer",i?.averagePriceValue),onPointerDown:d=>{d.preventDefault(),d.stopPropagation()},onClick:d=>{d.preventDefault(),d.stopPropagation(),o("costs")},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),d.stopPropagation(),o("costs"))},tabIndex:0,children:[a("format.average_short")," ",n," / ",a("format.month")]})]})]})}function Nh({promotions:e,urgentText:t,showUrgentTextInline:r=!1,isClickable:n=!1,classNames:o}){const{t:i}=Je(),[s,a]=x.useState(null),{popoverProps:l,isShadowRoot:c}=Zn();return e.length===0?null:h.jsxs("div",{className:A("flex flex-col gap-0",o?.base),children:[!r&&t&&h.jsx(i1,{classNames:{base:A("mb-1 border-1 text-xs",o?.urgentChip?.base),content:A("font-semibold",o?.urgentChip?.content)},color:"warning",size:"sm",variant:"bordered",children:h.jsx("span",{children:t})}),e.map((d,f)=>h.jsxs("div",{className:A("flex flex-row items-start gap-1 text-sm @xs:text-base leading-normal @xs:leading-tight w-fit",n&&typeof d=="object"&&d.slideOutDescription&&"cursor-pointer underline decoration-dotted underline-offset-4 decoration-foreground-400 decoration-2 hover:text-primary",o?.item),onPointerDown:n&&typeof d=="object"&&d.slideOutDescription?()=>a(d):void 0,children:[h.jsx(jL,{size:20,className:A("shrink-0 text-success-600",o?.promotionIcon)}),h.jsxs("span",{children:[typeof d=="object"?d.shortDescription:d,r&&t&&f===0&&h.jsx(i1,{classNames:{base:A("ml-2 border-1 text-xs inline-block h-fit py-0.5",o?.urgentChip?.base),content:A("font-semibold",o?.urgentChip?.content)},color:"warning",size:"sm",variant:"bordered",children:h.jsx("span",{children:t})})]})]},typeof d=="object"?d.shortDescription:d)),n&&h.jsx(fi,{isOpen:!!s,onOpenChange:d=>a(d?s:null),placement:"bottom-center",scrollBehavior:"inside",size:"xl",shouldBlockScroll:!c,portalContainer:l.portalContainer,classNames:{backdrop:A(o?.modal?.backdrop),wrapper:A(o?.modal?.wrapper),base:A("m-0 max-h-[90vh]",o?.modal?.base),header:A("font-bold",o?.modal?.header),body:A("pt-0",o?.modal?.body),footer:A(o?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",o?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:s?.publicTitle??""}),h.jsx(ai,{children:h.jsx(m6,{children:s?.slideOutDescription??""})}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",o?.modal?.primaryButton),onPress:()=>a(null),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:i("common.close")})})]})})]})}function Wse({slug:e,size:t=16,className:r}){switch(e){case"contract-term":return h.jsx(LL,{size:t,className:r});case"data-speed-down":return h.jsx(BL,{size:t,className:r});case"provider-network":return h.jsx(DL,{size:t,className:r});case"data-eu":return h.jsx(VL,{size:t,className:r});case"internet-speed":return h.jsx(H4,{size:t,className:r});case"channels":return h.jsx(G4,{size:t,className:r});case"tv-receiver":return h.jsx(FL,{size:t,className:r});default:return null}}function K9({propositionSpecifications:e,classNames:t,onInfoClick:r}){return!e||e.length===0?null:h.jsx("div",{className:A("flex flex-wrap items-center gap-x-2 gap-y-1 text-foreground-500",t?.wrapper),children:e.map(n=>h.jsxs("button",{type:"button",className:A("text-sm flex items-center gap-1 whitespace-nowrap",r&&"cursor-pointer hover:underline",t?.item),onPointerDown:o=>{o.preventDefault(),o.stopPropagation()},onClick:o=>{o.preventDefault(),o.stopPropagation(),r?.(n.slug==="channels"?"channels":"general")},children:[h.jsx(Wse,{slug:n.slug,className:A(t?.icon)}),h.jsx("span",{children:n.title})]},n.title))})}function Y1({productTitle:e,propositionTitle:t,propositionSubtitle:r,imageUrl:n,imageAlt:o,hasProduct:i,horizontal:s,propositionSpecifications:a,onInfoClick:l,classNames:c,imageWidth:d=70,imageHeight:f=35}){const[m,g]=Fn();return h.jsxs("div",{className:A("flex flex-col",c?.base),children:[h.jsxs("div",{className:A("flex justify-between gap-3 w-full",d>70&&"items-center",s&&"w-fit",c?.titleWrapper),children:[h.jsxs("div",{className:A(i&&"flex flex-col justify-center"),children:[i&&e&&h.jsx("div",{className:A("text-base leading-tight font-bold @xs:text-xl",c?.phone?.title),children:e}),i&&h.jsxs("div",{className:A("text-sm leading-tight @xs:text-base",c?.phone?.subtitle),children:[t," • ",r]}),i&&h.jsx(K9,{propositionSpecifications:a,classNames:{...c?.proposition?.specifications,wrapper:A("mt-2",c?.proposition?.specifications?.wrapper)},onInfoClick:l}),!i&&h.jsxs("div",{className:A("flex flex-wrap items-center gap-x-1 leading-tight",c?.proposition?.wrapper),children:[h.jsx("span",{className:A("text-xl font-bold text-foreground",c?.proposition?.title),children:t}),r&&h.jsxs("span",{className:A(c?.proposition?.subtitle),children:["• ",r]})]})]}),i&&n&&o&&h.jsx(Ar,{alt:o,height:f,src:m(n,d,f),srcSet:g(n,d,f),width:d,classNames:{wrapper:A("flex shrink-0",c?.phone?.providerImageWrapper),img:A("aspect-2/1",c?.phone?.providerImage)}})]}),!i&&h.jsx(K9,{propositionSpecifications:a,classNames:c?.proposition?.specifications,onInfoClick:l})]})}function V9({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:f,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),$=!!(n&&o&&i);return h.jsxs(Fs,{as:"div",isDisabled:r,disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("@container flex flex-row",P?.card),children:[h.jsx("div",{className:A("p-6 w-fit",P?.horizontalCard?.header),children:h.jsx(B9,{horizontal:!0,hasProduct:$,productImageUrl:o,productImageAlt:i,productStockStatus:C,propositionImageUrl:l,propositionImageAlt:c,classNames:P?.mainImage})}),h.jsx(Ql,{orientation:"vertical",className:A(P?.horizontalCard?.divider)}),h.jsxs("div",{className:A("p-6 flex flex-col gap-3 flex-1 w-fit",P?.horizontalCard?.body),children:[h.jsx(Y1,{horizontal:!0,hasProduct:$,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:$?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(Nh,{promotions:[...g,...b],urgentText:v,classNames:P?.promotionList})]}),h.jsxs("div",{className:A("p-6 pl-0 flex flex-col items-end gap-4 shrink-0 self-end",P?.horizontalCard?.footer),children:[h.jsx(z9,{horizontal:!0,monthlyFeePromotionText:y,productPrice:S,monthlyFee:f,tcoPerMonth:m,onInfoClick:t,classNames:P?.pricing}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full",r&&"pointer-events-none",P?.button),color:"secondary",size:"lg",disabled:r,onPress:r?void 0:e,endContent:k?h.jsx(wa,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function Use({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(L9,{label:e,classNames:{wrapper:r?.label?.wrapper,text:A("w-max",r?.label?.text)}}),h.jsx(V9,{classNames:r,...t})]}):h.jsx(V9,{classNames:r,...t})}function R9({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:f,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),$=!!(n&&o&&i);return h.jsxs(Fs,{as:"div",isDisabled:r,disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("@container h-full",P?.card),children:[h.jsx(OG,{className:A("p-3 pt-6 @xs:px-6",P?.verticalCard?.header),children:h.jsx(B9,{hasProduct:$,productImageUrl:o,productImageAlt:i,productStockStatus:C,propositionImageUrl:l,propositionImageAlt:c,classNames:P?.mainImage})}),h.jsxs(BT,{className:A("py-0 px-3 @xs:px-6 gap-2 overflow-hidden",P?.verticalCard?.body),children:[h.jsx(Y1,{hasProduct:$,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:$?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(Nh,{promotions:[...g,...b],urgentText:v,classNames:P?.promotionList})]}),h.jsx(Ql,{className:A("mt-3",P?.verticalCard?.divider)}),h.jsxs(MG,{className:A("flex-col justify-between items-start text-start p-3 @xs:p-6 @xs:pt-3",P?.verticalCard?.footer),children:[h.jsx("div",{className:"w-full",children:h.jsx(z9,{monthlyFeePromotionText:y,productPrice:S,monthlyFee:f,tcoPerMonth:m,onInfoClick:t,classNames:P?.pricing})}),h.jsx(hr,{className:A("font-medium gap-1 mt-4 rounded-full",r&&"pointer-events-none",P?.button),color:"secondary",size:"lg",fullWidth:!0,disabled:r,onPress:r?void 0:e,endContent:k?h.jsx(wa,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function Hse({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(L9,{label:e,classNames:r?.label}),h.jsx(R9,{classNames:r,...t})]}):h.jsx(R9,{classNames:r,...t})}function Qa({horizontal:e,...t}){return e?h.jsx(Use,{...t}):h.jsx(Hse,{...t})}function J1(e,t){if(!t)return e;const r=Math.floor(parseFloat(t));return Number.isNaN(r)||r<=20?e:[...e,`€ ${r},- ${Ee.t("propositionCard.deviceDiscount")}`]}function ta(e,t=500,r=7){if(!e)return!1;const n=new Date(new Date().toISOString().split("T")[0]),o=new Date(n.getTime()+r*24*60*60*1e3);return e.weight>t&&new Date(e.validUntil)>=n&&new Date(e.validUntil)<o}function W9(e){return e.sort((t,r)=>{if(ta(t)&&ta(r)){const n=new Date(t.validUntil),o=new Date(r.validUntil);return n.getTime()===o.getTime()?r.weight-t.weight:n.getTime()-o.getTime()}return ta(t)&&!ta(r)?-1:ta(r)&&!ta(t)?1:r.weight-t.weight})}function el(e){const t=W9(e.specialPromotions.filter(l=>l.shortDescription&&!l.shortDescription.includes("toestelkorting")&&l.weight>200)),r=ta(t[0])?t[0]?.shortDescription:null,n=r?t.slice(1):t,o=r?[r]:[],i=n.map(l=>l.shortDescription).filter(l=>!!l),s=e.bundles.flatMap(l=>l.usps);if(e.productType!=="fixed")return[...o,...s,...i];const a=e.bundles.filter(l=>l.contentTypes?.includes("tv")||l.contentTypes?.includes("phone")).map(l=>l.displayName).filter(l=>!!l);return[...o,...a,...s,...i]}function ra(e){const t=e.filter(n=>ta(n));if(t.length===0)return;const r=Math.min(...t.map(n=>{const o=new Date,i=new Date(n.validUntil);return Math.ceil((i.getTime()-o.getTime())/(1440*60*1e3))}))+1;return Ee.t("propositionCard.urgentText",{days:r,count:r})}function qse(e,t,r,n){const{currentProviderSlug:o,currentFixedProviderScope:i,currentMobileProviders:s,customerSegment:a}=t,l=new URLSearchParams;if(a&&l.set("segment",a),o&&l.set("huidige-provider",o),i||s&&s.length>0){const f=[i?`${i}:1`:void 0,...s?s.map(m=>`${m.scope}:${m.value}`):[]].filter(Boolean).join(",");l.set("klantvoordeel",f)}r&&l.set("ppt",r);const c=e.startsWith("/")?e:`/${e}`,d=n?n(l).toString():l.toString();return d?`https://www.mobiel.nl${c}?${d}`:`https://www.mobiel.nl${c}`}function Qc({addClickoutSearchParams:e}){const{profile:t}=sn();async function r(n,o){const i=await Aie();return qse(n,t,i,s=>(o?.(s),e?e(s):s))}return{buildClickOutUrl:r}}function Dh({isReachingEnd:e,loadMore:t,isValidating:r,className:n}){const{t:o}=Je();return e?null:h.jsx(hr,{className:A("font-medium mx-auto text-primary-600 border-primary-600 min-w-[234px] rounded-full",n),onPress:t,color:"primary",variant:"flat",size:"md",disableAnimation:!0,disableRipple:!0,isLoading:r,disabled:r,endContent:!r&&h.jsx(ML,{size:20}),children:o(r?"productResults.loadMore":"productResults.showMoreOffers")})}function Gse({size:e,height:t,width:r,className:n,style:o,...i}){return h.jsxs("svg",{fill:"none",width:e||r||106,height:e||t||106,viewBox:"0 0 106 106",xmlns:"http://www.w3.org/2000/svg",className:n,style:o,...i,children:[h.jsx("title",{children:"Search Loading Icon"}),h.jsx("path",{d:"M87.9225 102.652C90.5856 105.824 95.3164 106.237 98.4889 103.574C101.662 100.911 102.075 96.1805 99.4115 93.0079L87.9225 102.652ZM99.4115 93.0079L79.2493 68.9884L67.7604 78.6323L87.9225 102.652L99.4115 93.0079Z",fill:"#1A2B8F"}),h.jsx("circle",{cx:"51",cy:"47",r:"27",stroke:"#1A2B8F",strokeWidth:4}),h.jsx("circle",{cx:"51",cy:"47",r:"32",stroke:"white",strokeWidth:6}),h.jsx("circle",{cx:"51",cy:"47",r:"37.5",stroke:"#1A2B8F",strokeWidth:5}),h.jsx("circle",{cx:"51",cy:"47",r:"43.5",stroke:"white",strokeWidth:7})]})}function Zse({address:e}){const{t}=Je(),{results:{postcodeCheckLoading:r}={}}=vt();return h.jsxs("div",{className:A("flex flex-row items-center justify-center md:gap-6 rounded-large bg-white p-4 shadow-md mb-4",r?.base),children:[h.jsx(Gse,{className:A("animate-pulse shrink-0 size-20 md:size-[106px]",r?.icon)}),h.jsxs("div",{className:A("max-w-[215px] text-center flex flex-col items-center gap-2",r?.textWrapper),children:[h.jsx("div",{className:A("text-base md:text-xl font-bold leading-none text-foreground",r?.heading),children:t("postcodeCheck.loading")}),h.jsxs("div",{className:A("text-xs md:text-sm text-foreground leading-none",r?.addressText),children:[e.street," ",Zie(e.number,e.numberAddon),", ",e.city]})]})]})}function Mh(){const{t:e}=Je(),{results:{resultsNotFound:t}={}}=vt();return h.jsxs("div",{children:[h.jsx("div",{className:A("text-base font-bold text-foreground mb-1 lg:hidden",t?.filterChips?.title),children:e("filters.chosenFilters")}),h.jsx(M6,{className:"mb-6 lg:hidden"}),h.jsx(uu,{color:"warning",variant:"faded",title:e("productResults.noResultsTitle"),description:e("productResults.noResultsDescription"),hideIconWrapper:!0,classNames:{base:A(t?.alert?.base),title:A(t?.alert?.title),description:A(t?.alert?.description),mainWrapper:A(t?.alert?.mainWrapper),closeButton:A(t?.alert?.closeButton),iconWrapper:A(t?.alert?.iconWrapper),alertIcon:A(t?.alert?.alertIcon)}})]})}function tl({count:e,horizontal:t,large:r}){const{results:{skeletonCard:n}={}}=vt();return h.jsx(h.Fragment,{children:Array.from({length:e}).map((o,i)=>h.jsx(Tr,{className:A("shadow-small rounded-large",r?"h-140":"h-100",t&&(r?"h-54":"h-46"),n)},i))})}const Yse=void 0,X1=Object,U9=e=>e===Yse,Jse=e=>typeof e=="function",Oh=new WeakMap,Xse=e=>X1.prototype.toString.call(e),Q1=(e,t)=>e===`[object ${t}]`;let Qse=0;const ew=e=>{const t=typeof e,r=Xse(e),n=Q1(r,"Date"),o=Q1(r,"RegExp"),i=Q1(r,"Object");let s,a;if(X1(e)===e&&!n&&!o){if(s=Oh.get(e),s)return s;if(s=++Qse+"~",Oh.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=ew(e[a])+",";Oh.set(e,s)}if(i){s="#";const l=X1.keys(e).sort();for(;!U9(a=l.pop());)U9(e[a])||(s+=a+":"+ew(e[a])+",");Oh.set(e,s)}}else s=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},eae=e=>{if(Jse(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ew(e):"",[e,t]},tae=e=>eae(e?e(0,null):null)[0],tw=Promise.resolve(),jh=IE(xp,e=>(t,r,n)=>{const o=x.useRef(!1),{cache:i,initialSize:s=1,revalidateAll:a=!1,persistSize:l=!1,revalidateFirstPage:c=!0,revalidateOnMount:d=!1,parallel:f=!1}=n,[,,,m]=pi.get(Mv);let g;try{g=tae(t),g&&(g=AE+g)}catch{}const[b,y,v]=js(i,g),C=x.useCallback(()=>mt(b()._l)?s:b()._l,[i,g,s]);qd.useSyncExternalStore(x.useCallback(N=>g?v(g,()=>{N()}):()=>{},[i,g]),C,C);const S=x.useCallback(()=>{const N=b()._l;return mt(N)?s:N},[g,s]),k=x.useRef(S());vp(()=>{if(!o.current){o.current=!0;return}g&&y({_l:l?k.current:S()})},[g,i]);const P=d&&!o.current,E=e(g,async N=>{const D=b()._i,M=b()._r;y({_r:Gr});const V=[],R=S(),[K]=js(i,N),j=K().data,B=[];let U=null;for(let W=0;W<R;++W){const[L,Z]=Cc(t(W,f?null:U));if(!L)break;const[T,F]=js(i,L);let _=T().data;const H=a||D||mt(_)||c&&!W&&!mt(j)||P||j&&!mt(j[W])&&!n.compare(j[W],_);if(r&&(typeof M=="function"?M(_,Z):H)){const Y=async()=>{if(!(L in m))_=await r(Z);else{const oe=m[L];delete m[L],_=await oe}F({data:_,_k:Z}),V[W]=_};f?B.push(Y):await Y()}else V[W]=_;f||(U=_)}return f&&await Promise.all(B.map(W=>W())),y({_i:Gr}),V},n),$=x.useCallback(function(N,D){const M=typeof D=="boolean"?{revalidate:D}:D||{},V=M.revalidate!==!1;return g?(V&&(mt(N)?y({_i:!0,_r:M.revalidate}):y({_i:!1,_r:M.revalidate})),arguments.length?E.mutate(N,{...M,revalidate:V}):E.mutate()):tw},[g,i]),O=x.useCallback(N=>{if(!g)return tw;const[,D]=js(i,g);let M;if(Ko(N)?M=N(S()):typeof N=="number"&&(M=N),typeof M!="number")return tw;D({_l:M}),k.current=M;const V=[],[R]=js(i,g);let K=null;for(let j=0;j<M;++j){const[B]=Cc(t(j,K)),[U]=js(i,B),W=B?U().data:Gr;if(mt(W))return $(R().data);V.push(W),K=W}return $(V)},[g,i,$,S]);return{size:S(),setSize:O,mutate:$,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}});function Lh(e,t,r,n,o,i,s){if(i&&!i.search?.records?.length)return null;const a=o*n,l={...t,limit:n,offset:a};return[e,{query:l,modificationBlocks:r,...s}]}function rae({query:e,modificationBlocks:t,address:r,pageSize:n}){function o(i,s){return Lh(sQ,e,t,n,i,s,r?{postcode:r.postcode,number:parseInt(r.number),numberAddon:r.numberAddon}:void 0)}return jh(o,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function nae({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return Lh(aQ,e,t,r,o,i)}return jh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function oae({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return Lh(lQ,e,t,r,o,i)}return jh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function iae({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return Lh(uQ,e,t,r,o,i)}return jh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Fh({filterOptions:e,activeFilters:t,limit:r,productCategory:n,profile:o,distinctProperties:i}){const s=CN(n,o),a=pQ({filterOptions:e,filterValues:t,limit:r,currentProvider:s,distinctProperties:i});switch(n){case"sim-only-proposition":{const l=bi(t,"providers");a.groupBy(Array.isArray(l)&&l.length===1?"data_and_speed":"provider");const c=nae({query:a.serialize(),modificationBlocks:Yc(n,o),pageSize:r}),{data:d=[],error:f,...m}=c;return{...m,data:d[0],dataArray:d,error:f}}case"fixed-proposition":{a.groupBy("provider_data_speed_down");const l=rae({query:a.serialize(),modificationBlocks:Yc(n,o),address:o.address,pageSize:r}),{data:c=[],error:d,...f}=l;return{...f,data:c[0],dataArray:c,error:d}}case"smartphone-proposition":{const l=bi(t,"sorteren"),c=bi(t,"providers");a.groupBy(Array.isArray(c)&&c.length===1?"data_and_speed":"provider"),l==="relevantie"&&a.sort("top");const d=oae({query:a.serialize(),modificationBlocks:Yc(n,o),pageSize:r}),{data:f=[],error:m,...g}=d;return{...g,data:f[0],dataArray:f,error:m}}case"smartphone-proposition-extended":{const l=bi(t,"sorteren");a.groupBy(l==="relevantie"?"product_provider_slug":"product_slug");const c=iae({query:a.serialize(),modificationBlocks:Yc(n,o),pageSize:r}),{data:d=[],error:f,...m}=c;return{...m,data:d[0],dataArray:d,error:f}}default:return{data:void 0,dataArray:[],isLoading:!1,isValidating:!1,error:void 0,mutate:async()=>{},size:0,setSize:()=>{}}}}function Bh({lastPageLength:e,isValidating:t,size:r,setSize:n,activeFilters:o,profile:i,limit:s}){const a=x.useRef("");x.useEffect(()=>{if(r===1)return;const d=JSON.stringify({activeFilters:o,profile:i});a.current!==d&&a.current!==""&&n(1),a.current=d},[o,i,n]);const l=e===void 0||e===0||e<s;function c(){t||n(r+1)}return{isReachingEnd:l,loadMore:c}}function sae({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=gi(),{results:d}=vt(),{profile:f}=sn(),{filterOptions:m,activeFilters:g}=vi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=Qc({addClickoutSearchParams:s}),{data:S,dataArray:k,isLoading:P,isValidating:E,size:$,setSize:O,mutate:N,error:D}=Fh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:f}),{isReachingEnd:M,loadMore:V}=Bh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:$,setSize:O,activeFilters:g,profile:f,limit:n}),R=k.flatMap(L=>L.search.records),{polling:K,validating:j}=S&&"fetchInfo"in S?S.fetchInfo:{polling:!1,validating:!1};if(x.useEffect(()=>{if(!K)return;const L=setInterval(()=>N(),1e3);return()=>clearInterval(L)},[K,N]),zo(()=>{f.address&&N()},[f.address?.postcode,f.address?.number,f.address?.numberAddon,N]),D)throw new Error(String(D));if(!K&&!E&&R.length===0)return h.jsx(Mh,{});const B=S&&"fetchInfo"in S?S.search.pageInfo.fastestDownloadSpeedProposition?.key:void 0,{top:U,all:W}=P?{top:[],all:[]}:K1({propositions:R,productCategory:e,labelColorConfig:r,fastestInternetPropositionKey:B});return h.jsxs("div",{tabIndex:(E||j)&&!K?-1:void 0,children:[K&&f.address&&h.jsx(Zse,{address:f.address}),h.jsxs("div",{className:A((E||j)&&!K&&"opacity-50 pointer-events-none"),children:[t&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.topPropositionsTitle),tabIndex:-1,children:l("productResults.topPropositionsTitle")}),h.jsx("div",{className:A("gap-4 grid grid-cols-1 mb-8",i==="vertical"&&"lg:grid-cols-3",d?.topPropositionsGrid),children:P?h.jsx(tl,{count:3,horizontal:i==="horizontal"}):U.map(L=>{if(f.currentFixedProviderScope?.includes(L.provider.slug))return null;const T=L.tags.find(F=>F.type==="internet");return h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:L}),a)return a(L.key);C(`/aanbieding/${L.key}`).then(F=>window.open(F,"_blank"))},onInfoClick:F=>{c({type:"details_viewed",proposition:L,tab:F}),v({proposition:L,tab:F}),b("details")},label:L.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(L.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(L.monthlyFees,L.baseMonthlyFee,L.lifetimeMonthlyFee),tcoPerMonth:Ve(L.tcoPerMonth,{dashed:!0}),propositionTitle:`${L.content.dataSpeedDown/1e3} ${l("format.megabitPerSecond")}`,propositionSubtitle:T?l(`fixedInternet.${T.slug}`,{defaultValue:T.label}):"",propositionImageUrl:L.provider.imageUrl,propositionImageAlt:L.provider.name,propositionSpecifications:ea(L),urgentText:ra(L.specialPromotions),specialPromotions:el(L),modificationPromotions:L.modificationPromotions},`top-${L.key}`)})})]}),t&&h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.allPropositionsTitle),tabIndex:-1,children:l("productResults.allPropositionsTitle")}),h.jsxs("div",{className:A("gap-4 grid grid-cols-1",d?.allPropositionsGrid),children:[P?h.jsx(tl,{count:n,horizontal:o==="horizontal"}):W.map(L=>{const Z=f.currentFixedProviderScope?.includes(L.provider.slug),T=L.tags.find(F=>F.type==="internet");return h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:L}),a)return a(L.key);C(`/aanbieding/${L.key}`).then(F=>window.open(F,"_blank"))},onInfoClick:F=>{c({type:"details_viewed",proposition:L,tab:F}),v({proposition:L,tab:F}),b("details")},label:Z?{displayName:`Alleen voor nieuwe ${L.provider.name}-klanten`,color:"default"}:L.label,disabled:Z,isExternalLink:!a,horizontal:o==="horizontal",monthlyFee:Ve(L.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(L.monthlyFees,L.baseMonthlyFee,L.lifetimeMonthlyFee),tcoPerMonth:Ve(L.tcoPerMonth,{dashed:!0}),propositionTitle:`${L.content.dataSpeedDown/1e3} ${l("format.megabitPerSecond")}`,propositionSubtitle:T?l(`fixedInternet.${T.slug}`,{defaultValue:T.label}):"",propositionImageUrl:L.provider.imageUrl,propositionImageAlt:L.provider.name,propositionSpecifications:ea(L),urgentText:ra(L.specialPromotions),specialPromotions:el(L),modificationPromotions:L.modificationPromotions},L.key)}),h.jsx(Dh,{isReachingEnd:M,loadMore:V,isValidating:E,className:d?.loadMoreButton})]})]}),h.jsx(Xc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function aae({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=gi(),{results:d}=vt(),{profile:f}=sn(),{filterOptions:m,activeFilters:g}=vi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=Qc({addClickoutSearchParams:s}),{dataArray:S,isLoading:k,isValidating:P,size:E,setSize:$,error:O}=Fh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:f}),{isReachingEnd:N,loadMore:D}=Bh({lastPageLength:S[S.length-1]?.search.records.length,isValidating:P,size:E,setSize:$,activeFilters:g,profile:f,limit:n});if(O)throw new Error(String(O));const M=S.flatMap(K=>K.search.records);if(!P&&M.length===0)return h.jsx(Mh,{});const{top:V,all:R}=k?{top:[],all:[]}:K1({propositions:M,productCategory:e,labelColorConfig:r});return h.jsxs("div",{className:A(P&&"opacity-50 pointer-events-none"),children:[t&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.topPropositionsTitle),tabIndex:-1,children:l("productResults.topPropositionsTitle")}),h.jsx("div",{className:A("gap-4 grid grid-cols-1 mb-8",i==="vertical"&&"lg:grid-cols-3",d?.topPropositionsGrid),children:k?h.jsx(tl,{count:3,horizontal:i==="horizontal"}):V.map(K=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:K}),a)return a(K.key);C(`/aanbieding/${K.key}`).then(j=>window.open(j,"_blank"))},onInfoClick:j=>{c({type:"details_viewed",proposition:K,tab:j}),v({proposition:K,tab:j}),b("details")},label:K.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(K.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(K.monthlyFees,K.baseMonthlyFee,K.lifetimeMonthlyFee),tcoPerMonth:Ve(K.tcoPerMonth,{dashed:!0}),propositionTitle:Kn(K.content.data,l("format.gigabyte")),propositionSubtitle:bu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:ea(K),urgentText:ra(K.specialPromotions),specialPromotions:el(K),modificationPromotions:K.modificationPromotions},`top-${K.key}`))})]}),t&&h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.allPropositionsTitle),tabIndex:-1,children:l("productResults.allPropositionsTitle")}),h.jsxs("div",{className:A("gap-4 grid grid-cols-1",d?.allPropositionsGrid),children:[k?h.jsx(tl,{count:n,horizontal:o==="horizontal"}):R.map(K=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:K}),a)return a(K.key);C(`/aanbieding/${K.key}`).then(j=>window.open(j,"_blank"))},onInfoClick:j=>{c({type:"details_viewed",proposition:K,tab:j}),v({proposition:K,tab:j}),b("details")},label:K.label,isExternalLink:!a,horizontal:o==="horizontal",monthlyFee:Ve(K.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(K.monthlyFees,K.baseMonthlyFee,K.lifetimeMonthlyFee),tcoPerMonth:Ve(K.tcoPerMonth,{dashed:!0}),propositionTitle:Kn(K.content.data,l("format.gigabyte")),propositionSubtitle:bu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:ea(K),urgentText:ra(K.specialPromotions),specialPromotions:el(K),modificationPromotions:K.modificationPromotions},K.key)),h.jsx(Dh,{isReachingEnd:N,loadMore:D,isValidating:P,className:d?.loadMoreButton})]}),h.jsx(Xc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function H9({propositions:e}){const{t}=Je(),{results:{creditInfo:r}={}}=vt(),{openModal:n}=Qt();return e.length===0?null:h.jsxs("div",{className:A("mt-4",r?.base),children:[h.jsx("div",{className:A("text-sm font-medium mb-2 text-foreground-500",r?.title),children:t("creditInfo.exampleTitle")}),h.jsx(p0,{orientation:"horizontal",hideScrollBar:!0,children:h.jsxs(Ah,{"aria-label":t("creditInfo.exampleTitle"),removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:{base:A(r?.table?.base),wrapper:A(r?.table?.wrapper),table:A(r?.table?.table),thead:A(r?.table?.thead),tbody:A(r?.table?.tbody),tr:A(r?.table?.tr),th:A("first:pl-0 h-auto text-xs font-normal whitespace-break-spaces bg-transparent",r?.table?.th),td:A("first:pl-0 py-0 text-xs font-medium text-foreground-500 first:whitespace-nowrap",r?.table?.td)},children:[h.jsxs(_h,{children:[h.jsx(_n,{children:t("creditInfo.offer")}),h.jsx(_n,{children:t("creditInfo.totalDeviceCost")}),h.jsx(_n,{children:t("creditInfo.oneTimeFee")}),h.jsx(_n,{children:t("creditInfo.totalCreditAmount")}),h.jsx(_n,{children:t("creditInfo.monthlyPayment")}),h.jsx(_n,{children:t("creditInfo.contractTerm")}),h.jsx(_n,{children:t("creditInfo.fixedInterest")})]}),h.jsx(Ih,{children:e.map(o=>h.jsxs($h,{children:[h.jsxs($n,{children:[o.productVersion?.product.fullName," + ",o.provider.name]}),h.jsx($n,{children:Ve(o.price+o.creditFee,{symbol:"€"})}),h.jsx($n,{children:Ve(o.price,{symbol:"€"})}),h.jsx($n,{children:Ve(o.creditFee,{symbol:"€"})}),h.jsx($n,{children:Ve(o.handsetCreditMonthlyFee||0,{symbol:"€"})}),h.jsxs($n,{children:[o.planVariant.contractTerm," ",t("format.month",{count:o.planVariant.contractTerm})]}),h.jsx($n,{children:"0%"})]},o.key))})]})}),h.jsx("p",{className:A("mt-2 text-xs text-foreground-500",r?.description),children:h.jsx(O4,{i18nKey:"creditInfo.generalDescription",components:[h.jsx("button",{type:"button",onClick:()=>n("content-/vragen-en-contact/bestellen-betalen/wat-is-de-wet-financieel-toezicht/wet-financieel-toezicht"),className:A("text-primary-600 hover:underline cursor-pointer",r?.descriptionLink)},"credit-info-general-description-link")]})})]})}function lae({showTopPropositions:e,labelColorConfig:t,limit:r,propositionCardLayout:n,productCategory:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=gi(),{results:d}=vt(),{profile:f}=sn(),{filterOptions:m,activeFilters:g,distinctProperties:b}=vi(),{openModal:y}=Qt(),[v,C]=x.useState(null),{buildClickOutUrl:S}=Qc({addClickoutSearchParams:s}),{dataArray:k,isLoading:P,isValidating:E,size:$,setSize:O,error:N}=Fh({filterOptions:m,activeFilters:g,limit:r,productCategory:o,profile:f,distinctProperties:b}),{isReachingEnd:D,loadMore:M}=Bh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:$,setSize:O,activeFilters:g,profile:f,limit:r});if(N)throw new Error(String(N));const V=k.flatMap(j=>j.search.records);if(!E&&V.length===0)return h.jsx(Mh,{});const{top:R,all:K}=P?{top:[],all:[]}:K1({propositions:V,productCategory:o,labelColorConfig:t});return h.jsxs("div",{className:A(E&&"opacity-50 pointer-events-none"),children:[e&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.topPropositionsTitle),tabIndex:-1,children:l("productResults.topPropositionsTitle")}),h.jsx("div",{className:A("gap-4 grid grid-cols-1 mb-8",i==="vertical"&&"lg:grid-cols-3",d?.topPropositionsGrid),children:P?h.jsx(tl,{count:3,horizontal:i==="horizontal"}):R.map(j=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:j}),a)return a(j.key);S(`/aanbieding/${j.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:j,tab:B}),C({proposition:j,tab:B}),y("details")},label:j.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(j.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(j.monthlyFees,j.baseMonthlyFee,j.lifetimeMonthlyFee),tcoPerMonth:Ve(j.tcoPerMonth,{dashed:!0}),productPrice:Ve(j.price,{dashed:!0}),propositionTitle:Kn(j.content.data,l("format.gigabyte")),propositionSubtitle:bu(j.content),propositionImageUrl:j.provider.imageUrl,propositionImageAlt:j.provider.name,propositionSpecifications:ea(j),urgentText:ra(j.specialPromotions),specialPromotions:J1(el(j),F1(j)),modificationPromotions:j.modificationPromotions},`top-${j.key}`))})]}),e&&h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.allPropositionsTitle),tabIndex:-1,children:l("productResults.allPropositionsTitle")}),h.jsxs("div",{className:A("gap-4 grid grid-cols-1",d?.allPropositionsGrid),children:[P?h.jsx(tl,{count:r,horizontal:n==="horizontal"}):K.map(j=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:j}),a)return a(j.key);S(`/aanbieding/${j.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:j,tab:B}),C({proposition:j,tab:B}),y("details")},label:j.label,isExternalLink:!a,horizontal:n==="horizontal",monthlyFee:Ve(j.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(j.monthlyFees,j.baseMonthlyFee,j.lifetimeMonthlyFee),tcoPerMonth:Ve(j.tcoPerMonth,{dashed:!0}),productPrice:Ve(j.price,{dashed:!0}),propositionTitle:Kn(j.content.data,l("format.gigabyte")),propositionSubtitle:bu(j.content),propositionImageUrl:j.provider.imageUrl,propositionImageAlt:j.provider.name,propositionSpecifications:ea(j),urgentText:ra(j.specialPromotions),specialPromotions:J1(el(j),F1(j)),modificationPromotions:j.modificationPromotions},j.key)),h.jsx(Dh,{isReachingEnd:D,loadMore:M,isValidating:E,className:d?.loadMoreButton}),h.jsx(H9,{propositions:V.slice(0,3)})]}),h.jsx(Xc,{proposition:v?.proposition,defaultTab:v?.tab,buildClickOutUrl:S})]})}function uae({productCategory:e,limit:t,propositionCardLayout:r,addClickoutSearchParams:n,onDealSelected:o}){const{t:i}=Je(),{onAction:s}=gi(),{results:a}=vt(),{profile:l}=sn(),{filterOptions:c,activeFilters:d}=vi(),{openModal:f}=Qt(),[m,g]=x.useState(null),{buildClickOutUrl:b}=Qc({addClickoutSearchParams:n}),{dataArray:y,isLoading:v,isValidating:C,size:S,setSize:k,error:P}=Fh({filterOptions:c,activeFilters:d,limit:t,productCategory:e,profile:l}),{isReachingEnd:E,loadMore:$}=Bh({lastPageLength:y[y.length-1]?.search.records.length,isValidating:C,size:S,setSize:k,activeFilters:d,profile:l,limit:t});if(P)throw new Error(String(P));const O=y.flatMap(N=>N.search.records);return!C&&O.length===0?h.jsx(Mh,{}):h.jsxs("div",{className:A("gap-4 grid grid-cols-1",r==="vertical"&&"lg:grid-cols-3",C&&"opacity-50 pointer-events-none",a?.allPropositionsGrid),children:[v?h.jsx(tl,{count:t,horizontal:r==="horizontal",large:!0}):O.map(N=>h.jsx(Qa,{onClick:()=>{if(s({type:"deal_selected",proposition:N}),o)return o(N.key);b(`/aanbieding/${N.key}`).then(D=>window.open(D,"_blank"))},onInfoClick:D=>{s({type:"details_viewed",proposition:N,tab:D}),g({proposition:N,tab:D}),f("details")},isExternalLink:!o,horizontal:r==="horizontal",monthlyFee:Ve(N.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(N.monthlyFees,N.baseMonthlyFee,N.lifetimeMonthlyFee),tcoPerMonth:Ve(N.tcoPerMonth,{dashed:!0}),productPrice:Ve(N.price,{dashed:!0}),productImageAlt:N.productVersion?.media.main?.altText||void 0,productImageUrl:N.productVersion?.media.main?.url||void 0,productStockStatus:N.productVersion?.stock.status,productTitle:`${N.productVersion?.product.brand.name} ${N.productVersion?.product.name}`,propositionTitle:Kn(N.content.data,i("format.gigabyte")),propositionSubtitle:bu(N.content),propositionImageUrl:N.provider.imageUrl,propositionImageAlt:N.provider.name,propositionSpecifications:ea(N),urgentText:ra(N.specialPromotions),specialPromotions:J1(el(N),F1(N)),modificationPromotions:N.modificationPromotions},N.key)),h.jsxs("div",{className:"flex flex-col gap-2 col-span-full mt-4",children:[h.jsx(Dh,{isReachingEnd:E,loadMore:$,isValidating:C,className:a?.loadMoreButton}),h.jsx(H9,{propositions:O.slice(0,3)})]}),h.jsx(Xc,{proposition:m?.proposition,defaultTab:m?.tab,buildClickOutUrl:b})]})}function cae({...e}){const{width:t}=xa(),{getActiveFilterValue:r}=vi(),n=t<768,o=t>=1024;switch(e.productCategory){case"fixed-proposition":return h.jsx(sae,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"smartphone-proposition":return r("telefoons").length===0?h.jsx(uae,{...e,productCategory:"smartphone-proposition-extended",propositionCardLayout:n||o?"vertical":"horizontal"}):h.jsx(lae,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"sim-only-proposition":return h.jsx(aae,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});default:return null}}function dae({productCategory:e,labelColorConfig:t={},limit:r=12,showTopPropositions:n=!1,addClickoutSearchParams:o,showProfileBanner:i,onDealSelected:s}){const{base:a,headerWrapper:l}=vt(),{distinctProperties:c,setDistinctProperties:d,handleFilterChange:f,handleFilterRemove:m,getActiveFilterValue:g}=vi(),{profile:b}=sn(),{width:y}=xa(),v=y>=1024,[C]=e==="smartphone-proposition"?g("telefoons"):[],[S]=g("sorteren"),k=(()=>{if(typeof n=="boolean")return n;const{requireNumberPreservation:E,requireCustomerBenefits:$}=n;return(!E||!!b.currentProviderSlug)&&(!$||!!b.currentFixedProviderScope)})(),P=e==="fixed-proposition";return h.jsxs("div",{className:A("grid grid-cols-1 lg:grid-cols-4 gap-4 lg:gap-x-6 w-full",a),children:[h.jsxs("div",{className:"flex flex-col gap-4 empty:hidden",children:[e==="smartphone-proposition"&&h.jsx(JY,{productSlug:C,selectedDistinctProperties:c,onChange:(E,$)=>{if(!E&&C){m({slug:"telefoons",value:C}),d([]),S!=="relevantie"&&f({slug:"sorteren",value:"relevantie"});return}E&&(!C||E!==C)&&f({slug:"telefoons",value:E}),!C&&S!=="relevantie"&&f({slug:"sorteren",value:"relevantie"}),d($)}}),v&&h.jsxs(h.Fragment,{children:[h.jsx(LN,{isFixed:P}),h.jsx(J6,{})]})]}),h.jsxs("div",{className:"@container col-span-1 lg:col-span-3 space-y-4",children:[h.jsxs("div",{className:A("flex flex-row-reverse justify-between items-center gap-2",l),children:[h.jsx(Gie,{}),v?h.jsx(M6,{}):h.jsx(gQ,{children:h.jsx(LN,{isFixed:P})})]}),i&&h.jsxs("div",{className:"flex flex-col gap-3 w-full @4xl:flex-row empty:hidden",children:[h.jsx(gu,{variant:"numberPreservation",isFixed:P}),h.jsx(gu,{variant:"postcodeCheck",isFixed:P}),h.jsx(gu,{variant:"combiDeal",isFixed:P})]}),h.jsx(cae,{productCategory:e,addClickoutSearchParams:o,onDealSelected:s,showTopPropositions:g("providers").length!==1&&["relevantie","top"].includes(S)&&k,labelColorConfig:t,limit:r})]}),P?h.jsx(Uie,{}):h.jsx(MN,{}),h.jsx(NN,{isFixed:P}),h.jsx(g6,{})]})}function fae({classNames:e,initialSelectedFilters:t,initialProfile:r,onProfileChange:n,onError:o,onAction:i,...s}){return h.jsxs(y6,{onError:o,children:[h.jsx(nE,{classNames:e,children:h.jsx(w6,{onAction:i,children:h.jsx($N,{initialProfile:r,onProfileChange:n,children:h.jsx(tQ,{initialSelectedFilters:t,productCategory:s.productCategory,children:h.jsx(iE,{children:h.jsx(dae,{...s})})})})})}),h.jsx(Bie,{})]})}function pae(e,t){let{elementType:r="a",onPress:n,onPressStart:o,onPressEnd:i,onClick:s,isDisabled:a,...l}=e,c={};r!=="a"&&(c={role:"link",tabIndex:a?void 0:0});let{focusableProps:d}=Bi(e,t),{pressProps:f,isPressed:m}=xn({onClick:s,onPress:n,onPressStart:o,onPressEnd:i,isDisabled:a,ref:t}),g=Ln(l,{labelable:!0,isLink:r==="a"}),b=it(d,f),y=Xu(),v=vg(e);return{isPressed:m,linkProps:it(g,v,{...b,...c,"aria-disabled":a||void 0,"aria-current":e["aria-current"],onClick:C=>{var S;(S=f.onClick)==null||S.call(f,C),VF(C,y,e.href,e.routerOptions)}})}}function hae(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,KC.variantKeys),{ref:l,as:c,children:d,anchorIcon:f,isExternal:m=!1,showAnchorIcon:g=!1,autoFocus:b=!1,className:y,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,...P}=s,E=c||"a",$=ot(l),O=(r=(t=e?.disableAnimation)!=null?t:i?.disableAnimation)!=null?r:!1,{linkProps:N}=pae({...P,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,isDisabled:e.isDisabled,elementType:`${c}`},$),{isFocused:D,isFocusVisible:M,focusProps:V}=Ir({autoFocus:b});m&&(P.rel=(n=P.rel)!=null?n:"noopener noreferrer",P.target=(o=P.target)!=null?o:"_blank");const R=x.useMemo(()=>KC({...a,disableAnimation:O,className:y}),[jr(a),O,y]),K=x.useCallback(()=>({ref:$,className:R,"data-focus":ae(D),"data-disabled":ae(e.isDisabled),"data-focus-visible":ae(M),...Oe(V,N,P,{href:N.href})}),[R,D,M,V,N,P]);return{Component:E,children:d,anchorIcon:f,showAnchorIcon:g,getLinkProps:K}}var q9=Xe((e,t)=>{const{Component:r,children:n,showAnchorIcon:o,anchorIcon:i=h.jsx(NU,{className:Y8}),getLinkProps:s}=hae({ref:t,...e});return h.jsx(r,{...s(),children:h.jsxs(h.Fragment,{children:[n,o&&i]})})});q9.displayName="HeroUI.Link";var zh=q9;function mae({monthlyFeePromotionText:e,monthlyFee:t,productPrice:r,classNames:n}){const{t:o}=Je();return h.jsxs("div",{className:A("flex flex-col",n?.wrapper),children:[e&&h.jsx("div",{className:A("text-xs text-foreground whitespace-nowrap",n?.promotionText),children:e}),h.jsxs("div",{className:A("text-base font-bold text-foreground",n?.monthlyFeeValue),children:[o("format.monthly"),": ",h.jsx("span",{children:t})]}),r&&h.jsxs("div",{className:A("text-base text-foreground",n?.oneTimeFee),children:[o("format.oneTime"),": ",h.jsx("span",{children:r})]})]})}function gae({triggerRef:e,monthlyFeePromotionText:t,productPrice:r,monthlyFee:n,isDisabled:o,onClick:i}){const{stickySummary:s}=vt(),[a,l]=x.useState(!1);return x.useEffect(()=>{if(!e?.current)return;const c=e.current,d=new IntersectionObserver(([f])=>l(!f.isIntersecting),{threshold:0});return d.observe(c),()=>d.disconnect()},[e]),h.jsxs("div",{className:A("fixed bottom-4 left-4 right-4 z-50 p-4 bg-background shadow-small rounded-large flex justify-between items-center","lg:hidden",s?.container,a?"animate-appearance-in animate":"animate-appearance-out"),children:[h.jsx(mae,{monthlyFeePromotionText:t,productPrice:r,monthlyFee:n,classNames:s?.pricing}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full",s?.button),color:"secondary",size:"lg",endContent:h.jsx(wa,{size:16}),disableAnimation:!0,disableRipple:!0,onPress:i,isDisabled:o,children:"Bestellen"})]})}var rw,G9;function bae(){if(G9)return rw;G9=1;var e=p$();function t(r){return r&&r.length?e(r):[]}return rw=t,rw}var vae=bae();const yae=ju(vae),Z9="|",xae=/plv-\d+/g,wae=/pvu?-\d+/g,Cae=/pvu?-(\d+)/,Sae=/^\d+-\d+/g,kae=/hc\d{1,2}-\d{1,2}(_\d{1,2})?/g,Pae=/^(\d+)-\d+/,Eae=/m\d+-\d+/g,Tae=/m(\d+)-\d+/;function ed(e){return yae(e.filter(Boolean)).sort().join(Z9)}function Y9(e){return e.split(Z9)}function Kh(e,t){if(t===0)return[[]];if(!t)return Kh(e,e.length);const[r,...n]=e;return[...Kh(n,t-1).map(o=>[r,...o]),...Kh(n,t-1)]}function Aae(e){return Kh(Y9(e)).map(ed)}function J9(e){return decodeURI(e).replace(/:/gi,"|").replace(/%3A/gi,"|").replace(/%7C/gi,"|")}const _ae={planVariant:xae,phoneVariant:wae,bundleSet:Sae,handsetCredit:kae,modification:Eae};function pn(e){const t=_ae[e];return r=>r.match(t)!==null}const $ae={bundleTypeSet:Pae,modificationGroup:Tae,productVersionId:Cae};function na(e){const t=$ae[e];return r=>(r.match(t)||["",""])[1]}class rl{unitKeys=[];constructor(t){this.update(t)}update(t){this.unitKeys=Y9(J9(t))}setPlanVariant(t){this.unitKeys=[...this.unitKeys.filter(r=>!pn("planVariant")(r)),t]}setPhoneVariant(t){this.unitKeys=[...this.unitKeys.filter(r=>!pn("phoneVariant")(r)),t]}setHandsetCredit(t){this.unitKeys=[...this.unitKeys.filter(r=>!pn("handsetCredit")(r)),t]}setBundleSets(t){this.unitKeys=[...this.unitKeys,...t]}setBundleSetsByBundleTypeSet(t,r){this.unitKeys=[...this.unitKeys.filter(n=>!(pn("bundleSet")(n)&&na("bundleTypeSet")(n)===t)),...r]}toggleBundleSet(t,r){const n=this.unitKeys.includes(t),o=this.unitKeys.filter(i=>na("bundleTypeSet")(i)===na("bundleTypeSet")(t));n&&r.required&&o.length===1||(this.unitKeys=[...this.unitKeys.filter(i=>r.multiSelect?i!==t:!o.includes(i)),...n?[]:[t]])}planVariant(){return this.unitKeys.find(pn("planVariant"))}phoneVariant(){return this.unitKeys.find(pn("phoneVariant"))}productVersionId(){const t=this.unitKeys.find(pn("phoneVariant"));return t&&na("productVersionId")(t)}modification(){return this.unitKeys.find(pn("modification"))}modifications(){return this.unitKeys.filter(pn("modification"))}modificationGroups(){return this.unitKeys.filter(pn("modification")).map(na("modificationGroup"))}handsetCredit(){return this.unitKeys.find(pn("handsetCredit"))}bundleSets(){return this.unitKeys.filter(pn("bundleSet"))}bundleTypeSets(){return this.unitKeys.filter(pn("bundleSet")).map(na("bundleTypeSet"))}key(){return ed(this.unitKeys)}urlKey(){return this.unitKeys.join(":")}scope(){return ed(this.unitKeys.filter(t=>pn("planVariant")(t)||pn("phoneVariant")(t)))}base(){return ed(this.unitKeys.filter(t=>!pn("handsetCredit")(t)))}combinations(){return Aae(this.key())}}function Iae(e,t){const[r,n]=e.split("-"),o=parseInt(r.replace("hc","")),i=parseFloat(n.replace("_",".")),s=o*i,a=t-s;return{unitKey:e,price:a,monthlyFee:i,creditFee:s,contractTerm:o}}const X9=x.createContext({isLoading:!1,error:void 0,notFound:!1,propositionKey:new rl(""),proposition:null,propositionSelector:null,setProductVersion:e=>{},setPlanVariant:e=>{},setHandsetCredit:e=>{},toggleBundleSet:e=>{}}),Nae=dt`
|
|
1341
|
+
`;function jN(e,t,r,n="",o=!1){const[i,s]=x.useState(o),a=gp(t,500),l=gp(r,500),c=gp(n,500),{data:d,isValidating:f,error:m}=xp(a&&l?[Wie,{postcode:a,number:parseInt(l,10),numberAddon:c||""}]:null,nn,{revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1}),[g,b]=x.useState(null),y=x.useRef(e);return x.useEffect(()=>{y.current=e},[e]),x.useEffect(()=>{f||b(null)},[f]),zo(()=>{if(!(f||!a||!l)){if(m?.response?.errors?.length){if(m.response.errors[0]?.message==="postnl_api_error"){b(Ee.t("postcodeCheck.invalidAddressError"));return}b(Ee.t("postcodeCheck.invalidAddressError"));return}if(d?.postcode?.address){y.current(d.postcode.address),s(!1),b(null);return}!f&&a&&l&&!m&&!d?.postcode?.address&&b(Ee.t("postcodeCheck.invalidAddressError"))}},[d,m,f,a,l]),{manual:i,isLoading:f&&!!a&&!!l,error:g}}function Uie(){const{t:e}=Je(),{postcodeCheckModal:t}=vt(),{profile:r,setProfile:n}=sn(),{popoverProps:o,isShadowRoot:i}=Zn(),[s]=Fn(),{isModalOpen:a,openModal:l,closeModal:c}=Qt(),[d,f]=x.useState(r.address?.postcode||""),[m,g]=x.useState(r.address?.number||""),[b,y]=x.useState(r.address?.numberAddon||""),[v,C]=x.useState(r.address?.street||""),[S,k]=x.useState(r.address?.city||""),[P,E]=x.useState(!1),$=x.useRef(!!(r.address?.street&&r.address?.city)),O=kh("fixed"),{width:N}=xa(),D=N>=1024,M=x.useCallback(L=>{L.street!==void 0&&C(L.street),L.city!==void 0&&k(L.city)},[]);zo(()=>{const L=r.address;f(L?.postcode||""),g(L?.number||""),y(L?.numberAddon||""),C(L?.street||""),k(L?.city||""),$.current=!!(L?.street&&L?.city)},[r.address]);const{manual:V,error:R}=jN(M,d,m,b,$.current);zo(()=>{!V&&(!d||!m)&&(C(""),k(""))},[d,m,V]);const K=x.useMemo(()=>IN(O.fixedBlocks,"fixed"),[O.fixedBlocks.length]),j={inputWrapper:A("border-small",t?.form?.input?.inputWrapper),input:A("absolute bottom-1.5",t?.form?.input?.input),label:A("top-1.5",t?.form?.input?.label)},B=x.useCallback(L=>{L.preventDefault();const Z=new FormData(L.target),T={...Object.fromEntries(Z.entries()),street:v,city:S},{success:F,data:_}=j1.safeParse(T);F&&(Zc({address:_}),n({address:_}),c("postcode-check"))},[v,S,n,c]),U=x.useCallback(({slug:L,name:Z})=>L.startsWith("other")||Z.toLowerCase().includes("internet")?Z:`${Z} Internet`,[]);function W(){i&&!D&&setTimeout(()=>window.scrollTo(0,0),150)}return h.jsx(fi,{isOpen:a("postcode-check"),onOpenChange:L=>L?l("postcode-check"):c("postcode-check"),placement:"bottom-center",size:"lg",scrollBehavior:"inside",shouldBlockScroll:!i,portalContainer:o.portalContainer,classNames:{backdrop:A(t?.modal?.backdrop),wrapper:A(t?.modal?.wrapper),base:A("m-0 max-h-[90vh]",t?.modal?.base),header:A(t?.modal?.header),body:A("pt-0",t?.modal?.body),footer:A(t?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",t?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e("postcodeCheck.title")}),h.jsxs(ai,{children:[h.jsxs("div",{className:A("flex flex-col items-center justify-center",t?.header?.container),children:[h.jsx("div",{className:A("rounded-full bg-primary-100 p-4 w-fit",t?.header?.iconWrapper),children:h.jsx(dg,{size:48,className:A("stroke-primary",t?.header?.icon)})}),h.jsx("div",{className:A("text-xl font-bold mt-2 text-foreground",t?.header?.title),children:e("postcodeCheck.title")}),h.jsx("p",{className:A("text-sm text-center text-foreground-500",t?.header?.description),children:e("postcodeCheck.description")})]}),h.jsxs("form",{id:"postcode-check-form",className:A("flex flex-col gap-2 mb-3",t?.form?.container),onSubmit:B,children:[h.jsx("p",{className:A("text-base font-bold text-foreground",t?.form?.addressLabel),children:"Adres"}),h.jsxs("div",{className:A("flex flex-row gap-2",t?.form?.inputsContainer),children:[h.jsx(wi,{variant:"bordered",placeholder:"1234AB",radius:"sm",type:"text",inputMode:d.length<4?"numeric":"text",name:"postcode",autoComplete:"postal-code",value:d,onValueChange:L=>f(ON(L)),onFocus:W,classNames:j,maxLength:6,label:e("postcodeCheck.postalCode"),isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"1",radius:"sm",type:"text",inputMode:"numeric",name:"number",autoComplete:"street-address",value:m,onValueChange:L=>g(L.replace(/\D/g,"")),onFocus:W,classNames:j,label:e("postcodeCheck.houseNumber"),isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"A",radius:"sm",type:"text",name:"numberAddon",value:b,onValueChange:L=>y(L.toUpperCase()),onFocus:W,classNames:j,label:e("postcodeCheck.houseNumberAddition")})]}),R&&h.jsx(uu,{color:"danger",variant:"faded",title:R,hideIconWrapper:!0,classNames:t?.form?.errorAlert})]}),h.jsx("p",{className:A("text-base font-bold text-foreground",t?.provider?.label),children:e("postcodeCheck.homeInternet")}),h.jsx(Tc,{variant:"bordered","aria-label":e("postcodeCheck.homeInternet"),placeholder:e("postcodeCheck.selectProvider"),isOpen:P,onOpenChange:L=>L!==P&&E(L),popoverProps:o,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:r.currentFixedProviderScope?[r.currentFixedProviderScope]:void 0,radius:"sm",size:"lg",renderValue:L=>{const Z=K.find(T=>T.slug===L[0]?.key);return Z?h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[Z.imageUrl&&h.jsx(Ar,{src:s(Z.imageUrl,120,60),alt:Z.name,width:60,height:30,radius:"none"}),Z.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(Z.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),U(Z)]}):null},classNames:{...t?.provider?.select,trigger:A("cursor-pointer border-small",t?.provider?.select?.trigger)},children:K.map(L=>h.jsx(Ba,{variant:"flat",textValue:L.name,onClick:()=>{n({currentFixedProviderScope:L.slug}),E(!1)},children:h.jsxs("div",{className:A("flex items-center gap-3",t?.provider?.select?.itemContainer),children:[L.imageUrl&&h.jsx(Ar,{src:s(L.imageUrl,120,60),alt:L.name,width:60,height:30,radius:"none"}),L.Icon&&h.jsx("div",{className:"flex h-[28px] w-[56px] items-center justify-center",children:h.jsx(L.Icon,{size:24,className:A("stroke-primary-500",t?.provider?.select?.icon)})}),U(L)]})},L.slug))})]}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",t?.submitButton),type:"submit",form:"postcode-check-form",color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:e("common.confirm")})})]})})}function gu({variant:e="combiDeal",isFixed:t=!1}){const{t:r}=Je(),{profile:n,setProfile:o}=sn(),{profileBanner:i}=vt(),{openModal:s}=Qt(),a=x.useMemo(()=>{switch(e){case"numberPreservation":return{Icon:null,avatarName:"0 6",title:r("numberPreservation.title"),description:r("numberPreservation.question"),ctaYes:()=>{o({keepCurrentMsisdn:!0}),s("number-preservation")},ctaNo:()=>o({keepCurrentMsisdn:!1}),yes:r("numberPreservation.yes"),no:r("numberPreservation.no")};case"postcodeCheck":return{Icon:dg,title:r("postcodeCheck.currentProvider"),description:r("postcodeCheck.question"),ctaYes:()=>s("postcode-check"),ctaNo:()=>o({currentFixedProviderScope:"other"}),yes:r("postcodeCheck.yes"),no:r("postcodeCheck.no")};default:return{Icon:qu,title:r("combiDeal.customerBenefit"),description:r(t?"combiDeal.questionOtherSubscriptions":"combiDeal.question"),ctaYes:()=>s("combi-deal"),ctaNo:()=>o(t?{currentMobileProviders:[]}:{currentFixedProviderScope:"other"}),yes:r("combiDeal.yes"),no:r("combiDeal.no")}}},[e,t]);return e==="numberPreservation"&&n.keepCurrentMsisdn!==void 0||e==="postcodeCheck"&&n.currentFixedProviderScope||e==="combiDeal"&&t&&n.currentMobileProviders||e==="combiDeal"&&!t&&n.currentFixedProviderScope||e==="numberPreservation"&&t||e==="postcodeCheck"&&!t?null:h.jsxs("div",{className:A("flex md:items-center justify-between border-2 border-primary p-2 md:p-3 rounded-full w-full",i?.container),children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2 md:gap-3",children:[h.jsx("div",{className:"h-full flex items-center justify-center",children:h.jsx(HP,{color:"warning",content:"",shape:"circle",className:i?.badge,children:h.jsx(Hl,{size:"md",radius:"full",color:"warning",showFallback:!0,fallback:a.Icon&&h.jsx(a.Icon,{size:24,className:A("stroke-primary",i?.icon)}),name:a.avatarName,classNames:{...i?.avatar,name:A("text-primary font-bold flex items-center justify-center p-4"),base:A("size-8 md:size-10 bg-primary-100",i?.avatar?.base)}})})}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("div",{className:A("font-semibold text-left truncate w-full text-sm",i?.title),children:a.title}),h.jsx("div",{className:A("text-xs text-foreground-500 text-left truncate w-full overflow-hidden overflow-ellipsis whitespace-nowrap",i?.description),children:a.description})]})]}),h.jsxs("div",{className:"flex flex-row gap-2",children:[h.jsx(hr,{className:A("font-medium gap-1 rounded-full min-w-16",i?.button),color:"primary",size:"md",onPress:a.ctaYes,disableAnimation:!0,disableRipple:!0,children:a.yes}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full min-w-16",i?.button),color:"primary",size:"md",onPress:a.ctaNo,disableAnimation:!0,disableRipple:!0,children:a.no})]})]})}function Hie(e,t){return!e&&!t?"":t&&/^\d+$/.test(t)?`${e}/${t}`:`${e}${t??""}`}function qie({street:e,city:t,number:r,numberAddon:n}){if(!(!e||!r||!t))return`${e} ${Hie(r,n)}, ${t}`}function LN({isFixed:e=!1,showTitle:t=!0,showProfileBanner:r=!1}){const{t:n}=Je(),{profile:o}=sn(),{openModal:i}=Qt(),{profileButton:s}=vt(),a=L1(),l=kh(e?"fixed":"mobile"),c=PN(o.currentMobileProviders,l.otherBlocks);return h.jsxs("div",{className:"@container flex flex-col gap-3 mb-3",children:[t&&h.jsx("div",{className:"text-base font-bold text-foreground",children:n("profile.personalizeTitle")}),h.jsxs("div",{className:A("grid grid-cols-1 gap-3 w-full",r&&(e||o.keepCurrentMsisdn===void 0)?"@3xl:grid-cols-2":"@xl:grid-cols-2"),children:[e?!r||o.currentFixedProviderScope?h.jsx(ql,{title:n("profile.postcodeCheck"),description:o.address?qie(o.address):n("profile.enterPostcode"),selected:o.address!==void 0,onClick:()=>i("postcode-check"),Icon:dg,classNames:s}):h.jsx(gu,{variant:"postcodeCheck",isFixed:!0}):!r||o.keepCurrentMsisdn!==void 0?h.jsx(ql,{title:n("profile.numberPreservation"),description:kN(o,a),selected:o.keepCurrentMsisdn===!1||o.keepCurrentMsisdn&&!!o.currentProviderSlug,onClick:()=>i("number-preservation"),avatarName:"0 6",classNames:s}):h.jsx(gu,{variant:"numberPreservation"}),!r||(e?o.currentMobileProviders:o.currentFixedProviderScope)?h.jsx(ql,{title:n("profile.customerBenefit"),description:SN(l.fixedBlocks.map(d=>({slug:d.scope.split("/")[1]??"",name:d.provider.name})),c,o.currentFixedProviderScope,e),selected:e?o.currentMobileProviders?.some(d=>l.otherBlocks.some(f=>f.scope===d.scope)):l.fixedBlocks.some(d=>d.scope===o.currentFixedProviderScope)||o.currentFixedProviderScope==="other",onClick:()=>i("combi-deal"),Icon:qu,classNames:s}):h.jsx(gu,{variant:"combiDeal",isFixed:e})]})]})}function Gie(){const{t:e}=Je(),[t,r]=x.useState(!1),{sortSelect:n}=vt(),{popoverContent:o,listbox:i,...s}=n||{},{sortOptions:a,handleFilterChange:l,getActiveFilterValue:c}=vi(),{popoverProps:d,isShadowRoot:f}=Zn({classNames:o});return f?h.jsx("select",{name:e("filters.sort"),"aria-label":e("filters.sort"),value:c("sorteren")[0],onChange:m=>l({slug:"sorteren",value:m.target.value}),className:A("appearance-none min-w-1/2 lg:min-w-auto lg:w-[200px] h-10 cursor-pointer border-small rounded-small","bg-white px-3 shadow-xs outline-solid outline-transparent tap-highlight-transparent","border-default-200 hover:border-default-400 transition-[border-color] motion-reduce:transition-none",s?.trigger),style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")`,backgroundSize:"16px",backgroundRepeat:"no-repeat",backgroundPositionY:"center",backgroundPositionX:"95%"},children:a.map(m=>h.jsx("option",{value:m.value,children:e(`sortOptions.${m.value}`,{defaultValue:m.name})},m.value))}):h.jsx(Tc,{variant:"bordered","aria-label":e("filters.sort"),placeholder:e("filters.sort"),popoverProps:d,selectionMode:"single",disallowEmptySelection:!0,isOpen:t,onOpenChange:m=>m!==t&&r(m),selectedKeys:c("sorteren"),radius:"sm",listboxProps:{itemClasses:i},classNames:{...s,base:A("min-w-1/2 lg:min-w-auto lg:w-[200px]",s?.base),trigger:A("cursor-pointer border-small bg-white",s?.trigger)},children:a.map(m=>h.jsx(Ba,{variant:"flat",onClick:()=>{l({slug:"sorteren",value:m.value}),r(!1)},children:e(`sortOptions.${m.value}`,{defaultValue:m.name})},m.value))})}function Zie(e,t){return!e&&!t?"":t&&/^\d+$/.test(t)?`${e}/${t}`:`${e}${t??""}`}function Ve(e,t){if(e===void 0)return"";const r=e.toFixed(2).toString().replace(".",","),n=t?.symbol?`${t.symbol} ${r}`:r;return t?.dashed?n.replace(/,00$/,",-"):n}function F1(e){if(!e.productVersion)return;const r=parseFloat(e.productVersion.pricing.sellingPriceInclVat)-(e.creditFee+e.price);if(!(r<=0))return Ve(r,{dashed:!0})}function Qs(e,t,r){if(!(t===e[0].fee&&e[0].fee===e[e.length-1].fee))return t>r?`${Ee.t("format.from")} ${Ve(t,{dashed:!0})} ${Ee.t("format.for")}:`:`${e[0].term} ${Ee.t("format.month_short",{count:e[0].term})} ${Ee.t("format.from").toLowerCase()} ${Ve(t,{dashed:!0})} ${Ee.t("format.for")}:`}function B1(e){switch(e){case Qn:return Ee.t("format.unlimited_short");case 0:return"-";default:return e}}function bu(e,t){const r=e.minutes!==0?`${B1(e.minutes)} ${e.minutes===Qn?Ee.t("format.minutes_short"):Ee.t("format.minutes")}`:void 0,n=e.sms!==0?e.sms===e.minutes?Ee.t("format.sms"):`${B1(e.sms)} ${Ee.t("format.sms")}`:void 0,o=e.minutes===Qn&&e.sms===Qn||["minutes","sms"].every(s=>e.sharedCredits?.includes(s)),i=o?" / ":" + ";return!r&&!n?"":o?[r,Ee.t("format.sms")].join(i):[r,n].join(i)}function Jc(e){switch(e){case 24:return`2 ${Ee.t("format.year",{count:2})}`;case 12:return`1 ${Ee.t("format.year")}`;case 1:return Ee.t("format.monthly");default:return""}}function FN(e){switch(e){case 3:return"3G";case 4:return"4G";case 4.5:return"4G+";case 4.9:return"5G-ready";case 5:return"5G";default:return""}}function ea(e){const t=Jc(e.planVariant.contractTerm);if(e.productType==="fixed"){const i=`${e.content.dataSpeedDown/1e3} / ${e.content.dataSpeedUp/1e3} ${Ee.t("format.megabitPerSecond")}`;if(e.content.types&&!e.content.types.includes("tv"))return[{title:t,slug:"contract-term"},{title:i,slug:"internet-speed"}];const s=`${(e.content.channels||[]).length} (${(e.content.hdChannels||[]).length} HD)`;return[{title:t,slug:"contract-term"},{title:i,slug:"internet-speed"},{title:s,slug:"channels"}]}const r=`${e.content.dataSpeedDown/1e3} ${Ee.t("format.megabitPerSecond")}`,n=`${(e.provider.network||"").replace("-netwerk","")} ${FN(e.content.networkGeneration)}`,o=e.content.dataEu?"EU":"NL";return[{title:t,slug:"contract-term"},{title:r,slug:"data-speed-down"},{title:n,slug:"provider-network"},{title:o,slug:"data-eu"}]}function Kn(e,t){if(e===Qn)return`${Ee.t("format.unlimited_short")} ${t}`;const r=(e/1e3).toString().replace(".",",");return`${t===Ee.t("format.gigabyte")?r:e} ${t}`}const z1=["kpn","vodafone","odido"],Yie=[{type:"isRetention",rank:1,color:"primary",getDisplayName:e=>Ee.t("labels.renewWith",{providerName:e.provider.name}),isApplicable:(e,t)=>(t.isSimOnly||t.isSmartphone)&&e.planVariant.contractType==="retention",sortValue:e=>e.tcoPerMonth,limit:"unlimited",sortDirection:"asc"},{type:"isCheapestPhone",rank:2,color:"primary",getDisplayName:()=>Ee.t("labels.cheapestPhone"),isApplicable:(e,t)=>t.isSmartphone&&Number.isFinite(e.creditFee+e.price),sortValue:e=>e.creditFee+e.price,limit:1,sortDirection:"asc"},{type:"isBudget",rank:3,color:"primary",getDisplayName:()=>Ee.t("labels.budget"),isApplicable:(e,t)=>!t.isFixed&&Number.isFinite(e.tcoPerMonth),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isBudget1Year",rank:3,color:"primary",getDisplayName:()=>Ee.t("labels.budget1Year"),isApplicable:(e,t)=>t.isFixed&&e.planVariant.contractTerm===12&&Number.isFinite(e.tcoPerMonth),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isBudget2Year",rank:3,color:"primary",getDisplayName:()=>Ee.t("labels.budget2Year"),isApplicable:(e,t)=>t.isFixed&&e.planVariant.contractTerm===24&&Number.isFinite(e.tcoPerMonth),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isBudgetFiber",rank:4,color:"primary",getDisplayName:()=>Ee.t("labels.budgetFiber"),isApplicable:(e,t)=>t.isFixed&&(e.tags.find(r=>r.type==="internet")?.slug||"").includes("glasvezel"),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isCombi",rank:5,color:"primary",getDisplayName:e=>e.provider?.name?Ee.t("labels.combi",{providerName:e.provider.name}):Ee.t("labels.combiGeneric"),isApplicable:e=>e.key.includes("m"),sortValue:e=>e.tcoPerMonth,limit:"unlimited",sortDirection:"asc"},{type:"isBudgetOwnNetwork",rank:6,color:"primary",getDisplayName:()=>Ee.t("labels.budgetOwnNetwork"),isApplicable:(e,t)=>(t.isSimOnly||t.isSmartphone)&&z1.includes(e.provider.slug),sortValue:e=>e.tcoPerMonth,limit:1,sortDirection:"asc"},{type:"isFastestInternet",rank:7,color:"primary",getDisplayName:()=>Ee.t("labels.fastestInternet"),isApplicable:(e,t)=>t.fastestInternetPropositionKey?e.key===t.fastestInternetPropositionKey:Number.isFinite(e.content.dataSpeedDown),sortValue:e=>e.content.dataSpeedDown,limit:1,sortDirection:"desc"},{type:"isBudgetNetwork",rank:8,color:"primary",getDisplayName:e=>e.provider?.network?Ee.t("labels.budgetNetwork",{network:e.provider.network.replace("-netwerk","")}):Ee.t("labels.budgetNetworkGeneric"),isApplicable:(e,t)=>(t.isSimOnly||t.isSmartphone)&&t.budgetNetworkPropositionKeys.includes(e.key),sortValue:e=>e.tcoPerMonth,limit:z1.length,sortDirection:"asc"}];function K1({propositions:e,productCategory:t,labelColorConfig:r,fastestInternetPropositionKey:n}){const o=t==="fixed-proposition",i=t==="sim-only-proposition",s=t==="smartphone-proposition",a={isFixed:o,isSimOnly:i,isSmartphone:s,budgetNetworkPropositionKeys:i||s?Jie(e):[],fastestInternetPropositionKey:n},l=new Map;for(const m of Yie){const g=e.filter(v=>m.isApplicable(v,a));if(g.length===0)continue;const b=[...g].sort((v,C)=>{const S=m.sortValue(v),k=m.sortValue(C);return S===k?0:m.sortDirection==="asc"?S-k:k-S}),y=m.limit==="unlimited"?b.length:m.limit;b.slice(0,y).forEach(v=>{l.has(v.key)||l.set(v.key,{type:m.type,displayName:m.getDisplayName(v),rank:m.rank,color:r[m.type]??m.color})})}const c=Array.from(l.entries()).map(([m,g])=>{const b=e.find(y=>y.key===m);return b?{...b,label:g}:void 0}).filter(m=>!!m).sort((m,g)=>m.label.rank-g.label.rank),d=[],f=new Set;for(const m of c){if(d.length>=3)break;if(o){if(f.has(m.provider.slug))continue;f.add(m.provider.slug)}d.push(m)}return{top:d,all:e.map(m=>({...m,label:l.get(m.key)}))}}function Jie(e){return z1.map(t=>[...e].filter(r=>(r.provider?.network||"").replace("-netwerk","").toLowerCase()===t).sort((r,n)=>r.tcoPerMonth-n.tcoPerMonth)[0]?.key).filter(t=>!!t)}function Xie({channels:e,hdChannels:t,classNames:r}){const{t:n}=Je();return h.jsxs("div",{className:A("pb-4",r?.base),children:[h.jsx("div",{className:A(r?.description),children:n("detailsModal.channelsDescription",{channelsCount:e?.length})}),h.jsx("ul",{className:A("list-disc list-outside pl-6",r?.list),children:e.map(o=>h.jsx("li",{className:A("list-item",r?.listItem),children:h.jsxs("span",{className:A("flex items-center gap-2",r?.channelContainer),children:[o,t?.includes(o)&&h.jsx(NL,{size:24,className:A("stroke-foreground",r?.hdIcon)})]})},o))})]})}function Ph({label:e,originalPrice:t,currentPrice:r,hasMonthlyPrice:n=!0,classNames:o}){return h.jsxs("div",{className:A("flex justify-between",o?.container),children:[h.jsx("div",{className:A("flex items-center gap-1",o?.label),children:e}),n&&h.jsxs("div",{className:A("flex items-center gap-2",o?.priceContainer),children:[t&&h.jsx("div",{className:A("line-through text-foreground-400",o?.originalPrice),children:Ve(t)}),h.jsx("div",{className:A(o?.currentPrice),children:Ve(r)})]})]})}function BN({term:e,price:t,classNames:r}){return h.jsxs("div",{className:A("flex text-sm text-foreground-400 justify-between",r?.container),children:[h.jsxs("div",{className:A("flex items-center gap-1",r?.label),children:[h.jsx(lg,{size:16,className:A("stroke-foreground-400",r?.icon)}),Ee.t("format.afterMonth",{count:e})]}),h.jsx("div",{className:A(r?.price),children:Ve(t)})]})}function zN({proposition:e,classNames:t}){const{t:r}=Je(),{productType:n,provider:o,planVariant:i,bundles:s,monthlyFees:a,price:l,handsetCreditMonthlyFee:c,baseMonthlyFee:d,lifetimeMonthlyFee:f,productVersion:m}=e,g=a[a.length-1].fee,b=d>g?d:g,y=s.filter(N=>!N.contentTypes?.includes("handset_service")),v=y.filter(N=>N.contentTypes?.includes("combi_deal")),C=a&&a[a.length-1].fee!==f,S=a?.reduce((N,D)=>N+D.term,0),k=c>0?d-c:v.length?b-(v[0].baseMonthlyFee||0):b,P=c>0?a[0].fee-c:a[0].fee,E=P!==void 0&&k!==P,$=E?k:void 0,O=E?P:k;return h.jsxs("div",{className:A("mb-8",t?.monthlySection),children:[h.jsxs("div",{className:A("mb-2",t?.monthlyFeesContainer),children:[h.jsxs("div",{className:A("text-lg font-bold flex justify-between",t?.monthlyPriceHeader?.container),children:[h.jsx("div",{className:A(t?.monthlyPriceHeader?.label),children:r("format.monthly")}),h.jsx("div",{className:A(t?.monthlyPriceHeader?.price),children:Ve(a[0].fee)})]}),a?.map((N,D)=>{if(D+1===a?.length)return null;const M=a?.slice(0,D+1).reduce((V,R)=>V+R.term,0);return h.jsx(BN,{term:M,price:a[D+1]?.fee||0,classNames:t?.monthlyFeeTransition},N.term)}),C&&S&&f&&h.jsx(BN,{term:S,price:f,classNames:t?.lifetimeFee})]}),h.jsx(Ph,{label:h.jsxs(h.Fragment,{children:[o.name," ",i.contractType==="retention"?`${r("detailsModal.renewal").toLowerCase()} `:"",Jc(i.contractTerm)]}),originalPrice:$,currentPrice:O,classNames:t?.providerContract}),y.map(N=>{const D=N.contentTypes?.includes("combi_deal"),M=D&&N.promotionMonthlyFee||N.baseMonthlyFee||0,V=D?null:N.promotionMonthlyFee,R=typeof V=="number"&&M!==V,K=R&&M!==0?M:void 0,j=R?V:M,B=M!==0||typeof V=="number"&&V!==0;return h.jsx(Ph,{label:N.displayName,originalPrice:K,currentPrice:j,hasMonthlyPrice:B,classNames:{...t?.bundle,container:A("text-sm text-foreground-400",D&&"text-success",t?.bundle?.container),label:A("pl-4",t?.bundle?.label)}},N.displayName)}),c>0&&h.jsx(Ph,{label:r("detailsModal.deviceBundle"),currentPrice:c,classNames:{container:A("mt-2",t?.handsetBundle?.container),label:t?.handsetBundle?.label,priceContainer:t?.handsetBundle?.priceContainer,currentPrice:t?.handsetBundle?.currentPrice}}),n==="smartphone"&&h.jsxs(h.Fragment,{children:[h.jsx(Ql,{orientation:"horizontal",className:A("my-4",t?.separator)}),h.jsxs("div",{className:A("text-lg font-bold flex justify-between mb-1",t?.oneTimeSection?.header?.container),children:[h.jsx("div",{className:A("flex items-center gap-1",t?.oneTimeSection?.header?.label),children:r("format.oneTime")}),h.jsx("div",{className:A("flex items-center gap-2",t?.oneTimeSection?.header?.price),children:h.jsx("div",{children:Ve(l)})})]}),h.jsx(Ph,{label:h.jsx("div",{className:A("flex items-center gap-1",t?.oneTimeSection?.productRow?.label),children:m?.fullName}),currentPrice:l,classNames:t?.oneTimeSection?.productRow})]})]})}const V1=new WeakMap;function R1(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function Qie(e,t){let r=V1.get(e);if(!r)throw new Error("Unknown grid");return`${r}-${R1(t)}`}function KN(e,t,r){let n=V1.get(e);if(!n)throw new Error("Unknown grid");return`${n}-${R1(t)}-${R1(r)}`}function VN(e,t){return[...e.collection.rowHeaderColumnKeys].map(r=>KN(e,t,r)).join(" ")}var RN={};RN={ascending:"تصاعدي",ascendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تصاعدي`,columnSize:e=>`${e.value} بالبكسل`,descending:"تنازلي",descendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var WN={};WN={ascending:"възходящ",ascendingSort:e=>`сортирано по колона ${e.columnName} във възходящ ред`,columnSize:e=>`${e.value} пиксела`,descending:"низходящ",descendingSort:e=>`сортирано по колона ${e.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var UN={};UN={ascending:"vzestupně",ascendingSort:e=>`řazeno vzestupně podle sloupce ${e.columnName}`,columnSize:e=>`${e.value} pixelů`,descending:"sestupně",descendingSort:e=>`řazeno sestupně podle sloupce ${e.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var HN={};HN={ascending:"stigende",ascendingSort:e=>`sorteret efter kolonne ${e.columnName} i stigende rækkefølge`,columnSize:e=>`${e.value} pixels`,descending:"faldende",descendingSort:e=>`sorteret efter kolonne ${e.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var qN={};qN={ascending:"aufsteigend",ascendingSort:e=>`sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,columnSize:e=>`${e.value} Pixel`,descending:"absteigend",descendingSort:e=>`sortiert nach Spalte ${e.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var GN={};GN={ascending:"αύξουσα",ascendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε αύξουσα σειρά`,columnSize:e=>`${e.value} pixel`,descending:"φθίνουσα",descendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var ZN={};ZN={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:e=>`sorted by column ${e.columnName} in ascending order`,descendingSort:e=>`sorted by column ${e.columnName} in descending order`,columnSize:e=>`${e.value} pixels`,resizerDescription:"Press Enter to start resizing"};var YN={};YN={ascending:"ascendente",ascendingSort:e=>`ordenado por columna ${e.columnName} en sentido ascendente`,columnSize:e=>`${e.value} píxeles`,descending:"descendente",descendingSort:e=>`ordenado por columna ${e.columnName} en orden descendente`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var JN={};JN={ascending:"tõusev järjestus",ascendingSort:e=>`sorditud veeru järgi ${e.columnName} tõusvas järjestuses`,columnSize:e=>`${e.value} pikslit`,descending:"laskuv järjestus",descendingSort:e=>`sorditud veeru järgi ${e.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var XN={};XN={ascending:"nouseva",ascendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan nousevassa järjestyksessä`,columnSize:e=>`${e.value} pikseliä`,descending:"laskeva",descendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var QN={};QN={ascending:"croissant",ascendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre croissant`,columnSize:e=>`${e.value} pixels`,descending:"décroissant",descendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var eD={};eD={ascending:"עולה",ascendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר עולה`,columnSize:e=>`${e.value} פיקסלים`,descending:"יורד",descendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var tD={};tD={ascending:"rastući",ascendingSort:e=>`razvrstano po stupcima ${e.columnName} rastućem redoslijedom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`razvrstano po stupcima ${e.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var rD={};rD={ascending:"növekvő",ascendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, növekvő sorrendben`,columnSize:e=>`${e.value} képpont`,descending:"csökkenő",descendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var nD={};nD={ascending:"crescente",ascendingSort:e=>`in ordine crescente in base alla colonna ${e.columnName}`,columnSize:e=>`${e.value} pixel`,descending:"decrescente",descendingSort:e=>`in ordine decrescente in base alla colonna ${e.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var oD={};oD={ascending:"昇順",ascendingSort:e=>`列 ${e.columnName} を昇順で並べ替え`,columnSize:e=>`${e.value} ピクセル`,descending:"降順",descendingSort:e=>`列 ${e.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var iD={};iD={ascending:"오름차순",ascendingSort:e=>`${e.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:e=>`${e.value} 픽셀`,descending:"내림차순",descendingSort:e=>`${e.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var sD={};sD={ascending:"didėjančia tvarka",ascendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} didėjančia tvarka`,columnSize:e=>`${e.value} piks.`,descending:"mažėjančia tvarka",descendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var aD={};aD={ascending:"augošā secībā",ascendingSort:e=>`kārtots pēc kolonnas ${e.columnName} augošā secībā`,columnSize:e=>`${e.value} pikseļi`,descending:"dilstošā secībā",descendingSort:e=>`kārtots pēc kolonnas ${e.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var lD={};lD={ascending:"stigende",ascendingSort:e=>`sortert etter kolonne ${e.columnName} i stigende rekkefølge`,columnSize:e=>`${e.value} piksler`,descending:"synkende",descendingSort:e=>`sortert etter kolonne ${e.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var uD={};uD={ascending:"oplopend",ascendingSort:e=>`gesorteerd in oplopende volgorde in kolom ${e.columnName}`,columnSize:e=>`${e.value} pixels`,descending:"aflopend",descendingSort:e=>`gesorteerd in aflopende volgorde in kolom ${e.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var cD={};cD={ascending:"rosnąco",ascendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku rosnącym`,columnSize:e=>`Liczba pikseli: ${e.value}`,descending:"malejąco",descendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var dD={};dD={ascending:"crescente",ascendingSort:e=>`classificado pela coluna ${e.columnName} em ordem crescente`,columnSize:e=>`${e.value} pixels`,descending:"decrescente",descendingSort:e=>`classificado pela coluna ${e.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var fD={};fD={ascending:"ascendente",ascendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem ascendente`,columnSize:e=>`${e.value} pixels`,descending:"descendente",descendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var pD={};pD={ascending:"crescătoare",ascendingSort:e=>`sortate după coloana ${e.columnName} în ordine crescătoare`,columnSize:e=>`${e.value} pixeli`,descending:"descrescătoare",descendingSort:e=>`sortate după coloana ${e.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var hD={};hD={ascending:"возрастание",ascendingSort:e=>`сортировать столбец ${e.columnName} в порядке возрастания`,columnSize:e=>`${e.value} пикс.`,descending:"убывание",descendingSort:e=>`сортировать столбец ${e.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var mD={};mD={ascending:"vzostupne",ascendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,columnSize:e=>`Počet pixelov: ${e.value}`,descending:"zostupne",descendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var gD={};gD={ascending:"naraščajoče",ascendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v naraščajočem vrstnem redu`,columnSize:e=>`${e.value} slikovnih pik`,descending:"padajoče",descendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var bD={};bD={ascending:"rastući",ascendingSort:e=>`sortirano po kolonama ${e.columnName} rastućim redosledom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`sortirano po kolonama ${e.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var vD={};vD={ascending:"stigande",ascendingSort:e=>`sorterat på kolumn ${e.columnName} i stigande ordning`,columnSize:e=>`${e.value} pixlar`,descending:"fallande",descendingSort:e=>`sorterat på kolumn ${e.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var yD={};yD={ascending:"artan sırada",ascendingSort:e=>`${e.columnName} sütuna göre artan düzende sırala`,columnSize:e=>`${e.value} piksel`,descending:"azalan sırada",descendingSort:e=>`${e.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var xD={};xD={ascending:"висхідний",ascendingSort:e=>`відсортовано за стовпцем ${e.columnName} у висхідному порядку`,columnSize:e=>`${e.value} пікс.`,descending:"низхідний",descendingSort:e=>`відсортовано за стовпцем ${e.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var wD={};wD={ascending:"升序",ascendingSort:e=>`按列 ${e.columnName} 升序排序`,columnSize:e=>`${e.value} 像素`,descending:"降序",descendingSort:e=>`按列 ${e.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var CD={};CD={ascending:"遞增",ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:"遞減",descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var Eh={};Eh={"ar-AE":RN,"bg-BG":WN,"cs-CZ":UN,"da-DK":HN,"de-DE":qN,"el-GR":GN,"en-US":ZN,"es-ES":YN,"et-EE":JN,"fi-FI":XN,"fr-FR":QN,"he-IL":eD,"hr-HR":tD,"hu-HU":rD,"it-IT":nD,"ja-JP":oD,"ko-KR":iD,"lt-LT":sD,"lv-LV":aD,"nb-NO":lD,"nl-NL":uD,"pl-PL":cD,"pt-BR":dD,"pt-PT":fD,"ro-RO":pD,"ru-RU":hD,"sk-SK":mD,"sl-SI":gD,"sr-SP":bD,"sv-SE":vD,"tr-TR":yD,"uk-UA":xD,"zh-CN":wD,"zh-TW":CD};class SD{isCell(t){return t.type==="cell"}isRow(t){return t.type==="row"||t.type==="item"}isDisabled(t){var r;return this.disabledBehavior==="all"&&(((r=t.props)===null||r===void 0?void 0:r.isDisabled)||this.disabledKeys.has(t.key))}findPreviousKey(t,r){let n=t!=null?this.collection.getKeyBefore(t):this.collection.getLastKey();for(;n!=null;){let o=this.collection.getItem(n);if(!o)return null;if(!this.isDisabled(o)&&(!r||r(o)))return n;n=this.collection.getKeyBefore(n)}return null}findNextKey(t,r){let n=t!=null?this.collection.getKeyAfter(t):this.collection.getFirstKey();for(;n!=null;){let o=this.collection.getItem(n);if(!o)return null;if(!this.isDisabled(o)&&(!r||r(o)))return n;if(n=this.collection.getKeyAfter(n),n==null)return null}return null}getKeyForItemInRowByIndex(t,r=0){if(r<0)return null;let n=this.collection.getItem(t);if(!n)return null;let o=0;for(let a of Qr(n,this.collection)){var i;if(a.colSpan&&a.colSpan+o>r)return(i=a.key)!==null&&i!==void 0?i:null;a.colSpan&&(o=o+a.colSpan-1);var s;if(o===r)return(s=a.key)!==null&&s!==void 0?s:null;o++}return null}getKeyBelow(t){let r=t,n=this.collection.getItem(r);if(!n)return null;var o;if(this.isCell(n)&&(r=(o=n.parentKey)!==null&&o!==void 0?o:null),r==null)return null;if(r=this.findNextKey(r,i=>i.type==="item"),r!=null){if(this.isCell(n)){let i=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(r,i)}if(this.focusMode==="row")return r}return null}getKeyAbove(t){let r=t,n=this.collection.getItem(r);if(!n)return null;var o;if(this.isCell(n)&&(r=(o=n.parentKey)!==null&&o!==void 0?o:null),r==null)return null;if(r=this.findPreviousKey(r,i=>i.type==="item"),r!=null){if(this.isCell(n)){let i=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(r,i)}if(this.focusMode==="row")return r}return null}getKeyRightOf(t){let r=this.collection.getItem(t);if(!r)return null;if(this.isRow(r)){var n,o;let d=Qr(r,this.collection);var i;return(i=this.direction==="rtl"?(n=Ls(d))===null||n===void 0?void 0:n.key:(o=Wi(d))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null}if(this.isCell(r)&&r.parentKey!=null){let d=this.collection.getItem(r.parentKey);if(!d)return null;let f=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?Pc(f,r.index-1):Pc(f,r.index+1))!==null&&s!==void 0?s:null;var a;if(m)return(a=m.key)!==null&&a!==void 0?a:null;var l;if(this.focusMode==="row")return(l=r.parentKey)!==null&&l!==void 0?l:null;var c;return(c=this.direction==="rtl"?this.getFirstKey(t):this.getLastKey(t))!==null&&c!==void 0?c:null}return null}getKeyLeftOf(t){let r=this.collection.getItem(t);if(!r)return null;if(this.isRow(r)){var n,o;let d=Qr(r,this.collection);var i;return(i=this.direction==="rtl"?(n=Wi(d))===null||n===void 0?void 0:n.key:(o=Ls(d))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null}if(this.isCell(r)&&r.parentKey!=null){let d=this.collection.getItem(r.parentKey);if(!d)return null;let f=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?Pc(f,r.index+1):Pc(f,r.index-1))!==null&&s!==void 0?s:null;var a;if(m)return(a=m.key)!==null&&a!==void 0?a:null;var l;if(this.focusMode==="row")return(l=r.parentKey)!==null&&l!==void 0?l:null;var c;return(c=this.direction==="rtl"?this.getLastKey(t):this.getFirstKey(t))!==null&&c!==void 0?c:null}return null}getFirstKey(t,r){let n=t??null,o;if(n!=null){if(o=this.collection.getItem(n),!o)return null;if(this.isCell(o)&&!r&&o.parentKey!=null){var i;let c=this.collection.getItem(o.parentKey);if(!c)return null;var s;return(s=(i=Wi(Qr(c,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null}}if(n=this.findNextKey(void 0,c=>c.type==="item"),n!=null&&(o&&this.isCell(o)&&r||this.focusMode==="cell")){var a;let c=this.collection.getItem(n);if(!c)return null;var l;n=(l=(a=Wi(Qr(c,this.collection)))===null||a===void 0?void 0:a.key)!==null&&l!==void 0?l:null}return n}getLastKey(t,r){let n=t??null,o;if(n!=null){if(o=this.collection.getItem(n),!o)return null;if(this.isCell(o)&&!r&&o.parentKey!=null){var i;let c=this.collection.getItem(o.parentKey);if(!c)return null;let d=Qr(c,this.collection);var s;return(s=(i=Ls(d))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null}}if(n=this.findPreviousKey(void 0,c=>c.type==="item"),n!=null&&(o&&this.isCell(o)&&r||this.focusMode==="cell")){var a;let c=this.collection.getItem(n);if(!c)return null;let d=Qr(c,this.collection);var l;n=(l=(a=Ls(d))===null||a===void 0?void 0:a.key)!==null&&l!==void 0?l:null}return n}getKeyPageAbove(t){let r=t,n=this.layoutDelegate.getItemRect(r);if(!n)return null;let o=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>o&&r!=null;){var i;if(r=(i=this.getKeyAbove(r))!==null&&i!==void 0?i:null,r==null)break;n=this.layoutDelegate.getItemRect(r)}return r}getKeyPageBelow(t){let r=t,n=this.layoutDelegate.getItemRect(r);if(!n)return null;let o=this.layoutDelegate.getVisibleRect().height,i=Math.min(this.layoutDelegate.getContentSize().height,n.y+o);for(;n&&n.y+n.height<i;){let s=this.getKeyBelow(r);if(s==null)break;n=this.layoutDelegate.getItemRect(s),r=s}return r}getKeyForSearch(t,r){let n=r??null;if(!this.collator)return null;let o=this.collection;if(n=r??this.getFirstKey(),n==null)return null;let i=o.getItem(n);if(!i)return null;var s;i.type==="cell"&&(n=(s=i.parentKey)!==null&&s!==void 0?s:null);let a=!1;for(;n!=null;){let d=o.getItem(n);if(!d)return null;if(d.textValue){let f=d.textValue.slice(0,t.length);if(this.collator.compare(f,t)===0){var l,c;return this.isRow(d)&&this.focusMode==="cell"?(c=(l=Wi(Qr(d,this.collection)))===null||l===void 0?void 0:l.key)!==null&&c!==void 0?c:null:d.key}}n=this.findNextKey(n,f=>f.type==="item"),n==null&&!a&&(n=this.getFirstKey(),a=!0)}return null}constructor(t){if(this.collection=t.collection,this.disabledKeys=t.disabledKeys,this.disabledBehavior=t.disabledBehavior||"all",this.direction=t.direction,this.collator=t.collator,!t.layout&&!t.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=t.layoutDelegate||(t.layout?new ese(t.layout):new t0(t.ref));var r;this.focusMode=(r=t.focusMode)!==null&&r!==void 0?r:"row"}}class ese{getContentSize(){return this.layout.getContentSize()}getItemRect(t){var r;return((r=this.layout.getLayoutInfo(t))===null||r===void 0?void 0:r.rect)||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}constructor(t){this.layout=t}}const W1=new WeakMap;var kD={};kD={deselectedItem:e=>`${e.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${t.number(e.count)} عنصر محدد`,other:()=>`${t.number(e.count)} عنصر محدد`})}.`,selectedItem:e=>`${e.item} المحدد`};var PD={};PD={deselectedItem:e=>`${e.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Няма избрани елементи",one:()=>`${t.number(e.count)} избран елемент`,other:()=>`${t.number(e.count)} избрани елементи`})}.`,selectedItem:e=>`${e.item} избран.`};var ED={};ED={deselectedItem:e=>`Položka ${e.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${t.number(e.count)} položka`,other:()=>`Vybráno ${t.number(e.count)} položek`})}.`,selectedItem:e=>`Vybrána položka ${e.item}.`};var TD={};TD={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer valgt",one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var AD={};AD={deselectedItem:e=>`${e.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${t.number(e.count)} Element ausgewählt`,other:()=>`${t.number(e.count)} Elemente ausgewählt`})}.`,selectedItem:e=>`${e.item} ausgewählt.`};var _D={};_D={deselectedItem:e=>`Δεν επιλέχθηκε το στοιχείο ${e.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${t.number(e.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${t.number(e.count)} στοιχεία`})}.`,selectedItem:e=>`Επιλέχθηκε το στοιχείο ${e.item}.`};var $D={};$D={deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var ID={};ID={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ningún elemento seleccionado",one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var ND={};ND={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Üksusi pole valitud",one:()=>`${t.number(e.count)} üksus valitud`,other:()=>`${t.number(e.count)} üksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var DD={};DD={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var MD={};MD={deselectedItem:e=>`${e.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Aucun élément sélectionné",one:()=>`${t.number(e.count)} élément sélectionné`,other:()=>`${t.number(e.count)} éléments sélectionnés`})}.`,selectedItem:e=>`${e.item} sélectionné.`};var OD={};OD={deselectedItem:e=>`${e.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${t.number(e.count)} נבחר`,other:()=>`${t.number(e.count)} פריטים נבחרו`})}.`,selectedItem:e=>`${e.item} נבחר.`};var jD={};jD={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var LD={};LD={deselectedItem:e=>`${e.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${t.number(e.count)} elem kijelölve`,other:()=>`${t.number(e.count)} elem kijelölve`})}.`,selectedItem:e=>`${e.item} kijelölve.`};var FD={};FD={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nessun elemento selezionato",one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var BD={};BD={deselectedItem:e=>`${e.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"項目が選択されていません",one:()=>`${t.number(e.count)} 項目を選択しました`,other:()=>`${t.number(e.count)} 項目を選択しました`})}。`,selectedItem:e=>`${e.item} を選択しました。`};var zD={};zD={deselectedItem:e=>`${e.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"선택된 항목이 없습니다",one:()=>`${t.number(e.count)}개 항목이 선택되었습니다`,other:()=>`${t.number(e.count)}개 항목이 선택되었습니다`})}.`,selectedItem:e=>`${e.item}이(가) 선택되었습니다.`};var KD={};KD={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta elementų: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var VD={};VD={deselectedItem:e=>`Vienums ${e.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlasīts vienums ${e.item}.`};var RD={};RD={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer er valgt",one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var WD={};WD={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Geen items geselecteerd",one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var UD={};UD={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych elementów`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var HD={};HD={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var qD={};qD={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var GD={};GD={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Niciun element selectat",one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var ZD={};ZD={deselectedItem:e=>`${e.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Нет выбранных элементов",one:()=>`${t.number(e.count)} элемент выбран`,other:()=>`${t.number(e.count)} элементов выбрано`})}.`,selectedItem:e=>`${e.item} выбрано.`};var YD={};YD={deselectedItem:e=>`Nevybraté položky: ${e.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Žiadne vybraté položky",one:()=>`${t.number(e.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybraté položky: ${e.item}.`};var JD={};JD={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Noben element ni izbran",one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var XD={};XD={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var QD={};QD={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Inga markerade objekt",one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var e9={};e9={deselectedItem:e=>`${e.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${t.number(e.count)} öge seçildi`,other:()=>`${t.number(e.count)} öge seçildi`})}.`,selectedItem:e=>`${e.item} seçildi.`};var t9={};t9={deselectedItem:e=>`${e.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Жодних елементів не вибрано",one:()=>`${t.number(e.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} вибрано.`};var r9={};r9={deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`};var n9={};n9={deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未選取任何項目",one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`};var Th={};Th={"ar-AE":kD,"bg-BG":PD,"cs-CZ":ED,"da-DK":TD,"de-DE":AD,"el-GR":_D,"en-US":$D,"es-ES":ID,"et-EE":ND,"fi-FI":DD,"fr-FR":MD,"he-IL":OD,"hr-HR":jD,"hu-HU":LD,"it-IT":FD,"ja-JP":BD,"ko-KR":zD,"lt-LT":KD,"lv-LV":VD,"nb-NO":RD,"nl-NL":WD,"pl-PL":UD,"pt-BR":HD,"pt-PT":qD,"ro-RO":GD,"ru-RU":ZD,"sk-SK":YD,"sl-SI":JD,"sr-SP":XD,"sv-SE":QD,"tr-TR":e9,"uk-UA":t9,"zh-CN":r9,"zh-TW":n9};const o9=7e3;let Ci=null;function i9(e,t="assertive",r=o9){Ci?Ci.announce(e,t,r):(Ci=new tse,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Ci.announce(e,t,r):setTimeout(()=>{Ci?.isAttached()&&Ci?.announce(e,t,r)},100))}class tse{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",t),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,r="assertive",n=o9){var o,i;if(!this.node)return;let s=document.createElement("div");typeof t=="object"?(s.setAttribute("role","img"),s.setAttribute("aria-labelledby",t["aria-labelledby"])):s.textContent=t,r==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(s):(i=this.politeLog)===null||i===void 0||i.appendChild(s),t!==""&&setTimeout(()=>{s.remove()},n)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function rse(e){return e&&e.__esModule?e.default:e}function nse(e,t){let{getRowText:r=a=>{var l,c,d,f;return(f=(l=(c=t.collection).getTextValue)===null||l===void 0?void 0:l.call(c,a))!==null&&f!==void 0?f:(d=t.collection.getItem(a))===null||d===void 0?void 0:d.textValue}}=e,n=ms(rse(Th),"@react-aria/grid"),o=t.selectionManager.rawSelection,i=x.useRef(o),s=x.useCallback(()=>{var a;if(!t.selectionManager.isFocused||o===i.current){i.current=o;return}let l=s9(o,i.current),c=s9(i.current,o),d=t.selectionManager.selectionBehavior==="replace",f=[];if(t.selectionManager.selectedKeys.size===1&&d){let m=t.selectionManager.selectedKeys.keys().next().value;if(m!=null&&t.collection.getItem(m)){let g=r(m);g&&f.push(n.format("selectedItem",{item:g}))}}else if(l.size===1&&c.size===0){let m=l.keys().next().value;if(m!=null){let g=r(m);g&&f.push(n.format("selectedItem",{item:g}))}}else if(c.size===1&&l.size===0){let m=c.keys().next().value;if(m!=null&&t.collection.getItem(m)){let g=r(m);g&&f.push(n.format("deselectedItem",{item:g}))}}t.selectionManager.selectionMode==="multiple"&&(f.length===0||o==="all"||o.size>1||i.current==="all"||((a=i.current)===null||a===void 0?void 0:a.size)>1)&&f.push(o==="all"?n.format("selectedAll"):n.format("selectedCount",{count:o.size})),f.length>0&&i9(f.join(" ")),i.current=o},[o,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,r,n]);hS(()=>{if(t.selectionManager.isFocused)s();else{let a=requestAnimationFrame(s);return()=>cancelAnimationFrame(a)}},[o,t.selectionManager.isFocused])}function s9(e,t){let r=new Set;if(e==="all"||t==="all")return r;for(let n of e.keys())t.has(n)||r.add(n);return r}function ose(e){return e&&e.__esModule?e.default:e}function ise(e){let t=ms(ose(Th),"@react-aria/grid"),r=AR(),n=(r==="pointer"||r==="virtual"||r==null)&&typeof window<"u"&&"ontouchstart"in window,o=x.useMemo(()=>{let s=e.selectionManager.selectionMode,a=e.selectionManager.selectionBehavior,l;return n&&(l=t.format("longPressToSelect")),a==="replace"&&s!=="none"&&e.hasItemActions?l:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,n]);return af(o)}function sse(e,t,r){let{isVirtualized:n,disallowTypeAhead:o,keyboardDelegate:i,focusMode:s,scrollRef:a,getRowText:l,onRowAction:c,onCellAction:d,escapeKeyBehavior:f="clearSelection",shouldSelectOnPressUp:m}=e,{selectionManager:g}=t;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let b=ff({usage:"search",sensitivity:"base"}),{direction:y}=jn(),v=t.selectionManager.disabledBehavior,C=x.useMemo(()=>i||new SD({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:v,ref:r,direction:y,collator:b,focusMode:s}),[i,t.collection,t.disabledKeys,v,r,y,b,s]),{collectionProps:S}=e0({ref:r,selectionManager:g,keyboardDelegate:C,isVirtualized:n,scrollRef:a,disallowTypeAhead:o,escapeKeyBehavior:f}),k=rn(e.id);W1.set(t,{keyboardDelegate:C,actions:{onRowAction:c,onCellAction:d},shouldSelectOnPressUp:m});let P=ise({selectionManager:g,hasItemActions:!!(c||d)}),E=Ln(e,{labelable:!0}),$=x.useCallback(M=>{if(g.isFocused){M.currentTarget.contains(M.target)||g.setFocused(!1);return}M.currentTarget.contains(M.target)&&g.setFocused(!0)},[g]),O=x.useMemo(()=>({onBlur:S.onBlur,onFocus:$}),[$,S.onBlur]),N=s3(r,{isDisabled:t.collection.size!==0}),D=it(E,{role:"grid",id:k,"aria-multiselectable":g.selectionMode==="multiple"?"true":void 0},t.isKeyboardNavigationDisabled?O:S,t.collection.size===0&&{tabIndex:N?-1:0}||void 0,P);return n&&(D["aria-rowcount"]=t.collection.size,D["aria-colcount"]=t.collection.columnCount),nse({getRowText:l},t),{gridProps:D}}function ase(){return{rowGroupProps:{role:"rowgroup"}}}function lse(e,t,r){var n,o;let{node:i,isVirtualized:s,shouldSelectOnPressUp:a,onAction:l}=e,{actions:c,shouldSelectOnPressUp:d}=W1.get(t),f=c.onRowAction?()=>{var v;return(v=c.onRowAction)===null||v===void 0?void 0:v.call(c,i.key)}:l,{itemProps:m,...g}=_p({selectionManager:t.selectionManager,key:i.key,ref:r,isVirtualized:s,shouldSelectOnPressUp:d||a,onAction:f||!(i==null||(n=i.props)===null||n===void 0)&&n.onAction?gs(i==null||(o=i.props)===null||o===void 0?void 0:o.onAction,f):void 0,isDisabled:t.collection.size===0}),b=t.selectionManager.isSelected(i.key),y={role:"row","aria-selected":t.selectionManager.selectionMode!=="none"?b:void 0,"aria-disabled":g.isDisabled||void 0,...m};return s&&(y["aria-rowindex"]=i.index+1),{rowProps:y,...g}}function a9(e,t,r){let{node:n,isVirtualized:o,focusMode:i="child",shouldSelectOnPressUp:s,onAction:a}=e,{direction:l}=jn(),{keyboardDelegate:c,actions:{onCellAction:d}}=W1.get(t),f=x.useRef(null),m=()=>{if(r.current){let k=Gn(r.current);if(i==="child"){if(r.current.contains(document.activeElement)&&r.current!==document.activeElement)return;let P=t.selectionManager.childFocusStrategy==="last"?U1(k):k.firstChild();if(P){wn(P);return}}(f.current!=null&&n.key!==f.current||!r.current.contains(document.activeElement))&&wn(r.current)}},{itemProps:g,isPressed:b}=_p({selectionManager:t.selectionManager,key:n.key,ref:r,isVirtualized:o,focus:m,shouldSelectOnPressUp:s,onAction:d?()=>d(n.key):a,isDisabled:t.collection.size===0}),y=k=>{if(!k.currentTarget.contains(k.target)||t.isKeyboardNavigationDisabled||!r.current||!document.activeElement)return;let P=Gn(r.current);switch(P.currentNode=document.activeElement,k.key){case"ArrowLeft":{let M=l==="rtl"?P.nextNode():P.previousNode();if(i==="child"&&M===r.current&&(M=null),k.preventDefault(),k.stopPropagation(),M)wn(M),xs(M,{containingElement:ys(r.current)});else{var E;if(((E=c.getKeyLeftOf)===null||E===void 0?void 0:E.call(c,n.key))!==n.key){var $;($=r.current.parentElement)===null||$===void 0||$.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent));break}i==="cell"&&l==="rtl"?(wn(r.current),xs(r.current,{containingElement:ys(r.current)})):(P.currentNode=r.current,M=l==="rtl"?P.firstChild():U1(P),M&&(wn(M),xs(M,{containingElement:ys(r.current)})))}break}case"ArrowRight":{let M=l==="rtl"?P.previousNode():P.nextNode();if(i==="child"&&M===r.current&&(M=null),k.preventDefault(),k.stopPropagation(),M)wn(M),xs(M,{containingElement:ys(r.current)});else{var O;if(((O=c.getKeyRightOf)===null||O===void 0?void 0:O.call(c,n.key))!==n.key){var N;(N=r.current.parentElement)===null||N===void 0||N.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent));break}i==="cell"&&l==="ltr"?(wn(r.current),xs(r.current,{containingElement:ys(r.current)})):(P.currentNode=r.current,M=l==="rtl"?U1(P):P.firstChild(),M&&(wn(M),xs(M,{containingElement:ys(r.current)})))}break}case"ArrowUp":case"ArrowDown":if(!k.altKey&&r.current.contains(k.target)){var D;k.stopPropagation(),k.preventDefault(),(D=r.current.parentElement)===null||D===void 0||D.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent))}break}},v=k=>{if(f.current=n.key,k.target!==r.current){Kl()||t.selectionManager.setFocusedKey(n.key);return}requestAnimationFrame(()=>{i==="child"&&document.activeElement===r.current&&m()})},C=it(g,{role:"gridcell",onKeyDownCapture:y,"aria-colspan":n.colSpan,"aria-colindex":n.colIndex!=null?n.colIndex+1:void 0,colSpan:o?void 0:n.colSpan,onFocus:v});var S;return o&&(C["aria-colindex"]=((S=n.colIndex)!==null&&S!==void 0?S:n.index)+1),s&&C.tabIndex!=null&&C.onPointerDown==null&&(C.onPointerDown=k=>{let P=k.currentTarget,E=P.getAttribute("tabindex");P.removeAttribute("tabindex"),requestAnimationFrame(()=>{E!=null&&P.setAttribute("tabindex",E)})}),{gridCellProps:C,isPressed:b}}function U1(e){let t=null,r=null;do r=e.lastChild(),r&&(t=r);while(r);return t}function use(e){return e&&e.__esModule?e.default:e}function cse(e,t){let{key:r}=e,n=t.selectionManager,o=rn(),i=!t.selectionManager.canSelectItem(r),s=t.selectionManager.isSelected(r),a=()=>n.toggleSelection(r);const l=ms(use(Th),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":l.format("select"),isSelected:s,isDisabled:i,onChange:a}}}class dse extends SD{isCell(t){return t.type==="cell"||t.type==="rowheader"||t.type==="column"}getKeyBelow(t){let r=this.collection.getItem(t);if(!r)return null;if(r.type==="column"){let n=Wi(Qr(r,this.collection));if(n)return n.key;let o=this.getFirstKey();return o==null||!this.collection.getItem(o)?null:super.getKeyForItemInRowByIndex(o,r.index)}return super.getKeyBelow(t)}getKeyAbove(t){let r=this.collection.getItem(t);if(!r)return null;if(r.type==="column"){let i=r.parentKey!=null?this.collection.getItem(r.parentKey):null;return i&&i.type==="column"?i.key:null}let n=super.getKeyAbove(t),o=n!=null?this.collection.getItem(n):null;return o&&o.type!=="headerrow"?n:this.isCell(r)?this.collection.columns[r.index].key:this.collection.columns[0].key}findNextColumnKey(t){let r=this.findNextKey(t.key,o=>o.type==="column");if(r!=null)return r;let n=this.collection.headerRows[t.level];for(let o of Qr(n,this.collection))if(o.type==="column")return o.key;return null}findPreviousColumnKey(t){let r=this.findPreviousKey(t.key,i=>i.type==="column");if(r!=null)return r;let n=this.collection.headerRows[t.level],o=[...Qr(n,this.collection)];for(let i=o.length-1;i>=0;i--){let s=o[i];if(s.type==="column")return s.key}return null}getKeyRightOf(t){let r=this.collection.getItem(t);return r?r.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(r):this.findNextColumnKey(r):super.getKeyRightOf(t):null}getKeyLeftOf(t){let r=this.collection.getItem(t);return r?r.type==="column"?this.direction==="rtl"?this.findNextColumnKey(r):this.findPreviousColumnKey(r):super.getKeyLeftOf(t):null}getKeyForSearch(t,r){if(!this.collator)return null;let n=this.collection,o=r??this.getFirstKey();if(o==null)return null;let i=n.getItem(o);var s;i?.type==="cell"&&(o=(s=i.parentKey)!==null&&s!==void 0?s:null);let a=!1;for(;o!=null;){let l=n.getItem(o);if(!l)return null;if(l.textValue){let c=l.textValue.slice(0,t.length);if(this.collator.compare(c,t)===0)return l.key}for(let c of Qr(l,this.collection)){let d=n.columns[c.index];if(n.rowHeaderColumnKeys.has(d.key)&&c.textValue){let f=c.textValue.slice(0,t.length);if(this.collator.compare(f,t)===0){let m=r!=null?n.getItem(r):i;return m?.type==="cell"?c.key:l.key}}}o=this.getKeyBelow(o),o==null&&!a&&(o=this.getFirstKey(),a=!0)}return null}}function fse(e){return e&&e.__esModule?e.default:e}function pse(e,t,r){let{keyboardDelegate:n,isVirtualized:o,layoutDelegate:i,layout:s}=e,a=ff({usage:"search",sensitivity:"base"}),{direction:l}=jn(),c=t.selectionManager.disabledBehavior,d=x.useMemo(()=>n||new dse({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:c,ref:r,direction:l,collator:a,layoutDelegate:i,layout:s}),[n,t.collection,t.disabledKeys,c,r,l,a,i,s]),f=rn(e.id);V1.set(t,f);let{gridProps:m}=sse({...e,id:f,keyboardDelegate:d},t,r);o&&(m["aria-rowcount"]=t.collection.size+t.collection.headerRows.length),Gd()&&"expandedKeys"in t&&(m.role="treegrid");let{column:g,direction:b}=t.sortDescriptor||{},y=ms(fse(Eh),"@react-aria/table"),v=x.useMemo(()=>{var S,k;let P=(k=(S=t.collection.columns.find(E=>E.key===g))===null||S===void 0?void 0:S.textValue)!==null&&k!==void 0?k:"";return b&&g?y.format(`${b}Sort`,{columnName:P}):void 0},[b,g,t.collection.columns]),C=af(v);return hS(()=>{v&&i9(v,"assertive",500)},[v]),{gridProps:it(m,C,{"aria-describedby":[C["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")})}}function hse(e){return e&&e.__esModule?e.default:e}function l9(e,t,r){var n,o;let{node:i}=e,s=i.props.allowsSorting,{gridCellProps:a}=a9({...e,focusMode:"child"},t,r),l=i.props.isSelectionCell&&t.selectionManager.selectionMode==="single",{pressProps:c,isPressed:d}=xn({isDisabled:!s||l,onPress(){t.sort(i.key)},ref:r}),{focusableProps:f}=Bi({},r),m,g=((n=t.sortDescriptor)===null||n===void 0?void 0:n.column)===i.key,b=(o=t.sortDescriptor)===null||o===void 0?void 0:o.direction;i.props.allowsSorting&&!Ju()&&(m=g?b:"none");let y=ms(hse(Eh),"@react-aria/table"),v;s&&(v=`${y.format("sortable")}`,g&&b&&Ju()&&(v=`${v}, ${y.format(b)}`));let C=af(v),S=t.collection.size===0;return x.useEffect(()=>{S&&t.selectionManager.focusedKey===i.key&&t.selectionManager.setFocusedKey(null)},[S,t.selectionManager,i.key]),{columnHeaderProps:{...it(f,a,c,C,S?{tabIndex:-1}:null),role:"columnheader",id:Qie(t,i.key),"aria-colspan":i.colSpan&&i.colSpan>1?i.colSpan:void 0,"aria-sort":m},isPressed:d}}const u9={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function mse(e,t,r){let{node:n,isVirtualized:o}=e,{rowProps:i,...s}=lse(e,t,r),{direction:a}=jn();o&&!(Gd()&&"expandedKeys"in t)?i["aria-rowindex"]=n.index+1+t.collection.headerRows.length:delete i["aria-rowindex"];let l={};if(Gd()&&"expandedKeys"in t){let E=t.keyMap.get(n.key);if(E!=null){var c,d,f,m,g,b;let $=((c=E.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((f=E.props)===null||f===void 0||(d=f.children)===null||d===void 0?void 0:d.length)>t.userColumnCount;var y,v,C,S;l={onKeyDown:O=>{(O.key===u9.expand[a]&&t.selectionManager.focusedKey===E.key&&$&&t.expandedKeys!=="all"&&!t.expandedKeys.has(E.key)||O.key===u9.collapse[a]&&t.selectionManager.focusedKey===E.key&&$&&(t.expandedKeys==="all"||t.expandedKeys.has(E.key)))&&(t.toggleKey(E.key),O.stopPropagation())},"aria-expanded":$?t.expandedKeys==="all"||t.expandedKeys.has(n.key):void 0,"aria-level":E.level,"aria-posinset":((y=E.indexOfType)!==null&&y!==void 0?y:0)+1,"aria-setsize":E.level>1?((C=(m=Ls((v=(g=t.keyMap.get(E.parentKey))===null||g===void 0?void 0:g.childNodes)!==null&&v!==void 0?v:[]))===null||m===void 0?void 0:m.indexOfType)!==null&&C!==void 0?C:0)+1:((S=(b=Ls(t.collection.body.childNodes))===null||b===void 0?void 0:b.indexOfType)!==null&&S!==void 0?S:0)+1}}}let k=KF(n.props),P=s.hasAction?k:{};return{rowProps:{...it(i,l,P),"aria-labelledby":VN(t,n.key)},...s}}function gse(e,t,r){let{node:n,isVirtualized:o}=e,i={role:"row"};return o&&!(Gd()&&"expandedKeys"in t)&&(i["aria-rowindex"]=n.index+1),{rowProps:i}}function c9(e,t,r){var n;let{gridCellProps:o,isPressed:i}=a9(e,t,r),s=(n=e.node.column)===null||n===void 0?void 0:n.key;return s!=null&&t.collection.rowHeaderColumnKeys.has(s)&&(o.role="rowheader",o.id=KN(t,e.node.parentKey,s)),{gridCellProps:o,isPressed:i}}function bse(e){return e&&e.__esModule?e.default:e}function vse(e,t){let{key:r}=e;const{checkboxProps:n}=cse(e,t);return{checkboxProps:{...n,"aria-labelledby":`${n.id} ${VN(t,r)}`}}}function yse(e){let{isEmpty:t,isSelectAll:r,selectionMode:n}=e.selectionManager;return{checkboxProps:{"aria-label":ms(bse(Eh),"@react-aria/table").format(n==="single"?"select":"selectAll"),isSelected:r,isDisabled:n!=="multiple"||e.collection.size===0||e.collection.rows.length===1&&e.collection.rows[0].type==="loader",isIndeterminate:!t&&!r,onChange:()=>e.selectionManager.toggleSelectAll()}}}function H1(){return ase()}var d9=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,slots:a,state:l,selectionMode:c,color:d,checkboxesProps:f,disableAnimation:m,classNames:g,...b}=e,y=o||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=l9({node:s},l,C),{isFocusVisible:k,focusProps:P}=Ir(),{checkboxProps:E}=yse(l),$=A(g?.th,i,(r=s.props)==null?void 0:r.className),O=c==="single",{onChange:N,...D}=E;return h.jsx(y,{ref:C,"data-focus-visible":ae(k),...Oe(S,P,Lt(s.props,{enabled:v}),Lt(b,{enabled:v})),className:(n=a.th)==null?void 0:n.call(a,{class:$}),children:O?h.jsx(Vl,{children:E["aria-label"]}):h.jsx(sh,{color:d,disableAnimation:m,onValueChange:N,...Oe(f,D)})})});d9.displayName="HeroUI.TableSelectAllCheckbox";var f9=d9;function xse(e){let{collection:t,focusMode:r}=e,n=e.UNSAFE_selectionState||bT(e),o=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=n.setFocusedKey;n.setFocusedKey=(l,c)=>{if(r==="cell"&&l!=null){let b=t.getItem(l);if(b?.type==="item"){var d,f;let y=Qr(b,t);var m,g;c==="last"?l=(m=(d=Ls(y))===null||d===void 0?void 0:d.key)!==null&&m!==void 0?m:null:l=(g=(f=Wi(y))===null||f===void 0?void 0:f.key)!==null&&g!==void 0?g:null}}i(l,c)};let s=x.useMemo(()=>new Np(t,n),[t,n]);const a=x.useRef(null);return x.useEffect(()=>{if(n.focusedKey!=null&&a.current&&!t.getItem(n.focusedKey)){const l=a.current.getItem(n.focusedKey),c=l?.parentKey!=null&&(l.type==="cell"||l.type==="rowheader"||l.type==="column")?a.current.getItem(l.parentKey):l;if(!c){n.setFocusedKey(null);return}const d=a.current.rows,f=t.rows,m=d.length-f.length;let g=Math.min(m>1?Math.max(c.index-m+1,0):c.index,f.length-1),b=null;for(;g>=0;){if(!s.isDisabled(f[g].key)&&f[g].type!=="headerrow"){b=f[g];break}g<f.length-1?g++:(g>c.index&&(g=c.index),g--)}if(b){const y=b.hasChildNodes?[...Qr(b,t)]:[],v=b.hasChildNodes&&c!==l&&l&&l.index<y.length?y[l.index].key:b.key;n.setFocusedKey(v)}else n.setFocusedKey(null)}a.current=t},[t,s,n,n.focusedKey]),{collection:t,disabledKeys:o,isKeyboardNavigationDisabled:!1,selectionManager:s}}class wse{*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){var t;return(t=[...this.rows][0])===null||t===void 0?void 0:t.key}getLastKey(){var t;let r=[...this.rows];return(t=r[r.length-1])===null||t===void 0?void 0:t.key}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){let r=this.keyMap.get(t);return r?.childNodes||[]}constructor(t){this.keyMap=new Map,this.keyMap=new Map,this.columnCount=t?.columnCount,this.rows=[];let r=f=>{let m=this.keyMap.get(f.key);t.visitNode&&(f=t.visitNode(f)),this.keyMap.set(f.key,f);let g=new Set,b=null,y=!1;if(f.type==="item"){var v;for(let E of f.childNodes)if(((v=E.props)===null||v===void 0?void 0:v.colSpan)!==void 0){y=!0;break}}for(let E of f.childNodes){if(E.type==="cell"&&y){var C,S;E.colspan=(C=E.props)===null||C===void 0?void 0:C.colSpan,E.colSpan=(S=E.props)===null||S===void 0?void 0:S.colSpan;var k,P;E.colIndex=b?((k=b.colIndex)!==null&&k!==void 0?k:b.index)+((P=b.colSpan)!==null&&P!==void 0?P:1):E.index}E.type==="cell"&&E.parentKey==null&&(E.parentKey=f.key),g.add(E.key),b?(b.nextKey=E.key,E.prevKey=b.key):E.prevKey=null,r(E),b=E}if(b&&(b.nextKey=null),m)for(let E of m.childNodes)g.has(E.key)||n(E)},n=f=>{this.keyMap.delete(f.key);for(let m of f.childNodes)this.keyMap.get(m.key)===m&&n(m)},o=null;for(let[f,m]of t.items.entries()){var i,s,a,l,c,d;let g={...m,level:(i=m.level)!==null&&i!==void 0?i:0,key:(s=m.key)!==null&&s!==void 0?s:"row-"+f,type:(a=m.type)!==null&&a!==void 0?a:"row",value:(l=m.value)!==null&&l!==void 0?l:null,hasChildNodes:!0,childNodes:[...m.childNodes],rendered:m.rendered,textValue:(c=m.textValue)!==null&&c!==void 0?c:"",index:(d=m.index)!==null&&d!==void 0?d:f};o?(o.nextKey=g.key,g.prevKey=o.key):g.prevKey=null,this.rows.push(g),r(g),o=g}o&&(o.nextKey=null)}}const p9="row-header-column-"+Math.random().toString(36).slice(2);let q1="row-header-column-"+Math.random().toString(36).slice(2);for(;p9===q1;)q1="row-header-column-"+Math.random().toString(36).slice(2);function Cse(e,t){if(t.length===0)return[];let r=[],n=new Map;for(let d of t){let f=d.parentKey,m=[d];for(;f;){let g=e.get(f);if(!g)break;if(n.has(g)){var o,i;(i=(o=g).colSpan)!==null&&i!==void 0||(o.colSpan=0),g.colSpan++,g.colspan=g.colSpan;let{column:b,index:y}=n.get(g);if(y>m.length)break;for(let v=y;v<m.length;v++)b.splice(v,0,null);for(let v=m.length;v<b.length;v++)b[v]&&n.has(b[v])&&(n.get(b[v]).index=v)}else g.colSpan=1,g.colspan=1,m.push(g),n.set(g,{column:m,index:m.length-1});f=g.parentKey}r.push(m),d.index=r.length-1}let s=Math.max(...r.map(d=>d.length)),a=Array(s).fill(0).map(()=>[]),l=0;for(let d of r){let f=s-1;for(let m of d){if(m){let g=a[f],b=g.reduce((y,v)=>{var C;return y+((C=v.colSpan)!==null&&C!==void 0?C:1)},0);if(b<l){let y={type:"placeholder",key:"placeholder-"+m.key,colspan:l-b,colSpan:l-b,index:b,value:null,rendered:null,level:f,hasChildNodes:!1,childNodes:[],textValue:""};g.length>0&&(g[g.length-1].nextKey=y.key,y.prevKey=g[g.length-1].key),g.push(y)}g.length>0&&(g[g.length-1].nextKey=m.key,m.prevKey=g[g.length-1].key),m.level=f,m.colIndex=l,g.push(m)}f--}l++}let c=0;for(let d of a){let f=d.reduce((m,g)=>{var b;return m+((b=g.colSpan)!==null&&b!==void 0?b:1)},0);if(f<t.length){let m={type:"placeholder",key:"placeholder-"+d[d.length-1].key,colSpan:t.length-f,colspan:t.length-f,index:f,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:"",prevKey:d[d.length-1].key};d.push(m)}c++}return a.map((d,f)=>({type:"headerrow",key:"headerrow-"+f,index:f,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:d,textValue:""}))}class Sse extends wse{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return(n=r?.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return(n=r?.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){var t,r;return(r=(t=Wi(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&r!==void 0?r:null}getLastKey(){var t,r;return(r=(t=Ls(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&r!==void 0?r:null}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){return t===this.body.key?this.body.childNodes:super.getChildren(t)}getTextValue(t){let r=this.getItem(t);if(!r)return"";if(r.textValue)return r.textValue;let n=this.rowHeaderColumnKeys;if(n){let o=[];for(let i of r.childNodes){let s=this.columns[i.index];if(n.has(s.key)&&i.textValue&&o.push(i.textValue),o.length===n.size)break}return o.join(" ")}return""}constructor(t,r,n){let o=new Set,i=null,s=[];if(n?.showSelectionCheckboxes){let f={type:"column",key:p9,value:null,textValue:"",level:0,index:n?.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};s.unshift(f)}if(n?.showDragButtons){let f={type:"column",key:q1,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};s.unshift(f)}let a=[],l=new Map,c=f=>{switch(f.type){case"body":i=f;break;case"column":l.set(f.key,f),f.hasChildNodes||(s.push(f),f.props.isRowHeader&&o.add(f.key));break;case"item":a.push(f);return}for(let m of f.childNodes)c(m)};for(let f of t)c(f);let d=Cse(l,s);if(d.forEach((f,m)=>a.splice(m,0,f)),super({columnCount:s.length,items:a,visitNode:f=>(f.column=s[f.index],f)}),this._size=0,this.columns=s,this.rowHeaderColumnKeys=o,this.body=i,this.headerRows=d,this._size=[...i.childNodes].length,this.rowHeaderColumnKeys.size===0){let f=this.columns.find(m=>{var g,b;return!(!((g=m.props)===null||g===void 0)&&g.isDragButtonCell)&&!(!((b=m.props)===null||b===void 0)&&b.isSelectionCell)});f&&this.rowHeaderColumnKeys.add(f.key)}}}const kse={ascending:"descending",descending:"ascending"};function Pse(e){let[t,r]=x.useState(!1),{selectionMode:n="none",showSelectionCheckboxes:o,showDragButtons:i}=e,s=x.useMemo(()=>({showSelectionCheckboxes:o&&n!=="none",showDragButtons:i,selectionMode:n,columns:[]}),[e.children,o,n,i]),a=CT(e,x.useCallback(f=>new Sse(f,null,s),[s]),s),{disabledKeys:l,selectionManager:c}=xse({...e,collection:a,disabledBehavior:e.disabledBehavior||"selection"});var d;return{collection:a,disabledKeys:l,selectionManager:c,showSelectionCheckboxes:e.showSelectionCheckboxes||!1,sortDescriptor:(d=e.sortDescriptor)!==null&&d!==void 0?d:null,isKeyboardNavigationDisabled:a.size===0||t,setKeyboardNavigationDisabled:r,sort(f,m){var g,b;(b=e.onSortChange)===null||b===void 0||b.call(e,{column:f,direction:m??(((g=e.sortDescriptor)===null||g===void 0?void 0:g.column)===f?kse[e.sortDescriptor.direction]:"ascending")})}}}function h9(e){return null}h9.getCollectionNode=function*(t,r){let{children:n,columns:o}=t;if(r.columns=[],typeof n=="function"){if(!o)throw new Error("props.children was a function but props.columns is missing");for(let i of o)yield{type:"column",value:i,renderer:n}}else{let i=[];x.Children.forEach(n,s=>{i.push({type:"column",element:s})}),yield*i}};let Ese=h9;function m9(e){return null}m9.getCollectionNode=function*(t){let{children:r,items:n}=t;yield{type:"body",hasChildNodes:!0,props:t,*childNodes(){if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");for(let o of n)yield{type:"item",value:o,renderer:r}}else{let o=[];x.Children.forEach(r,i=>{o.push({type:"item",element:i})}),yield*o}}}};let Tse=m9;function g9(e){return null}g9.getCollectionNode=function*(t,r){let{title:n,children:o,childColumns:i}=t,s=n||o,a=t.textValue||(typeof s=="string"?s:"")||t["aria-label"],l=yield{type:"column",hasChildNodes:!!i||!!n&&x.Children.count(o)>0,rendered:s,textValue:a,props:t,*childNodes(){if(i)for(let d of i)yield{type:"column",value:d};else if(n){let d=[];x.Children.forEach(o,f=>{d.push({type:"column",element:f})}),yield*d}},shouldInvalidate(d){return c(d),!1}},c=d=>{for(let f of l)f.hasChildNodes||d.columns.push(f)};c(r)};let Ase=g9;function G1(e){return null}G1.getCollectionNode=function*(t,r){let{children:n,textValue:o,UNSTABLE_childItems:i}=t;yield{type:"item",props:t,textValue:o,"aria-label":t["aria-label"],hasChildNodes:!0,*childNodes(){if(r.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),r.showSelectionCheckboxes&&r.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof n=="function"){for(let s of r.columns)yield{type:"cell",element:n(s.key),key:s.key};if(i)for(let s of i)yield{type:"item",value:s}}else{let s=[],a=[],l=0;if(x.Children.forEach(n,c=>{if(c.type===G1){if(s.length<r.columns.length)throw new Error("All of a Row's child Cells must be positioned before any child Rows.");a.push({type:"item",element:c})}else{s.push({type:"cell",element:c});var d;l+=(d=c.props.colSpan)!==null&&d!==void 0?d:1}}),l!==r.columns.length)throw new Error(`Cell count must match column count. Found ${l} cells and ${r.columns.length} columns.`);yield*s,yield*a}},shouldInvalidate(s){return s.columns.length!==r.columns.length||s.columns.some((a,l)=>a.key!==r.columns[l].key)||s.showSelectionCheckboxes!==r.showSelectionCheckboxes||s.showDragButtons!==r.showDragButtons||s.selectionMode!==r.selectionMode}}};let _se=G1;function b9(e){return null}b9.getCollectionNode=function*(t){let{children:r}=t,n=t.textValue||(typeof r=="string"?r:"")||t["aria-label"]||"";yield{type:"cell",props:t,rendered:r,textValue:n,"aria-label":t["aria-label"],hasChildNodes:!1}};let $se=b9;function v9(e){var t;const r=ur(),[n,o]=qr(e,HC.variantKeys),{ref:i,as:s,baseRef:a,children:l,className:c,classNames:d,removeWrapper:f=!1,disableAnimation:m=(t=r?.disableAnimation)!=null?t:!1,isKeyboardNavigationDisabled:g=!1,selectionMode:b="none",topContentPlacement:y="inside",bottomContentPlacement:v="inside",selectionBehavior:C=b==="none"?null:"toggle",disabledBehavior:S="selection",showSelectionCheckboxes:k=b==="multiple"&&C!=="replace",BaseComponent:P="div",checkboxesProps:E,topContent:$,bottomContent:O,sortIcon:N,onRowAction:D,onCellAction:M,...V}=n,R=s||"table",K=typeof R=="string",j=ot(i),B=ot(a),U=Pse({...e,children:l,showSelectionCheckboxes:k});g&&!U.isKeyboardNavigationDisabled&&U.setKeyboardNavigationDisabled(!0);const{collection:W}=U,{layout:L,...Z}=e,{gridProps:T}=pse({...Z},U,j),F=b!=="none",_=b==="multiple",H=x.useMemo(()=>HC({...o,isSelectable:F,isMultiSelectable:_}),[jr(o),F,_]),Y=A(d?.base,c),X=x.useMemo(()=>{var ue;return{state:U,slots:H,isSelectable:F,collection:W,classNames:d,color:e?.color,disableAnimation:m,checkboxesProps:E,isHeaderSticky:(ue=e?.isHeaderSticky)!=null?ue:!1,selectionMode:b,selectionBehavior:C,disabledBehavior:S,showSelectionCheckboxes:k,onRowAction:D,onCellAction:M}},[H,U,W,F,d,b,C,E,S,m,k,e?.color,e?.isHeaderSticky,D,M]),oe=x.useCallback(ue=>({...ue,ref:B,className:H.base({class:A(Y,ue?.className)})}),[Y,H]),Q=x.useCallback(ue=>({...ue,ref:B,className:H.wrapper({class:A(d?.wrapper,ue?.className)})}),[d?.wrapper,H]),le=x.useCallback(ue=>({...Oe(T,Lt(V,{enabled:K}),ue),onKeyDownCapture:void 0,ref:j,className:H.table({class:A(d?.table,ue?.className)})}),[d?.table,K,H,T,V]);return{BaseComponent:P,Component:R,children:l,state:U,collection:W,values:X,topContent:$,bottomContent:O,removeWrapper:f,topContentPlacement:y,bottomContentPlacement:v,sortIcon:N,getBaseProps:oe,getWrapperProps:Q,getTableProps:le}}var y9=Xe((e,t)=>{var r,n,o;const{as:i,className:s,node:a,rowKey:l,slots:c,state:d,classNames:f,...m}=e,g=i||"td",b=typeof g=="string",y=ot(t),{gridCellProps:v}=c9({node:a},d,y),C=A(f?.td,s,(r=a.props)==null?void 0:r.className),{isFocusVisible:S,focusProps:k}=Ir(),P=d.selectionManager.isSelected(l),E=x.useMemo(()=>{const O=typeof a.rendered;return O!=="object"&&O!=="function"?h.jsx("span",{children:a.rendered}):a.rendered},[a.rendered]),$=((n=a.column)==null?void 0:n.props)||{};return h.jsx(g,{ref:y,"data-focus-visible":ae(S),"data-selected":ae(P),...Oe(v,k,Lt(a.props,{enabled:b}),m),className:(o=c.td)==null?void 0:o.call(c,{align:$.align,class:C}),children:E})});y9.displayName="HeroUI.TableCell";var x9=y9,w9=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,rowKey:a,slots:l,state:c,color:d,disableAnimation:f,checkboxesProps:m,selectionMode:g,classNames:b,...y}=e,v=o||"td",C=typeof v=="string",S=ot(t),{gridCellProps:k}=c9({node:s},c,S),{isFocusVisible:P,focusProps:E}=Ir(),{checkboxProps:$}=vse({key:s?.parentKey||s.key},c),O=A(b?.td,i,(r=s.props)==null?void 0:r.className),N=g==="single",{onChange:D,...M}=$,V=c.selectionManager.isSelected(a);return h.jsx(v,{ref:S,"data-focus-visible":ae(P),"data-selected":ae(V),...Oe(k,E,Lt(s.props,{enabled:C}),y),className:(n=l.td)==null?void 0:n.call(l,{class:O}),children:N?h.jsx(Vl,{children:$["aria-label"]}):h.jsx(sh,{color:d,disableAnimation:f,onValueChange:D,...Oe(m,M)})})});w9.displayName="HeroUI.TableCheckboxCell";var C9=w9,S9=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,state:c,isSelectable:d,classNames:f,...m}=e,g=o||(e?.href?"a":"tr"),b=typeof g=="string",y=ot(t),{rowProps:v}=mse({node:a},c,y),C=A(f?.tr,i,(r=a.props)==null?void 0:r.className),{isFocusVisible:S,focusProps:k}=Ir(),P=c.disabledKeys.has(a.key),E=c.selectionManager.isSelected(a.key),{isHovered:$,hoverProps:O}=dn({isDisabled:P}),{isFirst:N,isLast:D,isMiddle:M,isOdd:V}=x.useMemo(()=>{const R=a.key===c.collection.getFirstKey(),K=a.key===c.collection.getLastKey(),j=!R&&!K,B=a?.index?(a.index+1)%2===0:!1;return{isFirst:R,isLast:K,isMiddle:j,isOdd:B}},[a,c.collection]);return h.jsx(g,{ref:y,"data-disabled":ae(P),"data-first":ae(N),"data-focus-visible":ae(S),"data-hover":ae($),"data-last":ae(D),"data-middle":ae(M),"data-odd":ae(V),"data-selected":ae(E),...Oe(v,k,d?O:{},Lt(a.props,{enabled:b}),m),className:(n=l.tr)==null?void 0:n.call(l,{class:C}),children:s})});S9.displayName="HeroUI.TableRow";var k9=S9,P9=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:f,selectionMode:m,classNames:g,rowVirtualizer:b,...y}=e,v=n||"tbody",C=typeof v=="string",S=ot(t),{rowGroupProps:k}=H1(),P=A(g?.tbody,o),E=a?.body.props,$=E?.isLoading||E?.loadingState==="loading"||E?.loadingState==="loadingMore",O=[...a.body.childNodes],N=b.getVirtualItems();let D,M;return a.size===0&&E.emptyContent&&(D=h.jsx("tr",{role:"row",children:h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!$&&E.emptyContent})})),$&&E.loadingContent&&(M=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:i?.loadingWrapper({class:g?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:E.loadingContent}),!D&&a.size===0?h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper})}):null]})),h.jsxs(v,{ref:S,...Oe(k,Lt(E,{enabled:C}),y),className:(r=i.tbody)==null?void 0:r.call(i,{class:P}),"data-empty":ae(a.size===0),"data-loading":ae($),children:[N.map((V,R)=>{const K=O[V.index];return K?h.jsx(k9,{classNames:g,isSelectable:l,node:K,slots:i,state:s,style:{transform:`translateY(${V.start-R*V.size}px)`,height:`${V.size}px`},children:[...K.childNodes].map(j=>j.props.isSelectionCell?h.jsx(C9,{checkboxesProps:f,classNames:g,color:c,disableAnimation:d,node:j,rowKey:K.key,selectionMode:m,slots:i,state:s},String(j.key)):h.jsx(x9,{classNames:g,node:j,rowKey:K.key,slots:i,state:s},String(j.key)))},String(K.key)):null}),M,D]})});P9.displayName="HeroUI.VirtualizedTableBody";var Ise=P9,Z1=e=>typeof e=="number"?`${e}px`:e,E9=Xe((e,t)=>{var r,n,o,i,s;const{as:a,className:l,state:c,node:d,slots:f,classNames:m,sortIcon:g,...b}=e,y=a||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=l9({node:d},c,C),k=A(m?.th,l,(r=d.props)==null?void 0:r.className),{isFocusVisible:P,focusProps:E}=Ir(),{isHovered:$,hoverProps:O}=dn({}),{hideHeader:N,align:D,width:M,minWidth:V,maxWidth:R,...K}=d.props,j=K.allowsSorting,B={};M&&(B.width=Z1(M)),V&&(B.minWidth=Z1(V)),R&&(B.maxWidth=Z1(R));const U={"aria-hidden":!0,"data-direction":(n=c.sortDescriptor)==null?void 0:n.direction,"data-visible":ae(((o=c.sortDescriptor)==null?void 0:o.column)===d.key),className:(i=f.sortIcon)==null?void 0:i.call(f,{class:m?.sortIcon})},W=typeof g=="function"?g(U):x.isValidElement(g)&&x.cloneElement(g,U);return h.jsxs(y,{ref:C,colSpan:d.colspan,"data-focus-visible":ae(P),"data-hover":ae($),"data-sortable":ae(j),style:B,...Oe(S,E,Lt(K,{enabled:v}),j?O:{},b),className:(s=f.th)==null?void 0:s.call(f,{align:D,class:k}),children:[N?h.jsx(Vl,{children:d.rendered}):d.rendered,j&&(W||h.jsx(cE,{strokeWidth:3,...U}))]})});E9.displayName="HeroUI.TableColumnHeader";var T9=E9,A9=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,classNames:c,state:d,...f}=e,m=o||"tr",g=typeof m=="string",b=ot(t),{rowProps:y}=gse({node:a},d),v=A(c?.tr,i,(r=a.props)==null?void 0:r.className);return h.jsx(m,{ref:b,...Oe(y,Lt(a.props,{enabled:g}),f),className:(n=l.tr)==null?void 0:n.call(l,{class:v}),children:s})});A9.displayName="HeroUI.TableHeaderRow";var _9=A9,$9=x.forwardRef((e,t)=>{var r;const{as:n,className:o,children:i,slots:s,classNames:a,...l}=e,c=n||"thead",d=ot(t),{rowGroupProps:f}=H1(),m=A(a?.thead,o);return h.jsx(c,{ref:d,className:(r=s.thead)==null?void 0:r.call(s,{class:m}),...Oe(f,l),children:i})});$9.displayName="HeroUI.TableRowGroup";var I9=$9,N9=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,getBaseProps:d,getWrapperProps:f,getTableProps:m}=v9({...e,ref:t}),{rowHeight:g=40,maxTableHeight:b=600}=e,y=x.useCallback(({children:N})=>h.jsx(r,{...f(),ref:S,style:{height:b,display:"block"},children:N}),[f,b]),C=[...o.body.childNodes].length,S=x.useRef(null),[k,P]=x.useState(0),E=x.useRef(null);x.useLayoutEffect(()=>{E.current&&P(E.current.getBoundingClientRect().height)},[E]);const $=jT({count:C,getScrollElement:()=>S.current,estimateSize:()=>g,overscan:5}),O=m();return h.jsxs("div",{...d(),children:[a==="outside"&&s,h.jsx(y,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&s,h.jsxs(n,{...O,style:{height:`calc(${$.getTotalSize()+k}px)`,...O.style},children:[h.jsx(I9,{ref:E,classNames:i.classNames,slots:i.slots,children:o.headerRows.map(N=>h.jsx(_9,{classNames:i.classNames,node:N,slots:i.slots,state:i.state,children:[...N.childNodes].map(D=>{var M;return(M=D?.props)!=null&&M.isSelectionCell?h.jsx(f9,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,color:i.color,disableAnimation:i.disableAnimation,node:D,selectionMode:i.selectionMode,slots:i.slots,state:i.state},D?.key):h.jsx(T9,{classNames:i.classNames,node:D,slots:i.slots,state:i.state},D?.key)})},N?.key))}),h.jsx(Ise,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,collection:i.collection,color:i.color,disableAnimation:i.disableAnimation,isSelectable:i.isSelectable,rowVirtualizer:$,selectionMode:i.selectionMode,slots:i.slots,state:i.state})]}),l==="inside"&&c]})}),l==="outside"&&c]})});N9.displayName="HeroUI.VirtualizedTable";var Nse=N9,D9=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:f,selectionMode:m,classNames:g,...b}=e,y=n||"tbody",v=typeof y=="string",C=ot(t),{rowGroupProps:S}=H1(),k=A(g?.tbody,o),P=a?.body.props,E=P?.isLoading||P?.loadingState==="loading"||P?.loadingState==="loadingMore",$=x.useMemo(()=>[...a.body.childNodes].map(D=>h.jsx(k9,{classNames:g,isSelectable:l,node:D,slots:i,state:s,children:[...D.childNodes].map(M=>M.props.isSelectionCell?h.jsx(C9,{checkboxesProps:f,classNames:g,color:c,disableAnimation:d,node:M,rowKey:D.key,selectionMode:m,slots:i,state:s},M.key):h.jsx(x9,{classNames:g,node:M,rowKey:D.key,slots:i,state:s},M.key))},D.key)),[a.body.childNodes,g,l,i,s]);let O,N;return a.size===0&&P.emptyContent&&(O=h.jsx("tr",{role:"row",children:h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!E&&P.emptyContent})})),E&&P.loadingContent&&(N=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:i?.loadingWrapper({class:g?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:P.loadingContent}),!O&&a.size===0?h.jsx("td",{className:i?.emptyWrapper({class:g?.emptyWrapper})}):null]})),h.jsxs(y,{ref:C,...Oe(S,Lt(P,{enabled:v}),b),className:(r=i.tbody)==null?void 0:r.call(i,{class:k}),"data-empty":ae(a.size===0),"data-loading":ae(E),children:[$,N,O]})});D9.displayName="HeroUI.TableBody";var Dse=D9,M9=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,removeWrapper:d,sortIcon:f,getBaseProps:m,getWrapperProps:g,getTableProps:b}=v9({...e,ref:t}),{isVirtualized:y,rowHeight:v=40,maxTableHeight:C=600}=e,S=y,k=x.useCallback(({children:P})=>d?P:h.jsx(r,{...g(),children:P}),[d,g]);return S?h.jsx(Nse,{...e,ref:t,maxTableHeight:C,rowHeight:v}):h.jsxs("div",{...m(),children:[a==="outside"&&s,h.jsx(k,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&s,h.jsxs(n,{...b(),children:[h.jsx(I9,{classNames:i.classNames,slots:i.slots,children:o.headerRows.map(P=>h.jsx(_9,{classNames:i.classNames,node:P,slots:i.slots,state:i.state,children:[...P.childNodes].map(E=>{var $;return($=E?.props)!=null&&$.isSelectionCell?h.jsx(f9,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,color:i.color,disableAnimation:i.disableAnimation,node:E,selectionMode:i.selectionMode,slots:i.slots,state:i.state},E?.key):h.jsx(T9,{classNames:i.classNames,node:E,slots:i.slots,sortIcon:f,state:i.state},E?.key)})},P?.key))}),h.jsx(Dse,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,collection:i.collection,color:i.color,disableAnimation:i.disableAnimation,isSelectable:i.isSelectable,selectionMode:i.selectionMode,slots:i.slots,state:i.state})]}),l==="inside"&&c]})}),l==="outside"&&c]})});M9.displayName="HeroUI.Table";var Ah=M9,Mse=Ase,_n=Mse,Ose=Ese,_h=Ose,jse=_se,$h=jse,Lse=Tse,Ih=Lse,Fse=$se,$n=Fse;function Si({title:e,rows:t,classNames:r}){return t.length===0?null:h.jsxs("div",{children:[h.jsx("div",{className:A("text-base font-semibold",r?.title),children:e}),h.jsxs(Ah,{removeWrapper:!0,hideHeader:!0,isCompact:!0,"aria-label":e,classNames:{base:A(r?.table?.base),wrapper:A(r?.table?.wrapper),table:A("table-fixed",r?.table?.table),thead:A(r?.table?.thead),tbody:A(r?.table?.tbody),tr:A("border-b border-default-100",r?.table?.tr),th:A(r?.table?.th),td:A(r?.table?.td)},children:[h.jsxs(_h,{children:[h.jsx(_n,{children:"Label"}),h.jsx(_n,{children:"Waarde"})]}),h.jsx(Ih,{children:t.map(n=>h.jsxs($h,{children:[h.jsx($n,{children:n.label}),h.jsx($n,{children:n.value})]},n.key))})]})]})}function Bse({proposition:e,classNames:t,buildClickOutUrl:r}){const{t:n}=Je(),o=e.bundles.filter(d=>d.isExtra),i=e.tags.find(d=>d.type==="internet"),s=e.productType==="fixed"?[{label:n("detailsModal.provider"),value:e.provider.name,key:"provider"},...e.provider.network?[{label:n("detailsModal.networkAdministrator"),value:e.provider.network.replace(/-netwerk/g,""),key:"networktype"}]:[],...i?[{label:n("detailsModal.networkType"),value:n(`fixedInternet.${i.slug}`,{defaultValue:i.label}),key:"networktype"}]:[]]:[{label:n("detailsModal.network"),value:`${e.provider.network?.replace(/-netwerk/g,"")} ${n("detailsModal.network").toLowerCase()}`,key:"network"},{label:n("detailsModal.networkCoverage"),value:e.provider.networkCoverage,key:"networktype"}],a=e.productType==="fixed"?[{label:n("detailsModal.contractTerm"),value:`${Jc(e.planVariant.contractTerm)}${e.planVariant.contractTerm===1?` ${n("detailsModal.contractTermTerminable")}`:""}`,key:"duration"}]:[{label:n("detailsModal.contractTerm"),value:`${Jc(e.planVariant.contractTerm)}${e.planVariant.contractTerm===1?` ${n("detailsModal.contractTermTerminable")}`:""}`,key:"duration"},{label:n("detailsModal.subscriptionType"),value:e.planVariant.name,key:"subscription-type"},{label:n("detailsModal.internet"),value:Kn(e.content.data,n("format.gigabyte")),key:"internet"},{label:n("detailsModal.calling"),value:Kn(e.content.minutes,n("format.minutes")),key:"calling"},{label:n("detailsModal.sms"),value:Kn(e.content.sms,n("format.sms")),key:"sms"},...o.length>0?[{label:n("detailsModal.extras"),value:o.map(d=>d.displayName).join(", "),key:"extras"}]:[]],l=e.productType==="fixed"?[]:[{label:n("detailsModal.networkGeneration"),value:FN(e.content.networkGeneration),key:"network-generation"},{label:n("detailsModal.downloadSpeed"),value:h.jsxs(h.Fragment,{children:[n("format.maximum")," ",e.content.dataSpeedDown/1e3," ",n("format.megabitPerSecond"),h.jsx("br",{}),n("format.average")," ",e.content.dataAvgSpeedDown/1e3," ",n("format.megabitPerSecond")]}),key:"download-speed"},{label:n("detailsModal.uploadSpeed"),value:h.jsxs(h.Fragment,{children:[n("format.maximum")," ",e.content.dataSpeedUp/1e3," ",n("format.megabitPerSecond"),h.jsx("br",{}),n("format.average")," ",e.content.dataAvgSpeedUp/1e3," ",n("format.megabitPerSecond")]}),key:"upload-speed"}],c=e.provider.termsAndConditionsUrl?[{label:e.provider.name,value:h.jsxs("button",{type:"button",onClick:()=>{r(`/${e.provider.termsAndConditionsUrl}`).then(d=>window.open(d,"_blank"))},className:A("text-primary-600 hover:underline flex items-center gap-0.5 cursor-pointer",t?.link),children:[n("detailsModal.termsAndConditions")," ",h.jsx(wa,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(Si,{title:n("detailsModal.network"),rows:s,classNames:t}),h.jsx(Si,{title:e.productType==="fixed"?n("detailsModal.subscription"):n("detailsModal.bundle"),rows:a,classNames:t}),h.jsx(Si,{title:n("detailsModal.bundleSpeed"),rows:l,classNames:t}),e.productType==="fixed"&&h.jsx(Si,{title:n("detailsModal.termsAndConditions"),rows:c,classNames:t})]})}function O9({proposition:e}){const{t}=Je(),{results:{creditInfo:r}={}}=vt(),{openModal:n}=Qt();function o(i){return{base:A(i,r?.table?.base),wrapper:A(r?.table?.wrapper),table:A("table-fixed border-collapse",r?.table?.table),thead:A(r?.table?.thead),tbody:A(r?.table?.tbody),tr:A(r?.table?.tr),th:A("first:pl-0 h-auto text-xs font-normal whitespace-break-spaces bg-transparent p-0 px-0.5",r?.table?.th),td:A("first:pl-0 py-0 px-0.5 text-xs font-medium text-foreground-500 first:whitespace-nowrap",r?.table?.td)}}return h.jsxs("div",{className:A("mt-1 border-small border-default-200 rounded-medium p-2",r?.base),children:[h.jsxs(p0,{orientation:"horizontal",hideScrollBar:!0,children:[h.jsxs(Ah,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o(),children:[h.jsxs(_h,{children:[h.jsx(_n,{children:t("creditInfo.totalDeviceCost")}),h.jsx(_n,{children:t("creditInfo.oneTimeFee")}),h.jsx(_n,{children:t("creditInfo.totalCreditAmount")})]}),h.jsx(Ih,{children:h.jsxs($h,{children:[h.jsx($n,{children:Ve(e.price+e.creditFee,{symbol:"€"})}),h.jsx($n,{children:Ve(e.price,{symbol:"€"})}),h.jsx($n,{children:Ve(e.creditFee,{symbol:"€"})})]})})]}),h.jsxs(Ah,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o("mt-4"),children:[h.jsxs(_h,{children:[h.jsx(_n,{children:t("creditInfo.monthlyPayment")}),h.jsx(_n,{children:t("creditInfo.contractTerm")}),h.jsx(_n,{children:t("creditInfo.fixedInterest")})]}),h.jsx(Ih,{children:h.jsxs($h,{children:[h.jsx($n,{children:Ve(e.handsetCreditMonthlyFee||0,{symbol:"€"})}),h.jsxs($n,{children:[e.planVariant.contractTerm," ",t("format.month",{count:e.planVariant.contractTerm})]}),h.jsx($n,{textValue:"0%",children:"0%"})]})})]})]}),h.jsxs("p",{className:A("mt-2 text-xs text-foreground-500",r?.description),children:[h.jsx(O4,{i18nKey:"creditInfo.creditBundleDescription",components:[h.jsx("button",{type:"button",onClick:()=>n("content-/vragen-en-contact/bestellen-betalen/wat-is-de-wet-financieel-toezicht/wet-financieel-toezicht"),className:A("text-primary-600 hover:underline cursor-pointer",r?.descriptionLink)},"credit-info-credit-bundle-description-link")],values:{creditPrice:Ve(250,{symbol:"€",dashed:!0}),creditProviderName:e.provider.creditProviderName}})," ",h.jsx("button",{type:"button",onClick:()=>n("content-/inkomens-en-lastentoets"),className:A("text-primary-600 hover:underline cursor-pointer",r?.descriptionLink),children:t("detailsModal.moreInformation")})]})]})}function zse(e,t){return e===0?Ee.t("format.firstMonth",{count:t}):Ee.t("format.thenMonth",{count:t})}function Po({label:e,price:t,classNames:r}){return h.jsxs("div",{className:A("flex justify-between items-center text-sm",r?.container),children:[h.jsx("div",{className:A(r?.label),children:e}),h.jsx("div",{className:A(r?.price),children:t})]})}function j9({icon:e,title:t,subtitle:r,price:n,classNames:o}){return h.jsxs("div",{className:A("flex justify-between items-center",o?.header),children:[h.jsxs("div",{className:A("flex items-center gap-1",o?.headerContent),children:[h.jsx("div",{className:A(o?.icon),children:e}),h.jsxs("div",{children:[h.jsx("div",{className:A("font-semibold text-sm",o?.title),children:t}),h.jsx("div",{className:A("text-xs text-foreground-500",o?.subtitle),children:r})]})]}),h.jsx("div",{className:A("text-sm font-semibold",o?.price),children:n})]})}function Kse({proposition:e,classNames:t}){const{t:r}=Je(),{productType:n,provider:o,monthlyFees:i,price:s,creditFee:a,tcoPerMonth:l,handsetCreditMonthlyFee:c,tcoTerm:d,tcoCorrection:f,activationFee:m,cashback:g,productVersion:b,installationFee:y}=e,v=t?.averageSection,C=t?.discountSection;return h.jsxs("div",{className:A("pb-4",t?.base),children:[h.jsxs("div",{className:A("bg-primary-50 px-3 py-2 rounded-large",v?.container),children:[h.jsx(j9,{icon:h.jsx(q4,{size:24,className:"stroke-foreground"}),title:r("detailsModal.costPerContractTermTitle"),subtitle:r("detailsModal.costPerContractTermSubtitle"),price:Ve(l),classNames:{header:v?.header,headerContent:v?.headerContent,icon:v?.icon,title:v?.title,subtitle:v?.subtitle,price:v?.price}}),h.jsx("div",{className:A("text-sm mt-2",v?.monthlyFeesContainer),children:i.map(({fee:S,term:k})=>h.jsx(Po,{label:`${r("format.monthly")} ${k} x ${Ve(S,{symbol:"€"})}`,price:Ve(S*k),classNames:v?.monthlyFee},`${k}-${S}`))}),s!==0&&h.jsx(Po,{label:r("format.oneTime"),price:Ve(s),classNames:v?.oneTimeFee}),h.jsx(Po,{label:`${o.name} ${r("detailsModal.activationFee")}`,price:Ve(m),classNames:v?.activationFee}),n==="fixed"&&h.jsx(Po,{label:`${o.name} ${r("detailsModal.installationFee")}`,price:Ve(y),classNames:v?.installationFee}),g!==0&&h.jsx(Po,{label:r("detailsModal.cashback"),price:`-${Ve(g)}`,classNames:v?.cashback}),f!==0&&h.jsx(Po,{label:r("detailsModal.cashback"),price:Ve(f),classNames:v?.cashback}),h.jsx(Ql,{orientation:"horizontal",className:A("my-3",v?.separator)}),h.jsx(Po,{label:r("detailsModal.totalCostsOverTerm",{count:d}),price:Ve(l*d),classNames:v?.totalCosts})]}),n==="smartphone"&&h.jsxs("div",{children:[h.jsxs("div",{className:A("bg-primary-50 px-3 py-2 rounded-large text-sm mt-3",C?.container),children:[h.jsx(j9,{icon:h.jsx(qu,{size:24,className:"stroke-foreground"}),title:r("detailsModal.deviceDiscountTitle"),subtitle:r("detailsModal.deviceDiscountSubtitle"),price:Ve(b?.pricing.sellingPriceInclVat?Number(b.pricing.sellingPriceInclVat)-(a+s):void 0),classNames:{header:C?.header,headerContent:C?.headerContent,icon:C?.icon,title:C?.title,subtitle:C?.subtitle,price:C?.price}}),h.jsx(Po,{label:r("detailsModal.priceWithoutSubscription"),price:Ve(Number(b?.pricing.sellingPriceInclVat)),classNames:{container:A("my-2",C?.priceWithoutSubscription?.container),label:C?.priceWithoutSubscription?.label,price:C?.priceWithoutSubscription?.price}}),i.map(({fee:S,term:k},P)=>h.jsxs("div",{children:[h.jsx(Po,{label:r("detailsModal.priceWithSubscription"),price:Ve(c*k+s),classNames:C?.priceWithSubscription}),h.jsx(Po,{label:h.jsxs(h.Fragment,{children:[P===i.length-1?r("detailsModal.deviceBundle"):zse(P,k)," ",k," x ",Ve(c,{symbol:"€"})]}),price:Ve(c*k),classNames:{container:A(C?.handsetCosts?.container),label:A("pl-4",C?.handsetCosts?.label),price:A(C?.handsetCosts?.price)}})]},`discount-${k}-${S}-${c}-${s}`)),h.jsx(Po,{label:r("detailsModal.devicePrice"),price:Ve(s),classNames:{container:A(C?.oneTimeFee?.container),label:A("pl-4",C?.oneTimeFee?.label),price:A(C?.oneTimeFee?.price)}}),h.jsx(Ql,{orientation:"horizontal",className:A("my-3",C?.separator)}),h.jsx(Po,{label:r("detailsModal.totalDeviceDiscount"),price:Ve(b?.pricing.sellingPriceInclVat?Number(b.pricing.sellingPriceInclVat)-(a+s):void 0),classNames:C?.totalDiscount})]}),h.jsx("div",{className:A("text-xs text-foreground-500 mt-6",t?.creditInfoLabel),children:r("creditInfo.creditBundleTitle")}),h.jsx(O9,{proposition:e})]})]})}function Vse({proposition:e,classNames:t,onChannelsClick:r,buildClickOutUrl:n}){const{t:o}=Je(),{plan:i,content:s,bundles:a,provider:l,productType:c}=e,{sharedCredits:d}=s,f=Kn(s.dataEu,o("format.gigabyte")),m=Kn(s.minutesEu,o("format.minutes")),g=Kn(s.minutesToEu,o("format.minutes")),b=["data","minutes"].every(k=>d?.includes(k))?"/":"+";if(c==="fixed"){const k=[{label:o("detailsModal.maximumDownloadSpeed"),value:`${s.dataSpeedDown/1e3} ${o("format.megabitPerSecond")}`,key:"download-speed"},{label:o("detailsModal.maximumUploadSpeed"),value:`${s.dataSpeedUp/1e3} ${o("format.megabitPerSecond")}`,key:"upload-speed"}],P=a.filter(E=>E.contentTypes?.includes("tv"))?.length>0?[{label:o("detailsModal.numberOfChannels"),value:h.jsxs("button",{type:"button",onClick:r,className:A("text-primary-600 hover:underline cursor-pointer",t?.link),children:[s.channels.length," (",s.hdChannels.length," HD)"]}),key:"channels"},{label:o("detailsModal.numberOfReceivers"),value:s.receivers,key:"receivers"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(Si,{title:o("detailsModal.internet"),rows:k,classNames:t}),P.length>0&&h.jsx(Si,{title:o("detailsModal.television"),rows:P,classNames:t})]})}const y=[{label:o("detailsModal.dataExceedance"),value:i.bundleExceedanceDataLimitReached,key:"data-exceedance"},{label:o("detailsModal.bundleExceedanceRates"),value:i.bundleExceedanceRate,key:"exceedance-rate"},{label:o("detailsModal.bundleExceedanceRateCeiling"),value:i.bundleExceedanceRateCeiling,key:"rate-ceiling"},{label:o("detailsModal.bundleExceedanceWarning"),value:i.bundleExceedanceWarning,key:"warning"},{label:o("detailsModal.bundleExceedanceMinutesRounding"),value:i.bundleExceedanceMinutesRounding,key:"minutes-rounding"}],v=[{label:o("detailsModal.upgradeBundle"),value:i.bundleUpgrade,key:"upgrade"},{label:o("detailsModal.downgradeBundle"),value:i.bundleDowngrade,key:"downgrade"}],C=[{label:o("detailsModal.insideEu"),value:s.minutesEu>0?`${f} ${b} ${m}`:f,key:"in-eu"},{label:o("detailsModal.outsideEu"),value:h.jsxs("button",{type:"button",onClick:()=>{n(`/tariefinformatie/${l.slug}`).then(k=>window.open(k,"_blank"))},className:A("text-primary-600 hover:underline flex items-center gap-0.5 cursor-pointer",t?.link),children:[o("detailsModal.moreInformation")," ",h.jsx(wa,{size:16})]}),key:"out-eu"},...s.minutesToEu>0?[{label:o("detailsModal.minutesToEu"),value:g,key:"to-eu"}]:[]],S=e.provider.termsAndConditionsUrl?[{label:e.provider.name,value:h.jsxs("button",{type:"button",onClick:()=>{n(`/${e.provider.termsAndConditionsUrl}`).then(k=>window.open(k,"_blank"))},className:A("text-primary-600 hover:underline flex items-center gap-0.5 cursor-pointer",t?.link),children:[o("detailsModal.termsAndConditions")," ",h.jsx(wa,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(Si,{title:o("detailsModal.outsideBundle"),rows:y,classNames:t}),h.jsx(Si,{title:o("detailsModal.subscriptionFlexibility"),rows:v,classNames:t}),h.jsx(Si,{title:o("detailsModal.abroad"),rows:C,classNames:t}),h.jsx(Si,{title:o("detailsModal.termsAndConditions"),rows:S,classNames:t})]})}function Rse(e){const t=[e.provider.name,e.plan?.name];return e.planVariant.contractTerm===24?t.push(`2 ${Ee.t("format.year",{count:2})}`):e.planVariant.contractTerm===12&&t.push(`1 ${Ee.t("format.year")}`),e.planVariant.contractType==="retention"&&t.push(Ee.t("detailsModal.renewal")),Array.from(new Set(t)).join(" ").trim()}function Xc({proposition:e,defaultTab:t="general",buildClickOutUrl:r}){const{t:n}=Je(),[o,i]=Fn(),{results:{detailsModal:s}={}}=vt(),{popoverProps:a,isShadowRoot:l}=Zn(),[c,d]=x.useState(t),{isModalOpen:f,openModal:m,closeModal:g}=Qt();if(x.useEffect(()=>{d(t)},[t]),!e)return null;const b=Kn(e.content.data,n("format.gigabyte")),{sharedCredits:y}=e.content,v=["data","minutes"].every(S=>y?.includes(S))?"/":"+",C=e.tags.find(S=>S.type==="internet");return h.jsx(fi,{isOpen:f("details"),onOpenChange:S=>S?m("details"):g("details"),placement:"bottom-center",scrollBehavior:"inside",size:"lg",shouldBlockScroll:!l,portalContainer:a.portalContainer,classNames:{backdrop:A(s?.modal?.backdrop),wrapper:A(s?.modal?.wrapper),base:A("m-0 max-h-[90vh]",s?.modal?.base),header:A(s?.modal?.header),body:A("pt-0",s?.modal?.body),footer:A(s?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",s?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:h.jsx("span",{children:n("detailsModal.title")})}),h.jsxs(ai,{onPointerDown:S=>S.stopPropagation(),children:[h.jsxs("div",{className:A("flex items-center gap-2",s?.propositionInfo?.container),children:[e.productType==="smartphone"&&e.productVersion?h.jsx(Ar,{src:o(e.productVersion.media.main?.url||"",64,64),srcSet:i(e.productVersion.media.main?.url||"",64,64),alt:e.productVersion.media.main?.altText||"",width:64,height:64,className:A(s?.propositionInfo?.image)}):h.jsx(Ar,{src:o(e.provider.imageUrl,48,24),srcSet:i(e.provider.imageUrl,48,24),alt:e.provider.name,width:48,height:24,className:A(s?.propositionInfo?.image)}),h.jsxs("div",{className:A("text-sm",s?.propositionInfo?.content),children:[e.productType!=="smartphone"&&h.jsx("div",{className:A("font-semibold",s?.propositionInfo?.name),children:Rse(e)}),e.productType==="fixed"?h.jsxs("div",{className:A(s?.propositionInfo?.details),children:[e.content.dataSpeedDown/1e3," ",n("format.megabitPerSecond")," ",C?n(`fixedInternet.${C.slug}`,{defaultValue:C.label}):""]}):h.jsx("div",{className:A(s?.propositionInfo?.details),children:e.content.minutes>0?h.jsxs("div",{children:[h.jsx("span",{children:b})," ",v," ",h.jsxs("span",{children:[B1(e.content.minutes)," ",n("format.minutes_short")]})]}):h.jsx("div",{children:b})}),e.productType==="smartphone"&&h.jsxs("div",{children:[h.jsxs("div",{className:A("font-semibold",s?.propositionInfo?.productName),children:[e.productVersion?.product.fullName," "]}),h.jsx("div",{className:A("text-xs",s?.propositionInfo?.productProperties),children:e.productVersion?.distinctProperties.map(S=>S.option.label).join(", ")})]})]})]}),h.jsxs(ET,{onPointerDown:S=>S.stopPropagation(),selectedKey:c,radius:"full",color:"primary","aria-label":n("detailsModal.chooseTab"),classNames:{base:A(s?.tabs?.base),tabList:A("relative",s?.tabs?.tabList),tab:A(s?.tabs?.tab),panel:A("h-[60vh]",s?.tabs?.panel),cursor:A(s?.tabs?.cursor)},children:[h.jsx(Xl,{title:n("detailsModal.general"),onClick:()=>d("general"),children:h.jsx(Bse,{proposition:e,classNames:s?.general,buildClickOutUrl:r})},"general"),h.jsx(Xl,{title:e.productType==="fixed"?n("detailsModal.bundles"):n("detailsModal.conditions"),onClick:()=>d("conditions"),children:h.jsx(Vse,{proposition:e,classNames:s?.terms,onChannelsClick:()=>d("channels"),buildClickOutUrl:r})},"conditions"),e.productType==="fixed"&&h.jsx(Xl,{title:n("detailsModal.channels"),onClick:()=>d("channels"),children:h.jsx(Xie,{channels:e.content.channels,hdChannels:e.content.hdChannels,classNames:s?.channels})},"channels"),h.jsx(Xl,{title:n("detailsModal.costs"),onClick:()=>d("costs"),children:h.jsxs("div",{className:A(s?.costOverview?.base),children:[h.jsx(zN,{proposition:e,classNames:s?.costOverview}),h.jsx(Kse,{proposition:e,classNames:s?.costOverview?.propositionOverview})]})},"costs")]})]})]})})}function L9({label:e,classNames:t}){return h.jsx("div",{className:A("px-4",t?.wrapper),children:h.jsx("div",{className:A("w-full text-background text-xs font-semibold text-center px-4 rounded-t-xl h-6 flex items-center justify-center shadow-small",{"bg-primary":e.color==="primary","bg-secondary":e.color==="secondary","bg-default":e.color==="default","bg-success":e.color==="success","bg-warning":e.color==="warning","bg-danger":e.color==="danger"},t?.text),tabIndex:-1,children:e.displayName})})}function F9({productStockStatus:e,classNames:t}){const{t:r}=Je(),n=r("propositionCard.availableStockStatus"),o=r("propositionCard.backorderedStockStatus"),i=r("propositionCard.preOrderStockStatus"),s=x.useMemo(()=>{switch(e){case"in_stock":return n;case"backordered":return o;case"preorder":return i;default:return null}},[e,n,o,i]);return s?h.jsxs("div",{className:A("text-center flex items-center justify-center gap-1.5",t?.wrapper),children:[h.jsx("div",{className:A("size-2 rounded-full",{"bg-success":e==="in_stock"||e==="preorder","bg-warning":e==="backordered"},t?.icon)}),h.jsx("span",{className:A("text-sm text-foreground",t?.text),children:s})]}):null}function B9({hasProduct:e,productImageUrl:t,productImageAlt:r,productStockStatus:n,propositionImageUrl:o,propositionImageAlt:i,horizontal:s,classNames:a}){const[l,c]=Fn();if(e){const d=s?140:200;return h.jsxs("div",{className:A("flex flex-col gap-2 items-center w-full",a?.phoneImage?.wrapper),children:[t&&r&&h.jsx(Ar,{alt:r,height:d,src:l(t,d,d),srcSet:c(t,d,d),width:d,classNames:{wrapper:A("mx-auto flex shrink-0",a?.phoneImage?.imageWrapper),img:A("aspect-square drop-shadow-lg",a?.phoneImage?.image)}}),h.jsx(F9,{productStockStatus:n,classNames:a?.phoneImage?.stockIndicator})]})}return h.jsx(Ar,{alt:i,height:70,src:l(o,140,70),srcSet:c(o,140,70),width:140,classNames:{wrapper:A("mx-auto flex shrink-0",a?.providerImage?.imageWrapper),img:A("aspect-2/1",a?.providerImage?.image)}})}function z9({monthlyFeePromotionText:e,monthlyFee:t,productPrice:r,tcoPerMonth:n,onInfoClick:o,classNames:i,horizontal:s}){const{t:a}=Je(),[l,c]=t.split(",");return h.jsxs("div",{className:A("flex flex-col",s&&"items-end text-right",i?.wrapper),children:[e&&h.jsx("div",{className:A("text-sm text-foreground-500 whitespace-nowrap",i?.promotionText),children:e}),h.jsxs("div",{className:A("flex items-end gap-1",i?.monthlyFeeWrapper),children:[h.jsxs("div",{className:A("flex items-start font-extrabold -tracking-[1px] text-foreground h-8 text-[32px] leading-8",i?.monthlyFeeValue),children:[h.jsx("span",{children:l}),h.jsx("span",{className:"font-bold mt-0.5 ml-[3px] text-[22px] leading-8",children:","}),h.jsx("span",{className:"font-bold -mt-[3px] -ml-[3px] text-lg leading-8",children:c})]}),h.jsxs("div",{className:A("text-sm text-foreground leading-none",i?.monthlyFeeLabel),children:["/ ",a("format.month")]})]}),r&&h.jsxs("div",{className:A("text-sm font-semibold text-foreground",i?.oneTimeFee),children:["+ ",h.jsx("span",{children:r})," ",a("propositionCard.oneTimeFee")]}),n&&h.jsxs("div",{className:A("flex items-center gap-1 text-sm mt-1",i?.averagePriceWrapper),children:[h.jsx(q4,{size:16,className:A("text-primary-600",i?.averagePriceIcon)}),h.jsxs("button",{type:"button",className:A("underline underline-offset-4 text-primary-600 cursor-pointer",i?.averagePriceValue),onPointerDown:d=>{d.preventDefault(),d.stopPropagation()},onClick:d=>{d.preventDefault(),d.stopPropagation(),o("costs")},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),d.stopPropagation(),o("costs"))},tabIndex:0,children:[a("format.average_short")," ",n," / ",a("format.month")]})]})]})}function Nh({promotions:e,urgentText:t,showUrgentTextInline:r=!1,isClickable:n=!1,classNames:o}){const{t:i}=Je(),[s,a]=x.useState(null),{popoverProps:l,isShadowRoot:c}=Zn();return e.length===0?null:h.jsxs("div",{className:A("flex flex-col gap-0",o?.base),children:[!r&&t&&h.jsx(i1,{classNames:{base:A("mb-1 border-1 text-xs",o?.urgentChip?.base),content:A("font-semibold",o?.urgentChip?.content)},color:"warning",size:"sm",variant:"bordered",children:h.jsx("span",{children:t})}),e.map((d,f)=>h.jsxs("div",{className:A("flex flex-row items-start gap-1 text-sm @xs:text-base leading-normal @xs:leading-tight w-fit",n&&typeof d=="object"&&d.slideOutDescription&&"cursor-pointer underline decoration-dotted underline-offset-4 decoration-foreground-400 decoration-2 hover:text-primary",o?.item),onPointerDown:n&&typeof d=="object"&&d.slideOutDescription?()=>a(d):void 0,children:[h.jsx(jL,{size:20,className:A("shrink-0 text-success-600",o?.promotionIcon)}),h.jsxs("span",{children:[typeof d=="object"?d.shortDescription:d,r&&t&&f===0&&h.jsx(i1,{classNames:{base:A("ml-2 border-1 text-xs inline-block h-fit py-0.5",o?.urgentChip?.base),content:A("font-semibold",o?.urgentChip?.content)},color:"warning",size:"sm",variant:"bordered",children:h.jsx("span",{children:t})})]})]},typeof d=="object"?d.shortDescription:d)),n&&h.jsx(fi,{isOpen:!!s,onOpenChange:d=>a(d?s:null),placement:"bottom-center",scrollBehavior:"inside",size:"xl",shouldBlockScroll:!c,portalContainer:l.portalContainer,classNames:{backdrop:A(o?.modal?.backdrop),wrapper:A(o?.modal?.wrapper),base:A("m-0 max-h-[90vh]",o?.modal?.base),header:A("font-bold",o?.modal?.header),body:A("pt-0",o?.modal?.body),footer:A(o?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",o?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:s?.publicTitle??""}),h.jsx(ai,{children:h.jsx(m6,{children:s?.slideOutDescription??""})}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",o?.modal?.primaryButton),onPress:()=>a(null),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:i("common.close")})})]})})]})}function Wse({slug:e,size:t=16,className:r}){switch(e){case"contract-term":return h.jsx(LL,{size:t,className:r});case"data-speed-down":return h.jsx(BL,{size:t,className:r});case"provider-network":return h.jsx(DL,{size:t,className:r});case"data-eu":return h.jsx(VL,{size:t,className:r});case"internet-speed":return h.jsx(H4,{size:t,className:r});case"channels":return h.jsx(G4,{size:t,className:r});case"tv-receiver":return h.jsx(FL,{size:t,className:r});default:return null}}function K9({propositionSpecifications:e,classNames:t,onInfoClick:r}){return!e||e.length===0?null:h.jsx("div",{className:A("flex flex-wrap items-center gap-x-2 gap-y-1 text-foreground-500",t?.wrapper),children:e.map(n=>h.jsxs("button",{type:"button",className:A("text-sm flex items-center gap-1 whitespace-nowrap",r&&"cursor-pointer hover:underline",t?.item),onPointerDown:o=>{o.preventDefault(),o.stopPropagation()},onClick:o=>{o.preventDefault(),o.stopPropagation(),r?.(n.slug==="channels"?"channels":"general")},children:[h.jsx(Wse,{slug:n.slug,className:A(t?.icon)}),h.jsx("span",{children:n.title})]},n.title))})}function Y1({productTitle:e,propositionTitle:t,propositionSubtitle:r,imageUrl:n,imageAlt:o,hasProduct:i,horizontal:s,propositionSpecifications:a,onInfoClick:l,classNames:c,imageWidth:d=70,imageHeight:f=35}){const[m,g]=Fn();return h.jsxs("div",{className:A("flex flex-col",c?.base),children:[h.jsxs("div",{className:A("flex justify-between gap-3 w-full",d>70&&"items-center",s&&"w-fit",c?.titleWrapper),children:[h.jsxs("div",{className:A(i&&"flex flex-col justify-center"),children:[i&&e&&h.jsx("div",{className:A("text-base leading-tight font-bold @xs:text-xl",c?.phone?.title),children:e}),i&&h.jsxs("div",{className:A("text-sm leading-tight @xs:text-base",c?.phone?.subtitle),children:[t," • ",r]}),i&&h.jsx(K9,{propositionSpecifications:a,classNames:{...c?.proposition?.specifications,wrapper:A("mt-2",c?.proposition?.specifications?.wrapper)},onInfoClick:l}),!i&&h.jsxs("div",{className:A("flex flex-wrap items-center gap-x-1 leading-tight",c?.proposition?.wrapper),children:[h.jsx("span",{className:A("text-xl font-bold text-foreground",c?.proposition?.title),children:t}),r&&h.jsxs("span",{className:A(c?.proposition?.subtitle),children:["• ",r]})]})]}),i&&n&&o&&h.jsx(Ar,{alt:o,height:f,src:m(n,d,f),srcSet:g(n,d,f),width:d,classNames:{wrapper:A("flex shrink-0",c?.phone?.providerImageWrapper),img:A("aspect-2/1",c?.phone?.providerImage)}})]}),!i&&h.jsx(K9,{propositionSpecifications:a,classNames:c?.proposition?.specifications,onInfoClick:l})]})}function V9({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:f,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),$=!!(n&&o&&i);return h.jsxs(Fs,{as:"div",isDisabled:r,disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("@container flex flex-row",P?.card),children:[h.jsx("div",{className:A("p-6 w-fit",P?.horizontalCard?.header),children:h.jsx(B9,{horizontal:!0,hasProduct:$,productImageUrl:o,productImageAlt:i,productStockStatus:C,propositionImageUrl:l,propositionImageAlt:c,classNames:P?.mainImage})}),h.jsx(Ql,{orientation:"vertical",className:A(P?.horizontalCard?.divider)}),h.jsxs("div",{className:A("p-6 flex flex-col gap-3 flex-1 w-fit",P?.horizontalCard?.body),children:[h.jsx(Y1,{horizontal:!0,hasProduct:$,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:$?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(Nh,{promotions:[...g,...b],urgentText:v,classNames:P?.promotionList})]}),h.jsxs("div",{className:A("p-6 pl-0 flex flex-col items-end gap-4 shrink-0 self-end",P?.horizontalCard?.footer),children:[h.jsx(z9,{horizontal:!0,monthlyFeePromotionText:y,productPrice:S,monthlyFee:f,tcoPerMonth:m,onInfoClick:t,classNames:P?.pricing}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full",r&&"pointer-events-none",P?.button),color:"secondary",size:"lg",disabled:r,onPress:r?void 0:e,endContent:k?h.jsx(wa,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function Use({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(L9,{label:e,classNames:{wrapper:r?.label?.wrapper,text:A("w-max",r?.label?.text)}}),h.jsx(V9,{classNames:r,...t})]}):h.jsx(V9,{classNames:r,...t})}function R9({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:f,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),$=!!(n&&o&&i);return h.jsxs(Fs,{as:"div",isDisabled:r,disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("@container h-full",P?.card),children:[h.jsx(OG,{className:A("p-3 pt-6 @xs:px-6",P?.verticalCard?.header),children:h.jsx(B9,{hasProduct:$,productImageUrl:o,productImageAlt:i,productStockStatus:C,propositionImageUrl:l,propositionImageAlt:c,classNames:P?.mainImage})}),h.jsxs(BT,{className:A("py-0 px-3 @xs:px-6 gap-2 overflow-hidden",P?.verticalCard?.body),children:[h.jsx(Y1,{hasProduct:$,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:$?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(Nh,{promotions:[...g,...b],urgentText:v,classNames:P?.promotionList})]}),h.jsx(Ql,{className:A("mt-3",P?.verticalCard?.divider)}),h.jsxs(MG,{className:A("flex-col justify-between items-start text-start p-3 @xs:p-6 @xs:pt-3",P?.verticalCard?.footer),children:[h.jsx("div",{className:"w-full",children:h.jsx(z9,{monthlyFeePromotionText:y,productPrice:S,monthlyFee:f,tcoPerMonth:m,onInfoClick:t,classNames:P?.pricing})}),h.jsx(hr,{className:A("font-medium gap-1 mt-4 rounded-full",r&&"pointer-events-none",P?.button),color:"secondary",size:"lg",fullWidth:!0,disabled:r,onPress:r?void 0:e,endContent:k?h.jsx(wa,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function Hse({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(L9,{label:e,classNames:r?.label}),h.jsx(R9,{classNames:r,...t})]}):h.jsx(R9,{classNames:r,...t})}function Qa({horizontal:e,...t}){return e?h.jsx(Use,{...t}):h.jsx(Hse,{...t})}function J1(e,t){if(!t)return e;const r=Math.floor(parseFloat(t));return Number.isNaN(r)||r<=20?e:[...e,`€ ${r},- ${Ee.t("propositionCard.deviceDiscount")}`]}function ta(e,t=500,r=7){if(!e)return!1;const n=new Date(new Date().toISOString().split("T")[0]),o=new Date(n.getTime()+r*24*60*60*1e3);return e.weight>t&&new Date(e.validUntil)>=n&&new Date(e.validUntil)<o}function W9(e){return e.sort((t,r)=>{if(ta(t)&&ta(r)){const n=new Date(t.validUntil),o=new Date(r.validUntil);return n.getTime()===o.getTime()?r.weight-t.weight:n.getTime()-o.getTime()}return ta(t)&&!ta(r)?-1:ta(r)&&!ta(t)?1:r.weight-t.weight})}function el(e){const t=W9(e.specialPromotions.filter(l=>l.shortDescription&&!l.shortDescription.includes("toestelkorting")&&l.weight>200)),r=ta(t[0])?t[0]?.shortDescription:null,n=r?t.slice(1):t,o=r?[r]:[],i=n.map(l=>l.shortDescription).filter(l=>!!l),s=e.bundles.flatMap(l=>l.usps);if(e.productType!=="fixed")return[...o,...s,...i];const a=e.bundles.filter(l=>l.contentTypes?.includes("tv")||l.contentTypes?.includes("phone")).map(l=>l.displayName).filter(l=>!!l);return[...o,...a,...s,...i]}function ra(e){const t=e.filter(n=>ta(n));if(t.length===0)return;const r=Math.min(...t.map(n=>{const o=new Date,i=new Date(n.validUntil);return Math.ceil((i.getTime()-o.getTime())/(1440*60*1e3))}))+1;return Ee.t("propositionCard.urgentText",{days:r,count:r})}function qse(e,t,r,n){const{currentProviderSlug:o,currentFixedProviderScope:i,currentMobileProviders:s,customerSegment:a}=t,l=new URLSearchParams;if(a&&l.set("segment",a),o&&l.set("huidige-provider",o),i||s&&s.length>0){const f=[i?`${i}:1`:void 0,...s?s.map(m=>`${m.scope}:${m.value}`):[]].filter(Boolean).join(",");l.set("klantvoordeel",f)}r&&l.set("ppt",r);const c=e.startsWith("/")?e:`/${e}`,d=n?n(l).toString():l.toString();return d?`https://www.mobiel.nl${c}?${d}`:`https://www.mobiel.nl${c}`}function Qc({addClickoutSearchParams:e}){const{profile:t}=sn();async function r(n,o){const i=await Aie();return qse(n,t,i,s=>(o?.(s),e?e(s):s))}return{buildClickOutUrl:r}}function Dh({isReachingEnd:e,loadMore:t,isValidating:r,className:n}){const{t:o}=Je();return e?null:h.jsx(hr,{className:A("font-medium mx-auto text-primary-600 border-primary-600 min-w-[234px] rounded-full",n),onPress:t,color:"primary",variant:"flat",size:"md",disableAnimation:!0,disableRipple:!0,isLoading:r,disabled:r,endContent:!r&&h.jsx(ML,{size:20}),children:o(r?"productResults.loadMore":"productResults.showMoreOffers")})}function Gse({size:e,height:t,width:r,className:n,style:o,...i}){return h.jsxs("svg",{fill:"none",width:e||r||106,height:e||t||106,viewBox:"0 0 106 106",xmlns:"http://www.w3.org/2000/svg",className:n,style:o,...i,children:[h.jsx("title",{children:"Search Loading Icon"}),h.jsx("path",{d:"M87.9225 102.652C90.5856 105.824 95.3164 106.237 98.4889 103.574C101.662 100.911 102.075 96.1805 99.4115 93.0079L87.9225 102.652ZM99.4115 93.0079L79.2493 68.9884L67.7604 78.6323L87.9225 102.652L99.4115 93.0079Z",fill:"#1A2B8F"}),h.jsx("circle",{cx:"51",cy:"47",r:"27",stroke:"#1A2B8F",strokeWidth:4}),h.jsx("circle",{cx:"51",cy:"47",r:"32",stroke:"white",strokeWidth:6}),h.jsx("circle",{cx:"51",cy:"47",r:"37.5",stroke:"#1A2B8F",strokeWidth:5}),h.jsx("circle",{cx:"51",cy:"47",r:"43.5",stroke:"white",strokeWidth:7})]})}function Zse({address:e}){const{t}=Je(),{results:{postcodeCheckLoading:r}={}}=vt();return h.jsxs("div",{className:A("flex flex-row items-center justify-center md:gap-6 rounded-large bg-white p-4 shadow-md mb-4",r?.base),children:[h.jsx(Gse,{className:A("animate-pulse shrink-0 size-20 md:size-[106px]",r?.icon)}),h.jsxs("div",{className:A("max-w-[215px] text-center flex flex-col items-center gap-2",r?.textWrapper),children:[h.jsx("div",{className:A("text-base md:text-xl font-bold leading-none text-foreground",r?.heading),children:t("postcodeCheck.loading")}),h.jsxs("div",{className:A("text-xs md:text-sm text-foreground leading-none",r?.addressText),children:[e.street," ",Zie(e.number,e.numberAddon),", ",e.city]})]})]})}function Mh(){const{t:e}=Je(),{results:{resultsNotFound:t}={}}=vt();return h.jsxs("div",{children:[h.jsx("div",{className:A("text-base font-bold text-foreground mb-1 lg:hidden",t?.filterChips?.title),children:e("filters.chosenFilters")}),h.jsx(M6,{className:"mb-6 lg:hidden"}),h.jsx(uu,{color:"warning",variant:"faded",title:e("productResults.noResultsTitle"),description:e("productResults.noResultsDescription"),hideIconWrapper:!0,classNames:{base:A(t?.alert?.base),title:A(t?.alert?.title),description:A(t?.alert?.description),mainWrapper:A(t?.alert?.mainWrapper),closeButton:A(t?.alert?.closeButton),iconWrapper:A(t?.alert?.iconWrapper),alertIcon:A(t?.alert?.alertIcon)}})]})}function tl({count:e,horizontal:t,large:r}){const{results:{skeletonCard:n}={}}=vt();return h.jsx(h.Fragment,{children:Array.from({length:e}).map((o,i)=>h.jsx(Tr,{className:A("shadow-small rounded-large",r?"h-140":"h-100",t&&(r?"h-54":"h-46"),n)},i))})}const Yse=void 0,X1=Object,U9=e=>e===Yse,Jse=e=>typeof e=="function",Oh=new WeakMap,Xse=e=>X1.prototype.toString.call(e),Q1=(e,t)=>e===`[object ${t}]`;let Qse=0;const ew=e=>{const t=typeof e,r=Xse(e),n=Q1(r,"Date"),o=Q1(r,"RegExp"),i=Q1(r,"Object");let s,a;if(X1(e)===e&&!n&&!o){if(s=Oh.get(e),s)return s;if(s=++Qse+"~",Oh.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=ew(e[a])+",";Oh.set(e,s)}if(i){s="#";const l=X1.keys(e).sort();for(;!U9(a=l.pop());)U9(e[a])||(s+=a+":"+ew(e[a])+",");Oh.set(e,s)}}else s=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},eae=e=>{if(Jse(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ew(e):"",[e,t]},tae=e=>eae(e?e(0,null):null)[0],tw=Promise.resolve(),jh=IE(xp,e=>(t,r,n)=>{const o=x.useRef(!1),{cache:i,initialSize:s=1,revalidateAll:a=!1,persistSize:l=!1,revalidateFirstPage:c=!0,revalidateOnMount:d=!1,parallel:f=!1}=n,[,,,m]=pi.get(Mv);let g;try{g=tae(t),g&&(g=AE+g)}catch{}const[b,y,v]=js(i,g),C=x.useCallback(()=>mt(b()._l)?s:b()._l,[i,g,s]);qd.useSyncExternalStore(x.useCallback(N=>g?v(g,()=>{N()}):()=>{},[i,g]),C,C);const S=x.useCallback(()=>{const N=b()._l;return mt(N)?s:N},[g,s]),k=x.useRef(S());vp(()=>{if(!o.current){o.current=!0;return}g&&y({_l:l?k.current:S()})},[g,i]);const P=d&&!o.current,E=e(g,async N=>{const D=b()._i,M=b()._r;y({_r:Gr});const V=[],R=S(),[K]=js(i,N),j=K().data,B=[];let U=null;for(let W=0;W<R;++W){const[L,Z]=Cc(t(W,f?null:U));if(!L)break;const[T,F]=js(i,L);let _=T().data;const H=a||D||mt(_)||c&&!W&&!mt(j)||P||j&&!mt(j[W])&&!n.compare(j[W],_);if(r&&(typeof M=="function"?M(_,Z):H)){const Y=async()=>{if(!(L in m))_=await r(Z);else{const oe=m[L];delete m[L],_=await oe}F({data:_,_k:Z}),V[W]=_};f?B.push(Y):await Y()}else V[W]=_;f||(U=_)}return f&&await Promise.all(B.map(W=>W())),y({_i:Gr}),V},n),$=x.useCallback(function(N,D){const M=typeof D=="boolean"?{revalidate:D}:D||{},V=M.revalidate!==!1;return g?(V&&(mt(N)?y({_i:!0,_r:M.revalidate}):y({_i:!1,_r:M.revalidate})),arguments.length?E.mutate(N,{...M,revalidate:V}):E.mutate()):tw},[g,i]),O=x.useCallback(N=>{if(!g)return tw;const[,D]=js(i,g);let M;if(Ko(N)?M=N(S()):typeof N=="number"&&(M=N),typeof M!="number")return tw;D({_l:M}),k.current=M;const V=[],[R]=js(i,g);let K=null;for(let j=0;j<M;++j){const[B]=Cc(t(j,K)),[U]=js(i,B),W=B?U().data:Gr;if(mt(W))return $(R().data);V.push(W),K=W}return $(V)},[g,i,$,S]);return{size:S(),setSize:O,mutate:$,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}});function Lh(e,t,r,n,o,i,s){if(i&&!i.search?.records?.length)return null;const a=o*n,l={...t,limit:n,offset:a};return[e,{query:l,modificationBlocks:r,...s}]}function rae({query:e,modificationBlocks:t,address:r,pageSize:n}){function o(i,s){return Lh(sQ,e,t,n,i,s,r?{postcode:r.postcode,number:parseInt(r.number),numberAddon:r.numberAddon}:void 0)}return jh(o,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function nae({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return Lh(aQ,e,t,r,o,i)}return jh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function oae({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return Lh(lQ,e,t,r,o,i)}return jh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function iae({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return Lh(uQ,e,t,r,o,i)}return jh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Fh({filterOptions:e,activeFilters:t,limit:r,productCategory:n,profile:o,distinctProperties:i}){const s=CN(n,o),a=pQ({filterOptions:e,filterValues:t,limit:r,currentProvider:s,distinctProperties:i});switch(n){case"sim-only-proposition":{const l=bi(t,"providers");a.groupBy(Array.isArray(l)&&l.length===1?"data_and_speed":"provider");const c=nae({query:a.serialize(),modificationBlocks:Yc(n,o),pageSize:r}),{data:d=[],error:f,...m}=c;return{...m,data:d[0],dataArray:d,error:f}}case"fixed-proposition":{a.groupBy("provider_data_speed_down");const l=rae({query:a.serialize(),modificationBlocks:Yc(n,o),address:o.address,pageSize:r}),{data:c=[],error:d,...f}=l;return{...f,data:c[0],dataArray:c,error:d}}case"smartphone-proposition":{const l=bi(t,"sorteren"),c=bi(t,"providers");a.groupBy(Array.isArray(c)&&c.length===1?"data_and_speed":"provider"),l==="relevantie"&&a.sort("top");const d=oae({query:a.serialize(),modificationBlocks:Yc(n,o),pageSize:r}),{data:f=[],error:m,...g}=d;return{...g,data:f[0],dataArray:f,error:m}}case"smartphone-proposition-extended":{const l=bi(t,"sorteren");a.groupBy(l==="relevantie"?"product_provider_slug":"product_slug");const c=iae({query:a.serialize(),modificationBlocks:Yc(n,o),pageSize:r}),{data:d=[],error:f,...m}=c;return{...m,data:d[0],dataArray:d,error:f}}default:return{data:void 0,dataArray:[],isLoading:!1,isValidating:!1,error:void 0,mutate:async()=>{},size:0,setSize:()=>{}}}}function Bh({lastPageLength:e,isValidating:t,size:r,setSize:n,activeFilters:o,profile:i,limit:s}){const a=x.useRef("");x.useEffect(()=>{if(r===1)return;const d=JSON.stringify({activeFilters:o,profile:i});a.current!==d&&a.current!==""&&n(1),a.current=d},[o,i,n]);const l=e===void 0||e===0||e<s;function c(){t||n(r+1)}return{isReachingEnd:l,loadMore:c}}function sae({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=gi(),{results:d}=vt(),{profile:f}=sn(),{filterOptions:m,activeFilters:g}=vi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=Qc({addClickoutSearchParams:s}),{data:S,dataArray:k,isLoading:P,isValidating:E,size:$,setSize:O,mutate:N,error:D}=Fh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:f}),{isReachingEnd:M,loadMore:V}=Bh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:$,setSize:O,activeFilters:g,profile:f,limit:n}),R=k.flatMap(L=>L.search.records),{polling:K,validating:j}=S&&"fetchInfo"in S?S.fetchInfo:{polling:!1,validating:!1};if(x.useEffect(()=>{if(!K)return;const L=setInterval(()=>N(),1e3);return()=>clearInterval(L)},[K,N]),zo(()=>{f.address&&N()},[f.address?.postcode,f.address?.number,f.address?.numberAddon,N]),D)throw new Error(String(D));if(!K&&!E&&R.length===0)return h.jsx(Mh,{});const B=S&&"fetchInfo"in S?S.search.pageInfo.fastestDownloadSpeedProposition?.key:void 0,{top:U,all:W}=P?{top:[],all:[]}:K1({propositions:R,productCategory:e,labelColorConfig:r,fastestInternetPropositionKey:B});return h.jsxs("div",{tabIndex:(E||j)&&!K?-1:void 0,children:[K&&f.address&&h.jsx(Zse,{address:f.address}),h.jsxs("div",{className:A((E||j)&&!K&&"opacity-50 pointer-events-none"),children:[t&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.topPropositionsTitle),tabIndex:-1,children:l("productResults.topPropositionsTitle")}),h.jsx("div",{className:A("gap-4 grid grid-cols-1 mb-8",i==="vertical"&&"lg:grid-cols-3",d?.topPropositionsGrid),children:P?h.jsx(tl,{count:3,horizontal:i==="horizontal"}):U.map(L=>{if(f.currentFixedProviderScope?.includes(L.provider.slug))return null;const T=L.tags.find(F=>F.type==="internet");return h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:L}),a)return a(L.key);C(`/aanbieding/${L.key}`).then(F=>window.open(F,"_blank"))},onInfoClick:F=>{c({type:"details_viewed",proposition:L,tab:F}),v({proposition:L,tab:F}),b("details")},label:L.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(L.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(L.monthlyFees,L.baseMonthlyFee,L.lifetimeMonthlyFee),tcoPerMonth:Ve(L.tcoPerMonth,{dashed:!0}),propositionTitle:`${L.content.dataSpeedDown/1e3} ${l("format.megabitPerSecond")}`,propositionSubtitle:T?l(`fixedInternet.${T.slug}`,{defaultValue:T.label}):"",propositionImageUrl:L.provider.imageUrl,propositionImageAlt:L.provider.name,propositionSpecifications:ea(L),urgentText:ra(L.specialPromotions),specialPromotions:el(L),modificationPromotions:L.modificationPromotions},`top-${L.key}`)})})]}),t&&h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.allPropositionsTitle),tabIndex:-1,children:l("productResults.allPropositionsTitle")}),h.jsxs("div",{className:A("gap-4 grid grid-cols-1",d?.allPropositionsGrid),children:[P?h.jsx(tl,{count:n,horizontal:o==="horizontal"}):W.map(L=>{const Z=f.currentFixedProviderScope?.includes(L.provider.slug),T=L.tags.find(F=>F.type==="internet");return h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:L}),a)return a(L.key);C(`/aanbieding/${L.key}`).then(F=>window.open(F,"_blank"))},onInfoClick:F=>{c({type:"details_viewed",proposition:L,tab:F}),v({proposition:L,tab:F}),b("details")},label:Z?{displayName:`Alleen voor nieuwe ${L.provider.name}-klanten`,color:"default"}:L.label,disabled:Z,isExternalLink:!a,horizontal:o==="horizontal",monthlyFee:Ve(L.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(L.monthlyFees,L.baseMonthlyFee,L.lifetimeMonthlyFee),tcoPerMonth:Ve(L.tcoPerMonth,{dashed:!0}),propositionTitle:`${L.content.dataSpeedDown/1e3} ${l("format.megabitPerSecond")}`,propositionSubtitle:T?l(`fixedInternet.${T.slug}`,{defaultValue:T.label}):"",propositionImageUrl:L.provider.imageUrl,propositionImageAlt:L.provider.name,propositionSpecifications:ea(L),urgentText:ra(L.specialPromotions),specialPromotions:el(L),modificationPromotions:L.modificationPromotions},L.key)}),h.jsx(Dh,{isReachingEnd:M,loadMore:V,isValidating:E,className:d?.loadMoreButton})]})]}),h.jsx(Xc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function aae({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=gi(),{results:d}=vt(),{profile:f}=sn(),{filterOptions:m,activeFilters:g}=vi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=Qc({addClickoutSearchParams:s}),{dataArray:S,isLoading:k,isValidating:P,size:E,setSize:$,error:O}=Fh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:f}),{isReachingEnd:N,loadMore:D}=Bh({lastPageLength:S[S.length-1]?.search.records.length,isValidating:P,size:E,setSize:$,activeFilters:g,profile:f,limit:n});if(O)throw new Error(String(O));const M=S.flatMap(K=>K.search.records);if(!P&&M.length===0)return h.jsx(Mh,{});const{top:V,all:R}=k?{top:[],all:[]}:K1({propositions:M,productCategory:e,labelColorConfig:r});return h.jsxs("div",{className:A(P&&"opacity-50 pointer-events-none"),children:[t&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.topPropositionsTitle),tabIndex:-1,children:l("productResults.topPropositionsTitle")}),h.jsx("div",{className:A("gap-4 grid grid-cols-1 mb-8",i==="vertical"&&"lg:grid-cols-3",d?.topPropositionsGrid),children:k?h.jsx(tl,{count:3,horizontal:i==="horizontal"}):V.map(K=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:K}),a)return a(K.key);C(`/aanbieding/${K.key}`).then(j=>window.open(j,"_blank"))},onInfoClick:j=>{c({type:"details_viewed",proposition:K,tab:j}),v({proposition:K,tab:j}),b("details")},label:K.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(K.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(K.monthlyFees,K.baseMonthlyFee,K.lifetimeMonthlyFee),tcoPerMonth:Ve(K.tcoPerMonth,{dashed:!0}),propositionTitle:Kn(K.content.data,l("format.gigabyte")),propositionSubtitle:bu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:ea(K),urgentText:ra(K.specialPromotions),specialPromotions:el(K),modificationPromotions:K.modificationPromotions},`top-${K.key}`))})]}),t&&h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.allPropositionsTitle),tabIndex:-1,children:l("productResults.allPropositionsTitle")}),h.jsxs("div",{className:A("gap-4 grid grid-cols-1",d?.allPropositionsGrid),children:[k?h.jsx(tl,{count:n,horizontal:o==="horizontal"}):R.map(K=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:K}),a)return a(K.key);C(`/aanbieding/${K.key}`).then(j=>window.open(j,"_blank"))},onInfoClick:j=>{c({type:"details_viewed",proposition:K,tab:j}),v({proposition:K,tab:j}),b("details")},label:K.label,isExternalLink:!a,horizontal:o==="horizontal",monthlyFee:Ve(K.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(K.monthlyFees,K.baseMonthlyFee,K.lifetimeMonthlyFee),tcoPerMonth:Ve(K.tcoPerMonth,{dashed:!0}),propositionTitle:Kn(K.content.data,l("format.gigabyte")),propositionSubtitle:bu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:ea(K),urgentText:ra(K.specialPromotions),specialPromotions:el(K),modificationPromotions:K.modificationPromotions},K.key)),h.jsx(Dh,{isReachingEnd:N,loadMore:D,isValidating:P,className:d?.loadMoreButton})]}),h.jsx(Xc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function H9({propositions:e}){const{t}=Je(),{results:{creditInfo:r}={}}=vt(),{openModal:n}=Qt();return e.length===0?null:h.jsxs("div",{className:A("mt-4",r?.base),children:[h.jsx("div",{className:A("text-sm font-medium mb-2 text-foreground-500",r?.title),children:t("creditInfo.exampleTitle")}),h.jsx(p0,{orientation:"horizontal",hideScrollBar:!0,children:h.jsxs(Ah,{"aria-label":t("creditInfo.exampleTitle"),removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:{base:A(r?.table?.base),wrapper:A(r?.table?.wrapper),table:A(r?.table?.table),thead:A(r?.table?.thead),tbody:A(r?.table?.tbody),tr:A(r?.table?.tr),th:A("first:pl-0 h-auto text-xs font-normal whitespace-break-spaces bg-transparent",r?.table?.th),td:A("first:pl-0 py-0 text-xs font-medium text-foreground-500 first:whitespace-nowrap",r?.table?.td)},children:[h.jsxs(_h,{children:[h.jsx(_n,{children:t("creditInfo.offer")}),h.jsx(_n,{children:t("creditInfo.totalDeviceCost")}),h.jsx(_n,{children:t("creditInfo.oneTimeFee")}),h.jsx(_n,{children:t("creditInfo.totalCreditAmount")}),h.jsx(_n,{children:t("creditInfo.monthlyPayment")}),h.jsx(_n,{children:t("creditInfo.contractTerm")}),h.jsx(_n,{children:t("creditInfo.fixedInterest")})]}),h.jsx(Ih,{children:e.map(o=>h.jsxs($h,{children:[h.jsxs($n,{children:[o.productVersion?.product.fullName," + ",o.provider.name]}),h.jsx($n,{children:Ve(o.price+o.creditFee,{symbol:"€"})}),h.jsx($n,{children:Ve(o.price,{symbol:"€"})}),h.jsx($n,{children:Ve(o.creditFee,{symbol:"€"})}),h.jsx($n,{children:Ve(o.handsetCreditMonthlyFee||0,{symbol:"€"})}),h.jsxs($n,{children:[o.planVariant.contractTerm," ",t("format.month",{count:o.planVariant.contractTerm})]}),h.jsx($n,{children:"0%"})]},o.key))})]})}),h.jsx("p",{className:A("mt-2 text-xs text-foreground-500",r?.description),children:h.jsx(O4,{i18nKey:"creditInfo.generalDescription",components:[h.jsx("button",{type:"button",onClick:()=>n("content-/vragen-en-contact/bestellen-betalen/wat-is-de-wet-financieel-toezicht/wet-financieel-toezicht"),className:A("text-primary-600 hover:underline cursor-pointer",r?.descriptionLink)},"credit-info-general-description-link")]})})]})}function lae({showTopPropositions:e,labelColorConfig:t,limit:r,propositionCardLayout:n,productCategory:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=gi(),{results:d}=vt(),{profile:f}=sn(),{filterOptions:m,activeFilters:g,distinctProperties:b}=vi(),{openModal:y}=Qt(),[v,C]=x.useState(null),{buildClickOutUrl:S}=Qc({addClickoutSearchParams:s}),{dataArray:k,isLoading:P,isValidating:E,size:$,setSize:O,error:N}=Fh({filterOptions:m,activeFilters:g,limit:r,productCategory:o,profile:f,distinctProperties:b}),{isReachingEnd:D,loadMore:M}=Bh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:$,setSize:O,activeFilters:g,profile:f,limit:r});if(N)throw new Error(String(N));const V=k.flatMap(j=>j.search.records);if(!E&&V.length===0)return h.jsx(Mh,{});const{top:R,all:K}=P?{top:[],all:[]}:K1({propositions:V,productCategory:o,labelColorConfig:t});return h.jsxs("div",{className:A(E&&"opacity-50 pointer-events-none"),children:[e&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.topPropositionsTitle),tabIndex:-1,children:l("productResults.topPropositionsTitle")}),h.jsx("div",{className:A("gap-4 grid grid-cols-1 mb-8",i==="vertical"&&"lg:grid-cols-3",d?.topPropositionsGrid),children:P?h.jsx(tl,{count:3,horizontal:i==="horizontal"}):R.map(j=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:j}),a)return a(j.key);S(`/aanbieding/${j.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:j,tab:B}),C({proposition:j,tab:B}),y("details")},label:j.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(j.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(j.monthlyFees,j.baseMonthlyFee,j.lifetimeMonthlyFee),tcoPerMonth:Ve(j.tcoPerMonth,{dashed:!0}),productPrice:Ve(j.price,{dashed:!0}),propositionTitle:Kn(j.content.data,l("format.gigabyte")),propositionSubtitle:bu(j.content),propositionImageUrl:j.provider.imageUrl,propositionImageAlt:j.provider.name,propositionSpecifications:ea(j),urgentText:ra(j.specialPromotions),specialPromotions:J1(el(j),F1(j)),modificationPromotions:j.modificationPromotions},`top-${j.key}`))})]}),e&&h.jsx("div",{className:A("text-2xl font-bold text-foreground mb-3",d?.allPropositionsTitle),tabIndex:-1,children:l("productResults.allPropositionsTitle")}),h.jsxs("div",{className:A("gap-4 grid grid-cols-1",d?.allPropositionsGrid),children:[P?h.jsx(tl,{count:r,horizontal:n==="horizontal"}):K.map(j=>h.jsx(Qa,{onClick:()=>{if(c({type:"deal_selected",proposition:j}),a)return a(j.key);S(`/aanbieding/${j.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:j,tab:B}),C({proposition:j,tab:B}),y("details")},label:j.label,isExternalLink:!a,horizontal:n==="horizontal",monthlyFee:Ve(j.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(j.monthlyFees,j.baseMonthlyFee,j.lifetimeMonthlyFee),tcoPerMonth:Ve(j.tcoPerMonth,{dashed:!0}),productPrice:Ve(j.price,{dashed:!0}),propositionTitle:Kn(j.content.data,l("format.gigabyte")),propositionSubtitle:bu(j.content),propositionImageUrl:j.provider.imageUrl,propositionImageAlt:j.provider.name,propositionSpecifications:ea(j),urgentText:ra(j.specialPromotions),specialPromotions:J1(el(j),F1(j)),modificationPromotions:j.modificationPromotions},j.key)),h.jsx(Dh,{isReachingEnd:D,loadMore:M,isValidating:E,className:d?.loadMoreButton}),h.jsx(H9,{propositions:V.slice(0,3)})]}),h.jsx(Xc,{proposition:v?.proposition,defaultTab:v?.tab,buildClickOutUrl:S})]})}function uae({productCategory:e,limit:t,propositionCardLayout:r,addClickoutSearchParams:n,onDealSelected:o}){const{t:i}=Je(),{onAction:s}=gi(),{results:a}=vt(),{profile:l}=sn(),{filterOptions:c,activeFilters:d}=vi(),{openModal:f}=Qt(),[m,g]=x.useState(null),{buildClickOutUrl:b}=Qc({addClickoutSearchParams:n}),{dataArray:y,isLoading:v,isValidating:C,size:S,setSize:k,error:P}=Fh({filterOptions:c,activeFilters:d,limit:t,productCategory:e,profile:l}),{isReachingEnd:E,loadMore:$}=Bh({lastPageLength:y[y.length-1]?.search.records.length,isValidating:C,size:S,setSize:k,activeFilters:d,profile:l,limit:t});if(P)throw new Error(String(P));const O=y.flatMap(N=>N.search.records);return!C&&O.length===0?h.jsx(Mh,{}):h.jsxs("div",{className:A("gap-4 grid grid-cols-1",r==="vertical"&&"lg:grid-cols-3",C&&"opacity-50 pointer-events-none",a?.allPropositionsGrid),children:[v?h.jsx(tl,{count:t,horizontal:r==="horizontal",large:!0}):O.map(N=>h.jsx(Qa,{onClick:()=>{if(s({type:"deal_selected",proposition:N}),o)return o(N.key);b(`/aanbieding/${N.key}`).then(D=>window.open(D,"_blank"))},onInfoClick:D=>{s({type:"details_viewed",proposition:N,tab:D}),g({proposition:N,tab:D}),f("details")},isExternalLink:!o,horizontal:r==="horizontal",monthlyFee:Ve(N.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:Qs(N.monthlyFees,N.baseMonthlyFee,N.lifetimeMonthlyFee),tcoPerMonth:Ve(N.tcoPerMonth,{dashed:!0}),productPrice:Ve(N.price,{dashed:!0}),productImageAlt:N.productVersion?.media.main?.altText||void 0,productImageUrl:N.productVersion?.media.main?.url||void 0,productStockStatus:N.productVersion?.stock.status,productTitle:`${N.productVersion?.product.brand.name} ${N.productVersion?.product.name}`,propositionTitle:Kn(N.content.data,i("format.gigabyte")),propositionSubtitle:bu(N.content),propositionImageUrl:N.provider.imageUrl,propositionImageAlt:N.provider.name,propositionSpecifications:ea(N),urgentText:ra(N.specialPromotions),specialPromotions:J1(el(N),F1(N)),modificationPromotions:N.modificationPromotions},N.key)),h.jsxs("div",{className:"flex flex-col gap-2 col-span-full mt-4",children:[h.jsx(Dh,{isReachingEnd:E,loadMore:$,isValidating:C,className:a?.loadMoreButton}),h.jsx(H9,{propositions:O.slice(0,3)})]}),h.jsx(Xc,{proposition:m?.proposition,defaultTab:m?.tab,buildClickOutUrl:b})]})}function cae({...e}){const{width:t}=xa(),{getActiveFilterValue:r}=vi(),n=t<768,o=t>=1024;switch(e.productCategory){case"fixed-proposition":return h.jsx(sae,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"smartphone-proposition":return r("telefoons").length===0?h.jsx(uae,{...e,productCategory:"smartphone-proposition-extended",propositionCardLayout:n||o?"vertical":"horizontal"}):h.jsx(lae,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"sim-only-proposition":return h.jsx(aae,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});default:return null}}function dae({productCategory:e,labelColorConfig:t={},limit:r=12,showTopPropositions:n=!1,addClickoutSearchParams:o,showProfileBanner:i,onDealSelected:s}){const{base:a,headerWrapper:l}=vt(),{distinctProperties:c,setDistinctProperties:d,handleFilterChange:f,handleFilterRemove:m,getActiveFilterValue:g}=vi(),{profile:b}=sn(),{width:y}=xa(),v=y>=1024,[C]=e==="smartphone-proposition"?g("telefoons"):[],[S]=g("sorteren"),k=(()=>{if(typeof n=="boolean")return n;const{requireNumberPreservation:E,requireCustomerBenefits:$}=n;return(!E||!!b.currentProviderSlug)&&(!$||!!b.currentFixedProviderScope)})(),P=e==="fixed-proposition";return h.jsxs("div",{className:A("grid grid-cols-1 lg:grid-cols-4 gap-4 lg:gap-x-6 w-full",a),children:[h.jsxs("div",{className:"flex flex-col gap-4 empty:hidden",children:[e==="smartphone-proposition"&&h.jsx(JY,{productSlug:C,selectedDistinctProperties:c,onChange:(E,$)=>{if(!E&&C){m({slug:"telefoons",value:C}),d([]),S!=="relevantie"&&f({slug:"sorteren",value:"relevantie"});return}E&&(!C||E!==C)&&f({slug:"telefoons",value:E}),!C&&S!=="relevantie"&&f({slug:"sorteren",value:"relevantie"}),d($)}}),v&&h.jsxs(h.Fragment,{children:[h.jsx(LN,{isFixed:P}),h.jsx(J6,{})]})]}),h.jsxs("div",{className:"@container col-span-1 lg:col-span-3 space-y-4",children:[h.jsxs("div",{className:A("flex flex-row-reverse justify-between items-center gap-2",l),children:[h.jsx(Gie,{}),v?h.jsx(M6,{}):h.jsx(gQ,{children:h.jsx(LN,{isFixed:P})})]}),i&&h.jsxs("div",{className:"flex flex-col gap-3 w-full @4xl:flex-row empty:hidden",children:[h.jsx(gu,{variant:"numberPreservation",isFixed:P}),h.jsx(gu,{variant:"postcodeCheck",isFixed:P}),h.jsx(gu,{variant:"combiDeal",isFixed:P})]}),h.jsx(cae,{productCategory:e,addClickoutSearchParams:o,onDealSelected:s,showTopPropositions:g("providers").length!==1&&["relevantie","top"].includes(S)&&k,labelColorConfig:t,limit:r})]}),P?h.jsx(Uie,{}):h.jsx(MN,{}),h.jsx(NN,{isFixed:P}),h.jsx(g6,{})]})}function fae({classNames:e,initialSelectedFilters:t,initialProfile:r,onProfileChange:n,onError:o,onAction:i,...s}){return h.jsxs(y6,{onError:o,children:[h.jsx(nE,{classNames:e,children:h.jsx(w6,{onAction:i,children:h.jsx($N,{initialProfile:r,onProfileChange:n,children:h.jsx(tQ,{initialSelectedFilters:t,productCategory:s.productCategory,children:h.jsx(iE,{children:h.jsx(dae,{...s})})})})})}),h.jsx(Bie,{})]})}function pae(e,t){let{elementType:r="a",onPress:n,onPressStart:o,onPressEnd:i,onClick:s,isDisabled:a,...l}=e,c={};r!=="a"&&(c={role:"link",tabIndex:a?void 0:0});let{focusableProps:d}=Bi(e,t),{pressProps:f,isPressed:m}=xn({onClick:s,onPress:n,onPressStart:o,onPressEnd:i,isDisabled:a,ref:t}),g=Ln(l,{labelable:!0,isLink:r==="a"}),b=it(d,f),y=Xu(),v=vg(e);return{isPressed:m,linkProps:it(g,v,{...b,...c,"aria-disabled":a||void 0,"aria-current":e["aria-current"],onClick:C=>{var S;(S=f.onClick)==null||S.call(f,C),VF(C,y,e.href,e.routerOptions)}})}}function hae(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,KC.variantKeys),{ref:l,as:c,children:d,anchorIcon:f,isExternal:m=!1,showAnchorIcon:g=!1,autoFocus:b=!1,className:y,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,...P}=s,E=c||"a",$=ot(l),O=(r=(t=e?.disableAnimation)!=null?t:i?.disableAnimation)!=null?r:!1,{linkProps:N}=pae({...P,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,isDisabled:e.isDisabled,elementType:`${c}`},$),{isFocused:D,isFocusVisible:M,focusProps:V}=Ir({autoFocus:b});m&&(P.rel=(n=P.rel)!=null?n:"noopener noreferrer",P.target=(o=P.target)!=null?o:"_blank");const R=x.useMemo(()=>KC({...a,disableAnimation:O,className:y}),[jr(a),O,y]),K=x.useCallback(()=>({ref:$,className:R,"data-focus":ae(D),"data-disabled":ae(e.isDisabled),"data-focus-visible":ae(M),...Oe(V,N,P,{href:N.href})}),[R,D,M,V,N,P]);return{Component:E,children:d,anchorIcon:f,showAnchorIcon:g,getLinkProps:K}}var q9=Xe((e,t)=>{const{Component:r,children:n,showAnchorIcon:o,anchorIcon:i=h.jsx(NU,{className:Y8}),getLinkProps:s}=hae({ref:t,...e});return h.jsx(r,{...s(),children:h.jsxs(h.Fragment,{children:[n,o&&i]})})});q9.displayName="HeroUI.Link";var zh=q9;function mae({monthlyFeePromotionText:e,monthlyFee:t,productPrice:r,classNames:n}){const{t:o}=Je();return h.jsxs("div",{className:A("flex flex-col",n?.wrapper),children:[e&&h.jsx("div",{className:A("text-xs text-foreground whitespace-nowrap",n?.promotionText),children:e}),h.jsxs("div",{className:A("text-base font-bold text-foreground",n?.monthlyFeeValue),children:[o("format.monthly"),": ",h.jsx("span",{children:t})]}),r&&h.jsxs("div",{className:A("text-base text-foreground",n?.oneTimeFee),children:[o("format.oneTime"),": ",h.jsx("span",{children:r})]})]})}function gae({triggerRef:e,monthlyFeePromotionText:t,productPrice:r,monthlyFee:n,isDisabled:o,onClick:i}){const{stickySummary:s}=vt(),[a,l]=x.useState(!1);return x.useEffect(()=>{if(!e?.current)return;const c=e.current,d=new IntersectionObserver(([f])=>l(!f.isIntersecting),{threshold:0});return d.observe(c),()=>d.disconnect()},[e]),h.jsxs("div",{className:A("fixed bottom-4 left-4 right-4 z-50 p-4 bg-background shadow-small rounded-large flex justify-between items-center","lg:hidden",s?.container,a?"animate-appearance-in animate":"animate-appearance-out"),children:[h.jsx(mae,{monthlyFeePromotionText:t,productPrice:r,monthlyFee:n,classNames:s?.pricing}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full",s?.button),color:"secondary",size:"lg",endContent:h.jsx(wa,{size:16}),disableAnimation:!0,disableRipple:!0,onPress:i,isDisabled:o,children:"Bestellen"})]})}var rw,G9;function bae(){if(G9)return rw;G9=1;var e=p$();function t(r){return r&&r.length?e(r):[]}return rw=t,rw}var vae=bae();const yae=ju(vae),Z9="|",xae=/plv-\d+/g,wae=/pvu?-\d+/g,Cae=/pvu?-(\d+)/,Sae=/^\d+-\d+/g,kae=/hc\d{1,2}-\d{1,2}(_\d{1,2})?/g,Pae=/^(\d+)-\d+/,Eae=/m\d+-\d+/g,Tae=/m(\d+)-\d+/;function ed(e){return yae(e.filter(Boolean)).sort().join(Z9)}function Y9(e){return e.split(Z9)}function Kh(e,t){if(t===0)return[[]];if(!t)return Kh(e,e.length);const[r,...n]=e;return[...Kh(n,t-1).map(o=>[r,...o]),...Kh(n,t-1)]}function Aae(e){return Kh(Y9(e)).map(ed)}function J9(e){return decodeURI(e).replace(/:/gi,"|").replace(/%3A/gi,"|").replace(/%7C/gi,"|")}const _ae={planVariant:xae,phoneVariant:wae,bundleSet:Sae,handsetCredit:kae,modification:Eae};function pn(e){const t=_ae[e];return r=>r.match(t)!==null}const $ae={bundleTypeSet:Pae,modificationGroup:Tae,productVersionId:Cae};function na(e){const t=$ae[e];return r=>(r.match(t)||["",""])[1]}class rl{unitKeys=[];constructor(t){this.update(t)}update(t){this.unitKeys=Y9(J9(t))}setPlanVariant(t){this.unitKeys=[...this.unitKeys.filter(r=>!pn("planVariant")(r)),t]}setPhoneVariant(t){this.unitKeys=[...this.unitKeys.filter(r=>!pn("phoneVariant")(r)),t]}setHandsetCredit(t){this.unitKeys=[...this.unitKeys.filter(r=>!pn("handsetCredit")(r)),t]}setBundleSets(t){this.unitKeys=[...this.unitKeys,...t]}setBundleSetsByBundleTypeSet(t,r){this.unitKeys=[...this.unitKeys.filter(n=>!(pn("bundleSet")(n)&&na("bundleTypeSet")(n)===t)),...r]}toggleBundleSet(t,r){const n=this.unitKeys.includes(t),o=this.unitKeys.filter(i=>na("bundleTypeSet")(i)===na("bundleTypeSet")(t));n&&r.required&&o.length===1||(this.unitKeys=[...this.unitKeys.filter(i=>r.multiSelect?i!==t:!o.includes(i)),...n?[]:[t]])}planVariant(){return this.unitKeys.find(pn("planVariant"))}phoneVariant(){return this.unitKeys.find(pn("phoneVariant"))}productVersionId(){const t=this.unitKeys.find(pn("phoneVariant"));return t&&na("productVersionId")(t)}modification(){return this.unitKeys.find(pn("modification"))}modifications(){return this.unitKeys.filter(pn("modification"))}modificationGroups(){return this.unitKeys.filter(pn("modification")).map(na("modificationGroup"))}handsetCredit(){return this.unitKeys.find(pn("handsetCredit"))}bundleSets(){return this.unitKeys.filter(pn("bundleSet"))}bundleTypeSets(){return this.unitKeys.filter(pn("bundleSet")).map(na("bundleTypeSet"))}key(){return ed(this.unitKeys)}urlKey(){return this.unitKeys.join(":")}scope(){return ed(this.unitKeys.filter(t=>pn("planVariant")(t)||pn("phoneVariant")(t)))}base(){return ed(this.unitKeys.filter(t=>!pn("handsetCredit")(t)))}combinations(){return Aae(this.key())}}function Iae(e,t){const[r,n]=e.split("-"),o=parseInt(r.replace("hc","")),i=parseFloat(n.replace("_",".")),s=o*i,a=t-s;return{unitKey:e,price:a,monthlyFee:i,creditFee:s,contractTerm:o}}const X9=x.createContext({isLoading:!1,error:void 0,notFound:!1,propositionKey:new rl(""),proposition:null,propositionSelector:null,setProductVersion:e=>{},setPlanVariant:e=>{},setHandsetCredit:e=>{},toggleBundleSet:e=>{}}),Nae=ft`
|
|
1345
1342
|
fragment ProductCardProduct on ProductVersion {
|
|
1346
1343
|
id
|
|
1347
1344
|
slug
|
|
@@ -1422,7 +1419,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1422
1419
|
}
|
|
1423
1420
|
}
|
|
1424
1421
|
}
|
|
1425
|
-
`,Dae=
|
|
1422
|
+
`,Dae=ft`
|
|
1426
1423
|
${Xv}
|
|
1427
1424
|
${Nae}
|
|
1428
1425
|
|
|
@@ -1531,7 +1528,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1531
1528
|
}
|
|
1532
1529
|
}
|
|
1533
1530
|
}
|
|
1534
|
-
`,Mae=
|
|
1531
|
+
`,Mae=ft`
|
|
1535
1532
|
query propositionSelector(
|
|
1536
1533
|
$key: String!
|
|
1537
1534
|
$productType: String!
|
|
@@ -1597,6 +1594,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1597
1594
|
unitKey
|
|
1598
1595
|
name
|
|
1599
1596
|
label
|
|
1597
|
+
tooltipText
|
|
1600
1598
|
usps
|
|
1601
1599
|
requiredBundleTypeSetId
|
|
1602
1600
|
requiredModificationGroupId
|
|
@@ -1633,7 +1631,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1633
1631
|
creditFee
|
|
1634
1632
|
}
|
|
1635
1633
|
}
|
|
1636
|
-
`;function Oae(e,t){if(!t)return e;const r=new rl(e);return r.bundleSets().includes(t)?e:(r.setBundleSetsByBundleTypeSet(na("bundleTypeSet")(t),[t]),r.key())}function Q9(e,t,r){const n=r?e.filter(i=>i.contractType===r):e;if(!t?.length)return n;const o=n.filter(i=>t.includes(i.contractTerm));return o.length>0?o:n}function eM(e,t,r){let n=t;if(r?.fixedInternetDataSpeedDown&&e.bundleTypes?.includes("internet")){const o=r.fixedInternetDataSpeedDown.min*1e3,i=n.filter(s=>s.content.dataSpeedDown>=o);i.length>0&&(n=i)}if(r?.hiddenBundleSets?.length){const o=new Set(r.hiddenBundleSets),i=n.filter(s=>!o.has(s.name??"")&&!o.has(s.label??""));i.length>0&&(n=i)}return n}function jae(e,t){return{...e,planVariants:Q9(e.planVariants,t?.contractTerms,e.planVariant?.contractType),bundleTypeSets:e.bundleTypeSets.map(r=>({...r,bundleSets:eM(r,r.bundleSets,t)}))}}function tM(e,t){const r=t.combinations();return e.filter(n=>r.includes(n.unitKey)).flatMap(n=>n.blacklist)}function rM(e,t){const r=t.bundleTypeSets(),n=t.modificationGroups();return e.bundleSets.filter(o=>(!e.requiredBundleTypeSetId||r.includes(e.requiredBundleTypeSetId))&&(!o.requiredBundleTypeSetId||r.includes(o.requiredBundleTypeSetId))&&(!o.requiredModificationGroupId||n.includes(o.requiredModificationGroupId)))}function nw(e,t){const r=[];e.map(o=>Iae(o,t)).reduce((o,i)=>((o===void 0||Math.abs(i.price)<=o)&&r.push(i),Math.abs(i.price)),void 0);const n=r.pop();return n&&r.push({...n,price:n.price<n.contractTerm/2?0:n.price}),r}const Lae=
|
|
1634
|
+
`;function Oae(e,t){if(!t)return e;const r=new rl(e);return r.bundleSets().includes(t)?e:(r.setBundleSetsByBundleTypeSet(na("bundleTypeSet")(t),[t]),r.key())}function Q9(e,t,r){const n=r?e.filter(i=>i.contractType===r):e;if(!t?.length)return n;const o=n.filter(i=>t.includes(i.contractTerm));return o.length>0?o:n}function eM(e,t,r){let n=t;if(r?.fixedInternetDataSpeedDown&&e.bundleTypes?.includes("internet")){const o=r.fixedInternetDataSpeedDown.min*1e3,i=n.filter(s=>s.content.dataSpeedDown>=o);i.length>0&&(n=i)}if(r?.hiddenBundleSets?.length){const o=new Set(r.hiddenBundleSets),i=n.filter(s=>!o.has(s.name??"")&&!o.has(s.label??""));i.length>0&&(n=i)}return n}function jae(e,t){return{...e,planVariants:Q9(e.planVariants,t?.contractTerms,e.planVariant?.contractType),bundleTypeSets:e.bundleTypeSets.map(r=>({...r,bundleSets:eM(r,r.bundleSets,t)}))}}function tM(e,t){const r=t.combinations();return e.filter(n=>r.includes(n.unitKey)).flatMap(n=>n.blacklist)}function rM(e,t){const r=t.bundleTypeSets(),n=t.modificationGroups();return e.bundleSets.filter(o=>(!e.requiredBundleTypeSetId||r.includes(e.requiredBundleTypeSetId))&&(!o.requiredBundleTypeSetId||r.includes(o.requiredBundleTypeSetId))&&(!o.requiredModificationGroupId||n.includes(o.requiredModificationGroupId)))}function nw(e,t){const r=[];e.map(o=>Iae(o,t)).reduce((o,i)=>((o===void 0||Math.abs(i.price)<=o)&&r.push(i),Math.abs(i.price)),void 0);const n=r.pop();return n&&r.push({...n,price:n.price<n.contractTerm/2?0:n.price}),r}const Lae=ft`
|
|
1637
1635
|
query searchAvailableFixedProposition(
|
|
1638
1636
|
$query: ElasticQuery!
|
|
1639
1637
|
$postcode: String!
|
|
@@ -1663,7 +1661,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1663
1661
|
}
|
|
1664
1662
|
}
|
|
1665
1663
|
}
|
|
1666
|
-
`;function Fae(e,t,r){const n=new N6().limit(1).sort("meest-gekozen").where({col:"modification_key",values:[""],valueType:"string"});return e&&n.where({col:"unit_keys",values:[e],valueType:"string"}),t&&n.where({col:"provider",values:[t],valueType:"string"}),r?.contractTerms?.length&&n.where({col:"contract_term",values:r.contractTerms.map(String),valueType:"string"}),r?.fixedInternetDataSpeedDown?.min&&n.where({col:"data_speed_down",values:[`${r.fixedInternetDataSpeedDown.min*1e3}-`]}),n.serialize()}function Bae({isQueryEnabled:e,isLoading:t,isPolling:r,isValidating:n,isPollingExpired:o,error:i,count:s,firstKey:a}){return e?o?{isLoading:!1,error:"Postcode check timed out"}:t||r||n?{isLoading:!0}:i?{isLoading:!1,error:i instanceof Error?i.message:String(i)}:!a||s===0?{isLoading:!1,notFound:!0}:{isLoading:!1,propositionKey:a}:{isLoading:!1}}const ow=1e3,nM=1e4;function oM(e,t){const[r,n]=x.useState(!1),[o,i]=x.useState(0),s=x.useRef(!1);return _L(()=>{if(e){if(o+ow>=nM){s.current=!0,n(!1),i(0);return}t(),i(a=>a+ow)}},r&&o<nM?ow:null),x.useEffect(()=>{s.current||(e?(s.current=!1,n(!0),i(0)):r&&(n(!1),i(0)))},[e]),{isPollingExpired:s.current}}const iM={postcode:"2266AD",number:22,numberAddon:""};function zae({initialBundleSetUnitKey:e,fixedProviderSlug:t,filters:r,enabled:n}){const{profile:o}=sn(),i=x.useMemo(()=>Fae(e,t,r),[e,t,r]),{data:s,error:a,isLoading:l,mutate:c}=xp(n?[Lae,{query:i,...o.address?{postcode:o.address.postcode,number:parseInt(o.address.number,10),numberAddon:o.address.numberAddon??""}:iM}]:null,nn,{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]}),d=!!s?.fetchInfo.polling,f=!!s?.fetchInfo.validating,{isPollingExpired:m}=oM(n&&(d||f),()=>{c()});return Bae({isQueryEnabled:n,isLoading:l,isPolling:d,isValidating:f,isPollingExpired:m,error:a,count:s?.search.count,firstKey:s?.search.records[0]?.key})}var Vh={},sM;function Kae(){if(sM)return Vh;sM=1,Object.defineProperty(Vh,"__esModule",{value:!0});var e=x;function t(r){var n=e.useRef();return e.useEffect(function(){n.current=r}),n.current}return Vh.default=t,Vh}var Vae=Kae();const Rae=ju(Vae);function Wae(e,t){return!e?.propositionSelector||!t.propositionSelector?!1:e.propositionSelector.planVariantKey!==t.propositionSelector.planVariantKey}function Uae(e,t){if(!e?.propositionSelector||!t.propositionSelector)return[];const r=new rl(e.propositionSelector.key),n=e.propositionSelector.bundleTypeSets.flatMap(o=>o.bundleSets).filter(o=>r.bundleSets().includes(o.unitKey));return t.propositionSelector.bundleTypeSets.flatMap(o=>o.bundleSets).filter(o=>n.some(i=>i.name===o.name&&i.label===o.label)).map(o=>o.unitKey)}function aM(e,t){if(!e.propositionSelector?.alternatePlanVariant)return!1;const{providerSlug:r,planVariant:n}=e.propositionSelector;return r===t&&n.contractType==="acquisition"||r!==t&&n.contractType==="retention"}function Hae(e,t,r){const{phoneVariantKey:n,modificationKey:o,handsetCreditKeys:i,basePrice:s}=t,a=Q9(t.planVariants,r?.contractTerms,t.planVariant.contractType),l=a.find(g=>g.unitKey===t.planVariantKey)?.unitKey??a[0]?.unitKey??t.planVariantKey,c=new rl(ed([l,n,o,e.handsetCredit(),...e.bundleSets().filter(g=>t.bundleTypeSets.find(b=>b.unitKey===na("bundleTypeSet")(g)))])),d=g=>{const b=tM(t.blacklists,c);return g.filter(y=>!b.includes(y.unitKey))};t.bundleTypeSets.forEach(g=>{const b=eM(g,d(rM(g,c)),r),y=b.filter(({unitKey:v})=>c.bundleSets().includes(v));g.required&&b.length&&!y.length?c.setBundleSetsByBundleTypeSet(g.unitKey,[b[0].unitKey]):c.setBundleSetsByBundleTypeSet(g.unitKey,y.map(({unitKey:v})=>v))});const f=d(nw(i,s)),m=f.find(({unitKey:g})=>g===c.handsetCredit())||f[f.length-1];return m&&c.setHandsetCredit(m.unitKey),c.key()}function qae(e,t,r,n){const o=Rae(t);if(!t.propositionSelector)return e;const i=new rl(e);return o&&aM(o,r)&&o.propositionSelector?.alternatePlanVariant&&i.setPlanVariant(o.propositionSelector.alternatePlanVariant.unitKey),Wae(o,t)&&i.setBundleSets(Uae(o,t)),i.update(Hae(i,t.propositionSelector,n)),aM(t,r)&&t.propositionSelector.alternatePlanVariant&&i.setPlanVariant(t.propositionSelector.alternatePlanVariant.unitKey),i.key()!==e?i.key():e}function Gae({propositionKey:e,giftConfig:t,filters:r,children:n,onPropositionKeyChange:o}){const{profile:i}=sn(),[s,a]=x.useState(t?"":J9(e??"")),l=zae({...t,filters:r,enabled:!!t&&s.length===0}),c=new rl(s),{data:{proposition:d}={},isLoading:f,error:m}=Vo(s.length>0?[Dae,{key:c.key()}]:null,{use:[Yn],fetcher:nn}),g=d?CN(d.productType,i):void 0,{data:{propositionSelector:b}={},isLoading:y,error:v,mutate:C}=Vo(d?[Mae,{key:c.base(),productType:d.productType,provider:d.provider.slug,currentProvider:g,product:d.product?.slug,modificationBlocks:Yc(d.productType,i,t?.mobileProviderSlug),...d.productType==="fixed"&&(i.address?{postcode:i.address.postcode,number:parseInt(i.address.number,10),numberAddon:i.address.numberAddon??""}:t&&iM)}]:null,{use:[Yn],fetcher:nn}),S=!!(d?.productType==="fixed"&&v?.message.includes("loading_postcode")),{isPollingExpired:k}=oM(S,C),P=qae(s,{propositionSelector:b},g,r);function E(R){a(R),o?.(R)}x.useEffect(()=>{!l.propositionKey||s.length>0||E(Oae(l.propositionKey,t?.initialBundleSetUnitKey))},[l.propositionKey,s.length,t?.initialBundleSetUnitKey]),x.useEffect(()=>{P!==s&&E(P)},[P]);const $=x.useMemo(()=>{if(!b)return b;const R=new rl(s),K=tM(b.blacklists,R),j=b.bundleTypeSets.map(U=>{const W=rM(U,R).filter(L=>!K.includes(L.unitKey));return{...U,bundleSets:W}}),B=nw(b.handsetCreditKeys,b.basePrice).filter(U=>!K.includes(U.unitKey)).map(U=>U.unitKey);return jae({...b,bundleTypeSets:j,handsetCreditKeys:B},r)},[b,s,r]);function O(R){c.setPhoneVariant(`pvu-${R}`),E(c.key())}function N(R){c.setPlanVariant(R),E(c.key())}function D(R){c.setHandsetCredit(R),E(c.key())}function M(R,K){c.toggleBundleSet(R,K),E(c.key())}const V=!!t&&s.length===0&&!l.error&&!l.notFound;return h.jsx(X9,{value:{isLoading:V||l.isLoading||f||y||S&&!k,error:l.error||m||(S&&!k?void 0:v),notFound:!!l.notFound,propositionKey:c,proposition:d,propositionSelector:$,setProductVersion:O,setPlanVariant:N,setHandsetCredit:D,toggleBundleSet:M},children:n})}function Xi(){return x.useContext(X9)}const lM={odido:"Odido",kpn:"KPN",vodafone:"Vodafone",ben:"Ben",hollandsnieuwe:"hollandsnieuwe",lebara:"Lebara",youfone:"Youfone",simyo:"Simyo",delta:"Delta",caiway:"Caiway",budget:"Budget Mobiel","budget-alles-in-1":"Budget Alles-in-1","budget-internet":"Budget Internet","50plusmobiel":"50+ Mobiel",ziggo:"Ziggo",other:"Andere / geen provider","other/moving":"Geen i.v.m. verhuizing"};function Rh({options:e,value:t,onValueChange:r,classNames:n,...o}){return h.jsx(ih,{value:t,onValueChange:r,classNames:{base:A("w-full @container",n?.base),wrapper:A("w-full flex flex-col gap-3 @max-sm:data-[orientation=horizontal]:flex-col",n?.wrapper),label:A("mb-3 text-foreground font-bold",n?.label),description:A(n?.description),errorMessage:A(n?.errorMessage)},...o,children:e.map(i=>h.jsx(du,{color:"primary",value:i.value,name:i.value,isDisabled:i.isDisabled,description:i.description,classNames:{base:A("items-start gap-1 border-medium border-default-200 m-0 hover:border-default-400 rounded-2xl p-4 data-[selected=true]:border-primary [&]:max-w-none flex-1",n?.radio?.base),wrapper:A("mt-0.5",n?.radio?.wrapper),hiddenInput:A(n?.radio?.hiddenInput),labelWrapper:A("w-full",n?.radio?.labelWrapper),label:A("w-full",n?.radio?.label),control:A(n?.radio?.control),description:A(n?.radio?.description)},children:i.label},i.value))})}function Zae({options:e,value:t,onValueChange:r,classNames:n,...o}){return h.jsx(Z6,{value:t,onValueChange:r,classNames:{base:A("w-full @container",n?.base),wrapper:A("w-full flex flex-col gap-3 @max-sm:data-[orientation=horizontal]:flex-col",n?.wrapper),label:A("mb-3 text-foreground font-bold",n?.label),description:A(n?.description),errorMessage:A(n?.errorMessage)},...o,children:e.map(i=>h.jsx(sh,{color:"primary",value:i.value,isDisabled:i.isDisabled,classNames:{base:A("border-medium border-default-200 hover:border-default-400 m-0 w-full max-w-none rounded-2xl p-4 data-[selected=true]:border-primary",n?.checkbox?.base),wrapper:A("rounded-[calc(var(--elements-radius-medium)*0.6)] before:rounded-[calc(var(--elements-radius-medium)*0.6)] after:rounded-[calc(var(--elements-radius-medium)*0.6)]",n?.checkbox?.wrapper),hiddenInput:A(n?.checkbox?.hiddenInput),icon:A(n?.checkbox?.icon),label:A("w-full",n?.checkbox?.label)},children:i.label},i.value))})}function uM(e){if(!(!e.name.includes("GB")||e.content.data===Qn||!e.modifications?.name))return`${(e.content.data-e.modifications.content.data)/1e3} GB`}function cM(e){if(e.includes("t.w.v.")){const[r,n]=e.split("t.w.v.");return{title:r.trim(),subtitle:`t.w.v. ${n.trim()}`}}const t=e.split(" + ");return t.length<3?{title:e}:{title:t.shift()||e,subtitle:t.join(" + ")}}function Yae({title:e,unitKey:t,classNames:r,children:n}){const{t:o}=Je(),{popoverProps:i,isShadowRoot:s}=Zn(),{isModalOpen:a,openModal:l,closeModal:c}=Qt();return h.jsx(fi,{isOpen:a(`bundle-type-set-${t}`),onOpenChange:d=>d?l(`bundle-type-set-${t}`):c(`bundle-type-set-${t}`),placement:"bottom-center",scrollBehavior:"inside",size:"lg",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(r?.backdrop),wrapper:A(r?.wrapper),base:A("m-0 max-h-[90vh]",r?.base),header:A(r?.header),body:A("pt-0",r?.body),footer:A(r?.footer),closeButton:A("cursor-pointer right-6 top-3.5",r?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e}),h.jsx(ai,{children:n}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",r?.confirmButton),onPress:()=>c(`bundle-type-set-${t}`),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:o("common.confirm")})})]})})}var td={exports:{}};var Jae=td.exports,dM;function Xae(){return dM||(dM=1,(function(e,t){(function(){var r,n="4.18.1",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",m=1,g=2,b=4,y=1,v=2,C=1,S=2,k=4,P=8,E=16,$=32,O=64,N=128,D=256,M=512,V=30,R="...",K=800,j=16,B=1,U=2,W=3,L=1/0,Z=9007199254740991,T=17976931348623157e292,F=NaN,_=4294967295,H=_-1,Y=_>>>1,X=[["ary",N],["bind",C],["bindKey",S],["curry",P],["curryRight",E],["flip",M],["partial",$],["partialRight",O],["rearg",D]],oe="[object Arguments]",Q="[object Array]",le="[object AsyncFunction]",ue="[object Boolean]",te="[object Date]",ge="[object DOMException]",Se="[object Error]",pe="[object Function]",we="[object GeneratorFunction]",be="[object Map]",re="[object Number]",ke="[object Null]",Ne="[object Object]",Me="[object Promise]",Pe="[object Proxy]",Ae="[object RegExp]",xe="[object Set]",Ie="[object String]",et="[object Symbol]",wt="[object Undefined]",lt="[object WeakMap]",Ut="[object WeakSet]",ut="[object ArrayBuffer]",Ue="[object DataView]",Vt="[object Float32Array]",Jt="[object Float64Array]",Xt="[object Int8Array]",sr="[object Int16Array]",Ct="[object Int32Array]",Sr="[object Uint8Array]",dr="[object Uint8ClampedArray]",kr="[object Uint16Array]",$t="[object Uint32Array]",tt=/\b__p \+= '';/g,It=/\b(__p \+=) '' \+/g,ar=/(__e\(.*?\)|\b__t\)) \+\n'';/g,er=/&(?:amp|lt|gt|quot|#39);/g,Yr=/[&<>"']/g,en=RegExp(er.source),ki=RegExp(Yr.source),hn=/<%-([\s\S]+?)%>/g,to=/<%([\s\S]+?)%>/g,Ur=/<%=([\s\S]+?)%>/g,jt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qi=/^\w*$/,oa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jo=/[\\^$.*+?()[\]{}|]/g,St=RegExp(Jo.source),Xo=/^\s+/,Pi=/\s/,es=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nl=/\{\n\/\* \[wrapped with (.+)\] \*/,ol=/,? & /,ia=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ei=/[()=,{}\[\]\/\s]/,rt=/\\(\\)?/g,Qo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vu=/\w*$/,an=/^[-+]0x[0-9a-f]+$/i,yu=/^0b[01]+$/i,sa=/^\[object .+?Constructor\]$/,il=/^0o[0-7]+$/i,aa=/^(?:0|[1-9]\d*)$/,od=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ts=/($^)/,sl=/['\n\r\u2028\u2029\\]/g,rs="\\ud800-\\udfff",Dr="\\u0300-\\u036f",Eo="\\ufe20-\\ufe2f",_e="\\u20d0-\\u20ff",ro=Dr+Eo+_e,Ti="\\u2700-\\u27bf",To="a-z\\xdf-\\xf6\\xf8-\\xff",al="\\xac\\xb1\\xd7\\xf7",iw="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xu="\\u2000-\\u206f",ll=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Wh="A-Z\\xc0-\\xd6\\xd8-\\xde",Uh="\\ufe0e\\ufe0f",Hh=al+iw+xu+ll,id="['’]",sw="["+rs+"]",qh="["+Hh+"]",wu="["+ro+"]",Gh="\\d+",sd="["+Ti+"]",ad="["+To+"]",Zh="[^"+rs+Hh+Gh+Ti+To+Wh+"]",Ai="\\ud83c[\\udffb-\\udfff]",aw="(?:"+wu+"|"+Ai+")",Cu="[^"+rs+"]",ld="(?:\\ud83c[\\udde6-\\uddff]){2}",ud="[\\ud800-\\udbff][\\udc00-\\udfff]",la="["+Wh+"]",Yh="\\u200d",vM="(?:"+ad+"|"+Zh+")",xle="(?:"+la+"|"+Zh+")",yM="(?:"+id+"(?:d|ll|m|re|s|t|ve))?",xM="(?:"+id+"(?:D|LL|M|RE|S|T|VE))?",wM=aw+"?",CM="["+Uh+"]?",wle="(?:"+Yh+"(?:"+[Cu,ld,ud].join("|")+")"+CM+wM+")*",Cle="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sle="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",SM=CM+wM+wle,kle="(?:"+[sd,ld,ud].join("|")+")"+SM,Ple="(?:"+[Cu+wu+"?",wu,ld,ud,sw].join("|")+")",Ele=RegExp(id,"g"),Tle=RegExp(wu,"g"),lw=RegExp(Ai+"(?="+Ai+")|"+Ple+SM,"g"),Ale=RegExp([la+"?"+ad+"+"+yM+"(?="+[qh,la,"$"].join("|")+")",xle+"+"+xM+"(?="+[qh,la+vM,"$"].join("|")+")",la+"?"+vM+"+"+yM,la+"+"+xM,Sle,Cle,Gh,kle].join("|"),"g"),_le=RegExp("["+Yh+rs+ro+Uh+"]"),$le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ile=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nle=-1,fr={};fr[Vt]=fr[Jt]=fr[Xt]=fr[sr]=fr[Ct]=fr[Sr]=fr[dr]=fr[kr]=fr[$t]=!0,fr[oe]=fr[Q]=fr[ut]=fr[ue]=fr[Ue]=fr[te]=fr[Se]=fr[pe]=fr[be]=fr[re]=fr[Ne]=fr[Ae]=fr[xe]=fr[Ie]=fr[lt]=!1;var lr={};lr[oe]=lr[Q]=lr[ut]=lr[Ue]=lr[ue]=lr[te]=lr[Vt]=lr[Jt]=lr[Xt]=lr[sr]=lr[Ct]=lr[be]=lr[re]=lr[Ne]=lr[Ae]=lr[xe]=lr[Ie]=lr[et]=lr[Sr]=lr[dr]=lr[kr]=lr[$t]=!0,lr[Se]=lr[pe]=lr[lt]=!1;var Dle={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Mle={"&":"&","<":"<",">":">",'"':""","'":"'"},Ole={"&":"&","<":"<",">":">",""":'"',"'":"'"},jle={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Lle=parseFloat,Fle=parseInt,kM=typeof fs=="object"&&fs&&fs.Object===Object&&fs,Ble=typeof self=="object"&&self&&self.Object===Object&&self,ln=kM||Ble||Function("return this")(),uw=t&&!t.nodeType&&t,ul=uw&&!0&&e&&!e.nodeType&&e,PM=ul&&ul.exports===uw,cw=PM&&kM.process,Ao=(function(){try{var ie=ul&&ul.require&&ul.require("util").types;return ie||cw&&cw.binding&&cw.binding("util")}catch{}})(),EM=Ao&&Ao.isArrayBuffer,TM=Ao&&Ao.isDate,AM=Ao&&Ao.isMap,_M=Ao&&Ao.isRegExp,$M=Ao&&Ao.isSet,IM=Ao&&Ao.isTypedArray;function no(ie,de,ce){switch(ce.length){case 0:return ie.call(de);case 1:return ie.call(de,ce[0]);case 2:return ie.call(de,ce[0],ce[1]);case 3:return ie.call(de,ce[0],ce[1],ce[2])}return ie.apply(de,ce)}function zle(ie,de,ce,Le){for(var st=-1,Wt=ie==null?0:ie.length;++st<Wt;){var Jr=ie[st];de(Le,Jr,ce(Jr),ie)}return Le}function oo(ie,de){for(var ce=-1,Le=ie==null?0:ie.length;++ce<Le&&de(ie[ce],ce,ie)!==!1;);return ie}function Kle(ie,de){for(var ce=ie==null?0:ie.length;ce--&&de(ie[ce],ce,ie)!==!1;);return ie}function NM(ie,de){for(var ce=-1,Le=ie==null?0:ie.length;++ce<Le;)if(!de(ie[ce],ce,ie))return!1;return!0}function ua(ie,de){for(var ce=-1,Le=ie==null?0:ie.length,st=0,Wt=[];++ce<Le;){var Jr=ie[ce];de(Jr,ce,ie)&&(Wt[st++]=Jr)}return Wt}function Jh(ie,de){var ce=ie==null?0:ie.length;return!!ce&&Su(ie,de,0)>-1}function dw(ie,de,ce){for(var Le=-1,st=ie==null?0:ie.length;++Le<st;)if(ce(de,ie[Le]))return!0;return!1}function br(ie,de){for(var ce=-1,Le=ie==null?0:ie.length,st=Array(Le);++ce<Le;)st[ce]=de(ie[ce],ce,ie);return st}function ca(ie,de){for(var ce=-1,Le=de.length,st=ie.length;++ce<Le;)ie[st+ce]=de[ce];return ie}function fw(ie,de,ce,Le){var st=-1,Wt=ie==null?0:ie.length;for(Le&&Wt&&(ce=ie[++st]);++st<Wt;)ce=de(ce,ie[st],st,ie);return ce}function Vle(ie,de,ce,Le){var st=ie==null?0:ie.length;for(Le&&st&&(ce=ie[--st]);st--;)ce=de(ce,ie[st],st,ie);return ce}function pw(ie,de){for(var ce=-1,Le=ie==null?0:ie.length;++ce<Le;)if(de(ie[ce],ce,ie))return!0;return!1}var Rle=hw("length");function Wle(ie){return ie.split("")}function Ule(ie){return ie.match(ia)||[]}function DM(ie,de,ce){var Le;return ce(ie,function(st,Wt,Jr){if(de(st,Wt,Jr))return Le=Wt,!1}),Le}function Xh(ie,de,ce,Le){for(var st=ie.length,Wt=ce+(Le?1:-1);Le?Wt--:++Wt<st;)if(de(ie[Wt],Wt,ie))return Wt;return-1}function Su(ie,de,ce){return de===de?nue(ie,de,ce):Xh(ie,MM,ce)}function Hle(ie,de,ce,Le){for(var st=ce-1,Wt=ie.length;++st<Wt;)if(Le(ie[st],de))return st;return-1}function MM(ie){return ie!==ie}function OM(ie,de){var ce=ie==null?0:ie.length;return ce?gw(ie,de)/ce:F}function hw(ie){return function(de){return de==null?r:de[ie]}}function mw(ie){return function(de){return ie==null?r:ie[de]}}function jM(ie,de,ce,Le,st){return st(ie,function(Wt,Jr,tr){ce=Le?(Le=!1,Wt):de(ce,Wt,Jr,tr)}),ce}function qle(ie,de){var ce=ie.length;for(ie.sort(de);ce--;)ie[ce]=ie[ce].value;return ie}function gw(ie,de){for(var ce,Le=-1,st=ie.length;++Le<st;){var Wt=de(ie[Le]);Wt!==r&&(ce=ce===r?Wt:ce+Wt)}return ce}function bw(ie,de){for(var ce=-1,Le=Array(ie);++ce<ie;)Le[ce]=de(ce);return Le}function Gle(ie,de){return br(de,function(ce){return[ce,ie[ce]]})}function LM(ie){return ie&&ie.slice(0,KM(ie)+1).replace(Xo,"")}function io(ie){return function(de){return ie(de)}}function vw(ie,de){return br(de,function(ce){return ie[ce]})}function cd(ie,de){return ie.has(de)}function FM(ie,de){for(var ce=-1,Le=ie.length;++ce<Le&&Su(de,ie[ce],0)>-1;);return ce}function BM(ie,de){for(var ce=ie.length;ce--&&Su(de,ie[ce],0)>-1;);return ce}function Zle(ie,de){for(var ce=ie.length,Le=0;ce--;)ie[ce]===de&&++Le;return Le}var Yle=mw(Dle),Jle=mw(Mle);function Xle(ie){return"\\"+jle[ie]}function Qle(ie,de){return ie==null?r:ie[de]}function ku(ie){return _le.test(ie)}function eue(ie){return $le.test(ie)}function tue(ie){for(var de,ce=[];!(de=ie.next()).done;)ce.push(de.value);return ce}function yw(ie){var de=-1,ce=Array(ie.size);return ie.forEach(function(Le,st){ce[++de]=[st,Le]}),ce}function zM(ie,de){return function(ce){return ie(de(ce))}}function da(ie,de){for(var ce=-1,Le=ie.length,st=0,Wt=[];++ce<Le;){var Jr=ie[ce];(Jr===de||Jr===f)&&(ie[ce]=f,Wt[st++]=ce)}return Wt}function Qh(ie){var de=-1,ce=Array(ie.size);return ie.forEach(function(Le){ce[++de]=Le}),ce}function rue(ie){var de=-1,ce=Array(ie.size);return ie.forEach(function(Le){ce[++de]=[Le,Le]}),ce}function nue(ie,de,ce){for(var Le=ce-1,st=ie.length;++Le<st;)if(ie[Le]===de)return Le;return-1}function oue(ie,de,ce){for(var Le=ce+1;Le--;)if(ie[Le]===de)return Le;return Le}function Pu(ie){return ku(ie)?sue(ie):Rle(ie)}function ei(ie){return ku(ie)?aue(ie):Wle(ie)}function KM(ie){for(var de=ie.length;de--&&Pi.test(ie.charAt(de)););return de}var iue=mw(Ole);function sue(ie){for(var de=lw.lastIndex=0;lw.test(ie);)++de;return de}function aue(ie){return ie.match(lw)||[]}function lue(ie){return ie.match(Ale)||[]}var uue=(function ie(de){de=de==null?ln:Eu.defaults(ln.Object(),de,Eu.pick(ln,Ile));var ce=de.Array,Le=de.Date,st=de.Error,Wt=de.Function,Jr=de.Math,tr=de.Object,xw=de.RegExp,cue=de.String,_o=de.TypeError,em=ce.prototype,due=Wt.prototype,Tu=tr.prototype,tm=de["__core-js_shared__"],rm=due.toString,Ht=Tu.hasOwnProperty,fue=0,VM=(function(){var u=/[^.]+$/.exec(tm&&tm.keys&&tm.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""})(),nm=Tu.toString,pue=rm.call(tr),hue=ln._,mue=xw("^"+rm.call(Ht).replace(Jo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),om=PM?de.Buffer:r,fa=de.Symbol,im=de.Uint8Array,RM=om?om.allocUnsafe:r,sm=zM(tr.getPrototypeOf,tr),WM=tr.create,UM=Tu.propertyIsEnumerable,am=em.splice,HM=fa?fa.isConcatSpreadable:r,dd=fa?fa.iterator:r,cl=fa?fa.toStringTag:r,lm=(function(){try{var u=ml(tr,"defineProperty");return u({},"",{}),u}catch{}})(),gue=de.clearTimeout!==ln.clearTimeout&&de.clearTimeout,bue=Le&&Le.now!==ln.Date.now&&Le.now,vue=de.setTimeout!==ln.setTimeout&&de.setTimeout,um=Jr.ceil,cm=Jr.floor,ww=tr.getOwnPropertySymbols,yue=om?om.isBuffer:r,qM=de.isFinite,xue=em.join,wue=zM(tr.keys,tr),Xr=Jr.max,mn=Jr.min,Cue=Le.now,Sue=de.parseInt,GM=Jr.random,kue=em.reverse,Cw=ml(de,"DataView"),fd=ml(de,"Map"),Sw=ml(de,"Promise"),Au=ml(de,"Set"),pd=ml(de,"WeakMap"),hd=ml(tr,"create"),dm=pd&&new pd,_u={},Pue=gl(Cw),Eue=gl(fd),Tue=gl(Sw),Aue=gl(Au),_ue=gl(pd),fm=fa?fa.prototype:r,md=fm?fm.valueOf:r,ZM=fm?fm.toString:r;function q(u){if(_r(u)&&!ct(u)&&!(u instanceof Nt)){if(u instanceof $o)return u;if(Ht.call(u,"__wrapped__"))return Y7(u)}return new $o(u)}var $u=(function(){function u(){}return function(p){if(!Pr(p))return{};if(WM)return WM(p);u.prototype=p;var w=new u;return u.prototype=r,w}})();function pm(){}function $o(u,p){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=r}q.templateSettings={escape:hn,evaluate:to,interpolate:Ur,variable:"",imports:{_:q}},q.prototype=pm.prototype,q.prototype.constructor=q,$o.prototype=$u(pm.prototype),$o.prototype.constructor=$o;function Nt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=_,this.__views__=[]}function $ue(){var u=new Nt(this.__wrapped__);return u.__actions__=Vn(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Vn(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Vn(this.__views__),u}function Iue(){if(this.__filtered__){var u=new Nt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function Nue(){var u=this.__wrapped__.value(),p=this.__dir__,w=ct(u),I=p<0,z=w?u.length:0,G=Wce(0,z,this.__views__),J=G.start,ee=G.end,se=ee-J,he=I?ee:J-1,me=this.__iteratees__,Ce=me.length,De=0,Re=mn(se,this.__takeCount__);if(!w||!I&&z==se&&Re==se)return y7(u,this.__actions__);var Ge=[];e:for(;se--&&De<Re;){he+=p;for(var gt=-1,He=u[he];++gt<Ce;){var _t=me[gt],Mt=_t.iteratee,lo=_t.type,Dn=Mt(He);if(lo==U)He=Dn;else if(!Dn){if(lo==B)continue e;break e}}Ge[De++]=He}return Ge}Nt.prototype=$u(pm.prototype),Nt.prototype.constructor=Nt;function dl(u){var p=-1,w=u==null?0:u.length;for(this.clear();++p<w;){var I=u[p];this.set(I[0],I[1])}}function Due(){this.__data__=hd?hd(null):{},this.size=0}function Mue(u){var p=this.has(u)&&delete this.__data__[u];return this.size-=p?1:0,p}function Oue(u){var p=this.__data__;if(hd){var w=p[u];return w===c?r:w}return Ht.call(p,u)?p[u]:r}function jue(u){var p=this.__data__;return hd?p[u]!==r:Ht.call(p,u)}function Lue(u,p){var w=this.__data__;return this.size+=this.has(u)?0:1,w[u]=hd&&p===r?c:p,this}dl.prototype.clear=Due,dl.prototype.delete=Mue,dl.prototype.get=Oue,dl.prototype.has=jue,dl.prototype.set=Lue;function ns(u){var p=-1,w=u==null?0:u.length;for(this.clear();++p<w;){var I=u[p];this.set(I[0],I[1])}}function Fue(){this.__data__=[],this.size=0}function Bue(u){var p=this.__data__,w=hm(p,u);if(w<0)return!1;var I=p.length-1;return w==I?p.pop():am.call(p,w,1),--this.size,!0}function zue(u){var p=this.__data__,w=hm(p,u);return w<0?r:p[w][1]}function Kue(u){return hm(this.__data__,u)>-1}function Vue(u,p){var w=this.__data__,I=hm(w,u);return I<0?(++this.size,w.push([u,p])):w[I][1]=p,this}ns.prototype.clear=Fue,ns.prototype.delete=Bue,ns.prototype.get=zue,ns.prototype.has=Kue,ns.prototype.set=Vue;function os(u){var p=-1,w=u==null?0:u.length;for(this.clear();++p<w;){var I=u[p];this.set(I[0],I[1])}}function Rue(){this.size=0,this.__data__={hash:new dl,map:new(fd||ns),string:new dl}}function Wue(u){var p=Em(this,u).delete(u);return this.size-=p?1:0,p}function Uue(u){return Em(this,u).get(u)}function Hue(u){return Em(this,u).has(u)}function que(u,p){var w=Em(this,u),I=w.size;return w.set(u,p),this.size+=w.size==I?0:1,this}os.prototype.clear=Rue,os.prototype.delete=Wue,os.prototype.get=Uue,os.prototype.has=Hue,os.prototype.set=que;function fl(u){var p=-1,w=u==null?0:u.length;for(this.__data__=new os;++p<w;)this.add(u[p])}function Gue(u){return this.__data__.set(u,c),this}function Zue(u){return this.__data__.has(u)}fl.prototype.add=fl.prototype.push=Gue,fl.prototype.has=Zue;function ti(u){var p=this.__data__=new ns(u);this.size=p.size}function Yue(){this.__data__=new ns,this.size=0}function Jue(u){var p=this.__data__,w=p.delete(u);return this.size=p.size,w}function Xue(u){return this.__data__.get(u)}function Que(u){return this.__data__.has(u)}function ece(u,p){var w=this.__data__;if(w instanceof ns){var I=w.__data__;if(!fd||I.length<o-1)return I.push([u,p]),this.size=++w.size,this;w=this.__data__=new os(I)}return w.set(u,p),this.size=w.size,this}ti.prototype.clear=Yue,ti.prototype.delete=Jue,ti.prototype.get=Xue,ti.prototype.has=Que,ti.prototype.set=ece;function YM(u,p){var w=ct(u),I=!w&&bl(u),z=!w&&!I&&ba(u),G=!w&&!I&&!z&&Mu(u),J=w||I||z||G,ee=J?bw(u.length,cue):[],se=ee.length;for(var he in u)(p||Ht.call(u,he))&&!(J&&(he=="length"||z&&(he=="offset"||he=="parent")||G&&(he=="buffer"||he=="byteLength"||he=="byteOffset")||as(he,se)))&&ee.push(he);return ee}function JM(u){var p=u.length;return p?u[Mw(0,p-1)]:r}function tce(u,p){return Tm(Vn(u),pl(p,0,u.length))}function rce(u){return Tm(Vn(u))}function kw(u,p,w){(w!==r&&!ni(u[p],w)||w===r&&!(p in u))&&_i(u,p,w)}function gd(u,p,w){var I=u[p];(!(Ht.call(u,p)&&ni(I,w))||w===r&&!(p in u))&&_i(u,p,w)}function hm(u,p){for(var w=u.length;w--;)if(ni(u[w][0],p))return w;return-1}function nce(u,p,w,I){return pa(u,function(z,G,J){p(I,z,w(z),J)}),I}function XM(u,p){return u&&Ii(p,tn(p),u)}function oce(u,p){return u&&Ii(p,Wn(p),u)}function _i(u,p,w){p=="__proto__"&&lm?lm(u,p,{configurable:!0,enumerable:!0,value:w,writable:!0}):u[p]=w}function Pw(u,p){for(var w=-1,I=p.length,z=ce(I),G=u==null;++w<I;)z[w]=G?r:sC(u,p[w]);return z}function pl(u,p,w){return u===u&&(w!==r&&(u=u<=w?u:w),p!==r&&(u=u>=p?u:p)),u}function Io(u,p,w,I,z,G){var J,ee=p&m,se=p&g,he=p&b;if(w&&(J=z?w(u,I,z,G):w(u)),J!==r)return J;if(!Pr(u))return u;var me=ct(u);if(me){if(J=Hce(u),!ee)return Vn(u,J)}else{var Ce=gn(u),De=Ce==pe||Ce==we;if(ba(u))return C7(u,ee);if(Ce==Ne||Ce==oe||De&&!z){if(J=se||De?{}:K7(u),!ee)return se?Oce(u,oce(J,u)):Mce(u,XM(J,u))}else{if(!lr[Ce])return z?u:{};J=qce(u,Ce,ee)}}G||(G=new ti);var Re=G.get(u);if(Re)return Re;G.set(u,J),gO(u)?u.forEach(function(He){J.add(Io(He,p,w,He,u,G))}):hO(u)&&u.forEach(function(He,_t){J.set(_t,Io(He,p,w,_t,u,G))});var Ge=he?se?Uw:Ww:se?Wn:tn,gt=me?r:Ge(u);return oo(gt||u,function(He,_t){gt&&(_t=He,He=u[_t]),gd(J,_t,Io(He,p,w,_t,u,G))}),J}function ice(u){var p=tn(u);return function(w){return QM(w,u,p)}}function QM(u,p,w){var I=w.length;if(u==null)return!I;for(u=tr(u);I--;){var z=w[I],G=p[z],J=u[z];if(J===r&&!(z in u)||!G(J))return!1}return!0}function e7(u,p,w){if(typeof u!="function")throw new _o(s);return Sd(function(){u.apply(r,w)},p)}function bd(u,p,w,I){var z=-1,G=Jh,J=!0,ee=u.length,se=[],he=p.length;if(!ee)return se;w&&(p=br(p,io(w))),I?(G=dw,J=!1):p.length>=o&&(G=cd,J=!1,p=new fl(p));e:for(;++z<ee;){var me=u[z],Ce=w==null?me:w(me);if(me=I||me!==0?me:0,J&&Ce===Ce){for(var De=he;De--;)if(p[De]===Ce)continue e;se.push(me)}else G(p,Ce,I)||se.push(me)}return se}var pa=T7($i),t7=T7(Tw,!0);function sce(u,p){var w=!0;return pa(u,function(I,z,G){return w=!!p(I,z,G),w}),w}function mm(u,p,w){for(var I=-1,z=u.length;++I<z;){var G=u[I],J=p(G);if(J!=null&&(ee===r?J===J&&!ao(J):w(J,ee)))var ee=J,se=G}return se}function ace(u,p,w,I){var z=u.length;for(w=ht(w),w<0&&(w=-w>z?0:z+w),I=I===r||I>z?z:ht(I),I<0&&(I+=z),I=w>I?0:vO(I);w<I;)u[w++]=p;return u}function r7(u,p){var w=[];return pa(u,function(I,z,G){p(I,z,G)&&w.push(I)}),w}function un(u,p,w,I,z){var G=-1,J=u.length;for(w||(w=Zce),z||(z=[]);++G<J;){var ee=u[G];p>0&&w(ee)?p>1?un(ee,p-1,w,I,z):ca(z,ee):I||(z[z.length]=ee)}return z}var Ew=A7(),n7=A7(!0);function $i(u,p){return u&&Ew(u,p,tn)}function Tw(u,p){return u&&n7(u,p,tn)}function gm(u,p){return ua(p,function(w){return ls(u[w])})}function hl(u,p){p=ma(p,u);for(var w=0,I=p.length;u!=null&&w<I;)u=u[ri(p[w++])];return w&&w==I?u:r}function o7(u,p,w){var I=p(u);return ct(u)?I:ca(I,w(u))}function In(u){return u==null?u===r?wt:ke:cl&&cl in tr(u)?Rce(u):rde(u)}function Aw(u,p){return u>p}function lce(u,p){return u!=null&&Ht.call(u,p)}function uce(u,p){return u!=null&&p in tr(u)}function cce(u,p,w){return u>=mn(p,w)&&u<Xr(p,w)}function _w(u,p,w){for(var I=w?dw:Jh,z=u[0].length,G=u.length,J=G,ee=ce(G),se=1/0,he=[];J--;){var me=u[J];J&&p&&(me=br(me,io(p))),se=mn(me.length,se),ee[J]=!w&&(p||z>=120&&me.length>=120)?new fl(J&&me):r}me=u[0];var Ce=-1,De=ee[0];e:for(;++Ce<z&&he.length<se;){var Re=me[Ce],Ge=p?p(Re):Re;if(Re=w||Re!==0?Re:0,!(De?cd(De,Ge):I(he,Ge,w))){for(J=G;--J;){var gt=ee[J];if(!(gt?cd(gt,Ge):I(u[J],Ge,w)))continue e}De&&De.push(Ge),he.push(Re)}}return he}function dce(u,p,w,I){return $i(u,function(z,G,J){p(I,w(z),G,J)}),I}function vd(u,p,w){p=ma(p,u),u=U7(u,p);var I=u==null?u:u[ri(Do(p))];return I==null?r:no(I,u,w)}function i7(u){return _r(u)&&In(u)==oe}function fce(u){return _r(u)&&In(u)==ut}function pce(u){return _r(u)&&In(u)==te}function yd(u,p,w,I,z){return u===p?!0:u==null||p==null||!_r(u)&&!_r(p)?u!==u&&p!==p:hce(u,p,w,I,yd,z)}function hce(u,p,w,I,z,G){var J=ct(u),ee=ct(p),se=J?Q:gn(u),he=ee?Q:gn(p);se=se==oe?Ne:se,he=he==oe?Ne:he;var me=se==Ne,Ce=he==Ne,De=se==he;if(De&&ba(u)){if(!ba(p))return!1;J=!0,me=!1}if(De&&!me)return G||(G=new ti),J||Mu(u)?F7(u,p,w,I,z,G):Kce(u,p,se,w,I,z,G);if(!(w&y)){var Re=me&&Ht.call(u,"__wrapped__"),Ge=Ce&&Ht.call(p,"__wrapped__");if(Re||Ge){var gt=Re?u.value():u,He=Ge?p.value():p;return G||(G=new ti),z(gt,He,w,I,G)}}return De?(G||(G=new ti),Vce(u,p,w,I,z,G)):!1}function mce(u){return _r(u)&&gn(u)==be}function $w(u,p,w,I){var z=w.length,G=z,J=!I;if(u==null)return!G;for(u=tr(u);z--;){var ee=w[z];if(J&&ee[2]?ee[1]!==u[ee[0]]:!(ee[0]in u))return!1}for(;++z<G;){ee=w[z];var se=ee[0],he=u[se],me=ee[1];if(J&&ee[2]){if(he===r&&!(se in u))return!1}else{var Ce=new ti;if(I)var De=I(he,me,se,u,p,Ce);if(!(De===r?yd(me,he,y|v,I,Ce):De))return!1}}return!0}function s7(u){if(!Pr(u)||Jce(u))return!1;var p=ls(u)?mue:sa;return p.test(gl(u))}function gce(u){return _r(u)&&In(u)==Ae}function bce(u){return _r(u)&&gn(u)==xe}function vce(u){return _r(u)&&Dm(u.length)&&!!fr[In(u)]}function a7(u){return typeof u=="function"?u:u==null?Un:typeof u=="object"?ct(u)?c7(u[0],u[1]):u7(u):$O(u)}function Iw(u){if(!Cd(u))return wue(u);var p=[];for(var w in tr(u))Ht.call(u,w)&&w!="constructor"&&p.push(w);return p}function yce(u){if(!Pr(u))return tde(u);var p=Cd(u),w=[];for(var I in u)I=="constructor"&&(p||!Ht.call(u,I))||w.push(I);return w}function Nw(u,p){return u<p}function l7(u,p){var w=-1,I=Rn(u)?ce(u.length):[];return pa(u,function(z,G,J){I[++w]=p(z,G,J)}),I}function u7(u){var p=qw(u);return p.length==1&&p[0][2]?R7(p[0][0],p[0][1]):function(w){return w===u||$w(w,u,p)}}function c7(u,p){return Zw(u)&&V7(p)?R7(ri(u),p):function(w){var I=sC(w,u);return I===r&&I===p?aC(w,u):yd(p,I,y|v)}}function bm(u,p,w,I,z){u!==p&&Ew(p,function(G,J){if(z||(z=new ti),Pr(G))xce(u,p,J,w,bm,I,z);else{var ee=I?I(Jw(u,J),G,J+"",u,p,z):r;ee===r&&(ee=G),kw(u,J,ee)}},Wn)}function xce(u,p,w,I,z,G,J){var ee=Jw(u,w),se=Jw(p,w),he=J.get(se);if(he){kw(u,w,he);return}var me=G?G(ee,se,w+"",u,p,J):r,Ce=me===r;if(Ce){var De=ct(se),Re=!De&&ba(se),Ge=!De&&!Re&&Mu(se);me=se,De||Re||Ge?ct(ee)?me=ee:Mr(ee)?me=Vn(ee):Re?(Ce=!1,me=C7(se,!0)):Ge?(Ce=!1,me=S7(se,!0)):me=[]:kd(se)||bl(se)?(me=ee,bl(ee)?me=yO(ee):(!Pr(ee)||ls(ee))&&(me=K7(se))):Ce=!1}Ce&&(J.set(se,me),z(me,se,I,G,J),J.delete(se)),kw(u,w,me)}function d7(u,p){var w=u.length;if(w)return p+=p<0?w:0,as(p,w)?u[p]:r}function f7(u,p,w){p.length?p=br(p,function(G){return ct(G)?function(J){return hl(J,G.length===1?G[0]:G)}:G}):p=[Un];var I=-1;p=br(p,io(qe()));var z=l7(u,function(G,J,ee){var se=br(p,function(he){return he(G)});return{criteria:se,index:++I,value:G}});return qle(z,function(G,J){return Dce(G,J,w)})}function wce(u,p){return p7(u,p,function(w,I){return aC(u,I)})}function p7(u,p,w){for(var I=-1,z=p.length,G={};++I<z;){var J=p[I],ee=hl(u,J);w(ee,J)&&xd(G,ma(J,u),ee)}return G}function Cce(u){return function(p){return hl(p,u)}}function Dw(u,p,w,I){var z=I?Hle:Su,G=-1,J=p.length,ee=u;for(u===p&&(p=Vn(p)),w&&(ee=br(u,io(w)));++G<J;)for(var se=0,he=p[G],me=w?w(he):he;(se=z(ee,me,se,I))>-1;)ee!==u&&am.call(ee,se,1),am.call(u,se,1);return u}function h7(u,p){for(var w=u?p.length:0,I=w-1;w--;){var z=p[w];if(w==I||z!==G){var G=z;as(z)?am.call(u,z,1):Lw(u,z)}}return u}function Mw(u,p){return u+cm(GM()*(p-u+1))}function Sce(u,p,w,I){for(var z=-1,G=Xr(um((p-u)/(w||1)),0),J=ce(G);G--;)J[I?G:++z]=u,u+=w;return J}function Ow(u,p){var w="";if(!u||p<1||p>Z)return w;do p%2&&(w+=u),p=cm(p/2),p&&(u+=u);while(p);return w}function kt(u,p){return Xw(W7(u,p,Un),u+"")}function kce(u){return JM(Ou(u))}function Pce(u,p){var w=Ou(u);return Tm(w,pl(p,0,w.length))}function xd(u,p,w,I){if(!Pr(u))return u;p=ma(p,u);for(var z=-1,G=p.length,J=G-1,ee=u;ee!=null&&++z<G;){var se=ri(p[z]),he=w;if(se==="__proto__"||se==="constructor"||se==="prototype")return u;if(z!=J){var me=ee[se];he=I?I(me,se,ee):r,he===r&&(he=Pr(me)?me:as(p[z+1])?[]:{})}gd(ee,se,he),ee=ee[se]}return u}var m7=dm?function(u,p){return dm.set(u,p),u}:Un,Ece=lm?function(u,p){return lm(u,"toString",{configurable:!0,enumerable:!1,value:uC(p),writable:!0})}:Un;function Tce(u){return Tm(Ou(u))}function No(u,p,w){var I=-1,z=u.length;p<0&&(p=-p>z?0:z+p),w=w>z?z:w,w<0&&(w+=z),z=p>w?0:w-p>>>0,p>>>=0;for(var G=ce(z);++I<z;)G[I]=u[I+p];return G}function Ace(u,p){var w;return pa(u,function(I,z,G){return w=p(I,z,G),!w}),!!w}function vm(u,p,w){var I=0,z=u==null?I:u.length;if(typeof p=="number"&&p===p&&z<=Y){for(;I<z;){var G=I+z>>>1,J=u[G];J!==null&&!ao(J)&&(w?J<=p:J<p)?I=G+1:z=G}return z}return jw(u,p,Un,w)}function jw(u,p,w,I){var z=0,G=u==null?0:u.length;if(G===0)return 0;p=w(p);for(var J=p!==p,ee=p===null,se=ao(p),he=p===r;z<G;){var me=cm((z+G)/2),Ce=w(u[me]),De=Ce!==r,Re=Ce===null,Ge=Ce===Ce,gt=ao(Ce);if(J)var He=I||Ge;else he?He=Ge&&(I||De):ee?He=Ge&&De&&(I||!Re):se?He=Ge&&De&&!Re&&(I||!gt):Re||gt?He=!1:He=I?Ce<=p:Ce<p;He?z=me+1:G=me}return mn(G,H)}function g7(u,p){for(var w=-1,I=u.length,z=0,G=[];++w<I;){var J=u[w],ee=p?p(J):J;if(!w||!ni(ee,se)){var se=ee;G[z++]=J===0?0:J}}return G}function b7(u){return typeof u=="number"?u:ao(u)?F:+u}function so(u){if(typeof u=="string")return u;if(ct(u))return br(u,so)+"";if(ao(u))return ZM?ZM.call(u):"";var p=u+"";return p=="0"&&1/u==-L?"-0":p}function ha(u,p,w){var I=-1,z=Jh,G=u.length,J=!0,ee=[],se=ee;if(w)J=!1,z=dw;else if(G>=o){var he=p?null:Bce(u);if(he)return Qh(he);J=!1,z=cd,se=new fl}else se=p?[]:ee;e:for(;++I<G;){var me=u[I],Ce=p?p(me):me;if(me=w||me!==0?me:0,J&&Ce===Ce){for(var De=se.length;De--;)if(se[De]===Ce)continue e;p&&se.push(Ce),ee.push(me)}else z(se,Ce,w)||(se!==ee&&se.push(Ce),ee.push(me))}return ee}function Lw(u,p){p=ma(p,u);var w=-1,I=p.length;if(!I)return!0;for(;++w<I;){var z=ri(p[w]);if(z==="__proto__"&&!Ht.call(u,"__proto__")||(z==="constructor"||z==="prototype")&&w<I-1)return!1}var G=U7(u,p);return G==null||delete G[ri(Do(p))]}function v7(u,p,w,I){return xd(u,p,w(hl(u,p)),I)}function ym(u,p,w,I){for(var z=u.length,G=I?z:-1;(I?G--:++G<z)&&p(u[G],G,u););return w?No(u,I?0:G,I?G+1:z):No(u,I?G+1:0,I?z:G)}function y7(u,p){var w=u;return w instanceof Nt&&(w=w.value()),fw(p,function(I,z){return z.func.apply(z.thisArg,ca([I],z.args))},w)}function Fw(u,p,w){var I=u.length;if(I<2)return I?ha(u[0]):[];for(var z=-1,G=ce(I);++z<I;)for(var J=u[z],ee=-1;++ee<I;)ee!=z&&(G[z]=bd(G[z]||J,u[ee],p,w));return ha(un(G,1),p,w)}function x7(u,p,w){for(var I=-1,z=u.length,G=p.length,J={};++I<z;){var ee=I<G?p[I]:r;w(J,u[I],ee)}return J}function Bw(u){return Mr(u)?u:[]}function zw(u){return typeof u=="function"?u:Un}function ma(u,p){return ct(u)?u:Zw(u,p)?[u]:Z7(qt(u))}var _ce=kt;function ga(u,p,w){var I=u.length;return w=w===r?I:w,!p&&w>=I?u:No(u,p,w)}var w7=gue||function(u){return ln.clearTimeout(u)};function C7(u,p){if(p)return u.slice();var w=u.length,I=RM?RM(w):new u.constructor(w);return u.copy(I),I}function Kw(u){var p=new u.constructor(u.byteLength);return new im(p).set(new im(u)),p}function $ce(u,p){var w=p?Kw(u.buffer):u.buffer;return new u.constructor(w,u.byteOffset,u.byteLength)}function Ice(u){var p=new u.constructor(u.source,vu.exec(u));return p.lastIndex=u.lastIndex,p}function Nce(u){return md?tr(md.call(u)):{}}function S7(u,p){var w=p?Kw(u.buffer):u.buffer;return new u.constructor(w,u.byteOffset,u.length)}function k7(u,p){if(u!==p){var w=u!==r,I=u===null,z=u===u,G=ao(u),J=p!==r,ee=p===null,se=p===p,he=ao(p);if(!ee&&!he&&!G&&u>p||G&&J&&se&&!ee&&!he||I&&J&&se||!w&&se||!z)return 1;if(!I&&!G&&!he&&u<p||he&&w&&z&&!I&&!G||ee&&w&&z||!J&&z||!se)return-1}return 0}function Dce(u,p,w){for(var I=-1,z=u.criteria,G=p.criteria,J=z.length,ee=w.length;++I<J;){var se=k7(z[I],G[I]);if(se){if(I>=ee)return se;var he=w[I];return se*(he=="desc"?-1:1)}}return u.index-p.index}function P7(u,p,w,I){for(var z=-1,G=u.length,J=w.length,ee=-1,se=p.length,he=Xr(G-J,0),me=ce(se+he),Ce=!I;++ee<se;)me[ee]=p[ee];for(;++z<J;)(Ce||z<G)&&(me[w[z]]=u[z]);for(;he--;)me[ee++]=u[z++];return me}function E7(u,p,w,I){for(var z=-1,G=u.length,J=-1,ee=w.length,se=-1,he=p.length,me=Xr(G-ee,0),Ce=ce(me+he),De=!I;++z<me;)Ce[z]=u[z];for(var Re=z;++se<he;)Ce[Re+se]=p[se];for(;++J<ee;)(De||z<G)&&(Ce[Re+w[J]]=u[z++]);return Ce}function Vn(u,p){var w=-1,I=u.length;for(p||(p=ce(I));++w<I;)p[w]=u[w];return p}function Ii(u,p,w,I){var z=!w;w||(w={});for(var G=-1,J=p.length;++G<J;){var ee=p[G],se=I?I(w[ee],u[ee],ee,w,u):r;se===r&&(se=u[ee]),z?_i(w,ee,se):gd(w,ee,se)}return w}function Mce(u,p){return Ii(u,Gw(u),p)}function Oce(u,p){return Ii(u,B7(u),p)}function xm(u,p){return function(w,I){var z=ct(w)?zle:nce,G=p?p():{};return z(w,u,qe(I,2),G)}}function Iu(u){return kt(function(p,w){var I=-1,z=w.length,G=z>1?w[z-1]:r,J=z>2?w[2]:r;for(G=u.length>3&&typeof G=="function"?(z--,G):r,J&&Nn(w[0],w[1],J)&&(G=z<3?r:G,z=1),p=tr(p);++I<z;){var ee=w[I];ee&&u(p,ee,I,G)}return p})}function T7(u,p){return function(w,I){if(w==null)return w;if(!Rn(w))return u(w,I);for(var z=w.length,G=p?z:-1,J=tr(w);(p?G--:++G<z)&&I(J[G],G,J)!==!1;);return w}}function A7(u){return function(p,w,I){for(var z=-1,G=tr(p),J=I(p),ee=J.length;ee--;){var se=J[u?ee:++z];if(w(G[se],se,G)===!1)break}return p}}function jce(u,p,w){var I=p&C,z=wd(u);function G(){var J=this&&this!==ln&&this instanceof G?z:u;return J.apply(I?w:this,arguments)}return G}function _7(u){return function(p){p=qt(p);var w=ku(p)?ei(p):r,I=w?w[0]:p.charAt(0),z=w?ga(w,1).join(""):p.slice(1);return I[u]()+z}}function Nu(u){return function(p){return fw(AO(TO(p).replace(Ele,"")),u,"")}}function wd(u){return function(){var p=arguments;switch(p.length){case 0:return new u;case 1:return new u(p[0]);case 2:return new u(p[0],p[1]);case 3:return new u(p[0],p[1],p[2]);case 4:return new u(p[0],p[1],p[2],p[3]);case 5:return new u(p[0],p[1],p[2],p[3],p[4]);case 6:return new u(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new u(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var w=$u(u.prototype),I=u.apply(w,p);return Pr(I)?I:w}}function Lce(u,p,w){var I=wd(u);function z(){for(var G=arguments.length,J=ce(G),ee=G,se=Du(z);ee--;)J[ee]=arguments[ee];var he=G<3&&J[0]!==se&&J[G-1]!==se?[]:da(J,se);if(G-=he.length,G<w)return M7(u,p,wm,z.placeholder,r,J,he,r,r,w-G);var me=this&&this!==ln&&this instanceof z?I:u;return no(me,this,J)}return z}function $7(u){return function(p,w,I){var z=tr(p);if(!Rn(p)){var G=qe(w,3);p=tn(p),w=function(ee){return G(z[ee],ee,z)}}var J=u(p,w,I);return J>-1?z[G?p[J]:J]:r}}function I7(u){return ss(function(p){var w=p.length,I=w,z=$o.prototype.thru;for(u&&p.reverse();I--;){var G=p[I];if(typeof G!="function")throw new _o(s);if(z&&!J&&Pm(G)=="wrapper")var J=new $o([],!0)}for(I=J?I:w;++I<w;){G=p[I];var ee=Pm(G),se=ee=="wrapper"?Hw(G):r;se&&Yw(se[0])&&se[1]==(N|P|$|D)&&!se[4].length&&se[9]==1?J=J[Pm(se[0])].apply(J,se[3]):J=G.length==1&&Yw(G)?J[ee]():J.thru(G)}return function(){var he=arguments,me=he[0];if(J&&he.length==1&&ct(me))return J.plant(me).value();for(var Ce=0,De=w?p[Ce].apply(this,he):me;++Ce<w;)De=p[Ce].call(this,De);return De}})}function wm(u,p,w,I,z,G,J,ee,se,he){var me=p&N,Ce=p&C,De=p&S,Re=p&(P|E),Ge=p&M,gt=De?r:wd(u);function He(){for(var _t=arguments.length,Mt=ce(_t),lo=_t;lo--;)Mt[lo]=arguments[lo];if(Re)var Dn=Du(He),uo=Zle(Mt,Dn);if(I&&(Mt=P7(Mt,I,z,Re)),G&&(Mt=E7(Mt,G,J,Re)),_t-=uo,Re&&_t<he){var Or=da(Mt,Dn);return M7(u,p,wm,He.placeholder,w,Mt,Or,ee,se,he-_t)}var oi=Ce?w:this,cs=De?oi[u]:u;return _t=Mt.length,ee?Mt=nde(Mt,ee):Ge&&_t>1&&Mt.reverse(),me&&se<_t&&(Mt.length=se),this&&this!==ln&&this instanceof He&&(cs=gt||wd(cs)),cs.apply(oi,Mt)}return He}function N7(u,p){return function(w,I){return dce(w,u,p(I),{})}}function Cm(u,p){return function(w,I){var z;if(w===r&&I===r)return p;if(w!==r&&(z=w),I!==r){if(z===r)return I;typeof w=="string"||typeof I=="string"?(w=so(w),I=so(I)):(w=b7(w),I=b7(I)),z=u(w,I)}return z}}function Vw(u){return ss(function(p){return p=br(p,io(qe())),kt(function(w){var I=this;return u(p,function(z){return no(z,I,w)})})})}function Sm(u,p){p=p===r?" ":so(p);var w=p.length;if(w<2)return w?Ow(p,u):p;var I=Ow(p,um(u/Pu(p)));return ku(p)?ga(ei(I),0,u).join(""):I.slice(0,u)}function Fce(u,p,w,I){var z=p&C,G=wd(u);function J(){for(var ee=-1,se=arguments.length,he=-1,me=I.length,Ce=ce(me+se),De=this&&this!==ln&&this instanceof J?G:u;++he<me;)Ce[he]=I[he];for(;se--;)Ce[he++]=arguments[++ee];return no(De,z?w:this,Ce)}return J}function D7(u){return function(p,w,I){return I&&typeof I!="number"&&Nn(p,w,I)&&(w=I=r),p=us(p),w===r?(w=p,p=0):w=us(w),I=I===r?p<w?1:-1:us(I),Sce(p,w,I,u)}}function km(u){return function(p,w){return typeof p=="string"&&typeof w=="string"||(p=Mo(p),w=Mo(w)),u(p,w)}}function M7(u,p,w,I,z,G,J,ee,se,he){var me=p&P,Ce=me?J:r,De=me?r:J,Re=me?G:r,Ge=me?r:G;p|=me?$:O,p&=~(me?O:$),p&k||(p&=-4);var gt=[u,p,z,Re,Ce,Ge,De,ee,se,he],He=w.apply(r,gt);return Yw(u)&&H7(He,gt),He.placeholder=I,q7(He,u,p)}function Rw(u){var p=Jr[u];return function(w,I){if(w=Mo(w),I=I==null?0:mn(ht(I),292),I&&qM(w)){var z=(qt(w)+"e").split("e"),G=p(z[0]+"e"+(+z[1]+I));return z=(qt(G)+"e").split("e"),+(z[0]+"e"+(+z[1]-I))}return p(w)}}var Bce=Au&&1/Qh(new Au([,-0]))[1]==L?function(u){return new Au(u)}:fC;function O7(u){return function(p){var w=gn(p);return w==be?yw(p):w==xe?rue(p):Gle(p,u(p))}}function is(u,p,w,I,z,G,J,ee){var se=p&S;if(!se&&typeof u!="function")throw new _o(s);var he=I?I.length:0;if(he||(p&=-97,I=z=r),J=J===r?J:Xr(ht(J),0),ee=ee===r?ee:ht(ee),he-=z?z.length:0,p&O){var me=I,Ce=z;I=z=r}var De=se?r:Hw(u),Re=[u,p,w,I,z,me,Ce,G,J,ee];if(De&&ede(Re,De),u=Re[0],p=Re[1],w=Re[2],I=Re[3],z=Re[4],ee=Re[9]=Re[9]===r?se?0:u.length:Xr(Re[9]-he,0),!ee&&p&(P|E)&&(p&=-25),!p||p==C)var Ge=jce(u,p,w);else p==P||p==E?Ge=Lce(u,p,ee):(p==$||p==(C|$))&&!z.length?Ge=Fce(u,p,w,I):Ge=wm.apply(r,Re);var gt=De?m7:H7;return q7(gt(Ge,Re),u,p)}function j7(u,p,w,I){return u===r||ni(u,Tu[w])&&!Ht.call(I,w)?p:u}function L7(u,p,w,I,z,G){return Pr(u)&&Pr(p)&&(G.set(p,u),bm(u,p,r,L7,G),G.delete(p)),u}function zce(u){return kd(u)?r:u}function F7(u,p,w,I,z,G){var J=w&y,ee=u.length,se=p.length;if(ee!=se&&!(J&&se>ee))return!1;var he=G.get(u),me=G.get(p);if(he&&me)return he==p&&me==u;var Ce=-1,De=!0,Re=w&v?new fl:r;for(G.set(u,p),G.set(p,u);++Ce<ee;){var Ge=u[Ce],gt=p[Ce];if(I)var He=J?I(gt,Ge,Ce,p,u,G):I(Ge,gt,Ce,u,p,G);if(He!==r){if(He)continue;De=!1;break}if(Re){if(!pw(p,function(_t,Mt){if(!cd(Re,Mt)&&(Ge===_t||z(Ge,_t,w,I,G)))return Re.push(Mt)})){De=!1;break}}else if(!(Ge===gt||z(Ge,gt,w,I,G))){De=!1;break}}return G.delete(u),G.delete(p),De}function Kce(u,p,w,I,z,G,J){switch(w){case Ue:if(u.byteLength!=p.byteLength||u.byteOffset!=p.byteOffset)return!1;u=u.buffer,p=p.buffer;case ut:return!(u.byteLength!=p.byteLength||!G(new im(u),new im(p)));case ue:case te:case re:return ni(+u,+p);case Se:return u.name==p.name&&u.message==p.message;case Ae:case Ie:return u==p+"";case be:var ee=yw;case xe:var se=I&y;if(ee||(ee=Qh),u.size!=p.size&&!se)return!1;var he=J.get(u);if(he)return he==p;I|=v,J.set(u,p);var me=F7(ee(u),ee(p),I,z,G,J);return J.delete(u),me;case et:if(md)return md.call(u)==md.call(p)}return!1}function Vce(u,p,w,I,z,G){var J=w&y,ee=Ww(u),se=ee.length,he=Ww(p),me=he.length;if(se!=me&&!J)return!1;for(var Ce=se;Ce--;){var De=ee[Ce];if(!(J?De in p:Ht.call(p,De)))return!1}var Re=G.get(u),Ge=G.get(p);if(Re&&Ge)return Re==p&&Ge==u;var gt=!0;G.set(u,p),G.set(p,u);for(var He=J;++Ce<se;){De=ee[Ce];var _t=u[De],Mt=p[De];if(I)var lo=J?I(Mt,_t,De,p,u,G):I(_t,Mt,De,u,p,G);if(!(lo===r?_t===Mt||z(_t,Mt,w,I,G):lo)){gt=!1;break}He||(He=De=="constructor")}if(gt&&!He){var Dn=u.constructor,uo=p.constructor;Dn!=uo&&"constructor"in u&&"constructor"in p&&!(typeof Dn=="function"&&Dn instanceof Dn&&typeof uo=="function"&&uo instanceof uo)&&(gt=!1)}return G.delete(u),G.delete(p),gt}function ss(u){return Xw(W7(u,r,Q7),u+"")}function Ww(u){return o7(u,tn,Gw)}function Uw(u){return o7(u,Wn,B7)}var Hw=dm?function(u){return dm.get(u)}:fC;function Pm(u){for(var p=u.name+"",w=_u[p],I=Ht.call(_u,p)?w.length:0;I--;){var z=w[I],G=z.func;if(G==null||G==u)return z.name}return p}function Du(u){var p=Ht.call(q,"placeholder")?q:u;return p.placeholder}function qe(){var u=q.iteratee||cC;return u=u===cC?a7:u,arguments.length?u(arguments[0],arguments[1]):u}function Em(u,p){var w=u.__data__;return Yce(p)?w[typeof p=="string"?"string":"hash"]:w.map}function qw(u){for(var p=tn(u),w=p.length;w--;){var I=p[w],z=u[I];p[w]=[I,z,V7(z)]}return p}function ml(u,p){var w=Qle(u,p);return s7(w)?w:r}function Rce(u){var p=Ht.call(u,cl),w=u[cl];try{u[cl]=r;var I=!0}catch{}var z=nm.call(u);return I&&(p?u[cl]=w:delete u[cl]),z}var Gw=ww?function(u){return u==null?[]:(u=tr(u),ua(ww(u),function(p){return UM.call(u,p)}))}:pC,B7=ww?function(u){for(var p=[];u;)ca(p,Gw(u)),u=sm(u);return p}:pC,gn=In;(Cw&&gn(new Cw(new ArrayBuffer(1)))!=Ue||fd&&gn(new fd)!=be||Sw&&gn(Sw.resolve())!=Me||Au&&gn(new Au)!=xe||pd&&gn(new pd)!=lt)&&(gn=function(u){var p=In(u),w=p==Ne?u.constructor:r,I=w?gl(w):"";if(I)switch(I){case Pue:return Ue;case Eue:return be;case Tue:return Me;case Aue:return xe;case _ue:return lt}return p});function Wce(u,p,w){for(var I=-1,z=w.length;++I<z;){var G=w[I],J=G.size;switch(G.type){case"drop":u+=J;break;case"dropRight":p-=J;break;case"take":p=mn(p,u+J);break;case"takeRight":u=Xr(u,p-J);break}}return{start:u,end:p}}function Uce(u){var p=u.match(nl);return p?p[1].split(ol):[]}function z7(u,p,w){p=ma(p,u);for(var I=-1,z=p.length,G=!1;++I<z;){var J=ri(p[I]);if(!(G=u!=null&&w(u,J)))break;u=u[J]}return G||++I!=z?G:(z=u==null?0:u.length,!!z&&Dm(z)&&as(J,z)&&(ct(u)||bl(u)))}function Hce(u){var p=u.length,w=new u.constructor(p);return p&&typeof u[0]=="string"&&Ht.call(u,"index")&&(w.index=u.index,w.input=u.input),w}function K7(u){return typeof u.constructor=="function"&&!Cd(u)?$u(sm(u)):{}}function qce(u,p,w){var I=u.constructor;switch(p){case ut:return Kw(u);case ue:case te:return new I(+u);case Ue:return $ce(u,w);case Vt:case Jt:case Xt:case sr:case Ct:case Sr:case dr:case kr:case $t:return S7(u,w);case be:return new I;case re:case Ie:return new I(u);case Ae:return Ice(u);case xe:return new I;case et:return Nce(u)}}function Gce(u,p){var w=p.length;if(!w)return u;var I=w-1;return p[I]=(w>1?"& ":"")+p[I],p=p.join(w>2?", ":" "),u.replace(es,`{
|
|
1664
|
+
`;function Fae(e,t,r){const n=new N6().limit(1).sort("meest-gekozen").where({col:"modification_key",values:[""],valueType:"string"});return e&&n.where({col:"unit_keys",values:[e],valueType:"string"}),t&&n.where({col:"provider",values:[t],valueType:"string"}),r?.contractTerms?.length&&n.where({col:"contract_term",values:r.contractTerms.map(String),valueType:"string"}),r?.fixedInternetDataSpeedDown?.min&&n.where({col:"data_speed_down",values:[`${r.fixedInternetDataSpeedDown.min*1e3}-`]}),n.serialize()}function Bae({isQueryEnabled:e,isLoading:t,isPolling:r,isValidating:n,isPollingExpired:o,error:i,count:s,firstKey:a}){return e?o?{isLoading:!1,error:"Postcode check timed out"}:t||r||n?{isLoading:!0}:i?{isLoading:!1,error:i instanceof Error?i.message:String(i)}:!a||s===0?{isLoading:!1,notFound:!0}:{isLoading:!1,propositionKey:a}:{isLoading:!1}}const ow=1e3,nM=1e4;function oM(e,t){const[r,n]=x.useState(!1),[o,i]=x.useState(0),s=x.useRef(!1);return _L(()=>{if(e){if(o+ow>=nM){s.current=!0,n(!1),i(0);return}t(),i(a=>a+ow)}},r&&o<nM?ow:null),x.useEffect(()=>{s.current||(e?(s.current=!1,n(!0),i(0)):r&&(n(!1),i(0)))},[e]),{isPollingExpired:s.current}}const iM={postcode:"2266AD",number:22,numberAddon:""};function zae({initialBundleSetUnitKey:e,fixedProviderSlug:t,filters:r,enabled:n}){const{profile:o}=sn(),i=x.useMemo(()=>Fae(e,t,r),[e,t,r]),{data:s,error:a,isLoading:l,mutate:c}=xp(n?[Lae,{query:i,...o.address?{postcode:o.address.postcode,number:parseInt(o.address.number,10),numberAddon:o.address.numberAddon??""}:iM}]:null,nn,{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]}),d=!!s?.fetchInfo.polling,f=!!s?.fetchInfo.validating,{isPollingExpired:m}=oM(n&&(d||f),()=>{c()});return Bae({isQueryEnabled:n,isLoading:l,isPolling:d,isValidating:f,isPollingExpired:m,error:a,count:s?.search.count,firstKey:s?.search.records[0]?.key})}var Vh={},sM;function Kae(){if(sM)return Vh;sM=1,Object.defineProperty(Vh,"__esModule",{value:!0});var e=x;function t(r){var n=e.useRef();return e.useEffect(function(){n.current=r}),n.current}return Vh.default=t,Vh}var Vae=Kae();const Rae=ju(Vae);function Wae(e,t){return!e?.propositionSelector||!t.propositionSelector?!1:e.propositionSelector.planVariantKey!==t.propositionSelector.planVariantKey}function Uae(e,t){if(!e?.propositionSelector||!t.propositionSelector)return[];const r=new rl(e.propositionSelector.key),n=e.propositionSelector.bundleTypeSets.flatMap(o=>o.bundleSets).filter(o=>r.bundleSets().includes(o.unitKey));return t.propositionSelector.bundleTypeSets.flatMap(o=>o.bundleSets).filter(o=>n.some(i=>i.name===o.name&&i.label===o.label)).map(o=>o.unitKey)}function aM(e,t){if(!e.propositionSelector?.alternatePlanVariant)return!1;const{providerSlug:r,planVariant:n}=e.propositionSelector;return r===t&&n.contractType==="acquisition"||r!==t&&n.contractType==="retention"}function Hae(e,t,r){const{phoneVariantKey:n,modificationKey:o,handsetCreditKeys:i,basePrice:s}=t,a=Q9(t.planVariants,r?.contractTerms,t.planVariant.contractType),l=a.find(g=>g.unitKey===t.planVariantKey)?.unitKey??a[0]?.unitKey??t.planVariantKey,c=new rl(ed([l,n,o,e.handsetCredit(),...e.bundleSets().filter(g=>t.bundleTypeSets.find(b=>b.unitKey===na("bundleTypeSet")(g)))])),d=g=>{const b=tM(t.blacklists,c);return g.filter(y=>!b.includes(y.unitKey))};t.bundleTypeSets.forEach(g=>{const b=eM(g,d(rM(g,c)),r),y=b.filter(({unitKey:v})=>c.bundleSets().includes(v));g.required&&b.length&&!y.length?c.setBundleSetsByBundleTypeSet(g.unitKey,[b[0].unitKey]):c.setBundleSetsByBundleTypeSet(g.unitKey,y.map(({unitKey:v})=>v))});const f=d(nw(i,s)),m=f.find(({unitKey:g})=>g===c.handsetCredit())||f[f.length-1];return m&&c.setHandsetCredit(m.unitKey),c.key()}function qae(e,t,r,n){const o=Rae(t);if(!t.propositionSelector)return e;const i=new rl(e);return o&&aM(o,r)&&o.propositionSelector?.alternatePlanVariant&&i.setPlanVariant(o.propositionSelector.alternatePlanVariant.unitKey),Wae(o,t)&&i.setBundleSets(Uae(o,t)),i.update(Hae(i,t.propositionSelector,n)),aM(t,r)&&t.propositionSelector.alternatePlanVariant&&i.setPlanVariant(t.propositionSelector.alternatePlanVariant.unitKey),i.key()!==e?i.key():e}function Gae({propositionKey:e,giftConfig:t,filters:r,children:n,onPropositionKeyChange:o}){const{profile:i}=sn(),[s,a]=x.useState(t?"":J9(e??"")),l=zae({...t,filters:r,enabled:!!t&&s.length===0}),c=new rl(s),{data:{proposition:d}={},isLoading:f,error:m}=Vo(s.length>0?[Dae,{key:c.key()}]:null,{use:[Yn],fetcher:nn}),g=d?CN(d.productType,i):void 0,{data:{propositionSelector:b}={},isLoading:y,error:v,mutate:C}=Vo(d?[Mae,{key:c.base(),productType:d.productType,provider:d.provider.slug,currentProvider:g,product:d.product?.slug,modificationBlocks:Yc(d.productType,i,t?.mobileProviderSlug),...d.productType==="fixed"&&(i.address?{postcode:i.address.postcode,number:parseInt(i.address.number,10),numberAddon:i.address.numberAddon??""}:t&&iM)}]:null,{use:[Yn],fetcher:nn}),S=!!(d?.productType==="fixed"&&v?.message.includes("loading_postcode")),{isPollingExpired:k}=oM(S,C),P=qae(s,{propositionSelector:b},g,r);function E(R){a(R),o?.(R)}x.useEffect(()=>{!l.propositionKey||s.length>0||E(Oae(l.propositionKey,t?.initialBundleSetUnitKey))},[l.propositionKey,s.length,t?.initialBundleSetUnitKey]),x.useEffect(()=>{P!==s&&E(P)},[P]);const $=x.useMemo(()=>{if(!b)return b;const R=new rl(s),K=tM(b.blacklists,R),j=b.bundleTypeSets.map(U=>{const W=rM(U,R).filter(L=>!K.includes(L.unitKey));return{...U,bundleSets:W}}),B=nw(b.handsetCreditKeys,b.basePrice).filter(U=>!K.includes(U.unitKey)).map(U=>U.unitKey);return jae({...b,bundleTypeSets:j,handsetCreditKeys:B},r)},[b,s,r]);function O(R){c.setPhoneVariant(`pvu-${R}`),E(c.key())}function N(R){c.setPlanVariant(R),E(c.key())}function D(R){c.setHandsetCredit(R),E(c.key())}function M(R,K){c.toggleBundleSet(R,K),E(c.key())}const V=!!t&&s.length===0&&!l.error&&!l.notFound;return h.jsx(X9,{value:{isLoading:V||l.isLoading||f||y||S&&!k,error:l.error||m||(S&&!k?void 0:v),notFound:!!l.notFound,propositionKey:c,proposition:d,propositionSelector:$,setProductVersion:O,setPlanVariant:N,setHandsetCredit:D,toggleBundleSet:M},children:n})}function Xi(){return x.useContext(X9)}const lM={odido:"Odido",kpn:"KPN",vodafone:"Vodafone",ben:"Ben",hollandsnieuwe:"hollandsnieuwe",lebara:"Lebara",youfone:"Youfone",simyo:"Simyo",delta:"Delta",caiway:"Caiway",budget:"Budget Mobiel","budget-alles-in-1":"Budget Alles-in-1","budget-internet":"Budget Internet","50plusmobiel":"50+ Mobiel",ziggo:"Ziggo",other:"Andere / geen provider","other/moving":"Geen i.v.m. verhuizing"};function Rh({options:e,value:t,onValueChange:r,classNames:n,...o}){return h.jsx(ih,{value:t,onValueChange:r,classNames:{base:A("w-full @container",n?.base),wrapper:A("w-full flex flex-col gap-3 @max-sm:data-[orientation=horizontal]:flex-col",n?.wrapper),label:A("mb-3 text-foreground font-bold",n?.label),description:A(n?.description),errorMessage:A(n?.errorMessage)},...o,children:e.map(i=>h.jsx(du,{color:"primary",value:i.value,name:i.value,isDisabled:i.isDisabled,description:i.description,classNames:{base:A("items-start gap-1 border-medium border-default-200 m-0 hover:border-default-400 rounded-2xl p-4 data-[selected=true]:border-primary [&]:max-w-none flex-1",n?.radio?.base),wrapper:A("mt-0.5",n?.radio?.wrapper),hiddenInput:A(n?.radio?.hiddenInput),labelWrapper:A("w-full",n?.radio?.labelWrapper),label:A("w-full",n?.radio?.label),control:A(n?.radio?.control),description:A(n?.radio?.description)},children:i.label},i.value))})}function Zae({options:e,value:t,onValueChange:r,classNames:n,...o}){return h.jsx(Z6,{value:t,onValueChange:r,classNames:{base:A("w-full @container",n?.base),wrapper:A("w-full flex flex-col gap-3 @max-sm:data-[orientation=horizontal]:flex-col",n?.wrapper),label:A("mb-3 text-foreground font-bold",n?.label),description:A(n?.description),errorMessage:A(n?.errorMessage)},...o,children:e.map(i=>h.jsx(sh,{color:"primary",value:i.value,isDisabled:i.isDisabled,classNames:{base:A("border-medium border-default-200 hover:border-default-400 m-0 w-full max-w-none rounded-2xl p-4 data-[selected=true]:border-primary",n?.checkbox?.base),wrapper:A("rounded-[calc(var(--elements-radius-medium)*0.6)] before:rounded-[calc(var(--elements-radius-medium)*0.6)] after:rounded-[calc(var(--elements-radius-medium)*0.6)]",n?.checkbox?.wrapper),hiddenInput:A(n?.checkbox?.hiddenInput),icon:A(n?.checkbox?.icon),label:A("w-full",n?.checkbox?.label)},children:i.label},i.value))})}function uM(e){if(!(!e.name.includes("GB")||e.content.data===Qn||!e.modifications?.name))return`${(e.content.data-e.modifications.content.data)/1e3} GB`}function cM(e){const t=e.split(" + ");return t.length<3?{title:e}:{title:t.shift()||e,subtitle:t.join(" + ")}}function Yae({title:e,unitKey:t,classNames:r,children:n}){const{t:o}=Je(),{popoverProps:i,isShadowRoot:s}=Zn(),{isModalOpen:a,openModal:l,closeModal:c}=Qt();return h.jsx(fi,{isOpen:a(`bundle-type-set-${t}`),onOpenChange:d=>d?l(`bundle-type-set-${t}`):c(`bundle-type-set-${t}`),placement:"bottom-center",scrollBehavior:"inside",size:"lg",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(r?.backdrop),wrapper:A(r?.wrapper),base:A("m-0 max-h-[90vh]",r?.base),header:A(r?.header),body:A("pt-0",r?.body),footer:A(r?.footer),closeButton:A("cursor-pointer right-6 top-3.5",r?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e}),h.jsx(ai,{children:n}),h.jsx(Vi,{children:h.jsx(hr,{className:A("font-medium",r?.confirmButton),onPress:()=>c(`bundle-type-set-${t}`),color:"primary",variant:"solid",radius:"full",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:o("common.confirm")})})]})})}var td={exports:{}};var Jae=td.exports,dM;function Xae(){return dM||(dM=1,(function(e,t){(function(){var r,n="4.18.1",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",m=1,g=2,b=4,y=1,v=2,C=1,S=2,k=4,P=8,E=16,$=32,O=64,N=128,D=256,M=512,V=30,R="...",K=800,j=16,B=1,U=2,W=3,L=1/0,Z=9007199254740991,T=17976931348623157e292,F=NaN,_=4294967295,H=_-1,Y=_>>>1,X=[["ary",N],["bind",C],["bindKey",S],["curry",P],["curryRight",E],["flip",M],["partial",$],["partialRight",O],["rearg",D]],oe="[object Arguments]",Q="[object Array]",le="[object AsyncFunction]",ue="[object Boolean]",te="[object Date]",ge="[object DOMException]",Se="[object Error]",pe="[object Function]",we="[object GeneratorFunction]",be="[object Map]",re="[object Number]",ke="[object Null]",Ne="[object Object]",Me="[object Promise]",Pe="[object Proxy]",Ae="[object RegExp]",xe="[object Set]",Ie="[object String]",et="[object Symbol]",wt="[object Undefined]",lt="[object WeakMap]",Ut="[object WeakSet]",ut="[object ArrayBuffer]",Ue="[object DataView]",Vt="[object Float32Array]",Jt="[object Float64Array]",Xt="[object Int8Array]",sr="[object Int16Array]",Ct="[object Int32Array]",Sr="[object Uint8Array]",dr="[object Uint8ClampedArray]",kr="[object Uint16Array]",$t="[object Uint32Array]",tt=/\b__p \+= '';/g,It=/\b(__p \+=) '' \+/g,ar=/(__e\(.*?\)|\b__t\)) \+\n'';/g,er=/&(?:amp|lt|gt|quot|#39);/g,Yr=/[&<>"']/g,en=RegExp(er.source),ki=RegExp(Yr.source),hn=/<%-([\s\S]+?)%>/g,to=/<%([\s\S]+?)%>/g,Ur=/<%=([\s\S]+?)%>/g,jt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qi=/^\w*$/,oa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jo=/[\\^$.*+?()[\]{}|]/g,St=RegExp(Jo.source),Xo=/^\s+/,Pi=/\s/,es=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nl=/\{\n\/\* \[wrapped with (.+)\] \*/,ol=/,? & /,ia=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ei=/[()=,{}\[\]\/\s]/,rt=/\\(\\)?/g,Qo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vu=/\w*$/,an=/^[-+]0x[0-9a-f]+$/i,yu=/^0b[01]+$/i,sa=/^\[object .+?Constructor\]$/,il=/^0o[0-7]+$/i,aa=/^(?:0|[1-9]\d*)$/,od=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ts=/($^)/,sl=/['\n\r\u2028\u2029\\]/g,rs="\\ud800-\\udfff",Dr="\\u0300-\\u036f",Eo="\\ufe20-\\ufe2f",_e="\\u20d0-\\u20ff",ro=Dr+Eo+_e,Ti="\\u2700-\\u27bf",To="a-z\\xdf-\\xf6\\xf8-\\xff",al="\\xac\\xb1\\xd7\\xf7",iw="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xu="\\u2000-\\u206f",ll=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Wh="A-Z\\xc0-\\xd6\\xd8-\\xde",Uh="\\ufe0e\\ufe0f",Hh=al+iw+xu+ll,id="['’]",sw="["+rs+"]",qh="["+Hh+"]",wu="["+ro+"]",Gh="\\d+",sd="["+Ti+"]",ad="["+To+"]",Zh="[^"+rs+Hh+Gh+Ti+To+Wh+"]",Ai="\\ud83c[\\udffb-\\udfff]",aw="(?:"+wu+"|"+Ai+")",Cu="[^"+rs+"]",ld="(?:\\ud83c[\\udde6-\\uddff]){2}",ud="[\\ud800-\\udbff][\\udc00-\\udfff]",la="["+Wh+"]",Yh="\\u200d",vM="(?:"+ad+"|"+Zh+")",xle="(?:"+la+"|"+Zh+")",yM="(?:"+id+"(?:d|ll|m|re|s|t|ve))?",xM="(?:"+id+"(?:D|LL|M|RE|S|T|VE))?",wM=aw+"?",CM="["+Uh+"]?",wle="(?:"+Yh+"(?:"+[Cu,ld,ud].join("|")+")"+CM+wM+")*",Cle="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sle="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",SM=CM+wM+wle,kle="(?:"+[sd,ld,ud].join("|")+")"+SM,Ple="(?:"+[Cu+wu+"?",wu,ld,ud,sw].join("|")+")",Ele=RegExp(id,"g"),Tle=RegExp(wu,"g"),lw=RegExp(Ai+"(?="+Ai+")|"+Ple+SM,"g"),Ale=RegExp([la+"?"+ad+"+"+yM+"(?="+[qh,la,"$"].join("|")+")",xle+"+"+xM+"(?="+[qh,la+vM,"$"].join("|")+")",la+"?"+vM+"+"+yM,la+"+"+xM,Sle,Cle,Gh,kle].join("|"),"g"),_le=RegExp("["+Yh+rs+ro+Uh+"]"),$le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ile=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nle=-1,fr={};fr[Vt]=fr[Jt]=fr[Xt]=fr[sr]=fr[Ct]=fr[Sr]=fr[dr]=fr[kr]=fr[$t]=!0,fr[oe]=fr[Q]=fr[ut]=fr[ue]=fr[Ue]=fr[te]=fr[Se]=fr[pe]=fr[be]=fr[re]=fr[Ne]=fr[Ae]=fr[xe]=fr[Ie]=fr[lt]=!1;var lr={};lr[oe]=lr[Q]=lr[ut]=lr[Ue]=lr[ue]=lr[te]=lr[Vt]=lr[Jt]=lr[Xt]=lr[sr]=lr[Ct]=lr[be]=lr[re]=lr[Ne]=lr[Ae]=lr[xe]=lr[Ie]=lr[et]=lr[Sr]=lr[dr]=lr[kr]=lr[$t]=!0,lr[Se]=lr[pe]=lr[lt]=!1;var Dle={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Mle={"&":"&","<":"<",">":">",'"':""","'":"'"},Ole={"&":"&","<":"<",">":">",""":'"',"'":"'"},jle={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Lle=parseFloat,Fle=parseInt,kM=typeof fs=="object"&&fs&&fs.Object===Object&&fs,Ble=typeof self=="object"&&self&&self.Object===Object&&self,ln=kM||Ble||Function("return this")(),uw=t&&!t.nodeType&&t,ul=uw&&!0&&e&&!e.nodeType&&e,PM=ul&&ul.exports===uw,cw=PM&&kM.process,Ao=(function(){try{var ie=ul&&ul.require&&ul.require("util").types;return ie||cw&&cw.binding&&cw.binding("util")}catch{}})(),EM=Ao&&Ao.isArrayBuffer,TM=Ao&&Ao.isDate,AM=Ao&&Ao.isMap,_M=Ao&&Ao.isRegExp,$M=Ao&&Ao.isSet,IM=Ao&&Ao.isTypedArray;function no(ie,de,ce){switch(ce.length){case 0:return ie.call(de);case 1:return ie.call(de,ce[0]);case 2:return ie.call(de,ce[0],ce[1]);case 3:return ie.call(de,ce[0],ce[1],ce[2])}return ie.apply(de,ce)}function zle(ie,de,ce,Le){for(var st=-1,Wt=ie==null?0:ie.length;++st<Wt;){var Jr=ie[st];de(Le,Jr,ce(Jr),ie)}return Le}function oo(ie,de){for(var ce=-1,Le=ie==null?0:ie.length;++ce<Le&&de(ie[ce],ce,ie)!==!1;);return ie}function Kle(ie,de){for(var ce=ie==null?0:ie.length;ce--&&de(ie[ce],ce,ie)!==!1;);return ie}function NM(ie,de){for(var ce=-1,Le=ie==null?0:ie.length;++ce<Le;)if(!de(ie[ce],ce,ie))return!1;return!0}function ua(ie,de){for(var ce=-1,Le=ie==null?0:ie.length,st=0,Wt=[];++ce<Le;){var Jr=ie[ce];de(Jr,ce,ie)&&(Wt[st++]=Jr)}return Wt}function Jh(ie,de){var ce=ie==null?0:ie.length;return!!ce&&Su(ie,de,0)>-1}function dw(ie,de,ce){for(var Le=-1,st=ie==null?0:ie.length;++Le<st;)if(ce(de,ie[Le]))return!0;return!1}function br(ie,de){for(var ce=-1,Le=ie==null?0:ie.length,st=Array(Le);++ce<Le;)st[ce]=de(ie[ce],ce,ie);return st}function ca(ie,de){for(var ce=-1,Le=de.length,st=ie.length;++ce<Le;)ie[st+ce]=de[ce];return ie}function fw(ie,de,ce,Le){var st=-1,Wt=ie==null?0:ie.length;for(Le&&Wt&&(ce=ie[++st]);++st<Wt;)ce=de(ce,ie[st],st,ie);return ce}function Vle(ie,de,ce,Le){var st=ie==null?0:ie.length;for(Le&&st&&(ce=ie[--st]);st--;)ce=de(ce,ie[st],st,ie);return ce}function pw(ie,de){for(var ce=-1,Le=ie==null?0:ie.length;++ce<Le;)if(de(ie[ce],ce,ie))return!0;return!1}var Rle=hw("length");function Wle(ie){return ie.split("")}function Ule(ie){return ie.match(ia)||[]}function DM(ie,de,ce){var Le;return ce(ie,function(st,Wt,Jr){if(de(st,Wt,Jr))return Le=Wt,!1}),Le}function Xh(ie,de,ce,Le){for(var st=ie.length,Wt=ce+(Le?1:-1);Le?Wt--:++Wt<st;)if(de(ie[Wt],Wt,ie))return Wt;return-1}function Su(ie,de,ce){return de===de?nue(ie,de,ce):Xh(ie,MM,ce)}function Hle(ie,de,ce,Le){for(var st=ce-1,Wt=ie.length;++st<Wt;)if(Le(ie[st],de))return st;return-1}function MM(ie){return ie!==ie}function OM(ie,de){var ce=ie==null?0:ie.length;return ce?gw(ie,de)/ce:F}function hw(ie){return function(de){return de==null?r:de[ie]}}function mw(ie){return function(de){return ie==null?r:ie[de]}}function jM(ie,de,ce,Le,st){return st(ie,function(Wt,Jr,tr){ce=Le?(Le=!1,Wt):de(ce,Wt,Jr,tr)}),ce}function qle(ie,de){var ce=ie.length;for(ie.sort(de);ce--;)ie[ce]=ie[ce].value;return ie}function gw(ie,de){for(var ce,Le=-1,st=ie.length;++Le<st;){var Wt=de(ie[Le]);Wt!==r&&(ce=ce===r?Wt:ce+Wt)}return ce}function bw(ie,de){for(var ce=-1,Le=Array(ie);++ce<ie;)Le[ce]=de(ce);return Le}function Gle(ie,de){return br(de,function(ce){return[ce,ie[ce]]})}function LM(ie){return ie&&ie.slice(0,KM(ie)+1).replace(Xo,"")}function io(ie){return function(de){return ie(de)}}function vw(ie,de){return br(de,function(ce){return ie[ce]})}function cd(ie,de){return ie.has(de)}function FM(ie,de){for(var ce=-1,Le=ie.length;++ce<Le&&Su(de,ie[ce],0)>-1;);return ce}function BM(ie,de){for(var ce=ie.length;ce--&&Su(de,ie[ce],0)>-1;);return ce}function Zle(ie,de){for(var ce=ie.length,Le=0;ce--;)ie[ce]===de&&++Le;return Le}var Yle=mw(Dle),Jle=mw(Mle);function Xle(ie){return"\\"+jle[ie]}function Qle(ie,de){return ie==null?r:ie[de]}function ku(ie){return _le.test(ie)}function eue(ie){return $le.test(ie)}function tue(ie){for(var de,ce=[];!(de=ie.next()).done;)ce.push(de.value);return ce}function yw(ie){var de=-1,ce=Array(ie.size);return ie.forEach(function(Le,st){ce[++de]=[st,Le]}),ce}function zM(ie,de){return function(ce){return ie(de(ce))}}function da(ie,de){for(var ce=-1,Le=ie.length,st=0,Wt=[];++ce<Le;){var Jr=ie[ce];(Jr===de||Jr===f)&&(ie[ce]=f,Wt[st++]=ce)}return Wt}function Qh(ie){var de=-1,ce=Array(ie.size);return ie.forEach(function(Le){ce[++de]=Le}),ce}function rue(ie){var de=-1,ce=Array(ie.size);return ie.forEach(function(Le){ce[++de]=[Le,Le]}),ce}function nue(ie,de,ce){for(var Le=ce-1,st=ie.length;++Le<st;)if(ie[Le]===de)return Le;return-1}function oue(ie,de,ce){for(var Le=ce+1;Le--;)if(ie[Le]===de)return Le;return Le}function Pu(ie){return ku(ie)?sue(ie):Rle(ie)}function ei(ie){return ku(ie)?aue(ie):Wle(ie)}function KM(ie){for(var de=ie.length;de--&&Pi.test(ie.charAt(de)););return de}var iue=mw(Ole);function sue(ie){for(var de=lw.lastIndex=0;lw.test(ie);)++de;return de}function aue(ie){return ie.match(lw)||[]}function lue(ie){return ie.match(Ale)||[]}var uue=(function ie(de){de=de==null?ln:Eu.defaults(ln.Object(),de,Eu.pick(ln,Ile));var ce=de.Array,Le=de.Date,st=de.Error,Wt=de.Function,Jr=de.Math,tr=de.Object,xw=de.RegExp,cue=de.String,_o=de.TypeError,em=ce.prototype,due=Wt.prototype,Tu=tr.prototype,tm=de["__core-js_shared__"],rm=due.toString,Ht=Tu.hasOwnProperty,fue=0,VM=(function(){var u=/[^.]+$/.exec(tm&&tm.keys&&tm.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""})(),nm=Tu.toString,pue=rm.call(tr),hue=ln._,mue=xw("^"+rm.call(Ht).replace(Jo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),om=PM?de.Buffer:r,fa=de.Symbol,im=de.Uint8Array,RM=om?om.allocUnsafe:r,sm=zM(tr.getPrototypeOf,tr),WM=tr.create,UM=Tu.propertyIsEnumerable,am=em.splice,HM=fa?fa.isConcatSpreadable:r,dd=fa?fa.iterator:r,cl=fa?fa.toStringTag:r,lm=(function(){try{var u=ml(tr,"defineProperty");return u({},"",{}),u}catch{}})(),gue=de.clearTimeout!==ln.clearTimeout&&de.clearTimeout,bue=Le&&Le.now!==ln.Date.now&&Le.now,vue=de.setTimeout!==ln.setTimeout&&de.setTimeout,um=Jr.ceil,cm=Jr.floor,ww=tr.getOwnPropertySymbols,yue=om?om.isBuffer:r,qM=de.isFinite,xue=em.join,wue=zM(tr.keys,tr),Xr=Jr.max,mn=Jr.min,Cue=Le.now,Sue=de.parseInt,GM=Jr.random,kue=em.reverse,Cw=ml(de,"DataView"),fd=ml(de,"Map"),Sw=ml(de,"Promise"),Au=ml(de,"Set"),pd=ml(de,"WeakMap"),hd=ml(tr,"create"),dm=pd&&new pd,_u={},Pue=gl(Cw),Eue=gl(fd),Tue=gl(Sw),Aue=gl(Au),_ue=gl(pd),fm=fa?fa.prototype:r,md=fm?fm.valueOf:r,ZM=fm?fm.toString:r;function q(u){if(_r(u)&&!ct(u)&&!(u instanceof Nt)){if(u instanceof $o)return u;if(Ht.call(u,"__wrapped__"))return Y7(u)}return new $o(u)}var $u=(function(){function u(){}return function(p){if(!Pr(p))return{};if(WM)return WM(p);u.prototype=p;var w=new u;return u.prototype=r,w}})();function pm(){}function $o(u,p){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=r}q.templateSettings={escape:hn,evaluate:to,interpolate:Ur,variable:"",imports:{_:q}},q.prototype=pm.prototype,q.prototype.constructor=q,$o.prototype=$u(pm.prototype),$o.prototype.constructor=$o;function Nt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=_,this.__views__=[]}function $ue(){var u=new Nt(this.__wrapped__);return u.__actions__=Vn(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Vn(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Vn(this.__views__),u}function Iue(){if(this.__filtered__){var u=new Nt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function Nue(){var u=this.__wrapped__.value(),p=this.__dir__,w=ct(u),I=p<0,z=w?u.length:0,G=Wce(0,z,this.__views__),J=G.start,ee=G.end,se=ee-J,he=I?ee:J-1,me=this.__iteratees__,Ce=me.length,De=0,Re=mn(se,this.__takeCount__);if(!w||!I&&z==se&&Re==se)return y7(u,this.__actions__);var Ge=[];e:for(;se--&&De<Re;){he+=p;for(var gt=-1,He=u[he];++gt<Ce;){var _t=me[gt],Mt=_t.iteratee,lo=_t.type,Dn=Mt(He);if(lo==U)He=Dn;else if(!Dn){if(lo==B)continue e;break e}}Ge[De++]=He}return Ge}Nt.prototype=$u(pm.prototype),Nt.prototype.constructor=Nt;function dl(u){var p=-1,w=u==null?0:u.length;for(this.clear();++p<w;){var I=u[p];this.set(I[0],I[1])}}function Due(){this.__data__=hd?hd(null):{},this.size=0}function Mue(u){var p=this.has(u)&&delete this.__data__[u];return this.size-=p?1:0,p}function Oue(u){var p=this.__data__;if(hd){var w=p[u];return w===c?r:w}return Ht.call(p,u)?p[u]:r}function jue(u){var p=this.__data__;return hd?p[u]!==r:Ht.call(p,u)}function Lue(u,p){var w=this.__data__;return this.size+=this.has(u)?0:1,w[u]=hd&&p===r?c:p,this}dl.prototype.clear=Due,dl.prototype.delete=Mue,dl.prototype.get=Oue,dl.prototype.has=jue,dl.prototype.set=Lue;function ns(u){var p=-1,w=u==null?0:u.length;for(this.clear();++p<w;){var I=u[p];this.set(I[0],I[1])}}function Fue(){this.__data__=[],this.size=0}function Bue(u){var p=this.__data__,w=hm(p,u);if(w<0)return!1;var I=p.length-1;return w==I?p.pop():am.call(p,w,1),--this.size,!0}function zue(u){var p=this.__data__,w=hm(p,u);return w<0?r:p[w][1]}function Kue(u){return hm(this.__data__,u)>-1}function Vue(u,p){var w=this.__data__,I=hm(w,u);return I<0?(++this.size,w.push([u,p])):w[I][1]=p,this}ns.prototype.clear=Fue,ns.prototype.delete=Bue,ns.prototype.get=zue,ns.prototype.has=Kue,ns.prototype.set=Vue;function os(u){var p=-1,w=u==null?0:u.length;for(this.clear();++p<w;){var I=u[p];this.set(I[0],I[1])}}function Rue(){this.size=0,this.__data__={hash:new dl,map:new(fd||ns),string:new dl}}function Wue(u){var p=Em(this,u).delete(u);return this.size-=p?1:0,p}function Uue(u){return Em(this,u).get(u)}function Hue(u){return Em(this,u).has(u)}function que(u,p){var w=Em(this,u),I=w.size;return w.set(u,p),this.size+=w.size==I?0:1,this}os.prototype.clear=Rue,os.prototype.delete=Wue,os.prototype.get=Uue,os.prototype.has=Hue,os.prototype.set=que;function fl(u){var p=-1,w=u==null?0:u.length;for(this.__data__=new os;++p<w;)this.add(u[p])}function Gue(u){return this.__data__.set(u,c),this}function Zue(u){return this.__data__.has(u)}fl.prototype.add=fl.prototype.push=Gue,fl.prototype.has=Zue;function ti(u){var p=this.__data__=new ns(u);this.size=p.size}function Yue(){this.__data__=new ns,this.size=0}function Jue(u){var p=this.__data__,w=p.delete(u);return this.size=p.size,w}function Xue(u){return this.__data__.get(u)}function Que(u){return this.__data__.has(u)}function ece(u,p){var w=this.__data__;if(w instanceof ns){var I=w.__data__;if(!fd||I.length<o-1)return I.push([u,p]),this.size=++w.size,this;w=this.__data__=new os(I)}return w.set(u,p),this.size=w.size,this}ti.prototype.clear=Yue,ti.prototype.delete=Jue,ti.prototype.get=Xue,ti.prototype.has=Que,ti.prototype.set=ece;function YM(u,p){var w=ct(u),I=!w&&bl(u),z=!w&&!I&&ba(u),G=!w&&!I&&!z&&Mu(u),J=w||I||z||G,ee=J?bw(u.length,cue):[],se=ee.length;for(var he in u)(p||Ht.call(u,he))&&!(J&&(he=="length"||z&&(he=="offset"||he=="parent")||G&&(he=="buffer"||he=="byteLength"||he=="byteOffset")||as(he,se)))&&ee.push(he);return ee}function JM(u){var p=u.length;return p?u[Mw(0,p-1)]:r}function tce(u,p){return Tm(Vn(u),pl(p,0,u.length))}function rce(u){return Tm(Vn(u))}function kw(u,p,w){(w!==r&&!ni(u[p],w)||w===r&&!(p in u))&&_i(u,p,w)}function gd(u,p,w){var I=u[p];(!(Ht.call(u,p)&&ni(I,w))||w===r&&!(p in u))&&_i(u,p,w)}function hm(u,p){for(var w=u.length;w--;)if(ni(u[w][0],p))return w;return-1}function nce(u,p,w,I){return pa(u,function(z,G,J){p(I,z,w(z),J)}),I}function XM(u,p){return u&&Ii(p,tn(p),u)}function oce(u,p){return u&&Ii(p,Wn(p),u)}function _i(u,p,w){p=="__proto__"&&lm?lm(u,p,{configurable:!0,enumerable:!0,value:w,writable:!0}):u[p]=w}function Pw(u,p){for(var w=-1,I=p.length,z=ce(I),G=u==null;++w<I;)z[w]=G?r:sC(u,p[w]);return z}function pl(u,p,w){return u===u&&(w!==r&&(u=u<=w?u:w),p!==r&&(u=u>=p?u:p)),u}function Io(u,p,w,I,z,G){var J,ee=p&m,se=p&g,he=p&b;if(w&&(J=z?w(u,I,z,G):w(u)),J!==r)return J;if(!Pr(u))return u;var me=ct(u);if(me){if(J=Hce(u),!ee)return Vn(u,J)}else{var Ce=gn(u),De=Ce==pe||Ce==we;if(ba(u))return C7(u,ee);if(Ce==Ne||Ce==oe||De&&!z){if(J=se||De?{}:K7(u),!ee)return se?Oce(u,oce(J,u)):Mce(u,XM(J,u))}else{if(!lr[Ce])return z?u:{};J=qce(u,Ce,ee)}}G||(G=new ti);var Re=G.get(u);if(Re)return Re;G.set(u,J),gO(u)?u.forEach(function(He){J.add(Io(He,p,w,He,u,G))}):hO(u)&&u.forEach(function(He,_t){J.set(_t,Io(He,p,w,_t,u,G))});var Ge=he?se?Uw:Ww:se?Wn:tn,gt=me?r:Ge(u);return oo(gt||u,function(He,_t){gt&&(_t=He,He=u[_t]),gd(J,_t,Io(He,p,w,_t,u,G))}),J}function ice(u){var p=tn(u);return function(w){return QM(w,u,p)}}function QM(u,p,w){var I=w.length;if(u==null)return!I;for(u=tr(u);I--;){var z=w[I],G=p[z],J=u[z];if(J===r&&!(z in u)||!G(J))return!1}return!0}function e7(u,p,w){if(typeof u!="function")throw new _o(s);return Sd(function(){u.apply(r,w)},p)}function bd(u,p,w,I){var z=-1,G=Jh,J=!0,ee=u.length,se=[],he=p.length;if(!ee)return se;w&&(p=br(p,io(w))),I?(G=dw,J=!1):p.length>=o&&(G=cd,J=!1,p=new fl(p));e:for(;++z<ee;){var me=u[z],Ce=w==null?me:w(me);if(me=I||me!==0?me:0,J&&Ce===Ce){for(var De=he;De--;)if(p[De]===Ce)continue e;se.push(me)}else G(p,Ce,I)||se.push(me)}return se}var pa=T7($i),t7=T7(Tw,!0);function sce(u,p){var w=!0;return pa(u,function(I,z,G){return w=!!p(I,z,G),w}),w}function mm(u,p,w){for(var I=-1,z=u.length;++I<z;){var G=u[I],J=p(G);if(J!=null&&(ee===r?J===J&&!ao(J):w(J,ee)))var ee=J,se=G}return se}function ace(u,p,w,I){var z=u.length;for(w=ht(w),w<0&&(w=-w>z?0:z+w),I=I===r||I>z?z:ht(I),I<0&&(I+=z),I=w>I?0:vO(I);w<I;)u[w++]=p;return u}function r7(u,p){var w=[];return pa(u,function(I,z,G){p(I,z,G)&&w.push(I)}),w}function un(u,p,w,I,z){var G=-1,J=u.length;for(w||(w=Zce),z||(z=[]);++G<J;){var ee=u[G];p>0&&w(ee)?p>1?un(ee,p-1,w,I,z):ca(z,ee):I||(z[z.length]=ee)}return z}var Ew=A7(),n7=A7(!0);function $i(u,p){return u&&Ew(u,p,tn)}function Tw(u,p){return u&&n7(u,p,tn)}function gm(u,p){return ua(p,function(w){return ls(u[w])})}function hl(u,p){p=ma(p,u);for(var w=0,I=p.length;u!=null&&w<I;)u=u[ri(p[w++])];return w&&w==I?u:r}function o7(u,p,w){var I=p(u);return ct(u)?I:ca(I,w(u))}function In(u){return u==null?u===r?wt:ke:cl&&cl in tr(u)?Rce(u):rde(u)}function Aw(u,p){return u>p}function lce(u,p){return u!=null&&Ht.call(u,p)}function uce(u,p){return u!=null&&p in tr(u)}function cce(u,p,w){return u>=mn(p,w)&&u<Xr(p,w)}function _w(u,p,w){for(var I=w?dw:Jh,z=u[0].length,G=u.length,J=G,ee=ce(G),se=1/0,he=[];J--;){var me=u[J];J&&p&&(me=br(me,io(p))),se=mn(me.length,se),ee[J]=!w&&(p||z>=120&&me.length>=120)?new fl(J&&me):r}me=u[0];var Ce=-1,De=ee[0];e:for(;++Ce<z&&he.length<se;){var Re=me[Ce],Ge=p?p(Re):Re;if(Re=w||Re!==0?Re:0,!(De?cd(De,Ge):I(he,Ge,w))){for(J=G;--J;){var gt=ee[J];if(!(gt?cd(gt,Ge):I(u[J],Ge,w)))continue e}De&&De.push(Ge),he.push(Re)}}return he}function dce(u,p,w,I){return $i(u,function(z,G,J){p(I,w(z),G,J)}),I}function vd(u,p,w){p=ma(p,u),u=U7(u,p);var I=u==null?u:u[ri(Do(p))];return I==null?r:no(I,u,w)}function i7(u){return _r(u)&&In(u)==oe}function fce(u){return _r(u)&&In(u)==ut}function pce(u){return _r(u)&&In(u)==te}function yd(u,p,w,I,z){return u===p?!0:u==null||p==null||!_r(u)&&!_r(p)?u!==u&&p!==p:hce(u,p,w,I,yd,z)}function hce(u,p,w,I,z,G){var J=ct(u),ee=ct(p),se=J?Q:gn(u),he=ee?Q:gn(p);se=se==oe?Ne:se,he=he==oe?Ne:he;var me=se==Ne,Ce=he==Ne,De=se==he;if(De&&ba(u)){if(!ba(p))return!1;J=!0,me=!1}if(De&&!me)return G||(G=new ti),J||Mu(u)?F7(u,p,w,I,z,G):Kce(u,p,se,w,I,z,G);if(!(w&y)){var Re=me&&Ht.call(u,"__wrapped__"),Ge=Ce&&Ht.call(p,"__wrapped__");if(Re||Ge){var gt=Re?u.value():u,He=Ge?p.value():p;return G||(G=new ti),z(gt,He,w,I,G)}}return De?(G||(G=new ti),Vce(u,p,w,I,z,G)):!1}function mce(u){return _r(u)&&gn(u)==be}function $w(u,p,w,I){var z=w.length,G=z,J=!I;if(u==null)return!G;for(u=tr(u);z--;){var ee=w[z];if(J&&ee[2]?ee[1]!==u[ee[0]]:!(ee[0]in u))return!1}for(;++z<G;){ee=w[z];var se=ee[0],he=u[se],me=ee[1];if(J&&ee[2]){if(he===r&&!(se in u))return!1}else{var Ce=new ti;if(I)var De=I(he,me,se,u,p,Ce);if(!(De===r?yd(me,he,y|v,I,Ce):De))return!1}}return!0}function s7(u){if(!Pr(u)||Jce(u))return!1;var p=ls(u)?mue:sa;return p.test(gl(u))}function gce(u){return _r(u)&&In(u)==Ae}function bce(u){return _r(u)&&gn(u)==xe}function vce(u){return _r(u)&&Dm(u.length)&&!!fr[In(u)]}function a7(u){return typeof u=="function"?u:u==null?Un:typeof u=="object"?ct(u)?c7(u[0],u[1]):u7(u):$O(u)}function Iw(u){if(!Cd(u))return wue(u);var p=[];for(var w in tr(u))Ht.call(u,w)&&w!="constructor"&&p.push(w);return p}function yce(u){if(!Pr(u))return tde(u);var p=Cd(u),w=[];for(var I in u)I=="constructor"&&(p||!Ht.call(u,I))||w.push(I);return w}function Nw(u,p){return u<p}function l7(u,p){var w=-1,I=Rn(u)?ce(u.length):[];return pa(u,function(z,G,J){I[++w]=p(z,G,J)}),I}function u7(u){var p=qw(u);return p.length==1&&p[0][2]?R7(p[0][0],p[0][1]):function(w){return w===u||$w(w,u,p)}}function c7(u,p){return Zw(u)&&V7(p)?R7(ri(u),p):function(w){var I=sC(w,u);return I===r&&I===p?aC(w,u):yd(p,I,y|v)}}function bm(u,p,w,I,z){u!==p&&Ew(p,function(G,J){if(z||(z=new ti),Pr(G))xce(u,p,J,w,bm,I,z);else{var ee=I?I(Jw(u,J),G,J+"",u,p,z):r;ee===r&&(ee=G),kw(u,J,ee)}},Wn)}function xce(u,p,w,I,z,G,J){var ee=Jw(u,w),se=Jw(p,w),he=J.get(se);if(he){kw(u,w,he);return}var me=G?G(ee,se,w+"",u,p,J):r,Ce=me===r;if(Ce){var De=ct(se),Re=!De&&ba(se),Ge=!De&&!Re&&Mu(se);me=se,De||Re||Ge?ct(ee)?me=ee:Mr(ee)?me=Vn(ee):Re?(Ce=!1,me=C7(se,!0)):Ge?(Ce=!1,me=S7(se,!0)):me=[]:kd(se)||bl(se)?(me=ee,bl(ee)?me=yO(ee):(!Pr(ee)||ls(ee))&&(me=K7(se))):Ce=!1}Ce&&(J.set(se,me),z(me,se,I,G,J),J.delete(se)),kw(u,w,me)}function d7(u,p){var w=u.length;if(w)return p+=p<0?w:0,as(p,w)?u[p]:r}function f7(u,p,w){p.length?p=br(p,function(G){return ct(G)?function(J){return hl(J,G.length===1?G[0]:G)}:G}):p=[Un];var I=-1;p=br(p,io(qe()));var z=l7(u,function(G,J,ee){var se=br(p,function(he){return he(G)});return{criteria:se,index:++I,value:G}});return qle(z,function(G,J){return Dce(G,J,w)})}function wce(u,p){return p7(u,p,function(w,I){return aC(u,I)})}function p7(u,p,w){for(var I=-1,z=p.length,G={};++I<z;){var J=p[I],ee=hl(u,J);w(ee,J)&&xd(G,ma(J,u),ee)}return G}function Cce(u){return function(p){return hl(p,u)}}function Dw(u,p,w,I){var z=I?Hle:Su,G=-1,J=p.length,ee=u;for(u===p&&(p=Vn(p)),w&&(ee=br(u,io(w)));++G<J;)for(var se=0,he=p[G],me=w?w(he):he;(se=z(ee,me,se,I))>-1;)ee!==u&&am.call(ee,se,1),am.call(u,se,1);return u}function h7(u,p){for(var w=u?p.length:0,I=w-1;w--;){var z=p[w];if(w==I||z!==G){var G=z;as(z)?am.call(u,z,1):Lw(u,z)}}return u}function Mw(u,p){return u+cm(GM()*(p-u+1))}function Sce(u,p,w,I){for(var z=-1,G=Xr(um((p-u)/(w||1)),0),J=ce(G);G--;)J[I?G:++z]=u,u+=w;return J}function Ow(u,p){var w="";if(!u||p<1||p>Z)return w;do p%2&&(w+=u),p=cm(p/2),p&&(u+=u);while(p);return w}function kt(u,p){return Xw(W7(u,p,Un),u+"")}function kce(u){return JM(Ou(u))}function Pce(u,p){var w=Ou(u);return Tm(w,pl(p,0,w.length))}function xd(u,p,w,I){if(!Pr(u))return u;p=ma(p,u);for(var z=-1,G=p.length,J=G-1,ee=u;ee!=null&&++z<G;){var se=ri(p[z]),he=w;if(se==="__proto__"||se==="constructor"||se==="prototype")return u;if(z!=J){var me=ee[se];he=I?I(me,se,ee):r,he===r&&(he=Pr(me)?me:as(p[z+1])?[]:{})}gd(ee,se,he),ee=ee[se]}return u}var m7=dm?function(u,p){return dm.set(u,p),u}:Un,Ece=lm?function(u,p){return lm(u,"toString",{configurable:!0,enumerable:!1,value:uC(p),writable:!0})}:Un;function Tce(u){return Tm(Ou(u))}function No(u,p,w){var I=-1,z=u.length;p<0&&(p=-p>z?0:z+p),w=w>z?z:w,w<0&&(w+=z),z=p>w?0:w-p>>>0,p>>>=0;for(var G=ce(z);++I<z;)G[I]=u[I+p];return G}function Ace(u,p){var w;return pa(u,function(I,z,G){return w=p(I,z,G),!w}),!!w}function vm(u,p,w){var I=0,z=u==null?I:u.length;if(typeof p=="number"&&p===p&&z<=Y){for(;I<z;){var G=I+z>>>1,J=u[G];J!==null&&!ao(J)&&(w?J<=p:J<p)?I=G+1:z=G}return z}return jw(u,p,Un,w)}function jw(u,p,w,I){var z=0,G=u==null?0:u.length;if(G===0)return 0;p=w(p);for(var J=p!==p,ee=p===null,se=ao(p),he=p===r;z<G;){var me=cm((z+G)/2),Ce=w(u[me]),De=Ce!==r,Re=Ce===null,Ge=Ce===Ce,gt=ao(Ce);if(J)var He=I||Ge;else he?He=Ge&&(I||De):ee?He=Ge&&De&&(I||!Re):se?He=Ge&&De&&!Re&&(I||!gt):Re||gt?He=!1:He=I?Ce<=p:Ce<p;He?z=me+1:G=me}return mn(G,H)}function g7(u,p){for(var w=-1,I=u.length,z=0,G=[];++w<I;){var J=u[w],ee=p?p(J):J;if(!w||!ni(ee,se)){var se=ee;G[z++]=J===0?0:J}}return G}function b7(u){return typeof u=="number"?u:ao(u)?F:+u}function so(u){if(typeof u=="string")return u;if(ct(u))return br(u,so)+"";if(ao(u))return ZM?ZM.call(u):"";var p=u+"";return p=="0"&&1/u==-L?"-0":p}function ha(u,p,w){var I=-1,z=Jh,G=u.length,J=!0,ee=[],se=ee;if(w)J=!1,z=dw;else if(G>=o){var he=p?null:Bce(u);if(he)return Qh(he);J=!1,z=cd,se=new fl}else se=p?[]:ee;e:for(;++I<G;){var me=u[I],Ce=p?p(me):me;if(me=w||me!==0?me:0,J&&Ce===Ce){for(var De=se.length;De--;)if(se[De]===Ce)continue e;p&&se.push(Ce),ee.push(me)}else z(se,Ce,w)||(se!==ee&&se.push(Ce),ee.push(me))}return ee}function Lw(u,p){p=ma(p,u);var w=-1,I=p.length;if(!I)return!0;for(;++w<I;){var z=ri(p[w]);if(z==="__proto__"&&!Ht.call(u,"__proto__")||(z==="constructor"||z==="prototype")&&w<I-1)return!1}var G=U7(u,p);return G==null||delete G[ri(Do(p))]}function v7(u,p,w,I){return xd(u,p,w(hl(u,p)),I)}function ym(u,p,w,I){for(var z=u.length,G=I?z:-1;(I?G--:++G<z)&&p(u[G],G,u););return w?No(u,I?0:G,I?G+1:z):No(u,I?G+1:0,I?z:G)}function y7(u,p){var w=u;return w instanceof Nt&&(w=w.value()),fw(p,function(I,z){return z.func.apply(z.thisArg,ca([I],z.args))},w)}function Fw(u,p,w){var I=u.length;if(I<2)return I?ha(u[0]):[];for(var z=-1,G=ce(I);++z<I;)for(var J=u[z],ee=-1;++ee<I;)ee!=z&&(G[z]=bd(G[z]||J,u[ee],p,w));return ha(un(G,1),p,w)}function x7(u,p,w){for(var I=-1,z=u.length,G=p.length,J={};++I<z;){var ee=I<G?p[I]:r;w(J,u[I],ee)}return J}function Bw(u){return Mr(u)?u:[]}function zw(u){return typeof u=="function"?u:Un}function ma(u,p){return ct(u)?u:Zw(u,p)?[u]:Z7(qt(u))}var _ce=kt;function ga(u,p,w){var I=u.length;return w=w===r?I:w,!p&&w>=I?u:No(u,p,w)}var w7=gue||function(u){return ln.clearTimeout(u)};function C7(u,p){if(p)return u.slice();var w=u.length,I=RM?RM(w):new u.constructor(w);return u.copy(I),I}function Kw(u){var p=new u.constructor(u.byteLength);return new im(p).set(new im(u)),p}function $ce(u,p){var w=p?Kw(u.buffer):u.buffer;return new u.constructor(w,u.byteOffset,u.byteLength)}function Ice(u){var p=new u.constructor(u.source,vu.exec(u));return p.lastIndex=u.lastIndex,p}function Nce(u){return md?tr(md.call(u)):{}}function S7(u,p){var w=p?Kw(u.buffer):u.buffer;return new u.constructor(w,u.byteOffset,u.length)}function k7(u,p){if(u!==p){var w=u!==r,I=u===null,z=u===u,G=ao(u),J=p!==r,ee=p===null,se=p===p,he=ao(p);if(!ee&&!he&&!G&&u>p||G&&J&&se&&!ee&&!he||I&&J&&se||!w&&se||!z)return 1;if(!I&&!G&&!he&&u<p||he&&w&&z&&!I&&!G||ee&&w&&z||!J&&z||!se)return-1}return 0}function Dce(u,p,w){for(var I=-1,z=u.criteria,G=p.criteria,J=z.length,ee=w.length;++I<J;){var se=k7(z[I],G[I]);if(se){if(I>=ee)return se;var he=w[I];return se*(he=="desc"?-1:1)}}return u.index-p.index}function P7(u,p,w,I){for(var z=-1,G=u.length,J=w.length,ee=-1,se=p.length,he=Xr(G-J,0),me=ce(se+he),Ce=!I;++ee<se;)me[ee]=p[ee];for(;++z<J;)(Ce||z<G)&&(me[w[z]]=u[z]);for(;he--;)me[ee++]=u[z++];return me}function E7(u,p,w,I){for(var z=-1,G=u.length,J=-1,ee=w.length,se=-1,he=p.length,me=Xr(G-ee,0),Ce=ce(me+he),De=!I;++z<me;)Ce[z]=u[z];for(var Re=z;++se<he;)Ce[Re+se]=p[se];for(;++J<ee;)(De||z<G)&&(Ce[Re+w[J]]=u[z++]);return Ce}function Vn(u,p){var w=-1,I=u.length;for(p||(p=ce(I));++w<I;)p[w]=u[w];return p}function Ii(u,p,w,I){var z=!w;w||(w={});for(var G=-1,J=p.length;++G<J;){var ee=p[G],se=I?I(w[ee],u[ee],ee,w,u):r;se===r&&(se=u[ee]),z?_i(w,ee,se):gd(w,ee,se)}return w}function Mce(u,p){return Ii(u,Gw(u),p)}function Oce(u,p){return Ii(u,B7(u),p)}function xm(u,p){return function(w,I){var z=ct(w)?zle:nce,G=p?p():{};return z(w,u,qe(I,2),G)}}function Iu(u){return kt(function(p,w){var I=-1,z=w.length,G=z>1?w[z-1]:r,J=z>2?w[2]:r;for(G=u.length>3&&typeof G=="function"?(z--,G):r,J&&Nn(w[0],w[1],J)&&(G=z<3?r:G,z=1),p=tr(p);++I<z;){var ee=w[I];ee&&u(p,ee,I,G)}return p})}function T7(u,p){return function(w,I){if(w==null)return w;if(!Rn(w))return u(w,I);for(var z=w.length,G=p?z:-1,J=tr(w);(p?G--:++G<z)&&I(J[G],G,J)!==!1;);return w}}function A7(u){return function(p,w,I){for(var z=-1,G=tr(p),J=I(p),ee=J.length;ee--;){var se=J[u?ee:++z];if(w(G[se],se,G)===!1)break}return p}}function jce(u,p,w){var I=p&C,z=wd(u);function G(){var J=this&&this!==ln&&this instanceof G?z:u;return J.apply(I?w:this,arguments)}return G}function _7(u){return function(p){p=qt(p);var w=ku(p)?ei(p):r,I=w?w[0]:p.charAt(0),z=w?ga(w,1).join(""):p.slice(1);return I[u]()+z}}function Nu(u){return function(p){return fw(AO(TO(p).replace(Ele,"")),u,"")}}function wd(u){return function(){var p=arguments;switch(p.length){case 0:return new u;case 1:return new u(p[0]);case 2:return new u(p[0],p[1]);case 3:return new u(p[0],p[1],p[2]);case 4:return new u(p[0],p[1],p[2],p[3]);case 5:return new u(p[0],p[1],p[2],p[3],p[4]);case 6:return new u(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new u(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var w=$u(u.prototype),I=u.apply(w,p);return Pr(I)?I:w}}function Lce(u,p,w){var I=wd(u);function z(){for(var G=arguments.length,J=ce(G),ee=G,se=Du(z);ee--;)J[ee]=arguments[ee];var he=G<3&&J[0]!==se&&J[G-1]!==se?[]:da(J,se);if(G-=he.length,G<w)return M7(u,p,wm,z.placeholder,r,J,he,r,r,w-G);var me=this&&this!==ln&&this instanceof z?I:u;return no(me,this,J)}return z}function $7(u){return function(p,w,I){var z=tr(p);if(!Rn(p)){var G=qe(w,3);p=tn(p),w=function(ee){return G(z[ee],ee,z)}}var J=u(p,w,I);return J>-1?z[G?p[J]:J]:r}}function I7(u){return ss(function(p){var w=p.length,I=w,z=$o.prototype.thru;for(u&&p.reverse();I--;){var G=p[I];if(typeof G!="function")throw new _o(s);if(z&&!J&&Pm(G)=="wrapper")var J=new $o([],!0)}for(I=J?I:w;++I<w;){G=p[I];var ee=Pm(G),se=ee=="wrapper"?Hw(G):r;se&&Yw(se[0])&&se[1]==(N|P|$|D)&&!se[4].length&&se[9]==1?J=J[Pm(se[0])].apply(J,se[3]):J=G.length==1&&Yw(G)?J[ee]():J.thru(G)}return function(){var he=arguments,me=he[0];if(J&&he.length==1&&ct(me))return J.plant(me).value();for(var Ce=0,De=w?p[Ce].apply(this,he):me;++Ce<w;)De=p[Ce].call(this,De);return De}})}function wm(u,p,w,I,z,G,J,ee,se,he){var me=p&N,Ce=p&C,De=p&S,Re=p&(P|E),Ge=p&M,gt=De?r:wd(u);function He(){for(var _t=arguments.length,Mt=ce(_t),lo=_t;lo--;)Mt[lo]=arguments[lo];if(Re)var Dn=Du(He),uo=Zle(Mt,Dn);if(I&&(Mt=P7(Mt,I,z,Re)),G&&(Mt=E7(Mt,G,J,Re)),_t-=uo,Re&&_t<he){var Or=da(Mt,Dn);return M7(u,p,wm,He.placeholder,w,Mt,Or,ee,se,he-_t)}var oi=Ce?w:this,cs=De?oi[u]:u;return _t=Mt.length,ee?Mt=nde(Mt,ee):Ge&&_t>1&&Mt.reverse(),me&&se<_t&&(Mt.length=se),this&&this!==ln&&this instanceof He&&(cs=gt||wd(cs)),cs.apply(oi,Mt)}return He}function N7(u,p){return function(w,I){return dce(w,u,p(I),{})}}function Cm(u,p){return function(w,I){var z;if(w===r&&I===r)return p;if(w!==r&&(z=w),I!==r){if(z===r)return I;typeof w=="string"||typeof I=="string"?(w=so(w),I=so(I)):(w=b7(w),I=b7(I)),z=u(w,I)}return z}}function Vw(u){return ss(function(p){return p=br(p,io(qe())),kt(function(w){var I=this;return u(p,function(z){return no(z,I,w)})})})}function Sm(u,p){p=p===r?" ":so(p);var w=p.length;if(w<2)return w?Ow(p,u):p;var I=Ow(p,um(u/Pu(p)));return ku(p)?ga(ei(I),0,u).join(""):I.slice(0,u)}function Fce(u,p,w,I){var z=p&C,G=wd(u);function J(){for(var ee=-1,se=arguments.length,he=-1,me=I.length,Ce=ce(me+se),De=this&&this!==ln&&this instanceof J?G:u;++he<me;)Ce[he]=I[he];for(;se--;)Ce[he++]=arguments[++ee];return no(De,z?w:this,Ce)}return J}function D7(u){return function(p,w,I){return I&&typeof I!="number"&&Nn(p,w,I)&&(w=I=r),p=us(p),w===r?(w=p,p=0):w=us(w),I=I===r?p<w?1:-1:us(I),Sce(p,w,I,u)}}function km(u){return function(p,w){return typeof p=="string"&&typeof w=="string"||(p=Mo(p),w=Mo(w)),u(p,w)}}function M7(u,p,w,I,z,G,J,ee,se,he){var me=p&P,Ce=me?J:r,De=me?r:J,Re=me?G:r,Ge=me?r:G;p|=me?$:O,p&=~(me?O:$),p&k||(p&=-4);var gt=[u,p,z,Re,Ce,Ge,De,ee,se,he],He=w.apply(r,gt);return Yw(u)&&H7(He,gt),He.placeholder=I,q7(He,u,p)}function Rw(u){var p=Jr[u];return function(w,I){if(w=Mo(w),I=I==null?0:mn(ht(I),292),I&&qM(w)){var z=(qt(w)+"e").split("e"),G=p(z[0]+"e"+(+z[1]+I));return z=(qt(G)+"e").split("e"),+(z[0]+"e"+(+z[1]-I))}return p(w)}}var Bce=Au&&1/Qh(new Au([,-0]))[1]==L?function(u){return new Au(u)}:fC;function O7(u){return function(p){var w=gn(p);return w==be?yw(p):w==xe?rue(p):Gle(p,u(p))}}function is(u,p,w,I,z,G,J,ee){var se=p&S;if(!se&&typeof u!="function")throw new _o(s);var he=I?I.length:0;if(he||(p&=-97,I=z=r),J=J===r?J:Xr(ht(J),0),ee=ee===r?ee:ht(ee),he-=z?z.length:0,p&O){var me=I,Ce=z;I=z=r}var De=se?r:Hw(u),Re=[u,p,w,I,z,me,Ce,G,J,ee];if(De&&ede(Re,De),u=Re[0],p=Re[1],w=Re[2],I=Re[3],z=Re[4],ee=Re[9]=Re[9]===r?se?0:u.length:Xr(Re[9]-he,0),!ee&&p&(P|E)&&(p&=-25),!p||p==C)var Ge=jce(u,p,w);else p==P||p==E?Ge=Lce(u,p,ee):(p==$||p==(C|$))&&!z.length?Ge=Fce(u,p,w,I):Ge=wm.apply(r,Re);var gt=De?m7:H7;return q7(gt(Ge,Re),u,p)}function j7(u,p,w,I){return u===r||ni(u,Tu[w])&&!Ht.call(I,w)?p:u}function L7(u,p,w,I,z,G){return Pr(u)&&Pr(p)&&(G.set(p,u),bm(u,p,r,L7,G),G.delete(p)),u}function zce(u){return kd(u)?r:u}function F7(u,p,w,I,z,G){var J=w&y,ee=u.length,se=p.length;if(ee!=se&&!(J&&se>ee))return!1;var he=G.get(u),me=G.get(p);if(he&&me)return he==p&&me==u;var Ce=-1,De=!0,Re=w&v?new fl:r;for(G.set(u,p),G.set(p,u);++Ce<ee;){var Ge=u[Ce],gt=p[Ce];if(I)var He=J?I(gt,Ge,Ce,p,u,G):I(Ge,gt,Ce,u,p,G);if(He!==r){if(He)continue;De=!1;break}if(Re){if(!pw(p,function(_t,Mt){if(!cd(Re,Mt)&&(Ge===_t||z(Ge,_t,w,I,G)))return Re.push(Mt)})){De=!1;break}}else if(!(Ge===gt||z(Ge,gt,w,I,G))){De=!1;break}}return G.delete(u),G.delete(p),De}function Kce(u,p,w,I,z,G,J){switch(w){case Ue:if(u.byteLength!=p.byteLength||u.byteOffset!=p.byteOffset)return!1;u=u.buffer,p=p.buffer;case ut:return!(u.byteLength!=p.byteLength||!G(new im(u),new im(p)));case ue:case te:case re:return ni(+u,+p);case Se:return u.name==p.name&&u.message==p.message;case Ae:case Ie:return u==p+"";case be:var ee=yw;case xe:var se=I&y;if(ee||(ee=Qh),u.size!=p.size&&!se)return!1;var he=J.get(u);if(he)return he==p;I|=v,J.set(u,p);var me=F7(ee(u),ee(p),I,z,G,J);return J.delete(u),me;case et:if(md)return md.call(u)==md.call(p)}return!1}function Vce(u,p,w,I,z,G){var J=w&y,ee=Ww(u),se=ee.length,he=Ww(p),me=he.length;if(se!=me&&!J)return!1;for(var Ce=se;Ce--;){var De=ee[Ce];if(!(J?De in p:Ht.call(p,De)))return!1}var Re=G.get(u),Ge=G.get(p);if(Re&&Ge)return Re==p&&Ge==u;var gt=!0;G.set(u,p),G.set(p,u);for(var He=J;++Ce<se;){De=ee[Ce];var _t=u[De],Mt=p[De];if(I)var lo=J?I(Mt,_t,De,p,u,G):I(_t,Mt,De,u,p,G);if(!(lo===r?_t===Mt||z(_t,Mt,w,I,G):lo)){gt=!1;break}He||(He=De=="constructor")}if(gt&&!He){var Dn=u.constructor,uo=p.constructor;Dn!=uo&&"constructor"in u&&"constructor"in p&&!(typeof Dn=="function"&&Dn instanceof Dn&&typeof uo=="function"&&uo instanceof uo)&&(gt=!1)}return G.delete(u),G.delete(p),gt}function ss(u){return Xw(W7(u,r,Q7),u+"")}function Ww(u){return o7(u,tn,Gw)}function Uw(u){return o7(u,Wn,B7)}var Hw=dm?function(u){return dm.get(u)}:fC;function Pm(u){for(var p=u.name+"",w=_u[p],I=Ht.call(_u,p)?w.length:0;I--;){var z=w[I],G=z.func;if(G==null||G==u)return z.name}return p}function Du(u){var p=Ht.call(q,"placeholder")?q:u;return p.placeholder}function qe(){var u=q.iteratee||cC;return u=u===cC?a7:u,arguments.length?u(arguments[0],arguments[1]):u}function Em(u,p){var w=u.__data__;return Yce(p)?w[typeof p=="string"?"string":"hash"]:w.map}function qw(u){for(var p=tn(u),w=p.length;w--;){var I=p[w],z=u[I];p[w]=[I,z,V7(z)]}return p}function ml(u,p){var w=Qle(u,p);return s7(w)?w:r}function Rce(u){var p=Ht.call(u,cl),w=u[cl];try{u[cl]=r;var I=!0}catch{}var z=nm.call(u);return I&&(p?u[cl]=w:delete u[cl]),z}var Gw=ww?function(u){return u==null?[]:(u=tr(u),ua(ww(u),function(p){return UM.call(u,p)}))}:pC,B7=ww?function(u){for(var p=[];u;)ca(p,Gw(u)),u=sm(u);return p}:pC,gn=In;(Cw&&gn(new Cw(new ArrayBuffer(1)))!=Ue||fd&&gn(new fd)!=be||Sw&&gn(Sw.resolve())!=Me||Au&&gn(new Au)!=xe||pd&&gn(new pd)!=lt)&&(gn=function(u){var p=In(u),w=p==Ne?u.constructor:r,I=w?gl(w):"";if(I)switch(I){case Pue:return Ue;case Eue:return be;case Tue:return Me;case Aue:return xe;case _ue:return lt}return p});function Wce(u,p,w){for(var I=-1,z=w.length;++I<z;){var G=w[I],J=G.size;switch(G.type){case"drop":u+=J;break;case"dropRight":p-=J;break;case"take":p=mn(p,u+J);break;case"takeRight":u=Xr(u,p-J);break}}return{start:u,end:p}}function Uce(u){var p=u.match(nl);return p?p[1].split(ol):[]}function z7(u,p,w){p=ma(p,u);for(var I=-1,z=p.length,G=!1;++I<z;){var J=ri(p[I]);if(!(G=u!=null&&w(u,J)))break;u=u[J]}return G||++I!=z?G:(z=u==null?0:u.length,!!z&&Dm(z)&&as(J,z)&&(ct(u)||bl(u)))}function Hce(u){var p=u.length,w=new u.constructor(p);return p&&typeof u[0]=="string"&&Ht.call(u,"index")&&(w.index=u.index,w.input=u.input),w}function K7(u){return typeof u.constructor=="function"&&!Cd(u)?$u(sm(u)):{}}function qce(u,p,w){var I=u.constructor;switch(p){case ut:return Kw(u);case ue:case te:return new I(+u);case Ue:return $ce(u,w);case Vt:case Jt:case Xt:case sr:case Ct:case Sr:case dr:case kr:case $t:return S7(u,w);case be:return new I;case re:case Ie:return new I(u);case Ae:return Ice(u);case xe:return new I;case et:return Nce(u)}}function Gce(u,p){var w=p.length;if(!w)return u;var I=w-1;return p[I]=(w>1?"& ":"")+p[I],p=p.join(w>2?", ":" "),u.replace(es,`{
|
|
1667
1665
|
/* [wrapped with `+p+`] */
|
|
1668
1666
|
`)}function Zce(u){return ct(u)||bl(u)||!!(HM&&u&&u[HM])}function as(u,p){var w=typeof u;return p=p??Z,!!p&&(w=="number"||w!="symbol"&&aa.test(u))&&u>-1&&u%1==0&&u<p}function Nn(u,p,w){if(!Pr(w))return!1;var I=typeof p;return(I=="number"?Rn(w)&&as(p,w.length):I=="string"&&p in w)?ni(w[p],u):!1}function Zw(u,p){if(ct(u))return!1;var w=typeof u;return w=="number"||w=="symbol"||w=="boolean"||u==null||ao(u)?!0:Qi.test(u)||!jt.test(u)||p!=null&&u in tr(p)}function Yce(u){var p=typeof u;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?u!=="__proto__":u===null}function Yw(u){var p=Pm(u),w=q[p];if(typeof w!="function"||!(p in Nt.prototype))return!1;if(u===w)return!0;var I=Hw(w);return!!I&&u===I[0]}function Jce(u){return!!VM&&VM in u}var Xce=tm?ls:hC;function Cd(u){var p=u&&u.constructor,w=typeof p=="function"&&p.prototype||Tu;return u===w}function V7(u){return u===u&&!Pr(u)}function R7(u,p){return function(w){return w==null?!1:w[u]===p&&(p!==r||u in tr(w))}}function Qce(u){var p=Im(u,function(I){return w.size===d&&w.clear(),I}),w=p.cache;return p}function ede(u,p){var w=u[1],I=p[1],z=w|I,G=z<(C|S|N),J=I==N&&w==P||I==N&&w==D&&u[7].length<=p[8]||I==(N|D)&&p[7].length<=p[8]&&w==P;if(!(G||J))return u;I&C&&(u[2]=p[2],z|=w&C?0:k);var ee=p[3];if(ee){var se=u[3];u[3]=se?P7(se,ee,p[4]):ee,u[4]=se?da(u[3],f):p[4]}return ee=p[5],ee&&(se=u[5],u[5]=se?E7(se,ee,p[6]):ee,u[6]=se?da(u[5],f):p[6]),ee=p[7],ee&&(u[7]=ee),I&N&&(u[8]=u[8]==null?p[8]:mn(u[8],p[8])),u[9]==null&&(u[9]=p[9]),u[0]=p[0],u[1]=z,u}function tde(u){var p=[];if(u!=null)for(var w in tr(u))p.push(w);return p}function rde(u){return nm.call(u)}function W7(u,p,w){return p=Xr(p===r?u.length-1:p,0),function(){for(var I=arguments,z=-1,G=Xr(I.length-p,0),J=ce(G);++z<G;)J[z]=I[p+z];z=-1;for(var ee=ce(p+1);++z<p;)ee[z]=I[z];return ee[p]=w(J),no(u,this,ee)}}function U7(u,p){return p.length<2?u:hl(u,No(p,0,-1))}function nde(u,p){for(var w=u.length,I=mn(p.length,w),z=Vn(u);I--;){var G=p[I];u[I]=as(G,w)?z[G]:r}return u}function Jw(u,p){if(!(p==="constructor"&&typeof u[p]=="function")&&p!="__proto__")return u[p]}var H7=G7(m7),Sd=vue||function(u,p){return ln.setTimeout(u,p)},Xw=G7(Ece);function q7(u,p,w){var I=p+"";return Xw(u,Gce(I,ode(Uce(I),w)))}function G7(u){var p=0,w=0;return function(){var I=Cue(),z=j-(I-w);if(w=I,z>0){if(++p>=K)return arguments[0]}else p=0;return u.apply(r,arguments)}}function Tm(u,p){var w=-1,I=u.length,z=I-1;for(p=p===r?I:p;++w<p;){var G=Mw(w,z),J=u[G];u[G]=u[w],u[w]=J}return u.length=p,u}var Z7=Qce(function(u){var p=[];return u.charCodeAt(0)===46&&p.push(""),u.replace(oa,function(w,I,z,G){p.push(z?G.replace(rt,"$1"):I||w)}),p});function ri(u){if(typeof u=="string"||ao(u))return u;var p=u+"";return p=="0"&&1/u==-L?"-0":p}function gl(u){if(u!=null){try{return rm.call(u)}catch{}try{return u+""}catch{}}return""}function ode(u,p){return oo(X,function(w){var I="_."+w[0];p&w[1]&&!Jh(u,I)&&u.push(I)}),u.sort()}function Y7(u){if(u instanceof Nt)return u.clone();var p=new $o(u.__wrapped__,u.__chain__);return p.__actions__=Vn(u.__actions__),p.__index__=u.__index__,p.__values__=u.__values__,p}function ide(u,p,w){(w?Nn(u,p,w):p===r)?p=1:p=Xr(ht(p),0);var I=u==null?0:u.length;if(!I||p<1)return[];for(var z=0,G=0,J=ce(um(I/p));z<I;)J[G++]=No(u,z,z+=p);return J}function sde(u){for(var p=-1,w=u==null?0:u.length,I=0,z=[];++p<w;){var G=u[p];G&&(z[I++]=G)}return z}function ade(){var u=arguments.length;if(!u)return[];for(var p=ce(u-1),w=arguments[0],I=u;I--;)p[I-1]=arguments[I];return ca(ct(w)?Vn(w):[w],un(p,1))}var lde=kt(function(u,p){return Mr(u)?bd(u,un(p,1,Mr,!0)):[]}),ude=kt(function(u,p){var w=Do(p);return Mr(w)&&(w=r),Mr(u)?bd(u,un(p,1,Mr,!0),qe(w,2)):[]}),cde=kt(function(u,p){var w=Do(p);return Mr(w)&&(w=r),Mr(u)?bd(u,un(p,1,Mr,!0),r,w):[]});function dde(u,p,w){var I=u==null?0:u.length;return I?(p=w||p===r?1:ht(p),No(u,p<0?0:p,I)):[]}function fde(u,p,w){var I=u==null?0:u.length;return I?(p=w||p===r?1:ht(p),p=I-p,No(u,0,p<0?0:p)):[]}function pde(u,p){return u&&u.length?ym(u,qe(p,3),!0,!0):[]}function hde(u,p){return u&&u.length?ym(u,qe(p,3),!0):[]}function mde(u,p,w,I){var z=u==null?0:u.length;return z?(w&&typeof w!="number"&&Nn(u,p,w)&&(w=0,I=z),ace(u,p,w,I)):[]}function J7(u,p,w){var I=u==null?0:u.length;if(!I)return-1;var z=w==null?0:ht(w);return z<0&&(z=Xr(I+z,0)),Xh(u,qe(p,3),z)}function X7(u,p,w){var I=u==null?0:u.length;if(!I)return-1;var z=I-1;return w!==r&&(z=ht(w),z=w<0?Xr(I+z,0):mn(z,I-1)),Xh(u,qe(p,3),z,!0)}function Q7(u){var p=u==null?0:u.length;return p?un(u,1):[]}function gde(u){var p=u==null?0:u.length;return p?un(u,L):[]}function bde(u,p){var w=u==null?0:u.length;return w?(p=p===r?1:ht(p),un(u,p)):[]}function vde(u){for(var p=-1,w=u==null?0:u.length,I={};++p<w;){var z=u[p];_i(I,z[0],z[1])}return I}function eO(u){return u&&u.length?u[0]:r}function yde(u,p,w){var I=u==null?0:u.length;if(!I)return-1;var z=w==null?0:ht(w);return z<0&&(z=Xr(I+z,0)),Su(u,p,z)}function xde(u){var p=u==null?0:u.length;return p?No(u,0,-1):[]}var wde=kt(function(u){var p=br(u,Bw);return p.length&&p[0]===u[0]?_w(p):[]}),Cde=kt(function(u){var p=Do(u),w=br(u,Bw);return p===Do(w)?p=r:w.pop(),w.length&&w[0]===u[0]?_w(w,qe(p,2)):[]}),Sde=kt(function(u){var p=Do(u),w=br(u,Bw);return p=typeof p=="function"?p:r,p&&w.pop(),w.length&&w[0]===u[0]?_w(w,r,p):[]});function kde(u,p){return u==null?"":xue.call(u,p)}function Do(u){var p=u==null?0:u.length;return p?u[p-1]:r}function Pde(u,p,w){var I=u==null?0:u.length;if(!I)return-1;var z=I;return w!==r&&(z=ht(w),z=z<0?Xr(I+z,0):mn(z,I-1)),p===p?oue(u,p,z):Xh(u,MM,z,!0)}function Ede(u,p){return u&&u.length?d7(u,ht(p)):r}var Tde=kt(tO);function tO(u,p){return u&&u.length&&p&&p.length?Dw(u,p):u}function Ade(u,p,w){return u&&u.length&&p&&p.length?Dw(u,p,qe(w,2)):u}function _de(u,p,w){return u&&u.length&&p&&p.length?Dw(u,p,r,w):u}var $de=ss(function(u,p){var w=u==null?0:u.length,I=Pw(u,p);return h7(u,br(p,function(z){return as(z,w)?+z:z}).sort(k7)),I});function Ide(u,p){var w=[];if(!(u&&u.length))return w;var I=-1,z=[],G=u.length;for(p=qe(p,3);++I<G;){var J=u[I];p(J,I,u)&&(w.push(J),z.push(I))}return h7(u,z),w}function Qw(u){return u==null?u:kue.call(u)}function Nde(u,p,w){var I=u==null?0:u.length;return I?(w&&typeof w!="number"&&Nn(u,p,w)?(p=0,w=I):(p=p==null?0:ht(p),w=w===r?I:ht(w)),No(u,p,w)):[]}function Dde(u,p){return vm(u,p)}function Mde(u,p,w){return jw(u,p,qe(w,2))}function Ode(u,p){var w=u==null?0:u.length;if(w){var I=vm(u,p);if(I<w&&ni(u[I],p))return I}return-1}function jde(u,p){return vm(u,p,!0)}function Lde(u,p,w){return jw(u,p,qe(w,2),!0)}function Fde(u,p){var w=u==null?0:u.length;if(w){var I=vm(u,p,!0)-1;if(ni(u[I],p))return I}return-1}function Bde(u){return u&&u.length?g7(u):[]}function zde(u,p){return u&&u.length?g7(u,qe(p,2)):[]}function Kde(u){var p=u==null?0:u.length;return p?No(u,1,p):[]}function Vde(u,p,w){return u&&u.length?(p=w||p===r?1:ht(p),No(u,0,p<0?0:p)):[]}function Rde(u,p,w){var I=u==null?0:u.length;return I?(p=w||p===r?1:ht(p),p=I-p,No(u,p<0?0:p,I)):[]}function Wde(u,p){return u&&u.length?ym(u,qe(p,3),!1,!0):[]}function Ude(u,p){return u&&u.length?ym(u,qe(p,3)):[]}var Hde=kt(function(u){return ha(un(u,1,Mr,!0))}),qde=kt(function(u){var p=Do(u);return Mr(p)&&(p=r),ha(un(u,1,Mr,!0),qe(p,2))}),Gde=kt(function(u){var p=Do(u);return p=typeof p=="function"?p:r,ha(un(u,1,Mr,!0),r,p)});function Zde(u){return u&&u.length?ha(u):[]}function Yde(u,p){return u&&u.length?ha(u,qe(p,2)):[]}function Jde(u,p){return p=typeof p=="function"?p:r,u&&u.length?ha(u,r,p):[]}function eC(u){if(!(u&&u.length))return[];var p=0;return u=ua(u,function(w){if(Mr(w))return p=Xr(w.length,p),!0}),bw(p,function(w){return br(u,hw(w))})}function rO(u,p){if(!(u&&u.length))return[];var w=eC(u);return p==null?w:br(w,function(I){return no(p,r,I)})}var Xde=kt(function(u,p){return Mr(u)?bd(u,p):[]}),Qde=kt(function(u){return Fw(ua(u,Mr))}),efe=kt(function(u){var p=Do(u);return Mr(p)&&(p=r),Fw(ua(u,Mr),qe(p,2))}),tfe=kt(function(u){var p=Do(u);return p=typeof p=="function"?p:r,Fw(ua(u,Mr),r,p)}),rfe=kt(eC);function nfe(u,p){return x7(u||[],p||[],gd)}function ofe(u,p){return x7(u||[],p||[],xd)}var ife=kt(function(u){var p=u.length,w=p>1?u[p-1]:r;return w=typeof w=="function"?(u.pop(),w):r,rO(u,w)});function nO(u){var p=q(u);return p.__chain__=!0,p}function sfe(u,p){return p(u),u}function Am(u,p){return p(u)}var afe=ss(function(u){var p=u.length,w=p?u[0]:0,I=this.__wrapped__,z=function(G){return Pw(G,u)};return p>1||this.__actions__.length||!(I instanceof Nt)||!as(w)?this.thru(z):(I=I.slice(w,+w+(p?1:0)),I.__actions__.push({func:Am,args:[z],thisArg:r}),new $o(I,this.__chain__).thru(function(G){return p&&!G.length&&G.push(r),G}))});function lfe(){return nO(this)}function ufe(){return new $o(this.value(),this.__chain__)}function cfe(){this.__values__===r&&(this.__values__=bO(this.value()));var u=this.__index__>=this.__values__.length,p=u?r:this.__values__[this.__index__++];return{done:u,value:p}}function dfe(){return this}function ffe(u){for(var p,w=this;w instanceof pm;){var I=Y7(w);I.__index__=0,I.__values__=r,p?z.__wrapped__=I:p=I;var z=I;w=w.__wrapped__}return z.__wrapped__=u,p}function pfe(){var u=this.__wrapped__;if(u instanceof Nt){var p=u;return this.__actions__.length&&(p=new Nt(this)),p=p.reverse(),p.__actions__.push({func:Am,args:[Qw],thisArg:r}),new $o(p,this.__chain__)}return this.thru(Qw)}function hfe(){return y7(this.__wrapped__,this.__actions__)}var mfe=xm(function(u,p,w){Ht.call(u,w)?++u[w]:_i(u,w,1)});function gfe(u,p,w){var I=ct(u)?NM:sce;return w&&Nn(u,p,w)&&(p=r),I(u,qe(p,3))}function bfe(u,p){var w=ct(u)?ua:r7;return w(u,qe(p,3))}var vfe=$7(J7),yfe=$7(X7);function xfe(u,p){return un(_m(u,p),1)}function wfe(u,p){return un(_m(u,p),L)}function Cfe(u,p,w){return w=w===r?1:ht(w),un(_m(u,p),w)}function oO(u,p){var w=ct(u)?oo:pa;return w(u,qe(p,3))}function iO(u,p){var w=ct(u)?Kle:t7;return w(u,qe(p,3))}var Sfe=xm(function(u,p,w){Ht.call(u,w)?u[w].push(p):_i(u,w,[p])});function kfe(u,p,w,I){u=Rn(u)?u:Ou(u),w=w&&!I?ht(w):0;var z=u.length;return w<0&&(w=Xr(z+w,0)),Mm(u)?w<=z&&u.indexOf(p,w)>-1:!!z&&Su(u,p,w)>-1}var Pfe=kt(function(u,p,w){var I=-1,z=typeof p=="function",G=Rn(u)?ce(u.length):[];return pa(u,function(J){G[++I]=z?no(p,J,w):vd(J,p,w)}),G}),Efe=xm(function(u,p,w){_i(u,w,p)});function _m(u,p){var w=ct(u)?br:l7;return w(u,qe(p,3))}function Tfe(u,p,w,I){return u==null?[]:(ct(p)||(p=p==null?[]:[p]),w=I?r:w,ct(w)||(w=w==null?[]:[w]),f7(u,p,w))}var Afe=xm(function(u,p,w){u[w?0:1].push(p)},function(){return[[],[]]});function _fe(u,p,w){var I=ct(u)?fw:jM,z=arguments.length<3;return I(u,qe(p,4),w,z,pa)}function $fe(u,p,w){var I=ct(u)?Vle:jM,z=arguments.length<3;return I(u,qe(p,4),w,z,t7)}function Ife(u,p){var w=ct(u)?ua:r7;return w(u,Nm(qe(p,3)))}function Nfe(u){var p=ct(u)?JM:kce;return p(u)}function Dfe(u,p,w){(w?Nn(u,p,w):p===r)?p=1:p=ht(p);var I=ct(u)?tce:Pce;return I(u,p)}function Mfe(u){var p=ct(u)?rce:Tce;return p(u)}function Ofe(u){if(u==null)return 0;if(Rn(u))return Mm(u)?Pu(u):u.length;var p=gn(u);return p==be||p==xe?u.size:Iw(u).length}function jfe(u,p,w){var I=ct(u)?pw:Ace;return w&&Nn(u,p,w)&&(p=r),I(u,qe(p,3))}var Lfe=kt(function(u,p){if(u==null)return[];var w=p.length;return w>1&&Nn(u,p[0],p[1])?p=[]:w>2&&Nn(p[0],p[1],p[2])&&(p=[p[0]]),f7(u,un(p,1),[])}),$m=bue||function(){return ln.Date.now()};function Ffe(u,p){if(typeof p!="function")throw new _o(s);return u=ht(u),function(){if(--u<1)return p.apply(this,arguments)}}function sO(u,p,w){return p=w?r:p,p=u&&p==null?u.length:p,is(u,N,r,r,r,r,p)}function aO(u,p){var w;if(typeof p!="function")throw new _o(s);return u=ht(u),function(){return--u>0&&(w=p.apply(this,arguments)),u<=1&&(p=r),w}}var tC=kt(function(u,p,w){var I=C;if(w.length){var z=da(w,Du(tC));I|=$}return is(u,I,p,w,z)}),lO=kt(function(u,p,w){var I=C|S;if(w.length){var z=da(w,Du(lO));I|=$}return is(p,I,u,w,z)});function uO(u,p,w){p=w?r:p;var I=is(u,P,r,r,r,r,r,p);return I.placeholder=uO.placeholder,I}function cO(u,p,w){p=w?r:p;var I=is(u,E,r,r,r,r,r,p);return I.placeholder=cO.placeholder,I}function dO(u,p,w){var I,z,G,J,ee,se,he=0,me=!1,Ce=!1,De=!0;if(typeof u!="function")throw new _o(s);p=Mo(p)||0,Pr(w)&&(me=!!w.leading,Ce="maxWait"in w,G=Ce?Xr(Mo(w.maxWait)||0,p):G,De="trailing"in w?!!w.trailing:De);function Re(Or){var oi=I,cs=z;return I=z=r,he=Or,J=u.apply(cs,oi),J}function Ge(Or){return he=Or,ee=Sd(_t,p),me?Re(Or):J}function gt(Or){var oi=Or-se,cs=Or-he,IO=p-oi;return Ce?mn(IO,G-cs):IO}function He(Or){var oi=Or-se,cs=Or-he;return se===r||oi>=p||oi<0||Ce&&cs>=G}function _t(){var Or=$m();if(He(Or))return Mt(Or);ee=Sd(_t,gt(Or))}function Mt(Or){return ee=r,De&&I?Re(Or):(I=z=r,J)}function lo(){ee!==r&&w7(ee),he=0,I=se=z=ee=r}function Dn(){return ee===r?J:Mt($m())}function uo(){var Or=$m(),oi=He(Or);if(I=arguments,z=this,se=Or,oi){if(ee===r)return Ge(se);if(Ce)return w7(ee),ee=Sd(_t,p),Re(se)}return ee===r&&(ee=Sd(_t,p)),J}return uo.cancel=lo,uo.flush=Dn,uo}var Bfe=kt(function(u,p){return e7(u,1,p)}),zfe=kt(function(u,p,w){return e7(u,Mo(p)||0,w)});function Kfe(u){return is(u,M)}function Im(u,p){if(typeof u!="function"||p!=null&&typeof p!="function")throw new _o(s);var w=function(){var I=arguments,z=p?p.apply(this,I):I[0],G=w.cache;if(G.has(z))return G.get(z);var J=u.apply(this,I);return w.cache=G.set(z,J)||G,J};return w.cache=new(Im.Cache||os),w}Im.Cache=os;function Nm(u){if(typeof u!="function")throw new _o(s);return function(){var p=arguments;switch(p.length){case 0:return!u.call(this);case 1:return!u.call(this,p[0]);case 2:return!u.call(this,p[0],p[1]);case 3:return!u.call(this,p[0],p[1],p[2])}return!u.apply(this,p)}}function Vfe(u){return aO(2,u)}var Rfe=_ce(function(u,p){p=p.length==1&&ct(p[0])?br(p[0],io(qe())):br(un(p,1),io(qe()));var w=p.length;return kt(function(I){for(var z=-1,G=mn(I.length,w);++z<G;)I[z]=p[z].call(this,I[z]);return no(u,this,I)})}),rC=kt(function(u,p){var w=da(p,Du(rC));return is(u,$,r,p,w)}),fO=kt(function(u,p){var w=da(p,Du(fO));return is(u,O,r,p,w)}),Wfe=ss(function(u,p){return is(u,D,r,r,r,p)});function Ufe(u,p){if(typeof u!="function")throw new _o(s);return p=p===r?p:ht(p),kt(u,p)}function Hfe(u,p){if(typeof u!="function")throw new _o(s);return p=p==null?0:Xr(ht(p),0),kt(function(w){var I=w[p],z=ga(w,0,p);return I&&ca(z,I),no(u,this,z)})}function qfe(u,p,w){var I=!0,z=!0;if(typeof u!="function")throw new _o(s);return Pr(w)&&(I="leading"in w?!!w.leading:I,z="trailing"in w?!!w.trailing:z),dO(u,p,{leading:I,maxWait:p,trailing:z})}function Gfe(u){return sO(u,1)}function Zfe(u,p){return rC(zw(p),u)}function Yfe(){if(!arguments.length)return[];var u=arguments[0];return ct(u)?u:[u]}function Jfe(u){return Io(u,b)}function Xfe(u,p){return p=typeof p=="function"?p:r,Io(u,b,p)}function Qfe(u){return Io(u,m|b)}function epe(u,p){return p=typeof p=="function"?p:r,Io(u,m|b,p)}function tpe(u,p){return p==null||QM(u,p,tn(p))}function ni(u,p){return u===p||u!==u&&p!==p}var rpe=km(Aw),npe=km(function(u,p){return u>=p}),bl=i7((function(){return arguments})())?i7:function(u){return _r(u)&&Ht.call(u,"callee")&&!UM.call(u,"callee")},ct=ce.isArray,ope=EM?io(EM):fce;function Rn(u){return u!=null&&Dm(u.length)&&!ls(u)}function Mr(u){return _r(u)&&Rn(u)}function ipe(u){return u===!0||u===!1||_r(u)&&In(u)==ue}var ba=yue||hC,spe=TM?io(TM):pce;function ape(u){return _r(u)&&u.nodeType===1&&!kd(u)}function lpe(u){if(u==null)return!0;if(Rn(u)&&(ct(u)||typeof u=="string"||typeof u.splice=="function"||ba(u)||Mu(u)||bl(u)))return!u.length;var p=gn(u);if(p==be||p==xe)return!u.size;if(Cd(u))return!Iw(u).length;for(var w in u)if(Ht.call(u,w))return!1;return!0}function upe(u,p){return yd(u,p)}function cpe(u,p,w){w=typeof w=="function"?w:r;var I=w?w(u,p):r;return I===r?yd(u,p,r,w):!!I}function nC(u){if(!_r(u))return!1;var p=In(u);return p==Se||p==ge||typeof u.message=="string"&&typeof u.name=="string"&&!kd(u)}function dpe(u){return typeof u=="number"&&qM(u)}function ls(u){if(!Pr(u))return!1;var p=In(u);return p==pe||p==we||p==le||p==Pe}function pO(u){return typeof u=="number"&&u==ht(u)}function Dm(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=Z}function Pr(u){var p=typeof u;return u!=null&&(p=="object"||p=="function")}function _r(u){return u!=null&&typeof u=="object"}var hO=AM?io(AM):mce;function fpe(u,p){return u===p||$w(u,p,qw(p))}function ppe(u,p,w){return w=typeof w=="function"?w:r,$w(u,p,qw(p),w)}function hpe(u){return mO(u)&&u!=+u}function mpe(u){if(Xce(u))throw new st(i);return s7(u)}function gpe(u){return u===null}function bpe(u){return u==null}function mO(u){return typeof u=="number"||_r(u)&&In(u)==re}function kd(u){if(!_r(u)||In(u)!=Ne)return!1;var p=sm(u);if(p===null)return!0;var w=Ht.call(p,"constructor")&&p.constructor;return typeof w=="function"&&w instanceof w&&rm.call(w)==pue}var oC=_M?io(_M):gce;function vpe(u){return pO(u)&&u>=-Z&&u<=Z}var gO=$M?io($M):bce;function Mm(u){return typeof u=="string"||!ct(u)&&_r(u)&&In(u)==Ie}function ao(u){return typeof u=="symbol"||_r(u)&&In(u)==et}var Mu=IM?io(IM):vce;function ype(u){return u===r}function xpe(u){return _r(u)&&gn(u)==lt}function wpe(u){return _r(u)&&In(u)==Ut}var Cpe=km(Nw),Spe=km(function(u,p){return u<=p});function bO(u){if(!u)return[];if(Rn(u))return Mm(u)?ei(u):Vn(u);if(dd&&u[dd])return tue(u[dd]());var p=gn(u),w=p==be?yw:p==xe?Qh:Ou;return w(u)}function us(u){if(!u)return u===0?u:0;if(u=Mo(u),u===L||u===-L){var p=u<0?-1:1;return p*T}return u===u?u:0}function ht(u){var p=us(u),w=p%1;return p===p?w?p-w:p:0}function vO(u){return u?pl(ht(u),0,_):0}function Mo(u){if(typeof u=="number")return u;if(ao(u))return F;if(Pr(u)){var p=typeof u.valueOf=="function"?u.valueOf():u;u=Pr(p)?p+"":p}if(typeof u!="string")return u===0?u:+u;u=LM(u);var w=yu.test(u);return w||il.test(u)?Fle(u.slice(2),w?2:8):an.test(u)?F:+u}function yO(u){return Ii(u,Wn(u))}function kpe(u){return u?pl(ht(u),-Z,Z):u===0?u:0}function qt(u){return u==null?"":so(u)}var Ppe=Iu(function(u,p){if(Cd(p)||Rn(p)){Ii(p,tn(p),u);return}for(var w in p)Ht.call(p,w)&&gd(u,w,p[w])}),xO=Iu(function(u,p){Ii(p,Wn(p),u)}),wO=Iu(function(u,p,w,I){Ii(p,Wn(p),u,I)}),iC=Iu(function(u,p,w,I){Ii(p,tn(p),u,I)}),Epe=ss(Pw);function Tpe(u,p){var w=$u(u);return p==null?w:XM(w,p)}var Ape=kt(function(u,p){u=tr(u);var w=-1,I=p.length,z=I>2?p[2]:r;for(z&&Nn(p[0],p[1],z)&&(I=1);++w<I;)for(var G=p[w],J=Wn(G),ee=-1,se=J.length;++ee<se;){var he=J[ee],me=u[he];(me===r||ni(me,Tu[he])&&!Ht.call(u,he))&&(u[he]=G[he])}return u}),_pe=kt(function(u){return u.push(r,L7),no(CO,r,u)});function $pe(u,p){return DM(u,qe(p,3),$i)}function Ipe(u,p){return DM(u,qe(p,3),Tw)}function Npe(u,p){return u==null?u:Ew(u,qe(p,3),Wn)}function Dpe(u,p){return u==null?u:n7(u,qe(p,3),Wn)}function Mpe(u,p){return u&&$i(u,qe(p,3))}function Ope(u,p){return u&&Tw(u,qe(p,3))}function jpe(u){return u==null?[]:gm(u,tn(u))}function Lpe(u){return u==null?[]:gm(u,Wn(u))}function sC(u,p,w){var I=u==null?r:hl(u,p);return I===r?w:I}function Fpe(u,p){return u!=null&&z7(u,p,lce)}function aC(u,p){return u!=null&&z7(u,p,uce)}var Bpe=N7(function(u,p,w){p!=null&&typeof p.toString!="function"&&(p=nm.call(p)),u[p]=w},uC(Un)),zpe=N7(function(u,p,w){p!=null&&typeof p.toString!="function"&&(p=nm.call(p)),Ht.call(u,p)?u[p].push(w):u[p]=[w]},qe),Kpe=kt(vd);function tn(u){return Rn(u)?YM(u):Iw(u)}function Wn(u){return Rn(u)?YM(u,!0):yce(u)}function Vpe(u,p){var w={};return p=qe(p,3),$i(u,function(I,z,G){_i(w,p(I,z,G),I)}),w}function Rpe(u,p){var w={};return p=qe(p,3),$i(u,function(I,z,G){_i(w,z,p(I,z,G))}),w}var Wpe=Iu(function(u,p,w){bm(u,p,w)}),CO=Iu(function(u,p,w,I){bm(u,p,w,I)}),Upe=ss(function(u,p){var w={};if(u==null)return w;var I=!1;p=br(p,function(G){return G=ma(G,u),I||(I=G.length>1),G}),Ii(u,Uw(u),w),I&&(w=Io(w,m|g|b,zce));for(var z=p.length;z--;)Lw(w,p[z]);return w});function Hpe(u,p){return SO(u,Nm(qe(p)))}var qpe=ss(function(u,p){return u==null?{}:wce(u,p)});function SO(u,p){if(u==null)return{};var w=br(Uw(u),function(I){return[I]});return p=qe(p),p7(u,w,function(I,z){return p(I,z[0])})}function Gpe(u,p,w){p=ma(p,u);var I=-1,z=p.length;for(z||(z=1,u=r);++I<z;){var G=u==null?r:u[ri(p[I])];G===r&&(I=z,G=w),u=ls(G)?G.call(u):G}return u}function Zpe(u,p,w){return u==null?u:xd(u,p,w)}function Ype(u,p,w,I){return I=typeof I=="function"?I:r,u==null?u:xd(u,p,w,I)}var kO=O7(tn),PO=O7(Wn);function Jpe(u,p,w){var I=ct(u),z=I||ba(u)||Mu(u);if(p=qe(p,4),w==null){var G=u&&u.constructor;z?w=I?new G:[]:Pr(u)?w=ls(G)?$u(sm(u)):{}:w={}}return(z?oo:$i)(u,function(J,ee,se){return p(w,J,ee,se)}),w}function Xpe(u,p){return u==null?!0:Lw(u,p)}function Qpe(u,p,w){return u==null?u:v7(u,p,zw(w))}function ehe(u,p,w,I){return I=typeof I=="function"?I:r,u==null?u:v7(u,p,zw(w),I)}function Ou(u){return u==null?[]:vw(u,tn(u))}function the(u){return u==null?[]:vw(u,Wn(u))}function rhe(u,p,w){return w===r&&(w=p,p=r),w!==r&&(w=Mo(w),w=w===w?w:0),p!==r&&(p=Mo(p),p=p===p?p:0),pl(Mo(u),p,w)}function nhe(u,p,w){return p=us(p),w===r?(w=p,p=0):w=us(w),u=Mo(u),cce(u,p,w)}function ohe(u,p,w){if(w&&typeof w!="boolean"&&Nn(u,p,w)&&(p=w=r),w===r&&(typeof p=="boolean"?(w=p,p=r):typeof u=="boolean"&&(w=u,u=r)),u===r&&p===r?(u=0,p=1):(u=us(u),p===r?(p=u,u=0):p=us(p)),u>p){var I=u;u=p,p=I}if(w||u%1||p%1){var z=GM();return mn(u+z*(p-u+Lle("1e-"+((z+"").length-1))),p)}return Mw(u,p)}var ihe=Nu(function(u,p,w){return p=p.toLowerCase(),u+(w?EO(p):p)});function EO(u){return lC(qt(u).toLowerCase())}function TO(u){return u=qt(u),u&&u.replace(od,Yle).replace(Tle,"")}function she(u,p,w){u=qt(u),p=so(p);var I=u.length;w=w===r?I:pl(ht(w),0,I);var z=w;return w-=p.length,w>=0&&u.slice(w,z)==p}function ahe(u){return u=qt(u),u&&ki.test(u)?u.replace(Yr,Jle):u}function lhe(u){return u=qt(u),u&&St.test(u)?u.replace(Jo,"\\$&"):u}var uhe=Nu(function(u,p,w){return u+(w?"-":"")+p.toLowerCase()}),che=Nu(function(u,p,w){return u+(w?" ":"")+p.toLowerCase()}),dhe=_7("toLowerCase");function fhe(u,p,w){u=qt(u),p=ht(p);var I=p?Pu(u):0;if(!p||I>=p)return u;var z=(p-I)/2;return Sm(cm(z),w)+u+Sm(um(z),w)}function phe(u,p,w){u=qt(u),p=ht(p);var I=p?Pu(u):0;return p&&I<p?u+Sm(p-I,w):u}function hhe(u,p,w){u=qt(u),p=ht(p);var I=p?Pu(u):0;return p&&I<p?Sm(p-I,w)+u:u}function mhe(u,p,w){return w||p==null?p=0:p&&(p=+p),Sue(qt(u).replace(Xo,""),p||0)}function ghe(u,p,w){return(w?Nn(u,p,w):p===r)?p=1:p=ht(p),Ow(qt(u),p)}function bhe(){var u=arguments,p=qt(u[0]);return u.length<3?p:p.replace(u[1],u[2])}var vhe=Nu(function(u,p,w){return u+(w?"_":"")+p.toLowerCase()});function yhe(u,p,w){return w&&typeof w!="number"&&Nn(u,p,w)&&(p=w=r),w=w===r?_:w>>>0,w?(u=qt(u),u&&(typeof p=="string"||p!=null&&!oC(p))&&(p=so(p),!p&&ku(u))?ga(ei(u),0,w):u.split(p,w)):[]}var xhe=Nu(function(u,p,w){return u+(w?" ":"")+lC(p)});function whe(u,p,w){return u=qt(u),w=w==null?0:pl(ht(w),0,u.length),p=so(p),u.slice(w,w+p.length)==p}function Che(u,p,w){var I=q.templateSettings;w&&Nn(u,p,w)&&(p=r),u=qt(u),p=iC({},p,I,j7);var z=iC({},p.imports,I.imports,j7),G=tn(z),J=vw(z,G);oo(G,function(He){if(Ei.test(He))throw new st(l)});var ee,se,he=0,me=p.interpolate||ts,Ce="__p += '",De=xw((p.escape||ts).source+"|"+me.source+"|"+(me===Ur?Qo:ts).source+"|"+(p.evaluate||ts).source+"|$","g"),Re="//# sourceURL="+(Ht.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nle+"]")+`
|
|
1669
1667
|
`;u.replace(De,function(He,_t,Mt,lo,Dn,uo){return Mt||(Mt=lo),Ce+=u.slice(he,uo).replace(sl,Xle),_t&&(ee=!0,Ce+=`' +
|
|
@@ -1682,4 +1680,4 @@ __p += '`),Mt&&(Ce+=`' +
|
|
|
1682
1680
|
function print() { __p += __j.call(arguments, '') }
|
|
1683
1681
|
`:`;
|
|
1684
1682
|
`)+Ce+`return __p
|
|
1685
|
-
}`;var gt=_O(function(){return Wt(G,Re+"return "+Ce).apply(r,J)});if(gt.source=Ce,nC(gt))throw gt;return gt}function She(u){return qt(u).toLowerCase()}function khe(u){return qt(u).toUpperCase()}function Phe(u,p,w){if(u=qt(u),u&&(w||p===r))return LM(u);if(!u||!(p=so(p)))return u;var I=ei(u),z=ei(p),G=FM(I,z),J=BM(I,z)+1;return ga(I,G,J).join("")}function Ehe(u,p,w){if(u=qt(u),u&&(w||p===r))return u.slice(0,KM(u)+1);if(!u||!(p=so(p)))return u;var I=ei(u),z=BM(I,ei(p))+1;return ga(I,0,z).join("")}function The(u,p,w){if(u=qt(u),u&&(w||p===r))return u.replace(Xo,"");if(!u||!(p=so(p)))return u;var I=ei(u),z=FM(I,ei(p));return ga(I,z).join("")}function Ahe(u,p){var w=V,I=R;if(Pr(p)){var z="separator"in p?p.separator:z;w="length"in p?ht(p.length):w,I="omission"in p?so(p.omission):I}u=qt(u);var G=u.length;if(ku(u)){var J=ei(u);G=J.length}if(w>=G)return u;var ee=w-Pu(I);if(ee<1)return I;var se=J?ga(J,0,ee).join(""):u.slice(0,ee);if(z===r)return se+I;if(J&&(ee+=se.length-ee),oC(z)){if(u.slice(ee).search(z)){var he,me=se;for(z.global||(z=xw(z.source,qt(vu.exec(z))+"g")),z.lastIndex=0;he=z.exec(me);)var Ce=he.index;se=se.slice(0,Ce===r?ee:Ce)}}else if(u.indexOf(so(z),ee)!=ee){var De=se.lastIndexOf(z);De>-1&&(se=se.slice(0,De))}return se+I}function _he(u){return u=qt(u),u&&en.test(u)?u.replace(er,iue):u}var $he=Nu(function(u,p,w){return u+(w?" ":"")+p.toUpperCase()}),lC=_7("toUpperCase");function AO(u,p,w){return u=qt(u),p=w?r:p,p===r?eue(u)?lue(u):Ule(u):u.match(p)||[]}var _O=kt(function(u,p){try{return no(u,r,p)}catch(w){return nC(w)?w:new st(w)}}),Ihe=ss(function(u,p){return oo(p,function(w){w=ri(w),_i(u,w,tC(u[w],u))}),u});function Nhe(u){var p=u==null?0:u.length,w=qe();return u=p?br(u,function(I){if(typeof I[1]!="function")throw new _o(s);return[w(I[0]),I[1]]}):[],kt(function(I){for(var z=-1;++z<p;){var G=u[z];if(no(G[0],this,I))return no(G[1],this,I)}})}function Dhe(u){return ice(Io(u,m))}function uC(u){return function(){return u}}function Mhe(u,p){return u==null||u!==u?p:u}var Ohe=I7(),jhe=I7(!0);function Un(u){return u}function cC(u){return a7(typeof u=="function"?u:Io(u,m))}function Lhe(u){return u7(Io(u,m))}function Fhe(u,p){return c7(u,Io(p,m))}var Bhe=kt(function(u,p){return function(w){return vd(w,u,p)}}),zhe=kt(function(u,p){return function(w){return vd(u,w,p)}});function dC(u,p,w){var I=tn(p),z=gm(p,I);w==null&&!(Pr(p)&&(z.length||!I.length))&&(w=p,p=u,u=this,z=gm(p,tn(p)));var G=!(Pr(w)&&"chain"in w)||!!w.chain,J=ls(u);return oo(z,function(ee){var se=p[ee];u[ee]=se,J&&(u.prototype[ee]=function(){var he=this.__chain__;if(G||he){var me=u(this.__wrapped__),Ce=me.__actions__=Vn(this.__actions__);return Ce.push({func:se,args:arguments,thisArg:u}),me.__chain__=he,me}return se.apply(u,ca([this.value()],arguments))})}),u}function Khe(){return ln._===this&&(ln._=hue),this}function fC(){}function Vhe(u){return u=ht(u),kt(function(p){return d7(p,u)})}var Rhe=Vw(br),Whe=Vw(NM),Uhe=Vw(pw);function $O(u){return Zw(u)?hw(ri(u)):Cce(u)}function Hhe(u){return function(p){return u==null?r:hl(u,p)}}var qhe=D7(),Ghe=D7(!0);function pC(){return[]}function hC(){return!1}function Zhe(){return{}}function Yhe(){return""}function Jhe(){return!0}function Xhe(u,p){if(u=ht(u),u<1||u>Z)return[];var w=_,I=mn(u,_);p=qe(p),u-=_;for(var z=bw(I,p);++w<u;)p(w);return z}function Qhe(u){return ct(u)?br(u,ri):ao(u)?[u]:Vn(Z7(qt(u)))}function eme(u){var p=++fue;return qt(u)+p}var tme=Cm(function(u,p){return u+p},0),rme=Rw("ceil"),nme=Cm(function(u,p){return u/p},1),ome=Rw("floor");function ime(u){return u&&u.length?mm(u,Un,Aw):r}function sme(u,p){return u&&u.length?mm(u,qe(p,2),Aw):r}function ame(u){return OM(u,Un)}function lme(u,p){return OM(u,qe(p,2))}function ume(u){return u&&u.length?mm(u,Un,Nw):r}function cme(u,p){return u&&u.length?mm(u,qe(p,2),Nw):r}var dme=Cm(function(u,p){return u*p},1),fme=Rw("round"),pme=Cm(function(u,p){return u-p},0);function hme(u){return u&&u.length?gw(u,Un):0}function mme(u,p){return u&&u.length?gw(u,qe(p,2)):0}return q.after=Ffe,q.ary=sO,q.assign=Ppe,q.assignIn=xO,q.assignInWith=wO,q.assignWith=iC,q.at=Epe,q.before=aO,q.bind=tC,q.bindAll=Ihe,q.bindKey=lO,q.castArray=Yfe,q.chain=nO,q.chunk=ide,q.compact=sde,q.concat=ade,q.cond=Nhe,q.conforms=Dhe,q.constant=uC,q.countBy=mfe,q.create=Tpe,q.curry=uO,q.curryRight=cO,q.debounce=dO,q.defaults=Ape,q.defaultsDeep=_pe,q.defer=Bfe,q.delay=zfe,q.difference=lde,q.differenceBy=ude,q.differenceWith=cde,q.drop=dde,q.dropRight=fde,q.dropRightWhile=pde,q.dropWhile=hde,q.fill=mde,q.filter=bfe,q.flatMap=xfe,q.flatMapDeep=wfe,q.flatMapDepth=Cfe,q.flatten=Q7,q.flattenDeep=gde,q.flattenDepth=bde,q.flip=Kfe,q.flow=Ohe,q.flowRight=jhe,q.fromPairs=vde,q.functions=jpe,q.functionsIn=Lpe,q.groupBy=Sfe,q.initial=xde,q.intersection=wde,q.intersectionBy=Cde,q.intersectionWith=Sde,q.invert=Bpe,q.invertBy=zpe,q.invokeMap=Pfe,q.iteratee=cC,q.keyBy=Efe,q.keys=tn,q.keysIn=Wn,q.map=_m,q.mapKeys=Vpe,q.mapValues=Rpe,q.matches=Lhe,q.matchesProperty=Fhe,q.memoize=Im,q.merge=Wpe,q.mergeWith=CO,q.method=Bhe,q.methodOf=zhe,q.mixin=dC,q.negate=Nm,q.nthArg=Vhe,q.omit=Upe,q.omitBy=Hpe,q.once=Vfe,q.orderBy=Tfe,q.over=Rhe,q.overArgs=Rfe,q.overEvery=Whe,q.overSome=Uhe,q.partial=rC,q.partialRight=fO,q.partition=Afe,q.pick=qpe,q.pickBy=SO,q.property=$O,q.propertyOf=Hhe,q.pull=Tde,q.pullAll=tO,q.pullAllBy=Ade,q.pullAllWith=_de,q.pullAt=$de,q.range=qhe,q.rangeRight=Ghe,q.rearg=Wfe,q.reject=Ife,q.remove=Ide,q.rest=Ufe,q.reverse=Qw,q.sampleSize=Dfe,q.set=Zpe,q.setWith=Ype,q.shuffle=Mfe,q.slice=Nde,q.sortBy=Lfe,q.sortedUniq=Bde,q.sortedUniqBy=zde,q.split=yhe,q.spread=Hfe,q.tail=Kde,q.take=Vde,q.takeRight=Rde,q.takeRightWhile=Wde,q.takeWhile=Ude,q.tap=sfe,q.throttle=qfe,q.thru=Am,q.toArray=bO,q.toPairs=kO,q.toPairsIn=PO,q.toPath=Qhe,q.toPlainObject=yO,q.transform=Jpe,q.unary=Gfe,q.union=Hde,q.unionBy=qde,q.unionWith=Gde,q.uniq=Zde,q.uniqBy=Yde,q.uniqWith=Jde,q.unset=Xpe,q.unzip=eC,q.unzipWith=rO,q.update=Qpe,q.updateWith=ehe,q.values=Ou,q.valuesIn=the,q.without=Xde,q.words=AO,q.wrap=Zfe,q.xor=Qde,q.xorBy=efe,q.xorWith=tfe,q.zip=rfe,q.zipObject=nfe,q.zipObjectDeep=ofe,q.zipWith=ife,q.entries=kO,q.entriesIn=PO,q.extend=xO,q.extendWith=wO,dC(q,q),q.add=tme,q.attempt=_O,q.camelCase=ihe,q.capitalize=EO,q.ceil=rme,q.clamp=rhe,q.clone=Jfe,q.cloneDeep=Qfe,q.cloneDeepWith=epe,q.cloneWith=Xfe,q.conformsTo=tpe,q.deburr=TO,q.defaultTo=Mhe,q.divide=nme,q.endsWith=she,q.eq=ni,q.escape=ahe,q.escapeRegExp=lhe,q.every=gfe,q.find=vfe,q.findIndex=J7,q.findKey=$pe,q.findLast=yfe,q.findLastIndex=X7,q.findLastKey=Ipe,q.floor=ome,q.forEach=oO,q.forEachRight=iO,q.forIn=Npe,q.forInRight=Dpe,q.forOwn=Mpe,q.forOwnRight=Ope,q.get=sC,q.gt=rpe,q.gte=npe,q.has=Fpe,q.hasIn=aC,q.head=eO,q.identity=Un,q.includes=kfe,q.indexOf=yde,q.inRange=nhe,q.invoke=Kpe,q.isArguments=bl,q.isArray=ct,q.isArrayBuffer=ope,q.isArrayLike=Rn,q.isArrayLikeObject=Mr,q.isBoolean=ipe,q.isBuffer=ba,q.isDate=spe,q.isElement=ape,q.isEmpty=lpe,q.isEqual=upe,q.isEqualWith=cpe,q.isError=nC,q.isFinite=dpe,q.isFunction=ls,q.isInteger=pO,q.isLength=Dm,q.isMap=hO,q.isMatch=fpe,q.isMatchWith=ppe,q.isNaN=hpe,q.isNative=mpe,q.isNil=bpe,q.isNull=gpe,q.isNumber=mO,q.isObject=Pr,q.isObjectLike=_r,q.isPlainObject=kd,q.isRegExp=oC,q.isSafeInteger=vpe,q.isSet=gO,q.isString=Mm,q.isSymbol=ao,q.isTypedArray=Mu,q.isUndefined=ype,q.isWeakMap=xpe,q.isWeakSet=wpe,q.join=kde,q.kebabCase=uhe,q.last=Do,q.lastIndexOf=Pde,q.lowerCase=che,q.lowerFirst=dhe,q.lt=Cpe,q.lte=Spe,q.max=ime,q.maxBy=sme,q.mean=ame,q.meanBy=lme,q.min=ume,q.minBy=cme,q.stubArray=pC,q.stubFalse=hC,q.stubObject=Zhe,q.stubString=Yhe,q.stubTrue=Jhe,q.multiply=dme,q.nth=Ede,q.noConflict=Khe,q.noop=fC,q.now=$m,q.pad=fhe,q.padEnd=phe,q.padStart=hhe,q.parseInt=mhe,q.random=ohe,q.reduce=_fe,q.reduceRight=$fe,q.repeat=ghe,q.replace=bhe,q.result=Gpe,q.round=fme,q.runInContext=ie,q.sample=Nfe,q.size=Ofe,q.snakeCase=vhe,q.some=jfe,q.sortedIndex=Dde,q.sortedIndexBy=Mde,q.sortedIndexOf=Ode,q.sortedLastIndex=jde,q.sortedLastIndexBy=Lde,q.sortedLastIndexOf=Fde,q.startCase=xhe,q.startsWith=whe,q.subtract=pme,q.sum=hme,q.sumBy=mme,q.template=Che,q.times=Xhe,q.toFinite=us,q.toInteger=ht,q.toLength=vO,q.toLower=She,q.toNumber=Mo,q.toSafeInteger=kpe,q.toString=qt,q.toUpper=khe,q.trim=Phe,q.trimEnd=Ehe,q.trimStart=The,q.truncate=Ahe,q.unescape=_he,q.uniqueId=eme,q.upperCase=$he,q.upperFirst=lC,q.each=oO,q.eachRight=iO,q.first=eO,dC(q,(function(){var u={};return $i(q,function(p,w){Ht.call(q.prototype,w)||(u[w]=p)}),u})(),{chain:!1}),q.VERSION=n,oo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){q[u].placeholder=q}),oo(["drop","take"],function(u,p){Nt.prototype[u]=function(w){w=w===r?1:Xr(ht(w),0);var I=this.__filtered__&&!p?new Nt(this):this.clone();return I.__filtered__?I.__takeCount__=mn(w,I.__takeCount__):I.__views__.push({size:mn(w,_),type:u+(I.__dir__<0?"Right":"")}),I},Nt.prototype[u+"Right"]=function(w){return this.reverse()[u](w).reverse()}}),oo(["filter","map","takeWhile"],function(u,p){var w=p+1,I=w==B||w==W;Nt.prototype[u]=function(z){var G=this.clone();return G.__iteratees__.push({iteratee:qe(z,3),type:w}),G.__filtered__=G.__filtered__||I,G}}),oo(["head","last"],function(u,p){var w="take"+(p?"Right":"");Nt.prototype[u]=function(){return this[w](1).value()[0]}}),oo(["initial","tail"],function(u,p){var w="drop"+(p?"":"Right");Nt.prototype[u]=function(){return this.__filtered__?new Nt(this):this[w](1)}}),Nt.prototype.compact=function(){return this.filter(Un)},Nt.prototype.find=function(u){return this.filter(u).head()},Nt.prototype.findLast=function(u){return this.reverse().find(u)},Nt.prototype.invokeMap=kt(function(u,p){return typeof u=="function"?new Nt(this):this.map(function(w){return vd(w,u,p)})}),Nt.prototype.reject=function(u){return this.filter(Nm(qe(u)))},Nt.prototype.slice=function(u,p){u=ht(u);var w=this;return w.__filtered__&&(u>0||p<0)?new Nt(w):(u<0?w=w.takeRight(-u):u&&(w=w.drop(u)),p!==r&&(p=ht(p),w=p<0?w.dropRight(-p):w.take(p-u)),w)},Nt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Nt.prototype.toArray=function(){return this.take(_)},$i(Nt.prototype,function(u,p){var w=/^(?:filter|find|map|reject)|While$/.test(p),I=/^(?:head|last)$/.test(p),z=q[I?"take"+(p=="last"?"Right":""):p],G=I||/^find/.test(p);z&&(q.prototype[p]=function(){var J=this.__wrapped__,ee=I?[1]:arguments,se=J instanceof Nt,he=ee[0],me=se||ct(J),Ce=function(_t){var Mt=z.apply(q,ca([_t],ee));return I&&De?Mt[0]:Mt};me&&w&&typeof he=="function"&&he.length!=1&&(se=me=!1);var De=this.__chain__,Re=!!this.__actions__.length,Ge=G&&!De,gt=se&&!Re;if(!G&&me){J=gt?J:new Nt(this);var He=u.apply(J,ee);return He.__actions__.push({func:Am,args:[Ce],thisArg:r}),new $o(He,De)}return Ge&>?u.apply(this,ee):(He=this.thru(Ce),Ge?I?He.value()[0]:He.value():He)})}),oo(["pop","push","shift","sort","splice","unshift"],function(u){var p=em[u],w=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",I=/^(?:pop|shift)$/.test(u);q.prototype[u]=function(){var z=arguments;if(I&&!this.__chain__){var G=this.value();return p.apply(ct(G)?G:[],z)}return this[w](function(J){return p.apply(ct(J)?J:[],z)})}}),$i(Nt.prototype,function(u,p){var w=q[p];if(w){var I=w.name+"";Ht.call(_u,I)||(_u[I]=[]),_u[I].push({name:p,func:w})}}),_u[wm(r,S).name]=[{name:"wrapper",func:r}],Nt.prototype.clone=$ue,Nt.prototype.reverse=Iue,Nt.prototype.value=Nue,q.prototype.at=afe,q.prototype.chain=lfe,q.prototype.commit=ufe,q.prototype.next=cfe,q.prototype.plant=ffe,q.prototype.reverse=pfe,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=hfe,q.prototype.first=q.prototype.head,dd&&(q.prototype[dd]=dfe),q}),Eu=uue();ul?((ul.exports=Eu)._=Eu,uw._=Eu):ln._=Eu}).call(Jae)})(td,td.exports)),td.exports}var fM=Xae();function Qae({monthlyFees:e,baseMonthlyFee:t,lifetimeMonthlyFee:r}){const n=fM.orderBy(fM.uniq(e),c=>c,"desc"),o=e.filter(c=>c===e[0]).length,i=n.length>1||n[0]!==t,s=t>r,a=Ve(t,{symbol:"",dashed:!0}),l=Ve(s?r:n[n.length-1],{symbol:"",dashed:!0});return{normalPrice:a,promotionPrice:i||s?l:void 0,text:i&&!s?Ee.t("format.firstMonth",{count:o}):null}}function pM({bundleSet:e,oneLiner:t,classNames:r}){const{t:n}=Je(),o=Qae(e),i=!!o.promotionPrice;return t&&i?h.jsxs("span",{className:"text-sm text-right whitespace-nowrap text-success",children:[o.text," ",n("format.for")," ",o.promotionPrice]}):t&&!i?h.jsxs("span",{className:"text-sm text-right whitespace-nowrap text-foreground-500",children:[n("format.startingFrom")," ",o.normalPrice]}):!i&&!o.normalPrice?null:h.jsxs("div",{className:A("flex flex-col",r?.base),children:[h.jsxs("div",{className:A("flex flex-row justify-end items-baseline gap-2",r?.wrapper),children:[h.jsx("span",{className:A("text-base text-foreground whitespace-nowrap font-medium",i&&"line-through text-foreground-500 font-normal",r?.normalPrice),children:o.normalPrice}),o.promotionPrice&&h.jsx("span",{className:A("text-base font-semibold whitespace-nowrap text-success-600",r?.promotionPrice),children:o.promotionPrice})]}),o.text&&h.jsx("span",{className:A("text-xs text-right whitespace-nowrap text-success-600 font-medium",r?.promotionText),children:o.text})]})}function hM({bundleTypeSet:e,bundleSets:t,selectedUnitKeys:r,hasPrice:n,onChange:o,classNames:i}){const{openModal:s}=Qt(),{onAction:a}=gi(),[l,c]=Fn();return h.jsx(Zae,{classNames:i,options:t.map(d=>{const f=uM(d),{title:m,subtitle:g}=cM(d.name),b=n||d.baseMonthlyFee!==d.lifetimeMonthlyFee;return{value:d.unitKey,label:h.jsxs("div",{className:"w-full flex flex-row justify-between",children:[h.jsxs("div",{className:A("w-full flex flex-row justify-between items-center gap-2 py-4 pr-4",d.imageUrl&&"pr-2",d.imageUrl&&b&&"flex-col items-start justify-center gap-0"),children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[f&&h.jsx("span",{className:"text-base text-foreground-400 line-through",children:f}),h.jsxs("span",{className:A("text-base font-medium text-foreground",i?.checkbox?.label),children:[m,d.infoUrl&&h.jsx(Jd,{size:16,className:"mb-0.5 ml-1 inline-block shrink-0 text-foreground-500 relative z-10",onClick:y=>{y.preventDefault(),y.stopPropagation(),s(`content-${d.infoUrl}`),a({type:"bundle_info_viewed",bundleTypeSet:e,bundleSet:d})}})]})]}),h.jsxs("div",{className:"flex flex-col gap-2 empty:hidden",children:[g&&h.jsx("span",{className:"text-sm text-foreground-500",children:g}),d.usps.length>0&&h.jsx("ul",{children:d.usps.map(y=>h.jsxs("li",{className:"text-sm text-foreground-500 flex items-start gap-1",children:[h.jsx(ug,{size:16,className:"shrink-0 stroke-success-600 mt-0.5"}),y]},y))})]})]}),b&&h.jsx(pM,{bundleSet:d,classNames:i?.checkbox?.bundlePrice})]}),d.imageUrl&&h.jsx("div",{className:A("p-4 bg-primary-50",i?.checkbox?.imgWrapper),children:h.jsx(Ar,{src:l(d.imageUrl,100,100),srcSet:c(d.imageUrl,100,100),alt:d.name,width:100,height:100,className:A("object-contain min-w-25 min-h-25",i?.checkbox?.img)})})]})}}),value:r,onValueChange:d=>{const f=d.filter(g=>!r.includes(g))[0],m=r.filter(g=>!d.includes(g))[0];o(f||m)}})}const ele=6,tle=4;function rle({bundleTypeSet:e}){const{t}=Je(),{propositionKey:r,toggleBundleSet:n}=Xi(),{openModal:o}=Qt(),{bundleModal:i,bundleSelector:s}=vt(),a=e.bundleTypes.includes("channel")&&e.bundleSets.length>ele,l=r.unitKeys.filter(f=>f.includes(e.unitKey)),c=a?e.bundleSets.filter((f,m)=>l.includes(f.unitKey)||m<tle):e.bundleSets,d=!e.bundleSets.every(f=>f.monthlyFees[f.monthlyFees.length-1]===0);return h.jsxs(h.Fragment,{children:[h.jsx(hM,{bundleTypeSet:e,bundleSets:c,selectedUnitKeys:l,hasPrice:d,onChange:f=>n(f,e),classNames:{...s?.bundleTypeSetCheckboxGroup,wrapper:A(e.bundleSets.length>1&&"@min-xl:grid @min-xl:grid-cols-2",s?.bundleTypeSetCheckboxGroup?.wrapper),checkbox:{...s?.bundleTypeSetCheckboxGroup?.checkbox,base:A("p-0 overflow-hidden",s?.bundleTypeSetCheckboxGroup?.checkbox?.base),wrapper:A("ml-4",s?.bundleTypeSetCheckboxGroup?.checkbox?.wrapper)}}}),a&&h.jsxs(h.Fragment,{children:[h.jsx(hr,{className:A("font-medium text-primary-600 border-primary-600",s?.showMoreButton),onPress:()=>o(`bundle-type-set-${e.unitKey}`),color:"primary",variant:"flat",size:"md",radius:"full",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:t("propositionSelector.showMore")}),h.jsx(Yae,{title:e.name,unitKey:e.unitKey,classNames:i,children:h.jsx(hM,{bundleTypeSet:e,bundleSets:e.bundleSets,selectedUnitKeys:l,hasPrice:d,onChange:f=>n(f,e),classNames:{...s?.bundleTypeSetCheckboxGroup,checkbox:{...s?.bundleTypeSetCheckboxGroup?.checkbox,base:A("p-0 overflow-hidden",s?.bundleTypeSetCheckboxGroup?.checkbox?.base),wrapper:A("ml-4",s?.bundleTypeSetCheckboxGroup?.checkbox?.wrapper)}}})})]})]})}function nle({bundleTypeSet:e,onSelected:t}){const{t:r}=Je(),{propositionKey:n,toggleBundleSet:o}=Xi(),{bundleSelector:i}=vt(),{openModal:s}=Qt(),{onAction:a}=gi(),[l,c]=Fn(),d=e.bundleSets.find(y=>n.unitKeys.some(v=>v.includes(y.unitKey)))?.unitKey,f=!e.bundleSets.every(y=>y.monthlyFees[y.monthlyFees.length-1]===0),m={value:"none",label:h.jsx("div",{className:"text-base font-medium text-foreground py-4 pr-4",children:r("propositionSelector.none")})},g=e.bundleTypes.some(y=>["data","internet","tv"].includes(y))||e.bundleSets.some(y=>y.content.data>0),b=[...e.required?[]:[m],...e.bundleSets.map(y=>{const v=uM(y),{title:C,subtitle:S}=cM(y.name),k=f||y.baseMonthlyFee!==y.lifetimeMonthlyFee;return{value:y.unitKey,label:h.jsxs("div",{className:"w-full flex flex-row justify-between",children:[h.jsxs("div",{className:A("w-full flex flex-row justify-between gap-2 py-4 pr-4",y.imageUrl&&"pr-2",y.imageUrl&&k&&"flex-col items-start justify-center gap-0"),children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[v&&h.jsx("span",{className:"text-base text-foreground-400 line-through",children:v}),h.jsxs("span",{className:A("text-base font-medium text-foreground",i?.bundleTypeSetRadioGroup?.radio?.label),children:[C,y.infoUrl&&h.jsx(Jd,{size:16,className:"mb-0.5 ml-1 inline-block shrink-0 text-foreground-500 relative z-10",onClick:P=>{P.preventDefault(),P.stopPropagation(),s(`content-${y.infoUrl}`),a({type:"bundle_info_viewed",bundleTypeSet:e,bundleSet:y})}})]})]}),h.jsxs("div",{className:"flex flex-col gap-2 empty:hidden",children:[S&&h.jsx("span",{className:"text-sm text-foreground-500",children:S}),y.usps.length>0&&h.jsx("ul",{children:y.usps.map(P=>h.jsxs("li",{className:"text-sm text-foreground-500 flex items-start gap-1",children:[h.jsx(ug,{size:16,className:"shrink-0 stroke-success-600 mt-0.5"}),P]},P))}),e.bundleTypes.includes("tv")&&h.jsxs("span",{className:"text-sm text-foreground-500 flex items-center gap-1 whitespace-nowrap",children:[h.jsx(G4,{size:16,className:"shrink-0"}),y.content.channels.length,y.content.hdChannels.length>0&&` (${y.content.hdChannels.length} HD)`]}),e.bundleTypes.includes("internet")&&h.jsxs("span",{className:"text-sm text-foreground-500 flex items-center gap-1 whitespace-nowrap",children:[h.jsx(H4,{size:16,className:"shrink-0"}),y.content.dataSpeedDown/1e3," /"," ",y.content.dataSpeedUp/1e3," ",r("format.megabitPerSecond")]})]})]}),k&&h.jsx(pM,{bundleSet:y,classNames:i?.bundleTypeSetRadioGroup?.radio?.bundlePrice})]}),y.imageUrl&&h.jsx("div",{className:A("p-4 bg-primary-50",i?.bundleTypeSetRadioGroup?.radio?.imgWrapper),children:h.jsx(Ar,{src:l(y.imageUrl,100,100),srcSet:c(y.imageUrl,100,100),alt:y.name,width:100,height:100,className:A("object-contain min-w-25 min-h-25",i?.bundleTypeSetRadioGroup?.radio?.img)})})]})}})];return h.jsx(Rh,{options:b,value:d??"none",onValueChange:y=>{o(d&&y==="none"?d:y,e),t()},classNames:{...i?.bundleTypeSetRadioGroup,wrapper:A(!g&&b.length>1&&"@min-xl:grid @min-xl:grid-cols-2",i?.bundleTypeSetRadioGroup?.wrapper),radio:{...i?.bundleTypeSetRadioGroup?.radio,base:A("p-0 overflow-hidden",i?.bundleTypeSetRadioGroup?.radio?.base),wrapper:A("mt-4.5 ml-4",i?.bundleTypeSetRadioGroup?.radio?.wrapper)}}})}function ole({title:e,imageUrl:t,onClick:r}){const{bundleSelector:{collapsedBundleSet:n}={}}=vt(),[o,i]=Fn();return h.jsx(hr,{variant:"bordered",fullWidth:!0,disableAnimation:!0,disableRipple:!0,onPress:r,"aria-expanded":!1,"aria-label":e,className:A("h-auto justify-between gap-2 p-4 m-0 rounded-2xl border-medium border-primary whitespace-normal [&]:data-[hover=true]:opacity-100",n?.base),endContent:h.jsx(Z4,{size:24,className:A("shrink-0 stroke-primary",n?.icon)}),children:h.jsxs("div",{className:"flex flex-row items-center gap-2",children:[t&&h.jsx("div",{className:A("shrink-0",n?.imageWrapper),children:h.jsx(Ar,{src:o(t,48,48),srcSet:i(t,48,48),alt:e,width:48,height:48,className:A("object-contain",n?.image)})}),h.jsx("span",{className:A("text-base font-medium text-foreground text-left",n?.title),children:e})]})})}function ile({bundleTypeSets:e,indexOffset:t,collapsibleBundleTypeSets:r=[]}){const{propositionKey:n,propositionSelector:o,setPlanVariant:i}=Xi(),{t:s}=Je(),{bundleSelector:a}=vt(),{openModal:l}=Qt(),{onAction:c}=gi(),[d,f]=x.useState([]);return o?h.jsxs("div",{className:A("space-y-8",a?.base),children:[h.jsxs("div",{className:A("space-y-2",a?.contractTermGroup),children:[h.jsxs("h3",{className:A("text-base font-bold text-foreground flex items-center gap-2",a?.contractTermLabel),children:[h.jsx("span",{className:A("bg-primary text-background text-base rounded-full w-6 h-6 flex items-center justify-center shrink-0",a?.contractTermLabelNumber),children:t+1}),h.jsx("span",{children:s("propositionSelector.contractTerm")})]}),h.jsx(Rh,{orientation:"horizontal",options:o.planVariants.map(m=>({value:m.unitKey,label:h.jsx("span",{className:A("text-base font-medium text-foreground",a?.contractTermRadioGroup?.radio?.label),children:Jc(m.contractTerm)})})),value:n.planVariant(),onValueChange:m=>i(m),classNames:a?.contractTermRadioGroup})]}),e.map((m,g)=>{const b=r.includes(m.name)&&m.bundleSets.length>1,y=d.includes(m.unitKey),v=b?m.bundleSets.find(P=>n.unitKeys.some(E=>E.includes(P.unitKey))):void 0,C=b&&v&&!y;function S(){b&&f(P=>P.filter(E=>E!==m.unitKey))}function k(){f(P=>P.includes(m.unitKey)?P:[...P,m.unitKey])}return h.jsxs("div",{className:A("space-y-2",a?.bundleTypeSetGroup),children:[h.jsxs("h3",{className:A("text-base font-bold text-foreground flex items-center gap-2",a?.bundleTypeSetLabel),children:[h.jsx("span",{className:A("bg-primary text-background text-base rounded-full w-6 h-6 flex items-center justify-center shrink-0",a?.bundleTypeSetLabelNumber),children:g+2+t}),h.jsx("span",{children:m.name}),m.infoUrl&&h.jsx(Jd,{size:16,className:A("shrink-0 text-foreground-500 cursor-pointer",a?.bundleTypeSetLabelInfoIcon),onClick:()=>{l(`content-${m.infoUrl}`),c({type:"bundle_info_viewed",bundleTypeSet:m})}})]}),m.multiSelect?h.jsx(rle,{bundleTypeSet:m}):C?h.jsx(ole,{title:v.name,imageUrl:v.imageUrl,onClick:k}):h.jsx(nle,{bundleTypeSet:m,onSelected:S})]},m.unitKey)})]}):null}function sle({proposition:e}){const{extraCosts:t}=vt(),{t:r}=Je(),{productType:n,activationFee:o,installationFee:i,provider:s,planVariant:a}=e,l=n==="sim-only"&&a.contractType==="retention",c=r(n==="smartphone"?"propositionSelector.excludingShipping":"propositionSelector.freeShipping");return h.jsxs("div",{className:A("text-center text-sm text-foreground-400",t),children:[h.jsxs("span",{children:[!l&&c?`${c} | `:"",r("propositionSelector.includingVat")]}),h.jsx("br",{}),h.jsxs("span",{children:[s.name," ",r("propositionSelector.activationFee")," ",Ve(o,{symbol:"",dashed:!0})]}),n==="fixed"&&h.jsxs(h.Fragment,{children:[h.jsx("br",{}),h.jsxs("span",{children:[s.name," ",r("propositionSelector.installationFee")," ",Ve(i,{symbol:"",dashed:!0})]})]})]})}const ale=250;function lle(){const{t:e}=Je(),{handsetCreditSelector:t}=vt(),{propositionKey:r,propositionSelector:n,setHandsetCredit:o}=Xi(),i=r.handsetCredit(),[s,a]=x.useState(i),l=gp(s,700);if(x.useEffect(()=>{a(i)},[i]),zo(()=>{l&&o(l)},[l]),!n||n.handsetCreditKeys.length===0)return null;const c=nw(n.handsetCreditKeys,n.basePrice);if(c.length===0)return null;const d=c.find(({unitKey:v})=>v===s)??c[0],f=c.indexOf(d),m=[...c].reverse().find(({creditFee:v})=>v+n.creditFee<=ale)?.monthlyFee||0,g=c[c.length-1],b=g.price>0&&c[0].price!==g.creditFee,y=m>0&&g.monthlyFee>0?m/g.monthlyFee:0;return h.jsxs("div",{className:A("space-y-4",t?.base),children:[b&&h.jsx("p",{className:A("text-sm text-foreground-500",t?.handsetPriceInfo),children:e("handsetCreditSelector.handsetPriceInfo",{price:Ve(n.basePrice,{symbol:"€"})})}),h.jsxs("div",{className:A("flex justify-between items-center",t?.priceRow),children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:A("text-sm font-semibold",t?.oneTimeLabel),children:e("handsetCreditSelector.oneTime")}),h.jsx("span",{className:A("text-sm",t?.oneTimeValue),children:Ve(Math.max(0,d.price))})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:A("text-sm font-semibold",t?.monthlyLabel),children:e("handsetCreditSelector.monthly")}),h.jsx("span",{className:A("text-sm",t?.monthlyValue),children:Ve(d.monthlyFee)})]})]}),h.jsxs("div",{className:A("flex items-center gap-3",t?.sliderRow),children:[h.jsx(hr,{isIconOnly:!0,disableAnimation:!0,disableRipple:!0,size:"sm",variant:"bordered",radius:"md",isDisabled:f<=0,onPress:()=>{if(f<=0)return;const v=c[f-1].unitKey;a(v)},"aria-label":e("handsetCreditSelector.decrease"),className:t?.decrementButton,endContent:h.jsx("span",{className:"text-lg font-medium",children:"−"})}),h.jsxs("div",{className:"relative flex-1",children:[y>0&&h.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 h-3 rounded-l-full bg-success pointer-events-none",style:{width:`calc(${y*100}% - 5px)`}}),h.jsx(oh,{size:"sm",step:1,hideValue:!0,className:"flex-1",minValue:0,maxValue:c.length-1,value:c.indexOf(d),onChange:v=>{const C=typeof v=="number"?v:v[0];a(c[C].unitKey)},onChangeEnd:v=>{const C=typeof v=="number"?v:v[0];a(c[C].unitKey)},classNames:{track:A("h-3 data-[fill-start=true]:border-s-transparent",t?.slider?.track),filler:A("hidden",t?.slider?.filler),step:A("data-[in-range=true]:bg-content1 data-[in-range=false]:bg-content1",t?.slider?.step),thumb:A(t?.slider?.thumb)}})]}),h.jsx(hr,{isIconOnly:!0,disableAnimation:!0,disableRipple:!0,size:"sm",variant:"bordered",radius:"md",isDisabled:f>=c.length-1,onPress:()=>{if(f>=c.length-1)return;const v=c[f+1].unitKey;a(v)},"aria-label":e("handsetCreditSelector.increase"),className:t?.incrementButton,endContent:h.jsx("span",{className:"text-lg font-medium",children:"+"})})]}),h.jsx("p",{className:A("text-xs",m===0?"text-warning":"text-success",t?.creditCheckText),children:m===0?e("handsetCreditSelector.creditCheckRequired"):e("handsetCreditSelector.noCreditCheck",{from:Ve(c[0].monthlyFee),to:Ve(m)})})]})}function ule(){const e=vt();return h.jsxs("div",{className:"w-full grid grid-cols-1 lg:grid-cols-12 gap-6 mt-3 pointer-events-none",children:[h.jsxs("div",{className:A("space-y-8 lg:col-span-7",e?.mainContentWrapper),children:[h.jsx(Tr,{className:"w-full h-[200px] sm:h-[130px] rounded-large"}),h.jsxs("div",{className:A("space-y-2",e?.retentionSelector?.base),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsx(Tr,{className:"w-3/4 h-[16px] rounded-2xl"}),h.jsxs("div",{className:"w-full flex flex-row gap-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[52px] rounded-2xl"})]})]}),h.jsxs("div",{className:A("space-y-2",e?.modificationSelector?.base),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsx(Tr,{className:"w-3/4 h-[16px] rounded-2xl"}),h.jsxs("div",{className:"w-full flex flex-row gap-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[52px] rounded-2xl"})]})]}),h.jsxs("div",{className:A("space-y-8",e?.bundleSelector?.base),children:[h.jsxs("div",{className:A("space-y-2",e?.bundleSelector?.contractTermGroup),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsxs("div",{className:"w-full flex flex-row gap-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[52px] rounded-2xl"})]})]}),h.jsxs("div",{className:A("space-y-2",e?.bundleSelector?.bundleTypeSetGroup),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"})]})]})]})]}),h.jsx("div",{className:A("lg:col-span-5",e?.sidebarCard?.layoutWrapper),children:h.jsx(Tr,{className:A("w-full h-[250px] md:h-[300px] rounded-large",e?.sidebarCard?.base)})})]})}function cle({mobileProviderSlug:e}){const{t}=Je(),{profile:r,setProfile:n}=sn(),{openModal:o,isModalOpen:i}=Qt(),{profileButton:s,promotionList:a,modificationSelector:l}=vt(),{proposition:c}=Xi(),d=c?.productType==="fixed",f=e?`mobile/${e}`:void 0,m=kh(d?"fixed":"mobile"),g=PN(r.currentMobileProviders,m.otherBlocks),b=d?(r.currentMobileProviders||[]).some(S=>m.otherBlocks.some(k=>f?k.scope===S.scope&&k.scope===f:k.scope===S.scope)):m.fixedBlocks.some(S=>S.scope===r.currentFixedProviderScope)||r.currentFixedProviderScope==="other",y=i("combi-deal"),[v,C]=x.useState(b);return x.useEffect(()=>{C(b)},[b]),x.useEffect(()=>{y||b||C(!1)},[y]),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx(Rh,{orientation:"horizontal",options:[{value:"yes",label:t("propositionSelector.modificationYes")},{value:"no",label:t("propositionSelector.modificationNo")}],value:v?"yes":"no",onValueChange:S=>{if(C(S==="yes"),d&&f){n(S==="yes"?{currentMobileProviders:[{scope:f,value:"1"}]}:{currentMobileProviders:[]});return}S==="yes"&&!b&&o("combi-deal"),S==="no"&&n({currentMobileProviders:[],...d?{}:{currentFixedProviderScope:void 0}})},classNames:l?.radioGroup}),v&&!f&&h.jsx(ql,{title:t("profile.customerBenefit"),description:SN(m.fixedBlocks.map(S=>({slug:S.scope.split("/")[1]??"",name:S.provider.name})),g,r.currentFixedProviderScope,d),selected:b,onClick:()=>o("combi-deal"),Icon:qu,classNames:s}),h.jsx(Nh,{promotions:c?.modificationPromotions??[],classNames:a}),!f&&h.jsx(NN,{isFixed:d})]})}function dle(){const{t:e}=Je(),{profile:t,setProfile:r}=sn(),{isShadowRoot:n}=Zn(),{postcodeCheckForm:o}=vt(),[i,s]=x.useState(t.address?.postcode||""),[a,l]=x.useState(t.address?.number||""),[c,d]=x.useState(t.address?.numberAddon||""),[f,m]=x.useState(t.address?.street||""),[g,b]=x.useState(t.address?.city||""),{width:y}=xa(),v=y>=1024,C=x.useRef(!!(t.address?.street&&t.address?.city)),{isLoading:S}=Xi(),k=x.useCallback(M=>{M.street!==void 0&&m(M.street),M.city!==void 0&&b(M.city)},[]),{manual:P,isLoading:E,error:$}=jN(k,i,a,c,C.current);zo(()=>{!P&&(!i||!a)&&(m(""),b(""))},[i,a,P]);const O={inputWrapper:A("border-small",o?.input?.inputWrapper),input:A("absolute bottom-1.5",o?.input?.input),label:A("top-1.5",o?.input?.label)},N=x.useCallback(M=>{M.preventDefault();const V=new FormData(M.target),R={...Object.fromEntries(V.entries()),street:f,city:g},{success:K,data:j}=j1.safeParse(R);K&&(Zc({address:j}),r({address:j}))},[f,g,r]);function D(){n&&!v&&setTimeout(()=>window.scrollTo(0,0),150)}return h.jsxs("form",{id:"postcode-check-form-proposition-selector",className:A("flex flex-col gap-3",o?.container),onSubmit:N,children:[h.jsxs("div",{className:A("flex flex-row gap-2",o?.inputsContainer),children:[h.jsx(wi,{variant:"bordered",placeholder:"1234AB",radius:"sm",type:"text",inputMode:i.length<4?"numeric":"text",name:"postcode",autoComplete:"postal-code",value:i,onValueChange:M=>s(ON(M)),onFocus:D,classNames:O,maxLength:6,label:e("postcodeCheck.postalCode"),endContent:E?h.jsx(Xd,{size:20,className:"animate-spin stroke-foreground-400 absolute right-2"}):null,isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"1",radius:"sm",type:"text",inputMode:"numeric",name:"number",autoComplete:"street-address",value:a,onValueChange:M=>l(M.replace(/\D/g,"")),onFocus:D,classNames:O,label:e("postcodeCheck.houseNumber"),endContent:E?h.jsx(Xd,{size:20,className:"animate-spin stroke-foreground-400 absolute right-2"}):null,isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"A",radius:"sm",type:"text",name:"numberAddon",value:c,onValueChange:M=>d(M.toUpperCase()),onFocus:D,classNames:O,endContent:E&&c.length>0?h.jsx(Xd,{size:20,className:"animate-spin stroke-foreground-400 absolute right-2"}):null,label:e("postcodeCheck.houseNumberAddition")})]}),$&&h.jsx(uu,{color:"danger",variant:"faded",title:$,hideIconWrapper:!0,classNames:o?.errorAlert}),h.jsx(hr,{type:"submit",form:"postcode-check-form-proposition-selector",className:A("font-medium gap-1 rounded-full",o?.ctaButton),color:"primary",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,spinner:h.jsx(Xd,{size:20,className:"animate-spin stroke-primary-foreground"}),isLoading:S,isDisabled:!i||!a||!f||!g||!!$||E||S,children:e("propositionSelector.postcodeCheckCTA")})]})}function mM(e){return e?e.sort((t,r)=>t.uniqueName.localeCompare(r.uniqueName)).sort((t,r)=>Number(r.sellWithoutSubscription)-Number(t.sellWithoutSubscription)).sort((t,r)=>+(r.stock.status==="backordered")-+(t.stock.status==="backordered")).sort((t,r)=>+(r.stock.status==="in_stock")-+(t.stock.status==="in_stock")):[]}function gM(e,t){const[r,n]=x.useState(0),o=x.useRef(null),i=x.useRef([]),s=x.useRef(null);x.useEffect(()=>{const d=o.current,f=i.current.some(g=>g!==null);return!d||e.length===0||!f?void 0:(s.current&&(s.current.disconnect(),s.current=null),s.current=new IntersectionObserver(g=>{g.forEach(b=>{if(b.isIntersecting&&b.intersectionRatio>.5){const y=i.current.indexOf(b.target);y!==-1&&n(y)}})},{root:null,threshold:.5,rootMargin:t?.rootMargin||"0px"}),i.current.filter(g=>g!==null).forEach(g=>{g&&s.current&&s.current.observe(g)}),()=>{s.current&&(s.current.disconnect(),s.current=null)})},[e.length,t?.rootMargin,t?.isOpen]);const a=x.useCallback(d=>{i.current[d]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[]),l=x.useCallback(()=>{r>0&&a(r-1)},[r,a]),c=x.useCallback(()=>{r<e.length-1&&a(r+1)},[r,e.length,a]);return{activeIndex:r,scrollContainerRef:o,imageRefs:i,scrollToImage:a,goToPrevious:l,goToNext:c}}function fle({title:e,images:t=[],classNames:r}){const[n,o]=Fn(),{popoverProps:i,isShadowRoot:s}=Zn(),{isModalOpen:a,openModal:l,closeModal:c}=Qt(),d=x.useMemo(()=>t.filter(S=>!!S.url),[t]),f=a("carousel"),{activeIndex:m,scrollContainerRef:g,imageRefs:b,scrollToImage:y,goToPrevious:v,goToNext:C}=gM(d,{rootMargin:"0px",isOpen:f});return x.useEffect(()=>{f&&setTimeout(()=>{y(0)},200)},[f,y]),!d||d.length===0?null:h.jsx(fi,{isOpen:f,onOpenChange:S=>S?l("carousel"):c("carousel"),placement:"bottom-center",scrollBehavior:"inside",size:"lg",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(r?.modal?.backdrop),wrapper:A(r?.modal?.wrapper),base:A("m-0 max-h-[90vh]",r?.modal?.base),header:A(r?.modal?.header),body:A("pt-0",r?.modal?.body),footer:A(r?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",r?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e}),h.jsxs(ai,{className:"flex flex-row items-center gap-1 lg:gap-3",children:[h.jsx("button",{type:"button",onClick:v,disabled:m===0,className:"disabled:opacity-30 not-disabled:hover:cursor-pointer disabled:cursor-not-allowed",children:h.jsx(lg,{className:"rotate-180"})}),h.jsx("div",{ref:g,className:"flex flex-1 overflow-x-auto gap-3 snap-x snap-mandatory scrollbar-hide",style:{scrollbarWidth:"none"},children:d.map((S,k)=>h.jsx("div",{ref:P=>{b.current[k]=P},className:"shrink-0 w-full h-full flex justify-center snap-center",children:h.jsx(Ar,{src:n(S.url,420,420),srcSet:o(S.url,420,420),alt:S.altText||"",classNames:{wrapper:A("mx-auto flex shrink-0 w-full",r?.imageWrapper),img:A("aspect-square drop-shadow-lg",r?.image)}})},S.url))}),h.jsx("button",{type:"button",onClick:C,disabled:m===d.length-1,className:"disabled:opacity-30 not-disabled:hover:cursor-pointer disabled:cursor-not-allowed",children:h.jsx(lg,{})})]}),h.jsx(Vi,{className:"justify-center",children:d.map((S,k)=>h.jsx(Fs,{onPress:()=>y(k),isPressable:!0,disableRipple:!0,disableAnimation:!0,className:A("size-12 p-2 bg-transparent",m===k&&"ring-2 ring-primary",r?.thumbnailCard),radius:"sm",shadow:"none",children:h.jsx(Ar,{className:A("size-8",r?.thumbnailImage),src:n(S.url,32,32),srcSet:o(S.url,32,32),alt:S.altText||"",radius:"sm"})},S.url))})]})})}const bM=3;function ple({modalTitle:e,images:t=[],classNames:r}){const[n,o]=Fn(),{openModal:i}=Qt(),s=x.useMemo(()=>t.filter(y=>!!y.url),[t]),{activeIndex:a,scrollContainerRef:l,imageRefs:c,scrollToImage:d}=gM(s),{width:f}=xa();if(!s||s.length===0)return null;const m=Math.max(0,s.length-bM),b=f>=1024?360:240;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:A("relative",r?.base),children:[h.jsx("div",{ref:l,className:"flex flex-1 overflow-x-auto snap-x snap-mandatory scrollbar-hide",style:{scrollbarWidth:"none"},children:s.map((y,v)=>h.jsx("div",{ref:C=>{c.current[v]=C},className:"shrink-0 w-full h-full flex justify-center snap-center",children:h.jsx(Ar,{src:n(y.url,b,b),srcSet:o(y.url,b,b),alt:y.altText||"",width:b,height:b,classNames:{wrapper:A("mx-auto flex shrink-0",r?.imageWrapper),img:A("aspect-square drop-shadow-lg",r?.image)}})},y.url))}),h.jsxs("div",{className:"absolute bottom-0 right-0 z-10 flex flex-col gap-2 justify-end items-center",children:[s.slice(0,bM).map((y,v)=>h.jsx(Fs,{onPress:()=>d(v),isPressable:!0,disableRipple:!0,disableAnimation:!0,className:A("size-12 lg:size-16 p-2 bg-transparent",a===v&&"ring-2 ring-primary",r?.thumbnailCard),radius:"sm",shadow:"none",children:h.jsx(Ar,{className:A("size-8 lg:size-12",r?.thumbnailImage),src:n(y.url,48,48),srcSet:o(y.url,48,48),alt:y.altText||"",radius:"sm"})},y.url)),m>0&&h.jsx(Fs,{className:A("size-8 lg:size-12 flex items-center justify-center bg-foreground text-sm font-medium text-white",r?.counter),onPress:()=>i("carousel"),isPressable:!0,disableRipple:!0,disableAnimation:!0,radius:"sm",shadow:"none",children:h.jsxs("span",{children:["+",m]})})]})]}),h.jsx(fle,{title:e,images:s,classNames:r?.modal})]})}function hle({onMoreBundleInfoClick:e}){const{productHeader:t}=vt(),{propositionKey:r,proposition:n}=Xi(),[o,i]=Fn(),{width:s}=xa();if(!n)return null;const a=s<768,l=a?70:140,c=a?35:70,d=n.tags.find(v=>v.type==="internet"),f=mM(n.product?.productVersions.filter(v=>v.providers?.some(C=>C?.slug===n.provider.slug))),m=r.productVersionId(),g=f.find(v=>v.id===m),b=n.productType==="smartphone"&&g;function y(){if(!n)return"";switch(n.productType){case"sim-only":return`${n.provider.name} ${Kn(n.content.data,Hu("format.gigabyte"))}`;case"smartphone":return Kn(n.content.data,Hu("format.gigabyte"));case"fixed":{const v=`${n.content.dataSpeedDown/1e3} ${Hu("format.megabitPerSecond")}`;return d?`${n.provider.name} ${Hu(`fixedInternet.${d.slug}`,{defaultValue:d.label})} ${v}`:`${n.provider.name} ${v}`}default:return""}}return h.jsxs(Fs,{disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("py-6 px-4 lg:p-6 flex flex-col gap-2 justify-center items-center",!b&&"items-start sm:flex-row-reverse sm:justify-between",t?.base),children:[b?h.jsx(ple,{modalTitle:g.fullName??"",images:g.media.carousel,classNames:t?.carousel}):h.jsx(Ar,{src:o(n.provider.imageUrl,160,80),srcSet:i(n.provider.imageUrl,160,80),alt:n.provider.name,width:160,height:80,classNames:{wrapper:A("mx-auto flex shrink-0 w-fit sm:mx-0",t?.providerImage?.wrapper),img:A("aspect-2/1",t?.providerImage?.img)}}),g&&h.jsx(F9,{productStockStatus:g.stock.status,classNames:t?.productStockStatus}),h.jsxs("div",{className:A("space-y-2 w-full",t?.propositionHeaderPromotionListWrapper),children:[h.jsx(Y1,{productTitle:n.product?.fullName,propositionTitle:y(),propositionSubtitle:n.productType==="fixed"?void 0:bu(n.content),propositionSpecifications:ea(n),imageUrl:n.provider.imageUrl,imageAlt:n.provider.name,hasProduct:n.productType==="smartphone",imageWidth:l,imageHeight:c,classNames:{...t?.propositionHeader,base:A("w-full",t?.propositionHeader?.base)}}),h.jsx(Nh,{promotions:W9(n.specialPromotions).filter(v=>!!v.shortDescription),urgentText:ra(n.specialPromotions),showUrgentTextInline:!0,isClickable:!0,classNames:t?.promotionList}),h.jsx(zh,{as:"button",underline:"hover",className:A("cursor-pointer text-sm",t?.moreBundleInfoLink),onPress:e,children:Hu("propositionSelector.moreBundleInfo")})]})]})}function mle(){const{propositionKey:e,proposition:t,setProductVersion:r}=Xi(),{versionSelect:n}=vt();if(!t)return null;const o=mM(t.product?.productVersions.filter(a=>a.providers?.some(l=>l?.slug===t.provider.slug))),i=e.productVersionId(),s=o.find(a=>a.id===i);return h.jsx(g$,{disabled:!t.product,versions:o,distinctProperties:t.product?.distinctProperties,selectedDistinctProperties:s?.distinctProperties,selectedPhone:t.product,onSelectionChange:(a,l)=>r(l),classNames:n})}function gle(){const{t:e}=Je(),{profile:t,setProfile:r}=sn(),{openModal:n,isModalOpen:o}=Qt(),{profileButton:i,retentionSelector:s}=vt(),a=L1(),l=!!(t.currentMsisdn&&t.currentProviderSlug),c=o("number-preservation");return x.useEffect(()=>{c||l||t.keepCurrentMsisdn&&r({keepCurrentMsisdn:!1})},[c]),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx(Rh,{orientation:"horizontal",options:[{value:"yes",label:e("propositionSelector.retentionYes")},{value:"no",label:e("propositionSelector.retentionNo")}],value:t.keepCurrentMsisdn?"yes":"no",onValueChange:d=>{r({keepCurrentMsisdn:d==="yes"}),d==="yes"&&!l&&n("number-preservation")},classNames:s?.radioGroup}),t.keepCurrentMsisdn&&h.jsx(ql,{title:e("profile.numberPreservation"),description:kN(t,a),selected:l,onClick:()=>n("number-preservation"),avatarName:"0 6",classNames:i}),h.jsx(MN,{})]})}function rd({title:e,description:t,number:r,classNames:n,children:o}){return h.jsxs("div",{className:A("space-y-2",n?.base),children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsxs("h3",{className:A("text-base font-bold text-foreground flex items-center gap-2",n?.title),children:[r&&h.jsx("span",{className:A("bg-primary text-background text-base rounded-full w-6 h-6 flex items-center justify-center shrink-0",n?.number),children:r}),h.jsx("span",{children:e})]})}),t&&h.jsx("p",{className:A("text-sm text-foreground-500",n?.description),children:t}),o]})}function ble({clickOutTarget:e="cart",contentBelowCTA:t=null,onReturnClick:r,onRender:n,addClickoutSearchParams:o,hideRetentionOnFilledProfile:i,collapsibleBundleTypeSets:s,loadingState:a,notFoundState:l,mobileProviderSlug:c}){const{t:d}=Je(),{isLoading:f,error:m,notFound:g,proposition:b,propositionSelector:y}=Xi(),{buildClickOutUrl:v}=Qc({addClickoutSearchParams:o}),C=vt(),{profile:S}=sn(),k=x.useRef(null),P=x.useRef(!1),[E,$]=x.useState(null),[O,N]=x.useState(!S.address),{openModal:D}=Qt(),{onAction:M}=gi(),[V,R]=Fn();if(x.useEffect(()=>{!n||f||!b||!y||P.current||(P.current=!0,n())},[f,n,b,y]),zo(()=>{!O||!S.address||f||b?.productType==="fixed"&&N(!1)},[f]),!b||!y){if(g)return h.jsxs("div",{className:C?.base,children:[r&&h.jsx(zh,{as:"div",underline:"hover",className:"cursor-pointer",onPress:r,children:d("propositionSelector.return")}),l??h.jsx(uu,{color:"warning",variant:"faded",title:d("propositionSelector.noMatchingPropositionTitle"),description:d("propositionSelector.noMatchingPropositionDescription"),hideIconWrapper:!0,classNames:{...C?.noMatchingPropositionAlert,base:A("mt-3",C?.noMatchingPropositionAlert?.base)}})]});if(!f)throw new Error(m??"Proposition or proposition selector not found");return h.jsxs("div",{className:C?.base,children:[r&&h.jsx(zh,{as:"div",underline:"hover",className:"cursor-pointer",onPress:r,children:d("propositionSelector.return")}),a??h.jsx(ule,{})]})}const K=()=>{v("/api/partner-cart",_=>{_.set("proposition-key",b.key),_.set("product-type",b.productType),_.set("redirect-pathname",e==="cart"?"/winkelwagen":e==="upsell"?"/slimme-keuze":"/bestellen")}).then(_=>{M({type:"add_to_cart",proposition:b}),window.open(_,"_blank")})},j=b.productType==="fixed",B=b.productType==="smartphone",U=S.keepCurrentMsisdn===!1||S.keepCurrentMsisdn===!0&&!!(S.currentMsisdn||S.currentProviderSlug),W=!!i&&U||j,L=j&&S.currentFixedProviderScope?.includes(b.provider.slug),Z=j&&O,T=y.bundleTypeSets.filter(_=>_.bundleSets.length>0),F=_=>W?B?_+1:_:B?_+2:_+1;return h.jsxs("div",{className:C?.base,children:[r&&h.jsx(zh,{as:"div",underline:"hover",className:"cursor-pointer",onPress:r,children:d("propositionSelector.return")}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 mt-3",children:[h.jsxs("div",{className:A("space-y-8 lg:col-span-7",C?.mainContentWrapper),children:[h.jsx(hle,{onMoreBundleInfoClick:()=>{M({type:"details_viewed",proposition:b,tab:"general"}),$({proposition:b,tab:"general"}),D("details")}}),L&&h.jsx(uu,{color:"warning",variant:"faded",title:d("propositionSelector.sameFixedProviderTitle",{providerName:b.provider.name}),description:d("propositionSelector.sameFixedProviderDescription",{providerName:b.provider.name}),hideIconWrapper:!0,classNames:C?.sameFixedProviderAlert}),B&&h.jsx(rd,{title:d("propositionSelector.productVersionTitle"),number:1,classNames:C?.versionSelect?.section,children:h.jsx(mle,{})}),!W&&h.jsx(rd,{title:d("propositionSelector.retentionTitle"),description:d("propositionSelector.retentionDescription"),number:F(0),classNames:C?.retentionSelector,children:h.jsx(gle,{})}),Z?h.jsx(rd,{title:d("propositionSelector.postcodeCheckTitle"),description:d("propositionSelector.postcodeCheckDescription"),number:1,classNames:C?.postcodeCheckForm?.section,children:h.jsx(dle,{})}):h.jsxs(h.Fragment,{children:[h.jsx(rd,{title:d("propositionSelector.modificationTitle"),description:j?c?d("propositionSelector.modificationLockedDescription",{providerName:lM[c]}):d("propositionSelector.modificationFixedDescription"):d("propositionSelector.modificationDescription"),number:F(1),classNames:C?.modificationSelector,children:h.jsx(cle,{mobileProviderSlug:c})}),h.jsx(ile,{bundleTypeSets:T,indexOffset:F(1),collapsibleBundleTypeSets:s})]}),B&&y.handsetCreditKeys.length>0&&h.jsxs(h.Fragment,{children:[h.jsx(rd,{title:d("propositionSelector.handsetCreditTitle"),number:F(T.length+3),classNames:C?.handsetCreditSelector?.section,children:h.jsx(lle,{})}),h.jsx(O9,{proposition:b})]})]}),h.jsxs("div",{className:A("h-fit lg:col-span-5 lg:sticky lg:top-6",C?.sidebarCard?.layoutWrapper),children:[h.jsxs(Fs,{disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("p-6 flex flex-col gap-4",C?.sidebarCard?.base),ref:k,children:[h.jsxs("div",{className:A("flex flex-row justify-between items-center",C?.sidebarCard?.titleWrapper),children:[h.jsx("h2",{className:A("text-2xl font-bold text-foreground",C?.sidebarCard?.title),children:d("propositionSelector.totalCostsOverviewTitle")}),h.jsx(Ar,{src:V(b.provider.imageUrl,100,50),srcSet:R(b.provider.imageUrl,100,50),alt:b.provider.name,width:100,height:50,classNames:{wrapper:A("shrink-0",C?.sidebarCard?.providerImage?.wrapper),img:A("aspect-2/1",C?.sidebarCard?.providerImage?.img)}})]}),h.jsx(zN,{proposition:b,classNames:{...C?.costOverview,monthlySection:A("mb-0",C?.costOverview?.monthlySection)}}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full",C?.sidebarCard?.ctaButton),color:"secondary",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,endContent:h.jsx(wa,{size:16}),onPress:K,isDisabled:L||Z,children:d("propositionSelector.cta")}),h.jsx(sle,{proposition:b})]}),t]}),h.jsx(gae,{triggerRef:k,monthlyFeePromotionText:Qs(b.monthlyFees,b.baseMonthlyFee,b.lifetimeMonthlyFee),monthlyFee:Ve(b.monthlyFees[0]?.fee,{dashed:!0}),productPrice:B?Ve(b.price,{dashed:!0}):void 0,isDisabled:L||Z,onClick:K})]}),h.jsx(Xc,{proposition:E?.proposition,defaultTab:E?.tab,buildClickOutUrl:v}),h.jsx(g6,{})]})}function vle({propositionKey:e,giftConfig:t,classNames:r,initialProfile:n,onProfileChange:o,onPropositionKeyChange:i,onError:s,onAction:a,filters:l,...c}){return h.jsx(y6,{onError:s,children:h.jsx(nE,{classNames:r,children:h.jsx(w6,{onAction:a,children:h.jsx($N,{initialProfile:n,onProfileChange:o,children:h.jsx(Gae,{propositionKey:e,giftConfig:t,filters:l,onPropositionKeyChange:i,children:h.jsx(iE,{children:h.jsx(ble,{...c,...t})})})})})})})}var yle=nR;const nd=Object.freeze(Object.defineProperty({__proto__:null,default:yle},Symbol.toStringTag,{value:"Module"}));Oo.ElementsRoot=PL,Oo.PROVIDERS=lM,Oo.ProductResults=fae,Oo.PropositionSelector=vle,Object.defineProperty(Oo,Symbol.toStringTag,{value:"Module"})}));
|
|
1683
|
+
}`;var gt=_O(function(){return Wt(G,Re+"return "+Ce).apply(r,J)});if(gt.source=Ce,nC(gt))throw gt;return gt}function She(u){return qt(u).toLowerCase()}function khe(u){return qt(u).toUpperCase()}function Phe(u,p,w){if(u=qt(u),u&&(w||p===r))return LM(u);if(!u||!(p=so(p)))return u;var I=ei(u),z=ei(p),G=FM(I,z),J=BM(I,z)+1;return ga(I,G,J).join("")}function Ehe(u,p,w){if(u=qt(u),u&&(w||p===r))return u.slice(0,KM(u)+1);if(!u||!(p=so(p)))return u;var I=ei(u),z=BM(I,ei(p))+1;return ga(I,0,z).join("")}function The(u,p,w){if(u=qt(u),u&&(w||p===r))return u.replace(Xo,"");if(!u||!(p=so(p)))return u;var I=ei(u),z=FM(I,ei(p));return ga(I,z).join("")}function Ahe(u,p){var w=V,I=R;if(Pr(p)){var z="separator"in p?p.separator:z;w="length"in p?ht(p.length):w,I="omission"in p?so(p.omission):I}u=qt(u);var G=u.length;if(ku(u)){var J=ei(u);G=J.length}if(w>=G)return u;var ee=w-Pu(I);if(ee<1)return I;var se=J?ga(J,0,ee).join(""):u.slice(0,ee);if(z===r)return se+I;if(J&&(ee+=se.length-ee),oC(z)){if(u.slice(ee).search(z)){var he,me=se;for(z.global||(z=xw(z.source,qt(vu.exec(z))+"g")),z.lastIndex=0;he=z.exec(me);)var Ce=he.index;se=se.slice(0,Ce===r?ee:Ce)}}else if(u.indexOf(so(z),ee)!=ee){var De=se.lastIndexOf(z);De>-1&&(se=se.slice(0,De))}return se+I}function _he(u){return u=qt(u),u&&en.test(u)?u.replace(er,iue):u}var $he=Nu(function(u,p,w){return u+(w?" ":"")+p.toUpperCase()}),lC=_7("toUpperCase");function AO(u,p,w){return u=qt(u),p=w?r:p,p===r?eue(u)?lue(u):Ule(u):u.match(p)||[]}var _O=kt(function(u,p){try{return no(u,r,p)}catch(w){return nC(w)?w:new st(w)}}),Ihe=ss(function(u,p){return oo(p,function(w){w=ri(w),_i(u,w,tC(u[w],u))}),u});function Nhe(u){var p=u==null?0:u.length,w=qe();return u=p?br(u,function(I){if(typeof I[1]!="function")throw new _o(s);return[w(I[0]),I[1]]}):[],kt(function(I){for(var z=-1;++z<p;){var G=u[z];if(no(G[0],this,I))return no(G[1],this,I)}})}function Dhe(u){return ice(Io(u,m))}function uC(u){return function(){return u}}function Mhe(u,p){return u==null||u!==u?p:u}var Ohe=I7(),jhe=I7(!0);function Un(u){return u}function cC(u){return a7(typeof u=="function"?u:Io(u,m))}function Lhe(u){return u7(Io(u,m))}function Fhe(u,p){return c7(u,Io(p,m))}var Bhe=kt(function(u,p){return function(w){return vd(w,u,p)}}),zhe=kt(function(u,p){return function(w){return vd(u,w,p)}});function dC(u,p,w){var I=tn(p),z=gm(p,I);w==null&&!(Pr(p)&&(z.length||!I.length))&&(w=p,p=u,u=this,z=gm(p,tn(p)));var G=!(Pr(w)&&"chain"in w)||!!w.chain,J=ls(u);return oo(z,function(ee){var se=p[ee];u[ee]=se,J&&(u.prototype[ee]=function(){var he=this.__chain__;if(G||he){var me=u(this.__wrapped__),Ce=me.__actions__=Vn(this.__actions__);return Ce.push({func:se,args:arguments,thisArg:u}),me.__chain__=he,me}return se.apply(u,ca([this.value()],arguments))})}),u}function Khe(){return ln._===this&&(ln._=hue),this}function fC(){}function Vhe(u){return u=ht(u),kt(function(p){return d7(p,u)})}var Rhe=Vw(br),Whe=Vw(NM),Uhe=Vw(pw);function $O(u){return Zw(u)?hw(ri(u)):Cce(u)}function Hhe(u){return function(p){return u==null?r:hl(u,p)}}var qhe=D7(),Ghe=D7(!0);function pC(){return[]}function hC(){return!1}function Zhe(){return{}}function Yhe(){return""}function Jhe(){return!0}function Xhe(u,p){if(u=ht(u),u<1||u>Z)return[];var w=_,I=mn(u,_);p=qe(p),u-=_;for(var z=bw(I,p);++w<u;)p(w);return z}function Qhe(u){return ct(u)?br(u,ri):ao(u)?[u]:Vn(Z7(qt(u)))}function eme(u){var p=++fue;return qt(u)+p}var tme=Cm(function(u,p){return u+p},0),rme=Rw("ceil"),nme=Cm(function(u,p){return u/p},1),ome=Rw("floor");function ime(u){return u&&u.length?mm(u,Un,Aw):r}function sme(u,p){return u&&u.length?mm(u,qe(p,2),Aw):r}function ame(u){return OM(u,Un)}function lme(u,p){return OM(u,qe(p,2))}function ume(u){return u&&u.length?mm(u,Un,Nw):r}function cme(u,p){return u&&u.length?mm(u,qe(p,2),Nw):r}var dme=Cm(function(u,p){return u*p},1),fme=Rw("round"),pme=Cm(function(u,p){return u-p},0);function hme(u){return u&&u.length?gw(u,Un):0}function mme(u,p){return u&&u.length?gw(u,qe(p,2)):0}return q.after=Ffe,q.ary=sO,q.assign=Ppe,q.assignIn=xO,q.assignInWith=wO,q.assignWith=iC,q.at=Epe,q.before=aO,q.bind=tC,q.bindAll=Ihe,q.bindKey=lO,q.castArray=Yfe,q.chain=nO,q.chunk=ide,q.compact=sde,q.concat=ade,q.cond=Nhe,q.conforms=Dhe,q.constant=uC,q.countBy=mfe,q.create=Tpe,q.curry=uO,q.curryRight=cO,q.debounce=dO,q.defaults=Ape,q.defaultsDeep=_pe,q.defer=Bfe,q.delay=zfe,q.difference=lde,q.differenceBy=ude,q.differenceWith=cde,q.drop=dde,q.dropRight=fde,q.dropRightWhile=pde,q.dropWhile=hde,q.fill=mde,q.filter=bfe,q.flatMap=xfe,q.flatMapDeep=wfe,q.flatMapDepth=Cfe,q.flatten=Q7,q.flattenDeep=gde,q.flattenDepth=bde,q.flip=Kfe,q.flow=Ohe,q.flowRight=jhe,q.fromPairs=vde,q.functions=jpe,q.functionsIn=Lpe,q.groupBy=Sfe,q.initial=xde,q.intersection=wde,q.intersectionBy=Cde,q.intersectionWith=Sde,q.invert=Bpe,q.invertBy=zpe,q.invokeMap=Pfe,q.iteratee=cC,q.keyBy=Efe,q.keys=tn,q.keysIn=Wn,q.map=_m,q.mapKeys=Vpe,q.mapValues=Rpe,q.matches=Lhe,q.matchesProperty=Fhe,q.memoize=Im,q.merge=Wpe,q.mergeWith=CO,q.method=Bhe,q.methodOf=zhe,q.mixin=dC,q.negate=Nm,q.nthArg=Vhe,q.omit=Upe,q.omitBy=Hpe,q.once=Vfe,q.orderBy=Tfe,q.over=Rhe,q.overArgs=Rfe,q.overEvery=Whe,q.overSome=Uhe,q.partial=rC,q.partialRight=fO,q.partition=Afe,q.pick=qpe,q.pickBy=SO,q.property=$O,q.propertyOf=Hhe,q.pull=Tde,q.pullAll=tO,q.pullAllBy=Ade,q.pullAllWith=_de,q.pullAt=$de,q.range=qhe,q.rangeRight=Ghe,q.rearg=Wfe,q.reject=Ife,q.remove=Ide,q.rest=Ufe,q.reverse=Qw,q.sampleSize=Dfe,q.set=Zpe,q.setWith=Ype,q.shuffle=Mfe,q.slice=Nde,q.sortBy=Lfe,q.sortedUniq=Bde,q.sortedUniqBy=zde,q.split=yhe,q.spread=Hfe,q.tail=Kde,q.take=Vde,q.takeRight=Rde,q.takeRightWhile=Wde,q.takeWhile=Ude,q.tap=sfe,q.throttle=qfe,q.thru=Am,q.toArray=bO,q.toPairs=kO,q.toPairsIn=PO,q.toPath=Qhe,q.toPlainObject=yO,q.transform=Jpe,q.unary=Gfe,q.union=Hde,q.unionBy=qde,q.unionWith=Gde,q.uniq=Zde,q.uniqBy=Yde,q.uniqWith=Jde,q.unset=Xpe,q.unzip=eC,q.unzipWith=rO,q.update=Qpe,q.updateWith=ehe,q.values=Ou,q.valuesIn=the,q.without=Xde,q.words=AO,q.wrap=Zfe,q.xor=Qde,q.xorBy=efe,q.xorWith=tfe,q.zip=rfe,q.zipObject=nfe,q.zipObjectDeep=ofe,q.zipWith=ife,q.entries=kO,q.entriesIn=PO,q.extend=xO,q.extendWith=wO,dC(q,q),q.add=tme,q.attempt=_O,q.camelCase=ihe,q.capitalize=EO,q.ceil=rme,q.clamp=rhe,q.clone=Jfe,q.cloneDeep=Qfe,q.cloneDeepWith=epe,q.cloneWith=Xfe,q.conformsTo=tpe,q.deburr=TO,q.defaultTo=Mhe,q.divide=nme,q.endsWith=she,q.eq=ni,q.escape=ahe,q.escapeRegExp=lhe,q.every=gfe,q.find=vfe,q.findIndex=J7,q.findKey=$pe,q.findLast=yfe,q.findLastIndex=X7,q.findLastKey=Ipe,q.floor=ome,q.forEach=oO,q.forEachRight=iO,q.forIn=Npe,q.forInRight=Dpe,q.forOwn=Mpe,q.forOwnRight=Ope,q.get=sC,q.gt=rpe,q.gte=npe,q.has=Fpe,q.hasIn=aC,q.head=eO,q.identity=Un,q.includes=kfe,q.indexOf=yde,q.inRange=nhe,q.invoke=Kpe,q.isArguments=bl,q.isArray=ct,q.isArrayBuffer=ope,q.isArrayLike=Rn,q.isArrayLikeObject=Mr,q.isBoolean=ipe,q.isBuffer=ba,q.isDate=spe,q.isElement=ape,q.isEmpty=lpe,q.isEqual=upe,q.isEqualWith=cpe,q.isError=nC,q.isFinite=dpe,q.isFunction=ls,q.isInteger=pO,q.isLength=Dm,q.isMap=hO,q.isMatch=fpe,q.isMatchWith=ppe,q.isNaN=hpe,q.isNative=mpe,q.isNil=bpe,q.isNull=gpe,q.isNumber=mO,q.isObject=Pr,q.isObjectLike=_r,q.isPlainObject=kd,q.isRegExp=oC,q.isSafeInteger=vpe,q.isSet=gO,q.isString=Mm,q.isSymbol=ao,q.isTypedArray=Mu,q.isUndefined=ype,q.isWeakMap=xpe,q.isWeakSet=wpe,q.join=kde,q.kebabCase=uhe,q.last=Do,q.lastIndexOf=Pde,q.lowerCase=che,q.lowerFirst=dhe,q.lt=Cpe,q.lte=Spe,q.max=ime,q.maxBy=sme,q.mean=ame,q.meanBy=lme,q.min=ume,q.minBy=cme,q.stubArray=pC,q.stubFalse=hC,q.stubObject=Zhe,q.stubString=Yhe,q.stubTrue=Jhe,q.multiply=dme,q.nth=Ede,q.noConflict=Khe,q.noop=fC,q.now=$m,q.pad=fhe,q.padEnd=phe,q.padStart=hhe,q.parseInt=mhe,q.random=ohe,q.reduce=_fe,q.reduceRight=$fe,q.repeat=ghe,q.replace=bhe,q.result=Gpe,q.round=fme,q.runInContext=ie,q.sample=Nfe,q.size=Ofe,q.snakeCase=vhe,q.some=jfe,q.sortedIndex=Dde,q.sortedIndexBy=Mde,q.sortedIndexOf=Ode,q.sortedLastIndex=jde,q.sortedLastIndexBy=Lde,q.sortedLastIndexOf=Fde,q.startCase=xhe,q.startsWith=whe,q.subtract=pme,q.sum=hme,q.sumBy=mme,q.template=Che,q.times=Xhe,q.toFinite=us,q.toInteger=ht,q.toLength=vO,q.toLower=She,q.toNumber=Mo,q.toSafeInteger=kpe,q.toString=qt,q.toUpper=khe,q.trim=Phe,q.trimEnd=Ehe,q.trimStart=The,q.truncate=Ahe,q.unescape=_he,q.uniqueId=eme,q.upperCase=$he,q.upperFirst=lC,q.each=oO,q.eachRight=iO,q.first=eO,dC(q,(function(){var u={};return $i(q,function(p,w){Ht.call(q.prototype,w)||(u[w]=p)}),u})(),{chain:!1}),q.VERSION=n,oo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){q[u].placeholder=q}),oo(["drop","take"],function(u,p){Nt.prototype[u]=function(w){w=w===r?1:Xr(ht(w),0);var I=this.__filtered__&&!p?new Nt(this):this.clone();return I.__filtered__?I.__takeCount__=mn(w,I.__takeCount__):I.__views__.push({size:mn(w,_),type:u+(I.__dir__<0?"Right":"")}),I},Nt.prototype[u+"Right"]=function(w){return this.reverse()[u](w).reverse()}}),oo(["filter","map","takeWhile"],function(u,p){var w=p+1,I=w==B||w==W;Nt.prototype[u]=function(z){var G=this.clone();return G.__iteratees__.push({iteratee:qe(z,3),type:w}),G.__filtered__=G.__filtered__||I,G}}),oo(["head","last"],function(u,p){var w="take"+(p?"Right":"");Nt.prototype[u]=function(){return this[w](1).value()[0]}}),oo(["initial","tail"],function(u,p){var w="drop"+(p?"":"Right");Nt.prototype[u]=function(){return this.__filtered__?new Nt(this):this[w](1)}}),Nt.prototype.compact=function(){return this.filter(Un)},Nt.prototype.find=function(u){return this.filter(u).head()},Nt.prototype.findLast=function(u){return this.reverse().find(u)},Nt.prototype.invokeMap=kt(function(u,p){return typeof u=="function"?new Nt(this):this.map(function(w){return vd(w,u,p)})}),Nt.prototype.reject=function(u){return this.filter(Nm(qe(u)))},Nt.prototype.slice=function(u,p){u=ht(u);var w=this;return w.__filtered__&&(u>0||p<0)?new Nt(w):(u<0?w=w.takeRight(-u):u&&(w=w.drop(u)),p!==r&&(p=ht(p),w=p<0?w.dropRight(-p):w.take(p-u)),w)},Nt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Nt.prototype.toArray=function(){return this.take(_)},$i(Nt.prototype,function(u,p){var w=/^(?:filter|find|map|reject)|While$/.test(p),I=/^(?:head|last)$/.test(p),z=q[I?"take"+(p=="last"?"Right":""):p],G=I||/^find/.test(p);z&&(q.prototype[p]=function(){var J=this.__wrapped__,ee=I?[1]:arguments,se=J instanceof Nt,he=ee[0],me=se||ct(J),Ce=function(_t){var Mt=z.apply(q,ca([_t],ee));return I&&De?Mt[0]:Mt};me&&w&&typeof he=="function"&&he.length!=1&&(se=me=!1);var De=this.__chain__,Re=!!this.__actions__.length,Ge=G&&!De,gt=se&&!Re;if(!G&&me){J=gt?J:new Nt(this);var He=u.apply(J,ee);return He.__actions__.push({func:Am,args:[Ce],thisArg:r}),new $o(He,De)}return Ge&>?u.apply(this,ee):(He=this.thru(Ce),Ge?I?He.value()[0]:He.value():He)})}),oo(["pop","push","shift","sort","splice","unshift"],function(u){var p=em[u],w=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",I=/^(?:pop|shift)$/.test(u);q.prototype[u]=function(){var z=arguments;if(I&&!this.__chain__){var G=this.value();return p.apply(ct(G)?G:[],z)}return this[w](function(J){return p.apply(ct(J)?J:[],z)})}}),$i(Nt.prototype,function(u,p){var w=q[p];if(w){var I=w.name+"";Ht.call(_u,I)||(_u[I]=[]),_u[I].push({name:p,func:w})}}),_u[wm(r,S).name]=[{name:"wrapper",func:r}],Nt.prototype.clone=$ue,Nt.prototype.reverse=Iue,Nt.prototype.value=Nue,q.prototype.at=afe,q.prototype.chain=lfe,q.prototype.commit=ufe,q.prototype.next=cfe,q.prototype.plant=ffe,q.prototype.reverse=pfe,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=hfe,q.prototype.first=q.prototype.head,dd&&(q.prototype[dd]=dfe),q}),Eu=uue();ul?((ul.exports=Eu)._=Eu,uw._=Eu):ln._=Eu}).call(Jae)})(td,td.exports)),td.exports}var fM=Xae();function Qae({monthlyFees:e,baseMonthlyFee:t,lifetimeMonthlyFee:r}){const n=fM.orderBy(fM.uniq(e),c=>c,"desc"),o=e.filter(c=>c===e[0]).length,i=n.length>1||n[0]!==t,s=t>r,a=Ve(t,{symbol:"",dashed:!0}),l=Ve(s?r:n[n.length-1],{symbol:"",dashed:!0});return{normalPrice:a,promotionPrice:i||s?l:void 0,text:i&&!s?Ee.t("format.firstMonth",{count:o}):null}}function pM({bundleSet:e,oneLiner:t,classNames:r}){const{t:n}=Je(),o=Qae(e),i=!!o.promotionPrice;return t&&i?h.jsxs("span",{className:"text-sm text-right whitespace-nowrap text-success",children:[o.text," ",n("format.for")," ",o.promotionPrice]}):t&&!i?h.jsxs("span",{className:"text-sm text-right whitespace-nowrap text-foreground-500",children:[n("format.startingFrom")," ",o.normalPrice]}):!i&&!o.normalPrice?null:h.jsxs("div",{className:A("flex flex-col",r?.base),children:[h.jsxs("div",{className:A("flex flex-row justify-end items-baseline gap-2",r?.wrapper),children:[h.jsx("span",{className:A("text-base text-foreground whitespace-nowrap font-medium",i&&"line-through text-foreground-500 font-normal",r?.normalPrice),children:o.normalPrice}),o.promotionPrice&&h.jsx("span",{className:A("text-base font-semibold whitespace-nowrap text-success-600",r?.promotionPrice),children:o.promotionPrice})]}),o.text&&h.jsx("span",{className:A("text-xs text-right whitespace-nowrap text-success-600 font-medium",r?.promotionText),children:o.text})]})}function hM({bundleTypeSet:e,bundleSets:t,selectedUnitKeys:r,hasPrice:n,onChange:o,classNames:i}){const{openModal:s}=Qt(),{onAction:a}=gi(),[l,c]=Fn();return h.jsx(Zae,{classNames:i,options:t.map(d=>{const f=uM(d),{title:m,subtitle:g=d.tooltipText}=cM(d.name),b=n||d.baseMonthlyFee!==d.lifetimeMonthlyFee;return{value:d.unitKey,label:h.jsxs("div",{className:"w-full flex flex-row justify-between",children:[h.jsxs("div",{className:A("w-full flex flex-row justify-between items-center gap-2 py-4 pr-4",d.imageUrl&&"pr-2",d.imageUrl&&b&&"flex-col items-start justify-center gap-0"),children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[f&&h.jsx("span",{className:"text-base text-foreground-400 line-through",children:f}),h.jsxs("span",{className:A("text-base font-medium text-foreground",i?.checkbox?.label),children:[m,d.infoUrl&&h.jsx(Jd,{size:16,className:"mb-0.5 ml-1 inline-block shrink-0 text-foreground-500 relative z-10",onClick:y=>{y.preventDefault(),y.stopPropagation(),s(`content-${d.infoUrl}`),a({type:"bundle_info_viewed",bundleTypeSet:e,bundleSet:d})}})]})]}),h.jsxs("div",{className:"flex flex-col gap-2 empty:hidden",children:[g&&h.jsx("span",{className:"text-sm text-foreground-500",children:g}),d.usps.length>0&&h.jsx("ul",{children:d.usps.map(y=>h.jsxs("li",{className:"text-sm text-foreground-500 flex items-start gap-1",children:[h.jsx(ug,{size:16,className:"shrink-0 stroke-success-600 mt-0.5"}),y]},y))})]})]}),b&&h.jsx(pM,{bundleSet:d,classNames:i?.checkbox?.bundlePrice})]}),d.imageUrl&&h.jsx("div",{className:A("p-4 bg-primary-50",i?.checkbox?.imgWrapper),children:h.jsx(Ar,{src:l(d.imageUrl,100,100),srcSet:c(d.imageUrl,100,100),alt:d.name,width:100,height:100,className:A("object-contain min-w-25 min-h-25",i?.checkbox?.img)})})]})}}),value:r,onValueChange:d=>{const f=d.filter(g=>!r.includes(g))[0],m=r.filter(g=>!d.includes(g))[0];o(f||m)}})}const ele=6,tle=4;function rle({bundleTypeSet:e}){const{t}=Je(),{propositionKey:r,toggleBundleSet:n}=Xi(),{openModal:o}=Qt(),{bundleModal:i,bundleSelector:s}=vt(),a=e.bundleTypes.includes("channel")&&e.bundleSets.length>ele,l=r.unitKeys.filter(f=>f.includes(e.unitKey)),c=a?e.bundleSets.filter((f,m)=>l.includes(f.unitKey)||m<tle):e.bundleSets,d=!e.bundleSets.every(f=>f.monthlyFees[f.monthlyFees.length-1]===0);return h.jsxs(h.Fragment,{children:[h.jsx(hM,{bundleTypeSet:e,bundleSets:c,selectedUnitKeys:l,hasPrice:d,onChange:f=>n(f,e),classNames:{...s?.bundleTypeSetCheckboxGroup,wrapper:A(e.bundleSets.length>1&&"@min-xl:grid @min-xl:grid-cols-2",s?.bundleTypeSetCheckboxGroup?.wrapper),checkbox:{...s?.bundleTypeSetCheckboxGroup?.checkbox,base:A("p-0 overflow-hidden",s?.bundleTypeSetCheckboxGroup?.checkbox?.base),wrapper:A("ml-4",s?.bundleTypeSetCheckboxGroup?.checkbox?.wrapper)}}}),a&&h.jsxs(h.Fragment,{children:[h.jsx(hr,{className:A("font-medium text-primary-600 border-primary-600",s?.showMoreButton),onPress:()=>o(`bundle-type-set-${e.unitKey}`),color:"primary",variant:"flat",size:"md",radius:"full",fullWidth:!0,disableAnimation:!0,disableRipple:!0,children:t("propositionSelector.showMore")}),h.jsx(Yae,{title:e.name,unitKey:e.unitKey,classNames:i,children:h.jsx(hM,{bundleTypeSet:e,bundleSets:e.bundleSets,selectedUnitKeys:l,hasPrice:d,onChange:f=>n(f,e),classNames:{...s?.bundleTypeSetCheckboxGroup,checkbox:{...s?.bundleTypeSetCheckboxGroup?.checkbox,base:A("p-0 overflow-hidden",s?.bundleTypeSetCheckboxGroup?.checkbox?.base),wrapper:A("ml-4",s?.bundleTypeSetCheckboxGroup?.checkbox?.wrapper)}}})})]})]})}function nle({bundleTypeSet:e,onSelected:t}){const{t:r}=Je(),{propositionKey:n,toggleBundleSet:o}=Xi(),{bundleSelector:i}=vt(),{openModal:s}=Qt(),{onAction:a}=gi(),[l,c]=Fn(),d=e.bundleSets.find(y=>n.unitKeys.some(v=>v.includes(y.unitKey)))?.unitKey,f=!e.bundleSets.every(y=>y.monthlyFees[y.monthlyFees.length-1]===0),m={value:"none",label:h.jsx("div",{className:"text-base font-medium text-foreground py-4 pr-4",children:r("propositionSelector.none")})},g=e.bundleTypes.some(y=>["data","internet","tv"].includes(y))||e.bundleSets.some(y=>y.content.data>0),b=[...e.required?[]:[m],...e.bundleSets.map(y=>{const v=uM(y),{title:C,subtitle:S=y.tooltipText}=cM(y.name),k=f||y.baseMonthlyFee!==y.lifetimeMonthlyFee;return{value:y.unitKey,label:h.jsxs("div",{className:"w-full flex flex-row justify-between",children:[h.jsxs("div",{className:A("w-full flex flex-row justify-between gap-2 py-4 pr-4",y.imageUrl&&"pr-2",y.imageUrl&&k&&"flex-col items-start justify-center gap-0"),children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[v&&h.jsx("span",{className:"text-base text-foreground-400 line-through",children:v}),h.jsxs("span",{className:A("text-base font-medium text-foreground",i?.bundleTypeSetRadioGroup?.radio?.label),children:[C,y.infoUrl&&h.jsx(Jd,{size:16,className:"mb-0.5 ml-1 inline-block shrink-0 text-foreground-500 relative z-10",onClick:P=>{P.preventDefault(),P.stopPropagation(),s(`content-${y.infoUrl}`),a({type:"bundle_info_viewed",bundleTypeSet:e,bundleSet:y})}})]})]}),h.jsxs("div",{className:"flex flex-col gap-2 empty:hidden",children:[S&&h.jsx("span",{className:"text-sm text-foreground-500",children:S}),y.usps.length>0&&h.jsx("ul",{children:y.usps.map(P=>h.jsxs("li",{className:"text-sm text-foreground-500 flex items-start gap-1",children:[h.jsx(ug,{size:16,className:"shrink-0 stroke-success-600 mt-0.5"}),P]},P))}),e.bundleTypes.includes("tv")&&h.jsxs("span",{className:"text-sm text-foreground-500 flex items-center gap-1 whitespace-nowrap",children:[h.jsx(G4,{size:16,className:"shrink-0"}),y.content.channels.length,y.content.hdChannels.length>0&&` (${y.content.hdChannels.length} HD)`]}),e.bundleTypes.includes("internet")&&h.jsxs("span",{className:"text-sm text-foreground-500 flex items-center gap-1 whitespace-nowrap",children:[h.jsx(H4,{size:16,className:"shrink-0"}),y.content.dataSpeedDown/1e3," /"," ",y.content.dataSpeedUp/1e3," ",r("format.megabitPerSecond")]})]})]}),k&&h.jsx(pM,{bundleSet:y,classNames:i?.bundleTypeSetRadioGroup?.radio?.bundlePrice})]}),y.imageUrl&&h.jsx("div",{className:A("p-4 bg-primary-50",i?.bundleTypeSetRadioGroup?.radio?.imgWrapper),children:h.jsx(Ar,{src:l(y.imageUrl,100,100),srcSet:c(y.imageUrl,100,100),alt:y.name,width:100,height:100,className:A("object-contain min-w-25 min-h-25",i?.bundleTypeSetRadioGroup?.radio?.img)})})]})}})];return h.jsx(Rh,{options:b,value:d??"none",onValueChange:y=>{o(d&&y==="none"?d:y,e),t()},classNames:{...i?.bundleTypeSetRadioGroup,wrapper:A(!g&&b.length>1&&"@min-xl:grid @min-xl:grid-cols-2",i?.bundleTypeSetRadioGroup?.wrapper),radio:{...i?.bundleTypeSetRadioGroup?.radio,base:A("p-0 overflow-hidden",i?.bundleTypeSetRadioGroup?.radio?.base),wrapper:A("mt-4.5 ml-4",i?.bundleTypeSetRadioGroup?.radio?.wrapper)}}})}function ole({title:e,imageUrl:t,onClick:r}){const{bundleSelector:{collapsedBundleSet:n}={}}=vt(),[o,i]=Fn();return h.jsx(hr,{variant:"bordered",fullWidth:!0,disableAnimation:!0,disableRipple:!0,onPress:r,"aria-expanded":!1,"aria-label":e,className:A("h-auto justify-between gap-2 p-4 m-0 rounded-2xl border-medium border-primary whitespace-normal [&]:data-[hover=true]:opacity-100",n?.base),endContent:h.jsx(Z4,{size:24,className:A("shrink-0 stroke-primary",n?.icon)}),children:h.jsxs("div",{className:"flex flex-row items-center gap-2",children:[t&&h.jsx("div",{className:A("shrink-0",n?.imageWrapper),children:h.jsx(Ar,{src:o(t,48,48),srcSet:i(t,48,48),alt:e,width:48,height:48,className:A("object-contain",n?.image)})}),h.jsx("span",{className:A("text-base font-medium text-foreground text-left",n?.title),children:e})]})})}function ile({bundleTypeSets:e,indexOffset:t,collapsibleBundleTypeSets:r=[]}){const{propositionKey:n,propositionSelector:o,setPlanVariant:i}=Xi(),{t:s}=Je(),{bundleSelector:a}=vt(),{openModal:l}=Qt(),{onAction:c}=gi(),[d,f]=x.useState([]);return o?h.jsxs("div",{className:A("space-y-8",a?.base),children:[h.jsxs("div",{className:A("space-y-2",a?.contractTermGroup),children:[h.jsxs("h3",{className:A("text-base font-bold text-foreground flex items-center gap-2",a?.contractTermLabel),children:[h.jsx("span",{className:A("bg-primary text-background text-base rounded-full w-6 h-6 flex items-center justify-center shrink-0",a?.contractTermLabelNumber),children:t+1}),h.jsx("span",{children:s("propositionSelector.contractTerm")})]}),h.jsx(Rh,{orientation:"horizontal",options:o.planVariants.map(m=>({value:m.unitKey,label:h.jsx("span",{className:A("text-base font-medium text-foreground",a?.contractTermRadioGroup?.radio?.label),children:Jc(m.contractTerm)})})),value:n.planVariant(),onValueChange:m=>i(m),classNames:a?.contractTermRadioGroup})]}),e.map((m,g)=>{const b=r.includes(m.name)&&m.bundleSets.length>1,y=d.includes(m.unitKey),v=b?m.bundleSets.find(P=>n.unitKeys.some(E=>E.includes(P.unitKey))):void 0,C=b&&v&&!y;function S(){b&&f(P=>P.filter(E=>E!==m.unitKey))}function k(){f(P=>P.includes(m.unitKey)?P:[...P,m.unitKey])}return h.jsxs("div",{className:A("space-y-2",a?.bundleTypeSetGroup),children:[h.jsxs("h3",{className:A("text-base font-bold text-foreground flex items-center gap-2",a?.bundleTypeSetLabel),children:[h.jsx("span",{className:A("bg-primary text-background text-base rounded-full w-6 h-6 flex items-center justify-center shrink-0",a?.bundleTypeSetLabelNumber),children:g+2+t}),h.jsx("span",{children:m.name}),m.infoUrl&&h.jsx(Jd,{size:16,className:A("shrink-0 text-foreground-500 cursor-pointer",a?.bundleTypeSetLabelInfoIcon),onClick:()=>{l(`content-${m.infoUrl}`),c({type:"bundle_info_viewed",bundleTypeSet:m})}})]}),m.multiSelect?h.jsx(rle,{bundleTypeSet:m}):C?h.jsx(ole,{title:v.name,imageUrl:v.imageUrl,onClick:k}):h.jsx(nle,{bundleTypeSet:m,onSelected:S})]},m.unitKey)})]}):null}function sle({proposition:e}){const{extraCosts:t}=vt(),{t:r}=Je(),{productType:n,activationFee:o,installationFee:i,provider:s,planVariant:a}=e,l=n==="sim-only"&&a.contractType==="retention",c=r(n==="smartphone"?"propositionSelector.excludingShipping":"propositionSelector.freeShipping");return h.jsxs("div",{className:A("text-center text-sm text-foreground-400",t),children:[h.jsxs("span",{children:[!l&&c?`${c} | `:"",r("propositionSelector.includingVat")]}),h.jsx("br",{}),h.jsxs("span",{children:[s.name," ",r("propositionSelector.activationFee")," ",Ve(o,{symbol:"",dashed:!0})]}),n==="fixed"&&h.jsxs(h.Fragment,{children:[h.jsx("br",{}),h.jsxs("span",{children:[s.name," ",r("propositionSelector.installationFee")," ",Ve(i,{symbol:"",dashed:!0})]})]})]})}const ale=250;function lle(){const{t:e}=Je(),{handsetCreditSelector:t}=vt(),{propositionKey:r,propositionSelector:n,setHandsetCredit:o}=Xi(),i=r.handsetCredit(),[s,a]=x.useState(i),l=gp(s,700);if(x.useEffect(()=>{a(i)},[i]),zo(()=>{l&&o(l)},[l]),!n||n.handsetCreditKeys.length===0)return null;const c=nw(n.handsetCreditKeys,n.basePrice);if(c.length===0)return null;const d=c.find(({unitKey:v})=>v===s)??c[0],f=c.indexOf(d),m=[...c].reverse().find(({creditFee:v})=>v+n.creditFee<=ale)?.monthlyFee||0,g=c[c.length-1],b=g.price>0&&c[0].price!==g.creditFee,y=m>0&&g.monthlyFee>0?m/g.monthlyFee:0;return h.jsxs("div",{className:A("space-y-4",t?.base),children:[b&&h.jsx("p",{className:A("text-sm text-foreground-500",t?.handsetPriceInfo),children:e("handsetCreditSelector.handsetPriceInfo",{price:Ve(n.basePrice,{symbol:"€"})})}),h.jsxs("div",{className:A("flex justify-between items-center",t?.priceRow),children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:A("text-sm font-semibold",t?.oneTimeLabel),children:e("handsetCreditSelector.oneTime")}),h.jsx("span",{className:A("text-sm",t?.oneTimeValue),children:Ve(Math.max(0,d.price))})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:A("text-sm font-semibold",t?.monthlyLabel),children:e("handsetCreditSelector.monthly")}),h.jsx("span",{className:A("text-sm",t?.monthlyValue),children:Ve(d.monthlyFee)})]})]}),h.jsxs("div",{className:A("flex items-center gap-3",t?.sliderRow),children:[h.jsx(hr,{isIconOnly:!0,disableAnimation:!0,disableRipple:!0,size:"sm",variant:"bordered",radius:"md",isDisabled:f<=0,onPress:()=>{if(f<=0)return;const v=c[f-1].unitKey;a(v)},"aria-label":e("handsetCreditSelector.decrease"),className:t?.decrementButton,endContent:h.jsx("span",{className:"text-lg font-medium",children:"−"})}),h.jsxs("div",{className:"relative flex-1",children:[y>0&&h.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 h-3 rounded-l-full bg-success pointer-events-none",style:{width:`calc(${y*100}% - 5px)`}}),h.jsx(oh,{size:"sm",step:1,hideValue:!0,className:"flex-1",minValue:0,maxValue:c.length-1,value:c.indexOf(d),onChange:v=>{const C=typeof v=="number"?v:v[0];a(c[C].unitKey)},onChangeEnd:v=>{const C=typeof v=="number"?v:v[0];a(c[C].unitKey)},classNames:{track:A("h-3 data-[fill-start=true]:border-s-transparent",t?.slider?.track),filler:A("hidden",t?.slider?.filler),step:A("data-[in-range=true]:bg-content1 data-[in-range=false]:bg-content1",t?.slider?.step),thumb:A(t?.slider?.thumb)}})]}),h.jsx(hr,{isIconOnly:!0,disableAnimation:!0,disableRipple:!0,size:"sm",variant:"bordered",radius:"md",isDisabled:f>=c.length-1,onPress:()=>{if(f>=c.length-1)return;const v=c[f+1].unitKey;a(v)},"aria-label":e("handsetCreditSelector.increase"),className:t?.incrementButton,endContent:h.jsx("span",{className:"text-lg font-medium",children:"+"})})]}),h.jsx("p",{className:A("text-xs",m===0?"text-warning":"text-success",t?.creditCheckText),children:m===0?e("handsetCreditSelector.creditCheckRequired"):e("handsetCreditSelector.noCreditCheck",{from:Ve(c[0].monthlyFee),to:Ve(m)})})]})}function ule(){const e=vt();return h.jsxs("div",{className:"w-full grid grid-cols-1 lg:grid-cols-12 gap-6 mt-3 pointer-events-none",children:[h.jsxs("div",{className:A("space-y-8 lg:col-span-7",e?.mainContentWrapper),children:[h.jsx(Tr,{className:"w-full h-[200px] sm:h-[130px] rounded-large"}),h.jsxs("div",{className:A("space-y-2",e?.retentionSelector?.base),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsx(Tr,{className:"w-3/4 h-[16px] rounded-2xl"}),h.jsxs("div",{className:"w-full flex flex-row gap-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[52px] rounded-2xl"})]})]}),h.jsxs("div",{className:A("space-y-2",e?.modificationSelector?.base),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsx(Tr,{className:"w-3/4 h-[16px] rounded-2xl"}),h.jsxs("div",{className:"w-full flex flex-row gap-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[52px] rounded-2xl"})]})]}),h.jsxs("div",{className:A("space-y-8",e?.bundleSelector?.base),children:[h.jsxs("div",{className:A("space-y-2",e?.bundleSelector?.contractTermGroup),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsxs("div",{className:"w-full flex flex-row gap-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[52px] rounded-2xl"})]})]}),h.jsxs("div",{className:A("space-y-2",e?.bundleSelector?.bundleTypeSetGroup),children:[h.jsx(Tr,{className:"w-[200px] h-[24px] rounded-2xl"}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"}),h.jsx(Tr,{className:"w-full h-[56px] rounded-2xl"})]})]})]})]}),h.jsx("div",{className:A("lg:col-span-5",e?.sidebarCard?.layoutWrapper),children:h.jsx(Tr,{className:A("w-full h-[250px] md:h-[300px] rounded-large",e?.sidebarCard?.base)})})]})}function cle({mobileProviderSlug:e}){const{t}=Je(),{profile:r,setProfile:n}=sn(),{openModal:o,isModalOpen:i}=Qt(),{profileButton:s,promotionList:a,modificationSelector:l}=vt(),{proposition:c}=Xi(),d=c?.productType==="fixed",f=e?`mobile/${e}`:void 0,m=kh(d?"fixed":"mobile"),g=PN(r.currentMobileProviders,m.otherBlocks),b=d?(r.currentMobileProviders||[]).some(S=>m.otherBlocks.some(k=>f?k.scope===S.scope&&k.scope===f:k.scope===S.scope)):m.fixedBlocks.some(S=>S.scope===r.currentFixedProviderScope)||r.currentFixedProviderScope==="other",y=i("combi-deal"),[v,C]=x.useState(b);return x.useEffect(()=>{C(b)},[b]),x.useEffect(()=>{y||b||C(!1)},[y]),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx(Rh,{orientation:"horizontal",options:[{value:"yes",label:t("propositionSelector.modificationYes")},{value:"no",label:t("propositionSelector.modificationNo")}],value:v?"yes":"no",onValueChange:S=>{if(C(S==="yes"),d&&f){n(S==="yes"?{currentMobileProviders:[{scope:f,value:"1"}]}:{currentMobileProviders:[]});return}S==="yes"&&!b&&o("combi-deal"),S==="no"&&n({currentMobileProviders:[],...d?{}:{currentFixedProviderScope:void 0}})},classNames:l?.radioGroup}),v&&!f&&h.jsx(ql,{title:t("profile.customerBenefit"),description:SN(m.fixedBlocks.map(S=>({slug:S.scope.split("/")[1]??"",name:S.provider.name})),g,r.currentFixedProviderScope,d),selected:b,onClick:()=>o("combi-deal"),Icon:qu,classNames:s}),h.jsx(Nh,{promotions:c?.modificationPromotions??[],classNames:a}),!f&&h.jsx(NN,{isFixed:d})]})}function dle(){const{t:e}=Je(),{profile:t,setProfile:r}=sn(),{isShadowRoot:n}=Zn(),{postcodeCheckForm:o}=vt(),[i,s]=x.useState(t.address?.postcode||""),[a,l]=x.useState(t.address?.number||""),[c,d]=x.useState(t.address?.numberAddon||""),[f,m]=x.useState(t.address?.street||""),[g,b]=x.useState(t.address?.city||""),{width:y}=xa(),v=y>=1024,C=x.useRef(!!(t.address?.street&&t.address?.city)),{isLoading:S}=Xi(),k=x.useCallback(M=>{M.street!==void 0&&m(M.street),M.city!==void 0&&b(M.city)},[]),{manual:P,isLoading:E,error:$}=jN(k,i,a,c,C.current);zo(()=>{!P&&(!i||!a)&&(m(""),b(""))},[i,a,P]);const O={inputWrapper:A("border-small",o?.input?.inputWrapper),input:A("absolute bottom-1.5",o?.input?.input),label:A("top-1.5",o?.input?.label)},N=x.useCallback(M=>{M.preventDefault();const V=new FormData(M.target),R={...Object.fromEntries(V.entries()),street:f,city:g},{success:K,data:j}=j1.safeParse(R);K&&(Zc({address:j}),r({address:j}))},[f,g,r]);function D(){n&&!v&&setTimeout(()=>window.scrollTo(0,0),150)}return h.jsxs("form",{id:"postcode-check-form-proposition-selector",className:A("flex flex-col gap-3",o?.container),onSubmit:N,children:[h.jsxs("div",{className:A("flex flex-row gap-2",o?.inputsContainer),children:[h.jsx(wi,{variant:"bordered",placeholder:"1234AB",radius:"sm",type:"text",inputMode:i.length<4?"numeric":"text",name:"postcode",autoComplete:"postal-code",value:i,onValueChange:M=>s(ON(M)),onFocus:D,classNames:O,maxLength:6,label:e("postcodeCheck.postalCode"),endContent:E?h.jsx(Xd,{size:20,className:"animate-spin stroke-foreground-400 absolute right-2"}):null,isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"1",radius:"sm",type:"text",inputMode:"numeric",name:"number",autoComplete:"street-address",value:a,onValueChange:M=>l(M.replace(/\D/g,"")),onFocus:D,classNames:O,label:e("postcodeCheck.houseNumber"),endContent:E?h.jsx(Xd,{size:20,className:"animate-spin stroke-foreground-400 absolute right-2"}):null,isRequired:!0}),h.jsx(wi,{variant:"bordered",placeholder:"A",radius:"sm",type:"text",name:"numberAddon",value:c,onValueChange:M=>d(M.toUpperCase()),onFocus:D,classNames:O,endContent:E&&c.length>0?h.jsx(Xd,{size:20,className:"animate-spin stroke-foreground-400 absolute right-2"}):null,label:e("postcodeCheck.houseNumberAddition")})]}),$&&h.jsx(uu,{color:"danger",variant:"faded",title:$,hideIconWrapper:!0,classNames:o?.errorAlert}),h.jsx(hr,{type:"submit",form:"postcode-check-form-proposition-selector",className:A("font-medium gap-1 rounded-full",o?.ctaButton),color:"primary",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,spinner:h.jsx(Xd,{size:20,className:"animate-spin stroke-primary-foreground"}),isLoading:S,isDisabled:!i||!a||!f||!g||!!$||E||S,children:e("propositionSelector.postcodeCheckCTA")})]})}function mM(e){return e?e.sort((t,r)=>t.uniqueName.localeCompare(r.uniqueName)).sort((t,r)=>Number(r.sellWithoutSubscription)-Number(t.sellWithoutSubscription)).sort((t,r)=>+(r.stock.status==="backordered")-+(t.stock.status==="backordered")).sort((t,r)=>+(r.stock.status==="in_stock")-+(t.stock.status==="in_stock")):[]}function gM(e,t){const[r,n]=x.useState(0),o=x.useRef(null),i=x.useRef([]),s=x.useRef(null);x.useEffect(()=>{const d=o.current,f=i.current.some(g=>g!==null);return!d||e.length===0||!f?void 0:(s.current&&(s.current.disconnect(),s.current=null),s.current=new IntersectionObserver(g=>{g.forEach(b=>{if(b.isIntersecting&&b.intersectionRatio>.5){const y=i.current.indexOf(b.target);y!==-1&&n(y)}})},{root:null,threshold:.5,rootMargin:t?.rootMargin||"0px"}),i.current.filter(g=>g!==null).forEach(g=>{g&&s.current&&s.current.observe(g)}),()=>{s.current&&(s.current.disconnect(),s.current=null)})},[e.length,t?.rootMargin,t?.isOpen]);const a=x.useCallback(d=>{i.current[d]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[]),l=x.useCallback(()=>{r>0&&a(r-1)},[r,a]),c=x.useCallback(()=>{r<e.length-1&&a(r+1)},[r,e.length,a]);return{activeIndex:r,scrollContainerRef:o,imageRefs:i,scrollToImage:a,goToPrevious:l,goToNext:c}}function fle({title:e,images:t=[],classNames:r}){const[n,o]=Fn(),{popoverProps:i,isShadowRoot:s}=Zn(),{isModalOpen:a,openModal:l,closeModal:c}=Qt(),d=x.useMemo(()=>t.filter(S=>!!S.url),[t]),f=a("carousel"),{activeIndex:m,scrollContainerRef:g,imageRefs:b,scrollToImage:y,goToPrevious:v,goToNext:C}=gM(d,{rootMargin:"0px",isOpen:f});return x.useEffect(()=>{f&&setTimeout(()=>{y(0)},200)},[f,y]),!d||d.length===0?null:h.jsx(fi,{isOpen:f,onOpenChange:S=>S?l("carousel"):c("carousel"),placement:"bottom-center",scrollBehavior:"inside",size:"lg",shouldBlockScroll:!s,portalContainer:i.portalContainer,classNames:{backdrop:A(r?.modal?.backdrop),wrapper:A(r?.modal?.wrapper),base:A("m-0 max-h-[90vh]",r?.modal?.base),header:A(r?.modal?.header),body:A("pt-0",r?.modal?.body),footer:A(r?.modal?.footer),closeButton:A("cursor-pointer right-6 top-3.5",r?.modal?.closeButton)},children:h.jsxs(ui,{children:[h.jsx(ci,{children:e}),h.jsxs(ai,{className:"flex flex-row items-center gap-1 lg:gap-3",children:[h.jsx("button",{type:"button",onClick:v,disabled:m===0,className:"disabled:opacity-30 not-disabled:hover:cursor-pointer disabled:cursor-not-allowed",children:h.jsx(lg,{className:"rotate-180"})}),h.jsx("div",{ref:g,className:"flex flex-1 overflow-x-auto gap-3 snap-x snap-mandatory scrollbar-hide",style:{scrollbarWidth:"none"},children:d.map((S,k)=>h.jsx("div",{ref:P=>{b.current[k]=P},className:"shrink-0 w-full h-full flex justify-center snap-center",children:h.jsx(Ar,{src:n(S.url,420,420),srcSet:o(S.url,420,420),alt:S.altText||"",classNames:{wrapper:A("mx-auto flex shrink-0 w-full",r?.imageWrapper),img:A("aspect-square drop-shadow-lg",r?.image)}})},S.url))}),h.jsx("button",{type:"button",onClick:C,disabled:m===d.length-1,className:"disabled:opacity-30 not-disabled:hover:cursor-pointer disabled:cursor-not-allowed",children:h.jsx(lg,{})})]}),h.jsx(Vi,{className:"justify-center",children:d.map((S,k)=>h.jsx(Fs,{onPress:()=>y(k),isPressable:!0,disableRipple:!0,disableAnimation:!0,className:A("size-12 p-2 bg-transparent",m===k&&"ring-2 ring-primary",r?.thumbnailCard),radius:"sm",shadow:"none",children:h.jsx(Ar,{className:A("size-8",r?.thumbnailImage),src:n(S.url,32,32),srcSet:o(S.url,32,32),alt:S.altText||"",radius:"sm"})},S.url))})]})})}const bM=3;function ple({modalTitle:e,images:t=[],classNames:r}){const[n,o]=Fn(),{openModal:i}=Qt(),s=x.useMemo(()=>t.filter(y=>!!y.url),[t]),{activeIndex:a,scrollContainerRef:l,imageRefs:c,scrollToImage:d}=gM(s),{width:f}=xa();if(!s||s.length===0)return null;const m=Math.max(0,s.length-bM),b=f>=1024?360:240;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:A("relative",r?.base),children:[h.jsx("div",{ref:l,className:"flex flex-1 overflow-x-auto snap-x snap-mandatory scrollbar-hide",style:{scrollbarWidth:"none"},children:s.map((y,v)=>h.jsx("div",{ref:C=>{c.current[v]=C},className:"shrink-0 w-full h-full flex justify-center snap-center",children:h.jsx(Ar,{src:n(y.url,b,b),srcSet:o(y.url,b,b),alt:y.altText||"",width:b,height:b,classNames:{wrapper:A("mx-auto flex shrink-0",r?.imageWrapper),img:A("aspect-square drop-shadow-lg",r?.image)}})},y.url))}),h.jsxs("div",{className:"absolute bottom-0 right-0 z-10 flex flex-col gap-2 justify-end items-center",children:[s.slice(0,bM).map((y,v)=>h.jsx(Fs,{onPress:()=>d(v),isPressable:!0,disableRipple:!0,disableAnimation:!0,className:A("size-12 lg:size-16 p-2 bg-transparent",a===v&&"ring-2 ring-primary",r?.thumbnailCard),radius:"sm",shadow:"none",children:h.jsx(Ar,{className:A("size-8 lg:size-12",r?.thumbnailImage),src:n(y.url,48,48),srcSet:o(y.url,48,48),alt:y.altText||"",radius:"sm"})},y.url)),m>0&&h.jsx(Fs,{className:A("size-8 lg:size-12 flex items-center justify-center bg-foreground text-sm font-medium text-white",r?.counter),onPress:()=>i("carousel"),isPressable:!0,disableRipple:!0,disableAnimation:!0,radius:"sm",shadow:"none",children:h.jsxs("span",{children:["+",m]})})]})]}),h.jsx(fle,{title:e,images:s,classNames:r?.modal})]})}function hle({onMoreBundleInfoClick:e}){const{productHeader:t}=vt(),{propositionKey:r,proposition:n}=Xi(),[o,i]=Fn(),{width:s}=xa();if(!n)return null;const a=s<768,l=a?70:140,c=a?35:70,d=n.tags.find(v=>v.type==="internet"),f=mM(n.product?.productVersions.filter(v=>v.providers?.some(C=>C?.slug===n.provider.slug))),m=r.productVersionId(),g=f.find(v=>v.id===m),b=n.productType==="smartphone"&&g;function y(){if(!n)return"";switch(n.productType){case"sim-only":return`${n.provider.name} ${Kn(n.content.data,Hu("format.gigabyte"))}`;case"smartphone":return Kn(n.content.data,Hu("format.gigabyte"));case"fixed":{const v=`${n.content.dataSpeedDown/1e3} ${Hu("format.megabitPerSecond")}`;return d?`${n.provider.name} ${Hu(`fixedInternet.${d.slug}`,{defaultValue:d.label})} ${v}`:`${n.provider.name} ${v}`}default:return""}}return h.jsxs(Fs,{disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("py-6 px-4 lg:p-6 flex flex-col gap-2 justify-center items-center",!b&&"items-start sm:flex-row-reverse sm:justify-between",t?.base),children:[b?h.jsx(ple,{modalTitle:g.fullName??"",images:g.media.carousel,classNames:t?.carousel}):h.jsx(Ar,{src:o(n.provider.imageUrl,160,80),srcSet:i(n.provider.imageUrl,160,80),alt:n.provider.name,width:160,height:80,classNames:{wrapper:A("mx-auto flex shrink-0 w-fit sm:mx-0",t?.providerImage?.wrapper),img:A("aspect-2/1",t?.providerImage?.img)}}),g&&h.jsx(F9,{productStockStatus:g.stock.status,classNames:t?.productStockStatus}),h.jsxs("div",{className:A("space-y-2 w-full",t?.propositionHeaderPromotionListWrapper),children:[h.jsx(Y1,{productTitle:n.product?.fullName,propositionTitle:y(),propositionSubtitle:n.productType==="fixed"?void 0:bu(n.content),propositionSpecifications:ea(n),imageUrl:n.provider.imageUrl,imageAlt:n.provider.name,hasProduct:n.productType==="smartphone",imageWidth:l,imageHeight:c,classNames:{...t?.propositionHeader,base:A("w-full",t?.propositionHeader?.base)}}),h.jsx(Nh,{promotions:W9(n.specialPromotions).filter(v=>!!v.shortDescription),urgentText:ra(n.specialPromotions),showUrgentTextInline:!0,isClickable:!0,classNames:t?.promotionList}),h.jsx(zh,{as:"button",underline:"hover",className:A("cursor-pointer text-sm",t?.moreBundleInfoLink),onPress:e,children:Hu("propositionSelector.moreBundleInfo")})]})]})}function mle(){const{propositionKey:e,proposition:t,setProductVersion:r}=Xi(),{versionSelect:n}=vt();if(!t)return null;const o=mM(t.product?.productVersions.filter(a=>a.providers?.some(l=>l?.slug===t.provider.slug))),i=e.productVersionId(),s=o.find(a=>a.id===i);return h.jsx(g$,{disabled:!t.product,versions:o,distinctProperties:t.product?.distinctProperties,selectedDistinctProperties:s?.distinctProperties,selectedPhone:t.product,onSelectionChange:(a,l)=>r(l),classNames:n})}function gle(){const{t:e}=Je(),{profile:t,setProfile:r}=sn(),{openModal:n,isModalOpen:o}=Qt(),{profileButton:i,retentionSelector:s}=vt(),a=L1(),l=!!(t.currentMsisdn&&t.currentProviderSlug),c=o("number-preservation");return x.useEffect(()=>{c||l||t.keepCurrentMsisdn&&r({keepCurrentMsisdn:!1})},[c]),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx(Rh,{orientation:"horizontal",options:[{value:"yes",label:e("propositionSelector.retentionYes")},{value:"no",label:e("propositionSelector.retentionNo")}],value:t.keepCurrentMsisdn?"yes":"no",onValueChange:d=>{r({keepCurrentMsisdn:d==="yes"}),d==="yes"&&!l&&n("number-preservation")},classNames:s?.radioGroup}),t.keepCurrentMsisdn&&h.jsx(ql,{title:e("profile.numberPreservation"),description:kN(t,a),selected:l,onClick:()=>n("number-preservation"),avatarName:"0 6",classNames:i}),h.jsx(MN,{})]})}function rd({title:e,description:t,number:r,classNames:n,children:o}){return h.jsxs("div",{className:A("space-y-2",n?.base),children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsxs("h3",{className:A("text-base font-bold text-foreground flex items-center gap-2",n?.title),children:[r&&h.jsx("span",{className:A("bg-primary text-background text-base rounded-full w-6 h-6 flex items-center justify-center shrink-0",n?.number),children:r}),h.jsx("span",{children:e})]})}),t&&h.jsx("p",{className:A("text-sm text-foreground-500",n?.description),children:t}),o]})}function ble({clickOutTarget:e="cart",contentBelowCTA:t=null,onReturnClick:r,onRender:n,addClickoutSearchParams:o,hideRetentionOnFilledProfile:i,collapsibleBundleTypeSets:s,loadingState:a,notFoundState:l,mobileProviderSlug:c}){const{t:d}=Je(),{isLoading:f,error:m,notFound:g,proposition:b,propositionSelector:y}=Xi(),{buildClickOutUrl:v}=Qc({addClickoutSearchParams:o}),C=vt(),{profile:S}=sn(),k=x.useRef(null),P=x.useRef(!1),[E,$]=x.useState(null),[O,N]=x.useState(!S.address),{openModal:D}=Qt(),{onAction:M}=gi(),[V,R]=Fn();if(x.useEffect(()=>{!n||f||!b||!y||P.current||(P.current=!0,n())},[f,n,b,y]),zo(()=>{!O||!S.address||f||b?.productType==="fixed"&&N(!1)},[f]),!b||!y){if(g)return h.jsxs("div",{className:C?.base,children:[r&&h.jsx(zh,{as:"div",underline:"hover",className:"cursor-pointer",onPress:r,children:d("propositionSelector.return")}),l??h.jsx(uu,{color:"warning",variant:"faded",title:d("propositionSelector.noMatchingPropositionTitle"),description:d("propositionSelector.noMatchingPropositionDescription"),hideIconWrapper:!0,classNames:{...C?.noMatchingPropositionAlert,base:A("mt-3",C?.noMatchingPropositionAlert?.base)}})]});if(!f)throw new Error(m??"Proposition or proposition selector not found");return h.jsxs("div",{className:C?.base,children:[r&&h.jsx(zh,{as:"div",underline:"hover",className:"cursor-pointer",onPress:r,children:d("propositionSelector.return")}),a??h.jsx(ule,{})]})}const K=()=>{v("/api/partner-cart",_=>{_.set("proposition-key",b.key),_.set("product-type",b.productType),_.set("redirect-pathname",e==="cart"?"/winkelwagen":e==="upsell"?"/slimme-keuze":"/bestellen")}).then(_=>{M({type:"add_to_cart",proposition:b}),window.open(_,"_blank")})},j=b.productType==="fixed",B=b.productType==="smartphone",U=S.keepCurrentMsisdn===!1||S.keepCurrentMsisdn===!0&&!!(S.currentMsisdn||S.currentProviderSlug),W=!!i&&U||j,L=j&&S.currentFixedProviderScope?.includes(b.provider.slug),Z=j&&O,T=y.bundleTypeSets.filter(_=>_.bundleSets.length>0),F=_=>W?B?_+1:_:B?_+2:_+1;return h.jsxs("div",{className:C?.base,children:[r&&h.jsx(zh,{as:"div",underline:"hover",className:"cursor-pointer",onPress:r,children:d("propositionSelector.return")}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 mt-3",children:[h.jsxs("div",{className:A("space-y-8 lg:col-span-7",C?.mainContentWrapper),children:[h.jsx(hle,{onMoreBundleInfoClick:()=>{M({type:"details_viewed",proposition:b,tab:"general"}),$({proposition:b,tab:"general"}),D("details")}}),L&&h.jsx(uu,{color:"warning",variant:"faded",title:d("propositionSelector.sameFixedProviderTitle",{providerName:b.provider.name}),description:d("propositionSelector.sameFixedProviderDescription",{providerName:b.provider.name}),hideIconWrapper:!0,classNames:C?.sameFixedProviderAlert}),B&&h.jsx(rd,{title:d("propositionSelector.productVersionTitle"),number:1,classNames:C?.versionSelect?.section,children:h.jsx(mle,{})}),!W&&h.jsx(rd,{title:d("propositionSelector.retentionTitle"),description:d("propositionSelector.retentionDescription"),number:F(0),classNames:C?.retentionSelector,children:h.jsx(gle,{})}),Z?h.jsx(rd,{title:d("propositionSelector.postcodeCheckTitle"),description:d("propositionSelector.postcodeCheckDescription"),number:1,classNames:C?.postcodeCheckForm?.section,children:h.jsx(dle,{})}):h.jsxs(h.Fragment,{children:[h.jsx(rd,{title:d("propositionSelector.modificationTitle"),description:j?c?d("propositionSelector.modificationLockedDescription",{providerName:lM[c]}):d("propositionSelector.modificationFixedDescription"):d("propositionSelector.modificationDescription"),number:F(1),classNames:C?.modificationSelector,children:h.jsx(cle,{mobileProviderSlug:c})}),h.jsx(ile,{bundleTypeSets:T,indexOffset:F(1),collapsibleBundleTypeSets:s})]}),B&&y.handsetCreditKeys.length>0&&h.jsxs(h.Fragment,{children:[h.jsx(rd,{title:d("propositionSelector.handsetCreditTitle"),number:F(T.length+3),classNames:C?.handsetCreditSelector?.section,children:h.jsx(lle,{})}),h.jsx(O9,{proposition:b})]})]}),h.jsxs("div",{className:A("h-fit lg:col-span-5 lg:sticky lg:top-6",C?.sidebarCard?.layoutWrapper),children:[h.jsxs(Fs,{disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("p-6 flex flex-col gap-4",C?.sidebarCard?.base),ref:k,children:[h.jsxs("div",{className:A("flex flex-row justify-between items-center",C?.sidebarCard?.titleWrapper),children:[h.jsx("h2",{className:A("text-2xl font-bold text-foreground",C?.sidebarCard?.title),children:d("propositionSelector.totalCostsOverviewTitle")}),h.jsx(Ar,{src:V(b.provider.imageUrl,100,50),srcSet:R(b.provider.imageUrl,100,50),alt:b.provider.name,width:100,height:50,classNames:{wrapper:A("shrink-0",C?.sidebarCard?.providerImage?.wrapper),img:A("aspect-2/1",C?.sidebarCard?.providerImage?.img)}})]}),h.jsx(zN,{proposition:b,classNames:{...C?.costOverview,monthlySection:A("mb-0",C?.costOverview?.monthlySection)}}),h.jsx(hr,{className:A("font-medium gap-1 rounded-full",C?.sidebarCard?.ctaButton),color:"secondary",size:"lg",fullWidth:!0,disableAnimation:!0,disableRipple:!0,endContent:h.jsx(wa,{size:16}),onPress:K,isDisabled:L||Z,children:d("propositionSelector.cta")}),h.jsx(sle,{proposition:b})]}),t]}),h.jsx(gae,{triggerRef:k,monthlyFeePromotionText:Qs(b.monthlyFees,b.baseMonthlyFee,b.lifetimeMonthlyFee),monthlyFee:Ve(b.monthlyFees[0]?.fee,{dashed:!0}),productPrice:B?Ve(b.price,{dashed:!0}):void 0,isDisabled:L||Z,onClick:K})]}),h.jsx(Xc,{proposition:E?.proposition,defaultTab:E?.tab,buildClickOutUrl:v}),h.jsx(g6,{})]})}function vle({propositionKey:e,giftConfig:t,classNames:r,initialProfile:n,onProfileChange:o,onPropositionKeyChange:i,onError:s,onAction:a,filters:l,...c}){return h.jsx(y6,{onError:s,children:h.jsx(nE,{classNames:r,children:h.jsx(w6,{onAction:a,children:h.jsx($N,{initialProfile:n,onProfileChange:o,children:h.jsx(Gae,{propositionKey:e,giftConfig:t,filters:l,onPropositionKeyChange:i,children:h.jsx(iE,{children:h.jsx(ble,{...c,...t})})})})})})})}var yle=nR;const nd=Object.freeze(Object.defineProperty({__proto__:null,default:yle},Symbol.toStringTag,{value:"Module"}));Oo.ElementsRoot=PL,Oo.PROVIDERS=lM,Oo.ProductResults=fae,Oo.PropositionSelector=vle,Object.defineProperty(Oo,Symbol.toStringTag,{value:"Module"})}));
|