@mobielnl/elements 0.13.13 → 0.13.14
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.js +1 -1
- package/dist/elements.umd.cjs +63 -59
- package/dist/{index-lAas05aP.js → index-D9qilTwU.js} +1 -1
- package/dist/{index-DyiFn5IP.js → index-DuMlILvp.js} +2008 -2003
- package/dist/index.d.ts +24 -8
- package/package.json +1 -1
package/dist/elements.umd.cjs
CHANGED
|
@@ -89,7 +89,7 @@ spurious results.`)}}return!1};class hE{constructor(t,r="GraphQL request",n={lin
|
|
|
89
89
|
`))}function Tv(e){var t;return(t=e?.some(r=>r.includes(`
|
|
90
90
|
`)))!==null&&t!==void 0?t:!1}const gE="Accept",Av="Content-Type",$v="application/json",bE="application/graphql-response+json",vE=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),QU=e=>{const t=e.toLowerCase();return t.includes(bE)||t.includes($v)},yE=e=>{try{if(Array.isArray(e))return{_tag:"Batch",executionResults:e.map(xE)};if(lp(e))return{_tag:"Single",executionResult:xE(e)};throw new Error(`Invalid execution result: result is not object or array.
|
|
91
91
|
Got:
|
|
92
|
-
${String(e)}`)}catch(t){return t}},xE=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(!lp(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(!lp(e.data)&&e.data!==null)throw new Error("Invalid execution result: data is not plain object");r=e.data}if("extensions"in e){if(!lp(e.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=e.extensions}return{data:r,errors:t,extensions:n}},eH=e=>e._tag==="Batch"?e.executionResults.some(wE):wE(e.executionResult),wE=e=>Array.isArray(e.errors)?e.errors.length>0:!!e.errors,CE=e=>typeof e=="object"&&e!==null&&"kind"in e&&e.kind===We.OPERATION_DEFINITION,tH=e=>{let t;const r=e.definitions.filter(CE);return r.length===1&&(t=r[0].name?.value),t},rH=e=>{let t=!1;const r=e.definitions.filter(CE);return r.length===1&&(t=r[0].operation==="mutation"),t},_v=(e,t)=>{const r=typeof e=="string"||"kind"in e?e:String(e),n=typeof r=="string"?r:YU(r);let o=!1,i;if(t)return{expression:n,isMutation:o,operationName:i};const s=aU(()=>typeof r=="string"?KU(r):r);return s instanceof Error?{expression:n,isMutation:o,operationName:i}:(i=tH(s),o=rH(s),{expression:n,operationName:i,isMutation:o})},Iv=JSON,Nv=async e=>{const t={...e,method:e.request._tag==="Single"?e.request.document.isMutation?"POST":QP(e.method??"post"):e.request.hasMutations?"POST":QP(e.method??"post"),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??"none"}},n=await oH(t.method)(t),o=await n.text();let i;try{i=nH(o,n.headers.get(Av),e.fetchOptions.jsonSerializer??Iv)}catch(a){i=a}const s={status:n.status,headers:n.headers,body:o};if(!n.ok){if(i instanceof Error)return new Ia({...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 Ia(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}if(i instanceof Error)throw i;if(eH(i)&&t.fetchOptions.errorPolicy==="none"){const a=i._tag==="Batch"?{...i.executionResults,...s}:{...i.executionResult,...s};return new Ia(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}switch(i._tag){case"Single":return{...s,...SE(t)(i.executionResult)};case"Batch":return{...s,data:i.executionResults.map(SE(t))};default:xv(i)}},SE=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy==="all"?t.errors:void 0}),nH=(e,t,r)=>t&&QU(t)?yE(r.parse(e)):yE(e),oH=e=>async t=>{const r=new Headers(t.headers);let n=null,o;r.has(gE)||r.set(gE,[bE,$v].join(", ")),e==="POST"?(o=(t.fetchOptions.jsonSerializer??Iv).stringify(iH(t)),typeof o=="string"&&!r.has(Av)&&r.set(Av,$v)):n=sH(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,...p}=c;s=new URL(d),a=p}return n&&n.forEach((c,d)=>{s.searchParams.append(d,c)}),await(t.fetch??fetch)(s,a)},iH=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 eE(e.request.query,e.request.variables??[]).map(([t,r])=>({query:t,variables:r}));default:throw xv(e.request)}},sH=e=>{const t=e.fetchOptions.jsonSerializer??Iv,r=new URLSearchParams;switch(e.request._tag){case"Single":return r.append("query",vE(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(vE),i=eE(o,n).map(([s,a])=>({query:s,variables:a}));return r.append("query",t.stringify(i)),r}default:throw xv(e.request)}};class aH{url;requestConfig;constructor(t,r={}){this.url=t,this.requestConfig=r}rawRequest=async(...t)=>{const[r,n,o]=t,i=cU(r,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:p,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=_v(i.query,p),y=await Nv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Rl(yv(s)),...Rl(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=lH(t,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:p,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=_v(i.document,p),y=await Nv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Rl(yv(s)),...Rl(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=uU(t,r),{headers:o,excludeOperationName:i,...s}=this.requestConfig;n.signal!==void 0&&(s.signal=n.signal);const a=n.documents.map(({document:m})=>_v(m,i)),l=a.map(({expression:m})=>m),c=a.some(({isMutation:m})=>m),d=n.documents.map(({variables:m})=>m),p=await Nv({url:this.url,request:{_tag:"Batch",operationName:void 0,query:l,hasMutations:c,variables:d},headers:{...Rl(yv(o)),...Rl(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(p,{operationName:void 0,variables:d,url:this.url}),p instanceof Error)throw p;return p.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 lH=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},
|
|
92
|
+
${String(e)}`)}catch(t){return t}},xE=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(!lp(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(!lp(e.data)&&e.data!==null)throw new Error("Invalid execution result: data is not plain object");r=e.data}if("extensions"in e){if(!lp(e.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=e.extensions}return{data:r,errors:t,extensions:n}},eH=e=>e._tag==="Batch"?e.executionResults.some(wE):wE(e.executionResult),wE=e=>Array.isArray(e.errors)?e.errors.length>0:!!e.errors,CE=e=>typeof e=="object"&&e!==null&&"kind"in e&&e.kind===We.OPERATION_DEFINITION,tH=e=>{let t;const r=e.definitions.filter(CE);return r.length===1&&(t=r[0].name?.value),t},rH=e=>{let t=!1;const r=e.definitions.filter(CE);return r.length===1&&(t=r[0].operation==="mutation"),t},_v=(e,t)=>{const r=typeof e=="string"||"kind"in e?e:String(e),n=typeof r=="string"?r:YU(r);let o=!1,i;if(t)return{expression:n,isMutation:o,operationName:i};const s=aU(()=>typeof r=="string"?KU(r):r);return s instanceof Error?{expression:n,isMutation:o,operationName:i}:(i=tH(s),o=rH(s),{expression:n,operationName:i,isMutation:o})},Iv=JSON,Nv=async e=>{const t={...e,method:e.request._tag==="Single"?e.request.document.isMutation?"POST":QP(e.method??"post"):e.request.hasMutations?"POST":QP(e.method??"post"),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??"none"}},n=await oH(t.method)(t),o=await n.text();let i;try{i=nH(o,n.headers.get(Av),e.fetchOptions.jsonSerializer??Iv)}catch(a){i=a}const s={status:n.status,headers:n.headers,body:o};if(!n.ok){if(i instanceof Error)return new Ia({...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 Ia(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}if(i instanceof Error)throw i;if(eH(i)&&t.fetchOptions.errorPolicy==="none"){const a=i._tag==="Batch"?{...i.executionResults,...s}:{...i.executionResult,...s};return new Ia(a,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}switch(i._tag){case"Single":return{...s,...SE(t)(i.executionResult)};case"Batch":return{...s,data:i.executionResults.map(SE(t))};default:xv(i)}},SE=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy==="all"?t.errors:void 0}),nH=(e,t,r)=>t&&QU(t)?yE(r.parse(e)):yE(e),oH=e=>async t=>{const r=new Headers(t.headers);let n=null,o;r.has(gE)||r.set(gE,[bE,$v].join(", ")),e==="POST"?(o=(t.fetchOptions.jsonSerializer??Iv).stringify(iH(t)),typeof o=="string"&&!r.has(Av)&&r.set(Av,$v)):n=sH(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,...p}=c;s=new URL(d),a=p}return n&&n.forEach((c,d)=>{s.searchParams.append(d,c)}),await(t.fetch??fetch)(s,a)},iH=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 eE(e.request.query,e.request.variables??[]).map(([t,r])=>({query:t,variables:r}));default:throw xv(e.request)}},sH=e=>{const t=e.fetchOptions.jsonSerializer??Iv,r=new URLSearchParams;switch(e.request._tag){case"Single":return r.append("query",vE(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(vE),i=eE(o,n).map(([s,a])=>({query:s,variables:a}));return r.append("query",t.stringify(i)),r}default:throw xv(e.request)}};class aH{url;requestConfig;constructor(t,r={}){this.url=t,this.requestConfig=r}rawRequest=async(...t)=>{const[r,n,o]=t,i=cU(r,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:p,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=_v(i.query,p),y=await Nv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Rl(yv(s)),...Rl(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=lH(t,n,o),{headers:s,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:d,excludeOperationName:p,...m}=this.requestConfig,{url:g}=this;i.signal!==void 0&&(m.signal=i.signal);const b=_v(i.document,p),y=await Nv({url:g,request:{_tag:"Single",document:b,variables:i.variables},headers:{...Rl(yv(s)),...Rl(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=uU(t,r),{headers:o,excludeOperationName:i,...s}=this.requestConfig;n.signal!==void 0&&(s.signal=n.signal);const a=n.documents.map(({document:m})=>_v(m,i)),l=a.map(({expression:m})=>m),c=a.some(({isMutation:m})=>m),d=n.documents.map(({variables:m})=>m),p=await Nv({url:this.url,request:{_tag:"Batch",operationName:void 0,query:l,hasMutations:c,variables:d},headers:{...Rl(yv(o)),...Rl(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(p,{operationName:void 0,variables:d,url:this.url}),p instanceof Error)throw p;return p.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 lH=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},dt=(e,...t)=>e.reduce((r,n,o)=>`${r}${n}${o in t?String(t[o]):""}`,"");let kE;function uH(){const e={"MobielNl-Application":"elements-client"},t="https://graph.mobiel.nl/api";return kE=new aH(t,{headers:e}),kE}function Dv(e,t={}){return uH().request(e,t)}function nn([e,t]){return Dv(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 Mv=dt`
|
|
93
93
|
fragment PhoneSelectorPhone on Product {
|
|
94
94
|
slug
|
|
95
95
|
fullName
|
|
@@ -171,7 +171,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
`,cH=
|
|
174
|
+
`,cH=dt`
|
|
175
175
|
${Mv}
|
|
176
176
|
|
|
177
177
|
query phoneSelectorPhones($brand: Value) {
|
|
@@ -188,7 +188,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
`;function dH(e){const{data:t,error:r,isLoading:n}=Ko(e&&e!=="popular"?[cH,{brand:e}]:null,{use:[Yn],fetcher:nn});return{phones:t?.searchProducts?.records||[],isLoading:n,error:r}}const fH=
|
|
191
|
+
`;function dH(e){const{data:t,error:r,isLoading:n}=Ko(e&&e!=="popular"?[cH,{brand:e}]:null,{use:[Yn],fetcher:nn});return{phones:t?.searchProducts?.records||[],isLoading:n,error:r}}const fH=dt`
|
|
192
192
|
query phoneSelectorBrands {
|
|
193
193
|
searchBrands(query: {
|
|
194
194
|
where: [
|
|
@@ -203,7 +203,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
`,pH=
|
|
206
|
+
`,pH=dt`
|
|
207
207
|
${Mv}
|
|
208
208
|
|
|
209
209
|
query phoneSelectorPopularPhones {
|
|
@@ -223,7 +223,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
223
223
|
`;function hH(){const{data:e,error:t,isLoading:r}=Ko([fH],{use:[Yn],fetcher:nn}),{data:n,error:o,isLoading:i}=Ko([pH],{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 PE=new WeakMap;function hp(e,t,r){if(!e)return"";typeof t=="string"&&(t=t.replace(/\s+/g,""));let n=PE.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 Ov(e){return EL()?e.altKey:e.ctrlKey}function mp(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 EE=new WeakMap;function mH(e){let t=rn();return EE.set(e,t),t}function gH(e){return EE.get(e)}const bH=1e3;function TE(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:n}=e,o=x.useRef({search:"",timeout:void 0}).current,i=s=>{let a=vH(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=""},bH)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:void 0}}}function vH(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function jv(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:p,allowsTabNavigation:m=!1,isVirtualized:g,scrollRef:b=n,linkBehavior:y="action"}=e,{direction:v}=jn(),C=Uu(),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&&!Ov(B)){as.flushSync(()=>{t.setFocusedKey(te,ge)});let Se=mp(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&&!Ov(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,Cl(B));t.setFocusedKey(te),te!=null&&(Cl(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,Cl(B));t.setFocusedKey(te),te!=null&&(Cl(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":Cl(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&&!K4(document.activeElement))&&co(ge)}break}}},k=x.useRef({top:0,left:0});Gd(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=mp(n,t.focusedKey);T instanceof HTMLElement&&(!T.contains(document.activeElement)&&!p&&co(T),ic()==="keyboard"&&gs(T,{containingElement:n.current}))}}},E=B=>{B.currentTarget.contains(B.relatedTarget)||t.setFocused(!1)},I=x.useRef(!1);Gd(n,VL,p?B=>{let{detail:U}=B;B.stopPropagation(),t.setFocused(!0),U?.focusStrategy==="first"&&(I.current=!0)}:void 0),O4(()=>{if(I.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();Tk(n.current),Ak(L,null),t.collection.size>0&&(I.current=!1)}else t.setFocusedKey(W),I.current=!1}},[t.collection]),O4(()=>{t.collection.size>0&&(I.current=!1)},[t.focusedKey]),Gd(n,KL,p?B=>{var U;B.stopPropagation(),t.setFocused(!1),!((U=B.detail)===null||U===void 0)&&U.clearFocusKey&&t.setFocusedKey(null)}:void 0);const j=x.useRef(o),N=x.useRef(!1);x.useEffect(()=>{if(j.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&&!p&&n.current&&wn(n.current),t.collection.size>0&&(j.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=ic(),U=mp(n,t.focusedKey);if(!(U instanceof HTMLElement))return;(B==="keyboard"||N.current)&&(M.current&&cancelAnimationFrame(M.current),M.current=requestAnimationFrame(()=>{b.current&&(F4(b.current,U),B!=="virtual"&&gs(U,{containingElement:n.current}))}))}!p&&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)},[]),Gd(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}=TE({keyboardDelegate:r,selectionManager:t});d||(V=it(R,V));let K;p||(K=t.focusedKey==null?0:-1);let O=mH(t.collection);return{collectionProps:it(V,{tabIndex:K,"data-collection":O})}}function gp(e){let{id:t,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:s,focus:a,isDisabled:l,onAction:c,allowsDifferentPressOrigin:d,linkBehavior:p="action"}=e,m=Uu();t=rn(t);let g=T=>{if(T.pointerType==="keyboard"&&Ov(T))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(p==="selection"&&o.current){let F=r.getItemProps(n);m.open(o.current,T,F.href,F.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(p==="override"||p==="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&&(Cl(T)||T.pointerType==="touch"||T.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};x.useEffect(()=>{n===r.focusedKey&&r.isFocused&&(s?Tk(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)&&p==="override",v=c&&e.UNSTABLE_itemBehavior==="action",C=r.isLink(n)&&p!=="selection"&&p!=="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",I=P||E,j=x.useRef(null),N=I&&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=>{j.current=T.pointerType,D.current=N,T.pointerType==="keyboard"&&(!I||$E())&&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"&&!AE())return;R(T)}else T.pointerType!=="keyboard"&&S&&g(T)}):(K.onPressStart=T=>{j.current=T.pointerType,D.current=N,M.current=P,S&&(T.pointerType==="mouse"&&!P||T.pointerType==="keyboard"&&(!k||$E()))&&g(T)},K.onPress=T=>{(T.pointerType==="touch"||T.pointerType==="pen"||T.pointerType==="virtual"||T.pointerType==="keyboard"&&I&&AE()||T.pointerType==="mouse"&&M.current)&&(I?R(T):S&&g(T))}),b["data-collection"]=gH(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]=fs(K[T],V[T]));let{pressProps:O,isPressed:B}=xn(K),U=E?T=>{j.current==="mouse"&&(T.stopPropagation(),T.preventDefault(),R(T))}:void 0,{longPressProps:W}=xk({isDisabled:!N,onLongPress(T){T.pointerType==="touch"&&(g(T),r.setSelectionBehavior("toggle"))}}),L=T=>{j.current==="touch"&&D.current&&T.preventDefault()},Z=p!=="none"&&r.isLink(n)?T=>{Mi.isOpening||T.preventDefault()}:void 0;return{itemProps:it(b,S||P||s&&!l?O:{},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:I}}function AE(){let e=window.event;return e?.key==="Enter"}function $E(){let e=window.event;return e?.key===" "||e?.code==="Space"}let Lv=class{getItemRect(t){let r=this.ref.current;if(!r)return null;let n=t!=null?mp(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}},_E=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&&!wl(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&&!wl(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 Lv(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 Lv(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function yH(e){let{selectionManager:t,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:s}=e,a=Xd({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,c=x.useMemo(()=>i||new _E({collection:r,disabledKeys:n,disabledBehavior:l,ref:o,collator:a,layoutDelegate:s}),[i,s,r,n,o,a,l]),{collectionProps:d}=jv({...e,ref:o,selectionManager:t,keyboardDelegate:c});return{listProps:d}}function xH(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:p}=gp({selectionManager:s,key:n,ref:r,isDisabled:c,shouldSelectOnPressUp:i,linkBehavior:"selection"}),m=hp(t,n,"tab"),g=hp(t,n,"tabpanel"),{tabIndex:b}=d,y=t.collection.getItem(n),v=Ln(y?.props,{labelable:!0});delete v.id;let C=eg(y?.props),{focusableProps:S}=Li({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:p}}function wH(e,t,r){let n=Ek(r)?void 0:0;var o;const i=hp(t,(o=e.id)!==null&&o!==void 0?o:t?.selectedKey,"tabpanel"),s=Hd({...e,id:i,"aria-labelledby":hp(t,t?.selectedKey,"tab")});return{tabPanelProps:it(s,{tabIndex:n,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class CH{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 SH(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 CH(i,l,n,a),[i,a,n,l]),{collectionProps:d}=jv({ref:r,selectionManager:s,keyboardDelegate:c,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),p=rn();PE.set(t,p);let m=Hd({...e,id:p});return{tabListProps:{...it(d,m),role:"tablist","aria-orientation":n,tabIndex:void 0}}}var IE=Xe((e,t)=>{var r,n;const{as:o,tabKey:i,destroyInactiveTabPanel:s,state:a,className:l,slots:c,classNames:d,...p}=e,m=o||"div",g=ot(t),{tabPanelProps:b}=wH({...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:eO(!E),...E&&Oe(b,y,p),className:(n=c.panel)==null?void 0:n.call(c,{class:P}),"data-slot":"panel",children:k})});IE.displayName="HeroUI.TabPanel";var kH=IE;const NE=e=>typeof e=="object"&&e!=null&&e.nodeType===1,DE=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",bp=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return DE(r.overflowY,t)||DE(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},vp=(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,PH=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},ME=(e,t)=>{var r,n,o,i;if(typeof document>"u")return[];const{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:d}=t,p=typeof c=="function"?c:U=>U!==c;if(!NE(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,g=[];let b=e;for(;NE(b)&&p(b);){if(b=PH(b),b===m){g.push(b);break}b!=null&&b===document.body&&bp(b)&&!bp(document.documentElement)||b!=null&&bp(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:I,bottom:j,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"?j+V:E+k/2-D+V,O=l==="center"?N+P/2-R+M:l==="end"?I+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&&j<=v&&I<=y&&(W===m&&!bp(W)||E>=T&&j<=$&&N>=H&&I<=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"?vp(S,S+v,v,oe,le,S+K,S+K+k,k):K-v/2,te=l==="start"?O:l==="center"?O-y/2:l==="end"?O-y:vp(C,C+y,y,X,Q,C+O,C+O+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"?vp(T,$,L,oe,le+Se,K,K+k,k):K-(T+L/2)+Se/2,te=l==="start"?O-H-X:l==="center"?O-(H+Z/2)+ge/2:l==="end"?O-F+Q+ge:vp(H,F,Z,X,Q+ge,O,O+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,O+=be-te}B.push({el:W,top:ue,left:te})}return B},EH=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function TH(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(ME(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:n,top:o,left:i}of ME(e,EH(t)))n.scroll({top:o,left:i,behavior:r})}var OE=Xe((e,t)=>{var r;const{className:n,as:o,item:i,state:s,classNames:a,isDisabled:l,listRef:c,slots:d,shouldSelectOnPressUp:p,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}=xH({key:b,isDisabled:l,shouldSelectOnPressUp:p},s,y);e.children==null&&delete S["aria-controls"];const I=l||P,{focusProps:j,isFocused:N,isFocusVisible:D}=Ir(),{hoverProps:M,isHovered:V}=dn({isDisabled:I}),R=A(a?.tab,n),K=()=>{!y?.current||!c?.current||TH(y.current,{scrollMode:"if-needed",behavior:"smooth",block:"end",inline:"end",boundary:c?.current})};return h.jsx(v,{ref:Gm(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,I?{}:{...j,...M},Lt(g,{enabled:C,omitPropNames:new Set(["title"]),omitEventNames:new Set(["onClick"])}),{onClick:uo(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})})});OE.displayName="HeroUI.Tab";var AH=OE;class jE{*[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 Ro extends Set{constructor(t,r,n){super(t),t instanceof Ro?(this.anchorKey=r??t.anchorKey,this.currentKey=n??t.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function $H(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function LE(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),p=x.useMemo(()=>FE(e.selectedKeys),[e.selectedKeys]),m=x.useMemo(()=>FE(e.defaultSelectedKeys,new Ro),[e.defaultSelectedKeys]),[g,b]=Oo(p,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||!$H(k,g))&&b(k)},disabledKeys:y,disabledBehavior:i}}function FE(e,t){return e?e==="all"?"all":new Ro(e):t}function BE(e){return null}BE.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:_H(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 _H(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&x.Children.count(e.children)>0)}let zE=BE;class IH{build(t,r){return this.context=r,KE(()=>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 j=[...this.getFullNode({...P,key:E,index:S,wrapper:NH(t.wrapper,P.wrapper)},this.getChildState(r,P),n?`${n}${s.key}`:s.key,o)];for(let N of j){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 p;if(t.type&&N.type!==t.type)throw new Error(`Unsupported type <${Fv(N.type)}> in <${Fv((p=o?.type)!==null&&p!==void 0?p:"unknown parent type")}>. Only <${Fv(t.type)}> is supported.`);S++,yield N}k=C.next(j)}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:KE(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 KE(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 NH(e,t){if(e&&t)return r=>e(t(r));if(e)return e;if(t)return t}function Fv(e){return e[0].toUpperCase()+e.slice(1)}function VE(e,t,r){let n=x.useMemo(()=>new IH,[]),{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 Vi(e){return vc(e,0)}function vc(e,t){if(t<0)return;let r=0;for(let n of e){if(r===t)return n;r++}}function Ds(e){let t;for(let r of e)t=r;return t}function Bv(e,t,r){if(t.parentKey===r.parentKey)return t.index-r.index;let n=[...RE(e,t),t],o=[...RE(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 RE(e,t){let r=[],n=t;for(;n?.parentKey!=null;)n=e.getItem(n.parentKey),n&&r.unshift(n);return r}const WE=new WeakMap;function DH(e){let t=WE.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),WE.set(e,r),r}class yp{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&&Bv(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&&Bv(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 Ro([r],r,r);else{let s=this.state.selectedKeys;var o;let a=(o=s.anchorKey)!==null&&o!==void 0?o:r;n=new Ro(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?Bv(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 Ro(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 Ro([r],r,r):new Ro;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let r=new Ro;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=Vi(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 Ro)}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 yp(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 zv(e){let{filter:t,layoutDelegate:r}=e,n=LE(e),o=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=x.useCallback(c=>t?new jE(t(c)):new jE(c),[t]),s=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),a=VE(e,i,s),l=x.useMemo(()=>new yp(a,n,{layoutDelegate:r}),[a,n,r]);return MH(a,l),{collection:a,disabledKeys:o,selectionManager:l}}function MH(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),p=[...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=p?.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 OH(e){var t;let[r,n]=Oo(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}=zv({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:c=>{if(c==="all")return;var d;let p=(d=c.values().next().value)!==null&&d!==void 0?d:null;p===r&&e.onSelectionChange&&e.onSelectionChange(p),n(p)}}),l=r!=null?i.getItem(r):null;return{collection:i,disabledKeys:s,selectionManager:a,selectedKey:r,setSelectedKey:n,selectedItem:l}}function jH(e){var t,r;let n=OH({...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:UE(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=UE(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 UE(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 LH(e){var t,r,n;const o=ur(),[i,s]=qr(e,pC.variantKeys),{ref:a,as:l,className:c,classNames:d,children:p,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",I=g||E==="start"||E==="end"?"vertical":"horizontal",j=jH({children:p,...v}),{tabListProps:N}=SH({...v,orientation:I},j,k),D=x.useMemo(()=>pC({...s,disableAnimation:P,...g?{placement:"start"}:{}}),[jr(s),P,g]),M=A(d?.base,c),V=x.useMemo(()=>({state:j,slots:D,classNames:d,disableAnimation:P,listRef:k,shouldSelectOnPressUp:b,disableCursorAnimation:m,isDisabled:e?.isDisabled}),[j,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]),O=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:j,values:V,destroyInactiveTabPanel:y,getBaseProps:R,getTabListProps:O,getWrapperProps:K,getTabCursorProps:B}}var FH=Xe(function(t,r){const{Component:n,values:o,state:i,domRef:s,destroyInactiveTabPanel:a,getBaseProps:l,getTabListProps:c,getWrapperProps:d,getTabCursorProps:p}=LH({...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(AH,{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,I=E?.key,j=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 O,B;(O=P.current)==null||O.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},O=j(K);N(()=>{P.current.style.left=O.left,P.current.style.top=O.top,P.current.style.width=O.width,P.current.style.height=O.height})},[P.current,j,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="${I}"]`);if(!K)return;const O=new ResizeObserver(M);return O.observe(K),()=>O.disconnect()},[s.current,M,I]);const V=x.useMemo(()=>h.jsxs(h.Fragment,{children:[h.jsx("div",{...l(),children:h.jsxs(n,{...c(),children:[!o.disableAnimation&&!o.disableCursorAnimation&&I!=null&&h.jsx("span",{...p(),ref:P}),g]})}),[...i.collection].map(R=>h.jsx(kH,{classNames:o.classNames,destroyInactiveTabPanel:a,slots:o.slots,state:o.state,tabKey:R.key},R.key))]}),[n,l,c,p,g,I,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}),HE=FH,qE=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]||{}},GE=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],BH=(e,t)=>{if(t.includes("-")){const[r]=t.split("-");if(r.includes(e))return!1}return!0},xp=(e,t)=>{if(t.includes("-")){const[,r]=t.split("-");return`${e}-${r}`}return e},yc=new WeakMap,Bn=[];function zH(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}),p=c(l);if(p===NodeFilter.FILTER_ACCEPT&&i(l),p!==NodeFilter.FILTER_REJECT){let m=d.nextNode();for(;m!=null;)i(m),m=d.nextNode()}},i=l=>{var c;let d=(c=yc.get(l))!=null?c:0;l.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&l.setAttribute("aria-hidden","true"),n.add(l),yc.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=yc.get(l);c!=null&&(c===1?(l.removeAttribute("aria-hidden"),yc.delete(l)):yc.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 KH(e){let t=Bn[Bn.length-1];if(t&&!t.visibleNodes.has(e))return t.visibleNodes.add(e),()=>{t.visibleNodes.delete(e)}}var VH=zE,Hl=VH;function RH({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 p=d.offsetLeft-c.clientWidth/2+d.offsetWidth/2;c.scrollTo({left:Math.max(0,p),behavior:"smooth"})},[s,e.length]);function l(c){a(c),r(c)}return h.jsxs(HE,{ref:i,selectedKey:s,color:"primary",size:"sm","aria-label":o("phoneSelector.selectBrand"),classNames:{base:A("w-full",n?.base),...n},children:[h.jsx(Hl,{title:o("phoneSelector.popular"),onClick:()=>l("popular")},"popular"),e.map(c=>h.jsx(Hl,{title:c.name,onClick:()=>l(c.slug)},c.slug))]})}var WH=zE,Da=WH;const Kv=new WeakMap;function UH(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function HH(e,t){let r=Kv.get(e);if(!r)throw new Error("Unknown list");return`${r.id}-option-${UH(t)}`}function wp(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=Hd({id:t,"aria-label":o,"aria-labelledby":n});return{labelProps:a,fieldProps:l}}function Cp(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:s}=wp(e),a=Ru([!!t,!!r,n,o]),l=Ru([!!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 qH(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}=yH({...e,ref:r,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,linkBehavior:i}),{focusWithinProps:a}=Pa({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),l=rn(e.id);Kv.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}=wp({...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 GH(e,t,r){var n,o;let{key:i}=e,s=Kv.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 p;let m=(p=e.shouldSelectOnPressUp)!==null&&p!==void 0?p: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=Ru(),P=Ru(),E={role:"option","aria-disabled":l||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?d:void 0};ps()&&Qm()||(E["aria-label"]=e["aria-label"],E["aria-labelledby"]=k,E["aria-describedby"]=P);let I=t.collection.getItem(i);if(S){let W=Number(I?.index);E["aria-posinset"]=Number.isNaN(W)?void 0:W+1,E["aria-setsize"]=DH(t.collection)}let j=s?.onAction?()=>{var W;return s==null||(W=s.onAction)===null||W===void 0?void 0:W.call(s,i)}:void 0,N=HH(t,i),{itemProps:D,isPressed:M,isFocused:V,hasAction:R,allowsSelection:K}=gp({selectionManager:t.selectionManager,key:i,ref:r,shouldSelectOnPressUp:m,allowsDifferentPressOrigin:m&&b,isVirtualized:S,shouldUseVirtualFocus:v,isDisabled:l,onAction:j||!(I==null||(n=I.props)===null||n===void 0)&&n.onAction?fs(I==null||(o=I.props)===null||o===void 0?void 0:o.onAction,j):void 0,linkBehavior:s?.linkBehavior,UNSTABLE_itemBehavior:s?.UNSTABLE_itemBehavior,id:N}),{hoverProps:O}=dn({isDisabled:l||!b,onHoverStart(){Ol()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i))}}),B=Ln(I?.props);delete B.id;let U=eg(I?.props);return{optionProps:{...E,...it(B,D,O,U),id:N},labelProps:{id:k},descriptionProps:{id:P},isFocused:V,isFocusVisible:V&&t.selectionManager.isFocused&&Ol(),isSelected:d,isDisabled:l,isPressed:M,allowsSelection:K,hasAction:R}}function ZH(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 YH(e){var t;const r=ur(),{ref:n,as:o,state:i,variant:s,color:a,onAction:l,children:c,onSelectionChange:d,disableAnimation:p=(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,I=o||"ul",j=typeof I=="string",N=ot(n),D=zv({...e,children:c,onSelectionChange:d}),M=i||D,{listBoxProps:V}=qH({...e,onAction:l},M,N),R=x.useMemo(()=>Z8(),[]),K=A(P?.base,g);return{Component:I,state:M,variant:s,color:a,slots:R,classNames:P,topContent:b,bottomContent:y,emptyContent:v,hideEmptyContent:S,shouldHighlightOnFocus:k,hideSelectedIcon:C,disableAnimation:p,className:g,itemClasses:m,getBaseProps:(W={})=>({ref:N,"data-slot":"base",className:R.base({class:K}),...Lt(E,{enabled:j}),...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 JH(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 XH=700;function QH(){return vl()||typeof window>"u"?!1:window.screen.width<=XH}function eq(e){var t,r;const n=ur(),[o,i]=qr(e,mC.variantKeys),{as:s,item:a,state:l,description:c,startContent:d,endContent:p,isVirtualized:m,selectedIcon:g,className:b,classNames:y,autoFocus:v,onPress:C,onPressUp:S,onPressStart:k,onPressEnd:P,onPressChange:E,onClick:I,shouldHighlightOnFocus:j,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"),O=typeof K=="string",{rendered:B,key:U}=a,W=l.disabledKeys.has(U)||e.isDisabled,L=l.selectionManager.selectionMode!=="none",Z=QH(),{pressProps:T,isPressed:F}=xn({ref:R,isDisabled:W,onClick:I,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}=GH({key:U,isDisabled:W,"aria-label":o["aria-label"],isVirtualized:m},l,R);let ge=le;const Se=x.useMemo(()=>mC({...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=lO(ge));const we=j&&oe||(Z?$||F:$||oe&&!Y),be=(Pe={})=>({ref:R,...Oe(ge,D?{}:Oe(X,T),H,Lt(M,{enabled:O}),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:p,selectedIcon:g,hideSelectedIcon:N,disableAnimation:V,getItemProps:be,getLabelProps:re,getWrapperProps:Ne,getDescriptionProps:ke,getSelectedIconProps:Me}}var ZE=e=>{const{Component:t,rendered:r,description:n,isSelectable:o,isSelected:i,isDisabled:s,selectedIcon:a,startContent:l,endContent:c,hideSelectedIcon:d,disableAnimation:p,getItemProps:m,getLabelProps:g,getWrapperProps:b,getDescriptionProps:y,getSelectedIconProps:v}=eq(e),C=x.useMemo(()=>{const S=h.jsx(JH,{disableAnimation:p,isSelected:i});return typeof a=="function"?a({icon:S,isSelected:i,isDisabled:s}):a||S},[a,i,s,p]);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]})};ZE.displayName="HeroUI.ListboxItem";var Vv=ZE;function tq(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 rq(e){const{as:t,className:r,orientation:n,...o}=e;let i=t||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:s}=tq({elementType:typeof i=="string"?i:"hr",orientation:n}),a=x.useMemo(()=>xC({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 YE=Xe((e,t)=>{const{Component:r,getDividerProps:n}=rq({...e});return h.jsx(r,{ref:t,...n()})});YE.displayName="HeroUI.Divider";var ql=YE,JE=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:p,title:m,items:g,...b},y)=>{const v=r||"li",C=x.useMemo(()=>Y8(),[]),S=A(a?.base,s),k=A(a?.divider,d?.className),{itemProps:P,headingProps:E,groupProps:I}=ZH({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",{...I,className:C.group({class:a?.group}),"data-has-title":!!e.rendered,"data-slot":"group",children:[[...e.childNodes].map(j=>{const{key:N,props:D}=j;let M=h.jsx(Vv,{classNames:p,color:o,disableAnimation:i,hideSelectedIcon:l,item:j,state:t,variant:n,...D},N);return j.wrapper&&(M=j.wrapper(M)),M}),c&&h.jsx(ql,{as:"li",className:C.divider({class:k}),...d})]})]},e.key)});JE.displayName="HeroUI.ListboxSection";var XE=JE;function Gl(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 Rv(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const nq=(e,t)=>Math.abs(e-t)<1,oq=(e,t,r)=>{let n;return function(...o){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,o),r)}},iq=e=>e,sq=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},aq=(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)}},QE={passive:!0},lq=typeof window>"u"?!0:"onscrollend"in window,uq=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const i=e.options.useScrollendEvent&&lq?()=>{}:oq(n,()=>{t(o,!1)},e.options.isScrollingResetDelay),s=c=>()=>{const{horizontal:d,isRtl:p}=e.options;o=d?r.scrollLeft*(p&&-1||1):r.scrollTop,i(),t(o,c)},a=s(!0),l=s(!1);return l(),r.addEventListener("scroll",a,QE),r.addEventListener("scrollend",l,QE),()=>{r.removeEventListener("scroll",a),r.removeEventListener("scrollend",l)}},cq=(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"])},dq=(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 fq{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:iq,rangeExtractor:sq,onChange:()=>{},measureElement:cq,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=Gl(()=>(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=Gl(()=>[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=Gl(()=>[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 p=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(p),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:p,lane:C}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Gl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,o)=>this.range=r.length>0&&n>0?pq({measurements:r,outerSize:n,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Gl(()=>{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=Gl(()=>[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 Rv(n[eT(0,n.length-1,o=>Rv(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]=Rv(this.getOffsetForIndex(r,a));nq(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 eT=(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 pq({measurements:e,outerSize:t,scrollOffset:r}){const n=e.length-1,i=eT(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 tT=typeof document<"u"?Er.useLayoutEffect:Er.useEffect;function hq(e){const t=Er.useReducer(()=>({}),{})[1],r={...e,onChange:(o,i)=>{var s;i?as.flushSync(t):t(),(s=e.onChange)==null||s.call(e,o,i)}},[n]=Er.useState(()=>new fq(r));return n.setOptions(r),tT(()=>n._didMount(),[]),tT(()=>n._willUpdate()),n}function rT(e){return hq({observeElementRect:aq,observeElementOffset:uq,scrollToFn:dq,...e})}function mq(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}${kC(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)}},p=()=>{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 I=k==="vertical"?S>i:c.scrollLeft>i,j=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,I,j,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return p(),c.addEventListener("scroll",p,!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",p,!0),m()}},[...a,r,o,n,s,t])}function gq(e){var t;const[r,n]=qr(e,wd.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:p="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);mq({domRef:v,offset:d,visibility:p,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>wd({...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 bq=(e,t)=>{const r=[];for(const n of e)n.type==="section"?r.push(([...n.childNodes].length+1)*t):r.push(t);return r},vq=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}},yq=e=>{var t;const{Component:r,state:n,color:o,variant:i,itemClasses:s,getBaseProps:a,topContent:l,bottomContent:c,hideEmptyContent:d,hideSelectedIcon:p,shouldHighlightOnFocus:m,disableAnimation:g,getEmptyContentProps:b,getListProps:y,scrollShadowProps:v}=e,{virtualization:C}=e;if(!C||!cs(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),I=x.useMemo(()=>bq([...n.collection],k),[n.collection,k]),j=rT({count:[...n.collection].length,getScrollElement:()=>E.current,estimateSize:B=>I[B]}),N=j.getVirtualItems(),D=j.getTotalSize(),{getBaseProps:M}=gq({...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:p,...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(XE,{...L,itemClasses:s,style:{...Z,...L.style}},W.key);let T=h.jsx(Vv,{...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}),O=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(vq(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,O,c]})},xq=yq,wq=Xe(function(t,r){const{isVirtualized:n,...o}=t,i=YH({...o,ref:r}),{Component:s,state:a,color:l,variant:c,itemClasses:d,getBaseProps:p,topContent:m,bottomContent:g,hideEmptyContent:b,hideSelectedIcon:y,shouldHighlightOnFocus:v,disableAnimation:C,getEmptyContentProps:S,getListProps:k}=i;if(n)return h.jsx(xq,{...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 I;const j={color:l,item:E,state:a,variant:c,disableAnimation:C,hideSelectedIcon:y,...E.props};if(E.type==="section")return h.jsx(XE,{...j,itemClasses:d},E.key);let N=h.jsx(Vv,{...j,classNames:Oe(d,(I=E.props)==null?void 0:I.classNames),shouldHighlightOnFocus:v},E.key);return E.wrapper&&(N=E.wrapper(N)),N})]});return h.jsxs("div",{...p(),children:[m,P,g]})}),Wv=wq;function Cq(e){var t,r;const n=ur(),[o,i]=qr(e,vC.variantKeys),{as:s,children:a,isLoaded:l=!1,className:c,classNames:d,...p}=o,m=s||"div",g=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,b=x.useMemo(()=>vC({...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)}),...p}),getContentProps:(S={})=>({className:b.content({class:A(d?.content,S?.className)})})}}var nT=Xe((e,t)=>{const{Component:r,children:n,getSkeletonProps:o,getContentProps:i}=Cq({...e});return h.jsx(r,{ref:t,...o(),children:h.jsx("div",{...i(),children:n})})});nT.displayName="HeroUI.Skeleton";var Tr=nT;function Sq({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(Wv,{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(Da,{textValue:s.fullName,children:h.jsxs("div",{className:"flex items-center gap-3",children:[s.productVersion?.media?.main?.url?h.jsx(zl,{alt:s.productVersion.media.main.altText||s.fullName,src:tv(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(zl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(Hm,{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[kq,Uv]=ga({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),oT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=Uv(),p=A(d?.body,o);return h.jsx(a,{ref:l,className:(r=c.body)==null?void 0:r.call(c,{class:p}),...s,children:i})});oT.displayName="HeroUI.CardBody";var iT=oT,sT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=Uv(),p=A(d?.footer,o);return h.jsx(a,{ref:l,className:(r=c.footer)==null?void 0:r.call(c,{class:p}),...s,children:i})});sT.displayName="HeroUI.CardFooter";var Pq=sT,aT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=Uv(),p=A(d?.header,o);return h.jsx(a,{ref:l,className:(r=c.header)==null?void 0:r.call(c,{class:p}),...s,children:i})});aT.displayName="HeroUI.CardHeader";var Eq=aT;function Tq(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,sC.variantKeys),{ref:l,as:c,children:d,onClick:p,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,I=(o=(n=e.disableRipple)!=null?n:i?.disableRipple)!=null?o:!1,j=A(y?.base,b),{onClear:N,onPress:D,ripples:M}=mP(),V=x.useCallback(H=>{I||E||S.current&&D(H)},[I,E,S,D]),{buttonProps:R,isPressed:K}=Qf({onPress:uo(m,V),elementType:c,isDisabled:!e.isPressable,onClick:p,allowTextSelectionOnPress:v,...C},S),{hoverProps:O,isHovered:B}=dn({isDisabled:!e.isHoverable,...C}),{isFocusVisible:U,isFocused:W,focusProps:L}=Ir({autoFocus:g}),Z=x.useMemo(()=>sC({...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:j}),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?O:{},Lt(C,{enabled:P}),Lt(H))}),[S,Z,j,P,e.isPressable,e.isHoverable,e.isDisabled,B,K,U,R,L,O,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:I,handlePress:V,isFocusVisible:U,getCardProps:F,getRippleProps:$}}var lT=Xe((e,t)=>{const{children:r,context:n,Component:o,isPressable:i,disableAnimation:s,disableRipple:a,getCardProps:l,getRippleProps:c}=Tq({...e,ref:t});return h.jsxs(o,{...l(),children:[h.jsx(kq,{value:n,children:r}),i&&!s&&!a&&h.jsx(hP,{...c()})]})});lT.displayName="HeroUI.Card";var Ms=lT;function Aq(e){const{collection:t,disabledKeys:r,selectionManager:n,selectionManager:{setSelectedKeys:o,selectedKeys:i,selectionMode:s}}=zv(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 $q(e){let t=rp(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(p=>d>p.length?p:[...p.slice(0,d),c])},closeSubmenu:(c,d)=>{i(p=>p[d]===c?p.slice(0,d):p)}}}const Hv={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},uT={...Hv,customError:!0,valid:!1},Zl={isInvalid:!1,validationDetails:Hv,validationErrors:[]},cT=x.createContext({}),Sp="__formValidationState"+Date.now();function Yl(e){if(e[Sp]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[Sp];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return _q(e)}function _q(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:uT}:null,c=x.useMemo(()=>{if(!s||o==null)return null;let M=Iq(s,o);return dT(M)},[s,o]);i?.validationDetails.valid&&(i=void 0);let d=x.useContext(cT),p=x.useMemo(()=>n?Array.isArray(n)?n.flatMap(M=>qv(d[M])):qv(d[n]):[],[d,n]),[m,g]=x.useState(d),[b,y]=x.useState(!1);d!==m&&(g(d),y(!1));let v=x.useMemo(()=>dT(b?[]:p),[b,p]),C=x.useRef(Zl),[S,k]=x.useState(Zl),P=x.useRef(Zl),E=()=>{if(!I)return;j(!1);let M=c||i||C.current;Gv(M,P.current)||(P.current=M,k(M))},[I,j]=x.useState(!1);return x.useEffect(E),{realtimeValidation:l||v||c||i||Zl,displayValidation:a==="native"?l||v||S:l||v||c||i||S,updateValidation(M){a==="aria"&&!Gv(S,M)?k(M):C.current=M},resetValidation(){let M=Zl;Gv(M,P.current)||(P.current=M,k(M)),a==="native"&&j(!1),y(!0)},commitValidation(){a==="native"&&j(!0),y(!0)}}}function qv(e){return e?Array.isArray(e)?e:[e]:[]}function Iq(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return qv(r)}return[]}function dT(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:uT}:null}function Gv(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 Nq(...e){let t=new Set,r=!1,n={...Hv};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 Dq({validate:e,validationBehavior:t,...r}){const[n,o]=x.useState(!1),[i,s]=x.useState(null),a=$q(r),l=Aq({...r,onSelectionChange:p=>{r.onSelectionChange!=null&&(p==="all"?r.onSelectionChange(new Set(l.collection.getKeys())):r.onSelectionChange(p)),r.selectionMode==="single"&&a.close()}}),c=Yl({...r,validationBehavior:t,validate:p=>{if(!e)return;const m=Array.from(p);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(p=null){d||(s(p),a.open())},toggle(p=null){d||(s(p),a.toggle())},isFocused:n,setFocused:o}}var fT={};fT={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var pT={};pT={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var hT={};hT={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var mT={};mT={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var gT={};gT={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var bT={};bT={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var vT={};vT={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var yT={};yT={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var xT={};xT={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var wT={};wT={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var CT={};CT={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var ST={};ST={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var kT={};kT={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var PT={};PT={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var ET={};ET={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var TT={};TT={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var AT={};AT={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var $T={};$T={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var _T={};_T={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var IT={};IT={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var NT={};NT={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var DT={};DT={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var MT={};MT={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var OT={};OT={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var jT={};jT={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var LT={};LT={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var FT={};FT={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var BT={};BT={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var zT={};zT={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var KT={};KT={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var VT={};VT={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var RT={};RT={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var WT={};WT={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var UT={};UT={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var HT={};HT={"ar-AE":fT,"bg-BG":pT,"cs-CZ":hT,"da-DK":mT,"de-DE":gT,"el-GR":bT,"en-US":vT,"es-ES":yT,"et-EE":xT,"fi-FI":wT,"fr-FR":CT,"he-IL":ST,"hr-HR":kT,"hu-HU":PT,"it-IT":ET,"ja-JP":TT,"ko-KR":AT,"lt-LT":$T,"lv-LV":_T,"nb-NO":IT,"nl-NL":NT,"pl-PL":DT,"pt-BR":MT,"pt-PT":OT,"ro-RO":jT,"ru-RU":LT,"sk-SK":FT,"sl-SI":BT,"sr-SP":zT,"sv-SE":KT,"tr-TR":VT,"uk-UA":RT,"zh-CN":WT,"zh-TW":UT};function Mq(e){return e&&e.__esModule?e.default:e}function Oq(e,t,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=e,s=rn(),{triggerProps:a,overlayProps:l}=$k({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=ds(Mq(HT),"@react-aria/menu"),{longPressProps:p}=xk({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&&(co(g.target),t.open(g.pointerType==="virtual"?"first":null))},onPress(g){g.pointerType==="touch"&&!o&&(co(g.target),t.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?m:p,id:s,onKeyDown:c},menuProps:{...l,"aria-labelledby":s,autoFocus:t.focusStrategy||!0,onClose:t.close}}}function jq(e,t,r){const{disallowEmptySelection:n,isDisabled:o}=e,i=Xd({usage:"search",sensitivity:"base"}),s=x.useMemo(()=>new _E(t.collection,t.disabledKeys,null,i),[t.collection,t.disabledKeys,i]),{menuTriggerProps:a,menuProps:l}=Oq({isDisabled:o,type:"listbox"},t,r),c=E=>{if(t.selectionMode==="single")switch(E.key){case"ArrowLeft":{E.preventDefault();const I=t.selectedKeys.size>0?s.getKeyAbove(t.selectedKeys.values().next().value):s.getFirstKey();I&&t.setSelectedKeys([I]);break}case"ArrowRight":{E.preventDefault();const I=t.selectedKeys.size>0?s.getKeyBelow(t.selectedKeys.values().next().value):s.getFirstKey();I&&t.setSelectedKeys([I]);break}}},{typeSelectProps:d}=TE({keyboardDelegate:s,selectionManager:t.selectionManager,onTypeSelect(E){t.setSelectedKeys([E])}}),{isInvalid:p,validationErrors:m,validationDetails:g}=t.displayValidation,{labelProps:b,fieldProps:y,descriptionProps:v,errorMessageProps:C}=Cp({...e,labelElementType:"span",isInvalid:p,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(),Cb("keyboard"))}},triggerProps:it(S,{...k,onKeyDown:fs(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:p,validationErrors:m,validationDetails:g}}var qT=Symbol("default");function Lq(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 Jl(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[qT])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let o=t||qT;if(!r.slots[o])throw new Error(`Invalid slot "${t}". Valid slot names are ${n}.`);return r.slots[o]}return r}function Fq(e,t,r){let n=Jl(r,e.slot)||{},{ref:o,...i}=n,s=Lq(x.useMemo(()=>$m(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},p=typeof e.style=="function"?e.style({...l,defaultStyle:d}):e.style;return{...d,...p}}:a.style={...i.style,...e.style}),[a,s]}var Ma=x.createContext(null);x.forwardRef(function(t,r){[t,r]=Fq(t,r,Ma);let{validationErrors:n,validationBehavior:o="native",children:i,className:s,...a}=t;const l=x.useMemo(()=>Q8({className:s}),[s]);return h.jsx("form",{noValidate:o!=="native",...a,ref:r,className:l,children:h.jsx(Ma.Provider,{value:{...t,validationBehavior:o},children:h.jsx(cT.Provider,{value:n??{},children:i})})})});var GT=new WeakMap;function Bq(e){var t,r,n,o,i,s;const a=ur(),{validationBehavior:l}=Jl(Ma)||{},[c,d]=qr(e,hC.variantKeys),p=(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:I,description:j,renderValue:N,onSelectionChange:D,placeholder:M,isVirtualized:V,itemHeight:R=36,maxListboxHeight:K=256,children:O,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:p},Z),scrollShadowProps:Oe({ref:Se,isEnabled:(o=e.showScrollIndicators)!=null?o:!0,hideScrollBar:!0,offset:15},T),listboxProps:Oe({disableAnimation:p},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=Dq({...c,isOpen:S,selectionMode:U,disallowEmptySelection:B,validationBehavior:le,children:O,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()])}},_a(()=>{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}=jq({...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}=Qf(xe,ke),{focusProps:Sr,isFocused:dr,isFocusVisible:kr}=Ir(),{focusProps:_t,isFocusVisible:tt}=Ir(),{isHovered:It,hoverProps:ar}=dn({isDisabled:e.isDisabled}),er=x3({labelPlacement:e.labelPlacement,label:b}),Yr=!!M,en=er==="outside-left"||er==="outside"||er==="outside-top",Ci=er==="inside",hn=er==="outside-left",eo=e.isClearable,Ur=Pe.isOpen||Yr||!!((i=Pe.selectedItems)!=null&&i.length)||!!E||!!I||!!e.isMultiline,jt=!!((s=Pe.selectedItems)!=null&&s.length),Zi=!!b,Xs=Zi&&(hn||en&&Yr),Yo=A(Q?.base,oe),St=x.useMemo(()=>hC({...d,isInvalid:Xt,isClearable:eo,labelPlacement:er,disableAnimation:p}),[jr(d),Xt,er,p]);Ab({isDisabled:!Pe.isOpen});const Jo=typeof c.errorMessage=="function"?c.errorMessage({isInvalid:Xt,validationErrors:ut,validationDetails:Ue}):c.errorMessage||ut?.join(" "),Si=!!j||!!Jo,Yi=!!I;x.useEffect(()=>{if(Pe.isOpen&&Me.current&&ke.current){let $e=ke.current.getBoundingClientRect(),to=Me.current;to.style.width=$e.width+"px"}},[Pe.isOpen]);const Ja=x.useCallback(($e={})=>({"data-slot":"base","data-filled":ae(Ur),"data-has-value":ae(jt),"data-has-label":ae(Zi),"data-has-helper":ae(Si),"data-has-end-content":ae(Yi),"data-invalid":ae(Xt),"data-has-label-outside":ae(Xs),className:St.base({class:A(Yo,$e.className)}),...$e}),[St,Si,jt,Zi,Xs,Ur,Yo]),Xa=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]),Qs=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]),ki=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]),Xo=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]),du=($e={})=>{const to=V??Pe.collection.size>50;return{state:Pe,ref:Ne,isVirtualized:to,virtualization:to?{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 to,Pi;const Eo=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)})},...Eo,offset:Pe.selectedItems&&Pe.selectedItems.length>0?Pe.selectedItems.length*1e-8+(((to=pe.popoverProps)==null?void 0:to.offset)||0):(Pi=pe.popoverProps)==null?void 0:Pi.offset}},[St,Q?.popoverContent,pe.popoverProps,ke,Pe,Pe.selectedItems]),fu=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]),ea=x.useCallback(($e={})=>({...$e,"data-slot":"innerWrapper",className:St.innerWrapper({class:A(Q?.innerWrapper,$e?.className)})}),[St,Q?.innerWrapper]),Qa=x.useCallback(($e={})=>({...$e,"data-slot":"helperWrapper",className:St.helperWrapper({class:A(Q?.helperWrapper,$e?.className)})}),[St,Q?.helperWrapper]),ta=x.useCallback(($e={})=>({...$e,...wt,"data-slot":"description",className:St.description({class:A(Q?.description,$e?.className)})}),[St,Q?.description]),Uc=x.useCallback(($e={})=>({...$e,"data-slot":"mainWrapper",className:St.mainWrapper({class:A(Q?.mainWrapper,$e?.className)})}),[St,Q?.mainWrapper]),Ji=x.useCallback(($e={})=>({...$e,"data-slot":"end-wrapper",className:St.endWrapper({class:A(Q?.endWrapper,$e?.className)})}),[St,Q?.endWrapper]),el=x.useCallback(($e={})=>({...$e,"data-slot":"end-content",className:St.endContent({class:A(Q?.endContent,$e?.className)})}),[St,Q?.endContent]),Xi=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]),Po=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 GT.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:I,description:j,selectorIcon:C,hasHelper:Si,labelPlacement:er,hasPlaceholder:Yr,renderValue:N,selectionMode:U,disableAnimation:p,isOutsideLeft:hn,shouldLabelBeOutside:en,shouldLabelBeInside:Ci,isInvalid:Xt,errorMessage:Jo,isClearable:eo,getClearButtonProps:Po,getBaseProps:Ja,getTriggerProps:Xa,getLabelProps:ki,getValueProps:rt,getListboxProps:du,getPopoverProps:an,getSpinnerProps:Dr,getMainWrapperProps:Uc,getListboxWrapperProps:Xo,getHiddenSelectProps:Qs,getInnerWrapperProps:ea,getHelperWrapperProps:Qa,getDescriptionProps:ta,getErrorMessageProps:Xi,getSelectorIconProps:fu,getEndWrapperProps:Ji,getEndContentProps:el}}var zq=typeof document<"u"?x.useLayoutEffect:()=>{};function Kq(e){const t=x.useRef(null);return zq(()=>{t.current=e},[e]),x.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function Vq(e,t,r){let n=x.useRef(t),o=Kq(()=>{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 kp(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(Wq(r.current))}});let i=x.useRef(!1),s=vn(()=>{i.current||t.resetValidation()}),a=vn(c=>{var d;t.displayValidation.isInvalid||t.commitValidation();let p=r==null||(d=r.current)===null||d===void 0?void 0:d.form;if(!c.defaultPrevented&&r&&p&&Uq(p)===r.current){var m;o?o():(m=r.current)===null||m===void 0||m.focus(),Cb("keyboard")}c.preventDefault()}),l=vn(()=>{t.commitValidation()});x.useEffect(()=>{let c=r?.current;if(!c)return;let d=c.form,p=d?.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,p?.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=p)}},[r,n])}function Rq(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 Wq(e){return{isInvalid:!e.validity.valid,validationDetails:Rq(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function Uq(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}function Hq(e,t,r){var n;let o=GT.get(t)||{},{autoComplete:i,name:s=o.name,isDisabled:a=o.isDisabled,selectionMode:l,onChange:c,form:d}=e,{validationBehavior:p,isRequired:m,isInvalid:g}=o,{visuallyHiddenProps:b}=g3();return Vq(e.selectRef,t.selectedKeys,t.setSelectedKeys),kp({validationBehavior:p,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&&p==="aria"||void 0,required:m&&p==="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 qq(e){var t;let{state:r,triggerRef:n,selectRef:o,label:i,name:s,isDisabled:a,form:l}=e,{containerProps:c,selectProps:d}=Hq({...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(p=>{let m=r.collection.getItem(p);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 Gq(e,t){const{groupRef:r,triggerRef:n,popoverRef:o,showArrow:i,offset:s=7,crossOffset:a=0,scrollRef:l,shouldFlip:c,boundaryElement:d,isDismissable:p=!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,I=P.trigger==="SubmenuTrigger",{overlayProps:j,underlayProps:N}=nv({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:m,isDismissable:p||I,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:v||(O=>{var B;return!((B=n.current)!=null&&B.contains(O))}),disableOutsideEvents:!E},o),{overlayProps:D,arrowProps:M,placement:V,updatePosition:R,triggerAnchorPoint:K}=X2({...P,shouldFlip:c,crossOffset:a,targetRef:n,overlayRef:o,isOpen:t.isOpen,scrollRef:l,boundaryElement:d,containerPadding:y,placement:GE(b),offset:i?s+3:s,onClose:E&&!I&&g?t.close:()=>{}});return _a(()=>{k.length&&R()},k),x.useEffect(()=>{var O,B;if(t.isOpen&&o.current)return E?KH((O=r?.current)!=null?O:o.current):zH([(B=r?.current)!=null?B:o.current])},[E,t.isOpen,o,r]),{popoverProps:Oe(j,D),arrowProps:M,underlayProps:N,placement:V,triggerAnchorPoint:K}}var Zq="top";function Yq(e){var t,r,n;const o=ur(),[i,s]=qr(e,xd.variantKeys),{as:a,ref:l,children:c,state:d,triggerRef:p,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:I,updatePositionDeps:j,dialogProps:N,placement:D=Zq,triggerType:M="dialog",showArrow:V=!1,offset:R=7,crossOffset:K=0,boundaryElement:O,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=p||oe,ue=(r=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?r:!1,te=rp({isOpen:y,defaultOpen:g,onOpenChange:Ue=>{b?.(Ue),Ue||$?.()}}),ge=d||te,{popoverProps:Se,underlayProps:pe,placement:we}=Gq({triggerRef:le,isNonModal:v,popoverRef:X,placement:D,offset:R,scrollRef:m,isDismissable:P,shouldCloseOnBlur:E,boundaryElement:O,crossOffset:K,shouldFlip:C,containerPadding:S,updatePositionDeps:j,isKeyboardDismissDisabled:B,shouldCloseOnScroll:W,shouldCloseOnInteractOutside:U,triggerAnchorPoint:L},ge),be=x.useMemo(()=>we?BH(we,D)?we:D:null,[we,D]),{triggerProps:re}=$k({type:M},ge,le),{isFocusVisible:ke,isFocused:Ne,focusProps:Me}=Ir(),Pe=x.useMemo(()=>xd({...s}),[jr(s)]),Ae=A(F?.base,T),xe={"--trigger-anchor-point":L?`${L.x}px ${L.y}px`:void 0};Ab({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?xp(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?xp(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:$m(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:I,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 ZT=()=>Promise.resolve().then(()=>Wc).then(e=>e.default),YT=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,...qE(r==="center"?"top":r)}),n?h.jsx("div",{...s,ref:a,children:e}):h.jsx(ws,{features:ZT,children:h.jsx(Cs.div,{ref:a,animate:"enter",exit:"exit",initial:"initial",style:l,variants:tp.scaleSpringOpacity,...Oe(s,t),children:e})})});YT.displayName="HeroUI.FreeSoloPopoverWrapper";var JT=Xe(({children:e,transformOrigin:t,disableDialogFocus:r=!1,...n},o)=>{const{Component:i,state:s,placement:a,backdrop:l,portalContainer:c,disableAnimation:d,motionProps:p,isNonModal:m,getPopoverProps:g,getBackdropProps:b,getDialogProps:y,getContentProps:v}=Yq({...n,ref:o}),C=Er.useRef(null),{dialogProps:S,titleProps:k}=IP({},C),P=y({...!r&&{ref:C},...S}),E=Er.useMemo(()=>l==="transparent"?null:d?h.jsx("div",{...b()}):h.jsx(ws,{features:ZT,children:h.jsx(Cs.div,{animate:"enter",exit:"exit",initial:"exit",variants:tp.fade,...b()})}),[l,d,b]);return h.jsxs(v3,{portalContainer:c,children:[!m&&E,h.jsx(i,{...g(),children:h.jsxs(YT,{disableAnimation:d,motionProps:p,placement:a,tabIndex:-1,transformOrigin:t,...P,children:[!m&&h.jsx(Ff,{onDismiss:s.close}),h.jsx("div",{...v(),children:typeof e=="function"?e(k):e}),h.jsx(Ff,{onDismiss:s.close})]})})]})});JT.displayName="HeroUI.FreeSoloPopover";var Jq=JT;function Xq(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}${kC(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)}},p=()=>{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 I=k==="vertical"?S>i:c.scrollLeft>i,j=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,I,j,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return p(),c.addEventListener("scroll",p,!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",p,!0),m()}},[...a,r,o,n,s,t])}function Qq(e){var t;const[r,n]=qr(e,wd.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:p="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);Xq({domRef:v,offset:d,visibility:p,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>wd({...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 XT=Xe((e,t)=>{const{Component:r,children:n,getBaseProps:o}=Qq({...e,ref:t});return h.jsx(r,{...o(),children:n})});XT.displayName="HeroUI.ScrollShadow";var Zv=XT,eG=Xe(function(t,r){var n;const{Component:o,state:i,label:s,hasHelper:a,isLoading:l,triggerRef:c,selectorIcon:d=h.jsx(_P,{}),description:p,errorMessage:m,isInvalid:g,startContent:b,endContent:y,placeholder:v,renderValue:C,shouldLabelBeOutside:S,disableAnimation:k,getBaseProps:P,getLabelProps:E,getTriggerProps:I,getValueProps:j,getListboxProps:N,getPopoverProps:D,getSpinnerProps:M,getMainWrapperProps:V,getInnerWrapperProps:R,getHiddenSelectProps:K,getHelperWrapperProps:O,getListboxWrapperProps:B,getDescriptionProps:U,getErrorMessageProps:W,getSelectorIconProps:L,isClearable:Z,getClearButtonProps:T,getEndWrapperProps:F,getEndContentProps:$}=Bq({...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(rv,{})}):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||p)?null:h.jsx("div",{...O(),children:ge?h.jsx("div",{...W(),children:m}):h.jsx("div",{...U(),children:p})})},[a,g,m,p,O,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(bP,{...M()}):Y,[l,Y,M]),te=x.useMemo(()=>i.isOpen?h.jsx(Jq,{...D(),children:h.jsx(Zv,{...B(),children:h.jsx(Wv,{...N()})})}):null,[i.isOpen,D,i,c,B,N]);return h.jsxs("div",{...P(),children:[h.jsx(qq,{...K()}),S?H:null,h.jsxs("div",{...V(),children:[h.jsxs(o,{...I(),children:[S?null:H,h.jsxs("div",{...R(),children:[b,h.jsx("span",{...j(),children:le}),y&&i.selectedItems&&h.jsx(jl,{elementType:"span",children:","}),oe]}),ue]}),Q]}),k?te:h.jsx(tc,{children:te})]})}),xc=eG;const tG=ft`
|
|
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 Rv(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const nq=(e,t)=>Math.abs(e-t)<1,oq=(e,t,r)=>{let n;return function(...o){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,o),r)}},iq=e=>e,sq=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},aq=(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)}},QE={passive:!0},lq=typeof window>"u"?!0:"onscrollend"in window,uq=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const i=e.options.useScrollendEvent&&lq?()=>{}:oq(n,()=>{t(o,!1)},e.options.isScrollingResetDelay),s=c=>()=>{const{horizontal:d,isRtl:p}=e.options;o=d?r.scrollLeft*(p&&-1||1):r.scrollTop,i(),t(o,c)},a=s(!0),l=s(!1);return l(),r.addEventListener("scroll",a,QE),r.addEventListener("scrollend",l,QE),()=>{r.removeEventListener("scroll",a),r.removeEventListener("scrollend",l)}},cq=(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"])},dq=(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 fq{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:iq,rangeExtractor:sq,onChange:()=>{},measureElement:cq,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=Gl(()=>(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=Gl(()=>[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=Gl(()=>[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 p=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(p),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:p,lane:C}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Gl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,o)=>this.range=r.length>0&&n>0?pq({measurements:r,outerSize:n,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Gl(()=>{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=Gl(()=>[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 Rv(n[eT(0,n.length-1,o=>Rv(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]=Rv(this.getOffsetForIndex(r,a));nq(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 eT=(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 pq({measurements:e,outerSize:t,scrollOffset:r}){const n=e.length-1,i=eT(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 tT=typeof document<"u"?Er.useLayoutEffect:Er.useEffect;function hq(e){const t=Er.useReducer(()=>({}),{})[1],r={...e,onChange:(o,i)=>{var s;i?as.flushSync(t):t(),(s=e.onChange)==null||s.call(e,o,i)}},[n]=Er.useState(()=>new fq(r));return n.setOptions(r),tT(()=>n._didMount(),[]),tT(()=>n._willUpdate()),n}function rT(e){return hq({observeElementRect:aq,observeElementOffset:uq,scrollToFn:dq,...e})}function mq(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}${kC(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)}},p=()=>{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 I=k==="vertical"?S>i:c.scrollLeft>i,j=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,I,j,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return p(),c.addEventListener("scroll",p,!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",p,!0),m()}},[...a,r,o,n,s,t])}function gq(e){var t;const[r,n]=qr(e,wd.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:p="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);mq({domRef:v,offset:d,visibility:p,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>wd({...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 bq=(e,t)=>{const r=[];for(const n of e)n.type==="section"?r.push(([...n.childNodes].length+1)*t):r.push(t);return r},vq=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}},yq=e=>{var t;const{Component:r,state:n,color:o,variant:i,itemClasses:s,getBaseProps:a,topContent:l,bottomContent:c,hideEmptyContent:d,hideSelectedIcon:p,shouldHighlightOnFocus:m,disableAnimation:g,getEmptyContentProps:b,getListProps:y,scrollShadowProps:v}=e,{virtualization:C}=e;if(!C||!cs(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),I=x.useMemo(()=>bq([...n.collection],k),[n.collection,k]),j=rT({count:[...n.collection].length,getScrollElement:()=>E.current,estimateSize:B=>I[B]}),N=j.getVirtualItems(),D=j.getTotalSize(),{getBaseProps:M}=gq({...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:p,...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(XE,{...L,itemClasses:s,style:{...Z,...L.style}},W.key);let T=h.jsx(Vv,{...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}),O=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(vq(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,O,c]})},xq=yq,wq=Xe(function(t,r){const{isVirtualized:n,...o}=t,i=YH({...o,ref:r}),{Component:s,state:a,color:l,variant:c,itemClasses:d,getBaseProps:p,topContent:m,bottomContent:g,hideEmptyContent:b,hideSelectedIcon:y,shouldHighlightOnFocus:v,disableAnimation:C,getEmptyContentProps:S,getListProps:k}=i;if(n)return h.jsx(xq,{...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 I;const j={color:l,item:E,state:a,variant:c,disableAnimation:C,hideSelectedIcon:y,...E.props};if(E.type==="section")return h.jsx(XE,{...j,itemClasses:d},E.key);let N=h.jsx(Vv,{...j,classNames:Oe(d,(I=E.props)==null?void 0:I.classNames),shouldHighlightOnFocus:v},E.key);return E.wrapper&&(N=E.wrapper(N)),N})]});return h.jsxs("div",{...p(),children:[m,P,g]})}),Wv=wq;function Cq(e){var t,r;const n=ur(),[o,i]=qr(e,vC.variantKeys),{as:s,children:a,isLoaded:l=!1,className:c,classNames:d,...p}=o,m=s||"div",g=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,b=x.useMemo(()=>vC({...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)}),...p}),getContentProps:(S={})=>({className:b.content({class:A(d?.content,S?.className)})})}}var nT=Xe((e,t)=>{const{Component:r,children:n,getSkeletonProps:o,getContentProps:i}=Cq({...e});return h.jsx(r,{ref:t,...o(),children:h.jsx("div",{...i(),children:n})})});nT.displayName="HeroUI.Skeleton";var Tr=nT;function Sq({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(Wv,{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(Da,{textValue:s.fullName,children:h.jsxs("div",{className:"flex items-center gap-3",children:[s.productVersion?.media?.main?.url?h.jsx(zl,{alt:s.productVersion.media.main.altText||s.fullName,src:tv(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(zl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(Hm,{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[kq,Uv]=ga({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),oT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=Uv(),p=A(d?.body,o);return h.jsx(a,{ref:l,className:(r=c.body)==null?void 0:r.call(c,{class:p}),...s,children:i})});oT.displayName="HeroUI.CardBody";var iT=oT,sT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=Uv(),p=A(d?.footer,o);return h.jsx(a,{ref:l,className:(r=c.footer)==null?void 0:r.call(c,{class:p}),...s,children:i})});sT.displayName="HeroUI.CardFooter";var Pq=sT,aT=Xe((e,t)=>{var r;const{as:n,className:o,children:i,...s}=e,a=n||"div",l=ot(t),{slots:c,classNames:d}=Uv(),p=A(d?.header,o);return h.jsx(a,{ref:l,className:(r=c.header)==null?void 0:r.call(c,{class:p}),...s,children:i})});aT.displayName="HeroUI.CardHeader";var Eq=aT;function Tq(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,sC.variantKeys),{ref:l,as:c,children:d,onClick:p,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,I=(o=(n=e.disableRipple)!=null?n:i?.disableRipple)!=null?o:!1,j=A(y?.base,b),{onClear:N,onPress:D,ripples:M}=mP(),V=x.useCallback(H=>{I||E||S.current&&D(H)},[I,E,S,D]),{buttonProps:R,isPressed:K}=Qf({onPress:uo(m,V),elementType:c,isDisabled:!e.isPressable,onClick:p,allowTextSelectionOnPress:v,...C},S),{hoverProps:O,isHovered:B}=dn({isDisabled:!e.isHoverable,...C}),{isFocusVisible:U,isFocused:W,focusProps:L}=Ir({autoFocus:g}),Z=x.useMemo(()=>sC({...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:j}),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?O:{},Lt(C,{enabled:P}),Lt(H))}),[S,Z,j,P,e.isPressable,e.isHoverable,e.isDisabled,B,K,U,R,L,O,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:I,handlePress:V,isFocusVisible:U,getCardProps:F,getRippleProps:$}}var lT=Xe((e,t)=>{const{children:r,context:n,Component:o,isPressable:i,disableAnimation:s,disableRipple:a,getCardProps:l,getRippleProps:c}=Tq({...e,ref:t});return h.jsxs(o,{...l(),children:[h.jsx(kq,{value:n,children:r}),i&&!s&&!a&&h.jsx(hP,{...c()})]})});lT.displayName="HeroUI.Card";var Ms=lT;function Aq(e){const{collection:t,disabledKeys:r,selectionManager:n,selectionManager:{setSelectedKeys:o,selectedKeys:i,selectionMode:s}}=zv(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 $q(e){let t=rp(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(p=>d>p.length?p:[...p.slice(0,d),c])},closeSubmenu:(c,d)=>{i(p=>p[d]===c?p.slice(0,d):p)}}}const Hv={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},uT={...Hv,customError:!0,valid:!1},Zl={isInvalid:!1,validationDetails:Hv,validationErrors:[]},cT=x.createContext({}),Sp="__formValidationState"+Date.now();function Yl(e){if(e[Sp]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[Sp];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return _q(e)}function _q(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:uT}:null,c=x.useMemo(()=>{if(!s||o==null)return null;let M=Iq(s,o);return dT(M)},[s,o]);i?.validationDetails.valid&&(i=void 0);let d=x.useContext(cT),p=x.useMemo(()=>n?Array.isArray(n)?n.flatMap(M=>qv(d[M])):qv(d[n]):[],[d,n]),[m,g]=x.useState(d),[b,y]=x.useState(!1);d!==m&&(g(d),y(!1));let v=x.useMemo(()=>dT(b?[]:p),[b,p]),C=x.useRef(Zl),[S,k]=x.useState(Zl),P=x.useRef(Zl),E=()=>{if(!I)return;j(!1);let M=c||i||C.current;Gv(M,P.current)||(P.current=M,k(M))},[I,j]=x.useState(!1);return x.useEffect(E),{realtimeValidation:l||v||c||i||Zl,displayValidation:a==="native"?l||v||S:l||v||c||i||S,updateValidation(M){a==="aria"&&!Gv(S,M)?k(M):C.current=M},resetValidation(){let M=Zl;Gv(M,P.current)||(P.current=M,k(M)),a==="native"&&j(!1),y(!0)},commitValidation(){a==="native"&&j(!0),y(!0)}}}function qv(e){return e?Array.isArray(e)?e:[e]:[]}function Iq(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return qv(r)}return[]}function dT(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:uT}:null}function Gv(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 Nq(...e){let t=new Set,r=!1,n={...Hv};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 Dq({validate:e,validationBehavior:t,...r}){const[n,o]=x.useState(!1),[i,s]=x.useState(null),a=$q(r),l=Aq({...r,onSelectionChange:p=>{r.onSelectionChange!=null&&(p==="all"?r.onSelectionChange(new Set(l.collection.getKeys())):r.onSelectionChange(p)),r.selectionMode==="single"&&a.close()}}),c=Yl({...r,validationBehavior:t,validate:p=>{if(!e)return;const m=Array.from(p);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(p=null){d||(s(p),a.open())},toggle(p=null){d||(s(p),a.toggle())},isFocused:n,setFocused:o}}var fT={};fT={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var pT={};pT={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var hT={};hT={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var mT={};mT={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var gT={};gT={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var bT={};bT={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var vT={};vT={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var yT={};yT={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var xT={};xT={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var wT={};wT={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var CT={};CT={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var ST={};ST={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var kT={};kT={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var PT={};PT={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var ET={};ET={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var TT={};TT={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var AT={};AT={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var $T={};$T={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var _T={};_T={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var IT={};IT={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var NT={};NT={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var DT={};DT={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var MT={};MT={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var OT={};OT={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var jT={};jT={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var LT={};LT={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var FT={};FT={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var BT={};BT={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var zT={};zT={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var KT={};KT={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var VT={};VT={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var RT={};RT={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var WT={};WT={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var UT={};UT={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var HT={};HT={"ar-AE":fT,"bg-BG":pT,"cs-CZ":hT,"da-DK":mT,"de-DE":gT,"el-GR":bT,"en-US":vT,"es-ES":yT,"et-EE":xT,"fi-FI":wT,"fr-FR":CT,"he-IL":ST,"hr-HR":kT,"hu-HU":PT,"it-IT":ET,"ja-JP":TT,"ko-KR":AT,"lt-LT":$T,"lv-LV":_T,"nb-NO":IT,"nl-NL":NT,"pl-PL":DT,"pt-BR":MT,"pt-PT":OT,"ro-RO":jT,"ru-RU":LT,"sk-SK":FT,"sl-SI":BT,"sr-SP":zT,"sv-SE":KT,"tr-TR":VT,"uk-UA":RT,"zh-CN":WT,"zh-TW":UT};function Mq(e){return e&&e.__esModule?e.default:e}function Oq(e,t,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=e,s=rn(),{triggerProps:a,overlayProps:l}=$k({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=ds(Mq(HT),"@react-aria/menu"),{longPressProps:p}=xk({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&&(co(g.target),t.open(g.pointerType==="virtual"?"first":null))},onPress(g){g.pointerType==="touch"&&!o&&(co(g.target),t.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?m:p,id:s,onKeyDown:c},menuProps:{...l,"aria-labelledby":s,autoFocus:t.focusStrategy||!0,onClose:t.close}}}function jq(e,t,r){const{disallowEmptySelection:n,isDisabled:o}=e,i=Xd({usage:"search",sensitivity:"base"}),s=x.useMemo(()=>new _E(t.collection,t.disabledKeys,null,i),[t.collection,t.disabledKeys,i]),{menuTriggerProps:a,menuProps:l}=Oq({isDisabled:o,type:"listbox"},t,r),c=E=>{if(t.selectionMode==="single")switch(E.key){case"ArrowLeft":{E.preventDefault();const I=t.selectedKeys.size>0?s.getKeyAbove(t.selectedKeys.values().next().value):s.getFirstKey();I&&t.setSelectedKeys([I]);break}case"ArrowRight":{E.preventDefault();const I=t.selectedKeys.size>0?s.getKeyBelow(t.selectedKeys.values().next().value):s.getFirstKey();I&&t.setSelectedKeys([I]);break}}},{typeSelectProps:d}=TE({keyboardDelegate:s,selectionManager:t.selectionManager,onTypeSelect(E){t.setSelectedKeys([E])}}),{isInvalid:p,validationErrors:m,validationDetails:g}=t.displayValidation,{labelProps:b,fieldProps:y,descriptionProps:v,errorMessageProps:C}=Cp({...e,labelElementType:"span",isInvalid:p,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(),Cb("keyboard"))}},triggerProps:it(S,{...k,onKeyDown:fs(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:p,validationErrors:m,validationDetails:g}}var qT=Symbol("default");function Lq(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 Jl(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[qT])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let o=t||qT;if(!r.slots[o])throw new Error(`Invalid slot "${t}". Valid slot names are ${n}.`);return r.slots[o]}return r}function Fq(e,t,r){let n=Jl(r,e.slot)||{},{ref:o,...i}=n,s=Lq(x.useMemo(()=>$m(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},p=typeof e.style=="function"?e.style({...l,defaultStyle:d}):e.style;return{...d,...p}}:a.style={...i.style,...e.style}),[a,s]}var Ma=x.createContext(null);x.forwardRef(function(t,r){[t,r]=Fq(t,r,Ma);let{validationErrors:n,validationBehavior:o="native",children:i,className:s,...a}=t;const l=x.useMemo(()=>Q8({className:s}),[s]);return h.jsx("form",{noValidate:o!=="native",...a,ref:r,className:l,children:h.jsx(Ma.Provider,{value:{...t,validationBehavior:o},children:h.jsx(cT.Provider,{value:n??{},children:i})})})});var GT=new WeakMap;function Bq(e){var t,r,n,o,i,s;const a=ur(),{validationBehavior:l}=Jl(Ma)||{},[c,d]=qr(e,hC.variantKeys),p=(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:I,description:j,renderValue:N,onSelectionChange:D,placeholder:M,isVirtualized:V,itemHeight:R=36,maxListboxHeight:K=256,children:O,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:p},Z),scrollShadowProps:Oe({ref:Se,isEnabled:(o=e.showScrollIndicators)!=null?o:!0,hideScrollBar:!0,offset:15},T),listboxProps:Oe({disableAnimation:p},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=Dq({...c,isOpen:S,selectionMode:U,disallowEmptySelection:B,validationBehavior:le,children:O,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()])}},_a(()=>{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}=jq({...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}=Qf(xe,ke),{focusProps:Sr,isFocused:dr,isFocusVisible:kr}=Ir(),{focusProps:_t,isFocusVisible:tt}=Ir(),{isHovered:It,hoverProps:ar}=dn({isDisabled:e.isDisabled}),er=x3({labelPlacement:e.labelPlacement,label:b}),Yr=!!M,en=er==="outside-left"||er==="outside"||er==="outside-top",Ci=er==="inside",hn=er==="outside-left",eo=e.isClearable,Ur=Pe.isOpen||Yr||!!((i=Pe.selectedItems)!=null&&i.length)||!!E||!!I||!!e.isMultiline,jt=!!((s=Pe.selectedItems)!=null&&s.length),Zi=!!b,Xs=Zi&&(hn||en&&Yr),Yo=A(Q?.base,oe),St=x.useMemo(()=>hC({...d,isInvalid:Xt,isClearable:eo,labelPlacement:er,disableAnimation:p}),[jr(d),Xt,er,p]);Ab({isDisabled:!Pe.isOpen});const Jo=typeof c.errorMessage=="function"?c.errorMessage({isInvalid:Xt,validationErrors:ut,validationDetails:Ue}):c.errorMessage||ut?.join(" "),Si=!!j||!!Jo,Yi=!!I;x.useEffect(()=>{if(Pe.isOpen&&Me.current&&ke.current){let $e=ke.current.getBoundingClientRect(),to=Me.current;to.style.width=$e.width+"px"}},[Pe.isOpen]);const Ja=x.useCallback(($e={})=>({"data-slot":"base","data-filled":ae(Ur),"data-has-value":ae(jt),"data-has-label":ae(Zi),"data-has-helper":ae(Si),"data-has-end-content":ae(Yi),"data-invalid":ae(Xt),"data-has-label-outside":ae(Xs),className:St.base({class:A(Yo,$e.className)}),...$e}),[St,Si,jt,Zi,Xs,Ur,Yo]),Xa=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]),Qs=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]),ki=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]),Xo=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]),du=($e={})=>{const to=V??Pe.collection.size>50;return{state:Pe,ref:Ne,isVirtualized:to,virtualization:to?{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 to,Pi;const Eo=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)})},...Eo,offset:Pe.selectedItems&&Pe.selectedItems.length>0?Pe.selectedItems.length*1e-8+(((to=pe.popoverProps)==null?void 0:to.offset)||0):(Pi=pe.popoverProps)==null?void 0:Pi.offset}},[St,Q?.popoverContent,pe.popoverProps,ke,Pe,Pe.selectedItems]),fu=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]),ea=x.useCallback(($e={})=>({...$e,"data-slot":"innerWrapper",className:St.innerWrapper({class:A(Q?.innerWrapper,$e?.className)})}),[St,Q?.innerWrapper]),Qa=x.useCallback(($e={})=>({...$e,"data-slot":"helperWrapper",className:St.helperWrapper({class:A(Q?.helperWrapper,$e?.className)})}),[St,Q?.helperWrapper]),ta=x.useCallback(($e={})=>({...$e,...wt,"data-slot":"description",className:St.description({class:A(Q?.description,$e?.className)})}),[St,Q?.description]),Uc=x.useCallback(($e={})=>({...$e,"data-slot":"mainWrapper",className:St.mainWrapper({class:A(Q?.mainWrapper,$e?.className)})}),[St,Q?.mainWrapper]),Ji=x.useCallback(($e={})=>({...$e,"data-slot":"end-wrapper",className:St.endWrapper({class:A(Q?.endWrapper,$e?.className)})}),[St,Q?.endWrapper]),el=x.useCallback(($e={})=>({...$e,"data-slot":"end-content",className:St.endContent({class:A(Q?.endContent,$e?.className)})}),[St,Q?.endContent]),Xi=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]),Po=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 GT.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:I,description:j,selectorIcon:C,hasHelper:Si,labelPlacement:er,hasPlaceholder:Yr,renderValue:N,selectionMode:U,disableAnimation:p,isOutsideLeft:hn,shouldLabelBeOutside:en,shouldLabelBeInside:Ci,isInvalid:Xt,errorMessage:Jo,isClearable:eo,getClearButtonProps:Po,getBaseProps:Ja,getTriggerProps:Xa,getLabelProps:ki,getValueProps:rt,getListboxProps:du,getPopoverProps:an,getSpinnerProps:Dr,getMainWrapperProps:Uc,getListboxWrapperProps:Xo,getHiddenSelectProps:Qs,getInnerWrapperProps:ea,getHelperWrapperProps:Qa,getDescriptionProps:ta,getErrorMessageProps:Xi,getSelectorIconProps:fu,getEndWrapperProps:Ji,getEndContentProps:el}}var zq=typeof document<"u"?x.useLayoutEffect:()=>{};function Kq(e){const t=x.useRef(null);return zq(()=>{t.current=e},[e]),x.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function Vq(e,t,r){let n=x.useRef(t),o=Kq(()=>{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 kp(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(Wq(r.current))}});let i=x.useRef(!1),s=vn(()=>{i.current||t.resetValidation()}),a=vn(c=>{var d;t.displayValidation.isInvalid||t.commitValidation();let p=r==null||(d=r.current)===null||d===void 0?void 0:d.form;if(!c.defaultPrevented&&r&&p&&Uq(p)===r.current){var m;o?o():(m=r.current)===null||m===void 0||m.focus(),Cb("keyboard")}c.preventDefault()}),l=vn(()=>{t.commitValidation()});x.useEffect(()=>{let c=r?.current;if(!c)return;let d=c.form,p=d?.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,p?.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=p)}},[r,n])}function Rq(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 Wq(e){return{isInvalid:!e.validity.valid,validationDetails:Rq(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function Uq(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}function Hq(e,t,r){var n;let o=GT.get(t)||{},{autoComplete:i,name:s=o.name,isDisabled:a=o.isDisabled,selectionMode:l,onChange:c,form:d}=e,{validationBehavior:p,isRequired:m,isInvalid:g}=o,{visuallyHiddenProps:b}=g3();return Vq(e.selectRef,t.selectedKeys,t.setSelectedKeys),kp({validationBehavior:p,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&&p==="aria"||void 0,required:m&&p==="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 qq(e){var t;let{state:r,triggerRef:n,selectRef:o,label:i,name:s,isDisabled:a,form:l}=e,{containerProps:c,selectProps:d}=Hq({...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(p=>{let m=r.collection.getItem(p);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 Gq(e,t){const{groupRef:r,triggerRef:n,popoverRef:o,showArrow:i,offset:s=7,crossOffset:a=0,scrollRef:l,shouldFlip:c,boundaryElement:d,isDismissable:p=!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,I=P.trigger==="SubmenuTrigger",{overlayProps:j,underlayProps:N}=nv({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:m,isDismissable:p||I,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:v||(O=>{var B;return!((B=n.current)!=null&&B.contains(O))}),disableOutsideEvents:!E},o),{overlayProps:D,arrowProps:M,placement:V,updatePosition:R,triggerAnchorPoint:K}=X2({...P,shouldFlip:c,crossOffset:a,targetRef:n,overlayRef:o,isOpen:t.isOpen,scrollRef:l,boundaryElement:d,containerPadding:y,placement:GE(b),offset:i?s+3:s,onClose:E&&!I&&g?t.close:()=>{}});return _a(()=>{k.length&&R()},k),x.useEffect(()=>{var O,B;if(t.isOpen&&o.current)return E?KH((O=r?.current)!=null?O:o.current):zH([(B=r?.current)!=null?B:o.current])},[E,t.isOpen,o,r]),{popoverProps:Oe(j,D),arrowProps:M,underlayProps:N,placement:V,triggerAnchorPoint:K}}var Zq="top";function Yq(e){var t,r,n;const o=ur(),[i,s]=qr(e,xd.variantKeys),{as:a,ref:l,children:c,state:d,triggerRef:p,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:I,updatePositionDeps:j,dialogProps:N,placement:D=Zq,triggerType:M="dialog",showArrow:V=!1,offset:R=7,crossOffset:K=0,boundaryElement:O,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=p||oe,ue=(r=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?r:!1,te=rp({isOpen:y,defaultOpen:g,onOpenChange:Ue=>{b?.(Ue),Ue||$?.()}}),ge=d||te,{popoverProps:Se,underlayProps:pe,placement:we}=Gq({triggerRef:le,isNonModal:v,popoverRef:X,placement:D,offset:R,scrollRef:m,isDismissable:P,shouldCloseOnBlur:E,boundaryElement:O,crossOffset:K,shouldFlip:C,containerPadding:S,updatePositionDeps:j,isKeyboardDismissDisabled:B,shouldCloseOnScroll:W,shouldCloseOnInteractOutside:U,triggerAnchorPoint:L},ge),be=x.useMemo(()=>we?BH(we,D)?we:D:null,[we,D]),{triggerProps:re}=$k({type:M},ge,le),{isFocusVisible:ke,isFocused:Ne,focusProps:Me}=Ir(),Pe=x.useMemo(()=>xd({...s}),[jr(s)]),Ae=A(F?.base,T),xe={"--trigger-anchor-point":L?`${L.x}px ${L.y}px`:void 0};Ab({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?xp(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?xp(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:$m(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:I,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 ZT=()=>Promise.resolve().then(()=>Wc).then(e=>e.default),YT=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,...qE(r==="center"?"top":r)}),n?h.jsx("div",{...s,ref:a,children:e}):h.jsx(ws,{features:ZT,children:h.jsx(Cs.div,{ref:a,animate:"enter",exit:"exit",initial:"initial",style:l,variants:tp.scaleSpringOpacity,...Oe(s,t),children:e})})});YT.displayName="HeroUI.FreeSoloPopoverWrapper";var JT=Xe(({children:e,transformOrigin:t,disableDialogFocus:r=!1,...n},o)=>{const{Component:i,state:s,placement:a,backdrop:l,portalContainer:c,disableAnimation:d,motionProps:p,isNonModal:m,getPopoverProps:g,getBackdropProps:b,getDialogProps:y,getContentProps:v}=Yq({...n,ref:o}),C=Er.useRef(null),{dialogProps:S,titleProps:k}=IP({},C),P=y({...!r&&{ref:C},...S}),E=Er.useMemo(()=>l==="transparent"?null:d?h.jsx("div",{...b()}):h.jsx(ws,{features:ZT,children:h.jsx(Cs.div,{animate:"enter",exit:"exit",initial:"exit",variants:tp.fade,...b()})}),[l,d,b]);return h.jsxs(v3,{portalContainer:c,children:[!m&&E,h.jsx(i,{...g(),children:h.jsxs(YT,{disableAnimation:d,motionProps:p,placement:a,tabIndex:-1,transformOrigin:t,...P,children:[!m&&h.jsx(Ff,{onDismiss:s.close}),h.jsx("div",{...v(),children:typeof e=="function"?e(k):e}),h.jsx(Ff,{onDismiss:s.close})]})})]})});JT.displayName="HeroUI.FreeSoloPopover";var Jq=JT;function Xq(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}${kC(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)}},p=()=>{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 I=k==="vertical"?S>i:c.scrollLeft>i,j=k==="vertical"?S+c.clientHeight+i<C:c.scrollLeft+c.clientWidth+i<c.scrollWidth;d(k,I,j,P,E)}},m=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(g=>{c.removeAttribute(`data-${g}-scroll`)})};return p(),c.addEventListener("scroll",p,!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",p,!0),m()}},[...a,r,o,n,s,t])}function Qq(e){var t;const[r,n]=qr(e,wd.variantKeys),{ref:o,as:i,children:s,className:a,style:l,size:c=40,offset:d=0,visibility:p="auto",isEnabled:m=!0,onVisibilityChange:g,...b}=r,y=i||"div",v=ot(o);Xq({domRef:v,offset:d,visibility:p,isEnabled:m,onVisibilityChange:g,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const C=x.useMemo(()=>wd({...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 XT=Xe((e,t)=>{const{Component:r,children:n,getBaseProps:o}=Qq({...e,ref:t});return h.jsx(r,{...o(),children:n})});XT.displayName="HeroUI.ScrollShadow";var Zv=XT,eG=Xe(function(t,r){var n;const{Component:o,state:i,label:s,hasHelper:a,isLoading:l,triggerRef:c,selectorIcon:d=h.jsx(_P,{}),description:p,errorMessage:m,isInvalid:g,startContent:b,endContent:y,placeholder:v,renderValue:C,shouldLabelBeOutside:S,disableAnimation:k,getBaseProps:P,getLabelProps:E,getTriggerProps:I,getValueProps:j,getListboxProps:N,getPopoverProps:D,getSpinnerProps:M,getMainWrapperProps:V,getInnerWrapperProps:R,getHiddenSelectProps:K,getHelperWrapperProps:O,getListboxWrapperProps:B,getDescriptionProps:U,getErrorMessageProps:W,getSelectorIconProps:L,isClearable:Z,getClearButtonProps:T,getEndWrapperProps:F,getEndContentProps:$}=Bq({...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(rv,{})}):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||p)?null:h.jsx("div",{...O(),children:ge?h.jsx("div",{...W(),children:m}):h.jsx("div",{...U(),children:p})})},[a,g,m,p,O,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(bP,{...M()}):Y,[l,Y,M]),te=x.useMemo(()=>i.isOpen?h.jsx(Jq,{...D(),children:h.jsx(Zv,{...B(),children:h.jsx(Wv,{...N()})})}):null,[i.isOpen,D,i,c,B,N]);return h.jsxs("div",{...P(),children:[h.jsx(qq,{...K()}),S?H:null,h.jsxs("div",{...V(),children:[h.jsxs(o,{...I(),children:[S?null:H,h.jsxs("div",{...R(),children:[b,h.jsx("span",{...j(),children:le}),y&&i.selectedItems&&h.jsx(jl,{elementType:"span",children:","}),oe]}),ue]}),Q]}),k?te:h.jsx(tc,{children:te})]})}),xc=eG;const tG=dt`
|
|
227
227
|
query phoneSelectorDefaultProductVersion($slug: String!) {
|
|
228
228
|
product(slug: $slug) {
|
|
229
229
|
fullName
|
|
@@ -262,7 +262,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
`,rG=
|
|
265
|
+
`,rG=dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
`;function Yv(e,t){const r=(t??[]).map(c=>({key:c.key,value:c.option.key})),{data:n,error:o,isLoading:i}=Ko(e&&r.length===0?[tG,{slug:e}]:null,{use:[Yn],fetcher:nn}),{data:s,error:a,isLoading:l}=Ko(e&&r.length>0?[rG,{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 Jv,QT;function nG(){if(QT)return Jv;QT=1;function e(){this.__data__=[],this.size=0}return Jv=e,Jv}var Xv,e5;function t5(){if(e5)return Xv;e5=1;function e(t,r){return t===r||t!==t&&r!==r}return Xv=e,Xv}var Qv,r5;function Pp(){if(r5)return Qv;r5=1;var e=t5();function t(r,n){for(var o=r.length;o--;)if(e(r[o][0],n))return o;return-1}return Qv=t,Qv}var e0,n5;function oG(){if(n5)return e0;n5=1;var e=Pp(),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 e0=n,e0}var t0,o5;function iG(){if(o5)return t0;o5=1;var e=Pp();function t(r){var n=this.__data__,o=e(n,r);return o<0?void 0:n[o][1]}return t0=t,t0}var r0,i5;function sG(){if(i5)return r0;i5=1;var e=Pp();function t(r){return e(this.__data__,r)>-1}return r0=t,r0}var n0,s5;function aG(){if(s5)return n0;s5=1;var e=Pp();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 n0=t,n0}var o0,a5;function Ep(){if(a5)return o0;a5=1;var e=nG(),t=oG(),r=iG(),n=sG(),o=aG();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,o0=i,o0}var i0,l5;function lG(){if(l5)return i0;l5=1;var e=Ep();function t(){this.__data__=new e,this.size=0}return i0=t,i0}var s0,u5;function uG(){if(u5)return s0;u5=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return s0=e,s0}var a0,c5;function cG(){if(c5)return a0;c5=1;function e(t){return this.__data__.get(t)}return a0=e,a0}var l0,d5;function dG(){if(d5)return l0;d5=1;function e(t){return this.__data__.has(t)}return l0=e,l0}var u0,f5;function p5(){if(f5)return u0;f5=1;var e=typeof ls=="object"&&ls&&ls.Object===Object&&ls;return u0=e,u0}var c0,h5;function Ri(){if(h5)return c0;h5=1;var e=p5(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return c0=r,c0}var d0,m5;function Tp(){if(m5)return d0;m5=1;var e=Ri(),t=e.Symbol;return d0=t,d0}var f0,g5;function fG(){if(g5)return f0;g5=1;var e=Tp(),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 f0=i,f0}var p0,b5;function pG(){if(b5)return p0;b5=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return p0=r,p0}var h0,v5;function wc(){if(v5)return h0;v5=1;var e=Tp(),t=fG(),r=pG(),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 h0=s,h0}var m0,y5;function g0(){if(y5)return m0;y5=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return m0=e,m0}var b0,x5;function w5(){if(x5)return b0;x5=1;var e=wc(),t=g0(),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 b0=s,b0}var v0,C5;function hG(){if(C5)return v0;C5=1;var e=Ri(),t=e["__core-js_shared__"];return v0=t,v0}var y0,S5;function mG(){if(S5)return y0;S5=1;var e=hG(),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 y0=r,y0}var x0,k5;function P5(){if(k5)return x0;k5=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 x0=r,x0}var w0,E5;function gG(){if(E5)return w0;E5=1;var e=w5(),t=mG(),r=g0(),n=P5(),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 p(m){if(!r(m)||t(m))return!1;var g=e(m)?d:i;return g.test(n(m))}return w0=p,w0}var C0,T5;function bG(){if(T5)return C0;T5=1;function e(t,r){return t?.[r]}return C0=e,C0}var S0,A5;function Xl(){if(A5)return S0;A5=1;var e=gG(),t=bG();function r(n,o){var i=t(n,o);return e(i)?i:void 0}return S0=r,S0}var k0,$5;function P0(){if($5)return k0;$5=1;var e=Xl(),t=Ri(),r=e(t,"Map");return k0=r,k0}var E0,_5;function Ap(){if(_5)return E0;_5=1;var e=Xl(),t=e(Object,"create");return E0=t,E0}var T0,I5;function vG(){if(I5)return T0;I5=1;var e=Ap();function t(){this.__data__=e?e(null):{},this.size=0}return T0=t,T0}var A0,N5;function yG(){if(N5)return A0;N5=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return A0=e,A0}var $0,D5;function xG(){if(D5)return $0;D5=1;var e=Ap(),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 $0=o,$0}var _0,M5;function wG(){if(M5)return _0;M5=1;var e=Ap(),t=Object.prototype,r=t.hasOwnProperty;function n(o){var i=this.__data__;return e?i[o]!==void 0:r.call(i,o)}return _0=n,_0}var I0,O5;function CG(){if(O5)return I0;O5=1;var e=Ap(),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 I0=r,I0}var N0,j5;function SG(){if(j5)return N0;j5=1;var e=vG(),t=yG(),r=xG(),n=wG(),o=CG();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,N0=i,N0}var D0,L5;function kG(){if(L5)return D0;L5=1;var e=SG(),t=Ep(),r=P0();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return D0=n,D0}var M0,F5;function PG(){if(F5)return M0;F5=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return M0=e,M0}var O0,B5;function $p(){if(B5)return O0;B5=1;var e=PG();function t(r,n){var o=r.__data__;return e(n)?o[typeof n=="string"?"string":"hash"]:o.map}return O0=t,O0}var j0,z5;function EG(){if(z5)return j0;z5=1;var e=$p();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return j0=t,j0}var L0,K5;function TG(){if(K5)return L0;K5=1;var e=$p();function t(r){return e(this,r).get(r)}return L0=t,L0}var F0,V5;function AG(){if(V5)return F0;V5=1;var e=$p();function t(r){return e(this,r).has(r)}return F0=t,F0}var B0,R5;function $G(){if(R5)return B0;R5=1;var e=$p();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 B0=t,B0}var z0,W5;function K0(){if(W5)return z0;W5=1;var e=kG(),t=EG(),r=TG(),n=AG(),o=$G();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,z0=i,z0}var V0,U5;function _G(){if(U5)return V0;U5=1;var e=Ep(),t=P0(),r=K0(),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 V0=o,V0}var R0,H5;function q5(){if(H5)return R0;H5=1;var e=Ep(),t=lG(),r=uG(),n=cG(),o=dG(),i=_G();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,R0=s,R0}var W0,G5;function IG(){if(G5)return W0;G5=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return W0=t,W0}var U0,Z5;function NG(){if(Z5)return U0;Z5=1;function e(t){return this.__data__.has(t)}return U0=e,U0}var H0,Y5;function J5(){if(Y5)return H0;Y5=1;var e=K0(),t=IG(),r=NG();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,H0=n,H0}var q0,X5;function DG(){if(X5)return q0;X5=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 q0=e,q0}var G0,Q5;function eA(){if(Q5)return G0;Q5=1;function e(t,r){return t.has(r)}return G0=e,G0}var Z0,tA;function rA(){if(tA)return Z0;tA=1;var e=J5(),t=DG(),r=eA(),n=1,o=2;function i(s,a,l,c,d,p){var m=l&n,g=s.length,b=a.length;if(g!=b&&!(m&&b>g))return!1;var y=p.get(s),v=p.get(a);if(y&&v)return y==a&&v==s;var C=-1,S=!0,k=l&o?new e:void 0;for(p.set(s,a),p.set(a,s);++C<g;){var P=s[C],E=a[C];if(c)var I=m?c(E,P,C,a,s,p):c(P,E,C,s,a,p);if(I!==void 0){if(I)continue;S=!1;break}if(k){if(!t(a,function(j,N){if(!r(k,N)&&(P===j||d(P,j,l,c,p)))return k.push(N)})){S=!1;break}}else if(!(P===E||d(P,E,l,c,p))){S=!1;break}}return p.delete(s),p.delete(a),S}return Z0=i,Z0}var Y0,nA;function MG(){if(nA)return Y0;nA=1;var e=Ri(),t=e.Uint8Array;return Y0=t,Y0}var J0,oA;function OG(){if(oA)return J0;oA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o,i){n[++r]=[i,o]}),n}return J0=e,J0}var X0,iA;function Q0(){if(iA)return X0;iA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o){n[++r]=o}),n}return X0=e,X0}var ey,sA;function jG(){if(sA)return ey;sA=1;var e=Tp(),t=MG(),r=t5(),n=rA(),o=OG(),i=Q0(),s=1,a=2,l="[object Boolean]",c="[object Date]",d="[object Error]",p="[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(I,j,N,D,M,V,R){switch(N){case S:if(I.byteLength!=j.byteLength||I.byteOffset!=j.byteOffset)return!1;I=I.buffer,j=j.buffer;case C:return!(I.byteLength!=j.byteLength||!V(new t(I),new t(j)));case l:case c:case m:return r(+I,+j);case d:return I.name==j.name&&I.message==j.message;case g:case y:return I==j+"";case p:var K=o;case b:var O=D&s;if(K||(K=i),I.size!=j.size&&!O)return!1;var B=R.get(I);if(B)return B==j;D|=a,R.set(I,j);var U=n(K(I),K(j),D,M,V,R);return R.delete(I),U;case v:if(P)return P.call(I)==P.call(j)}return!1}return ey=E,ey}var ty,aA;function LG(){if(aA)return ty;aA=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 ty=e,ty}var ry,lA;function Os(){if(lA)return ry;lA=1;var e=Array.isArray;return ry=e,ry}var ny,uA;function FG(){if(uA)return ny;uA=1;var e=LG(),t=Os();function r(n,o,i){var s=o(n);return t(n)?s:e(s,i(n))}return ny=r,ny}var oy,cA;function BG(){if(cA)return oy;cA=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 oy=e,oy}var iy,dA;function zG(){if(dA)return iy;dA=1;function e(){return[]}return iy=e,iy}var sy,fA;function KG(){if(fA)return sy;fA=1;var e=BG(),t=zG(),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 sy=i,sy}var ay,pA;function VG(){if(pA)return ay;pA=1;function e(t,r){for(var n=-1,o=Array(t);++n<t;)o[n]=r(n);return o}return ay=e,ay}var ly,hA;function Cc(){if(hA)return ly;hA=1;function e(t){return t!=null&&typeof t=="object"}return ly=e,ly}var uy,mA;function RG(){if(mA)return uy;mA=1;var e=wc(),t=Cc(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return uy=n,uy}var cy,gA;function bA(){if(gA)return cy;gA=1;var e=RG(),t=Cc(),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 cy=i,cy}var Sc={exports:{}},dy,vA;function WG(){if(vA)return dy;vA=1;function e(){return!1}return dy=e,dy}Sc.exports;var yA;function xA(){return yA||(yA=1,(function(e,t){var r=Ri(),n=WG(),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})(Sc,Sc.exports)),Sc.exports}var fy,wA;function CA(){if(wA)return fy;wA=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 fy=r,fy}var py,SA;function hy(){if(SA)return py;SA=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return py=t,py}var my,kA;function UG(){if(kA)return my;kA=1;var e=wc(),t=hy(),r=Cc(),n="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",p="[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]",I="[object Int32Array]",j="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",M="[object Uint32Array]",V={};V[S]=V[k]=V[P]=V[E]=V[I]=V[j]=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[p]=V[m]=V[g]=V[b]=V[y]=!1;function R(K){return r(K)&&t(K.length)&&!!V[e(K)]}return my=R,my}var gy,PA;function HG(){if(PA)return gy;PA=1;function e(t){return function(r){return t(r)}}return gy=e,gy}var kc={exports:{}};kc.exports;var EA;function qG(){return EA||(EA=1,(function(e,t){var r=p5(),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})(kc,kc.exports)),kc.exports}var by,TA;function AA(){if(TA)return by;TA=1;var e=UG(),t=HG(),r=qG(),n=r&&r.isTypedArray,o=n?t(n):e;return by=o,by}var vy,$A;function GG(){if($A)return vy;$A=1;var e=VG(),t=bA(),r=Os(),n=xA(),o=CA(),i=AA(),s=Object.prototype,a=s.hasOwnProperty;function l(c,d){var p=r(c),m=!p&&t(c),g=!p&&!m&&n(c),b=!p&&!m&&!g&&i(c),y=p||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 vy=l,vy}var yy,_A;function ZG(){if(_A)return yy;_A=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return yy=t,yy}var xy,IA;function YG(){if(IA)return xy;IA=1;function e(t,r){return function(n){return t(r(n))}}return xy=e,xy}var wy,NA;function JG(){if(NA)return wy;NA=1;var e=YG(),t=e(Object.keys,Object);return wy=t,wy}var Cy,DA;function XG(){if(DA)return Cy;DA=1;var e=ZG(),t=JG(),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 Cy=o,Cy}var Sy,MA;function QG(){if(MA)return Sy;MA=1;var e=w5(),t=hy();function r(n){return n!=null&&t(n.length)&&!e(n)}return Sy=r,Sy}var ky,OA;function jA(){if(OA)return ky;OA=1;var e=GG(),t=XG(),r=QG();function n(o){return r(o)?e(o):t(o)}return ky=n,ky}var Py,LA;function eZ(){if(LA)return Py;LA=1;var e=FG(),t=KG(),r=jA();function n(o){return e(o,r,t)}return Py=n,Py}var Ey,FA;function tZ(){if(FA)return Ey;FA=1;var e=eZ(),t=1,r=Object.prototype,n=r.hasOwnProperty;function o(i,s,a,l,c,d){var p=a&t,m=e(i),g=m.length,b=e(s),y=b.length;if(g!=y&&!p)return!1;for(var v=g;v--;){var C=m[v];if(!(p?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=p;++v<g;){C=m[v];var I=i[C],j=s[C];if(l)var N=p?l(j,I,C,s,i,d):l(I,j,C,i,s,d);if(!(N===void 0?I===j||c(I,j,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 Ey=o,Ey}var Ty,BA;function rZ(){if(BA)return Ty;BA=1;var e=Xl(),t=Ri(),r=e(t,"DataView");return Ty=r,Ty}var Ay,zA;function nZ(){if(zA)return Ay;zA=1;var e=Xl(),t=Ri(),r=e(t,"Promise");return Ay=r,Ay}var $y,KA;function VA(){if(KA)return $y;KA=1;var e=Xl(),t=Ri(),r=e(t,"Set");return $y=r,$y}var _y,RA;function oZ(){if(RA)return _y;RA=1;var e=Xl(),t=Ri(),r=e(t,"WeakMap");return _y=r,_y}var Iy,WA;function iZ(){if(WA)return Iy;WA=1;var e=rZ(),t=P0(),r=nZ(),n=VA(),o=oZ(),i=wc(),s=P5(),a="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",p="[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)!=p)&&(S=function(k){var P=i(k),E=P==l?k.constructor:void 0,I=E?s(E):"";if(I)switch(I){case g:return m;case b:return a;case y:return c;case v:return d;case C:return p}return P}),Iy=S,Iy}var Ny,UA;function sZ(){if(UA)return Ny;UA=1;var e=q5(),t=rA(),r=jG(),n=tZ(),o=iZ(),i=Os(),s=xA(),a=AA(),l=1,c="[object Arguments]",d="[object Array]",p="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function b(y,v,C,S,k,P){var E=i(y),I=i(v),j=E?d:o(y),N=I?d:o(v);j=j==c?p:j,N=N==c?p:N;var D=j==p,M=N==p,V=j==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,j,C,S,k,P);if(!(C&l)){var R=D&&g.call(y,"__wrapped__"),K=M&&g.call(v,"__wrapped__");if(R||K){var O=R?y.value():y,B=K?v.value():v;return P||(P=new e),k(O,B,C,S,P)}}return V?(P||(P=new e),n(y,v,C,S,k,P)):!1}return Ny=b,Ny}var Dy,HA;function qA(){if(HA)return Dy;HA=1;var e=sZ(),t=Cc();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 Dy=r,Dy}var My,GA;function aZ(){if(GA)return My;GA=1;var e=q5(),t=qA(),r=1,n=2;function o(i,s,a,l){var c=a.length,d=c,p=!l;if(i==null)return!d;for(i=Object(i);c--;){var m=a[c];if(p&&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(p&&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 My=o,My}var Oy,ZA;function YA(){if(ZA)return Oy;ZA=1;var e=g0();function t(r){return r===r&&!e(r)}return Oy=t,Oy}var jy,JA;function lZ(){if(JA)return jy;JA=1;var e=YA(),t=jA();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 jy=r,jy}var Ly,XA;function QA(){if(XA)return Ly;XA=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Ly=e,Ly}var Fy,e$;function uZ(){if(e$)return Fy;e$=1;var e=aZ(),t=lZ(),r=QA();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 Fy=n,Fy}var By,t$;function zy(){if(t$)return By;t$=1;var e=wc(),t=Cc(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return By=n,By}var Ky,r$;function Vy(){if(r$)return Ky;r$=1;var e=Os(),t=zy(),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 Ky=o,Ky}var Ry,n$;function cZ(){if(n$)return Ry;n$=1;var e=K0(),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,Ry=r,Ry}var Wy,o$;function dZ(){if(o$)return Wy;o$=1;var e=cZ(),t=500;function r(n){var o=e(n,function(s){return i.size===t&&i.clear(),s}),i=o.cache;return o}return Wy=r,Wy}var Uy,i$;function fZ(){if(i$)return Uy;i$=1;var e=dZ(),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 Uy=n,Uy}var Hy,s$;function pZ(){if(s$)return Hy;s$=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 Hy=e,Hy}var qy,a$;function hZ(){if(a$)return qy;a$=1;var e=Tp(),t=pZ(),r=Os(),n=zy(),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 qy=s,qy}var Gy,l$;function mZ(){if(l$)return Gy;l$=1;var e=hZ();function t(r){return r==null?"":e(r)}return Gy=t,Gy}var Zy,u$;function c$(){if(u$)return Zy;u$=1;var e=Os(),t=Vy(),r=fZ(),n=mZ();function o(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return Zy=o,Zy}var Yy,d$;function _p(){if(d$)return Yy;d$=1;var e=zy();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Yy=t,Yy}var Jy,f$;function p$(){if(f$)return Jy;f$=1;var e=c$(),t=_p();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 Jy=r,Jy}var Xy,h$;function gZ(){if(h$)return Xy;h$=1;var e=p$();function t(r,n,o){var i=r==null?void 0:e(r,n);return i===void 0?o:i}return Xy=t,Xy}var Qy,m$;function bZ(){if(m$)return Qy;m$=1;function e(t,r){return t!=null&&r in Object(t)}return Qy=e,Qy}var ex,g$;function vZ(){if(g$)return ex;g$=1;var e=c$(),t=bA(),r=Os(),n=CA(),o=hy(),i=_p();function s(a,l,c){l=e(l,a);for(var d=-1,p=l.length,m=!1;++d<p;){var g=i(l[d]);if(!(m=a!=null&&c(a,g)))break;a=a[g]}return m||++d!=p?m:(p=a==null?0:a.length,!!p&&o(p)&&n(g,p)&&(r(a)||t(a)))}return ex=s,ex}var tx,b$;function yZ(){if(b$)return tx;b$=1;var e=bZ(),t=vZ();function r(n,o){return n!=null&&t(n,o,e)}return tx=r,tx}var rx,v$;function xZ(){if(v$)return rx;v$=1;var e=qA(),t=gZ(),r=yZ(),n=Vy(),o=YA(),i=QA(),s=_p(),a=1,l=2;function c(d,p){return n(d)&&o(p)?i(s(d),p):function(m){var g=t(m,d);return g===void 0&&g===p?r(m,d):e(p,g,a|l)}}return rx=c,rx}var nx,y$;function wZ(){if(y$)return nx;y$=1;function e(t){return t}return nx=e,nx}var ox,x$;function CZ(){if(x$)return ox;x$=1;function e(t){return function(r){return r?.[t]}}return ox=e,ox}var ix,w$;function SZ(){if(w$)return ix;w$=1;var e=p$();function t(r){return function(n){return e(n,r)}}return ix=t,ix}var sx,C$;function kZ(){if(C$)return sx;C$=1;var e=CZ(),t=SZ(),r=Vy(),n=_p();function o(i){return r(i)?e(n(i)):t(i)}return sx=o,sx}var ax,S$;function PZ(){if(S$)return ax;S$=1;var e=uZ(),t=xZ(),r=wZ(),n=Os(),o=kZ();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 ax=i,ax}var lx,k$;function EZ(){if(k$)return lx;k$=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 lx=e,lx}var ux,P$;function TZ(){if(P$)return ux;P$=1;function e(t){return t!==t}return ux=e,ux}var cx,E$;function AZ(){if(E$)return cx;E$=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 cx=e,cx}var dx,T$;function $Z(){if(T$)return dx;T$=1;var e=EZ(),t=TZ(),r=AZ();function n(o,i,s){return i===i?r(o,i,s):e(o,t,s)}return dx=n,dx}var fx,A$;function _Z(){if(A$)return fx;A$=1;var e=$Z();function t(r,n){var o=r==null?0:r.length;return!!o&&e(r,n,0)>-1}return fx=t,fx}var px,$$;function IZ(){if($$)return px;$$=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 px=e,px}var hx,_$;function NZ(){if(_$)return hx;_$=1;function e(){}return hx=e,hx}var mx,I$;function DZ(){if(I$)return mx;I$=1;var e=VA(),t=NZ(),r=Q0(),n=1/0,o=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return mx=o,mx}var gx,N$;function D$(){if(N$)return gx;N$=1;var e=J5(),t=_Z(),r=IZ(),n=eA(),o=DZ(),i=Q0(),s=200;function a(l,c,d){var p=-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(;++p<g;){var S=l[p],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 gx=a,gx}var bx,M$;function MZ(){if(M$)return bx;M$=1;var e=PZ(),t=D$();function r(n,o){return n&&n.length?t(n,e(o,2)):[]}return bx=r,bx}var OZ=MZ();const jZ=$u(OZ);function vx(e,t){return r=>{const n=r.distinctProperties.find(o=>o.key===e);return!!n&&n.option.slug===t}}function LZ(e,t){return e?.map(r=>{const n=jZ(r.options.filter(o=>t.some(vx(r.key,o.slug))),"slug");return{...r,options:n}})}function FZ(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=>vx("internal_storage",i.internalStorage.slug)(a)&&vx("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 BZ(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 zZ(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 O$({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 j$({disabled:e,versions:t,onSelectionChange:r,classNames:n,distinctProperties:o,selectedDistinctProperties:i,selectedPhone:s,ref:a}){const l=LZ(o,t),c=FZ(l,t),{popoverProps:d}=Zn(),[p,m]=x.useState(!1),{productVersion:g}=Yv(s?.slug,i);return s?h.jsx(Ms,{shadow:"sm",radius:"lg",className:A("shrink-0 scroll-mt-4",n?.base),ref:a,children:h.jsxs(iT,{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(zl,{alt:g.media.main.altText||s.fullName,src:tv(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(zl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(Hm,{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(xc,{variant:"bordered",placeholder:"Kies een versie","aria-label":"Kies een telefoon versie",isOpen:p,onOpenChange:b=>b!==p&&m(b),isDisabled:e,popoverProps:d,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:BZ(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(O$,{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(Da,{variant:"flat",textValue:`${v.label} • ${y.label}`,onClick:()=>{r(zZ(C,l||[]),b.productVersionId),m(!1)},children:h.jsx(O$,{colorHex:y.hex,storage:v.label,color:y.label})},[v.slug,y.slug].join(":"))})})]})}):null}function KZ({onConfirm:e,classNames:t,brandSlug:r,phoneSlug:n,distinctProperties:o}){const{t:i}=Je(),{popularPhones:s,brands:a}=hH(),{popoverProps:l,isShadowRoot:c}=Zn(),{isModalOpen:d,openModal:p,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:I,isLoading:j}=dH(b),N=x.useMemo(()=>[...s,...I],[s,I]),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(di,{isOpen:P,onOpenChange:R=>R?p("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(li,{children:[h.jsx(ui,{children:i("phoneSelector.selectPhone")}),h.jsxs(si,{children:[h.jsx(j$,{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(RH,{brands:a,selectedBrandSlug:b,onBrandChange:y,classNames:t?.brandTabs}),h.jsx(Sq,{isLoading:j&&b!=="popular",phones:b==="popular"?s:I,selectedPhoneSlug:v,onPhoneSelect:E,classNames:t?.phoneList})]})]}),h.jsx(zi,{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 VZ({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,p]=x.useState(o),{product:m,productVersion:g}=Yv(l,d);function b(v,C){c(v),p(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&&p([])},[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(Kl,{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:Hm,classNames:s}),h.jsx(KZ,{phoneSlug:l,brandSlug:m?.brand.slug,distinctProperties:d,onConfirm:b,classNames:t})]})}function RZ(e){var t,r;const n=ur(),[o,i]=qr(e,yC.variantKeys),{ref:s,as:a,src:l,className:c,classNames:d,loading:p,isBlurred:m,fallbackSrc:g,isLoading:b,disableSkeleton:y=!!g,removeWrapper:v=!1,onError:C,onLoad:S,srcSet:k,sizes:P,crossOrigin:E,...I}=o,j=uP({src:l,loading:p,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=j==="loaded"&&!b,M=j==="loading"||b,V=e.isZoomed,R=a||"img",K=ot(s),{w:O,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(()=>yC({...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:p,srcSet:k,sizes:P,crossOrigin:E,...I,style:{...I?.height&&{height:B},...H.style,...I.style}}},F=x.useCallback(()=>{const H=U?{backgroundImage:`url(${g})`}:{};return{className:L.wrapper({class:d?.wrapper}),style:{...H,maxWidth:O}}},[L,U,g,d?.wrapper,O]),$=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 L$=Xe((e,t)=>{const{Component:r,domRef:n,slots:o,classNames:i,isBlurred:s,isZoomed:a,fallbackSrc:l,removeWrapper:c,disableSkeleton:d,getImgProps:p,getWrapperProps:m,getBlurredImgProps:g}=RZ({...e,ref:t}),b=h.jsx(r,{ref:n,...p()});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});L$.displayName="HeroUI.Image";var Ar=L$,Ip;function WZ(e){if(!Ip)if(typeof document<"u")Ip=document.createElement("textarea");else return;var t="&"+e+";";Ip.innerHTML=t;var r=Ip.value;return r!==t?r:void 0}var Te=32,_e=9,Oa=13,Ke=10,Ot=96,Nr=126,cr=91,pi=94,yt=62,hi=35,yx=37,dt=45,Jn=61,zr=92,mr=42,or=95,zt=60,xx=64,vo=93,Sn=33,F$=38,kn=58,B$=70,ja=102,Pc=104,js=119,Ql=116,wx=112,z$=115,UZ=160,HZ=12,qZ=44,K$=59,Ec=63,yo=46,xr=47,La=39,Fa=34,Ls=43,Kr=124,eu=123,Cx=125,Wo=40,Uo=41,Np=30,Sx=31,Tt=48,At=57,pt=65,xt=90,Yt=97,ir=122,Dp=128,Ho=32,GZ={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=GZ;function ZZ(e){if(!R$(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 Yv(e,t){const r=(t??[]).map(c=>({key:c.key,value:c.option.key})),{data:n,error:o,isLoading:i}=Ko(e&&r.length===0?[tG,{slug:e}]:null,{use:[Yn],fetcher:nn}),{data:s,error:a,isLoading:l}=Ko(e&&r.length>0?[rG,{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 Jv,QT;function nG(){if(QT)return Jv;QT=1;function e(){this.__data__=[],this.size=0}return Jv=e,Jv}var Xv,e5;function t5(){if(e5)return Xv;e5=1;function e(t,r){return t===r||t!==t&&r!==r}return Xv=e,Xv}var Qv,r5;function Pp(){if(r5)return Qv;r5=1;var e=t5();function t(r,n){for(var o=r.length;o--;)if(e(r[o][0],n))return o;return-1}return Qv=t,Qv}var e0,n5;function oG(){if(n5)return e0;n5=1;var e=Pp(),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 e0=n,e0}var t0,o5;function iG(){if(o5)return t0;o5=1;var e=Pp();function t(r){var n=this.__data__,o=e(n,r);return o<0?void 0:n[o][1]}return t0=t,t0}var r0,i5;function sG(){if(i5)return r0;i5=1;var e=Pp();function t(r){return e(this.__data__,r)>-1}return r0=t,r0}var n0,s5;function aG(){if(s5)return n0;s5=1;var e=Pp();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 n0=t,n0}var o0,a5;function Ep(){if(a5)return o0;a5=1;var e=nG(),t=oG(),r=iG(),n=sG(),o=aG();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,o0=i,o0}var i0,l5;function lG(){if(l5)return i0;l5=1;var e=Ep();function t(){this.__data__=new e,this.size=0}return i0=t,i0}var s0,u5;function uG(){if(u5)return s0;u5=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return s0=e,s0}var a0,c5;function cG(){if(c5)return a0;c5=1;function e(t){return this.__data__.get(t)}return a0=e,a0}var l0,d5;function dG(){if(d5)return l0;d5=1;function e(t){return this.__data__.has(t)}return l0=e,l0}var u0,f5;function p5(){if(f5)return u0;f5=1;var e=typeof ls=="object"&&ls&&ls.Object===Object&&ls;return u0=e,u0}var c0,h5;function Ri(){if(h5)return c0;h5=1;var e=p5(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return c0=r,c0}var d0,m5;function Tp(){if(m5)return d0;m5=1;var e=Ri(),t=e.Symbol;return d0=t,d0}var f0,g5;function fG(){if(g5)return f0;g5=1;var e=Tp(),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 f0=i,f0}var p0,b5;function pG(){if(b5)return p0;b5=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return p0=r,p0}var h0,v5;function wc(){if(v5)return h0;v5=1;var e=Tp(),t=fG(),r=pG(),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 h0=s,h0}var m0,y5;function g0(){if(y5)return m0;y5=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return m0=e,m0}var b0,x5;function w5(){if(x5)return b0;x5=1;var e=wc(),t=g0(),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 b0=s,b0}var v0,C5;function hG(){if(C5)return v0;C5=1;var e=Ri(),t=e["__core-js_shared__"];return v0=t,v0}var y0,S5;function mG(){if(S5)return y0;S5=1;var e=hG(),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 y0=r,y0}var x0,k5;function P5(){if(k5)return x0;k5=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 x0=r,x0}var w0,E5;function gG(){if(E5)return w0;E5=1;var e=w5(),t=mG(),r=g0(),n=P5(),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 p(m){if(!r(m)||t(m))return!1;var g=e(m)?d:i;return g.test(n(m))}return w0=p,w0}var C0,T5;function bG(){if(T5)return C0;T5=1;function e(t,r){return t?.[r]}return C0=e,C0}var S0,A5;function Xl(){if(A5)return S0;A5=1;var e=gG(),t=bG();function r(n,o){var i=t(n,o);return e(i)?i:void 0}return S0=r,S0}var k0,$5;function P0(){if($5)return k0;$5=1;var e=Xl(),t=Ri(),r=e(t,"Map");return k0=r,k0}var E0,_5;function Ap(){if(_5)return E0;_5=1;var e=Xl(),t=e(Object,"create");return E0=t,E0}var T0,I5;function vG(){if(I5)return T0;I5=1;var e=Ap();function t(){this.__data__=e?e(null):{},this.size=0}return T0=t,T0}var A0,N5;function yG(){if(N5)return A0;N5=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return A0=e,A0}var $0,D5;function xG(){if(D5)return $0;D5=1;var e=Ap(),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 $0=o,$0}var _0,M5;function wG(){if(M5)return _0;M5=1;var e=Ap(),t=Object.prototype,r=t.hasOwnProperty;function n(o){var i=this.__data__;return e?i[o]!==void 0:r.call(i,o)}return _0=n,_0}var I0,O5;function CG(){if(O5)return I0;O5=1;var e=Ap(),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 I0=r,I0}var N0,j5;function SG(){if(j5)return N0;j5=1;var e=vG(),t=yG(),r=xG(),n=wG(),o=CG();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,N0=i,N0}var D0,L5;function kG(){if(L5)return D0;L5=1;var e=SG(),t=Ep(),r=P0();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return D0=n,D0}var M0,F5;function PG(){if(F5)return M0;F5=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return M0=e,M0}var O0,B5;function $p(){if(B5)return O0;B5=1;var e=PG();function t(r,n){var o=r.__data__;return e(n)?o[typeof n=="string"?"string":"hash"]:o.map}return O0=t,O0}var j0,z5;function EG(){if(z5)return j0;z5=1;var e=$p();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return j0=t,j0}var L0,K5;function TG(){if(K5)return L0;K5=1;var e=$p();function t(r){return e(this,r).get(r)}return L0=t,L0}var F0,V5;function AG(){if(V5)return F0;V5=1;var e=$p();function t(r){return e(this,r).has(r)}return F0=t,F0}var B0,R5;function $G(){if(R5)return B0;R5=1;var e=$p();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 B0=t,B0}var z0,W5;function K0(){if(W5)return z0;W5=1;var e=kG(),t=EG(),r=TG(),n=AG(),o=$G();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,z0=i,z0}var V0,U5;function _G(){if(U5)return V0;U5=1;var e=Ep(),t=P0(),r=K0(),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 V0=o,V0}var R0,H5;function q5(){if(H5)return R0;H5=1;var e=Ep(),t=lG(),r=uG(),n=cG(),o=dG(),i=_G();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,R0=s,R0}var W0,G5;function IG(){if(G5)return W0;G5=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return W0=t,W0}var U0,Z5;function NG(){if(Z5)return U0;Z5=1;function e(t){return this.__data__.has(t)}return U0=e,U0}var H0,Y5;function J5(){if(Y5)return H0;Y5=1;var e=K0(),t=IG(),r=NG();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,H0=n,H0}var q0,X5;function DG(){if(X5)return q0;X5=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 q0=e,q0}var G0,Q5;function eA(){if(Q5)return G0;Q5=1;function e(t,r){return t.has(r)}return G0=e,G0}var Z0,tA;function rA(){if(tA)return Z0;tA=1;var e=J5(),t=DG(),r=eA(),n=1,o=2;function i(s,a,l,c,d,p){var m=l&n,g=s.length,b=a.length;if(g!=b&&!(m&&b>g))return!1;var y=p.get(s),v=p.get(a);if(y&&v)return y==a&&v==s;var C=-1,S=!0,k=l&o?new e:void 0;for(p.set(s,a),p.set(a,s);++C<g;){var P=s[C],E=a[C];if(c)var I=m?c(E,P,C,a,s,p):c(P,E,C,s,a,p);if(I!==void 0){if(I)continue;S=!1;break}if(k){if(!t(a,function(j,N){if(!r(k,N)&&(P===j||d(P,j,l,c,p)))return k.push(N)})){S=!1;break}}else if(!(P===E||d(P,E,l,c,p))){S=!1;break}}return p.delete(s),p.delete(a),S}return Z0=i,Z0}var Y0,nA;function MG(){if(nA)return Y0;nA=1;var e=Ri(),t=e.Uint8Array;return Y0=t,Y0}var J0,oA;function OG(){if(oA)return J0;oA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o,i){n[++r]=[i,o]}),n}return J0=e,J0}var X0,iA;function Q0(){if(iA)return X0;iA=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o){n[++r]=o}),n}return X0=e,X0}var ey,sA;function jG(){if(sA)return ey;sA=1;var e=Tp(),t=MG(),r=t5(),n=rA(),o=OG(),i=Q0(),s=1,a=2,l="[object Boolean]",c="[object Date]",d="[object Error]",p="[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(I,j,N,D,M,V,R){switch(N){case S:if(I.byteLength!=j.byteLength||I.byteOffset!=j.byteOffset)return!1;I=I.buffer,j=j.buffer;case C:return!(I.byteLength!=j.byteLength||!V(new t(I),new t(j)));case l:case c:case m:return r(+I,+j);case d:return I.name==j.name&&I.message==j.message;case g:case y:return I==j+"";case p:var K=o;case b:var O=D&s;if(K||(K=i),I.size!=j.size&&!O)return!1;var B=R.get(I);if(B)return B==j;D|=a,R.set(I,j);var U=n(K(I),K(j),D,M,V,R);return R.delete(I),U;case v:if(P)return P.call(I)==P.call(j)}return!1}return ey=E,ey}var ty,aA;function LG(){if(aA)return ty;aA=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 ty=e,ty}var ry,lA;function Os(){if(lA)return ry;lA=1;var e=Array.isArray;return ry=e,ry}var ny,uA;function FG(){if(uA)return ny;uA=1;var e=LG(),t=Os();function r(n,o,i){var s=o(n);return t(n)?s:e(s,i(n))}return ny=r,ny}var oy,cA;function BG(){if(cA)return oy;cA=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 oy=e,oy}var iy,dA;function zG(){if(dA)return iy;dA=1;function e(){return[]}return iy=e,iy}var sy,fA;function KG(){if(fA)return sy;fA=1;var e=BG(),t=zG(),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 sy=i,sy}var ay,pA;function VG(){if(pA)return ay;pA=1;function e(t,r){for(var n=-1,o=Array(t);++n<t;)o[n]=r(n);return o}return ay=e,ay}var ly,hA;function Cc(){if(hA)return ly;hA=1;function e(t){return t!=null&&typeof t=="object"}return ly=e,ly}var uy,mA;function RG(){if(mA)return uy;mA=1;var e=wc(),t=Cc(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return uy=n,uy}var cy,gA;function bA(){if(gA)return cy;gA=1;var e=RG(),t=Cc(),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 cy=i,cy}var Sc={exports:{}},dy,vA;function WG(){if(vA)return dy;vA=1;function e(){return!1}return dy=e,dy}Sc.exports;var yA;function xA(){return yA||(yA=1,(function(e,t){var r=Ri(),n=WG(),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})(Sc,Sc.exports)),Sc.exports}var fy,wA;function CA(){if(wA)return fy;wA=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 fy=r,fy}var py,SA;function hy(){if(SA)return py;SA=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return py=t,py}var my,kA;function UG(){if(kA)return my;kA=1;var e=wc(),t=hy(),r=Cc(),n="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",p="[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]",I="[object Int32Array]",j="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",M="[object Uint32Array]",V={};V[S]=V[k]=V[P]=V[E]=V[I]=V[j]=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[p]=V[m]=V[g]=V[b]=V[y]=!1;function R(K){return r(K)&&t(K.length)&&!!V[e(K)]}return my=R,my}var gy,PA;function HG(){if(PA)return gy;PA=1;function e(t){return function(r){return t(r)}}return gy=e,gy}var kc={exports:{}};kc.exports;var EA;function qG(){return EA||(EA=1,(function(e,t){var r=p5(),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})(kc,kc.exports)),kc.exports}var by,TA;function AA(){if(TA)return by;TA=1;var e=UG(),t=HG(),r=qG(),n=r&&r.isTypedArray,o=n?t(n):e;return by=o,by}var vy,$A;function GG(){if($A)return vy;$A=1;var e=VG(),t=bA(),r=Os(),n=xA(),o=CA(),i=AA(),s=Object.prototype,a=s.hasOwnProperty;function l(c,d){var p=r(c),m=!p&&t(c),g=!p&&!m&&n(c),b=!p&&!m&&!g&&i(c),y=p||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 vy=l,vy}var yy,_A;function ZG(){if(_A)return yy;_A=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return yy=t,yy}var xy,IA;function YG(){if(IA)return xy;IA=1;function e(t,r){return function(n){return t(r(n))}}return xy=e,xy}var wy,NA;function JG(){if(NA)return wy;NA=1;var e=YG(),t=e(Object.keys,Object);return wy=t,wy}var Cy,DA;function XG(){if(DA)return Cy;DA=1;var e=ZG(),t=JG(),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 Cy=o,Cy}var Sy,MA;function QG(){if(MA)return Sy;MA=1;var e=w5(),t=hy();function r(n){return n!=null&&t(n.length)&&!e(n)}return Sy=r,Sy}var ky,OA;function jA(){if(OA)return ky;OA=1;var e=GG(),t=XG(),r=QG();function n(o){return r(o)?e(o):t(o)}return ky=n,ky}var Py,LA;function eZ(){if(LA)return Py;LA=1;var e=FG(),t=KG(),r=jA();function n(o){return e(o,r,t)}return Py=n,Py}var Ey,FA;function tZ(){if(FA)return Ey;FA=1;var e=eZ(),t=1,r=Object.prototype,n=r.hasOwnProperty;function o(i,s,a,l,c,d){var p=a&t,m=e(i),g=m.length,b=e(s),y=b.length;if(g!=y&&!p)return!1;for(var v=g;v--;){var C=m[v];if(!(p?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=p;++v<g;){C=m[v];var I=i[C],j=s[C];if(l)var N=p?l(j,I,C,s,i,d):l(I,j,C,i,s,d);if(!(N===void 0?I===j||c(I,j,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 Ey=o,Ey}var Ty,BA;function rZ(){if(BA)return Ty;BA=1;var e=Xl(),t=Ri(),r=e(t,"DataView");return Ty=r,Ty}var Ay,zA;function nZ(){if(zA)return Ay;zA=1;var e=Xl(),t=Ri(),r=e(t,"Promise");return Ay=r,Ay}var $y,KA;function VA(){if(KA)return $y;KA=1;var e=Xl(),t=Ri(),r=e(t,"Set");return $y=r,$y}var _y,RA;function oZ(){if(RA)return _y;RA=1;var e=Xl(),t=Ri(),r=e(t,"WeakMap");return _y=r,_y}var Iy,WA;function iZ(){if(WA)return Iy;WA=1;var e=rZ(),t=P0(),r=nZ(),n=VA(),o=oZ(),i=wc(),s=P5(),a="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",p="[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)!=p)&&(S=function(k){var P=i(k),E=P==l?k.constructor:void 0,I=E?s(E):"";if(I)switch(I){case g:return m;case b:return a;case y:return c;case v:return d;case C:return p}return P}),Iy=S,Iy}var Ny,UA;function sZ(){if(UA)return Ny;UA=1;var e=q5(),t=rA(),r=jG(),n=tZ(),o=iZ(),i=Os(),s=xA(),a=AA(),l=1,c="[object Arguments]",d="[object Array]",p="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function b(y,v,C,S,k,P){var E=i(y),I=i(v),j=E?d:o(y),N=I?d:o(v);j=j==c?p:j,N=N==c?p:N;var D=j==p,M=N==p,V=j==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,j,C,S,k,P);if(!(C&l)){var R=D&&g.call(y,"__wrapped__"),K=M&&g.call(v,"__wrapped__");if(R||K){var O=R?y.value():y,B=K?v.value():v;return P||(P=new e),k(O,B,C,S,P)}}return V?(P||(P=new e),n(y,v,C,S,k,P)):!1}return Ny=b,Ny}var Dy,HA;function qA(){if(HA)return Dy;HA=1;var e=sZ(),t=Cc();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 Dy=r,Dy}var My,GA;function aZ(){if(GA)return My;GA=1;var e=q5(),t=qA(),r=1,n=2;function o(i,s,a,l){var c=a.length,d=c,p=!l;if(i==null)return!d;for(i=Object(i);c--;){var m=a[c];if(p&&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(p&&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 My=o,My}var Oy,ZA;function YA(){if(ZA)return Oy;ZA=1;var e=g0();function t(r){return r===r&&!e(r)}return Oy=t,Oy}var jy,JA;function lZ(){if(JA)return jy;JA=1;var e=YA(),t=jA();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 jy=r,jy}var Ly,XA;function QA(){if(XA)return Ly;XA=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Ly=e,Ly}var Fy,e$;function uZ(){if(e$)return Fy;e$=1;var e=aZ(),t=lZ(),r=QA();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 Fy=n,Fy}var By,t$;function zy(){if(t$)return By;t$=1;var e=wc(),t=Cc(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return By=n,By}var Ky,r$;function Vy(){if(r$)return Ky;r$=1;var e=Os(),t=zy(),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 Ky=o,Ky}var Ry,n$;function cZ(){if(n$)return Ry;n$=1;var e=K0(),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,Ry=r,Ry}var Wy,o$;function dZ(){if(o$)return Wy;o$=1;var e=cZ(),t=500;function r(n){var o=e(n,function(s){return i.size===t&&i.clear(),s}),i=o.cache;return o}return Wy=r,Wy}var Uy,i$;function fZ(){if(i$)return Uy;i$=1;var e=dZ(),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 Uy=n,Uy}var Hy,s$;function pZ(){if(s$)return Hy;s$=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 Hy=e,Hy}var qy,a$;function hZ(){if(a$)return qy;a$=1;var e=Tp(),t=pZ(),r=Os(),n=zy(),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 qy=s,qy}var Gy,l$;function mZ(){if(l$)return Gy;l$=1;var e=hZ();function t(r){return r==null?"":e(r)}return Gy=t,Gy}var Zy,u$;function c$(){if(u$)return Zy;u$=1;var e=Os(),t=Vy(),r=fZ(),n=mZ();function o(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return Zy=o,Zy}var Yy,d$;function _p(){if(d$)return Yy;d$=1;var e=zy();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Yy=t,Yy}var Jy,f$;function p$(){if(f$)return Jy;f$=1;var e=c$(),t=_p();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 Jy=r,Jy}var Xy,h$;function gZ(){if(h$)return Xy;h$=1;var e=p$();function t(r,n,o){var i=r==null?void 0:e(r,n);return i===void 0?o:i}return Xy=t,Xy}var Qy,m$;function bZ(){if(m$)return Qy;m$=1;function e(t,r){return t!=null&&r in Object(t)}return Qy=e,Qy}var ex,g$;function vZ(){if(g$)return ex;g$=1;var e=c$(),t=bA(),r=Os(),n=CA(),o=hy(),i=_p();function s(a,l,c){l=e(l,a);for(var d=-1,p=l.length,m=!1;++d<p;){var g=i(l[d]);if(!(m=a!=null&&c(a,g)))break;a=a[g]}return m||++d!=p?m:(p=a==null?0:a.length,!!p&&o(p)&&n(g,p)&&(r(a)||t(a)))}return ex=s,ex}var tx,b$;function yZ(){if(b$)return tx;b$=1;var e=bZ(),t=vZ();function r(n,o){return n!=null&&t(n,o,e)}return tx=r,tx}var rx,v$;function xZ(){if(v$)return rx;v$=1;var e=qA(),t=gZ(),r=yZ(),n=Vy(),o=YA(),i=QA(),s=_p(),a=1,l=2;function c(d,p){return n(d)&&o(p)?i(s(d),p):function(m){var g=t(m,d);return g===void 0&&g===p?r(m,d):e(p,g,a|l)}}return rx=c,rx}var nx,y$;function wZ(){if(y$)return nx;y$=1;function e(t){return t}return nx=e,nx}var ox,x$;function CZ(){if(x$)return ox;x$=1;function e(t){return function(r){return r?.[t]}}return ox=e,ox}var ix,w$;function SZ(){if(w$)return ix;w$=1;var e=p$();function t(r){return function(n){return e(n,r)}}return ix=t,ix}var sx,C$;function kZ(){if(C$)return sx;C$=1;var e=CZ(),t=SZ(),r=Vy(),n=_p();function o(i){return r(i)?e(n(i)):t(i)}return sx=o,sx}var ax,S$;function PZ(){if(S$)return ax;S$=1;var e=uZ(),t=xZ(),r=wZ(),n=Os(),o=kZ();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 ax=i,ax}var lx,k$;function EZ(){if(k$)return lx;k$=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 lx=e,lx}var ux,P$;function TZ(){if(P$)return ux;P$=1;function e(t){return t!==t}return ux=e,ux}var cx,E$;function AZ(){if(E$)return cx;E$=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 cx=e,cx}var dx,T$;function $Z(){if(T$)return dx;T$=1;var e=EZ(),t=TZ(),r=AZ();function n(o,i,s){return i===i?r(o,i,s):e(o,t,s)}return dx=n,dx}var fx,A$;function _Z(){if(A$)return fx;A$=1;var e=$Z();function t(r,n){var o=r==null?0:r.length;return!!o&&e(r,n,0)>-1}return fx=t,fx}var px,$$;function IZ(){if($$)return px;$$=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 px=e,px}var hx,_$;function NZ(){if(_$)return hx;_$=1;function e(){}return hx=e,hx}var mx,I$;function DZ(){if(I$)return mx;I$=1;var e=VA(),t=NZ(),r=Q0(),n=1/0,o=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return mx=o,mx}var gx,N$;function D$(){if(N$)return gx;N$=1;var e=J5(),t=_Z(),r=IZ(),n=eA(),o=DZ(),i=Q0(),s=200;function a(l,c,d){var p=-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(;++p<g;){var S=l[p],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 gx=a,gx}var bx,M$;function MZ(){if(M$)return bx;M$=1;var e=PZ(),t=D$();function r(n,o){return n&&n.length?t(n,e(o,2)):[]}return bx=r,bx}var OZ=MZ();const jZ=$u(OZ);function vx(e,t){return r=>{const n=r.distinctProperties.find(o=>o.key===e);return!!n&&n.option.slug===t}}function LZ(e,t){return e?.map(r=>{const n=jZ(r.options.filter(o=>t.some(vx(r.key,o.slug))),"slug");return{...r,options:n}})}function FZ(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=>vx("internal_storage",i.internalStorage.slug)(a)&&vx("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 BZ(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 zZ(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 O$({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 j$({disabled:e,versions:t,onSelectionChange:r,classNames:n,distinctProperties:o,selectedDistinctProperties:i,selectedPhone:s,ref:a}){const l=LZ(o,t),c=FZ(l,t),{popoverProps:d}=Zn(),[p,m]=x.useState(!1),{productVersion:g}=Yv(s?.slug,i);return s?h.jsx(Ms,{shadow:"sm",radius:"lg",className:A("shrink-0 scroll-mt-4",n?.base),ref:a,children:h.jsxs(iT,{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(zl,{alt:g.media.main.altText||s.fullName,src:tv(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(zl,{size:"md",radius:"full",color:"primary",showFallback:!0,fallback:h.jsx(Hm,{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(xc,{variant:"bordered",placeholder:"Kies een versie","aria-label":"Kies een telefoon versie",isOpen:p,onOpenChange:b=>b!==p&&m(b),isDisabled:e,popoverProps:d,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:BZ(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(O$,{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(Da,{variant:"flat",textValue:`${v.label} • ${y.label}`,onClick:()=>{r(zZ(C,l||[]),b.productVersionId),m(!1)},children:h.jsx(O$,{colorHex:y.hex,storage:v.label,color:y.label})},[v.slug,y.slug].join(":"))})})]})}):null}function KZ({onConfirm:e,classNames:t,brandSlug:r,phoneSlug:n,distinctProperties:o}){const{t:i}=Je(),{popularPhones:s,brands:a}=hH(),{popoverProps:l,isShadowRoot:c}=Zn(),{isModalOpen:d,openModal:p,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:I,isLoading:j}=dH(b),N=x.useMemo(()=>[...s,...I],[s,I]),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(di,{isOpen:P,onOpenChange:R=>R?p("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(li,{children:[h.jsx(ui,{children:i("phoneSelector.selectPhone")}),h.jsxs(si,{children:[h.jsx(j$,{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(RH,{brands:a,selectedBrandSlug:b,onBrandChange:y,classNames:t?.brandTabs}),h.jsx(Sq,{isLoading:j&&b!=="popular",phones:b==="popular"?s:I,selectedPhoneSlug:v,onPhoneSelect:E,classNames:t?.phoneList})]})]}),h.jsx(zi,{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 VZ({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,p]=x.useState(o),{product:m,productVersion:g}=Yv(l,d);function b(v,C){c(v),p(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&&p([])},[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(Kl,{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:Hm,classNames:s}),h.jsx(KZ,{phoneSlug:l,brandSlug:m?.brand.slug,distinctProperties:d,onConfirm:b,classNames:t})]})}function RZ(e){var t,r;const n=ur(),[o,i]=qr(e,yC.variantKeys),{ref:s,as:a,src:l,className:c,classNames:d,loading:p,isBlurred:m,fallbackSrc:g,isLoading:b,disableSkeleton:y=!!g,removeWrapper:v=!1,onError:C,onLoad:S,srcSet:k,sizes:P,crossOrigin:E,...I}=o,j=uP({src:l,loading:p,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=j==="loaded"&&!b,M=j==="loading"||b,V=e.isZoomed,R=a||"img",K=ot(s),{w:O,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(()=>yC({...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:p,srcSet:k,sizes:P,crossOrigin:E,...I,style:{...I?.height&&{height:B},...H.style,...I.style}}},F=x.useCallback(()=>{const H=U?{backgroundImage:`url(${g})`}:{};return{className:L.wrapper({class:d?.wrapper}),style:{...H,maxWidth:O}}},[L,U,g,d?.wrapper,O]),$=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 L$=Xe((e,t)=>{const{Component:r,domRef:n,slots:o,classNames:i,isBlurred:s,isZoomed:a,fallbackSrc:l,removeWrapper:c,disableSkeleton:d,getImgProps:p,getWrapperProps:m,getBlurredImgProps:g}=RZ({...e,ref:t}),b=h.jsx(r,{ref:n,...p()});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});L$.displayName="HeroUI.Image";var Ar=L$,Ip;function WZ(e){if(!Ip)if(typeof document<"u")Ip=document.createElement("textarea");else return;var t="&"+e+";";Ip.innerHTML=t;var r=Ip.value;return r!==t?r:void 0}var Te=32,_e=9,Oa=13,Ke=10,Ot=96,Nr=126,cr=91,pi=94,yt=62,hi=35,yx=37,ft=45,Jn=61,zr=92,mr=42,or=95,zt=60,xx=64,vo=93,Sn=33,F$=38,kn=58,B$=70,ja=102,Pc=104,js=119,Ql=116,wx=112,z$=115,UZ=160,HZ=12,qZ=44,K$=59,Ec=63,yo=46,xr=47,La=39,Fa=34,Ls=43,Kr=124,eu=123,Cx=125,Wo=40,Uo=41,Np=30,Sx=31,Tt=48,At=57,pt=65,xt=90,Yt=97,ir=122,Dp=128,Ho=32,GZ={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=GZ;function ZZ(e){if(!R$(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++,R$(e,"---",n))return{endPos:t,hasValidYaml:r};if(!r){let i=aY(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&&Ba.push(e.slice(o,i)),Ba.push("�"),o=i+1)}return o<n&&Ba.push(e.slice(o)),Ba.join("")}function aY(e,t,r){let n=r??e.length;for(;t<n&&(e[t]===" "||e[t]===" ");)t++;return t}function Px(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 lY(e){for(var t=!1,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=Te||n===Fa||n===yx||n===zt||n===yt||n===cr||n===zr||n===vo||n===pi||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===yx&&r+2<e.length){var i=e.charCodeAt(r+1),s=e.charCodeAt(r+2);if((i>=Tt&&i<=At||i>=pt&&i<=B$||i>=Yt&&i<=ja)&&(s>=Tt&&s<=At||s>=pt&&s<=B$||s>=Yt&&s<=ja)){o+=e[r]+e[r+1]+e[r+2],r+=2;continue}}o+=encodeURI(e[r])}return o}function uY(...e){return e.filter(Boolean).join(" ")}var cY=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),Op=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function G$(e){return cY.has(e.toLowerCase())}function dY(e){return Op.lastIndex=0,Op.test(e)}function Z$(e){return Op.lastIndex=0,e.replace(Op,function(t,r,n,o){return"<"+r+n+o})}var fY=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,pY=/^<[A-Z]/,Ex=["script","pre","style","textarea"],Ac=new Set(Ex),hY=/<(?:pre|script|style|textarea)\b/i,Y$=/<(?:pre|script|style|textarea)\b/iy,J$=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,X$=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,Q$=new Uint8Array(128);(function(){for(var e=[Ot,mr,or,Nr,Jn,cr,Sn,zt,zr,Sx,Pc,js,ja],t=0;t<e.length;t++)Q$[e[t]]=1})();var e_=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function mY(e){return Ac.has(e)}function gY(e){return hY.test(e)}function t_(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 p=e.charCodeAt(c);if(p===Ot||p===Nr){for(var m=p,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 I=c;I<l&&e.charCodeAt(I)===yt;){I++,I<l&&e.charCodeAt(I)===Te&&I++;for(var j=0;I<l&&j<4;)if(e.charCodeAt(I)===Te)j++,I++;else if(e.charCodeAt(I)===_e)j+=4,I++;else break;if(j>=4)break;i=!1}if(!i&&d<4&&I<l&&e.charCodeAt(I)===cr&&!(I+1<o&&e.charCodeAt(I+1)===pi)){var N=r_(e,I,t);if(N){n=N,i=!1;continue}}var D=e.charCodeAt(c);if(D===hi&&d<4)i=!1;else if(d<4&&(D===
|
|
295
|
+
`&&t++,R$(e,"---",n))return{endPos:t,hasValidYaml:r};if(!r){let i=aY(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===ft||s===yo);)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 YZ=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,JZ={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=JZ[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 XZ=/(\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 Mp(e){return e.indexOf("&")===-1?e:e.replace(YZ,(t,r)=>{var n=WZ(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 V$=/(javascript|vbscript|data(?!:image)):/i;function kx(e){if(V$.test(e))return null;if(e.indexOf("%")===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(V$.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 xo(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+Ho);continue}if(i===Te||i===ft){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 R$(e,t,r){return e.startsWith(t,r)}var W$=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 Tc(e){let t=e.toLowerCase();if(W$.has(t))return!0;let r=t.indexOf(":");return r!==-1?(t=t.slice(r+1),W$.has(t)):!1}var Fs=1,U$=2,tu=4,H$=8,QZ=16,qo=32,Bs=64,q$=1,eY=2,tY=3,rY=4,nY=(function(){var e=new Uint8Array(128),t;for(e[_e]=Fs,e[Ke]=Fs|U$,e[HZ]=Fs,e[Oa]=Fs|U$,e[Te]=Fs,t=Sn;t<=xr;t++)e[t]=tu;for(t=kn;t<=xx;t++)e[t]=tu;for(t=cr;t<=Ot;t++)e[t]=tu;for(t=eu;t<=Nr;t++)e[t]=tu;for(t=Tt;t<=At;t++)e[t]=QZ;for(t=pt;t<=xt;t++)e[t]=H$;for(t=Yt;t<=ir;t++)e[t]=H$;return e})();(function(){let e=new Uint8Array(128);return e[zr]=eY,e[cr]=rY,e[mr]=e[or]=e[Nr]=e[Jn]=tY,e[Ot]=e[zt]=e[xx]=e[vo]=e[Ke]=e[Te]=e[Sn]=q$,e[ja]=e[Pc]=e[js]=q$,e})();var oY=/[\p{P}\p{S}]/u,iY=new RegExp("\\p{Zs}","u"),Ba=[];function sY(e){var t=e.indexOf("\r"),r=e.indexOf("\0");if(t===-1&&r===-1)return e;var n=e.length;Ba.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===Oa?(o<i&&Ba.push(e.slice(o,i)),i+1<n&&e.charCodeAt(i+1)===Ke&&i++,Ba.push(`
|
|
296
|
+
`),o=i+1):s===0&&(o<i&&Ba.push(e.slice(o,i)),Ba.push("�"),o=i+1)}return o<n&&Ba.push(e.slice(o)),Ba.join("")}function aY(e,t,r){let n=r??e.length;for(;t<n&&(e[t]===" "||e[t]===" ");)t++;return t}function Px(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 lY(e){for(var t=!1,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=Te||n===Fa||n===yx||n===zt||n===yt||n===cr||n===zr||n===vo||n===pi||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===yx&&r+2<e.length){var i=e.charCodeAt(r+1),s=e.charCodeAt(r+2);if((i>=Tt&&i<=At||i>=pt&&i<=B$||i>=Yt&&i<=ja)&&(s>=Tt&&s<=At||s>=pt&&s<=B$||s>=Yt&&s<=ja)){o+=e[r]+e[r+1]+e[r+2],r+=2;continue}}o+=encodeURI(e[r])}return o}function uY(...e){return e.filter(Boolean).join(" ")}var cY=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),Op=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function G$(e){return cY.has(e.toLowerCase())}function dY(e){return Op.lastIndex=0,Op.test(e)}function Z$(e){return Op.lastIndex=0,e.replace(Op,function(t,r,n,o){return"<"+r+n+o})}var fY=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,pY=/^<[A-Z]/,Ex=["script","pre","style","textarea"],Ac=new Set(Ex),hY=/<(?:pre|script|style|textarea)\b/i,Y$=/<(?:pre|script|style|textarea)\b/iy,J$=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,X$=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,Q$=new Uint8Array(128);(function(){for(var e=[Ot,mr,or,Nr,Jn,cr,Sn,zt,zr,Sx,Pc,js,ja],t=0;t<e.length;t++)Q$[e[t]]=1})();var e_=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function mY(e){return Ac.has(e)}function gY(e){return hY.test(e)}function t_(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)!==ft)return!1;for(;n<o&&e.charCodeAt(n)===ft;)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 Wi(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)===ft);)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 p=r,m={},g=!1;for(;r<n;){let j=e.charCodeAt(r);if(j===yt){let N=e.slice(p,r);return{tag:a,attrs:m,selfClosing:!1,end:r+1,rawAttrs:N,whitespaceBeforeAttrs:c,isClosing:o,hasSpaceBeforeSlash:g}}if(j===Te||j===_e||j===Ke){r++;continue}if(j===xr&&r+1<n&&e.charCodeAt(r+1)===yt){let N=e.slice(p,r);return g=r>p&&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===yo||v===kn||v===ft)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===Fa||S===La){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===eu){var E=1,k=r;for(r++;r<n&&E>0;){var v=e.charCodeAt(r);v===eu?E++:v===Cx&&E--,r++}m[C]=e.slice(k,r)}else{for(var k=r;r<n;){var I=e.charCodeAt(r);if(I===Te||I===_e||I===yt||I===Ke||I===Fa||I===La||I===Jn||I===zt||I===Ot)break;r++}if(r===k)return null;m[C]=e.slice(k,r)}}return null}function bY(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 p=e.charCodeAt(c);if(p===Ot||p===Nr){for(var m=p,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 I=c;I<l&&e.charCodeAt(I)===yt;){I++,I<l&&e.charCodeAt(I)===Te&&I++;for(var j=0;I<l&&j<4;)if(e.charCodeAt(I)===Te)j++,I++;else if(e.charCodeAt(I)===_e)j+=4,I++;else break;if(j>=4)break;i=!1}if(!i&&d<4&&I<l&&e.charCodeAt(I)===cr&&!(I+1<o&&e.charCodeAt(I+1)===pi)){var N=r_(e,I,t);if(N){n=N,i=!1;continue}}var D=e.charCodeAt(c);if(D===hi&&d<4)i=!1;else if(d<4&&(D===ft||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 r_(e,t,r){let n=e.length;if(e.charCodeAt(t)!==cr)return null;let o=t+1<n&&e.charCodeAt(t+1)===pi,i=t+1;for(;i<n;){var s=e.charCodeAt(i);if(s===vo){i++;break}if(s===cr)return null;s===zr&&i+1<n&&i++,i++}if(i>n||e.charCodeAt(i-1)!==vo)return null;let a=e.slice(t+1,i-1);if(a.length>999)return null;let l=Lp(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),O=K<0?n:K,B=e.slice(i,O).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 p=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(p,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!==Fa&&y!==La&&y!==Wo)return null}}else{for(var p=i,v=0;i<n;){var s=e.charCodeAt(i);if(s===Wo)v++;else if(s===Uo){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(p,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=i;if(i===S&&i<n)for(I=i+1;I<n&&(e.charCodeAt(I)===Te||e.charCodeAt(I)===_e);)I++;if(I<n){var j=e.charCodeAt(I);if(j===Fa||j===La||j===Wo){for(var N=j===Wo?41:j,D=I+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===i)return null}}if(P)return r[l]||(r[l]={target:ru(d),title:k!==void 0?Mp(ru(k)):k}),E;for(;i<S&&(e.charCodeAt(i)===Te||e.charCodeAt(i)===_e);)i++;return i<S?null:(r[l]||(r[l]={target:ru(d),title:k}),C<0?n:C+1)}var En=new Uint8Array(nY);for(En[Sx]=Fs,En[hi]|=qo,En[yt]|=qo,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 $c(e,t,r){for(;t<r;){let n=e.charCodeAt(t);if(n!==Te&&n!==_e)break;t++}return t}function a_(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 Ui(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 $c(e,t,r)>=r}function l_(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)!==hi)return null;let s=Ui(e,i,o,35);if(s<1||s>6||(i+=s,i<o&&e.charCodeAt(i)!==Te&&e.charCodeAt(i)!==_e))return null;i=$c(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)===hi;)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),p=(n?.slugify||xo)(c);return{node:{type:ve.heading,level:s,children:d,id:p},end:Et(e,o)}}function vY(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=i;if(i===S&&i<n)for(I=i+1;I<n&&(e.charCodeAt(I)===Te||e.charCodeAt(I)===_e);)I++;if(I<n){var j=e.charCodeAt(I);if(j===Fa||j===La||j===Wo){for(var N=j===Wo?41:j,D=I+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===i)return null}}if(P)return r[l]||(r[l]={target:ru(d),title:k!==void 0?Mp(ru(k)):k}),E;for(;i<S&&(e.charCodeAt(i)===Te||e.charCodeAt(i)===_e);)i++;return i<S?null:(r[l]||(r[l]={target:ru(d),title:k}),C<0?n:C+1)}var En=new Uint8Array(nY);for(En[Sx]=Fs,En[hi]|=qo,En[yt]|=qo,En[ft]|=qo|Bs,En[Ls]|=qo,En[mr]|=qo|Bs,En[or]|=qo|Bs,En[Ot]|=qo|Bs,En[Nr]|=qo|Bs,En[zt]|=qo|Bs,En[cr]|=Bs,En[Sn]|=Bs,En[Kr]|=qo,jp=Tt;jp<=At;jp++)En[jp]|=qo;var jp;function n_(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)===vo)return!0}return!1}function Lp(e){var t=e.replace(/\s+/g," ").trim();return t.indexOf("ẞ")!==-1?t.replace(/\u1E9E/g,"ss").toLowerCase():t.toLowerCase()}function Tx(e){return e<Dp?En[e]:e===UZ?Fs:0}function ru(e){return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,"$1")}var o_=null,i_=-1,s_=-1;function Kt(e,t){if(t===i_&&e===o_)return s_;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 $c(e,t,r){for(;t<r;){let n=e.charCodeAt(t);if(n!==Te&&n!==_e)break;t++}return t}function a_(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 Ui(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 $c(e,t,r)>=r}function l_(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)!==hi)return null;let s=Ui(e,i,o,35);if(s<1||s>6||(i+=s,i<o&&e.charCodeAt(i)!==Te&&e.charCodeAt(i)!==_e))return null;i=$c(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)===hi;)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),p=(n?.slugify||xo)(c);return{node:{type:ve.heading,level:s,children:d,id:p},end:Et(e,o)}}function vY(e,t,r){var n=e.charCodeAt(t);if(n!==Jn&&n!==ft)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 zs(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!==ft&&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 yY(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=Ui(e,i,n,s);if(a<3)return null;i+=a;let l=$c(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),p="",m="",g=d.indexOf(" ");g===-1?p=d:(p=d.slice(0,g),m=d.slice(g+1).trim()),p=ru(p);var b=void 0;if(m){e_.lastIndex=0;for(var y;(y=e_.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=Ui(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 I=Kt(e,E);wr(e,E,I);var j=Math.min(Bt,o);P+=e.slice(E+j,I)+`
|
|
302
302
|
`,E=Et(e,I)}P.length>0&&P.charCodeAt(P.length-1)===Ke&&(P=P.slice(0,-1))}return{node:{type:ve.codeBlock,lang:p||void 0,text:P,infoString:m||void 0,attrs:b},end:S}}function xY(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 p="";if(c>0)for(var m=0;m<c;m++)p+=" ";p+=e.slice(o+b,g),n+=p+`
|
|
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 wY(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,p=!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 I=4-S%4,j=0;j<I;j++)y+=" ";S+=I}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("~~~")?p=!p:y.startsWith(" ")||y.startsWith(" ")?p=!0:N.length>0&&!p&&(p=!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===hi||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 O=Rs(s||"",r,n);return r.inBlockQuote=R,r.g=K,{node:{type:ve.blockQuote,children:O,alert:l||void 0},end:a}}function u_(e,t,r){for(var n=0,o=t;o<r;o++)e.charCodeAt(o)===_e?n+=4-n%4:n++;return n}function Ks(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("~~~")?p=!p:y.startsWith(" ")||y.startsWith(" ")?p=!0:N.length>0&&!p&&(p=!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===hi||M===yt||M===Ot||M===Nr||M===zt||(M===ft||M===mr||M===or)&&zs(e,a)||(M===ft||M===mr||M===Ls)&&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)===yo||e.charCodeAt(V)===Uo))break}}if(p)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 O=Rs(s||"",r,n);return r.inBlockQuote=R,r.g=K,{node:{type:ve.blockQuote,children:O,alert:l||void 0},end:a}}function u_(e,t,r){for(var n=0,o=t;o<r;o++)e.charCodeAt(o)===_e?n+=4-n%4:n++;return n}function Ks(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===ft||o===mr||o===Ls){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===yo||c===Uo){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,p=u_(e,t,s),m=0,g=d,b=p;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:p+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-p;return v||C>4?(b=p+1,g=d+1,m=1):m===0&&(b=p+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 Fp=0;function CY(e,t,r,n){var o=0,i=t;for(Fp=0;i<r&&o<n;){var s=e.charCodeAt(i);if(s===_e){var a=4-o%4;if(o+a>n){Fp=o+a-n,i++,o=n;break}o+=a}else if(s===Te)o++;else break;i++}return i}function c_(e,t,r,n){var o=Kt(e,t),i=Ks(e,t,o);if(!i)return null;var s=[],a=t,l=i.contentCol,c="",d=i.isEmpty,p=!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=u_(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 I=Kt(e,a);wr(e,a,I);var j=e.charCodeAt(a+Bt);if(Ft<l&&(j===
|
|
308
|
+
`}for(a=Et(e,o);a<e.length;){var I=Kt(e,a);wr(e,a,I);var j=e.charCodeAt(a+Bt);if(Ft<l&&(j===ft||j===mr||j===or)&&Ft<=3&&zs(e,a))break;var N=Ks(e,a,I);if(N&&N.ordered===i.ordered&&N.marker===i.marker&&N.markerCol<l){s.push({contentCol:l,raw:c,hasBlankAfter:p,isEmpty:d}),p&&(m=!0),l=N.contentCol,d=N.isEmpty,p=!1,c=N.isEmpty?"":e.slice(N.contentStart,I)+`
|
|
309
309
|
`,a=Et(e,I);continue}if(zn(e,a,I)){c+=`
|
|
310
|
-
`,a=Et(e,I);for(var D=!1,M=0;M<c.length;M++){var V=c.charCodeAt(M);if(V!==Ke&&V!==Oa&&V!==Te&&V!==_e){D=!0;break}}if(d&&!D)if(a<e.length){var R=Kt(e,a),K=Ks(e,a,R);if(!K||K.ordered!==i.ordered||K.marker!==i.marker)break;p=!0}else break;if(a<e.length){var O=Kt(e,a);wr(e,a,O);var B=e.charCodeAt(a+Bt);if((B===
|
|
310
|
+
`,a=Et(e,I);for(var D=!1,M=0;M<c.length;M++){var V=c.charCodeAt(M);if(V!==Ke&&V!==Oa&&V!==Te&&V!==_e){D=!0;break}}if(d&&!D)if(a<e.length){var R=Kt(e,a),K=Ks(e,a,R);if(!K||K.ordered!==i.ordered||K.marker!==i.marker)break;p=!0}else break;if(a<e.length){var O=Kt(e,a);wr(e,a,O);var B=e.charCodeAt(a+Bt);if((B===ft||B===mr||B===or)&&Ft<=3&&zs(e,a))break;var U=Ks(e,a,O);if(U&&U.ordered===i.ordered&&U.marker===i.marker&&U.markerCol<l){p=!0;continue}if(!zn(e,a,O)&&Ft<l)break}continue}if(Ft>=l){var W=CY(e,a,I,l);if(Fp>0){for(var L="",Z=l,T=0;T<Fp;T++)L+=" ",Z++;for(var F=W;F<I;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,I)+`
|
|
312
|
-
`;a=Et(e,I);continue}for(var Y=!1,X=0;X<c.length;X++){var oe=c.charCodeAt(X);if(oe!==Ke&&oe!==Oa&&oe!==Te&&oe!==_e){Y=!0;break}}if(!p&&Y&&!d){var Q=a+Bt,le=e.charCodeAt(Q),ue=le===hi||le===yt||le===zt||le===Ot||le===Nr||(le===
|
|
312
|
+
`;a=Et(e,I);continue}for(var Y=!1,X=0;X<c.length;X++){var oe=c.charCodeAt(X);if(oe!==Ke&&oe!==Oa&&oe!==Te&&oe!==_e){Y=!0;break}}if(!p&&Y&&!d){var Q=a+Bt,le=e.charCodeAt(Q),ue=le===hi||le===yt||le===zt||le===Ot||le===Nr||(le===ft||le===mr||le===or||le===Ls)&&(zs(e,a)!==null||Ks(e,a,I)!==null)||le>=Tt&&le<=At&&Ks(e,a,I)!==null;if(!ue){c+=""+e.slice(Q,I)+`
|
|
313
313
|
`,a=Et(e,I);continue}}break}if(s.push({contentCol:l,raw:c,hasBlankAfter:p,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=Ks(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?Ks(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)===vo&&(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=Rs(Sr,r,n),r.inList=tt}else{var It=r.inList;if(r.inList=!0,_t=Rs(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 Bp=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 Hi(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={},p=[],m=0,g=0;for(let y=0;y<a.length;y++){let v=a.charCodeAt(y);v===Wo?m++:v===Uo?m--:v===K$&&m===0&&(p.push(a.slice(g,y)),g=y+1)}g<a.length&&p.push(a.slice(g));let b=!1;p.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)===eu&&a.charCodeAt(a.length-1)===Cx){var o=a.slice(1,-1);if(o.length>0){var i=o.charCodeAt(0);if(i===cr||i===eu)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 Vs(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,p=1;p<n;p++){var m=e.charCodeAt(c+p),g=t.charCodeAt(p);if(m>=pt&&m<=xt&&(m+=Ho),g>=pt&&g<=xt&&(g+=Ho),m!==g){d=!1;break}}if(d)return c;l=c+1}return-1}o>=pt&&o<=xt&&(o+=Ho);for(let y=r;y<=e.length-n;y++){var b=e.charCodeAt(y);if(b>=pt&&b<=xt&&(b+=Ho),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+=Ho),k>=pt&&k<=xt&&(k+=Ho),S!==k){v=!1;break}}if(v)return y}return-1}function SY(e,t,r){let n=t.length;var o=t.charCodeAt(0);o>=pt&&o<=xt&&(o+=Ho);for(let s=Math.min(r,e.length-n);s>=0;s--){var i=e.charCodeAt(s);if(i>=pt&&i<=xt&&(i+=Ho),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+=Ho),d>=pt&&d<=xt&&(d+=Ho),c!==d){a=!1;break}}if(a)return s}return-1}var zp=-1;function Ax(e,t,r){let n=r.toLowerCase(),o="<"+n,i="</"+n,s=1,a=t,l=e.length;for(zp=-1;a<l&&s>0;){let p=Vs(e,o,a),m=Vs(e,i,a);if(m===-1)return-1;if(p!==-1&&p<m){let g=Wi(e,p);g?(g.tag.toLowerCase()===n&&!g.isClosing&&!g.selfClosing&&!Tc(g.tag)&&s++,a=g.end):a=p+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)){zp=m;let g=m+i.length;for(;g<l&&e.charCodeAt(g)!==yt;)g++;return g+1}a=m+1}}return-1}function d_(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=kY(e,i);if(l>=1&&l<=5){var c=e.length;if(l===1){for(var d=e.length,p=0;p<Ex.length;p++){var m=Vs(e,"</"+Ex[p]+">",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=Wi(e,i),P={},E;k&&!k.isClosing&&(P=Hi(k.attrs,C,n),E=k.whitespaceBeforeAttrs+k.rawAttrs);var I=[],j=C.toLowerCase(),N="</"+j,D=Vs(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 O=k?k.isClosing:!1;return{node:{type:ve.htmlBlock,tag:C,attrs:P,f:E,children:I,a:M,text:V,c:!0,b:O,endPos:c,e:!0},end:c}}if(l===6||l===7){var B=a_(e,t),U=B<e.length?B:e.length,W=e.slice(i,U),L=B<e.length?Et(e,B):e.length,Z=Wi(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||Tc(T))return{node:{type:ve.htmlBlock,tag:T,attrs:Hi(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=Vs(X,"<"+F,ge),pe=Vs(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=Ax(e,Z.end,F);if(Pe!==-1){for(var Ae=zp,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===wx||Jt===z$||Jt===Ql)&&(Y$.lastIndex=Ue,Y$.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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
317
317
|
|
|
318
318
|
`)!==-1,Si=J$.test(jt),Yi=X$.test(jt),Ja=Jo||Si||r.inHTML&&Yi,Xa=Ur.length>=2&&Ur.charCodeAt(0)===Ke&&Ur.charCodeAt(Ur.length-1)===Ke&&!Jo;Xa&&!Si&&!Yi?eo=[{type:ve.text,text:jt}]:Ja||Yi?(r.inline=!1,eo=Rs(Ur,r,n)):(r.inline=!0,eo=Tn(jt,0,jt.length,r,n))}r.inline=Zi,r.inHTML=Xs,r.d=Yo}}var Qs=!1;if(l===6&&oe!==-1&&!r.inHTML&&!sr){var ki=Ur,rt=/<[a-zA-Z][^>]*>/.test(ki),Xo=/\n\n/.test(ki)||/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(ki);rt&&!Xo&&(Qs=!0)}var du=!Me&&(r.inHTML||l===7||sr||!Ct||Qs);if(du){var an;if(oe!==-1&&dr){var fu=!1;if(r.inHTML&&Q<X.length){for(var ea=Q;ea<X.length&&X.charCodeAt(ea)!==Ke;)ea++;var Qa=X.slice(Q,ea).trim();fu=Qa.length>1&&Qa.charCodeAt(0)===zt&&Qa.charCodeAt(1)!==xr}an=fu?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:Hi(Z.attrs,T,n),f:Z.whitespaceBeforeAttrs+Z.rawAttrs,children:eo,a:an,text:an,c:!0,b:!1,endPos:kr,e:l===6},end:_t}}return{node:{type:ve.htmlBlock,tag:T,attrs:Hi(Z.attrs,T,n),f:Z.whitespaceBeforeAttrs+Z.rawAttrs,children:eo,a:Me?"":Ur,text:Ur,c:!1,b:!1,endPos:kr,e:l===6},end:_t}}var ta=W.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),Uc=ta?ta[2]:"div",Ji=ta?ta[1]==="/":!1,el=W;if(Ji){var Xi=W.indexOf(">");Xi!==-1&&(el=W.slice(Xi+1))}return{node:{type:ve.htmlBlock,tag:Uc,attrs:{},children:[],a:el,text:el,c:!0,b:Ji,endPos:U,e:l===6},end:L}}var Dr=Wi(e,i);if(!Dr)return null;var Po=Dr.tag,$e=Po.toLowerCase(),to=Po.charCodeAt(0),Pi=to>=pt&&to<=xt;if(!Pi&&!Bp.has($e)&&!Ac.has($e)&&!$e.includes("-"))return null;if(Dr.isClosing)return{node:{type:ve.htmlSelfClosing,tag:Po,attrs:{},a:e.slice(i,Dr.end),b:!0,endPos:Dr.end},end:Dr.end};var Eo=Ax(e,Dr.end,Po),tl=[];if(Eo!==-1){var P1=zp,pu=e.slice(Dr.end,P1),rl=pu.trim();if(rl){var Eh=pu.indexOf(`
|
|
319
319
|
|
|
320
|
-
`)!==-1,Th=J$.test(rl),Ah=X$.test(rl),Hc=r.inline,E1=r.inHTML,$h=r.d;r.inHTML=!0,r.d=(r.d||0)+1,Eh||Th||Ah?(r.inline=!1,tl=Rs(pu,r,n)):(r.inline=!0,tl=Tn(rl,0,rl.length,r,n)),r.inline=Hc,r.inHTML=E1,r.d=$h}var hu=Kt(e,Eo),_h=e.slice(Eo,hu).trim(),qc=_h?Eo:Et(e,Eo),Gc=Pi?e.slice(i,Eo):e.slice(i,qc),Ih=Pi?Eo:qc;return{node:{type:ve.htmlBlock,tag:Po,attrs:Hi(Dr.attrs,Po,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:tl,a:Gc,text:Pi?pu:Gc,c:!0,b:!1,endPos:Ih,e:!1},end:qc}}var Ei=a_(e,Dr.end),T1=Ei<e.length?Et(e,Ei):Ei,mu=e.slice(Dr.end,Ei);if(mu.trim()){var{inline:Zc,inHTML:Yc,d:ra}=r;r.inline=!1,r.inHTML=!0,r.d=(r.d||0)+1,tl=Rs(mu,r,n),r.inline=Zc,r.inHTML=Yc,r.d=ra}var Nh=e.slice(Dr.end,Ei);return{node:{type:ve.htmlBlock,tag:Po,attrs:Hi(Dr.attrs,Po,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:tl,a:Nh,text:mu,c:!0,b:!1,endPos:Ei,e:!1},end:T1}}function kY(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,Th=J$.test(rl),Ah=X$.test(rl),Hc=r.inline,E1=r.inHTML,$h=r.d;r.inHTML=!0,r.d=(r.d||0)+1,Eh||Th||Ah?(r.inline=!1,tl=Rs(pu,r,n)):(r.inline=!0,tl=Tn(rl,0,rl.length,r,n)),r.inline=Hc,r.inHTML=E1,r.d=$h}var hu=Kt(e,Eo),_h=e.slice(Eo,hu).trim(),qc=_h?Eo:Et(e,Eo),Gc=Pi?e.slice(i,Eo):e.slice(i,qc),Ih=Pi?Eo:qc;return{node:{type:ve.htmlBlock,tag:Po,attrs:Hi(Dr.attrs,Po,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:tl,a:Gc,text:Pi?pu:Gc,c:!0,b:!1,endPos:Ih,e:!1},end:qc}}var Ei=a_(e,Dr.end),T1=Ei<e.length?Et(e,Ei):Ei,mu=e.slice(Dr.end,Ei);if(mu.trim()){var{inline:Zc,inHTML:Yc,d:ra}=r;r.inline=!1,r.inHTML=!0,r.d=(r.d||0)+1,tl=Rs(mu,r,n),r.inline=Zc,r.inHTML=Yc,r.d=ra}var Nh=e.slice(Dr.end,Ei);return{node:{type:ve.htmlBlock,tag:Po,attrs:Hi(Dr.attrs,Po,n),f:Dr.whitespaceBeforeAttrs+Dr.rawAttrs,children:tl,a:Nh,text:mu,c:!0,b:!1,endPos:Ei,e:!1},end:T1}}function kY(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)===ft&&e.charCodeAt(r+2)===ft)return 2;if(e.charCodeAt(r)===Ec)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===ft)a++;else break}if(a===s)return 0;var c=e.slice(s,a);if(Ac.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(Bp.has(c.toLowerCase())){if(i){for(var p=a;p<n&&(e.charCodeAt(p)===Te||e.charCodeAt(p)===_e);)p++;return p<n&&e.charCodeAt(p)===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=Wi(e,t);if(C&&C.end<=v){var S=e.slice(C.end,v).trim();if(S==="")return 7}}return 0}function f_(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 p=0;c<o&&e.charCodeAt(c)===Ot;)p++,c++;for(var m=!1;c<o&&!m;){for(var g=0;c<o&&e.charCodeAt(c)===Ot;)g++,c++;g===p?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 p_(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(!t_(e,s,a))return null;let l=e.slice(t,o),c=e.slice(s,a);for(var d=[],p=0,m=c.length;p<m&&(c.charCodeAt(p)===Te||c.charCodeAt(p)===_e);)p++;for(p<m&&c.charCodeAt(p)===Kr&&p++;p<m;){for(;p<m&&(c.charCodeAt(p)===Te||c.charCodeAt(p)===_e);)p++;if(p>=m||c.charCodeAt(p)===Kr)break;var g=c.charCodeAt(p)===kn;for(g&&p++;p<m&&c.charCodeAt(p)===ft;)p++;var b=p<m&&c.charCodeAt(p)===kn;for(b&&p++,d.push(g&&b?"center":b?"right":g?"left":null);p<m&&(c.charCodeAt(p)===Te||c.charCodeAt(p)===_e);)p++;p<m&&c.charCodeAt(p)===Kr&&p++}let y=f_(l,r,n);if(d.length!==y.length)return null;let v=[],C=Et(e,a);for(;C<e.length;){let j=Kt(e,C),N=e.slice(C,j);if(zn(e,C,j))break;if(wr(e,C,j),Ft<4){var S=e.charCodeAt(C+Bt);if(S===yt||S===hi||(S===ft||S===mr||S===or)&&zs(e,C))break;if(S===Ot||S===Nr){for(var k=C+Bt,P=0;k<j&&e.charCodeAt(k)===S;)P++,k++;if(P>=3)break}}v.push(f_(N,r,n)),C=Et(e,j)}if((n.streaming||n.optimizeForStreaming)&&v.length===0)return null;for(var E=y.length,I=0;I<v.length;I++)if(v[I].length<E)for(;v[I].length<E;)v[I].push([]);else v[I].length>E&&(v[I].length=E);return{node:{type:ve.table,header:y,cells:v,align:d},end:C}}function PY(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)===pi){var i=EY(e,o,r);return i||null}r.refs||(r.refs={});var s=r_(e,o,r.refs);return s===null?null:{node:{type:ve.refCollection},end:s}}function EY(e,t,r){var n=e.length;if(e.charCodeAt(t)!==cr||t+1>=n||e.charCodeAt(t+1)!==pi)return null;for(var o=t+2,i=o;o<n&&e.charCodeAt(o)!==vo;){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 p=Et(e,d);if(p<n){var m=Kt(e,p);if(wr(e,p,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 TY(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 TY(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===ft){let O=o+Bt;for(;O<V&&e.charCodeAt(O)===K;)O++;for(;O<V&&(e.charCodeAt(O)===Te||e.charCodeAt(O)===_e);)O++;if(O>=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)===Np){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 O=e.charCodeAt(R+Bt);if(O===yt){o=R;break}if(O===hi&&l_(e,R,r,n)){o=R;break}if(O===Ot||O===Nr){for(var c=R+Bt,d=0;c<K&&e.charCodeAt(c)===O;)d++,c++;if(d>=3){o=R;break}}if(O===zt){var p=R+Bt+1,m=p<K?e.charCodeAt(p):0,g=m===Sn||m===Ec;if(!g&&m===xr){for(var b=p+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)===ft);)y++;y>b&&(g=Bp.has(e.slice(b,y).toLowerCase()))}else if(!g){for(var v=p;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)===ft);)v++;if(v>p){var C=e.slice(p,v).toLowerCase();g=Bp.has(C)||Ac.has(C)}}if(g&&d_(e,R,r,n)){o=R;break}}if(O===ft||O===mr||O===Ls){let B=R+Bt+1;if(B<K&&(e.charCodeAt(B)===Te||e.charCodeAt(B)===_e)){var S=$c(e,B,K);if(S<K&&!zs(e,R)){o=R;break}}}if(O>=Tt&&O<=At){let B=R+Bt;for(;B<K&&e.charCodeAt(B)>=Tt&&e.charCodeAt(B)<=At;)B++;if(B<K&&(e.charCodeAt(B)===yo||e.charCodeAt(B)===Uo)&&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=$c(e,k,K);if(P<K){o=R;break}}}}if(O===Kr){let B=Et(e,K);if(B<e.length){let U=Kt(e,B);if(t_(e,B,U)){o=R;break}}}if((O===ft||O===mr||O===or)&&zs(e,R)){if(O!==ft){o=R;break}let B=R+Bt;for(;B<K&&e.charCodeAt(B)===ft;)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)===Oa||e.charCodeAt(E-1)===Te||e.charCodeAt(E-1)===_e);)E--;for(var I=t;I<E&&(e.charCodeAt(I)===Te||e.charCodeAt(I)===_e);)I++;if(I>=E)return null;for(var j=!1,N=I;N<E;N++)if(e.charCodeAt(N)===Np){j=!0;break}var D=j?e.slice(I,E).replace(/\u001E/g,""):e.slice(I,E);if(!D)return null;let M=AY(D,0,D.length,r,n);if(i){let V=(n?.slugify||xo)(D);return{node:{type:ve.heading,level:i,children:M,id:V},end:o}}return{node:{type:ve.paragraph,children:M},end:o}}function AY(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=Kp(e,l,r);if(d>l){for(var p=!1,m=l;m<d;m++)if(e.charCodeAt(m)===Ke){p=!0;break}p&&(s+=e.slice(a,l),s+=e.slice(l,d).replace(/\n/g," "),a=d),l=d;continue}}if(c===zt){var g=h_(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 $Y(e,t,r){if(e.charCodeAt(t)!==Ot)return null;let n=Ui(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return null;let s=Ui(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 Kp(e,t,r){if(e.charCodeAt(t)!==Ot)return t;let n=Ui(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return t;let s=Ui(e,i,r,96);if(s===n)return i+s;o=i+s}return t}function h_(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===Fa||c===La){var a=c;for(n++;n<r&&e.charCodeAt(n)!==a;)n++;n<r&&n++;continue}if(c===Ke)return t;n++}if(s||Tc(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 _Y(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=Kp(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 IY(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=Kp(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 m_(e,t,r){return e<Dp?!!(Tx(e)&tu):oY.test(t[r])}function g_(e,t,r){return e<Dp?!!(Tx(e)&Fs):iY.test(t[r])}function NY(e,t,r){var n=e.charCodeAt(t);if(n!==mr&&n!==or)return null;var o=Ui(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=g_(i,e,t-1),l=g_(s,e,t+o),c=t>0?m_(i,e,t-1):!1,d=t+o<r?m_(s,e,t+o):!1,p=!l&&(!d||a||c),m=!a&&(!c||l||d),g,b;return n===mr?(g=p,b=m):(g=p&&(!m||c),b=m&&(!p||d)),{len:o,canOpen:g,canClose:b}}function DY(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,p=-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)){p=m;break}}if(p<0){o[c]=s-1,!a.canOpen&&(a.active=!1),s++;continue}var b=t[p],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),I={type:ve.textFormatted,tag:y?"strong":"em",children:E};e.splice(k,P-k,I);for(var j=P-k-1,N=0;N<t.length;N++)t[N].idx>b.idx&&(t[N].idx-=j);for(var D=p+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,O=0;O<e.length;O++){var B=e[O];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 b_(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 p=e.charCodeAt(l);if(p===zr&&l+1<r){l+=2;continue}if(p===Ot){var m=Kp(e,l,r);if(m>l){l=m;continue}}if(p===zt){var g=v_(e,l,r);if(g){l=g.end;continue}var b=h_(e,l,r);if(b>l){l=b;continue}}p===cr?d++:p===vo&&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===Wo){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 I=0;E<r;){var j=e.charCodeAt(E);if(j===zr&&E+1<r){E+=2;continue}if(j===Wo)I++;else if(j===Uo){if(I===0)break;I--}else if(j===Te||j===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===Fa||D===La||D===Wo){var M=D===Wo?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)!==Uo)&&(k=!1)}}if(k){l++,P=ru(P),N!==void 0&&(N=Mp(ru(N)));var R=o?.sanitizer||kx,K=R(P,i?"img":"a",i?"src":"href"),O=K===null?null:P;if(i){var B=Tn(v,0,v.length,n,o),U=Vp(B);return{node:{type:ve.image,target:O,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&&$x(X)?null:{node:{type:ve.link,target:O,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)!==vo;){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=Lp($);else{if(n_(v))return null;L=Lp(v)}Z=Z+1}else{if(n_(v))return null;L=Lp(v)}var H=n.refs[L];if(!H)return null;if(i)return{node:{type:ve.image,target:H.target,alt:Vp(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&&$x(X)?null:{node:{type:ve.link,target:H.target,title:H.title,children:X},end:Z}}function v_(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===Oa||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 MY(e,t,r,n){if(e.charCodeAt(t)!==cr||t+1>=r||e.charCodeAt(t+1)!==pi)return null;let o=t+2;for(;o<r&&e.charCodeAt(o)!==vo&&e.charCodeAt(o)!==Ke;)o++;if(o>=r||e.charCodeAt(o)!==vo)return null;let i=e.slice(t+2,o);return i?{node:{type:ve.footnoteReference,target:"#"+xo(i),text:i},end:o+1}:null}function OY(e,t,r,n){if(n.disableBareUrls)return null;var o="",i=!1,s=e.charCodeAt(t);if(s===Pc||s===72?t+8<=r&&e.charCodeAt(t+1)===Ql&&e.charCodeAt(t+2)===Ql&&e.charCodeAt(t+3)===wx&&(e.charCodeAt(t+4)===z$&&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===ja||s===70?t+6<=r&&e.charCodeAt(t+1)===Ql&&e.charCodeAt(t+2)===wx&&e.charCodeAt(t+3)===kn&&e.charCodeAt(t+4)===xr&&e.charCodeAt(t+5)===xr&&(o="ftp://"):(s===js||s===87)&&t+4<=r&&e.charCodeAt(t+1)===js&&e.charCodeAt(t+2)===js&&e.charCodeAt(t+3)===yo&&(o="www.",i=!0),!o)return null;let a=t+o.length;for(;a<r;){let I=e.charCodeAt(a);if(I===Te||I===Ke||I===_e||I===Oa||I===zt||I===yt)break;a++}for(var l=0,c=0,d=t;d<a;d++){var p=e.charCodeAt(d);p===Wo?l++:p===Uo&&c++}let m=a;for(;m>t+o.length;){let I=e.charCodeAt(m-1);if(I===yo||I===qZ||I===kn||I===Sn||I===Ec||I===Uo||I===mr||I===or||I===Nr){if(I===Uo){if(l>=c)break;c--}m--}else if(I===K$){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)===F$?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)===yo)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 jY(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===yo||s===Sn||s===hi||s===36||s===yx||s===F$||s===La||s===mr||s===Ls||s===xr||s===Jn||s===Ec||s===pi||s===or||s===Ot||s===eu||s===Kr||s===Cx||s===Nr||s===dt)o++;else break}if(o===i||o>=r||e.charCodeAt(o)!==xx)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===yo){if(o===a)break;var d=e.charCodeAt(o-1);if(d===dt||d===or||o-c>63)break;if(o+1<r){var p=e.charCodeAt(o+1);if(p>=pt&&p<=xt||p>=Yt&&p<=ir||p>=Tt&&p<=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)===yo){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 $x(e){for(var t=0;t<e.length;t++)if(e[t].type===ve.link||"children"in e[t]&&Array.isArray(e[t].children)&&$x(e[t].children))return!0;return!1}function Vp(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+=Vp(n.children):n.type===ve.image?t+=n.alt||"":n.type===ve.link&&(t+=Vp(n.children))}return t}function za(e){let t=e.includes("&")?Mp(e):e;return{type:ve.text,text:t}}function LY(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===Ec){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 p=e.indexOf("]]>",i+8);return p!==-1&&p<r?{node:{type:ve.htmlSelfClosing,tag:"![CDATA[",attrs:{},a:e.slice(t,p+3),b:!1},end:p+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=Wi(e,t);if(!C)return null;var S=C.tag,k=S.toLowerCase(),P=C.selfClosing;if(P||Tc(S))return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Hi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var E=Ac.has(k),I=Ax(e.slice(0,r),C.end,S);if(I===-1)return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Hi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var j=SY(e,"</"+k,I),N=e.slice(C.end,j),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 $Y(e,t,r){if(e.charCodeAt(t)!==Ot)return null;let n=Ui(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return null;let s=Ui(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 Kp(e,t,r){if(e.charCodeAt(t)!==Ot)return t;let n=Ui(e,t,r,96),o=t+n;for(;o<r;){let i=e.indexOf("`",o);if(i<0||i>=r)return t;let s=Ui(e,i,r,96);if(s===n)return i+s;o=i+s}return t}function h_(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===Fa||c===La){var a=c;for(n++;n<r&&e.charCodeAt(n)!==a;)n++;n<r&&n++;continue}if(c===Ke)return t;n++}if(s||Tc(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 _Y(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=Kp(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 IY(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=Kp(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 m_(e,t,r){return e<Dp?!!(Tx(e)&tu):oY.test(t[r])}function g_(e,t,r){return e<Dp?!!(Tx(e)&Fs):iY.test(t[r])}function NY(e,t,r){var n=e.charCodeAt(t);if(n!==mr&&n!==or)return null;var o=Ui(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=g_(i,e,t-1),l=g_(s,e,t+o),c=t>0?m_(i,e,t-1):!1,d=t+o<r?m_(s,e,t+o):!1,p=!l&&(!d||a||c),m=!a&&(!c||l||d),g,b;return n===mr?(g=p,b=m):(g=p&&(!m||c),b=m&&(!p||d)),{len:o,canOpen:g,canClose:b}}function DY(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,p=-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)){p=m;break}}if(p<0){o[c]=s-1,!a.canOpen&&(a.active=!1),s++;continue}var b=t[p],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),I={type:ve.textFormatted,tag:y?"strong":"em",children:E};e.splice(k,P-k,I);for(var j=P-k-1,N=0;N<t.length;N++)t[N].idx>b.idx&&(t[N].idx-=j);for(var D=p+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,O=0;O<e.length;O++){var B=e[O];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 b_(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 p=e.charCodeAt(l);if(p===zr&&l+1<r){l+=2;continue}if(p===Ot){var m=Kp(e,l,r);if(m>l){l=m;continue}}if(p===zt){var g=v_(e,l,r);if(g){l=g.end;continue}var b=h_(e,l,r);if(b>l){l=b;continue}}p===cr?d++:p===vo&&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===Wo){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 I=0;E<r;){var j=e.charCodeAt(E);if(j===zr&&E+1<r){E+=2;continue}if(j===Wo)I++;else if(j===Uo){if(I===0)break;I--}else if(j===Te||j===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===Fa||D===La||D===Wo){var M=D===Wo?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)!==Uo)&&(k=!1)}}if(k){l++,P=ru(P),N!==void 0&&(N=Mp(ru(N)));var R=o?.sanitizer||kx,K=R(P,i?"img":"a",i?"src":"href"),O=K===null?null:P;if(i){var B=Tn(v,0,v.length,n,o),U=Vp(B);return{node:{type:ve.image,target:O,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&&$x(X)?null:{node:{type:ve.link,target:O,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)!==vo;){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=Lp($);else{if(n_(v))return null;L=Lp(v)}Z=Z+1}else{if(n_(v))return null;L=Lp(v)}var H=n.refs[L];if(!H)return null;if(i)return{node:{type:ve.image,target:H.target,alt:Vp(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&&$x(X)?null:{node:{type:ve.link,target:H.target,title:H.title,children:X},end:Z}}function v_(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===Oa||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 MY(e,t,r,n){if(e.charCodeAt(t)!==cr||t+1>=r||e.charCodeAt(t+1)!==pi)return null;let o=t+2;for(;o<r&&e.charCodeAt(o)!==vo&&e.charCodeAt(o)!==Ke;)o++;if(o>=r||e.charCodeAt(o)!==vo)return null;let i=e.slice(t+2,o);return i?{node:{type:ve.footnoteReference,target:"#"+xo(i),text:i},end:o+1}:null}function OY(e,t,r,n){if(n.disableBareUrls)return null;var o="",i=!1,s=e.charCodeAt(t);if(s===Pc||s===72?t+8<=r&&e.charCodeAt(t+1)===Ql&&e.charCodeAt(t+2)===Ql&&e.charCodeAt(t+3)===wx&&(e.charCodeAt(t+4)===z$&&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===ja||s===70?t+6<=r&&e.charCodeAt(t+1)===Ql&&e.charCodeAt(t+2)===wx&&e.charCodeAt(t+3)===kn&&e.charCodeAt(t+4)===xr&&e.charCodeAt(t+5)===xr&&(o="ftp://"):(s===js||s===87)&&t+4<=r&&e.charCodeAt(t+1)===js&&e.charCodeAt(t+2)===js&&e.charCodeAt(t+3)===yo&&(o="www.",i=!0),!o)return null;let a=t+o.length;for(;a<r;){let I=e.charCodeAt(a);if(I===Te||I===Ke||I===_e||I===Oa||I===zt||I===yt)break;a++}for(var l=0,c=0,d=t;d<a;d++){var p=e.charCodeAt(d);p===Wo?l++:p===Uo&&c++}let m=a;for(;m>t+o.length;){let I=e.charCodeAt(m-1);if(I===yo||I===qZ||I===kn||I===Sn||I===Ec||I===Uo||I===mr||I===or||I===Nr){if(I===Uo){if(l>=c)break;c--}m--}else if(I===K$){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)===F$?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)===yo)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 jY(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===yo||s===Sn||s===hi||s===36||s===yx||s===F$||s===La||s===mr||s===Ls||s===xr||s===Jn||s===Ec||s===pi||s===or||s===Ot||s===eu||s===Kr||s===Cx||s===Nr||s===ft)o++;else break}if(o===i||o>=r||e.charCodeAt(o)!==xx)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===yo){if(o===a)break;var d=e.charCodeAt(o-1);if(d===ft||d===or||o-c>63)break;if(o+1<r){var p=e.charCodeAt(o+1);if(p>=pt&&p<=xt||p>=Yt&&p<=ir||p>=Tt&&p<=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)===yo){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 $x(e){for(var t=0;t<e.length;t++)if(e[t].type===ve.link||"children"in e[t]&&Array.isArray(e[t].children)&&$x(e[t].children))return!0;return!1}function Vp(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+=Vp(n.children):n.type===ve.image?t+=n.alt||"":n.type===ve.link&&(t+=Vp(n.children))}return t}function za(e){let t=e.includes("&")?Mp(e):e;return{type:ve.text,text:t}}function LY(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===Ec){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 p=e.indexOf("]]>",i+8);return p!==-1&&p<r?{node:{type:ve.htmlSelfClosing,tag:"![CDATA[",attrs:{},a:e.slice(t,p+3),b:!1},end:p+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=Wi(e,t);if(!C)return null;var S=C.tag,k=S.toLowerCase(),P=C.selfClosing;if(P||Tc(S))return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Hi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var E=Ac.has(k),I=Ax(e.slice(0,r),C.end,S);if(I===-1)return{node:{type:ve.htmlSelfClosing,tag:S,attrs:Hi(C.attrs,S,o),a:e.slice(t,C.end),b:!1},end:C.end};var j=SY(e,"</"+k,I),N=e.slice(C.end,j),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=Rs(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:Hi(C.attrs,S,o),f:C.rawAttrs,children:D,a:void 0,text:N,c:!1,b:!1,endPos:I,e:!1},end:I}}var FY=200,_c=0;function Tn(e,t,r,n,o){if(_c++,_c>FY)return _c--,[{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===vo&&(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,p=-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++,p=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&&p>=0&&S.push([p,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 I=!0;I;){I=!1;for(var j=-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,O=K?V-1:V,B=be(re,V);if(B===-1)j=O,M=K,N=V+1,D=re.length;else{var U=B+1;if(U>=re.length)j=O,M=K,N=V+1,D=B;else if(re.charCodeAt(U)===Wo){var W=re.indexOf(")",U+1);W===-1?(j=O,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?(j=O,M=K,N=V+1,D=B,V=re.length):V=L}else V=B}}}if(j>=0){var Z=M?"":re.slice(N,D);re=re.slice(0,j)+Z,I=!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];Vs(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=$Y(e,t,r),!re){var ue=Ui(e,t,r,Ot);t+=ue-1}}else if(be===mr||be===or){var te=NY(e,t,r);if(te){if(te.canOpen||te.canClose){t>Q&&X.push(za(e.slice(Q,t)));var ge=e.slice(t,t+te.len),Se=za(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=_Y(e,t,r,i,o);else if(be===Jn)re=IY(e,t,r,i,o);else if(be===cr)t+1<r&&e.charCodeAt(t+1)===pi&&(re=MY(e,t,r)),re||(re=b_(e,t,r,i,o));else if(be===Sn&&t+1<r&&e.charCodeAt(t+1)===cr)re=b_(e,t,r,i,o);else if(be===zt)re=v_(e,t,r),!re&&!o.disableParsingRawHTML&&!o.ignoreHTMLBlocks&&(re=LY(e,t,r,i,o));else if((be===Pc||be===js||be===ja)&&!i.inAnchor&&!o.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==zt)){var pe=t+1<r?e.charCodeAt(t+1):0;(be===Pc&&pe===Ql||be===ja&&pe===Ql||be===js&&pe===js)&&(re=OY(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=jY(e,t,r,o),!re&&t>=le&&(le=e.indexOf("@",t+1),le>=r&&(le=-1))),be===Sx){t>Q&&X.push(za(e.slice(Q,t))),X.push({type:ve.breakLine}),t++,Q=t;continue}if(re)t>Q&&X.push(za(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(Tx(ke)&tu){t>Q&&X.push(za(e.slice(Q,t))),X.push(za(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<Dp&&!Q$[we])t++;else break}}}if(r>Q){let be=e.slice(Q,r);be&&X.push(za(be))}return oe.length>0&&DY(X,oe),_c--,X}var BY=500;function Rs(e,t,r){var n=t.i||0;if(n>BY)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=p===-1?d:d.slice(p+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=Rs(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:Hi(C.attrs,S,o),f:C.rawAttrs,children:D,a:void 0,text:N,c:!1,b:!1,endPos:I,e:!1},end:I}}var FY=200,_c=0;function Tn(e,t,r,n,o){if(_c++,_c>FY)return _c--,[{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===vo&&(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,p=-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++,p=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&&p>=0&&S.push([p,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 I=!0;I;){I=!1;for(var j=-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,O=K?V-1:V,B=be(re,V);if(B===-1)j=O,M=K,N=V+1,D=re.length;else{var U=B+1;if(U>=re.length)j=O,M=K,N=V+1,D=B;else if(re.charCodeAt(U)===Wo){var W=re.indexOf(")",U+1);W===-1?(j=O,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?(j=O,M=K,N=V+1,D=B,V=re.length):V=L}else V=B}}}if(j>=0){var Z=M?"":re.slice(N,D);re=re.slice(0,j)+Z,I=!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];Vs(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=$Y(e,t,r),!re){var ue=Ui(e,t,r,Ot);t+=ue-1}}else if(be===mr||be===or){var te=NY(e,t,r);if(te){if(te.canOpen||te.canClose){t>Q&&X.push(za(e.slice(Q,t)));var ge=e.slice(t,t+te.len),Se=za(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=_Y(e,t,r,i,o);else if(be===Jn)re=IY(e,t,r,i,o);else if(be===cr)t+1<r&&e.charCodeAt(t+1)===pi&&(re=MY(e,t,r)),re||(re=b_(e,t,r,i,o));else if(be===Sn&&t+1<r&&e.charCodeAt(t+1)===cr)re=b_(e,t,r,i,o);else if(be===zt)re=v_(e,t,r),!re&&!o.disableParsingRawHTML&&!o.ignoreHTMLBlocks&&(re=LY(e,t,r,i,o));else if((be===Pc||be===js||be===ja)&&!i.inAnchor&&!o.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==zt)){var pe=t+1<r?e.charCodeAt(t+1):0;(be===Pc&&pe===Ql||be===ja&&pe===Ql||be===js&&pe===js)&&(re=OY(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=jY(e,t,r,o),!re&&t>=le&&(le=e.indexOf("@",t+1),le>=r&&(le=-1))),be===Sx){t>Q&&X.push(za(e.slice(Q,t))),X.push({type:ve.breakLine}),t++,Q=t;continue}if(re)t>Q&&X.push(za(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(Tx(ke)&tu){t>Q&&X.push(za(e.slice(Q,t))),X.push(za(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<Dp&&!Q$[we])t++;else break}}}if(r>Q){let be=e.slice(Q,r);be&&X.push(za(be))}return oe.length>0&&DY(X,oe),_c--,X}var BY=500;function Rs(e,t,r){var n=t.i||0;if(n>BY)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!==ft&&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(),p=d.lastIndexOf(`
|
|
328
|
+
`),m=p===-1?d:d.slice(p+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===ft&&(b=!0)}g&&b&&(e=p===-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 I=P+2;I<e.length;){var j=e.charCodeAt(I);if(j>=pt&&j<=xt||j>=Yt&&j<=ir||j>=Tt&&j<=At)I++;else break}for(var N=I;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=I,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);Vs(e,"</"+K,0)===-1&&(e=e.slice(0,C)+e.slice(k))}}for(var O=e.length;O>0&&e.charCodeAt(O-1)===Ke;)O--;if(O>0){for(var B=O;B>0&&e.charCodeAt(B-1)!==Ke;)B--;for(var U=B,W=0;U<O&&e.charCodeAt(U)===Te&&W<3;)U++,W++;if(B>0&&U<O&&vY(e,U,O)){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===ft||oe===Ls){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)===yo||e.charCodeAt(te)===Uo)){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=ZZ(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(o_=e,i_=we,s_=ke,e.charCodeAt(we)!==Np&&Ft>=4&&!t.inHTML)Ae=xY(e,we);else if(e.charCodeAt(we)!==Np){let xe=we+Bt,Ie=e.charCodeAt(xe);Ie===hi?Ae=l_(e,we,t,r):Ie===yt?Ae=wY(e,we,t,r):Ie===Ot||Ie===Nr?Ae=yY(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(o_=e,i_=we,s_=ke,e.charCodeAt(we)!==Np&&Ft>=4&&!t.inHTML)Ae=xY(e,we);else if(e.charCodeAt(we)!==Np){let xe=we+Bt,Ie=e.charCodeAt(xe);Ie===hi?Ae=l_(e,we,t,r):Ie===yt?Ae=wY(e,we,t,r):Ie===Ot||Ie===Nr?Ae=yY(e,we):Ie===ft||Ie===mr||Ie===or?(Ae=zs(e,we),!Ae&&(Ae=c_(e,we,t,r))):Ie===Ls||Ie>=Tt&&Ie<=At?Ae=c_(e,we,t,r):Ie===zt?Ae=d_(e,we,t,r):Ie===Kr?Ae=p_(e,we,t,r):Ie===cr&&(Ae=PY(e,we,t))}if(!Ae){for(var Ne=!1,Me=we;Me<ke;Me++)if(e.charCodeAt(Me)===Kr){Ne=!0;break}Ne&&(Ae=p_(e,we,t,r))}if(Ae||(Ae=TY(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 zY(e,t,r,n){var o=Wi(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 _x(e,t,r){_c=0,e=sY(e),!t.refs&&(t.refs={}),t.j=bY(e,t.refs,r);let n=Rs(e,t,r);return t.refs&&Object.keys(t.refs).length>0?[{type:ve.refCollection,refs:t.refs},...n]:n}var KY=/^\n+/,Ix;try{Ix=Er.createElement("div").$$typeof}catch{Ix=Symbol.for("react.transitional.element")}function Nx(e,t,r){return{$$typeof:Ix,type:e,key:r!=null?""+r:null,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var VY=typeof Er.createContext<"u"?Er.createContext(void 0):void 0;function y_(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(),xo),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?Mp(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&&G$(v.tag)){var c="";if(v.attrs)for(var d in v.attrs){var p=v.attrs[d];p===!0?c+=" "+d:p!=null&&p!==!1&&(c+=" "+d+'="'+String(p)+'"')}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=mY(P),I=v.children&&v.children.length>0,j=/<[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=Z$(W)),j?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(I&&!N&&a.tagfilter&&dY(v.a))return l(e.tag,{key:r.key,...Xn(e.attrs||{})},t(v.children,r));if(gY(v.a)){let W=a.tagfilter?Z$(v.a):v.a;return l(e.tag,{key:r.key,...Xn(e.attrs||{}),dangerouslySetInnerHTML:{__html:W}})}let D={slugify:W=>i(W,xo),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=_x(M,{inline:!1,refs:s,inHTML:!1},D);S(V);let R=v.tag.toLowerCase(),K="</"+R+">",O=new RegExp(`^<${v.tag}(\\s|>)`,"i").test(M),B=M.toLowerCase().trimEnd().endsWith(K),U=O&&B;if(U&&I)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 Nx(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 Tc(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&&G$(v.tag)){var c="";if(v.attrs)for(var d in v.attrs){var p=v.attrs[d];p===!0?c+=" "+d:p!=null&&p!==!1&&(c+=" "+d+'="'+String(p)+'"')}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=lY(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 RY=(e,t,r,n,o,i,s)=>{var a=c=>c.map(function(d){return"text"in d?d.text:""}),l=(c,d={})=>{var p=(d.renderDepth||0)+1;if(p>2500)return a(c);d.renderDepth=p;for(var m=d.key,g=[],b=!1,y=0;y<c.length;y++){d.key=y;var v;if(e){var C=y_.bind(null,c[y],l,d,t,r,n,o,i,s);v=e(C,c[y],l,d)}else v=y_(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=p-1,g};return l},WY=(e,t)=>{let r=Px(t,e,void 0);return r?typeof r=="function"||typeof r=="object"&&"render"in r?r:Px(t,`${e}.component`,e):e};function UY(e,t){let r={...t||{}};r.overrides=r.overrides||{};let n=r.slugify||xo,o=r.sanitizer||kx,i=r.createElement,s=r.overrides&&Object.keys(r.overrides).length>0,a=k=>Dx(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&&(fY.test(E)||pY.test(E)||zY(E,0))){var I=a(E.trim());k[P]=P==="innerHTML"&&Array.isArray(I)?I[0]:I}}}function c(k,P,...E){var I=P||{},j=k;if(s){var N=Px(r.overrides,k+".props",{});j=WY(k,r.overrides),I={...I,...N,className:uY(I.className,N.className)||void 0}}if(!i){var D=I.key;return D!=null&&delete I.key,E.length===1?I.children=E[0]:E.length>1&&(I.children=E),Nx(j,I,D)}return i(j,I,...E)}function d(k,P,...E){return P&&l(P),c(k,P,...E)}let p={...r,slugify:r.slugify?k=>r.slugify(k,xo):xo,sanitizer:o,tagfilter:r.tagfilter!==!1},m=e[0]&&e[0].type===ve.refCollection?e[0].refs:{},g=RY(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)===pi&&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)===pi?k.identifier.slice(1):k.identifier,E=_x(k.footnote,{inline:!0,refs:m},p);return c("div",{id:n(P,xo),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,Nx(v,S,"outer")}function Dx(e="",t={}){let r={...t||{}};r.overrides=r.overrides||{},r.slugify;let n=r.sanitizer||kx;function o(s){let a=r.forceInline||!r.forceBlock&&!XZ.test(s),l={...r,slugify:r.slugify?m=>r.slugify(m,xo):xo,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(KY,"")}
|
|
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 p=_x(a?s:c,{inline:a,refs:i},l);return UY(p,{...l,forceInline:a})}let i={};return o(e)}var HY=({children:e,options:t,...r})=>{if(!(typeof Er.useContext<"u")){let s={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...r}};return Dx(e??"",s)}let n=Er.useContext(VY),o=Er.useMemo(()=>({...n,...t,overrides:{...n?.overrides,...t?.overrides},wrapperProps:{...n?.wrapperProps,...t?.wrapperProps,...r}}),[n,t,r]),i=e??"";return Er.useMemo(()=>Dx(i,o),[i,o])},qY=HY;function GY(e,t){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:a,onPressChange:l,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,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}=H3({onPressStart:i,onPressEnd:s,onPressChange:l,onPress:o,onPressUp:a,onClick:p,isDisabled:n,preventFocusOnPress:c,ref:t}),{focusableProps:k}=nW(e,t);d&&(k.tabIndex=n?-1:k.tabIndex);let P=As(k,C,DR(e,{labelable:!0}));return{isPressed:S,buttonProps:As(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 ZY=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),YY=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function JY(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 ZY.has(r.script)}let t=e.split("-")[0];return YY.has(t)}const x_=Symbol.for("react-aria.i18n.locale");function w_(){let e=typeof window<"u"&&window[x_]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:JY(e)?"rtl":"ltr"}}let Mx=w_(),Ic=new Set;function C_(){Mx=w_();for(let e of Ic)e(Mx)}function XY(){let e=k3(),[t,r]=x.useState(Mx);return x.useEffect(()=>(Ic.size===0&&window.addEventListener("languagechange",C_),Ic.add(r),()=>{Ic.delete(r),Ic.size===0&&window.removeEventListener("languagechange",C_)}),[]),e?{locale:typeof window<"u"&&window[x_]||"en-US",direction:"ltr"}:t}const QY=x.createContext(null);function S_(){let e=XY();return x.useContext(QY)||e}let Ox=new Map;function eJ(e){let{locale:t}=S_(),r=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Ox.has(r))return Ox.get(r);let n=new Intl.Collator(t,e);return Ox.set(r,n),n}function tJ(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&&Yf(r.current)},[r,i,t.focusedKey]);let d=x.useCallback(y=>{s.canSelectItem(i)&&(s.select(i,y),t.toggleKey(i))},[i,s]);const p=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&&p(k)}else S&&p(S)},ArrowUp:()=>{const S=t.collection.getKeyBefore(i);if(S&&t.disabledKeys.has(S)){const k=t.collection.getKeyBefore(S);k&&p(k)}else S&&p(S)},Home:()=>{const S=t.collection.getFirstKey();S&&p(S)},End:()=>{const S=t.collection.getLastKey();S&&p(S)}}[y.key];C&&(y.preventDefault(),s.canSelectItem(i)&&C(y))},[i,s]);let{buttonProps:g}=GY({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 k_(e){return QV()?e.altKey:e.ctrlKey}function Rp(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 rJ=new WeakMap;function nJ(e){let t=xR();return rJ.set(e,t),t}const oJ=1e3;function iJ(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:n}=e,o=x.useRef({search:"",timeout:void 0}).current,i=s=>{let a=sJ(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=""},oJ)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:void 0}}}function sJ(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function aJ(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:p,allowsTabNavigation:m=!1,scrollRef:g=n,linkBehavior:b="action"}=e,{direction:y}=S_(),v=aR(),C=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!n.current||!Pt(n.current,Ze(O)))return;const B=(le,ue)=>{if(le!=null){if(t.isLink(le)&&b==="selection"&&c&&!k_(O)){as.flushSync(()=>{t.setFocusedKey(le,ue)});let te=Rp(n,le),ge=t.getItemProps(le);te&&v.open(te,O,ge.href,ge.routerOptions);return}if(t.setFocusedKey(le,ue),t.isLink(le)&&b==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&!k_(O)&&t.replaceSelection(le)}};switch(O.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&&(O.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&&(O.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&&(O.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&&(O.preventDefault(),B(le,y==="rtl"?"last":"first"))}break;case"Home":if(r.getFirstKey){if(t.focusedKey===null&&O.shiftKey)return;O.preventDefault();let le=r.getFirstKey(t.focusedKey,dc(O));t.setFocusedKey(le),le!=null&&(dc(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&t.replaceSelection(le))}break;case"End":if(r.getLastKey){if(t.focusedKey===null&&O.shiftKey)return;O.preventDefault();let le=r.getLastKey(t.focusedKey,dc(O));t.setFocusedKey(le),le!=null&&(dc(O)&&O.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&&(O.preventDefault(),B(le))}break;case"PageUp":if(r.getKeyPageAbove&&t.focusedKey!=null){let le=r.getKeyPageAbove(t.focusedKey);le!=null&&(O.preventDefault(),B(le))}break;case"a":dc(O)&&t.selectionMode==="multiple"&&a!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),t.clearSelection());break;case"Tab":if(!m){if(O.shiftKey)n.current.focus();else{let le=lW(n.current,{tabbable:!0}),ue,te;do te=le.lastChild(),te&&(ue=te);while(te);let ge=Fo();ue&&(!E3(ue)||ge&&!j3(ge))&&Ps(ue)}break}}},S=x.useRef({top:0,left:0});Wf(g,"scroll",()=>{var O,B,U,W;S.current={top:(U=(O=g.current)===null||O===void 0?void 0:O.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=O=>{if(t.isFocused){Pt(O.currentTarget,Ze(O))||t.setFocused(!1);return}if(Pt(O.currentTarget,Ze(O))){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=O.relatedTarget;var W,L;T&&O.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=Rp(n,t.focusedKey);Z instanceof HTMLElement&&(!E3(Z)&&!p&&Ps(Z),Jb()==="keyboard"&&M3(Z,{containingElement:n.current}))}}},P=O=>{Pt(O.currentTarget,O.relatedTarget)||t.setFocused(!1)},E=x.useRef(!1);Wf(n,JV,p?O=>{let{detail:B}=O;O.stopPropagation(),t.setFocused(!0),B?.focusStrategy==="first"&&(E.current=!0)}:void 0),I3(()=>{if(E.current){var O,B;let U=(B=(O=r.getFirstKey)===null||O===void 0?void 0:O.call(r))!==null&&B!==void 0?B:null;if(U==null){let W=Fo();uW(n.current),lP(W,null),t.collection.size>0&&(E.current=!1)}else t.setFocusedKey(U),E.current=!1}},[t.collection]),I3(()=>{t.collection.size>0&&(E.current=!1)},[t.focusedKey]),Wf(n,YV,p?O=>{var B;O.stopPropagation(),t.setFocused(!1),!((B=O.detail)===null||B===void 0)&&B.clearFocusKey&&t.setFocusedKey(null)}:void 0);const I=x.useRef(o),j=x.useRef(!1);x.useEffect(()=>{if(I.current){var O,B;let L=null;var U;o==="first"&&(L=(U=(O=r.getFirstKey)===null||O===void 0?void 0:O.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&&!p&&n.current&&Yf(n.current),t.collection.size>0&&(I.current=!1,j.current=!0)}});let N=x.useRef(t.focusedKey),D=x.useRef(null);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==N.current||j.current)&&g.current&&n.current){let O=Jb(),B=Rp(n,t.focusedKey);if(!(B instanceof HTMLElement))return;(O==="keyboard"||j.current)&&(D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame(()=>{g.current&&(Lb(g.current,B),O!=="virtual"&&M3(B,{containingElement:n.current}))}))}!p&&t.isFocused&&t.focusedKey==null&&N.current!=null&&n.current&&Yf(n.current),N.current=t.focusedKey,j.current=!1}),x.useEffect(()=>()=>{D.current&&cancelAnimationFrame(D.current)},[]),Wf(n,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let M={onKeyDown:C,onFocus:k,onBlur:P,onMouseDown(O){g.current===Ze(O)&&O.preventDefault()}},{typeSelectProps:V}=iJ({keyboardDelegate:r,selectionManager:t});d||(M=As(V,M));let R;p||(R=t.focusedKey==null?0:-1);let K=nJ(t.collection);return{collectionProps:As(M,{tabIndex:R,"data-collection":K})}}class P_{getItemRect(t){let r=this.ref.current;if(!r)return null;let n=t!=null?Rp(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 lJ{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&&!jb(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&&!jb(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 P_(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 P_(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function uJ(e){let{selectionManager:t,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:s}=e,a=eJ({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,c=x.useMemo(()=>i||new lJ({collection:r,disabledKeys:n,disabledBehavior:l,ref:o,collator:a,layoutDelegate:s}),[i,s,r,n,o,a,l]),{collectionProps:d}=aJ({...e,ref:o,selectionManager:t,keyboardDelegate:c});return{listProps:d}}function cJ(e,t,r){let{listProps:n}=uJ({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:r});return delete n.onKeyDownCapture,{accordionProps:{...n,tabIndex:void 0}}}function dJ(e){var t,r;const n=ur(),{ref:o,as:i,item:s,onFocusChange:a}=e,{state:l,className:c,indicator:d,children:p,title:m,subtitle:g,startContent:b,motionProps:y,focusedKey:v,variant:C,isCompact:S=!1,classNames:k={},isDisabled:P=!1,hideIndicator:E=!1,disableAnimation:I=(t=n?.disableAnimation)!=null?t:!1,keepContentMounted:j=!1,disableIndicatorAnimation:N=!1,HeadingComponent:D=i||"h2",onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:O,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}=tJ({item:s,isDisabled:T},{...l,focusedKey:v},Z),{onFocus:Y,onBlur:X,...oe}=$,{isFocused:Q,isFocusVisible:le,focusProps:ue}=aP({autoFocus:(r=s.props)==null?void 0:r.autoFocus}),{isHovered:te,hoverProps:ge}=oP({isDisabled:T}),{pressProps:Se,isPressed:pe}=H3({ref:Z,isDisabled:T,onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:O}),we=x.useCallback(()=>{a?.(!0,s.key)},[]),be=x.useCallback(()=>{a?.(!1,s.key)},[]),re=x.useMemo(()=>({...k}),[jr(k)]),ke=x.useMemo(()=>G8({isCompact:S,isDisabled:T,hideIndicator:E,disableAnimation:I,disableIndicatorAnimation:N,variant:C}),[S,T,E,I,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:PC(we,Y,ue.onFocus,U.onFocus,(Ut=s.props)==null?void 0:Ut.onFocus),onBlur:PC(be,X,ue.onBlur,U.onBlur,(ut=s.props)==null?void 0:ut.onBlur),...Oe(oe,ge,Se,lt,{onClick:uo(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:p,title:m,subtitle:g,startContent:b,isOpen:F,isDisabled:T,hideIndicator:E,keepContentMounted:j,disableAnimation:I,motionProps:y,getBaseProps:Me,getHeadingProps:Ie,getButtonProps:Pe,getContentProps:Ae,getIndicatorProps:xe,getTitleProps:et,getSubtitleProps:wt}}var E_={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}}}},T_=()=>Promise.resolve().then(()=>Wc).then(e=>e.default),A_=Xe((e,t)=>{const{Component:r,HeadingComponent:n,classNames:o,slots:i,indicator:s,children:a,title:l,subtitle:c,startContent:d,isOpen:p,isDisabled:m,hideIndicator:g,keepContentMounted:b,disableAnimation:y,motionProps:v,getBaseProps:C,getHeadingProps:S,getButtonProps:k,getTitleProps:P,getSubtitleProps:E,getContentProps:I,getIndicatorProps:j}=dJ({...e,ref:t}),N=YK(),M=x.useMemo(()=>typeof s=="function"?s({indicator:h.jsx(AP,{}),isOpen:p,isDisabled:m}):s||null,[s,p,m])||h.jsx(AP,{}),V=x.useMemo(()=>{if(y)return b?h.jsx("div",{...I(),children:a}):p&&h.jsx("div",{...I(),children:a});const R={exit:{...E_.collapse.exit,overflowY:"hidden"},enter:{...E_.collapse.enter,overflowY:"unset"}};return b?h.jsx(ws,{features:T_,children:h.jsx(Cs.section,{animate:p?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...I(),children:a})},"accordion-content")}):h.jsx(tc,{initial:!1,children:p&&h.jsx(ws,{features:T_,children:h.jsx(Cs.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...I(),children:a})},"accordion-content")})})},[p,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",{...j(),children:M})]})}),V]})});A_.displayName="HeroUI.AccordionItem";var fJ=A_;class pJ{*[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 Go extends Set{constructor(t,r,n){super(t),t instanceof Go?(this.anchorKey=r??t.anchorKey,this.currentKey=n??t.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}const hJ=typeof document<"u"?x.useInsertionEffect??x.useLayoutEffect:()=>{};function mJ(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 p=s.current;p!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),s.current=a},[a]);let l=a?e:n;hJ(()=>{i.current=l});let[,c]=x.useReducer(()=>({}),{}),d=x.useCallback((p,...m)=>{let g=typeof p=="function"?p(i.current):p;Object.is(i.current,g)||(i.current=g,o(g),c(),r?.(g,...m))},[r]);return[l,d]}function gJ(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function bJ(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),p=x.useMemo(()=>$_(e.selectedKeys),[e.selectedKeys]),m=x.useMemo(()=>$_(e.defaultSelectedKeys,new Go),[e.defaultSelectedKeys]),[g,b]=mJ(p,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||!gJ(k,g))&&b(k)},disabledKeys:y,disabledBehavior:i}}function $_(e,t){return e?e==="all"?"all":new Go(e):t}function vJ(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function yJ(e){return xJ(e)}function xJ(e,t){for(let r of e)return r}function jx(e,t,r){if(t.parentKey===r.parentKey)return t.index-r.index;let n=[...__(e,t),t],o=[...__(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 __(e,t){let r=[],n=t;for(;n?.parentKey!=null;)n=e.getItem(n.parentKey),n&&r.unshift(n);return r}class Lx{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&&jx(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&&jx(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 Go([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new Go(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?jx(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 Go(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 Go([r],r,r):new Go;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let r=new Go;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(yJ(vJ(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 Go)}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 Lx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class wJ{build(t,r){return this.context=r,I_(()=>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,p=c.next();for(;!p.done&&p.value;){let m=p.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:CJ(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 <${Fx(v.type)}> in <${Fx(o?.type??"unknown parent type")}>. Only <${Fx(t.type)}> is supported.`);d++,yield v}p=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:I_(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 p of d)l++,yield p}})};yield a}constructor(){this.cache=new WeakMap}}function I_(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 CJ(e,t){if(e&&t)return r=>e(t(r));if(e)return e;if(t)return t}function Fx(e){return e[0].toUpperCase()+e.slice(1)}function SJ(e,t,r){let n=x.useMemo(()=>new wJ,[]),{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 kJ(e){let{onExpandedChange:t}=e,[r,n]=Oo(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),o=bJ(e),i=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=SJ(e,x.useCallback(l=>new pJ(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(PJ(r,l))},setExpandedKeys:n,selectionManager:new Lx(s,o)}}function PJ(e,t){let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function EJ(e){var t;const r=ur(),{ref:n,as:o,className:i,items:s,variant:a,motionProps:l,expandedKeys:c,disabledKeys:d,selectedKeys:p,children:m,defaultExpandedKeys:g,selectionMode:b="single",selectionBehavior:y="toggle",keepContentMounted:v=!1,disallowEmptySelection:C,defaultSelectedKeys:S,onExpandedChange:k,onSelectionChange:P,dividerProps:E={},isCompact:I=!1,isDisabled:j=!1,showDivider:N=!0,hideIndicator:D=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:V=!1,itemClasses:R,...K}=e,[O,B]=x.useState(null),U=o||"div",W=typeof U=="string",L=ot(n),Z=x.useMemo(()=>q8({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:p,selectionMode:b,selectionBehavior:y,disallowEmptySelection:C,defaultSelectedKeys:S??g,onSelectionChange:P,...F,...$},Y=kJ(H);Y.selectionManager.setFocusedKey=ue=>{B(ue)};const{accordionProps:X}=cJ({...F,...$},Y,L),oe=x.useMemo(()=>({state:Y,focusedKey:O,motionProps:l,isCompact:I,isDisabled:j,hideIndicator:D,disableAnimation:M,keepContentMounted:v,disableIndicatorAnimation:V}),[O,I,j,D,p,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:O,getBaseProps:Q,isSplitted:a==="splitted",classNames:Z,showDivider:N,dividerProps:E,disableAnimation:M,handleFocusChanged:le,itemClasses:R}}function TJ(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 AJ(e){const{as:t,className:r,orientation:n,...o}=e;let i=t||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:s}=TJ({elementType:typeof i=="string"?i:"hr",orientation:n}),a=x.useMemo(()=>xC({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 $J(e){return x.forwardRef(e)}var N_=$J((e,t)=>{const{Component:r,getDividerProps:n}=AJ({...e});return h.jsx(r,{ref:t,...n()})});N_.displayName="HeroUI.Divider";var _J=N_,D_=Xe((e,t)=>{const{Component:r,values:n,state:o,isSplitted:i,showDivider:s,getBaseProps:a,disableAnimation:l,handleFocusChanged:c,itemClasses:d,dividerProps:p}=EJ({...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(fJ,{item:b,variant:e.variant,onFocusChange:m,...n,...b.props,classNames:v}),!b.props.hidden&&!i&&s&&y<o.collection.size-1&&h.jsx(_J,{...p})]},b.key)}),[n,d,m,i,s,o.collection]);return h.jsx(r,{...a(),children:l?g:h.jsx(sK,{children:g})})});D_.displayName="HeroUI.Accordion";var IJ=D_;function M_(e){return null}M_.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:NJ(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 NJ(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&x.Children.count(e.children)>0)}var DJ=M_,MJ=DJ;function OJ({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(IJ,{className:"px-0",children:x.Children.map(t,r=>{if(!x.isValidElement(r))return null;const{props:n}=r;return h.jsx(MJ,{title:n.title,"aria-label":n.title,children:n.children},n.title)})??null})]})}function jJ({children:e,styleType:t="checkMark"}){return h.jsxs("div",{className:"flex flex-row items-center gap-1",children:[t==="checkMark"&&h.jsx(Um,{size:20,className:"shrink-0 stroke-success-600"}),e]})}function O_({children:e}){const[t,r]=Fn();return h.jsx("div",{className:"prose prose-sm max-w-none text-foreground",children:h.jsx(qY,{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:jJ,Faq:OJ}},children:e})})}const LJ=ft`
|
|
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 p=_x(a?s:c,{inline:a,refs:i},l);return UY(p,{...l,forceInline:a})}let i={};return o(e)}var HY=({children:e,options:t,...r})=>{if(!(typeof Er.useContext<"u")){let s={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...r}};return Dx(e??"",s)}let n=Er.useContext(VY),o=Er.useMemo(()=>({...n,...t,overrides:{...n?.overrides,...t?.overrides},wrapperProps:{...n?.wrapperProps,...t?.wrapperProps,...r}}),[n,t,r]),i=e??"";return Er.useMemo(()=>Dx(i,o),[i,o])},qY=HY;function GY(e,t){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:a,onPressChange:l,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,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}=H3({onPressStart:i,onPressEnd:s,onPressChange:l,onPress:o,onPressUp:a,onClick:p,isDisabled:n,preventFocusOnPress:c,ref:t}),{focusableProps:k}=nW(e,t);d&&(k.tabIndex=n?-1:k.tabIndex);let P=As(k,C,DR(e,{labelable:!0}));return{isPressed:S,buttonProps:As(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 ZY=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),YY=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function JY(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 ZY.has(r.script)}let t=e.split("-")[0];return YY.has(t)}const x_=Symbol.for("react-aria.i18n.locale");function w_(){let e=typeof window<"u"&&window[x_]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:JY(e)?"rtl":"ltr"}}let Mx=w_(),Ic=new Set;function C_(){Mx=w_();for(let e of Ic)e(Mx)}function XY(){let e=k3(),[t,r]=x.useState(Mx);return x.useEffect(()=>(Ic.size===0&&window.addEventListener("languagechange",C_),Ic.add(r),()=>{Ic.delete(r),Ic.size===0&&window.removeEventListener("languagechange",C_)}),[]),e?{locale:typeof window<"u"&&window[x_]||"en-US",direction:"ltr"}:t}const QY=x.createContext(null);function S_(){let e=XY();return x.useContext(QY)||e}let Ox=new Map;function eJ(e){let{locale:t}=S_(),r=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Ox.has(r))return Ox.get(r);let n=new Intl.Collator(t,e);return Ox.set(r,n),n}function tJ(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&&Yf(r.current)},[r,i,t.focusedKey]);let d=x.useCallback(y=>{s.canSelectItem(i)&&(s.select(i,y),t.toggleKey(i))},[i,s]);const p=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&&p(k)}else S&&p(S)},ArrowUp:()=>{const S=t.collection.getKeyBefore(i);if(S&&t.disabledKeys.has(S)){const k=t.collection.getKeyBefore(S);k&&p(k)}else S&&p(S)},Home:()=>{const S=t.collection.getFirstKey();S&&p(S)},End:()=>{const S=t.collection.getLastKey();S&&p(S)}}[y.key];C&&(y.preventDefault(),s.canSelectItem(i)&&C(y))},[i,s]);let{buttonProps:g}=GY({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 k_(e){return QV()?e.altKey:e.ctrlKey}function Rp(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 rJ=new WeakMap;function nJ(e){let t=xR();return rJ.set(e,t),t}const oJ=1e3;function iJ(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:n}=e,o=x.useRef({search:"",timeout:void 0}).current,i=s=>{let a=sJ(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=""},oJ)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:void 0}}}function sJ(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function aJ(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:p,allowsTabNavigation:m=!1,scrollRef:g=n,linkBehavior:b="action"}=e,{direction:y}=S_(),v=aR(),C=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!n.current||!Pt(n.current,Ze(O)))return;const B=(le,ue)=>{if(le!=null){if(t.isLink(le)&&b==="selection"&&c&&!k_(O)){as.flushSync(()=>{t.setFocusedKey(le,ue)});let te=Rp(n,le),ge=t.getItemProps(le);te&&v.open(te,O,ge.href,ge.routerOptions);return}if(t.setFocusedKey(le,ue),t.isLink(le)&&b==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&!k_(O)&&t.replaceSelection(le)}};switch(O.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&&(O.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&&(O.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&&(O.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&&(O.preventDefault(),B(le,y==="rtl"?"last":"first"))}break;case"Home":if(r.getFirstKey){if(t.focusedKey===null&&O.shiftKey)return;O.preventDefault();let le=r.getFirstKey(t.focusedKey,dc(O));t.setFocusedKey(le),le!=null&&(dc(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(le):c&&t.replaceSelection(le))}break;case"End":if(r.getLastKey){if(t.focusedKey===null&&O.shiftKey)return;O.preventDefault();let le=r.getLastKey(t.focusedKey,dc(O));t.setFocusedKey(le),le!=null&&(dc(O)&&O.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&&(O.preventDefault(),B(le))}break;case"PageUp":if(r.getKeyPageAbove&&t.focusedKey!=null){let le=r.getKeyPageAbove(t.focusedKey);le!=null&&(O.preventDefault(),B(le))}break;case"a":dc(O)&&t.selectionMode==="multiple"&&a!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),t.clearSelection());break;case"Tab":if(!m){if(O.shiftKey)n.current.focus();else{let le=lW(n.current,{tabbable:!0}),ue,te;do te=le.lastChild(),te&&(ue=te);while(te);let ge=Fo();ue&&(!E3(ue)||ge&&!j3(ge))&&Ps(ue)}break}}},S=x.useRef({top:0,left:0});Wf(g,"scroll",()=>{var O,B,U,W;S.current={top:(U=(O=g.current)===null||O===void 0?void 0:O.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=O=>{if(t.isFocused){Pt(O.currentTarget,Ze(O))||t.setFocused(!1);return}if(Pt(O.currentTarget,Ze(O))){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=O.relatedTarget;var W,L;T&&O.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=Rp(n,t.focusedKey);Z instanceof HTMLElement&&(!E3(Z)&&!p&&Ps(Z),Jb()==="keyboard"&&M3(Z,{containingElement:n.current}))}}},P=O=>{Pt(O.currentTarget,O.relatedTarget)||t.setFocused(!1)},E=x.useRef(!1);Wf(n,JV,p?O=>{let{detail:B}=O;O.stopPropagation(),t.setFocused(!0),B?.focusStrategy==="first"&&(E.current=!0)}:void 0),I3(()=>{if(E.current){var O,B;let U=(B=(O=r.getFirstKey)===null||O===void 0?void 0:O.call(r))!==null&&B!==void 0?B:null;if(U==null){let W=Fo();uW(n.current),lP(W,null),t.collection.size>0&&(E.current=!1)}else t.setFocusedKey(U),E.current=!1}},[t.collection]),I3(()=>{t.collection.size>0&&(E.current=!1)},[t.focusedKey]),Wf(n,YV,p?O=>{var B;O.stopPropagation(),t.setFocused(!1),!((B=O.detail)===null||B===void 0)&&B.clearFocusKey&&t.setFocusedKey(null)}:void 0);const I=x.useRef(o),j=x.useRef(!1);x.useEffect(()=>{if(I.current){var O,B;let L=null;var U;o==="first"&&(L=(U=(O=r.getFirstKey)===null||O===void 0?void 0:O.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&&!p&&n.current&&Yf(n.current),t.collection.size>0&&(I.current=!1,j.current=!0)}});let N=x.useRef(t.focusedKey),D=x.useRef(null);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==N.current||j.current)&&g.current&&n.current){let O=Jb(),B=Rp(n,t.focusedKey);if(!(B instanceof HTMLElement))return;(O==="keyboard"||j.current)&&(D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame(()=>{g.current&&(Lb(g.current,B),O!=="virtual"&&M3(B,{containingElement:n.current}))}))}!p&&t.isFocused&&t.focusedKey==null&&N.current!=null&&n.current&&Yf(n.current),N.current=t.focusedKey,j.current=!1}),x.useEffect(()=>()=>{D.current&&cancelAnimationFrame(D.current)},[]),Wf(n,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let M={onKeyDown:C,onFocus:k,onBlur:P,onMouseDown(O){g.current===Ze(O)&&O.preventDefault()}},{typeSelectProps:V}=iJ({keyboardDelegate:r,selectionManager:t});d||(M=As(V,M));let R;p||(R=t.focusedKey==null?0:-1);let K=nJ(t.collection);return{collectionProps:As(M,{tabIndex:R,"data-collection":K})}}class P_{getItemRect(t){let r=this.ref.current;if(!r)return null;let n=t!=null?Rp(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 lJ{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&&!jb(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&&!jb(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 P_(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 P_(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function uJ(e){let{selectionManager:t,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:s}=e,a=eJ({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,c=x.useMemo(()=>i||new lJ({collection:r,disabledKeys:n,disabledBehavior:l,ref:o,collator:a,layoutDelegate:s}),[i,s,r,n,o,a,l]),{collectionProps:d}=aJ({...e,ref:o,selectionManager:t,keyboardDelegate:c});return{listProps:d}}function cJ(e,t,r){let{listProps:n}=uJ({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:r});return delete n.onKeyDownCapture,{accordionProps:{...n,tabIndex:void 0}}}function dJ(e){var t,r;const n=ur(),{ref:o,as:i,item:s,onFocusChange:a}=e,{state:l,className:c,indicator:d,children:p,title:m,subtitle:g,startContent:b,motionProps:y,focusedKey:v,variant:C,isCompact:S=!1,classNames:k={},isDisabled:P=!1,hideIndicator:E=!1,disableAnimation:I=(t=n?.disableAnimation)!=null?t:!1,keepContentMounted:j=!1,disableIndicatorAnimation:N=!1,HeadingComponent:D=i||"h2",onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:O,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}=tJ({item:s,isDisabled:T},{...l,focusedKey:v},Z),{onFocus:Y,onBlur:X,...oe}=$,{isFocused:Q,isFocusVisible:le,focusProps:ue}=aP({autoFocus:(r=s.props)==null?void 0:r.autoFocus}),{isHovered:te,hoverProps:ge}=oP({isDisabled:T}),{pressProps:Se,isPressed:pe}=H3({ref:Z,isDisabled:T,onPress:M,onPressStart:V,onPressEnd:R,onPressChange:K,onPressUp:O}),we=x.useCallback(()=>{a?.(!0,s.key)},[]),be=x.useCallback(()=>{a?.(!1,s.key)},[]),re=x.useMemo(()=>({...k}),[jr(k)]),ke=x.useMemo(()=>G8({isCompact:S,isDisabled:T,hideIndicator:E,disableAnimation:I,disableIndicatorAnimation:N,variant:C}),[S,T,E,I,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:PC(we,Y,ue.onFocus,U.onFocus,(Ut=s.props)==null?void 0:Ut.onFocus),onBlur:PC(be,X,ue.onBlur,U.onBlur,(ut=s.props)==null?void 0:ut.onBlur),...Oe(oe,ge,Se,lt,{onClick:uo(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:p,title:m,subtitle:g,startContent:b,isOpen:F,isDisabled:T,hideIndicator:E,keepContentMounted:j,disableAnimation:I,motionProps:y,getBaseProps:Me,getHeadingProps:Ie,getButtonProps:Pe,getContentProps:Ae,getIndicatorProps:xe,getTitleProps:et,getSubtitleProps:wt}}var E_={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}}}},T_=()=>Promise.resolve().then(()=>Wc).then(e=>e.default),A_=Xe((e,t)=>{const{Component:r,HeadingComponent:n,classNames:o,slots:i,indicator:s,children:a,title:l,subtitle:c,startContent:d,isOpen:p,isDisabled:m,hideIndicator:g,keepContentMounted:b,disableAnimation:y,motionProps:v,getBaseProps:C,getHeadingProps:S,getButtonProps:k,getTitleProps:P,getSubtitleProps:E,getContentProps:I,getIndicatorProps:j}=dJ({...e,ref:t}),N=YK(),M=x.useMemo(()=>typeof s=="function"?s({indicator:h.jsx(AP,{}),isOpen:p,isDisabled:m}):s||null,[s,p,m])||h.jsx(AP,{}),V=x.useMemo(()=>{if(y)return b?h.jsx("div",{...I(),children:a}):p&&h.jsx("div",{...I(),children:a});const R={exit:{...E_.collapse.exit,overflowY:"hidden"},enter:{...E_.collapse.enter,overflowY:"unset"}};return b?h.jsx(ws,{features:T_,children:h.jsx(Cs.section,{animate:p?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...I(),children:a})},"accordion-content")}):h.jsx(tc,{initial:!1,children:p&&h.jsx(ws,{features:T_,children:h.jsx(Cs.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:N},variants:R,onKeyDown:K=>{K.stopPropagation()},...v,children:h.jsx("div",{...I(),children:a})},"accordion-content")})})},[p,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",{...j(),children:M})]})}),V]})});A_.displayName="HeroUI.AccordionItem";var fJ=A_;class pJ{*[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 Go extends Set{constructor(t,r,n){super(t),t instanceof Go?(this.anchorKey=r??t.anchorKey,this.currentKey=n??t.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}const hJ=typeof document<"u"?x.useInsertionEffect??x.useLayoutEffect:()=>{};function mJ(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 p=s.current;p!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),s.current=a},[a]);let l=a?e:n;hJ(()=>{i.current=l});let[,c]=x.useReducer(()=>({}),{}),d=x.useCallback((p,...m)=>{let g=typeof p=="function"?p(i.current):p;Object.is(i.current,g)||(i.current=g,o(g),c(),r?.(g,...m))},[r]);return[l,d]}function gJ(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function bJ(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),p=x.useMemo(()=>$_(e.selectedKeys),[e.selectedKeys]),m=x.useMemo(()=>$_(e.defaultSelectedKeys,new Go),[e.defaultSelectedKeys]),[g,b]=mJ(p,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||!gJ(k,g))&&b(k)},disabledKeys:y,disabledBehavior:i}}function $_(e,t){return e?e==="all"?"all":new Go(e):t}function vJ(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function yJ(e){return xJ(e)}function xJ(e,t){for(let r of e)return r}function jx(e,t,r){if(t.parentKey===r.parentKey)return t.index-r.index;let n=[...__(e,t),t],o=[...__(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 __(e,t){let r=[],n=t;for(;n?.parentKey!=null;)n=e.getItem(n.parentKey),n&&r.unshift(n);return r}class Lx{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&&jx(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&&jx(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 Go([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new Go(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?jx(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 Go(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 Go([r],r,r):new Go;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let r=new Go;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(yJ(vJ(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 Go)}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 Lx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class wJ{build(t,r){return this.context=r,I_(()=>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,p=c.next();for(;!p.done&&p.value;){let m=p.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:CJ(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 <${Fx(v.type)}> in <${Fx(o?.type??"unknown parent type")}>. Only <${Fx(t.type)}> is supported.`);d++,yield v}p=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:I_(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 p of d)l++,yield p}})};yield a}constructor(){this.cache=new WeakMap}}function I_(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 CJ(e,t){if(e&&t)return r=>e(t(r));if(e)return e;if(t)return t}function Fx(e){return e[0].toUpperCase()+e.slice(1)}function SJ(e,t,r){let n=x.useMemo(()=>new wJ,[]),{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 kJ(e){let{onExpandedChange:t}=e,[r,n]=Oo(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),o=bJ(e),i=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=SJ(e,x.useCallback(l=>new pJ(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(PJ(r,l))},setExpandedKeys:n,selectionManager:new Lx(s,o)}}function PJ(e,t){let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function EJ(e){var t;const r=ur(),{ref:n,as:o,className:i,items:s,variant:a,motionProps:l,expandedKeys:c,disabledKeys:d,selectedKeys:p,children:m,defaultExpandedKeys:g,selectionMode:b="single",selectionBehavior:y="toggle",keepContentMounted:v=!1,disallowEmptySelection:C,defaultSelectedKeys:S,onExpandedChange:k,onSelectionChange:P,dividerProps:E={},isCompact:I=!1,isDisabled:j=!1,showDivider:N=!0,hideIndicator:D=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:V=!1,itemClasses:R,...K}=e,[O,B]=x.useState(null),U=o||"div",W=typeof U=="string",L=ot(n),Z=x.useMemo(()=>q8({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:p,selectionMode:b,selectionBehavior:y,disallowEmptySelection:C,defaultSelectedKeys:S??g,onSelectionChange:P,...F,...$},Y=kJ(H);Y.selectionManager.setFocusedKey=ue=>{B(ue)};const{accordionProps:X}=cJ({...F,...$},Y,L),oe=x.useMemo(()=>({state:Y,focusedKey:O,motionProps:l,isCompact:I,isDisabled:j,hideIndicator:D,disableAnimation:M,keepContentMounted:v,disableIndicatorAnimation:V}),[O,I,j,D,p,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:O,getBaseProps:Q,isSplitted:a==="splitted",classNames:Z,showDivider:N,dividerProps:E,disableAnimation:M,handleFocusChanged:le,itemClasses:R}}function TJ(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 AJ(e){const{as:t,className:r,orientation:n,...o}=e;let i=t||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:s}=TJ({elementType:typeof i=="string"?i:"hr",orientation:n}),a=x.useMemo(()=>xC({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 $J(e){return x.forwardRef(e)}var N_=$J((e,t)=>{const{Component:r,getDividerProps:n}=AJ({...e});return h.jsx(r,{ref:t,...n()})});N_.displayName="HeroUI.Divider";var _J=N_,D_=Xe((e,t)=>{const{Component:r,values:n,state:o,isSplitted:i,showDivider:s,getBaseProps:a,disableAnimation:l,handleFocusChanged:c,itemClasses:d,dividerProps:p}=EJ({...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(fJ,{item:b,variant:e.variant,onFocusChange:m,...n,...b.props,classNames:v}),!b.props.hidden&&!i&&s&&y<o.collection.size-1&&h.jsx(_J,{...p})]},b.key)}),[n,d,m,i,s,o.collection]);return h.jsx(r,{...a(),children:l?g:h.jsx(sK,{children:g})})});D_.displayName="HeroUI.Accordion";var IJ=D_;function M_(e){return null}M_.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:NJ(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 NJ(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&x.Children.count(e.children)>0)}var DJ=M_,MJ=DJ;function OJ({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(IJ,{className:"px-0",children:x.Children.map(t,r=>{if(!x.isValidElement(r))return null;const{props:n}=r;return h.jsx(MJ,{title:n.title,"aria-label":n.title,children:n.children},n.title)})??null})]})}function jJ({children:e,styleType:t="checkMark"}){return h.jsxs("div",{className:"flex flex-row items-center gap-1",children:[t==="checkMark"&&h.jsx(Um,{size:20,className:"shrink-0 stroke-success-600"}),e]})}function O_({children:e}){const[t,r]=Fn();return h.jsx("div",{className:"prose prose-sm max-w-none text-foreground",children:h.jsx(qY,{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:jJ,Faq:OJ}},children:e})})}const LJ=dt`
|
|
338
338
|
query textContent($key: String!) {
|
|
339
339
|
textContent(key: $key)
|
|
340
340
|
}
|
|
341
|
-
`;function j_(){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-",""),p=d?.startsWith("/")?d.replaceAll("/","_").slice(1):d,{data:{textContent:m}={}}=Ko(p?[LJ,{key:p}]:null,{fetcher:nn});return x.useEffect(()=>{c&&(!m||m.trim().length===0)&&a(l)},[m]),!l||!m||m.trim().length===0?null:h.jsx(di,{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(li,{children:[h.jsx(ui,{}),h.jsx(si,{children:h.jsx(O_,{children:m})}),h.jsx(zi,{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 FJ(e){const[t,r]=qr(e,gC.variantKeys),{as:n,title:o,children:i,description:s,onClose:a,isClosable:l,ref:c,icon:d,startContent:p,endContent:m,isVisible:g,isDefaultVisible:b,onVisibleChange:y,closeButtonProps:v={size:"sm"},className:C,classNames:S,...k}=t,[P,E]=Oo(g,b??!0,y),j=typeof(n||"div")=="string",N=ot(c),D=x.useCallback(()=>{E(!1),a?.()},[E,a]),M=A(S?.base,C),V=x.useMemo(()=>gC({hasContent:!cs(s)||!cs(i),...r}),[s,jr(r)]),R=x.useCallback(()=>({"data-visible":ae(P),"data-closeable":ae(l),"data-has-title":ae(!cs(o)),"data-has-description":ae(!cs(s)),...Oe(Lt(k,{enabled:j}),Lt(t)),className:V.base({class:M})}),[V,M]),K=x.useCallback(()=>({className:V.mainWrapper({class:S?.mainWrapper})}),[V,S?.mainWrapper]),O=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:p,getBaseProps:R,getMainWrapperProps:K,getDescriptionProps:O,getTitleProps:B,color:r.color,getCloseButtonProps:U,handleClose:D,isVisible:P,onClose:a,getAlertIconProps:W,getIconWrapperProps:L}}var L_={primary:TP,secondary:TP,success:wW,warning:CW,danger:kW},F_=Xe((e,t)=>{const{title:r,icon:n,children:o,description:i,endContent:s,startContent:a,isClosable:l,domRef:c,handleClose:d,getBaseProps:p,getMainWrapperProps:m,getDescriptionProps:g,getTitleProps:b,getCloseButtonProps:y,color:v,isVisible:C,onClose:S,getAlertIconProps:k,getIconWrapperProps:P}=FJ({...e,ref:t});if(!C)return null;const E=n&&x.isValidElement(n)?x.cloneElement(n,k()):null,I=L_[v]||L_.primary;return h.jsxs("div",{ref:c,role:"alert",...p(),children:[a,h.jsx("div",{...P(),children:E||h.jsx(I,{...k()})}),h.jsxs("div",{...m(),children:[!cs(r)&&h.jsx("div",{...b(),children:r}),!cs(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($P,{height:20,width:20})})]})});F_.displayName="HeroUI.Alert";var nu=F_;function BJ(){const{errorAlert:e}=vt();return h.jsx("div",{className:A(e?.base),children:h.jsx(nu,{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 B_ 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(BJ,{}):this.props.children}}function zJ(e,t){const r=new Set(e.map(o=>o.slug)),n=t.filter(o=>!r.has(o.slug));return[...e,...n]}function Bx({selectedFilters:e,defaultFilters:t,requiredFilters:r,removedDefaultFilters:n}){const o=t.filter(a=>!n.has(a.slug)),s=[...zJ(e,o),...r].reduce((a,l)=>(a.set(l.slug,l),a),new Map);return Array.from(s.values())}const z_=x.createContext({onAction:e=>{}});function K_({children:e,onAction:t}){const r=x.useCallback(n=>t?.(n),[t]);return h.jsx(z_,{value:{onAction:r},children:e})}function mi(){return x.useContext(z_)}const Qn=2147483647;function wo(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 V_=x.createContext({activeFilters:[],filterOptions:[],sortOptions:[],distinctProperties:[],setDistinctProperties:e=>{},handleFilterChange:e=>{},handleFilterRemove:e=>{},getActiveFilterValue:e=>[]});function Ka(e,t){return e.find(r=>r.slug===t)}function gi(e,t){return e.find(r=>r.slug===t)?.value}function KJ(e,t){if(!(t?.type!=="radio"||typeof e.value!="string"))return t.options[0]?.value}const VJ=
|
|
341
|
+
`;function j_(){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-",""),p=d?.startsWith("/")?d.replaceAll("/","_").slice(1):d,{data:{textContent:m}={}}=Ko(p?[LJ,{key:p}]:null,{fetcher:nn});return x.useEffect(()=>{c&&(!m||m.trim().length===0)&&a(l)},[m]),!l||!m||m.trim().length===0?null:h.jsx(di,{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(li,{children:[h.jsx(ui,{}),h.jsx(si,{children:h.jsx(O_,{children:m})}),h.jsx(zi,{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 FJ(e){const[t,r]=qr(e,gC.variantKeys),{as:n,title:o,children:i,description:s,onClose:a,isClosable:l,ref:c,icon:d,startContent:p,endContent:m,isVisible:g,isDefaultVisible:b,onVisibleChange:y,closeButtonProps:v={size:"sm"},className:C,classNames:S,...k}=t,[P,E]=Oo(g,b??!0,y),j=typeof(n||"div")=="string",N=ot(c),D=x.useCallback(()=>{E(!1),a?.()},[E,a]),M=A(S?.base,C),V=x.useMemo(()=>gC({hasContent:!cs(s)||!cs(i),...r}),[s,jr(r)]),R=x.useCallback(()=>({"data-visible":ae(P),"data-closeable":ae(l),"data-has-title":ae(!cs(o)),"data-has-description":ae(!cs(s)),...Oe(Lt(k,{enabled:j}),Lt(t)),className:V.base({class:M})}),[V,M]),K=x.useCallback(()=>({className:V.mainWrapper({class:S?.mainWrapper})}),[V,S?.mainWrapper]),O=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:p,getBaseProps:R,getMainWrapperProps:K,getDescriptionProps:O,getTitleProps:B,color:r.color,getCloseButtonProps:U,handleClose:D,isVisible:P,onClose:a,getAlertIconProps:W,getIconWrapperProps:L}}var L_={primary:TP,secondary:TP,success:wW,warning:CW,danger:kW},F_=Xe((e,t)=>{const{title:r,icon:n,children:o,description:i,endContent:s,startContent:a,isClosable:l,domRef:c,handleClose:d,getBaseProps:p,getMainWrapperProps:m,getDescriptionProps:g,getTitleProps:b,getCloseButtonProps:y,color:v,isVisible:C,onClose:S,getAlertIconProps:k,getIconWrapperProps:P}=FJ({...e,ref:t});if(!C)return null;const E=n&&x.isValidElement(n)?x.cloneElement(n,k()):null,I=L_[v]||L_.primary;return h.jsxs("div",{ref:c,role:"alert",...p(),children:[a,h.jsx("div",{...P(),children:E||h.jsx(I,{...k()})}),h.jsxs("div",{...m(),children:[!cs(r)&&h.jsx("div",{...b(),children:r}),!cs(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($P,{height:20,width:20})})]})});F_.displayName="HeroUI.Alert";var nu=F_;function BJ(){const{errorAlert:e}=vt();return h.jsx("div",{className:A(e?.base),children:h.jsx(nu,{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 B_ 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(BJ,{}):this.props.children}}function zJ(e,t){const r=new Set(e.map(o=>o.slug)),n=t.filter(o=>!r.has(o.slug));return[...e,...n]}function Bx({selectedFilters:e,defaultFilters:t,requiredFilters:r,removedDefaultFilters:n}){const o=t.filter(a=>!n.has(a.slug)),s=[...zJ(e,o),...r].reduce((a,l)=>(a.set(l.slug,l),a),new Map);return Array.from(s.values())}const z_=x.createContext({onAction:e=>{}});function K_({children:e,onAction:t}){const r=x.useCallback(n=>t?.(n),[t]);return h.jsx(z_,{value:{onAction:r},children:e})}function mi(){return x.useContext(z_)}const Qn=2147483647;function wo(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 V_=x.createContext({activeFilters:[],filterOptions:[],sortOptions:[],distinctProperties:[],setDistinctProperties:e=>{},handleFilterChange:e=>{},handleFilterRemove:e=>{},getActiveFilterValue:e=>[]});function Ka(e,t){return e.find(r=>r.slug===t)}function gi(e,t){return e.find(r=>r.slug===t)?.value}function KJ(e,t){if(!(t?.type!=="radio"||typeof e.value!="string"))return t.options[0]?.value}const VJ=dt`
|
|
342
342
|
query pageByPath($path: String) {
|
|
343
343
|
page(path: $path) {
|
|
344
344
|
productCategory
|
|
@@ -372,7 +372,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
`;function RJ({path:e}){const{data:t}=Ko(e?[VJ,{path:e}]:null,{use:[Yn],fetcher:nn});return t?.page}function R_(e){return e.filter(t=>Array.isArray(t.value)?t.value.length>0:t.value!==""&&t.value!==void 0&&t.value!==null)}function W_(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=Ka(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 WJ(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 UJ(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=Ka(t,e.slug);if(n&&["range","min","max"].includes(n.type)){const{from:o,to:i}=wo(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 HJ({children:e,productCategory:t,initialSelectedFilters:r=[]}){const{onAction:n}=mi(),[o,i]=x.useState(R_(r)),[s,a]=x.useState(new Set),[l,c]=x.useState([]);Bo(()=>{i(R_(r))},[JSON.stringify([...r].sort((k,P)=>k.slug.localeCompare(P.slug)))]);const d=RJ({path:WJ(t)}),p=(d?.pageFilters??[]).filter(k=>t!=="smartphone-proposition"||!gi(o,"telefoons")?!0:!["merk","opslag","kleur"].includes(k.slug)).sort((k,P)=>k.rank-P.rank),m=d?.filter?W_(d.filter,p):[],g=d?.filterDefaults?W_(d.filterDefaults,p):[],b=p.find(k=>k.slug==="sorteren")?.options??[],y=x.useMemo(()=>Bx({selectedFilters:o,defaultFilters:g,requiredFilters:m,removedDefaultFilters:s}),[o,m,g,s]),v=x.useCallback(k=>{const P=gi(y,k.slug),E=UJ(k,p);i(I=>{const j=I.filter(N=>N.slug!==k.slug);return E&&j.push(k),j}),a(I=>{const j=new Set(I);return j.delete(k.slug),j}),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:Bx({selectedFilters:o.filter(I=>I.slug!==k.slug).concat(E?[k]:[]),defaultFilters:g,requiredFilters:m,removedDefaultFilters:new Set([...s].filter(I=>I!==k.slug))})})},[p,y,n,g,s,o,m]),C=x.useCallback(k=>{const P=KJ(k,Ka(p,k.slug));if(P){k.value!==P&&v({slug:k.slug,value:P});return}const E=gi(y,k.slug),I=g.some(j=>j.slug===k.slug);i(j=>j.filter(N=>N.slug!==k.slug)),I&&a(j=>new Set([...j,k.slug])),n({type:"filters_changed",filter:{slug:k.slug,from:E,to:void 0},activeFilters:Bx({selectedFilters:o.filter(j=>j.slug!==k.slug),defaultFilters:g,requiredFilters:m,removedDefaultFilters:I?new Set([...s,k.slug]):s})})},[g,y,n,s,o,m,p,v]),S=x.useCallback(k=>{const P=gi(y,k);return P===void 0?[]:Array.isArray(P)?P:[P]},[y]);return h.jsx(V_,{value:{activeFilters:y,filterOptions:p,sortOptions:b,distinctProperties:l,setDistinctProperties:c,handleFilterChange:v,handleFilterRemove:C,getActiveFilterValue:S},children:e})}function Zo(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 qJ(e){return["ja","nee","0","1"].includes(e)}function U_(e){return new RegExp(/^\d*\.?\d*$/).test(e)}function H_(e){return new RegExp(/^\d*\.?\d*-\d*\.?\d*$/).test(e)}function q_(e){return!e.includes("nee")&&!e.includes("0")?[!0]:!e.includes("ja")&&!e.includes("1")?[!1]:[!0,!1]}function G_(e){return parseFloat(e)||0}function Z_(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 GJ(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 ZJ(e,t){const r=Array.isArray(e.value)?e.value:[e.value];if(r.length!==0)return r.length<4?t.formatType?Z_(r.map(n=>{const o=parseInt(n,10);return Number.isNaN(o)?t.options.find(i=>i.value===n)?.name||n:Zo(o,t.formatType)})):Z_(r.map(n=>GJ(t.options.find(o=>o.value===n)?.name||n,20))):`${t.shortName} (${r.length})`}function YJ(e,t){const r=n=>`${t.shortName} (${n})`;switch(t.type){case"range":{const{from:n,to:o}=wo(e.value);return n===void 0||o===void 0?r(1):`${Zo(n,t.formatType)} - ${Zo(o,t.formatType)}`}case"min":{const{from:n}=wo(e.value);return n===void 0?r(1):`${Ee.t("format.startingFrom")} ${Zo(n,t.formatType)}`}case"max":{const{to:n}=wo(e.value);return n===void 0?r(1):`${Ee.t("format.to")} ${Zo(n,t.formatType)}`}case"checkbox":return ZJ(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 Ws(e,t){return t.length===0?e:t.reduce((r,n)=>Math.abs(n-e)<Math.abs(r-e)?n:r)}var ou=(e=>(e.Avg="AVG",e.Cardinality="CARDINALITY",e.Max="MAX",e.Min="MIN",e.Sum="SUM",e))(ou||{});const zx=
|
|
375
|
+
`;function RJ({path:e}){const{data:t}=Ko(e?[VJ,{path:e}]:null,{use:[Yn],fetcher:nn});return t?.page}function R_(e){return e.filter(t=>Array.isArray(t.value)?t.value.length>0:t.value!==""&&t.value!==void 0&&t.value!==null)}function W_(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=Ka(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 WJ(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 UJ(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=Ka(t,e.slug);if(n&&["range","min","max"].includes(n.type)){const{from:o,to:i}=wo(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 HJ({children:e,productCategory:t,initialSelectedFilters:r=[]}){const{onAction:n}=mi(),[o,i]=x.useState(R_(r)),[s,a]=x.useState(new Set),[l,c]=x.useState([]);Bo(()=>{i(R_(r))},[JSON.stringify([...r].sort((k,P)=>k.slug.localeCompare(P.slug)))]);const d=RJ({path:WJ(t)}),p=(d?.pageFilters??[]).filter(k=>t!=="smartphone-proposition"||!gi(o,"telefoons")?!0:!["merk","opslag","kleur"].includes(k.slug)).sort((k,P)=>k.rank-P.rank),m=d?.filter?W_(d.filter,p):[],g=d?.filterDefaults?W_(d.filterDefaults,p):[],b=p.find(k=>k.slug==="sorteren")?.options??[],y=x.useMemo(()=>Bx({selectedFilters:o,defaultFilters:g,requiredFilters:m,removedDefaultFilters:s}),[o,m,g,s]),v=x.useCallback(k=>{const P=gi(y,k.slug),E=UJ(k,p);i(I=>{const j=I.filter(N=>N.slug!==k.slug);return E&&j.push(k),j}),a(I=>{const j=new Set(I);return j.delete(k.slug),j}),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:Bx({selectedFilters:o.filter(I=>I.slug!==k.slug).concat(E?[k]:[]),defaultFilters:g,requiredFilters:m,removedDefaultFilters:new Set([...s].filter(I=>I!==k.slug))})})},[p,y,n,g,s,o,m]),C=x.useCallback(k=>{const P=KJ(k,Ka(p,k.slug));if(P){k.value!==P&&v({slug:k.slug,value:P});return}const E=gi(y,k.slug),I=g.some(j=>j.slug===k.slug);i(j=>j.filter(N=>N.slug!==k.slug)),I&&a(j=>new Set([...j,k.slug])),n({type:"filters_changed",filter:{slug:k.slug,from:E,to:void 0},activeFilters:Bx({selectedFilters:o.filter(j=>j.slug!==k.slug),defaultFilters:g,requiredFilters:m,removedDefaultFilters:I?new Set([...s,k.slug]):s})})},[g,y,n,s,o,m,p,v]),S=x.useCallback(k=>{const P=gi(y,k);return P===void 0?[]:Array.isArray(P)?P:[P]},[y]);return h.jsx(V_,{value:{activeFilters:y,filterOptions:p,sortOptions:b,distinctProperties:l,setDistinctProperties:c,handleFilterChange:v,handleFilterRemove:C,getActiveFilterValue:S},children:e})}function Zo(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 qJ(e){return["ja","nee","0","1"].includes(e)}function U_(e){return new RegExp(/^\d*\.?\d*$/).test(e)}function H_(e){return new RegExp(/^\d*\.?\d*-\d*\.?\d*$/).test(e)}function q_(e){return!e.includes("nee")&&!e.includes("0")?[!0]:!e.includes("ja")&&!e.includes("1")?[!1]:[!0,!1]}function G_(e){return parseFloat(e)||0}function Z_(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 GJ(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 ZJ(e,t){const r=Array.isArray(e.value)?e.value:[e.value];if(r.length!==0)return r.length<4?t.formatType?Z_(r.map(n=>{const o=parseInt(n,10);return Number.isNaN(o)?t.options.find(i=>i.value===n)?.name||n:Zo(o,t.formatType)})):Z_(r.map(n=>GJ(t.options.find(o=>o.value===n)?.name||n,20))):`${t.shortName} (${r.length})`}function YJ(e,t){const r=n=>`${t.shortName} (${n})`;switch(t.type){case"range":{const{from:n,to:o}=wo(e.value);return n===void 0||o===void 0?r(1):`${Zo(n,t.formatType)} - ${Zo(o,t.formatType)}`}case"min":{const{from:n}=wo(e.value);return n===void 0?r(1):`${Ee.t("format.startingFrom")} ${Zo(n,t.formatType)}`}case"max":{const{to:n}=wo(e.value);return n===void 0?r(1):`${Ee.t("format.to")} ${Zo(n,t.formatType)}`}case"checkbox":return ZJ(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 Ws(e,t){return t.length===0?e:t.reduce((r,n)=>Math.abs(n-e)<Math.abs(r-e)?n:r)}var ou=(e=>(e.Avg="AVG",e.Cardinality="CARDINALITY",e.Max="MAX",e.Min="MIN",e.Sum="SUM",e))(ou||{});const zx=dt`
|
|
376
376
|
fragment PhoneSelectorPhone on Product {
|
|
377
377
|
slug
|
|
378
378
|
fullName
|
|
@@ -454,7 +454,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
`,Y_=
|
|
457
|
+
`,Y_=dt`
|
|
458
458
|
fragment ProductCardProduct on ProductVersion {
|
|
459
459
|
id
|
|
460
460
|
slug
|
|
@@ -535,7 +535,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
`,Wp=
|
|
538
|
+
`,Wp=dt`
|
|
539
539
|
fragment ProductCardProposition on Proposition {
|
|
540
540
|
key
|
|
541
541
|
creditFee
|
|
@@ -626,7 +626,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
626
626
|
stickerImageUrl
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
${Y_}`;
|
|
629
|
+
${Y_}`;dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
${zx}`,
|
|
639
|
+
${zx}`,dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
`,
|
|
651
|
+
`,dt`
|
|
652
652
|
query phoneSelectorDefaultProductVersion($slug: String!) {
|
|
653
653
|
product(slug: $slug) {
|
|
654
654
|
fullName
|
|
@@ -687,7 +687,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
`,
|
|
690
|
+
`,dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
${zx}`,
|
|
700
|
+
${zx}`,dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
`,
|
|
727
|
+
`,dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
`,
|
|
740
|
+
`,dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
|
-
`;const JJ=
|
|
755
|
+
`;const JJ=dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
-
${Wp}`,XJ=
|
|
800
|
+
${Wp}`,XJ=dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
${Wp}`,QJ=
|
|
835
|
+
${Wp}`,QJ=dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
${Wp}`,eX=
|
|
870
|
+
${Wp}`,eX=dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
${Wp}`;
|
|
896
|
+
${Wp}`;dt`
|
|
897
897
|
query pageByPath($path: String) {
|
|
898
898
|
page(path: $path) {
|
|
899
899
|
productCategory
|
|
@@ -927,11 +927,11 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
`,
|
|
930
|
+
`,dt`
|
|
931
931
|
query textContent($key: String!) {
|
|
932
932
|
textContent(key: $key)
|
|
933
933
|
}
|
|
934
|
-
`,
|
|
934
|
+
`,dt`
|
|
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}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
|
-
`,
|
|
943
|
+
`,dt`
|
|
944
944
|
mutation addPartnerProfile($data: InputPartnerProfile!) {
|
|
945
945
|
addPartnerProfile(data: $data)
|
|
946
946
|
}
|
|
947
|
-
`,
|
|
947
|
+
`,dt`
|
|
948
948
|
mutation partnerCustomerSegment($msisdn: String!, $birthdate: String!, $providerSlug: String!, $origin: PartnerOrigin!) {
|
|
949
949
|
partnerCustomerSegment(
|
|
950
950
|
msisdn: $msisdn
|
|
@@ -956,7 +956,11 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
956
956
|
state
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
`,
|
|
959
|
+
`,dt`
|
|
960
|
+
query customerSegmentStale($providerSlug: String!, $lastCheckedAt: String!) {
|
|
961
|
+
customerSegmentStale(providerSlug: $providerSlug, lastCheckedAt: $lastCheckedAt)
|
|
962
|
+
}
|
|
963
|
+
`,dt`
|
|
960
964
|
query proposition($key: String!) {
|
|
961
965
|
proposition(key: $key, version: "release") {
|
|
962
966
|
key
|
|
@@ -1063,7 +1067,7 @@ ${String(e)}`)}catch(t){return t}},xE=e=>{if(typeof e!="object"||e===null)throw
|
|
|
1063
1067
|
}
|
|
1064
1068
|
}
|
|
1065
1069
|
${Y_}
|
|
1066
|
-
${zx}`,
|
|
1070
|
+
${zx}`,dt`
|
|
1067
1071
|
query propositionSelector($key: String!, $productType: String!, $provider: String!, $currentProvider: String, $product: String, $modificationBlocks: [InputModificationBlock], $postcode: String, $number: Int, $numberAddon: String, $internal: Boolean) {
|
|
1068
1072
|
propositionSelector: bundleSelector(
|
|
1069
1073
|
version: "release"
|
|
@@ -1154,7 +1158,7 @@ ${zx}`,ft`
|
|
|
1154
1158
|
creditFee
|
|
1155
1159
|
}
|
|
1156
1160
|
}
|
|
1157
|
-
`,
|
|
1161
|
+
`,dt`
|
|
1158
1162
|
query searchAvailableFixedProposition($query: ElasticQuery!, $postcode: String!, $number: Int!, $numberAddon: String!) {
|
|
1159
1163
|
fetchInfo(
|
|
1160
1164
|
productCategory: "fixed-proposition"
|
|
@@ -1179,7 +1183,7 @@ ${zx}`,ft`
|
|
|
1179
1183
|
}
|
|
1180
1184
|
}
|
|
1181
1185
|
}
|
|
1182
|
-
`,
|
|
1186
|
+
`,dt`
|
|
1183
1187
|
query getModificationBlocks($version: String!, $productType: String!) {
|
|
1184
1188
|
modificationConfig(version: $version) {
|
|
1185
1189
|
fixedBlocks: blocks(types: ["fixed"], interface: $productType) {
|
|
@@ -1203,7 +1207,7 @@ ${zx}`,ft`
|
|
|
1203
1207
|
}
|
|
1204
1208
|
}
|
|
1205
1209
|
}
|
|
1206
|
-
`,
|
|
1210
|
+
`,dt`
|
|
1207
1211
|
query getAllProviders {
|
|
1208
1212
|
providers {
|
|
1209
1213
|
slug
|
|
@@ -1253,11 +1257,11 @@ ${zx}`,ft`
|
|
|
1253
1257
|
|
|
1254
1258
|
`)}g.write("payload.value = newResult;"),g.write("return payload;");const S=g.compile();return(k,P)=>S(m,k,P)};let i;const s=Gp,a=!w6.jitless,c=a&&QX.value,d=t.catchall;let p;e._zod.parse=(m,g)=>{p??(p=n.value);const b=m.value;return s(b)?a&&c&&g?.async===!1&&g.jitless!==!0?(i||(i=o(t.shape)),m=i(m,g),d?F6([],b,m,g,p,e):m):r(m,g):(m.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),m)}});function B6(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=>!au(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=>Ha(s,n,Wa())))}),t)}const Mee=ye("$ZodUnion",(e,t)=>{Rr.init(e,t),Zt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Zt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Zt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Zt(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Gx(i.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1;const a=[];for(const l of t.options){const c=l._zod.run({value:o.value,issues:[]},i);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(l=>B6(l,o,e,i)):B6(a,o,e,i)}}),Oee=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])=>z6(r,l,c)):z6(r,i,s)}});function Qx(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(Dc(e)&&Dc(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(const i of n){const s=Qx(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=Qx(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 z6(e,t,r){const n=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(a);const i=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),au(e))return e;const s=Qx(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const jee=ye("$ZodEnum",(e,t)=>{Rr.init(e,t);const r=C6(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>eQ.has(typeof o)).map(o=>typeof o=="string"?Zp(o):o.toString()).join("|")})$`),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}}),Lee=ye("$ZodTransform",(e,t)=>{Rr.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new x6(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 su;return r.value=o,r}});function K6(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const V6=ye("$ZodOptional",(e,t)=>{Rr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Zt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Zt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Gx(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>K6(i,r.value)):K6(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),Fee=ye("$ZodExactOptional",(e,t)=>{V6.init(e,t),Zt(e._zod,"values",()=>t.innerType._zod.values),Zt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),Bee=ye("$ZodNullable",(e,t)=>{Rr.init(e,t),Zt(e._zod,"optin",()=>t.innerType._zod.optin),Zt(e._zod,"optout",()=>t.innerType._zod.optout),Zt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Gx(r.source)}|null)$`):void 0}),Zt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),zee=ye("$ZodDefault",(e,t)=>{Rr.init(e,t),e._zod.optin="optional",Zt(e._zod,"values",()=>t.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=>R6(i,t)):R6(o,t)}});function R6(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Kee=ye("$ZodPrefault",(e,t)=>{Rr.init(e,t),e._zod.optin="optional",Zt(e._zod,"values",()=>t.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))}),Vee=ye("$ZodNonOptional",(e,t)=>{Rr.init(e,t),Zt(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>W6(i,e)):W6(o,e)}});function W6(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ree=ye("$ZodCatch",(e,t)=>{Rr.init(e,t),Zt(e._zod,"optin",()=>t.innerType._zod.optin),Zt(e._zod,"optout",()=>t.innerType._zod.optout),Zt(e._zod,"values",()=>t.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(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Ha(s,n,Wa()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Ha(i,n,Wa()))},input:r.value}),r.issues=[]),r)}}),Wee=ye("$ZodPipe",(e,t)=>{Rr.init(e,t),Zt(e._zod,"values",()=>t.in._zod.values),Zt(e._zod,"optin",()=>t.in._zod.optin),Zt(e._zod,"optout",()=>t.out._zod.optout),Zt(e._zod,"propValues",()=>t.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=>th(s,t.in,n)):th(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>th(i,t.out,n)):th(o,t.out,n)}});function th(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Uee=ye("$ZodReadonly",(e,t)=>{Rr.init(e,t),Zt(e._zod,"propValues",()=>t.innerType._zod.propValues),Zt(e._zod,"values",()=>t.innerType._zod.values),Zt(e._zod,"optin",()=>t.innerType?._zod?.optin),Zt(e._zod,"optout",()=>t.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(U6):U6(o)}});function U6(e){return e.value=Object.freeze(e.value),e}const Hee=ye("$ZodCustom",(e,t)=>{vi.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=>H6(i,r,n,e));H6(o,r,n,e)}});function H6(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(Mc(o))}}var q6;class qee{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 Gee(){return new qee}(q6=globalThis).__zod_globalRegistry??(q6.__zod_globalRegistry=Gee());const Oc=globalThis.__zod_globalRegistry;function Zee(e,t){return new e({type:"string",...Qe(t)})}function Yee(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Qe(t)})}function G6(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Qe(t)})}function Jee(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Qe(t)})}function Xee(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Qe(t)})}function Qee(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Qe(t)})}function ete(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Qe(t)})}function tte(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Qe(t)})}function rte(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Qe(t)})}function nte(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Qe(t)})}function ote(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Qe(t)})}function ite(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Qe(t)})}function ste(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Qe(t)})}function ate(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Qe(t)})}function lte(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Qe(t)})}function ute(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Qe(t)})}function cte(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Qe(t)})}function dte(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Qe(t)})}function fte(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Qe(t)})}function pte(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Qe(t)})}function hte(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Qe(t)})}function mte(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Qe(t)})}function gte(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Qe(t)})}function bte(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Qe(t)})}function vte(e,t){return new e({type:"string",format:"date",check:"string_format",...Qe(t)})}function yte(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Qe(t)})}function xte(e,t){return new e({type:"string",format:"duration",check:"string_format",...Qe(t)})}function wte(e,t){return new e({type:"boolean",...Qe(t)})}function Cte(e){return new e({type:"unknown"})}function Ste(e,t){return new e({type:"never",...Qe(t)})}function Z6(e,t){return new UQ({check:"max_length",...Qe(t),maximum:e})}function rh(e,t){return new HQ({check:"min_length",...Qe(t),minimum:e})}function Y6(e,t){return new qQ({check:"length_equals",...Qe(t),length:e})}function kte(e,t){return new GQ({check:"string_format",format:"regex",...Qe(t),pattern:e})}function Pte(e){return new ZQ({check:"string_format",format:"lowercase",...Qe(e)})}function Ete(e){return new YQ({check:"string_format",format:"uppercase",...Qe(e)})}function Tte(e,t){return new JQ({check:"string_format",format:"includes",...Qe(t),includes:e})}function Ate(e,t){return new XQ({check:"string_format",format:"starts_with",...Qe(t),prefix:e})}function $te(e,t){return new QQ({check:"string_format",format:"ends_with",...Qe(t),suffix:e})}function lu(e){return new eee({check:"overwrite",tx:e})}function _te(e){return lu(t=>t.normalize(e))}function Ite(){return lu(e=>e.trim())}function Nte(){return lu(e=>e.toLowerCase())}function Dte(){return lu(e=>e.toUpperCase())}function Mte(){return lu(e=>XX(e))}function Ote(e,t,r){return new e({type:"array",element:t,...Qe(r)})}function jte(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Qe(r)})}function Lte(e){const t=Fte(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Mc(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Mc(o))}},e(r.value,r)));return t}function Fte(e,t){const r=new vi({check:"custom",...Qe(t)});return r._zod.check=e,r}function J6(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??Oc,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 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);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 p=e._zod.parent;p&&(s.ref||(s.ref=p),on(p,t,d),t.seen.get(p).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&An(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function X6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");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 p=e.external.registry.get(s[0])?.id,m=e.external.uri??(b=>b);if(p)return{ref:m(p)};const g=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=g,{defId:g,ref:`${m("__shared")}#/${a}/${g}`}}if(s[1]===r)return{ref:"#"};const c=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+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 p in d)delete d[p];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>
|
|
1255
1259
|
|
|
1256
|
-
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}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Q6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const a=e.seen.get(s);if(a.ref===null)return;const l=a.def??a.schema,c={...l},d=a.ref;if(a.ref=null,d){n(d);const m=e.seen.get(d),g=m.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(g)):Object.assign(l,g),Object.assign(l,c),s._zod.parent===d)for(const y in l)y==="$ref"||y==="allOf"||y in c||delete l[y];if(g.$ref)for(const y in l)y==="$ref"||y==="allOf"||y in m.def&&JSON.stringify(l[y])===JSON.stringify(m.def[y])&&delete l[y]}const p=s._zod.parent;if(p&&p!==d){n(p);const m=e.seen.get(p);if(m?.schema.$ref&&(l.$ref=m.schema.$ref,m.def))for(const g in l)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(l[g])===JSON.stringify(m.def[g])&&delete l[g]}e.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())n(s[0]);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 s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,r.def??r.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:nh(t,"input",e.processors),output:nh(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}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")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 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 Bte=(e,t={})=>r=>{const n=J6({...r,processors:t});return on(e,n),X6(n,e),Q6(n,e)},nh=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=J6({...o??{},target:i,io:t,processors:r});return on(e,s),X6(s,e),Q6(s,e)},zte={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kte=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=zte[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){const d=[...l];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Vte=(e,t,r,n)=>{r.type="boolean"},Rte=(e,t,r,n)=>{r.not={}},Wte=(e,t,r,n)=>{},Ute=(e,t,r,n)=>{const o=e._zod.def,i=C6(o.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Hte=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},qte=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Gte=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;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"]})},Zte=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const c in s)o.properties[c]=on(s[c],t,{...n,path:[...n.path,"properties",c]});const a=new Set(Object.keys(s)),l=new Set([...a].filter(c=>{const d=i.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(o.required=Array.from(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)},Yte=(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},Jte=(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},Xte=(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"}]},Qte=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},ere=(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.default=JSON.parse(JSON.stringify(o.defaultValue))},tre=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},rre=(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{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},nre=(e,t,r,n)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;on(i,t,n);const s=t.seen.get(e);s.ref=i},ore=(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},eI=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},ire=ye("ZodISODateTime",(e,t)=>{hee.init(e,t),Cr.init(e,t)});function sre(e){return bte(ire,e)}const are=ye("ZodISODate",(e,t)=>{mee.init(e,t),Cr.init(e,t)});function lre(e){return vte(are,e)}const ure=ye("ZodISOTime",(e,t)=>{gee.init(e,t),Cr.init(e,t)});function cre(e){return yte(ure,e)}const dre=ye("ZodISODuration",(e,t)=>{bee.init(e,t),Cr.init(e,t)});function fre(e){return xte(dre,e)}const Co=ye("ZodError",(e,t)=>{$6.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>cQ(e,r)},flatten:{value:r=>uQ(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Ux,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Ux,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),pre=Yx(Co),hre=Jx(Co),mre=Jp(Co),gre=Xp(Co),bre=pQ(Co),vre=hQ(Co),yre=mQ(Co),xre=gQ(Co),wre=bQ(Co),Cre=vQ(Co),Sre=yQ(Co),kre=xQ(Co),Wr=ye("ZodType",(e,t)=>(Rr.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nh(e,"input"),output:nh(e,"output")}}),e.toJSONSchema=Bte(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Us(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>Hs(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>pre(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>mre(e,r,n),e.parseAsync=async(r,n)=>hre(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>gre(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>bre(e,r,n),e.decode=(r,n)=>vre(e,r,n),e.encodeAsync=async(r,n)=>yre(e,r,n),e.decodeAsync=async(r,n)=>xre(e,r,n),e.safeEncode=(r,n)=>wre(e,r,n),e.safeDecode=(r,n)=>Cre(e,r,n),e.safeEncodeAsync=async(r,n)=>Sre(e,r,n),e.safeDecodeAsync=async(r,n)=>kre(e,r,n),e.refine=(r,n)=>e.check(gne(r,n)),e.superRefine=r=>e.check(bne(r)),e.overwrite=r=>e.check(lu(r)),e.optional=()=>aI(e),e.exactOptional=()=>nne(e),e.nullable=()=>lI(e),e.nullish=()=>aI(lI(e)),e.nonoptional=r=>une(e,r),e.array=()=>oI(e),e.or=r=>Jre([e,r]),e.and=r=>Qre(e,r),e.transform=r=>cI(e,tne(r)),e.default=r=>sne(e,r),e.prefault=r=>lne(e,r),e.catch=r=>dne(e,r),e.pipe=r=>cI(e,r),e.readonly=()=>hne(e),e.describe=r=>{const n=e.clone();return Oc.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Oc.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Oc.get(e);const n=e.clone();return Oc.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),tI=ye("_ZodString",(e,t)=>{Xx.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Kte(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(kte(...n)),e.includes=(...n)=>e.check(Tte(...n)),e.startsWith=(...n)=>e.check(Ate(...n)),e.endsWith=(...n)=>e.check($te(...n)),e.min=(...n)=>e.check(rh(...n)),e.max=(...n)=>e.check(Z6(...n)),e.length=(...n)=>e.check(Y6(...n)),e.nonempty=(...n)=>e.check(rh(1,...n)),e.lowercase=n=>e.check(Pte(n)),e.uppercase=n=>e.check(Ete(n)),e.trim=()=>e.check(Ite()),e.normalize=(...n)=>e.check(_te(...n)),e.toLowerCase=()=>e.check(Nte()),e.toUpperCase=()=>e.check(Dte()),e.slugify=()=>e.check(Mte())}),Pre=ye("ZodString",(e,t)=>{Xx.init(e,t),tI.init(e,t),e.email=r=>e.check(Yee(Ere,r)),e.url=r=>e.check(tte(Tre,r)),e.jwt=r=>e.check(gte(Vre,r)),e.emoji=r=>e.check(rte(Are,r)),e.guid=r=>e.check(G6(rI,r)),e.uuid=r=>e.check(Jee(oh,r)),e.uuidv4=r=>e.check(Xee(oh,r)),e.uuidv6=r=>e.check(Qee(oh,r)),e.uuidv7=r=>e.check(ete(oh,r)),e.nanoid=r=>e.check(nte($re,r)),e.guid=r=>e.check(G6(rI,r)),e.cuid=r=>e.check(ote(_re,r)),e.cuid2=r=>e.check(ite(Ire,r)),e.ulid=r=>e.check(ste(Nre,r)),e.base64=r=>e.check(pte(Bre,r)),e.base64url=r=>e.check(hte(zre,r)),e.xid=r=>e.check(ate(Dre,r)),e.ksuid=r=>e.check(lte(Mre,r)),e.ipv4=r=>e.check(ute(Ore,r)),e.ipv6=r=>e.check(cte(jre,r)),e.cidrv4=r=>e.check(dte(Lre,r)),e.cidrv6=r=>e.check(fte(Fre,r)),e.e164=r=>e.check(mte(Kre,r)),e.datetime=r=>e.check(sre(r)),e.date=r=>e.check(lre(r)),e.time=r=>e.check(cre(r)),e.duration=r=>e.check(fre(r))});function So(e){return Zee(Pre,e)}const Cr=ye("ZodStringFormat",(e,t)=>{gr.init(e,t),tI.init(e,t)}),Ere=ye("ZodEmail",(e,t)=>{iee.init(e,t),Cr.init(e,t)}),rI=ye("ZodGUID",(e,t)=>{nee.init(e,t),Cr.init(e,t)}),oh=ye("ZodUUID",(e,t)=>{oee.init(e,t),Cr.init(e,t)}),Tre=ye("ZodURL",(e,t)=>{see.init(e,t),Cr.init(e,t)}),Are=ye("ZodEmoji",(e,t)=>{aee.init(e,t),Cr.init(e,t)}),$re=ye("ZodNanoID",(e,t)=>{lee.init(e,t),Cr.init(e,t)}),_re=ye("ZodCUID",(e,t)=>{uee.init(e,t),Cr.init(e,t)}),Ire=ye("ZodCUID2",(e,t)=>{cee.init(e,t),Cr.init(e,t)}),Nre=ye("ZodULID",(e,t)=>{dee.init(e,t),Cr.init(e,t)}),Dre=ye("ZodXID",(e,t)=>{fee.init(e,t),Cr.init(e,t)}),Mre=ye("ZodKSUID",(e,t)=>{pee.init(e,t),Cr.init(e,t)}),Ore=ye("ZodIPv4",(e,t)=>{vee.init(e,t),Cr.init(e,t)}),jre=ye("ZodIPv6",(e,t)=>{yee.init(e,t),Cr.init(e,t)}),Lre=ye("ZodCIDRv4",(e,t)=>{xee.init(e,t),Cr.init(e,t)}),Fre=ye("ZodCIDRv6",(e,t)=>{wee.init(e,t),Cr.init(e,t)}),Bre=ye("ZodBase64",(e,t)=>{Cee.init(e,t),Cr.init(e,t)}),zre=ye("ZodBase64URL",(e,t)=>{kee.init(e,t),Cr.init(e,t)}),Kre=ye("ZodE164",(e,t)=>{Pee.init(e,t),Cr.init(e,t)}),Vre=ye("ZodJWT",(e,t)=>{Tee.init(e,t),Cr.init(e,t)}),Rre=ye("ZodBoolean",(e,t)=>{Aee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vte(e,r,n)});function Wre(e){return wte(Rre,e)}const Ure=ye("ZodUnknown",(e,t)=>{$ee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Wte()});function nI(){return Cte(Ure)}const Hre=ye("ZodNever",(e,t)=>{_ee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rte(e,r,n)});function qre(e){return Ste(Hre,e)}const Gre=ye("ZodArray",(e,t)=>{Iee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gte(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(rh(r,n)),e.nonempty=r=>e.check(rh(1,r)),e.max=(r,n)=>e.check(Z6(r,n)),e.length=(r,n)=>e.check(Y6(r,n)),e.unwrap=()=>e.element});function oI(e,t){return Ote(Gre,e,t)}const Zre=ye("ZodObject",(e,t)=>{Dee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zte(e,r,n,o),Zt(e,"shape",()=>t.shape),e.keyof=()=>iI(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nI()}),e.loose=()=>e.clone({...e._zod.def,catchall:nI()}),e.strict=()=>e.clone({...e._zod.def,catchall:qre()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>oQ(e,r),e.safeExtend=r=>iQ(e,r),e.merge=r=>sQ(e,r),e.pick=r=>rQ(e,r),e.omit=r=>nQ(e,r),e.partial=(...r)=>aQ(sI,e,r[0]),e.required=(...r)=>lQ(uI,e,r[0])});function e1(e,t){const r={type:"object",shape:e??{},...Qe(t)};return new Zre(r)}const Yre=ye("ZodUnion",(e,t)=>{Mee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Yte(e,r,n,o),e.options=t.options});function Jre(e,t){return new Yre({type:"union",options:e,...Qe(t)})}const Xre=ye("ZodIntersection",(e,t)=>{Oee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jte(e,r,n,o)});function Qre(e,t){return new Xre({type:"intersection",left:e,right:t})}const t1=ye("ZodEnum",(e,t)=>{jee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Ute(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);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 t1({...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 t1({...t,checks:[],...Qe(o),entries:i})}});function iI(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t1({type:"enum",entries:r,...Qe(t)})}const ene=ye("ZodTransform",(e,t)=>{Lee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qte(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new x6(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Mc(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Mc(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function tne(e){return new ene({type:"transform",transform:e})}const sI=ye("ZodOptional",(e,t)=>{V6.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>eI(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function aI(e){return new sI({type:"optional",innerType:e})}const rne=ye("ZodExactOptional",(e,t)=>{Fee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>eI(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function nne(e){return new rne({type:"optional",innerType:e})}const one=ye("ZodNullable",(e,t)=>{Bee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xte(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function lI(e){return new one({type:"nullable",innerType:e})}const ine=ye("ZodDefault",(e,t)=>{zee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ere(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sne(e,t){return new ine({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():E6(t)}})}const ane=ye("ZodPrefault",(e,t)=>{Kee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>tre(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function lne(e,t){return new ane({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():E6(t)}})}const uI=ye("ZodNonOptional",(e,t)=>{Vee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qte(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function une(e,t){return new uI({type:"nonoptional",innerType:e,...Qe(t)})}const cne=ye("ZodCatch",(e,t)=>{Ree.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>rre(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dne(e,t){return new cne({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const fne=ye("ZodPipe",(e,t)=>{Wee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>nre(e,r,n,o),e.in=t.in,e.out=t.out});function cI(e,t){return new fne({type:"pipe",in:e,out:t})}const pne=ye("ZodReadonly",(e,t)=>{Uee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ore(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function hne(e){return new pne({type:"readonly",innerType:e})}const mne=ye("ZodCustom",(e,t)=>{Hee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hte(e,r)});function gne(e,t={}){return jte(mne,e,t)}function bne(e){return Lte(e)}const vne=/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/i,r1=e1({postcode:So().trim().min(1,{message:"Dit is een verplicht veld."}).regex(vne,{message:"Geef een geldige postcode op."}).max(6,{message:"De postcode is te lang."}),number:So().min(1,{message:"Dit is een verplicht veld."}),numberAddon:So().optional().transform(e=>e??void 0),street:So().min(1,{message:"Vul de straat in."}),city:So().min(1,{message:"Vul de woonplaats in."})}),dI=e1({keepCurrentMsisdn:Wre().optional(),currentMsisdn:So().optional(),currentSubscriptionType:iI(["subscription","prepaid"]).optional(),currentProviderSlug:So().optional(),currentFixedProviderScope:So().optional(),currentMobileProviders:oI(e1({scope:So(),value:So()})).optional(),birthdate:So().regex(/^[0-3]\d-(0\d|1[0-2])-(19|20)\d{2}$/).optional(),customerSegment:So().nullish(),address:r1.optional()});function fI(){const e=window.sessionStorage.getItem("mobielnl-profile");if(!e)return{};const t=dI.safeParse(JSON.parse(e));return t.success?t.data:{}}function yne(e){return!!e.address||!!e.currentMsisdn||!!e.birthdate}const xne=ft`
|
|
1260
|
+
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}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Q6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const a=e.seen.get(s);if(a.ref===null)return;const l=a.def??a.schema,c={...l},d=a.ref;if(a.ref=null,d){n(d);const m=e.seen.get(d),g=m.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(g)):Object.assign(l,g),Object.assign(l,c),s._zod.parent===d)for(const y in l)y==="$ref"||y==="allOf"||y in c||delete l[y];if(g.$ref)for(const y in l)y==="$ref"||y==="allOf"||y in m.def&&JSON.stringify(l[y])===JSON.stringify(m.def[y])&&delete l[y]}const p=s._zod.parent;if(p&&p!==d){n(p);const m=e.seen.get(p);if(m?.schema.$ref&&(l.$ref=m.schema.$ref,m.def))for(const g in l)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(l[g])===JSON.stringify(m.def[g])&&delete l[g]}e.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())n(s[0]);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 s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,r.def??r.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:nh(t,"input",e.processors),output:nh(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}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")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 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 Bte=(e,t={})=>r=>{const n=J6({...r,processors:t});return on(e,n),X6(n,e),Q6(n,e)},nh=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=J6({...o??{},target:i,io:t,processors:r});return on(e,s),X6(s,e),Q6(s,e)},zte={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kte=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=zte[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){const d=[...l];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Vte=(e,t,r,n)=>{r.type="boolean"},Rte=(e,t,r,n)=>{r.not={}},Wte=(e,t,r,n)=>{},Ute=(e,t,r,n)=>{const o=e._zod.def,i=C6(o.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Hte=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},qte=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Gte=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;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"]})},Zte=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const c in s)o.properties[c]=on(s[c],t,{...n,path:[...n.path,"properties",c]});const a=new Set(Object.keys(s)),l=new Set([...a].filter(c=>{const d=i.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(o.required=Array.from(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)},Yte=(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},Jte=(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},Xte=(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"}]},Qte=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},ere=(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.default=JSON.parse(JSON.stringify(o.defaultValue))},tre=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},rre=(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{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},nre=(e,t,r,n)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;on(i,t,n);const s=t.seen.get(e);s.ref=i},ore=(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},eI=(e,t,r,n)=>{const o=e._zod.def;on(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},ire=ye("ZodISODateTime",(e,t)=>{hee.init(e,t),Cr.init(e,t)});function sre(e){return bte(ire,e)}const are=ye("ZodISODate",(e,t)=>{mee.init(e,t),Cr.init(e,t)});function lre(e){return vte(are,e)}const ure=ye("ZodISOTime",(e,t)=>{gee.init(e,t),Cr.init(e,t)});function cre(e){return yte(ure,e)}const dre=ye("ZodISODuration",(e,t)=>{bee.init(e,t),Cr.init(e,t)});function fre(e){return xte(dre,e)}const Co=ye("ZodError",(e,t)=>{$6.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>cQ(e,r)},flatten:{value:r=>uQ(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Ux,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Ux,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),pre=Yx(Co),hre=Jx(Co),mre=Jp(Co),gre=Xp(Co),bre=pQ(Co),vre=hQ(Co),yre=mQ(Co),xre=gQ(Co),wre=bQ(Co),Cre=vQ(Co),Sre=yQ(Co),kre=xQ(Co),Wr=ye("ZodType",(e,t)=>(Rr.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nh(e,"input"),output:nh(e,"output")}}),e.toJSONSchema=Bte(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Us(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>Hs(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>pre(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>mre(e,r,n),e.parseAsync=async(r,n)=>hre(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>gre(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>bre(e,r,n),e.decode=(r,n)=>vre(e,r,n),e.encodeAsync=async(r,n)=>yre(e,r,n),e.decodeAsync=async(r,n)=>xre(e,r,n),e.safeEncode=(r,n)=>wre(e,r,n),e.safeDecode=(r,n)=>Cre(e,r,n),e.safeEncodeAsync=async(r,n)=>Sre(e,r,n),e.safeDecodeAsync=async(r,n)=>kre(e,r,n),e.refine=(r,n)=>e.check(gne(r,n)),e.superRefine=r=>e.check(bne(r)),e.overwrite=r=>e.check(lu(r)),e.optional=()=>aI(e),e.exactOptional=()=>nne(e),e.nullable=()=>lI(e),e.nullish=()=>aI(lI(e)),e.nonoptional=r=>une(e,r),e.array=()=>oI(e),e.or=r=>Jre([e,r]),e.and=r=>Qre(e,r),e.transform=r=>cI(e,tne(r)),e.default=r=>sne(e,r),e.prefault=r=>lne(e,r),e.catch=r=>dne(e,r),e.pipe=r=>cI(e,r),e.readonly=()=>hne(e),e.describe=r=>{const n=e.clone();return Oc.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Oc.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Oc.get(e);const n=e.clone();return Oc.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),tI=ye("_ZodString",(e,t)=>{Xx.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Kte(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(kte(...n)),e.includes=(...n)=>e.check(Tte(...n)),e.startsWith=(...n)=>e.check(Ate(...n)),e.endsWith=(...n)=>e.check($te(...n)),e.min=(...n)=>e.check(rh(...n)),e.max=(...n)=>e.check(Z6(...n)),e.length=(...n)=>e.check(Y6(...n)),e.nonempty=(...n)=>e.check(rh(1,...n)),e.lowercase=n=>e.check(Pte(n)),e.uppercase=n=>e.check(Ete(n)),e.trim=()=>e.check(Ite()),e.normalize=(...n)=>e.check(_te(...n)),e.toLowerCase=()=>e.check(Nte()),e.toUpperCase=()=>e.check(Dte()),e.slugify=()=>e.check(Mte())}),Pre=ye("ZodString",(e,t)=>{Xx.init(e,t),tI.init(e,t),e.email=r=>e.check(Yee(Ere,r)),e.url=r=>e.check(tte(Tre,r)),e.jwt=r=>e.check(gte(Vre,r)),e.emoji=r=>e.check(rte(Are,r)),e.guid=r=>e.check(G6(rI,r)),e.uuid=r=>e.check(Jee(oh,r)),e.uuidv4=r=>e.check(Xee(oh,r)),e.uuidv6=r=>e.check(Qee(oh,r)),e.uuidv7=r=>e.check(ete(oh,r)),e.nanoid=r=>e.check(nte($re,r)),e.guid=r=>e.check(G6(rI,r)),e.cuid=r=>e.check(ote(_re,r)),e.cuid2=r=>e.check(ite(Ire,r)),e.ulid=r=>e.check(ste(Nre,r)),e.base64=r=>e.check(pte(Bre,r)),e.base64url=r=>e.check(hte(zre,r)),e.xid=r=>e.check(ate(Dre,r)),e.ksuid=r=>e.check(lte(Mre,r)),e.ipv4=r=>e.check(ute(Ore,r)),e.ipv6=r=>e.check(cte(jre,r)),e.cidrv4=r=>e.check(dte(Lre,r)),e.cidrv6=r=>e.check(fte(Fre,r)),e.e164=r=>e.check(mte(Kre,r)),e.datetime=r=>e.check(sre(r)),e.date=r=>e.check(lre(r)),e.time=r=>e.check(cre(r)),e.duration=r=>e.check(fre(r))});function So(e){return Zee(Pre,e)}const Cr=ye("ZodStringFormat",(e,t)=>{gr.init(e,t),tI.init(e,t)}),Ere=ye("ZodEmail",(e,t)=>{iee.init(e,t),Cr.init(e,t)}),rI=ye("ZodGUID",(e,t)=>{nee.init(e,t),Cr.init(e,t)}),oh=ye("ZodUUID",(e,t)=>{oee.init(e,t),Cr.init(e,t)}),Tre=ye("ZodURL",(e,t)=>{see.init(e,t),Cr.init(e,t)}),Are=ye("ZodEmoji",(e,t)=>{aee.init(e,t),Cr.init(e,t)}),$re=ye("ZodNanoID",(e,t)=>{lee.init(e,t),Cr.init(e,t)}),_re=ye("ZodCUID",(e,t)=>{uee.init(e,t),Cr.init(e,t)}),Ire=ye("ZodCUID2",(e,t)=>{cee.init(e,t),Cr.init(e,t)}),Nre=ye("ZodULID",(e,t)=>{dee.init(e,t),Cr.init(e,t)}),Dre=ye("ZodXID",(e,t)=>{fee.init(e,t),Cr.init(e,t)}),Mre=ye("ZodKSUID",(e,t)=>{pee.init(e,t),Cr.init(e,t)}),Ore=ye("ZodIPv4",(e,t)=>{vee.init(e,t),Cr.init(e,t)}),jre=ye("ZodIPv6",(e,t)=>{yee.init(e,t),Cr.init(e,t)}),Lre=ye("ZodCIDRv4",(e,t)=>{xee.init(e,t),Cr.init(e,t)}),Fre=ye("ZodCIDRv6",(e,t)=>{wee.init(e,t),Cr.init(e,t)}),Bre=ye("ZodBase64",(e,t)=>{Cee.init(e,t),Cr.init(e,t)}),zre=ye("ZodBase64URL",(e,t)=>{kee.init(e,t),Cr.init(e,t)}),Kre=ye("ZodE164",(e,t)=>{Pee.init(e,t),Cr.init(e,t)}),Vre=ye("ZodJWT",(e,t)=>{Tee.init(e,t),Cr.init(e,t)}),Rre=ye("ZodBoolean",(e,t)=>{Aee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vte(e,r,n)});function Wre(e){return wte(Rre,e)}const Ure=ye("ZodUnknown",(e,t)=>{$ee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Wte()});function nI(){return Cte(Ure)}const Hre=ye("ZodNever",(e,t)=>{_ee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rte(e,r,n)});function qre(e){return Ste(Hre,e)}const Gre=ye("ZodArray",(e,t)=>{Iee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gte(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(rh(r,n)),e.nonempty=r=>e.check(rh(1,r)),e.max=(r,n)=>e.check(Z6(r,n)),e.length=(r,n)=>e.check(Y6(r,n)),e.unwrap=()=>e.element});function oI(e,t){return Ote(Gre,e,t)}const Zre=ye("ZodObject",(e,t)=>{Dee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zte(e,r,n,o),Zt(e,"shape",()=>t.shape),e.keyof=()=>iI(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nI()}),e.loose=()=>e.clone({...e._zod.def,catchall:nI()}),e.strict=()=>e.clone({...e._zod.def,catchall:qre()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>oQ(e,r),e.safeExtend=r=>iQ(e,r),e.merge=r=>sQ(e,r),e.pick=r=>rQ(e,r),e.omit=r=>nQ(e,r),e.partial=(...r)=>aQ(sI,e,r[0]),e.required=(...r)=>lQ(uI,e,r[0])});function e1(e,t){const r={type:"object",shape:e??{},...Qe(t)};return new Zre(r)}const Yre=ye("ZodUnion",(e,t)=>{Mee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Yte(e,r,n,o),e.options=t.options});function Jre(e,t){return new Yre({type:"union",options:e,...Qe(t)})}const Xre=ye("ZodIntersection",(e,t)=>{Oee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jte(e,r,n,o)});function Qre(e,t){return new Xre({type:"intersection",left:e,right:t})}const t1=ye("ZodEnum",(e,t)=>{jee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Ute(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);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 t1({...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 t1({...t,checks:[],...Qe(o),entries:i})}});function iI(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t1({type:"enum",entries:r,...Qe(t)})}const ene=ye("ZodTransform",(e,t)=>{Lee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qte(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new x6(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Mc(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Mc(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function tne(e){return new ene({type:"transform",transform:e})}const sI=ye("ZodOptional",(e,t)=>{V6.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>eI(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function aI(e){return new sI({type:"optional",innerType:e})}const rne=ye("ZodExactOptional",(e,t)=>{Fee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>eI(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function nne(e){return new rne({type:"optional",innerType:e})}const one=ye("ZodNullable",(e,t)=>{Bee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xte(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function lI(e){return new one({type:"nullable",innerType:e})}const ine=ye("ZodDefault",(e,t)=>{zee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ere(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sne(e,t){return new ine({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():E6(t)}})}const ane=ye("ZodPrefault",(e,t)=>{Kee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>tre(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function lne(e,t){return new ane({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():E6(t)}})}const uI=ye("ZodNonOptional",(e,t)=>{Vee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qte(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function une(e,t){return new uI({type:"nonoptional",innerType:e,...Qe(t)})}const cne=ye("ZodCatch",(e,t)=>{Ree.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>rre(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dne(e,t){return new cne({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const fne=ye("ZodPipe",(e,t)=>{Wee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>nre(e,r,n,o),e.in=t.in,e.out=t.out});function cI(e,t){return new fne({type:"pipe",in:e,out:t})}const pne=ye("ZodReadonly",(e,t)=>{Uee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ore(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function hne(e){return new pne({type:"readonly",innerType:e})}const mne=ye("ZodCustom",(e,t)=>{Hee.init(e,t),Wr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hte(e,r)});function gne(e,t={}){return jte(mne,e,t)}function bne(e){return Lte(e)}const vne=/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/i,r1=e1({postcode:So().trim().min(1,{message:"Dit is een verplicht veld."}).regex(vne,{message:"Geef een geldige postcode op."}).max(6,{message:"De postcode is te lang."}),number:So().min(1,{message:"Dit is een verplicht veld."}),numberAddon:So().optional().transform(e=>e??void 0),street:So().min(1,{message:"Vul de straat in."}),city:So().min(1,{message:"Vul de woonplaats in."})}),dI=e1({keepCurrentMsisdn:Wre().optional(),currentMsisdn:So().optional(),currentSubscriptionType:iI(["subscription","prepaid"]).optional(),currentProviderSlug:So().optional(),currentFixedProviderScope:So().optional(),currentMobileProviders:oI(e1({scope:So(),value:So()})).optional(),birthdate:So().regex(/^[0-3]\d-(0\d|1[0-2])-(19|20)\d{2}$/).optional(),customerSegment:So().nullish(),address:r1.optional()});function fI(){const e=window.sessionStorage.getItem("mobielnl-profile");if(!e)return{};const t=dI.safeParse(JSON.parse(e));return t.success?t.data:{}}function yne(e){return!!e.address||!!e.currentMsisdn||!!e.birthdate}const xne=dt`
|
|
1257
1261
|
mutation addPartnerProfile($data: InputPartnerProfile!) {
|
|
1258
1262
|
addPartnerProfile(data: $data)
|
|
1259
1263
|
}
|
|
1260
|
-
`;async function wne(e){return(await Dv(xne,{data:e}).catch(()=>{}))?.addPartnerProfile}async function jc(e){const t={...fI(),...e};if(!yne(t))return;const{address:r,currentMsisdn:n,birthdate:o}=t,i=await wne({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 y6("mobielnl-ppt",{token:i},{expires:15/1440}),i}function pI(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 hI(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 mI(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 Cne(){const e=v6("mobielnl-ppt")?.token;return e||jc()}function gI(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 Lc(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 bI=x.createContext({profile:{},setProfile:e=>{}});function Sne(e){const{success:t,data:r}=dI.safeParse(e);t&&window.sessionStorage.setItem("mobielnl-profile",JSON.stringify(r))}var ih={},vI;function kne(){if(vI)return ih;vI=1,Object.defineProperty(ih,"__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 ih.default=t,ih}var Pne=kne();const Ene=$u(Pne),Tne=
|
|
1264
|
+
`;async function wne(e){return(await Dv(xne,{data:e}).catch(()=>{}))?.addPartnerProfile}async function jc(e){const t={...fI(),...e};if(!yne(t))return;const{address:r,currentMsisdn:n,birthdate:o}=t,i=await wne({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 y6("mobielnl-ppt",{token:i},{expires:15/1440}),i}function pI(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 hI(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 mI(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 Cne(){const e=v6("mobielnl-ppt")?.token;return e||jc()}function gI(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 Lc(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 bI=x.createContext({profile:{},setProfile:e=>{}});function Sne(e){const{success:t,data:r}=dI.safeParse(e);t&&window.sessionStorage.setItem("mobielnl-profile",JSON.stringify(r))}var ih={},vI;function kne(){if(vI)return ih;vI=1,Object.defineProperty(ih,"__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 ih.default=t,ih}var Pne=kne();const Ene=$u(Pne),Tne=dt`
|
|
1261
1265
|
mutation partnerCustomerSegment(
|
|
1262
1266
|
$msisdn: String!
|
|
1263
1267
|
$birthdate: String!
|
|
@@ -1274,7 +1278,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1274
1278
|
state
|
|
1275
1279
|
}
|
|
1276
1280
|
}
|
|
1277
|
-
`;async function Ane({msisdn:e,birthdate:t,providerSlug:r}){return(await Dv(Tne,{msisdn:e,birthdate:t,providerSlug:r,origin:window.location.hostname.split(".").at(-2)})).partnerCustomerSegment}const $ne=1e3,_ne=3e4,yI="customerSegmentChecked";function xI(e,t,r){return[e,t,r].join("|")}function Ine(e,t,r){const[n,o]=x.useState({state:"pending",customerSegment:null}),[i,s]=x.useState(),[a,l]=x.useState(!1);x.useEffect(()=>{const p=[e,t,r].every(Boolean),m=sessionStorage.getItem(yI)===xI(t,e,r);p&&!m?(l(!0),s(Date.now())):l(!1)},[t,e,r]);const c=i?Date.now()-i>_ne:!1;return Ene(()=>{!t||!e||!r||(i||s(Date.now()),Ane({msisdn:t,birthdate:e,providerSlug:r}).then(p=>{o(p),l(p.state==="pending"),p.state!=="pending"&&sessionStorage.setItem(yI,xI(t,e,r))}).catch(()=>{o({state:"failed",customerSegment:null}),l(!1)}))},a&&!c?$ne:null),n}function wI({children:e,initialProfile:t,onProfileChange:r}){const{onAction:n}=mi(),[o,i]=x.useState({...fI(),...t}),{profile:s}=x.useMemo(()=>({profile:o}),[o]),a=x.useCallback(c=>{i(d=>{const p={...d,...c};return r?.(p),Sne(p),n({type:"profile_changed",from:d,to:p}),p})},[r,n]),l=Ine(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(bI,{value:{profile:s,setProfile:a},children:e})}function sn(){return x.useContext(bI)}const Nne=30;function Dne(){const[e,t]=x.useState(!1);return d4(()=>{v6("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:()=>y6("mobielnl-attribution-tracked",{tracked:!0},{expires:Nne})}):null}function CI(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:Ij,imageUrl:void 0}]:[],...r,{name:Ee.t("combiDeal.otherProvider"),slug:"other",Icon:b4,imageUrl:void 0}]}const Mne=
|
|
1281
|
+
`;async function Ane({msisdn:e,birthdate:t,providerSlug:r}){return(await Dv(Tne,{msisdn:e,birthdate:t,providerSlug:r,origin:window.location.hostname.split(".").at(-2)})).partnerCustomerSegment}const $ne=1e3,_ne=3e4,yI="customerSegmentChecked";function xI(e,t,r){return[e,t,r].join("|")}function Ine(e,t,r){const[n,o]=x.useState({state:"pending",customerSegment:null}),[i,s]=x.useState(),[a,l]=x.useState(!1);x.useEffect(()=>{const p=[e,t,r].every(Boolean),m=sessionStorage.getItem(yI)===xI(t,e,r);p&&!m?(l(!0),s(Date.now())):l(!1)},[t,e,r]);const c=i?Date.now()-i>_ne:!1;return Ene(()=>{!t||!e||!r||(i||s(Date.now()),Ane({msisdn:t,birthdate:e,providerSlug:r}).then(p=>{o(p),l(p.state==="pending"),p.state!=="pending"&&sessionStorage.setItem(yI,xI(t,e,r))}).catch(()=>{o({state:"failed",customerSegment:null}),l(!1)}))},a&&!c?$ne:null),n}function wI({children:e,initialProfile:t,onProfileChange:r}){const{onAction:n}=mi(),[o,i]=x.useState({...fI(),...t}),{profile:s}=x.useMemo(()=>({profile:o}),[o]),a=x.useCallback(c=>{i(d=>{const p={...d,...c};return r?.(p),Sne(p),n({type:"profile_changed",from:d,to:p}),p})},[r,n]),l=Ine(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(bI,{value:{profile:s,setProfile:a},children:e})}function sn(){return x.useContext(bI)}const Nne=30;function Dne(){const[e,t]=x.useState(!1);return d4(()=>{v6("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:()=>y6("mobielnl-attribution-tracked",{tracked:!0},{expires:Nne})}):null}function CI(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:Ij,imageUrl:void 0}]:[],...r,{name:Ee.t("combiDeal.otherProvider"),slug:"other",Icon:b4,imageUrl:void 0}]}const Mne=dt`
|
|
1278
1282
|
query getAllProviders {
|
|
1279
1283
|
providers {
|
|
1280
1284
|
slug
|
|
@@ -1286,7 +1290,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1286
1290
|
fixedRank
|
|
1287
1291
|
}
|
|
1288
1292
|
}
|
|
1289
|
-
`;function n1(e=!0,t=[]){const{data:r}=Ko(e?[Mne]:null,{fetcher:nn});return r?r.providers.filter(n=>n.hasMobile&&!t.includes(n.slug)).sort((n,o)=>n.mobileRank-o.mobileRank):[]}const One=
|
|
1293
|
+
`;function n1(e=!0,t=[]){const{data:r}=Ko(e?[Mne]:null,{fetcher:nn});return r?r.providers.filter(n=>n.hasMobile&&!t.includes(n.slug)).sort((n,o)=>n.mobileRank-o.mobileRank):[]}const One=dt`
|
|
1290
1294
|
query getModificationBlocks($version: String!, $productType: String!) {
|
|
1291
1295
|
modificationConfig(version: $version) {
|
|
1292
1296
|
fixedBlocks: blocks(types: ["fixed"], interface: $productType) {
|
|
@@ -1310,7 +1314,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1310
1314
|
}
|
|
1311
1315
|
}
|
|
1312
1316
|
}
|
|
1313
|
-
`;function sh(e,t=!0){const{data:r}=Ko(t?[One,{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 SI({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(),p=e?"fixed":"mobile",m=sh(p),[g,b]=x.useState(!1),y=x.useMemo(()=>CI(m.fixedBlocks,p),[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(di,{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(li,{children:[h.jsx(ui,{children:t("combiDeal.title")}),h.jsxs(si,{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(zu,{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")})]}),p==="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(xc,{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(Da,{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))})]}),(p==="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(Wv,{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(Da,{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(zi,{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 jne(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:s="text",validationBehavior:a="aria"}=e,[l,c]=Oo(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Li(e,t),p=Yl({...e,value:l}),{isInvalid:m,validationErrors:g,validationDetails:b}=p.displayValidation,{labelProps:y,fieldProps:v,descriptionProps:C,errorMessageProps:S}=Cp({...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 I;return Zd(t,(I=e.defaultValue)!==null&&I!==void 0?I:E,c),kp(e,p,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:j=>c(j.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 Lne(e){var t,r,n,o,i,s,a;const l=ur(),{validationBehavior:c}=Jl(Ma)||{},[d,p]=qr(e,cC.variantKeys),{ref:m,as:g,type:b,label:y,baseRef:v,wrapperRef:C,description:S,className:k,classNames:P,autoFocus:E,startContent:I,endContent:j,onClear:N,onChange:D,validationState:M,validationBehavior:V=(t=c??l?.validationBehavior)!=null?t:"native",innerWrapperRef:R,onValueChange:K=()=>{},...O}=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]=Oo(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=!cs(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]);_a(()=>{T.current&&X(T.current.value)},[T.current]);const{labelProps:be,inputProps:re,isInvalid:ke,validationErrors:Ne,validationDetails:Me,descriptionProps:Pe,errorMessageProps:Ae}=jne({...e,validationBehavior:V,autoCapitalize:e.autoCapitalize,value:Y,"aria-label":e.label?e["aria-label"]:Cd(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}=Pa({onFocusWithinChange:W}),{pressProps:Xt}=xn({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:we}),sr=M==="invalid"||ke,Ct=x3({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",Ci=T.current?(!T.current.value||T.current.value===""||!Y||Y==="")&&_t:!1,hn=!!I,eo=Yr?ar||er||_t||Ct==="outside"&&hn:!1,Ur=Ct==="outside"&&!_t&&!hn,jt=x.useMemo(()=>cC({...p,isInvalid:sr,labelPlacement:Ct,isClearable:dr,disableAnimation:Z}),[jr(p),sr,Ct,dr,hn,Z]),Zi=x.useCallback((rt={})=>({ref:F,className:jt.base({class:pe}),"data-slot":"base","data-filled":ae(ue||_t||hn||Ci||oe),"data-filled-within":ae(te||_t||hn||Ci||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(!Ci),"data-hidden":ae(ge),...Jt,...rt}),[jt,pe,ue,Ie,wt,Ut,sr,It,tt,kr,Ci,hn,U,xe,te,_t,Jt,ge,e.isReadOnly,e.isRequired,e.isDisabled]),Xs=x.useCallback((rt={})=>({"data-slot":"label",className:jt.label({class:P?.label}),...Oe(be,ut,rt)}),[jt,Ut,be,P?.label]),Yo=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(!!j),"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(O,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(re))}),rt),"aria-readonly":ae(e.isReadOnly),onChange:uo(re.onChange,D),onKeyDown:uo(re.onKeyDown,rt.onKeyDown,Yo),ref:T}),[jt,Y,et,re,O,ue,te,hn,j,P?.input,e.isReadOnly,e.isRequired,D,Yo]),Jo=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:Xo=>{T.current&&Xo.currentTarget===Xo.target&&T.current.focus()},style:{cursor:"text",...rt.style}}),[jt,wt,Ut,xe,Ie,Y,P?.inputWrapper]),Si=x.useCallback((rt={})=>({...rt,ref:H,"data-slot":"inner-wrapper",onClick:Xo=>{T.current&&Xo.currentTarget===Xo.target&&T.current.focus()},className:jt.innerWrapper({class:A(P?.innerWrapper,rt?.className)})}),[jt,P?.innerWrapper]),Yi=x.useCallback((rt={})=>({...rt,"data-slot":"main-wrapper",className:jt.mainWrapper({class:A(P?.mainWrapper,rt?.className)})}),[jt,P?.mainWrapper]),Ja=x.useCallback((rt={})=>({...rt,"data-slot":"helper-wrapper",className:jt.helperWrapper({class:A(P?.helperWrapper,rt?.className)})}),[jt,P?.helperWrapper]),Xa=x.useCallback((rt={})=>({...rt,...Pe,"data-slot":"description",className:jt.description({class:A(P?.description,rt?.className)})}),[jt,P?.description]),Qs=x.useCallback((rt={})=>({...rt,...Ae,"data-slot":"error-message",className:jt.errorMessage({class:A(P?.errorMessage,rt?.className)})}),[jt,Ae,P?.errorMessage]),ki=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:I,endContent:j,labelPlacement:Ct,isClearable:dr,hasHelper:It,hasStartContent:hn,isLabelOutside:eo,isOutsideLeft:ar,isOutsideTop:er,isLabelOutsideAsPlaceholder:Ur,shouldLabelBeOutside:Yr,shouldLabelBeInside:en,hasPlaceholder:_t,isInvalid:sr,errorMessage:Sr,getBaseProps:Zi,getLabelProps:Xs,getInputProps:St,getMainWrapperProps:Yi,getInputWrapperProps:Jo,getInnerWrapperProps:Si,getHelperWrapperProps:Ja,getDescriptionProps:Xa,getErrorMessageProps:Qs,getClearButtonProps:ki}}var kI=Xe((e,t)=>{const{Component:r,label:n,description:o,isClearable:i,startContent:s,endContent:a,labelPlacement:l,hasHelper:c,isOutsideLeft:d,isOutsideTop:p,shouldLabelBeOutside:m,errorMessage:g,isInvalid:b,getBaseProps:y,getLabelProps:v,getInputProps:C,getInnerWrapperProps:S,getInputWrapperProps:k,getMainWrapperProps:P,getHelperWrapperProps:E,getDescriptionProps:I,getErrorMessageProps:j,getClearButtonProps:N}=Lne({...e,ref:t}),D=n?h.jsx("label",{...v(),children:n}):null,M=x.useMemo(()=>i?h.jsx("button",{...N(),children:a||h.jsx(rv,{})}):a,[i,N]),V=x.useMemo(()=>{const O=b&&g;return!c||!(O||o)?null:h.jsx("div",{...E(),children:O?h.jsx("div",{...j(),children:g}):h.jsx("div",{...I(),children:o})})},[c,b,g,o,E,j,I]),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&&!p?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,j,I]);return h.jsxs(r,{...y(),children:[d||p?D:null,K]})});kI.displayName="HeroUI.Input";var yi=kI;function PI(){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,p]=x.useState(l.currentMsisdn??""),[m,g]=x.useState(),[b,y]=x.useState(),[v,C]=x.useState(!1),S=n1(),{width:k}=ha(),P=k>=1024,[E,I,j]=l.birthdate?l.birthdate.split("-"):[],[N,D]=x.useState(E??""),[M,V]=x.useState(I??""),[R,K]=x.useState(j??""),O=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:b4,imageUrl:void 0}],[S.length,L]),T=x.useCallback(()=>{d!==l.currentMsisdn&&(jc({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&&(jc({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(di,{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(li,{children:[h.jsx(ui,{children:e("numberPreservation.title")}),h.jsxs(si,{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(Hp,{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(iu,{value:"true",description:e("numberPreservation.keepCurrentNumber"),classNames:$,children:e("common.yes")}),h.jsx(iu,{value:"false",description:e("numberPreservation.newNumber"),classNames:$,children:e("common.no")})]}),l.keepCurrentMsisdn&&h.jsxs("div",{className:"mt-2",children:[h.jsx(xc,{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(Da,{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(yi,{variant:"bordered",placeholder:"0612345678",size:"lg",radius:"sm",autoComplete:"tel",type:"text",inputMode:"numeric",name:"msisdn",color:m?"danger":"default",value:d,onValueChange:H=>{p(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(Hp,{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(iu,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"subscription",children:e("numberPreservation.subscription")}),h.jsx(iu,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"prepaid",children:e("numberPreservation.prepaid")})]}),O&&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(yi,{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(yi,{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(yi,{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(zi,{children:h.jsx(hr,{className:A("font-medium",t?.submitButton),onPress:()=>{if(l.keepCurrentMsisdn&&!U)return g(e("numberPreservation.invalidNumber"));if(l.keepCurrentMsisdn&&O&&(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 EI(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 Fne=ft`
|
|
1317
|
+
`;function sh(e,t=!0){const{data:r}=Ko(t?[One,{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 SI({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(),p=e?"fixed":"mobile",m=sh(p),[g,b]=x.useState(!1),y=x.useMemo(()=>CI(m.fixedBlocks,p),[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(di,{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(li,{children:[h.jsx(ui,{children:t("combiDeal.title")}),h.jsxs(si,{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(zu,{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")})]}),p==="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(xc,{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(Da,{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))})]}),(p==="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(Wv,{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(Da,{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(zi,{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 jne(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:s="text",validationBehavior:a="aria"}=e,[l,c]=Oo(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Li(e,t),p=Yl({...e,value:l}),{isInvalid:m,validationErrors:g,validationDetails:b}=p.displayValidation,{labelProps:y,fieldProps:v,descriptionProps:C,errorMessageProps:S}=Cp({...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 I;return Zd(t,(I=e.defaultValue)!==null&&I!==void 0?I:E,c),kp(e,p,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:j=>c(j.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 Lne(e){var t,r,n,o,i,s,a;const l=ur(),{validationBehavior:c}=Jl(Ma)||{},[d,p]=qr(e,cC.variantKeys),{ref:m,as:g,type:b,label:y,baseRef:v,wrapperRef:C,description:S,className:k,classNames:P,autoFocus:E,startContent:I,endContent:j,onClear:N,onChange:D,validationState:M,validationBehavior:V=(t=c??l?.validationBehavior)!=null?t:"native",innerWrapperRef:R,onValueChange:K=()=>{},...O}=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]=Oo(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=!cs(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]);_a(()=>{T.current&&X(T.current.value)},[T.current]);const{labelProps:be,inputProps:re,isInvalid:ke,validationErrors:Ne,validationDetails:Me,descriptionProps:Pe,errorMessageProps:Ae}=jne({...e,validationBehavior:V,autoCapitalize:e.autoCapitalize,value:Y,"aria-label":e.label?e["aria-label"]:Cd(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}=Pa({onFocusWithinChange:W}),{pressProps:Xt}=xn({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:we}),sr=M==="invalid"||ke,Ct=x3({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",Ci=T.current?(!T.current.value||T.current.value===""||!Y||Y==="")&&_t:!1,hn=!!I,eo=Yr?ar||er||_t||Ct==="outside"&&hn:!1,Ur=Ct==="outside"&&!_t&&!hn,jt=x.useMemo(()=>cC({...p,isInvalid:sr,labelPlacement:Ct,isClearable:dr,disableAnimation:Z}),[jr(p),sr,Ct,dr,hn,Z]),Zi=x.useCallback((rt={})=>({ref:F,className:jt.base({class:pe}),"data-slot":"base","data-filled":ae(ue||_t||hn||Ci||oe),"data-filled-within":ae(te||_t||hn||Ci||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(!Ci),"data-hidden":ae(ge),...Jt,...rt}),[jt,pe,ue,Ie,wt,Ut,sr,It,tt,kr,Ci,hn,U,xe,te,_t,Jt,ge,e.isReadOnly,e.isRequired,e.isDisabled]),Xs=x.useCallback((rt={})=>({"data-slot":"label",className:jt.label({class:P?.label}),...Oe(be,ut,rt)}),[jt,Ut,be,P?.label]),Yo=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(!!j),"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(O,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(re))}),rt),"aria-readonly":ae(e.isReadOnly),onChange:uo(re.onChange,D),onKeyDown:uo(re.onKeyDown,rt.onKeyDown,Yo),ref:T}),[jt,Y,et,re,O,ue,te,hn,j,P?.input,e.isReadOnly,e.isRequired,D,Yo]),Jo=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:Xo=>{T.current&&Xo.currentTarget===Xo.target&&T.current.focus()},style:{cursor:"text",...rt.style}}),[jt,wt,Ut,xe,Ie,Y,P?.inputWrapper]),Si=x.useCallback((rt={})=>({...rt,ref:H,"data-slot":"inner-wrapper",onClick:Xo=>{T.current&&Xo.currentTarget===Xo.target&&T.current.focus()},className:jt.innerWrapper({class:A(P?.innerWrapper,rt?.className)})}),[jt,P?.innerWrapper]),Yi=x.useCallback((rt={})=>({...rt,"data-slot":"main-wrapper",className:jt.mainWrapper({class:A(P?.mainWrapper,rt?.className)})}),[jt,P?.mainWrapper]),Ja=x.useCallback((rt={})=>({...rt,"data-slot":"helper-wrapper",className:jt.helperWrapper({class:A(P?.helperWrapper,rt?.className)})}),[jt,P?.helperWrapper]),Xa=x.useCallback((rt={})=>({...rt,...Pe,"data-slot":"description",className:jt.description({class:A(P?.description,rt?.className)})}),[jt,P?.description]),Qs=x.useCallback((rt={})=>({...rt,...Ae,"data-slot":"error-message",className:jt.errorMessage({class:A(P?.errorMessage,rt?.className)})}),[jt,Ae,P?.errorMessage]),ki=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:I,endContent:j,labelPlacement:Ct,isClearable:dr,hasHelper:It,hasStartContent:hn,isLabelOutside:eo,isOutsideLeft:ar,isOutsideTop:er,isLabelOutsideAsPlaceholder:Ur,shouldLabelBeOutside:Yr,shouldLabelBeInside:en,hasPlaceholder:_t,isInvalid:sr,errorMessage:Sr,getBaseProps:Zi,getLabelProps:Xs,getInputProps:St,getMainWrapperProps:Yi,getInputWrapperProps:Jo,getInnerWrapperProps:Si,getHelperWrapperProps:Ja,getDescriptionProps:Xa,getErrorMessageProps:Qs,getClearButtonProps:ki}}var kI=Xe((e,t)=>{const{Component:r,label:n,description:o,isClearable:i,startContent:s,endContent:a,labelPlacement:l,hasHelper:c,isOutsideLeft:d,isOutsideTop:p,shouldLabelBeOutside:m,errorMessage:g,isInvalid:b,getBaseProps:y,getLabelProps:v,getInputProps:C,getInnerWrapperProps:S,getInputWrapperProps:k,getMainWrapperProps:P,getHelperWrapperProps:E,getDescriptionProps:I,getErrorMessageProps:j,getClearButtonProps:N}=Lne({...e,ref:t}),D=n?h.jsx("label",{...v(),children:n}):null,M=x.useMemo(()=>i?h.jsx("button",{...N(),children:a||h.jsx(rv,{})}):a,[i,N]),V=x.useMemo(()=>{const O=b&&g;return!c||!(O||o)?null:h.jsx("div",{...E(),children:O?h.jsx("div",{...j(),children:g}):h.jsx("div",{...I(),children:o})})},[c,b,g,o,E,j,I]),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&&!p?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,j,I]);return h.jsxs(r,{...y(),children:[d||p?D:null,K]})});kI.displayName="HeroUI.Input";var yi=kI;function PI(){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,p]=x.useState(l.currentMsisdn??""),[m,g]=x.useState(),[b,y]=x.useState(),[v,C]=x.useState(!1),S=n1(),{width:k}=ha(),P=k>=1024,[E,I,j]=l.birthdate?l.birthdate.split("-"):[],[N,D]=x.useState(E??""),[M,V]=x.useState(I??""),[R,K]=x.useState(j??""),O=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:b4,imageUrl:void 0}],[S.length,L]),T=x.useCallback(()=>{d!==l.currentMsisdn&&(jc({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&&(jc({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(di,{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(li,{children:[h.jsx(ui,{children:e("numberPreservation.title")}),h.jsxs(si,{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(Hp,{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(iu,{value:"true",description:e("numberPreservation.keepCurrentNumber"),classNames:$,children:e("common.yes")}),h.jsx(iu,{value:"false",description:e("numberPreservation.newNumber"),classNames:$,children:e("common.no")})]}),l.keepCurrentMsisdn&&h.jsxs("div",{className:"mt-2",children:[h.jsx(xc,{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(Da,{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(yi,{variant:"bordered",placeholder:"0612345678",size:"lg",radius:"sm",autoComplete:"tel",type:"text",inputMode:"numeric",name:"msisdn",color:m?"danger":"default",value:d,onValueChange:H=>{p(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(Hp,{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(iu,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"subscription",children:e("numberPreservation.subscription")}),h.jsx(iu,{className:A("min-w-1/2 text-sm",t?.radioGroup?.radio),value:"prepaid",children:e("numberPreservation.prepaid")})]}),O&&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(yi,{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(yi,{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(yi,{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(zi,{children:h.jsx(hr,{className:A("font-medium",t?.submitButton),onPress:()=>{if(l.keepCurrentMsisdn&&!U)return g(e("numberPreservation.invalidNumber"));if(l.keepCurrentMsisdn&&O&&(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 EI(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 Fne=dt`
|
|
1314
1318
|
query postcodeCheck($postcode: String!, $number: Int!, $numberAddon: String!) {
|
|
1315
1319
|
postcode(postcode: $postcode, number: $number, numberAddon: $numberAddon) {
|
|
1316
1320
|
address {
|
|
@@ -1319,7 +1323,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1319
1323
|
}
|
|
1320
1324
|
}
|
|
1321
1325
|
}
|
|
1322
|
-
`;function TI(e,t,r,n="",o=!1){const[i,s]=x.useState(o),a=np(t,500),l=np(r,500),c=np(n,500),{data:d,isValidating:p,error:m}=ap(a&&l?[Fne,{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(()=>{p||b(null)},[p]),Bo(()=>{if(!(p||!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}!p&&a&&l&&!m&&!d?.postcode?.address&&b(Ee.t("postcodeCheck.invalidAddressError"))}},[d,m,p,a,l]),{manual:i,isLoading:p&&!!a&&!!l,error:g}}function Bne(){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,p]=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),I=x.useRef(!!(r.address?.street&&r.address?.city)),j=sh("fixed"),{width:N}=ha(),D=N>=1024,M=x.useCallback(L=>{L.street!==void 0&&C(L.street),L.city!==void 0&&k(L.city)},[]);Bo(()=>{const L=r.address;p(L?.postcode||""),g(L?.number||""),y(L?.numberAddon||""),C(L?.street||""),k(L?.city||""),I.current=!!(L?.street&&L?.city)},[r.address]);const{manual:V,error:R}=TI(M,d,m,b,I.current);Bo(()=>{!V&&(!d||!m)&&(C(""),k(""))},[d,m,V]);const K=x.useMemo(()=>CI(j.fixedBlocks,"fixed"),[j.fixedBlocks.length]),O={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:$}=r1.safeParse(T);F&&(jc({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(di,{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(li,{children:[h.jsx(ui,{children:e("postcodeCheck.title")}),h.jsxs(si,{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(qm,{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(yi,{variant:"bordered",placeholder:"1234AB",radius:"sm",type:"text",inputMode:d.length<4?"numeric":"text",name:"postcode",autoComplete:"postal-code",value:d,onValueChange:L=>p(EI(L)),onFocus:W,classNames:O,maxLength:6,label:e("postcodeCheck.postalCode"),isRequired:!0}),h.jsx(yi,{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:O,label:e("postcodeCheck.houseNumber"),isRequired:!0}),h.jsx(yi,{variant:"bordered",placeholder:"A",radius:"sm",type:"text",name:"numberAddon",value:b,onValueChange:L=>y(L.toUpperCase()),onFocus:W,classNames:O,label:e("postcodeCheck.houseNumberAddition")})]}),R&&h.jsx(nu,{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(xc,{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(Da,{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(zi,{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 uu({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:qm,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:zu,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(fP,{color:"warning",content:"",shape:"circle",className:i?.badge,children:h.jsx(zl,{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 zne(e,t){return!e&&!t?"":t&&/^\d+$/.test(t)?`${e}/${t}`:`${e}${t??""}`}function Kne({street:e,city:t,number:r,numberAddon:n}){if(!(!e||!r||!t))return`${e} ${zne(r,n)}, ${t}`}function AI({isFixed:e=!1,showTitle:t=!0,showProfileBanner:r=!1}){const{t:n}=Je(),{profile:o}=sn(),{openModal:i}=Qt(),{profileButton:s}=vt(),a=n1(),l=sh(e?"fixed":"mobile"),c=gI(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(Kl,{title:n("profile.postcodeCheck"),description:o.address?Kne(o.address):n("profile.enterPostcode"),selected:o.address!==void 0,onClick:()=>i("postcode-check"),Icon:qm,classNames:s}):h.jsx(uu,{variant:"postcodeCheck",isFixed:!0}):!r||o.keepCurrentMsisdn!==void 0?h.jsx(Kl,{title:n("profile.numberPreservation"),description:mI(o,a),selected:o.keepCurrentMsisdn===!1||o.keepCurrentMsisdn&&!!o.currentProviderSlug,onClick:()=>i("number-preservation"),avatarName:"0 6",classNames:s}):h.jsx(uu,{variant:"numberPreservation"}),!r||(e?o.currentMobileProviders:o.currentFixedProviderScope)?h.jsx(Kl,{title:n("profile.customerBenefit"),description:hI(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(p=>p.scope===d.scope)):l.fixedBlocks.some(d=>d.scope===o.currentFixedProviderScope)||o.currentFixedProviderScope==="other",onClick:()=>i("combi-deal"),Icon:zu,classNames:s}):h.jsx(uu,{variant:"combiDeal",isFixed:e})]})]})}function Vne(){const{t:e}=Je(),[t,r]=x.useState(!1),{sortSelect:n}=vt(),{popoverContent:o,listbox:i,...s}=n||{},{sortOptions:a,handleFilterChange:l,getActiveFilterValue:c}=bi(),{popoverProps:d,isShadowRoot:p}=Zn({classNames:o});return p?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(xc,{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(Da,{variant:"flat",onClick:()=>{l({slug:"sorteren",value:m.value}),r(!1)},children:e(`sortOptions.${m.value}`,{defaultValue:m.name})},m.value))})}function Rne(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 o1(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 i1(e){switch(e){case Qn:return Ee.t("format.unlimited_short");case 0:return"-";default:return e}}function cu(e,t){const r=e.minutes!==0?`${i1(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"):`${i1(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 Fc(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 $I(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 Gs(e){const t=Fc(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","")} ${$I(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 s1=["kpn","vodafone","odido"],Wne=[{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)&&s1.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:s1.length,sortDirection:"asc"}];function a1({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?Une(e):[],fastestInternetPropositionKey:n},l=new Map;for(const m of Wne){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=[],p=new Set;for(const m of c){if(d.length>=3)break;if(o){if(p.has(m.provider.slug))continue;p.add(m.provider.slug)}d.push(m)}return{top:d,all:e.map(m=>({...m,label:l.get(m.key)}))}}function Une(e){return s1.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 Hne({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(Sj,{size:24,className:A("stroke-foreground",r?.hdIcon)})]})},o))})]})}function ah({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 _I({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(Wm,{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 II({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:p,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!==p,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,I=E?k:void 0,j=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(_I,{term:M,price:a[D+1]?.fee||0,classNames:t?.monthlyFeeTransition},N.term)}),C&&S&&p&&h.jsx(_I,{term:S,price:p,classNames:t?.lifetimeFee})]}),h.jsx(ah,{label:h.jsxs(h.Fragment,{children:[o.name," ",i.contractType==="retention"?`${r("detailsModal.renewal").toLowerCase()} `:"",Fc(i.contractTerm)]}),originalPrice:I,currentPrice:j,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,O=R?V:M,B=M!==0||typeof V=="number"&&V!==0;return h.jsx(ah,{label:N.displayName,originalPrice:K,currentPrice:O,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(ah,{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(ah,{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 l1=new WeakMap;function u1(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function qne(e,t){let r=l1.get(e);if(!r)throw new Error("Unknown grid");return`${r}-${u1(t)}`}function NI(e,t,r){let n=l1.get(e);if(!n)throw new Error("Unknown grid");return`${n}-${u1(t)}-${u1(r)}`}function DI(e,t){return[...e.collection.rowHeaderColumnKeys].map(r=>NI(e,t,r)).join(" ")}var MI={};MI={ascending:"تصاعدي",ascendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تصاعدي`,columnSize:e=>`${e.value} بالبكسل`,descending:"تنازلي",descendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var OI={};OI={ascending:"възходящ",ascendingSort:e=>`сортирано по колона ${e.columnName} във възходящ ред`,columnSize:e=>`${e.value} пиксела`,descending:"низходящ",descendingSort:e=>`сортирано по колона ${e.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var jI={};jI={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 LI={};LI={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 FI={};FI={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 BI={};BI={ascending:"αύξουσα",ascendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε αύξουσα σειρά`,columnSize:e=>`${e.value} pixel`,descending:"φθίνουσα",descendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var zI={};zI={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 KI={};KI={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 VI={};VI={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 RI={};RI={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 WI={};WI={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 UI={};UI={ascending:"עולה",ascendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר עולה`,columnSize:e=>`${e.value} פיקסלים`,descending:"יורד",descendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var HI={};HI={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 qI={};qI={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 GI={};GI={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 ZI={};ZI={ascending:"昇順",ascendingSort:e=>`列 ${e.columnName} を昇順で並べ替え`,columnSize:e=>`${e.value} ピクセル`,descending:"降順",descendingSort:e=>`列 ${e.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var YI={};YI={ascending:"오름차순",ascendingSort:e=>`${e.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:e=>`${e.value} 픽셀`,descending:"내림차순",descendingSort:e=>`${e.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var JI={};JI={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 XI={};XI={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 QI={};QI={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 eN={};eN={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 tN={};tN={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 rN={};rN={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 nN={};nN={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 oN={};oN={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 iN={};iN={ascending:"возрастание",ascendingSort:e=>`сортировать столбец ${e.columnName} в порядке возрастания`,columnSize:e=>`${e.value} пикс.`,descending:"убывание",descendingSort:e=>`сортировать столбец ${e.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var sN={};sN={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 aN={};aN={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 lN={};lN={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 uN={};uN={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 cN={};cN={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 dN={};dN={ascending:"висхідний",ascendingSort:e=>`відсортовано за стовпцем ${e.columnName} у висхідному порядку`,columnSize:e=>`${e.value} пікс.`,descending:"низхідний",descendingSort:e=>`відсортовано за стовпцем ${e.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var fN={};fN={ascending:"升序",ascendingSort:e=>`按列 ${e.columnName} 升序排序`,columnSize:e=>`${e.value} 像素`,descending:"降序",descendingSort:e=>`按列 ${e.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var pN={};pN={ascending:"遞增",ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:"遞減",descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var lh={};lh={"ar-AE":MI,"bg-BG":OI,"cs-CZ":jI,"da-DK":LI,"de-DE":FI,"el-GR":BI,"en-US":zI,"es-ES":KI,"et-EE":VI,"fi-FI":RI,"fr-FR":WI,"he-IL":UI,"hr-HR":HI,"hu-HU":qI,"it-IT":GI,"ja-JP":ZI,"ko-KR":YI,"lt-LT":JI,"lv-LV":XI,"nb-NO":QI,"nl-NL":eN,"pl-PL":tN,"pt-BR":rN,"pt-PT":nN,"ro-RO":oN,"ru-RU":iN,"sk-SK":sN,"sl-SI":aN,"sr-SP":lN,"sv-SE":uN,"tr-TR":cN,"uk-UA":dN,"zh-CN":fN,"zh-TW":pN};class hN{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=Ds(d))===null||n===void 0?void 0:n.key:(o=Vi(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 p=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?vc(p,r.index-1):vc(p,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=Vi(d))===null||n===void 0?void 0:n.key:(o=Ds(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 p=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?vc(p,r.index+1):vc(p,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=Vi(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=Vi(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=Ds(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=Ds(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 p=d.textValue.slice(0,t.length);if(this.collator.compare(p,t)===0){var l,c;return this.isRow(d)&&this.focusMode==="cell"?(c=(l=Vi(Qr(d,this.collection)))===null||l===void 0?void 0:l.key)!==null&&c!==void 0?c:null:d.key}}n=this.findNextKey(n,p=>p.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 Gne(t.layout):new Lv(t.ref));var r;this.focusMode=(r=t.focusMode)!==null&&r!==void 0?r:"row"}}class Gne{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 c1=new WeakMap;var mN={};mN={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 gN={};gN={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 bN={};bN={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 vN={};vN={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 yN={};yN={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 xN={};xN={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 wN={};wN={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 CN={};CN={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 SN={};SN={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 kN={};kN={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 PN={};PN={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 EN={};EN={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 TN={};TN={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 AN={};AN={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 $N={};$N={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 _N={};_N={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 IN={};IN={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 NN={};NN={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 DN={};DN={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 MN={};MN={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 ON={};ON={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 jN={};jN={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 LN={};LN={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 FN={};FN={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 BN={};BN={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 zN={};zN={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 KN={};KN={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 VN={};VN={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 RN={};RN={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 WN={};WN={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 UN={};UN={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 HN={};HN={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 qN={};qN={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 GN={};GN={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 uh={};uh={"ar-AE":mN,"bg-BG":gN,"cs-CZ":bN,"da-DK":vN,"de-DE":yN,"el-GR":xN,"en-US":wN,"es-ES":CN,"et-EE":SN,"fi-FI":kN,"fr-FR":PN,"he-IL":EN,"hr-HR":TN,"hu-HU":AN,"it-IT":$N,"ja-JP":_N,"ko-KR":IN,"lt-LT":NN,"lv-LV":DN,"nb-NO":MN,"nl-NL":ON,"pl-PL":jN,"pt-BR":LN,"pt-PT":FN,"ro-RO":BN,"ru-RU":zN,"sk-SK":KN,"sl-SI":VN,"sr-SP":RN,"sv-SE":WN,"tr-TR":UN,"uk-UA":HN,"zh-CN":qN,"zh-TW":GN};const ZN=7e3;let xi=null;function YN(e,t="assertive",r=ZN){xi?xi.announce(e,t,r):(xi=new Zne,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?xi.announce(e,t,r):setTimeout(()=>{xi?.isAttached()&&xi?.announce(e,t,r)},100))}class Zne{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=ZN){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 Yne(e){return e&&e.__esModule?e.default:e}function Jne(e,t){let{getRowText:r=a=>{var l,c,d,p;return(p=(l=(c=t.collection).getTextValue)===null||l===void 0?void 0:l.call(c,a))!==null&&p!==void 0?p:(d=t.collection.getItem(a))===null||d===void 0?void 0:d.textValue}}=e,n=ds(Yne(uh),"@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=JN(o,i.current),c=JN(i.current,o),d=t.selectionManager.selectionBehavior==="replace",p=[];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&&p.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&&p.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&&p.push(n.format("deselectedItem",{item:g}))}}t.selectionManager.selectionMode==="multiple"&&(p.length===0||o==="all"||o.size>1||i.current==="all"||((a=i.current)===null||a===void 0?void 0:a.size)>1)&&p.push(o==="all"?n.format("selectedAll"):n.format("selectedCount",{count:o.size})),p.length>0&&YN(p.join(" ")),i.current=o},[o,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,r,n]);M4(()=>{if(t.selectionManager.isFocused)s();else{let a=requestAnimationFrame(s);return()=>cancelAnimationFrame(a)}},[o,t.selectionManager.isFocused])}function JN(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 Xne(e){return e&&e.__esModule?e.default:e}function Qne(e){let t=ds(Xne(uh),"@react-aria/grid"),r=yV(),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 qd(o)}function eoe(e,t,r){let{isVirtualized:n,disallowTypeAhead:o,keyboardDelegate:i,focusMode:s,scrollRef:a,getRowText:l,onRowAction:c,onCellAction:d,escapeKeyBehavior:p="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=Xd({usage:"search",sensitivity:"base"}),{direction:y}=jn(),v=t.selectionManager.disabledBehavior,C=x.useMemo(()=>i||new hN({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}=jv({ref:r,selectionManager:g,keyboardDelegate:C,isVirtualized:n,scrollRef:a,disallowTypeAhead:o,escapeKeyBehavior:p}),k=rn(e.id);c1.set(t,{keyboardDelegate:C,actions:{onRowAction:c,onCellAction:d},shouldSelectOnPressUp:m});let P=Qne({selectionManager:g,hasItemActions:!!(c||d)}),E=Ln(e,{labelable:!0}),I=x.useCallback(M=>{if(g.isFocused){M.currentTarget.contains(M.target)||g.setFocused(!1);return}M.currentTarget.contains(M.target)&&g.setFocused(!0)},[g]),j=x.useMemo(()=>({onBlur:S.onBlur,onFocus:I}),[I,S.onBlur]),N=Ek(r,{isDisabled:t.collection.size!==0}),D=it(E,{role:"grid",id:k,"aria-multiselectable":g.selectionMode==="multiple"?"true":void 0},t.isKeyboardNavigationDisabled?j: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),Jne({getRowText:l},t),{gridProps:D}}function toe(){return{rowGroupProps:{role:"rowgroup"}}}function roe(e,t,r){var n,o;let{node:i,isVirtualized:s,shouldSelectOnPressUp:a,onAction:l}=e,{actions:c,shouldSelectOnPressUp:d}=c1.get(t),p=c.onRowAction?()=>{var v;return(v=c.onRowAction)===null||v===void 0?void 0:v.call(c,i.key)}:l,{itemProps:m,...g}=gp({selectionManager:t.selectionManager,key:i.key,ref:r,isVirtualized:s,shouldSelectOnPressUp:d||a,onAction:p||!(i==null||(n=i.props)===null||n===void 0)&&n.onAction?fs(i==null||(o=i.props)===null||o===void 0?void 0:o.onAction,p):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 XN(e,t,r){let{node:n,isVirtualized:o,focusMode:i="child",shouldSelectOnPressUp:s,onAction:a}=e,{direction:l}=jn(),{keyboardDelegate:c,actions:{onCellAction:d}}=c1.get(t),p=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"?d1(k):k.firstChild();if(P){wn(P);return}}(p.current!=null&&n.key!==p.current||!r.current.contains(document.activeElement))&&wn(r.current)}},{itemProps:g,isPressed:b}=gp({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),gs(M,{containingElement:ms(r.current)});else{var E;if(((E=c.getKeyLeftOf)===null||E===void 0?void 0:E.call(c,n.key))!==n.key){var I;(I=r.current.parentElement)===null||I===void 0||I.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent));break}i==="cell"&&l==="rtl"?(wn(r.current),gs(r.current,{containingElement:ms(r.current)})):(P.currentNode=r.current,M=l==="rtl"?P.firstChild():d1(P),M&&(wn(M),gs(M,{containingElement:ms(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),gs(M,{containingElement:ms(r.current)});else{var j;if(((j=c.getKeyRightOf)===null||j===void 0?void 0:j.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),gs(r.current,{containingElement:ms(r.current)})):(P.currentNode=r.current,M=l==="rtl"?d1(P):P.firstChild(),M&&(wn(M),gs(M,{containingElement:ms(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(p.current=n.key,k.target!==r.current){Ol()||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 d1(e){let t=null,r=null;do r=e.lastChild(),r&&(t=r);while(r);return t}function noe(e){return e&&e.__esModule?e.default:e}function ooe(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=ds(noe(uh),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":l.format("select"),isSelected:s,isDisabled:i,onChange:a}}}class ioe extends hN{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=Vi(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 p=c.textValue.slice(0,t.length);if(this.collator.compare(p,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 soe(e){return e&&e.__esModule?e.default:e}function aoe(e,t,r){let{keyboardDelegate:n,isVirtualized:o,layoutDelegate:i,layout:s}=e,a=Xd({usage:"search",sensitivity:"base"}),{direction:l}=jn(),c=t.selectionManager.disabledBehavior,d=x.useMemo(()=>n||new ioe({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]),p=rn(e.id);l1.set(t,p);let{gridProps:m}=eoe({...e,id:p,keyboardDelegate:d},t,r);o&&(m["aria-rowcount"]=t.collection.size+t.collection.headerRows.length),Od()&&"expandedKeys"in t&&(m.role="treegrid");let{column:g,direction:b}=t.sortDescriptor||{},y=ds(soe(lh),"@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=qd(v);return M4(()=>{v&&YN(v,"assertive",500)},[v]),{gridProps:it(m,C,{"aria-describedby":[C["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")})}}function loe(e){return e&&e.__esModule?e.default:e}function QN(e,t,r){var n,o;let{node:i}=e,s=i.props.allowsSorting,{gridCellProps:a}=XN({...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:p}=Li({},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&&!Wu()&&(m=g?b:"none");let y=ds(loe(lh),"@react-aria/table"),v;s&&(v=`${y.format("sortable")}`,g&&b&&Wu()&&(v=`${v}, ${y.format(b)}`));let C=qd(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(p,a,c,C,S?{tabIndex:-1}:null),role:"columnheader",id:qne(t,i.key),"aria-colspan":i.colSpan&&i.colSpan>1?i.colSpan:void 0,"aria-sort":m},isPressed:d}}const eD={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function uoe(e,t,r){let{node:n,isVirtualized:o}=e,{rowProps:i,...s}=roe(e,t,r),{direction:a}=jn();o&&!(Od()&&"expandedKeys"in t)?i["aria-rowindex"]=n.index+1+t.collection.headerRows.length:delete i["aria-rowindex"];let l={};if(Od()&&"expandedKeys"in t){let E=t.keyMap.get(n.key);if(E!=null){var c,d,p,m,g,b;let I=((c=E.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((p=E.props)===null||p===void 0||(d=p.children)===null||d===void 0?void 0:d.length)>t.userColumnCount;var y,v,C,S;l={onKeyDown:j=>{(j.key===eD.expand[a]&&t.selectionManager.focusedKey===E.key&&I&&t.expandedKeys!=="all"&&!t.expandedKeys.has(E.key)||j.key===eD.collapse[a]&&t.selectionManager.focusedKey===E.key&&I&&(t.expandedKeys==="all"||t.expandedKeys.has(E.key)))&&(t.toggleKey(E.key),j.stopPropagation())},"aria-expanded":I?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=Ds((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=Ds(t.collection.body.childNodes))===null||b===void 0?void 0:b.indexOfType)!==null&&S!==void 0?S:0)+1}}}let k=NL(n.props),P=s.hasAction?k:{};return{rowProps:{...it(i,l,P),"aria-labelledby":DI(t,n.key)},...s}}function coe(e,t,r){let{node:n,isVirtualized:o}=e,i={role:"row"};return o&&!(Od()&&"expandedKeys"in t)&&(i["aria-rowindex"]=n.index+1),{rowProps:i}}function tD(e,t,r){var n;let{gridCellProps:o,isPressed:i}=XN(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=NI(t,e.node.parentKey,s)),{gridCellProps:o,isPressed:i}}function doe(e){return e&&e.__esModule?e.default:e}function foe(e,t){let{key:r}=e;const{checkboxProps:n}=ooe(e,t);return{checkboxProps:{...n,"aria-labelledby":`${n.id} ${DI(t,r)}`}}}function poe(e){let{isEmpty:t,isSelectAll:r,selectionMode:n}=e.selectionManager;return{checkboxProps:{"aria-label":ds(doe(lh),"@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 f1(){return toe()}var rD=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,slots:a,state:l,selectionMode:c,color:d,checkboxesProps:p,disableAnimation:m,classNames:g,...b}=e,y=o||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=QN({node:s},l,C),{isFocusVisible:k,focusProps:P}=Ir(),{checkboxProps:E}=poe(l),I=A(g?.th,i,(r=s.props)==null?void 0:r.className),j=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:I}),children:j?h.jsx(jl,{children:E["aria-label"]}):h.jsx(qp,{color:d,disableAnimation:m,onValueChange:N,...Oe(p,D)})})});rD.displayName="HeroUI.TableSelectAllCheckbox";var nD=rD;function hoe(e){let{collection:t,focusMode:r}=e,n=e.UNSAFE_selectionState||LE(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,p;let y=Qr(b,t);var m,g;c==="last"?l=(m=(d=Ds(y))===null||d===void 0?void 0:d.key)!==null&&m!==void 0?m:null:l=(g=(p=Vi(y))===null||p===void 0?void 0:p.key)!==null&&g!==void 0?g:null}}i(l,c)};let s=x.useMemo(()=>new yp(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,p=t.rows,m=d.length-p.length;let g=Math.min(m>1?Math.max(c.index-m+1,0):c.index,p.length-1),b=null;for(;g>=0;){if(!s.isDisabled(p[g].key)&&p[g].type!=="headerrow"){b=p[g];break}g<p.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 moe{*[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=p=>{let m=this.keyMap.get(p.key);t.visitNode&&(p=t.visitNode(p)),this.keyMap.set(p.key,p);let g=new Set,b=null,y=!1;if(p.type==="item"){var v;for(let E of p.childNodes)if(((v=E.props)===null||v===void 0?void 0:v.colSpan)!==void 0){y=!0;break}}for(let E of p.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=p.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=p=>{this.keyMap.delete(p.key);for(let m of p.childNodes)this.keyMap.get(m.key)===m&&n(m)},o=null;for(let[p,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-"+p,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:p};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 oD="row-header-column-"+Math.random().toString(36).slice(2);let p1="row-header-column-"+Math.random().toString(36).slice(2);for(;oD===p1;)p1="row-header-column-"+Math.random().toString(36).slice(2);function goe(e,t){if(t.length===0)return[];let r=[],n=new Map;for(let d of t){let p=d.parentKey,m=[d];for(;p;){let g=e.get(p);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});p=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 p=s-1;for(let m of d){if(m){let g=a[p],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:p,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=p,m.colIndex=l,g.push(m)}p--}l++}let c=0;for(let d of a){let p=d.reduce((m,g)=>{var b;return m+((b=g.colSpan)!==null&&b!==void 0?b:1)},0);if(p<t.length){let m={type:"placeholder",key:"placeholder-"+d[d.length-1].key,colSpan:t.length-p,colspan:t.length-p,index:p,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:"",prevKey:d[d.length-1].key};d.push(m)}c++}return a.map((d,p)=>({type:"headerrow",key:"headerrow-"+p,index:p,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:d,textValue:""}))}class boe extends moe{*[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=Vi(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&r!==void 0?r:null}getLastKey(){var t,r;return(r=(t=Ds(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 p={type:"column",key:oD,value:null,textValue:"",level:0,index:n?.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};s.unshift(p)}if(n?.showDragButtons){let p={type:"column",key:p1,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};s.unshift(p)}let a=[],l=new Map,c=p=>{switch(p.type){case"body":i=p;break;case"column":l.set(p.key,p),p.hasChildNodes||(s.push(p),p.props.isRowHeader&&o.add(p.key));break;case"item":a.push(p);return}for(let m of p.childNodes)c(m)};for(let p of t)c(p);let d=goe(l,s);if(d.forEach((p,m)=>a.splice(m,0,p)),super({columnCount:s.length,items:a,visitNode:p=>(p.column=s[p.index],p)}),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 p=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)});p&&this.rowHeaderColumnKeys.add(p.key)}}}const voe={ascending:"descending",descending:"ascending"};function yoe(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=VE(e,x.useCallback(p=>new boe(p,null,s),[s]),s),{disabledKeys:l,selectionManager:c}=hoe({...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(p,m){var g,b;(b=e.onSortChange)===null||b===void 0||b.call(e,{column:p,direction:m??(((g=e.sortDescriptor)===null||g===void 0?void 0:g.column)===p?voe[e.sortDescriptor.direction]:"ascending")})}}}function iD(e){return null}iD.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 xoe=iD;function sD(e){return null}sD.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 woe=sD;function aD(e){return null}aD.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,p=>{d.push({type:"column",element:p})}),yield*d}},shouldInvalidate(d){return c(d),!1}},c=d=>{for(let p of l)p.hasChildNodes||d.columns.push(p)};c(r)};let Coe=aD;function h1(e){return null}h1.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===h1){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 Soe=h1;function lD(e){return null}lD.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 koe=lD;function uD(e){var t;const r=ur(),[n,o]=qr(e,fC.variantKeys),{ref:i,as:s,baseRef:a,children:l,className:c,classNames:d,removeWrapper:p=!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:I,bottomContent:j,sortIcon:N,onRowAction:D,onCellAction:M,...V}=n,R=s||"table",K=typeof R=="string",O=ot(i),B=ot(a),U=yoe({...e,children:l,showSelectionCheckboxes:k});g&&!U.isKeyboardNavigationDisabled&&U.setKeyboardNavigationDisabled(!0);const{collection:W}=U,{layout:L,...Z}=e,{gridProps:T}=aoe({...Z},U,O),F=b!=="none",$=b==="multiple",H=x.useMemo(()=>fC({...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:O,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:I,bottomContent:j,removeWrapper:p,topContentPlacement:y,bottomContentPlacement:v,sortIcon:N,getBaseProps:oe,getWrapperProps:Q,getTableProps:le}}var cD=Xe((e,t)=>{var r,n,o;const{as:i,className:s,node:a,rowKey:l,slots:c,state:d,classNames:p,...m}=e,g=i||"td",b=typeof g=="string",y=ot(t),{gridCellProps:v}=tD({node:a},d,y),C=A(p?.td,s,(r=a.props)==null?void 0:r.className),{isFocusVisible:S,focusProps:k}=Ir(),P=d.selectionManager.isSelected(l),E=x.useMemo(()=>{const j=typeof a.rendered;return j!=="object"&&j!=="function"?h.jsx("span",{children:a.rendered}):a.rendered},[a.rendered]),I=((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:I.align,class:C}),children:E})});cD.displayName="HeroUI.TableCell";var dD=cD,fD=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,rowKey:a,slots:l,state:c,color:d,disableAnimation:p,checkboxesProps:m,selectionMode:g,classNames:b,...y}=e,v=o||"td",C=typeof v=="string",S=ot(t),{gridCellProps:k}=tD({node:s},c,S),{isFocusVisible:P,focusProps:E}=Ir(),{checkboxProps:I}=foe({key:s?.parentKey||s.key},c),j=A(b?.td,i,(r=s.props)==null?void 0:r.className),N=g==="single",{onChange:D,...M}=I,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:j}),children:N?h.jsx(jl,{children:I["aria-label"]}):h.jsx(qp,{color:d,disableAnimation:p,onValueChange:D,...Oe(m,M)})})});fD.displayName="HeroUI.TableCheckboxCell";var pD=fD,hD=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,state:c,isSelectable:d,classNames:p,...m}=e,g=o||(e?.href?"a":"tr"),b=typeof g=="string",y=ot(t),{rowProps:v}=uoe({node:a},c,y),C=A(p?.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:I,hoverProps:j}=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(),O=!R&&!K,B=a?.index?(a.index+1)%2===0:!1;return{isFirst:R,isLast:K,isMiddle:O,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(I),"data-last":ae(D),"data-middle":ae(M),"data-odd":ae(V),"data-selected":ae(E),...Oe(v,k,d?j:{},Lt(a.props,{enabled:b}),m),className:(n=l.tr)==null?void 0:n.call(l,{class:C}),children:s})});hD.displayName="HeroUI.TableRow";var mD=hD,gD=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:p,selectionMode:m,classNames:g,rowVirtualizer:b,...y}=e,v=n||"tbody",C=typeof v=="string",S=ot(t),{rowGroupProps:k}=f1(),P=A(g?.tbody,o),E=a?.body.props,I=E?.isLoading||E?.loadingState==="loading"||E?.loadingState==="loadingMore",j=[...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:!I&&E.emptyContent})})),I&&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(I),children:[N.map((V,R)=>{const K=j[V.index];return K?h.jsx(mD,{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(O=>O.props.isSelectionCell?h.jsx(pD,{checkboxesProps:p,classNames:g,color:c,disableAnimation:d,node:O,rowKey:K.key,selectionMode:m,slots:i,state:s},String(O.key)):h.jsx(dD,{classNames:g,node:O,rowKey:K.key,slots:i,state:s},String(O.key)))},String(K.key)):null}),M,D]})});gD.displayName="HeroUI.VirtualizedTableBody";var Poe=gD,m1=e=>typeof e=="number"?`${e}px`:e,bD=Xe((e,t)=>{var r,n,o,i,s;const{as:a,className:l,state:c,node:d,slots:p,classNames:m,sortIcon:g,...b}=e,y=a||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=QN({node:d},c,C),k=A(m?.th,l,(r=d.props)==null?void 0:r.className),{isFocusVisible:P,focusProps:E}=Ir(),{isHovered:I,hoverProps:j}=dn({}),{hideHeader:N,align:D,width:M,minWidth:V,maxWidth:R,...K}=d.props,O=K.allowsSorting,B={};M&&(B.width=m1(M)),V&&(B.minWidth=m1(V)),R&&(B.maxWidth=m1(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=p.sortIcon)==null?void 0:i.call(p,{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(I),"data-sortable":ae(O),style:B,...Oe(S,E,Lt(K,{enabled:v}),O?j:{},b),className:(s=p.th)==null?void 0:s.call(p,{align:D,class:k}),children:[N?h.jsx(jl,{children:d.rendered}):d.rendered,O&&(W||h.jsx(_P,{strokeWidth:3,...U}))]})});bD.displayName="HeroUI.TableColumnHeader";var vD=bD,yD=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,classNames:c,state:d,...p}=e,m=o||"tr",g=typeof m=="string",b=ot(t),{rowProps:y}=coe({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}),p),className:(n=l.tr)==null?void 0:n.call(l,{class:v}),children:s})});yD.displayName="HeroUI.TableHeaderRow";var xD=yD,wD=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:p}=f1(),m=A(a?.thead,o);return h.jsx(c,{ref:d,className:(r=s.thead)==null?void 0:r.call(s,{class:m}),...Oe(p,l),children:i})});wD.displayName="HeroUI.TableRowGroup";var CD=wD,SD=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,getBaseProps:d,getWrapperProps:p,getTableProps:m}=uD({...e,ref:t}),{rowHeight:g=40,maxTableHeight:b=600}=e,y=x.useCallback(({children:N})=>h.jsx(r,{...p(),ref:S,style:{height:b,display:"block"},children:N}),[p,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 I=rT({count:C,getScrollElement:()=>S.current,estimateSize:()=>g,overscan:5}),j=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,{...j,style:{height:`calc(${I.getTotalSize()+k}px)`,...j.style},children:[h.jsx(CD,{ref:E,classNames:i.classNames,slots:i.slots,children:o.headerRows.map(N=>h.jsx(xD,{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(nD,{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(vD,{classNames:i.classNames,node:D,slots:i.slots,state:i.state},D?.key)})},N?.key))}),h.jsx(Poe,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,collection:i.collection,color:i.color,disableAnimation:i.disableAnimation,isSelectable:i.isSelectable,rowVirtualizer:I,selectionMode:i.selectionMode,slots:i.slots,state:i.state})]}),l==="inside"&&c]})}),l==="outside"&&c]})});SD.displayName="HeroUI.VirtualizedTable";var Eoe=SD,kD=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:p,selectionMode:m,classNames:g,...b}=e,y=n||"tbody",v=typeof y=="string",C=ot(t),{rowGroupProps:S}=f1(),k=A(g?.tbody,o),P=a?.body.props,E=P?.isLoading||P?.loadingState==="loading"||P?.loadingState==="loadingMore",I=x.useMemo(()=>[...a.body.childNodes].map(D=>h.jsx(mD,{classNames:g,isSelectable:l,node:D,slots:i,state:s,children:[...D.childNodes].map(M=>M.props.isSelectionCell?h.jsx(pD,{checkboxesProps:p,classNames:g,color:c,disableAnimation:d,node:M,rowKey:D.key,selectionMode:m,slots:i,state:s},M.key):h.jsx(dD,{classNames:g,node:M,rowKey:D.key,slots:i,state:s},M.key))},D.key)),[a.body.childNodes,g,l,i,s]);let j,N;return a.size===0&&P.emptyContent&&(j=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}),!j&&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:[I,N,j]})});kD.displayName="HeroUI.TableBody";var Toe=kD,PD=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,removeWrapper:d,sortIcon:p,getBaseProps:m,getWrapperProps:g,getTableProps:b}=uD({...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(Eoe,{...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(CD,{classNames:i.classNames,slots:i.slots,children:o.headerRows.map(P=>h.jsx(xD,{classNames:i.classNames,node:P,slots:i.slots,state:i.state,children:[...P.childNodes].map(E=>{var I;return(I=E?.props)!=null&&I.isSelectionCell?h.jsx(nD,{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(vD,{classNames:i.classNames,node:E,slots:i.slots,sortIcon:p,state:i.state},E?.key)})},P?.key))}),h.jsx(Toe,{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]})});PD.displayName="HeroUI.Table";var ch=PD,Aoe=Coe,$n=Aoe,$oe=xoe,dh=$oe,_oe=Soe,fh=_oe,Ioe=woe,ph=Ioe,Noe=koe,_n=Noe;function wi({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(ch,{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(dh,{children:[h.jsx($n,{children:"Label"}),h.jsx($n,{children:"Waarde"})]}),h.jsx(ph,{children:t.map(n=>h.jsxs(fh,{children:[h.jsx(_n,{children:n.label}),h.jsx(_n,{children:n.value})]},n.key))})]})]})}function Doe({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:`${Fc(e.planVariant.contractTerm)}${e.planVariant.contractTerm===1?` ${n("detailsModal.contractTermTerminable")}`:""}`,key:"duration"}]:[{label:n("detailsModal.contractTerm"),value:`${Fc(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:$I(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(ma,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(wi,{title:n("detailsModal.network"),rows:s,classNames:t}),h.jsx(wi,{title:e.productType==="fixed"?n("detailsModal.subscription"):n("detailsModal.bundle"),rows:a,classNames:t}),h.jsx(wi,{title:n("detailsModal.bundleSpeed"),rows:l,classNames:t}),e.productType==="fixed"&&h.jsx(wi,{title:n("detailsModal.termsAndConditions"),rows:c,classNames:t})]})}function ED({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(Zv,{orientation:"horizontal",hideScrollBar:!0,children:[h.jsxs(ch,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o(),children:[h.jsxs(dh,{children:[h.jsx($n,{children:t("creditInfo.totalDeviceCost")}),h.jsx($n,{children:t("creditInfo.oneTimeFee")}),h.jsx($n,{children:t("creditInfo.totalCreditAmount")})]}),h.jsx(ph,{children:h.jsxs(fh,{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(ch,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o("mt-4"),children:[h.jsxs(dh,{children:[h.jsx($n,{children:t("creditInfo.monthlyPayment")}),h.jsx($n,{children:t("creditInfo.contractTerm")}),h.jsx($n,{children:t("creditInfo.fixedInterest")})]}),h.jsx(ph,{children:h.jsxs(fh,{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(t4,{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 Moe(e,t){return e===0?Ee.t("format.firstMonth",{count:t}):Ee.t("format.thenMonth",{count:t})}function ko({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 TD({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 Ooe({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:p,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(TD,{icon:h.jsx(p4,{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(ko,{label:`${r("format.monthly")} ${k} x ${Ve(S,{symbol:"€"})}`,price:Ve(S*k),classNames:v?.monthlyFee},`${k}-${S}`))}),s!==0&&h.jsx(ko,{label:r("format.oneTime"),price:Ve(s),classNames:v?.oneTimeFee}),h.jsx(ko,{label:`${o.name} ${r("detailsModal.activationFee")}`,price:Ve(m),classNames:v?.activationFee}),n==="fixed"&&h.jsx(ko,{label:`${o.name} ${r("detailsModal.installationFee")}`,price:Ve(y),classNames:v?.installationFee}),g!==0&&h.jsx(ko,{label:r("detailsModal.cashback"),price:`-${Ve(g)}`,classNames:v?.cashback}),p!==0&&h.jsx(ko,{label:r("detailsModal.cashback"),price:Ve(p),classNames:v?.cashback}),h.jsx(ql,{orientation:"horizontal",className:A("my-3",v?.separator)}),h.jsx(ko,{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(TD,{icon:h.jsx(zu,{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(ko,{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(ko,{label:r("detailsModal.priceWithSubscription"),price:Ve(c*k+s),classNames:C?.priceWithSubscription}),h.jsx(ko,{label:h.jsxs(h.Fragment,{children:[P===i.length-1?r("detailsModal.deviceBundle"):Moe(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(ko,{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(ko,{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(ED,{proposition:e})]})]})}function joe({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,p=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(wi,{title:o("detailsModal.internet"),rows:k,classNames:t}),P.length>0&&h.jsx(wi,{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?`${p} ${b} ${m}`:p,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(ma,{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(ma,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(wi,{title:o("detailsModal.outsideBundle"),rows:y,classNames:t}),h.jsx(wi,{title:o("detailsModal.subscriptionFlexibility"),rows:v,classNames:t}),h.jsx(wi,{title:o("detailsModal.abroad"),rows:C,classNames:t}),h.jsx(wi,{title:o("detailsModal.termsAndConditions"),rows:S,classNames:t})]})}function Loe(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 Bc({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:p,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(di,{isOpen:p("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(li,{children:[h.jsx(ui,{children:h.jsx("span",{children:n("detailsModal.title")})}),h.jsxs(si,{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:Loe(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:[i1(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(HE,{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(Hl,{title:n("detailsModal.general"),onClick:()=>d("general"),children:h.jsx(Doe,{proposition:e,classNames:s?.general,buildClickOutUrl:r})},"general"),h.jsx(Hl,{title:e.productType==="fixed"?n("detailsModal.bundles"):n("detailsModal.conditions"),onClick:()=>d("conditions"),children:h.jsx(joe,{proposition:e,classNames:s?.terms,onChannelsClick:()=>d("channels"),buildClickOutUrl:r})},"conditions"),e.productType==="fixed"&&h.jsx(Hl,{title:n("detailsModal.channels"),onClick:()=>d("channels"),children:h.jsx(Hne,{channels:e.content.channels,hdChannels:e.content.hdChannels,classNames:s?.channels})},"channels"),h.jsx(Hl,{title:n("detailsModal.costs"),onClick:()=>d("costs"),children:h.jsxs("div",{className:A(s?.costOverview?.base),children:[h.jsx(II,{proposition:e,classNames:s?.costOverview}),h.jsx(Ooe,{proposition:e,classNames:s?.costOverview?.propositionOverview})]})},"costs")]})]})]})})}function AD({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 $D({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 _D({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($D,{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 ID({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(p4,{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 hh({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(Kx,{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,p)=>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(Tj,{size:20,className:A("shrink-0 text-success-600",o?.promotionIcon)}),h.jsxs("span",{children:[typeof d=="object"?d.shortDescription:d,r&&t&&p===0&&h.jsx(Kx,{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(di,{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(li,{children:[h.jsx(ui,{children:s?.publicTitle??""}),h.jsx(si,{children:h.jsx(O_,{children:s?.slideOutDescription??""})}),h.jsx(zi,{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 Foe({slug:e,size:t=16,className:r}){switch(e){case"contract-term":return h.jsx(Aj,{size:t,className:r});case"data-speed-down":return h.jsx(_j,{size:t,className:r});case"provider-network":return h.jsx(kj,{size:t,className:r});case"data-eu":return h.jsx(Dj,{size:t,className:r});case"internet-speed":return h.jsx(f4,{size:t,className:r});case"channels":return h.jsx(h4,{size:t,className:r});case"tv-receiver":return h.jsx($j,{size:t,className:r});default:return null}}function ND({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(Foe,{slug:n.slug,className:A(t?.icon)}),h.jsx("span",{children:n.title})]},n.title))})}function g1({productTitle:e,propositionTitle:t,propositionSubtitle:r,imageUrl:n,imageAlt:o,hasProduct:i,horizontal:s,propositionSpecifications:a,onInfoClick:l,classNames:c,imageWidth:d=70,imageHeight:p=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(ND,{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:p,src:m(n,d,p),srcSet:g(n,d,p),width:d,classNames:{wrapper:A("flex shrink-0",c?.phone?.providerImageWrapper),img:A("aspect-2/1",c?.phone?.providerImage)}})]}),!i&&h.jsx(ND,{propositionSpecifications:a,classNames:c?.proposition?.specifications,onInfoClick:l})]})}function DD({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:p,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),I=!!(n&&o&&i);return h.jsxs(Ms,{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(_D,{horizontal:!0,hasProduct:I,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(g1,{horizontal:!0,hasProduct:I,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:I?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(hh,{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(ID,{horizontal:!0,monthlyFeePromotionText:y,productPrice:S,monthlyFee:p,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(ma,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function Boe({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(AD,{label:e,classNames:{wrapper:r?.label?.wrapper,text:A("w-max",r?.label?.text)}}),h.jsx(DD,{classNames:r,...t})]}):h.jsx(DD,{classNames:r,...t})}function MD({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:p,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),I=!!(n&&o&&i);return h.jsxs(Ms,{as:"div",isDisabled:r,disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("@container h-full",P?.card),children:[h.jsx(Eq,{className:A("p-3 pt-6 @xs:px-6",P?.verticalCard?.header),children:h.jsx(_D,{hasProduct:I,productImageUrl:o,productImageAlt:i,productStockStatus:C,propositionImageUrl:l,propositionImageAlt:c,classNames:P?.mainImage})}),h.jsxs(iT,{className:A("py-0 px-3 @xs:px-6 gap-2 overflow-hidden",P?.verticalCard?.body),children:[h.jsx(g1,{hasProduct:I,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:I?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(hh,{promotions:[...g,...b],urgentText:v,classNames:P?.promotionList})]}),h.jsx(ql,{className:A("mt-3",P?.verticalCard?.divider)}),h.jsxs(Pq,{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(ID,{monthlyFeePromotionText:y,productPrice:S,monthlyFee:p,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(ma,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function zoe({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(AD,{label:e,classNames:r?.label}),h.jsx(MD,{classNames:r,...t})]}):h.jsx(MD,{classNames:r,...t})}function qa({horizontal:e,...t}){return e?h.jsx(Boe,{...t}):h.jsx(zoe,{...t})}function b1(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 Zs(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 OD(e){return e.sort((t,r)=>{if(Zs(t)&&Zs(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 Zs(t)&&!Zs(r)?-1:Zs(r)&&!Zs(t)?1:r.weight-t.weight})}function Ga(e){const t=OD(e.specialPromotions.filter(l=>l.shortDescription&&!l.shortDescription.includes("toestelkorting")&&l.weight>200)),r=Zs(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 Ys(e){const t=e.filter(n=>Zs(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 Koe(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 p=[i?`${i}:1`:void 0,...s?s.map(m=>`${m.scope}:${m.value}`):[]].filter(Boolean).join(",");l.set("klantvoordeel",p)}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 zc({addClickoutSearchParams:e}){const{profile:t}=sn();async function r(n,o){const i=await Cne();return Koe(n,t,i,s=>(o?.(s),e?e(s):s))}return{buildClickOutUrl:r}}function mh({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(Pj,{size:20}),children:o(r?"productResults.loadMore":"productResults.showMoreOffers")})}function Voe({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 Roe({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(Voe,{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," ",Rne(e.number,e.numberAddon),", ",e.city]})]})]})}function gh(){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(e6,{className:"mb-6 lg:hidden"}),h.jsx(nu,{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 Za({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 Woe=void 0,v1=Object,jD=e=>e===Woe,Uoe=e=>typeof e=="function",bh=new WeakMap,Hoe=e=>v1.prototype.toString.call(e),y1=(e,t)=>e===`[object ${t}]`;let qoe=0;const x1=e=>{const t=typeof e,r=Hoe(e),n=y1(r,"Date"),o=y1(r,"RegExp"),i=y1(r,"Object");let s,a;if(v1(e)===e&&!n&&!o){if(s=bh.get(e),s)return s;if(s=++qoe+"~",bh.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=x1(e[a])+",";bh.set(e,s)}if(i){s="#";const l=v1.keys(e).sort();for(;!jD(a=l.pop());)jD(e[a])||(s+=a+":"+x1(e[a])+",");bh.set(e,s)}}else s=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},Goe=e=>{if(Uoe(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?x1(e):"",[e,t]},Zoe=e=>Goe(e?e(0,null):null)[0],w1=Promise.resolve(),vh=JP(ap,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:p=!1}=n,[,,,m]=fi.get(gv);let g;try{g=Zoe(t),g&&(g=GP+g)}catch{}const[b,y,v]=Ns(i,g),C=x.useCallback(()=>mt(b()._l)?s:b()._l,[i,g,s]);Md.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());ip(()=>{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]=Ns(i,N),O=K().data,B=[];let U=null;for(let W=0;W<R;++W){const[L,Z]=mc(t(W,p?null:U));if(!L)break;const[T,F]=Ns(i,L);let $=T().data;const H=a||D||mt($)||c&&!W&&!mt(O)||P||O&&!mt(O[W])&&!n.compare(O[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]=$};p?B.push(Y):await Y()}else V[W]=$;p||(U=$)}return p&&await Promise.all(B.map(W=>W())),y({_i:Gr}),V},n),I=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()):w1},[g,i]),j=x.useCallback(N=>{if(!g)return w1;const[,D]=Ns(i,g);let M;if(zo(N)?M=N(S()):typeof N=="number"&&(M=N),typeof M!="number")return w1;D({_l:M}),k.current=M;const V=[],[R]=Ns(i,g);let K=null;for(let O=0;O<M;++O){const[B]=mc(t(O,K)),[U]=Ns(i,B),W=B?U().data:Gr;if(mt(W))return I(R().data);V.push(W),K=W}return I(V)},[g,i,I,S]);return{size:S(),setSize:j,mutate:I,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}});function yh(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 Yoe({query:e,modificationBlocks:t,address:r,pageSize:n}){function o(i,s){return yh(JJ,e,t,n,i,s,r?{postcode:r.postcode,number:parseInt(r.number),numberAddon:r.numberAddon}:void 0)}return vh(o,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Joe({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return yh(XJ,e,t,r,o,i)}return vh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Xoe({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return yh(QJ,e,t,r,o,i)}return vh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Qoe({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return yh(eX,e,t,r,o,i)}return vh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function xh({filterOptions:e,activeFilters:t,limit:r,productCategory:n,profile:o,distinctProperties:i}){const s=pI(n,o),a=oX({filterOptions:e,filterValues:t,limit:r,currentProvider:s,distinctProperties:i});switch(n){case"sim-only-proposition":{const l=gi(t,"providers");a.groupBy(Array.isArray(l)&&l.length===1?"data_and_speed":"provider");const c=Joe({query:a.serialize(),modificationBlocks:Lc(n,o),pageSize:r}),{data:d=[],error:p,...m}=c;return{...m,data:d[0],dataArray:d,error:p}}case"fixed-proposition":{a.groupBy("provider_data_speed_down");const l=Yoe({query:a.serialize(),modificationBlocks:Lc(n,o),address:o.address,pageSize:r}),{data:c=[],error:d,...p}=l;return{...p,data:c[0],dataArray:c,error:d}}case"smartphone-proposition":{const l=gi(t,"sorteren"),c=gi(t,"providers");a.groupBy(Array.isArray(c)&&c.length===1?"data_and_speed":"provider"),l==="relevantie"&&a.sort("top");const d=Xoe({query:a.serialize(),modificationBlocks:Lc(n,o),pageSize:r}),{data:p=[],error:m,...g}=d;return{...g,data:p[0],dataArray:p,error:m}}case"smartphone-proposition-extended":{const l=gi(t,"sorteren");a.groupBy(l==="relevantie"?"product_provider_slug":"product_slug");const c=Qoe({query:a.serialize(),modificationBlocks:Lc(n,o),pageSize:r}),{data:d=[],error:p,...m}=c;return{...m,data:d[0],dataArray:d,error:p}}default:return{data:void 0,dataArray:[],isLoading:!1,isValidating:!1,error:void 0,mutate:async()=>{},size:0,setSize:()=>{}}}}function wh({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 eie({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=mi(),{results:d}=vt(),{profile:p}=sn(),{filterOptions:m,activeFilters:g}=bi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=zc({addClickoutSearchParams:s}),{data:S,dataArray:k,isLoading:P,isValidating:E,size:I,setSize:j,mutate:N,error:D}=xh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:p}),{isReachingEnd:M,loadMore:V}=wh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:I,setSize:j,activeFilters:g,profile:p,limit:n}),R=k.flatMap(L=>L.search.records),{polling:K,validating:O}=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]),Bo(()=>{p.address&&N()},[p.address?.postcode,p.address?.number,p.address?.numberAddon,N]),D)throw new Error(String(D));if(!K&&!E&&R.length===0)return h.jsx(gh,{});const B=S&&"fetchInfo"in S?S.search.pageInfo.fastestDownloadSpeedProposition?.key:void 0,{top:U,all:W}=P?{top:[],all:[]}:a1({propositions:R,productCategory:e,labelColorConfig:r,fastestInternetPropositionKey:B});return h.jsxs("div",{tabIndex:(E||O)&&!K?-1:void 0,children:[K&&p.address&&h.jsx(Roe,{address:p.address}),h.jsxs("div",{className:A((E||O)&&!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(Za,{count:3,horizontal:i==="horizontal"}):U.map(L=>{if(p.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:Gs(L),urgentText:Ys(L.specialPromotions),specialPromotions:Ga(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(Za,{count:n,horizontal:o==="horizontal"}):W.map(L=>{const Z=p.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:Gs(L),urgentText:Ys(L.specialPromotions),specialPromotions:Ga(L),modificationPromotions:L.modificationPromotions},L.key)}),h.jsx(mh,{isReachingEnd:M,loadMore:V,isValidating:E,className:d?.loadMoreButton})]})]}),h.jsx(Bc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function tie({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=mi(),{results:d}=vt(),{profile:p}=sn(),{filterOptions:m,activeFilters:g}=bi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=zc({addClickoutSearchParams:s}),{dataArray:S,isLoading:k,isValidating:P,size:E,setSize:I,error:j}=xh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:p}),{isReachingEnd:N,loadMore:D}=wh({lastPageLength:S[S.length-1]?.search.records.length,isValidating:P,size:E,setSize:I,activeFilters:g,profile:p,limit:n});if(j)throw new Error(String(j));const M=S.flatMap(K=>K.search.records);if(!P&&M.length===0)return h.jsx(gh,{});const{top:V,all:R}=k?{top:[],all:[]}:a1({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(Za,{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(O=>window.open(O,"_blank"))},onInfoClick:O=>{c({type:"details_viewed",proposition:K,tab:O}),v({proposition:K,tab:O}),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:cu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:Gs(K),urgentText:Ys(K.specialPromotions),specialPromotions:Ga(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(Za,{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(O=>window.open(O,"_blank"))},onInfoClick:O=>{c({type:"details_viewed",proposition:K,tab:O}),v({proposition:K,tab:O}),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:cu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:Gs(K),urgentText:Ys(K.specialPromotions),specialPromotions:Ga(K),modificationPromotions:K.modificationPromotions},K.key)),h.jsx(mh,{isReachingEnd:N,loadMore:D,isValidating:P,className:d?.loadMoreButton})]}),h.jsx(Bc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function LD({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(Zv,{orientation:"horizontal",hideScrollBar:!0,children:h.jsxs(ch,{"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(dh,{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(ph,{children:e.map(o=>h.jsxs(fh,{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(t4,{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 rie({showTopPropositions:e,labelColorConfig:t,limit:r,propositionCardLayout:n,productCategory:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=mi(),{results:d}=vt(),{profile:p}=sn(),{filterOptions:m,activeFilters:g,distinctProperties:b}=bi(),{openModal:y}=Qt(),[v,C]=x.useState(null),{buildClickOutUrl:S}=zc({addClickoutSearchParams:s}),{dataArray:k,isLoading:P,isValidating:E,size:I,setSize:j,error:N}=xh({filterOptions:m,activeFilters:g,limit:r,productCategory:o,profile:p,distinctProperties:b}),{isReachingEnd:D,loadMore:M}=wh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:I,setSize:j,activeFilters:g,profile:p,limit:r});if(N)throw new Error(String(N));const V=k.flatMap(O=>O.search.records);if(!E&&V.length===0)return h.jsx(gh,{});const{top:R,all:K}=P?{top:[],all:[]}:a1({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(Za,{count:3,horizontal:i==="horizontal"}):R.map(O=>h.jsx(qa,{onClick:()=>{if(c({type:"deal_selected",proposition:O}),a)return a(O.key);S(`/aanbieding/${O.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:O,tab:B}),C({proposition:O,tab:B}),y("details")},label:O.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(O.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:qs(O.monthlyFees,O.baseMonthlyFee,O.lifetimeMonthlyFee),tcoPerMonth:Ve(O.tcoPerMonth,{dashed:!0}),productPrice:Ve(O.price,{dashed:!0}),propositionTitle:Kn(O.content.data,l("format.gigabyte")),propositionSubtitle:cu(O.content),propositionImageUrl:O.provider.imageUrl,propositionImageAlt:O.provider.name,propositionSpecifications:Gs(O),urgentText:Ys(O.specialPromotions),specialPromotions:b1(Ga(O),o1(O)),modificationPromotions:O.modificationPromotions},`top-${O.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(Za,{count:r,horizontal:n==="horizontal"}):K.map(O=>h.jsx(qa,{onClick:()=>{if(c({type:"deal_selected",proposition:O}),a)return a(O.key);S(`/aanbieding/${O.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:O,tab:B}),C({proposition:O,tab:B}),y("details")},label:O.label,isExternalLink:!a,horizontal:n==="horizontal",monthlyFee:Ve(O.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:qs(O.monthlyFees,O.baseMonthlyFee,O.lifetimeMonthlyFee),tcoPerMonth:Ve(O.tcoPerMonth,{dashed:!0}),productPrice:Ve(O.price,{dashed:!0}),propositionTitle:Kn(O.content.data,l("format.gigabyte")),propositionSubtitle:cu(O.content),propositionImageUrl:O.provider.imageUrl,propositionImageAlt:O.provider.name,propositionSpecifications:Gs(O),urgentText:Ys(O.specialPromotions),specialPromotions:b1(Ga(O),o1(O)),modificationPromotions:O.modificationPromotions},O.key)),h.jsx(mh,{isReachingEnd:D,loadMore:M,isValidating:E,className:d?.loadMoreButton}),h.jsx(LD,{propositions:V.slice(0,3)})]}),h.jsx(Bc,{proposition:v?.proposition,defaultTab:v?.tab,buildClickOutUrl:S})]})}function nie({productCategory:e,limit:t,propositionCardLayout:r,addClickoutSearchParams:n,onDealSelected:o}){const{t:i}=Je(),{onAction:s}=mi(),{results:a}=vt(),{profile:l}=sn(),{filterOptions:c,activeFilters:d}=bi(),{openModal:p}=Qt(),[m,g]=x.useState(null),{buildClickOutUrl:b}=zc({addClickoutSearchParams:n}),{dataArray:y,isLoading:v,isValidating:C,size:S,setSize:k,error:P}=xh({filterOptions:c,activeFilters:d,limit:t,productCategory:e,profile:l}),{isReachingEnd:E,loadMore:I}=wh({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 j=y.flatMap(N=>N.search.records);return!C&&j.length===0?h.jsx(gh,{}):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(Za,{count:t,horizontal:r==="horizontal",large:!0}):j.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}),p("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:cu(N.content),propositionImageUrl:N.provider.imageUrl,propositionImageAlt:N.provider.name,propositionSpecifications:Gs(N),urgentText:Ys(N.specialPromotions),specialPromotions:b1(Ga(N),o1(N)),modificationPromotions:N.modificationPromotions},N.key)),h.jsxs("div",{className:"flex flex-col gap-2 col-span-full mt-4",children:[h.jsx(mh,{isReachingEnd:E,loadMore:I,isValidating:C,className:a?.loadMoreButton}),h.jsx(LD,{propositions:j.slice(0,3)})]}),h.jsx(Bc,{proposition:m?.proposition,defaultTab:m?.tab,buildClickOutUrl:b})]})}function oie({...e}){const{width:t}=ha(),{getActiveFilterValue:r}=bi(),n=t<768,o=t>=1024;switch(e.productCategory){case"fixed-proposition":return h.jsx(eie,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"smartphone-proposition":return r("telefoons").length===0?h.jsx(nie,{...e,productCategory:"smartphone-proposition-extended",propositionCardLayout:n||o?"vertical":"horizontal"}):h.jsx(rie,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"sim-only-proposition":return h.jsx(tie,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});default:return null}}function iie({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:p,handleFilterRemove:m,getActiveFilterValue:g}=bi(),{profile:b}=sn(),{width:y}=ha(),v=y>=1024,[C]=e==="smartphone-proposition"?g("telefoons"):[],[S]=g("sorteren"),k=(()=>{if(typeof n=="boolean")return n;const{requireNumberPreservation:E,requireCustomerBenefits:I}=n;return(!E||!!b.currentProviderSlug)&&(!I||!!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(VZ,{productSlug:C,selectedDistinctProperties:c,onChange:(E,I)=>{if(!E&&C){m({slug:"telefoons",value:C}),d([]),S!=="relevantie"&&p({slug:"sorteren",value:"relevantie"});return}E&&(!C||E!==C)&&p({slug:"telefoons",value:E}),!C&&S!=="relevantie"&&p({slug:"sorteren",value:"relevantie"}),d(I)}}),v&&h.jsxs(h.Fragment,{children:[h.jsx(AI,{isFixed:P}),h.jsx(b6,{})]})]}),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(Vne,{}),v?h.jsx(e6,{}):h.jsx(aX,{children:h.jsx(AI,{isFixed:P})})]}),i&&h.jsxs("div",{className:"flex flex-col gap-3 w-full @4xl:flex-row empty:hidden",children:[h.jsx(uu,{variant:"numberPreservation",isFixed:P}),h.jsx(uu,{variant:"postcodeCheck",isFixed:P}),h.jsx(uu,{variant:"combiDeal",isFixed:P})]}),h.jsx(oie,{productCategory:e,addClickoutSearchParams:o,onDealSelected:s,showTopPropositions:g("providers").length!==1&&["relevantie","top"].includes(S)&&k,labelColorConfig:t,limit:r})]}),P?h.jsx(Bne,{}):h.jsx(PI,{}),h.jsx(SI,{isFixed:P}),h.jsx(j_,{})]})}function sie({classNames:e,initialSelectedFilters:t,initialProfile:r,onProfileChange:n,onError:o,onAction:i,...s}){return h.jsxs(B_,{onError:o,children:[h.jsx(SP,{classNames:e,children:h.jsx(K_,{onAction:i,children:h.jsx(wI,{initialProfile:r,onProfileChange:n,children:h.jsx(HJ,{initialSelectedFilters:t,productCategory:s.productCategory,children:h.jsx(PP,{children:h.jsx(iie,{...s})})})})})}),h.jsx(Dne,{})]})}function aie(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}=Li(e,t),{pressProps:p,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,p),y=Uu(),v=eg(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=p.onClick)==null||S.call(p,C),DL(C,y,e.href,e.routerOptions)}})}}function lie(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,aC.variantKeys),{ref:l,as:c,children:d,anchorIcon:p,isExternal:m=!1,showAnchorIcon:g=!1,autoFocus:b=!1,className:y,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,...P}=s,E=c||"a",I=ot(l),j=(r=(t=e?.disableAnimation)!=null?t:i?.disableAnimation)!=null?r:!1,{linkProps:N}=aie({...P,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,isDisabled:e.isDisabled,elementType:`${c}`},I),{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(()=>aC({...a,disableAnimation:j,className:y}),[jr(a),j,y]),K=x.useCallback(()=>({ref:I,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:p,showAnchorIcon:g,getLinkProps:K}}var FD=Xe((e,t)=>{const{Component:r,children:n,showAnchorIcon:o,anchorIcon:i=h.jsx(SW,{className:K8}),getLinkProps:s}=lie({ref:t,...e});return h.jsx(r,{...s(),children:h.jsxs(h.Fragment,{children:[n,o&&i]})})});FD.displayName="HeroUI.Link";var Ch=FD;function uie({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 cie({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(([p])=>l(!p.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(uie,{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(ma,{size:16}),disableAnimation:!0,disableRipple:!0,onPress:i,isDisabled:o,children:"Bestellen"})]})}var C1,BD;function die(){if(BD)return C1;BD=1;var e=D$();function t(r){return r&&r.length?e(r):[]}return C1=t,C1}var fie=die();const pie=$u(fie),zD="|",hie=/plv-\d+/g,mie=/pvu?-\d+/g,gie=/pvu?-(\d+)/,bie=/^\d+-\d+/g,vie=/hc\d{1,2}-\d{1,2}(_\d{1,2})?/g,yie=/^(\d+)-\d+/,xie=/m\d+-\d+/g,wie=/m(\d+)-\d+/;function Kc(e){return pie(e.filter(Boolean)).sort().join(zD)}function KD(e){return e.split(zD)}function Sh(e,t){if(t===0)return[[]];if(!t)return Sh(e,e.length);const[r,...n]=e;return[...Sh(n,t-1).map(o=>[r,...o]),...Sh(n,t-1)]}function Cie(e){return Sh(KD(e)).map(Kc)}function VD(e){return decodeURI(e).replace(/:/gi,"|").replace(/%3A/gi,"|").replace(/%7C/gi,"|")}const Sie={planVariant:hie,phoneVariant:mie,bundleSet:bie,handsetCredit:vie,modification:xie};function pn(e){const t=Sie[e];return r=>r.match(t)!==null}const kie={bundleTypeSet:yie,modificationGroup:wie,productVersionId:gie};function Js(e){const t=kie[e];return r=>(r.match(t)||["",""])[1]}class Ya{unitKeys=[];constructor(t){this.update(t)}update(t){this.unitKeys=KD(VD(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)&&Js("bundleTypeSet")(n)===t)),...r]}toggleBundleSet(t,r){const n=this.unitKeys.includes(t),o=this.unitKeys.filter(i=>Js("bundleTypeSet")(i)===Js("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&&Js("productVersionId")(t)}modification(){return this.unitKeys.find(pn("modification"))}modifications(){return this.unitKeys.filter(pn("modification"))}modificationGroups(){return this.unitKeys.filter(pn("modification")).map(Js("modificationGroup"))}handsetCredit(){return this.unitKeys.find(pn("handsetCredit"))}bundleSets(){return this.unitKeys.filter(pn("bundleSet"))}bundleTypeSets(){return this.unitKeys.filter(pn("bundleSet")).map(Js("bundleTypeSet"))}key(){return Kc(this.unitKeys)}urlKey(){return this.unitKeys.join(":")}scope(){return Kc(this.unitKeys.filter(t=>pn("planVariant")(t)||pn("phoneVariant")(t)))}base(){return Kc(this.unitKeys.filter(t=>!pn("handsetCredit")(t)))}combinations(){return Cie(this.key())}}function Pie(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 RD=x.createContext({isLoading:!1,error:void 0,notFound:!1,propositionKey:new Ya(""),proposition:null,propositionSelector:null,setProductVersion:e=>{},setPlanVariant:e=>{},setHandsetCredit:e=>{},toggleBundleSet:e=>{}}),Eie=ft`
|
|
1326
|
+
`;function TI(e,t,r,n="",o=!1){const[i,s]=x.useState(o),a=np(t,500),l=np(r,500),c=np(n,500),{data:d,isValidating:p,error:m}=ap(a&&l?[Fne,{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(()=>{p||b(null)},[p]),Bo(()=>{if(!(p||!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}!p&&a&&l&&!m&&!d?.postcode?.address&&b(Ee.t("postcodeCheck.invalidAddressError"))}},[d,m,p,a,l]),{manual:i,isLoading:p&&!!a&&!!l,error:g}}function Bne(){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,p]=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),I=x.useRef(!!(r.address?.street&&r.address?.city)),j=sh("fixed"),{width:N}=ha(),D=N>=1024,M=x.useCallback(L=>{L.street!==void 0&&C(L.street),L.city!==void 0&&k(L.city)},[]);Bo(()=>{const L=r.address;p(L?.postcode||""),g(L?.number||""),y(L?.numberAddon||""),C(L?.street||""),k(L?.city||""),I.current=!!(L?.street&&L?.city)},[r.address]);const{manual:V,error:R}=TI(M,d,m,b,I.current);Bo(()=>{!V&&(!d||!m)&&(C(""),k(""))},[d,m,V]);const K=x.useMemo(()=>CI(j.fixedBlocks,"fixed"),[j.fixedBlocks.length]),O={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:$}=r1.safeParse(T);F&&(jc({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(di,{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(li,{children:[h.jsx(ui,{children:e("postcodeCheck.title")}),h.jsxs(si,{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(qm,{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(yi,{variant:"bordered",placeholder:"1234AB",radius:"sm",type:"text",inputMode:d.length<4?"numeric":"text",name:"postcode",autoComplete:"postal-code",value:d,onValueChange:L=>p(EI(L)),onFocus:W,classNames:O,maxLength:6,label:e("postcodeCheck.postalCode"),isRequired:!0}),h.jsx(yi,{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:O,label:e("postcodeCheck.houseNumber"),isRequired:!0}),h.jsx(yi,{variant:"bordered",placeholder:"A",radius:"sm",type:"text",name:"numberAddon",value:b,onValueChange:L=>y(L.toUpperCase()),onFocus:W,classNames:O,label:e("postcodeCheck.houseNumberAddition")})]}),R&&h.jsx(nu,{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(xc,{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(Da,{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(zi,{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 uu({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:qm,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:zu,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(fP,{color:"warning",content:"",shape:"circle",className:i?.badge,children:h.jsx(zl,{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 zne(e,t){return!e&&!t?"":t&&/^\d+$/.test(t)?`${e}/${t}`:`${e}${t??""}`}function Kne({street:e,city:t,number:r,numberAddon:n}){if(!(!e||!r||!t))return`${e} ${zne(r,n)}, ${t}`}function AI({isFixed:e=!1,showTitle:t=!0,showProfileBanner:r=!1}){const{t:n}=Je(),{profile:o}=sn(),{openModal:i}=Qt(),{profileButton:s}=vt(),a=n1(),l=sh(e?"fixed":"mobile"),c=gI(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(Kl,{title:n("profile.postcodeCheck"),description:o.address?Kne(o.address):n("profile.enterPostcode"),selected:o.address!==void 0,onClick:()=>i("postcode-check"),Icon:qm,classNames:s}):h.jsx(uu,{variant:"postcodeCheck",isFixed:!0}):!r||o.keepCurrentMsisdn!==void 0?h.jsx(Kl,{title:n("profile.numberPreservation"),description:mI(o,a),selected:o.keepCurrentMsisdn===!1||o.keepCurrentMsisdn&&!!o.currentProviderSlug,onClick:()=>i("number-preservation"),avatarName:"0 6",classNames:s}):h.jsx(uu,{variant:"numberPreservation"}),!r||(e?o.currentMobileProviders:o.currentFixedProviderScope)?h.jsx(Kl,{title:n("profile.customerBenefit"),description:hI(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(p=>p.scope===d.scope)):l.fixedBlocks.some(d=>d.scope===o.currentFixedProviderScope)||o.currentFixedProviderScope==="other",onClick:()=>i("combi-deal"),Icon:zu,classNames:s}):h.jsx(uu,{variant:"combiDeal",isFixed:e})]})]})}function Vne(){const{t:e}=Je(),[t,r]=x.useState(!1),{sortSelect:n}=vt(),{popoverContent:o,listbox:i,...s}=n||{},{sortOptions:a,handleFilterChange:l,getActiveFilterValue:c}=bi(),{popoverProps:d,isShadowRoot:p}=Zn({classNames:o});return p?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(xc,{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(Da,{variant:"flat",onClick:()=>{l({slug:"sorteren",value:m.value}),r(!1)},children:e(`sortOptions.${m.value}`,{defaultValue:m.name})},m.value))})}function Rne(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 o1(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 i1(e){switch(e){case Qn:return Ee.t("format.unlimited_short");case 0:return"-";default:return e}}function cu(e,t){const r=e.minutes!==0?`${i1(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"):`${i1(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 Fc(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 $I(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 Gs(e){const t=Fc(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","")} ${$I(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 s1=["kpn","vodafone","odido"],Wne=[{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)&&s1.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:s1.length,sortDirection:"asc"}];function a1({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?Une(e):[],fastestInternetPropositionKey:n},l=new Map;for(const m of Wne){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=[],p=new Set;for(const m of c){if(d.length>=3)break;if(o){if(p.has(m.provider.slug))continue;p.add(m.provider.slug)}d.push(m)}return{top:d,all:e.map(m=>({...m,label:l.get(m.key)}))}}function Une(e){return s1.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 Hne({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(Sj,{size:24,className:A("stroke-foreground",r?.hdIcon)})]})},o))})]})}function ah({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 _I({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(Wm,{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 II({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:p,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!==p,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,I=E?k:void 0,j=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(_I,{term:M,price:a[D+1]?.fee||0,classNames:t?.monthlyFeeTransition},N.term)}),C&&S&&p&&h.jsx(_I,{term:S,price:p,classNames:t?.lifetimeFee})]}),h.jsx(ah,{label:h.jsxs(h.Fragment,{children:[o.name," ",i.contractType==="retention"?`${r("detailsModal.renewal").toLowerCase()} `:"",Fc(i.contractTerm)]}),originalPrice:I,currentPrice:j,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,O=R?V:M,B=M!==0||typeof V=="number"&&V!==0;return h.jsx(ah,{label:N.displayName,originalPrice:K,currentPrice:O,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(ah,{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(ah,{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 l1=new WeakMap;function u1(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function qne(e,t){let r=l1.get(e);if(!r)throw new Error("Unknown grid");return`${r}-${u1(t)}`}function NI(e,t,r){let n=l1.get(e);if(!n)throw new Error("Unknown grid");return`${n}-${u1(t)}-${u1(r)}`}function DI(e,t){return[...e.collection.rowHeaderColumnKeys].map(r=>NI(e,t,r)).join(" ")}var MI={};MI={ascending:"تصاعدي",ascendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تصاعدي`,columnSize:e=>`${e.value} بالبكسل`,descending:"تنازلي",descendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var OI={};OI={ascending:"възходящ",ascendingSort:e=>`сортирано по колона ${e.columnName} във възходящ ред`,columnSize:e=>`${e.value} пиксела`,descending:"низходящ",descendingSort:e=>`сортирано по колона ${e.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var jI={};jI={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 LI={};LI={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 FI={};FI={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 BI={};BI={ascending:"αύξουσα",ascendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε αύξουσα σειρά`,columnSize:e=>`${e.value} pixel`,descending:"φθίνουσα",descendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var zI={};zI={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 KI={};KI={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 VI={};VI={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 RI={};RI={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 WI={};WI={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 UI={};UI={ascending:"עולה",ascendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר עולה`,columnSize:e=>`${e.value} פיקסלים`,descending:"יורד",descendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var HI={};HI={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 qI={};qI={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 GI={};GI={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 ZI={};ZI={ascending:"昇順",ascendingSort:e=>`列 ${e.columnName} を昇順で並べ替え`,columnSize:e=>`${e.value} ピクセル`,descending:"降順",descendingSort:e=>`列 ${e.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var YI={};YI={ascending:"오름차순",ascendingSort:e=>`${e.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:e=>`${e.value} 픽셀`,descending:"내림차순",descendingSort:e=>`${e.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var JI={};JI={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 XI={};XI={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 QI={};QI={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 eN={};eN={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 tN={};tN={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 rN={};rN={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 nN={};nN={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 oN={};oN={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 iN={};iN={ascending:"возрастание",ascendingSort:e=>`сортировать столбец ${e.columnName} в порядке возрастания`,columnSize:e=>`${e.value} пикс.`,descending:"убывание",descendingSort:e=>`сортировать столбец ${e.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var sN={};sN={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 aN={};aN={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 lN={};lN={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 uN={};uN={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 cN={};cN={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 dN={};dN={ascending:"висхідний",ascendingSort:e=>`відсортовано за стовпцем ${e.columnName} у висхідному порядку`,columnSize:e=>`${e.value} пікс.`,descending:"низхідний",descendingSort:e=>`відсортовано за стовпцем ${e.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var fN={};fN={ascending:"升序",ascendingSort:e=>`按列 ${e.columnName} 升序排序`,columnSize:e=>`${e.value} 像素`,descending:"降序",descendingSort:e=>`按列 ${e.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var pN={};pN={ascending:"遞增",ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:"遞減",descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var lh={};lh={"ar-AE":MI,"bg-BG":OI,"cs-CZ":jI,"da-DK":LI,"de-DE":FI,"el-GR":BI,"en-US":zI,"es-ES":KI,"et-EE":VI,"fi-FI":RI,"fr-FR":WI,"he-IL":UI,"hr-HR":HI,"hu-HU":qI,"it-IT":GI,"ja-JP":ZI,"ko-KR":YI,"lt-LT":JI,"lv-LV":XI,"nb-NO":QI,"nl-NL":eN,"pl-PL":tN,"pt-BR":rN,"pt-PT":nN,"ro-RO":oN,"ru-RU":iN,"sk-SK":sN,"sl-SI":aN,"sr-SP":lN,"sv-SE":uN,"tr-TR":cN,"uk-UA":dN,"zh-CN":fN,"zh-TW":pN};class hN{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=Ds(d))===null||n===void 0?void 0:n.key:(o=Vi(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 p=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?vc(p,r.index-1):vc(p,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=Vi(d))===null||n===void 0?void 0:n.key:(o=Ds(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 p=Qr(d,this.collection);var s;let m=(s=this.direction==="rtl"?vc(p,r.index+1):vc(p,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=Vi(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=Vi(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=Ds(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=Ds(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 p=d.textValue.slice(0,t.length);if(this.collator.compare(p,t)===0){var l,c;return this.isRow(d)&&this.focusMode==="cell"?(c=(l=Vi(Qr(d,this.collection)))===null||l===void 0?void 0:l.key)!==null&&c!==void 0?c:null:d.key}}n=this.findNextKey(n,p=>p.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 Gne(t.layout):new Lv(t.ref));var r;this.focusMode=(r=t.focusMode)!==null&&r!==void 0?r:"row"}}class Gne{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 c1=new WeakMap;var mN={};mN={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 gN={};gN={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 bN={};bN={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 vN={};vN={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 yN={};yN={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 xN={};xN={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 wN={};wN={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 CN={};CN={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 SN={};SN={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 kN={};kN={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 PN={};PN={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 EN={};EN={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 TN={};TN={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 AN={};AN={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 $N={};$N={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 _N={};_N={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 IN={};IN={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 NN={};NN={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 DN={};DN={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 MN={};MN={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 ON={};ON={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 jN={};jN={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 LN={};LN={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 FN={};FN={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 BN={};BN={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 zN={};zN={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 KN={};KN={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 VN={};VN={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 RN={};RN={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 WN={};WN={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 UN={};UN={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 HN={};HN={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 qN={};qN={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 GN={};GN={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 uh={};uh={"ar-AE":mN,"bg-BG":gN,"cs-CZ":bN,"da-DK":vN,"de-DE":yN,"el-GR":xN,"en-US":wN,"es-ES":CN,"et-EE":SN,"fi-FI":kN,"fr-FR":PN,"he-IL":EN,"hr-HR":TN,"hu-HU":AN,"it-IT":$N,"ja-JP":_N,"ko-KR":IN,"lt-LT":NN,"lv-LV":DN,"nb-NO":MN,"nl-NL":ON,"pl-PL":jN,"pt-BR":LN,"pt-PT":FN,"ro-RO":BN,"ru-RU":zN,"sk-SK":KN,"sl-SI":VN,"sr-SP":RN,"sv-SE":WN,"tr-TR":UN,"uk-UA":HN,"zh-CN":qN,"zh-TW":GN};const ZN=7e3;let xi=null;function YN(e,t="assertive",r=ZN){xi?xi.announce(e,t,r):(xi=new Zne,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?xi.announce(e,t,r):setTimeout(()=>{xi?.isAttached()&&xi?.announce(e,t,r)},100))}class Zne{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=ZN){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 Yne(e){return e&&e.__esModule?e.default:e}function Jne(e,t){let{getRowText:r=a=>{var l,c,d,p;return(p=(l=(c=t.collection).getTextValue)===null||l===void 0?void 0:l.call(c,a))!==null&&p!==void 0?p:(d=t.collection.getItem(a))===null||d===void 0?void 0:d.textValue}}=e,n=ds(Yne(uh),"@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=JN(o,i.current),c=JN(i.current,o),d=t.selectionManager.selectionBehavior==="replace",p=[];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&&p.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&&p.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&&p.push(n.format("deselectedItem",{item:g}))}}t.selectionManager.selectionMode==="multiple"&&(p.length===0||o==="all"||o.size>1||i.current==="all"||((a=i.current)===null||a===void 0?void 0:a.size)>1)&&p.push(o==="all"?n.format("selectedAll"):n.format("selectedCount",{count:o.size})),p.length>0&&YN(p.join(" ")),i.current=o},[o,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,r,n]);M4(()=>{if(t.selectionManager.isFocused)s();else{let a=requestAnimationFrame(s);return()=>cancelAnimationFrame(a)}},[o,t.selectionManager.isFocused])}function JN(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 Xne(e){return e&&e.__esModule?e.default:e}function Qne(e){let t=ds(Xne(uh),"@react-aria/grid"),r=yV(),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 qd(o)}function eoe(e,t,r){let{isVirtualized:n,disallowTypeAhead:o,keyboardDelegate:i,focusMode:s,scrollRef:a,getRowText:l,onRowAction:c,onCellAction:d,escapeKeyBehavior:p="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=Xd({usage:"search",sensitivity:"base"}),{direction:y}=jn(),v=t.selectionManager.disabledBehavior,C=x.useMemo(()=>i||new hN({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}=jv({ref:r,selectionManager:g,keyboardDelegate:C,isVirtualized:n,scrollRef:a,disallowTypeAhead:o,escapeKeyBehavior:p}),k=rn(e.id);c1.set(t,{keyboardDelegate:C,actions:{onRowAction:c,onCellAction:d},shouldSelectOnPressUp:m});let P=Qne({selectionManager:g,hasItemActions:!!(c||d)}),E=Ln(e,{labelable:!0}),I=x.useCallback(M=>{if(g.isFocused){M.currentTarget.contains(M.target)||g.setFocused(!1);return}M.currentTarget.contains(M.target)&&g.setFocused(!0)},[g]),j=x.useMemo(()=>({onBlur:S.onBlur,onFocus:I}),[I,S.onBlur]),N=Ek(r,{isDisabled:t.collection.size!==0}),D=it(E,{role:"grid",id:k,"aria-multiselectable":g.selectionMode==="multiple"?"true":void 0},t.isKeyboardNavigationDisabled?j: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),Jne({getRowText:l},t),{gridProps:D}}function toe(){return{rowGroupProps:{role:"rowgroup"}}}function roe(e,t,r){var n,o;let{node:i,isVirtualized:s,shouldSelectOnPressUp:a,onAction:l}=e,{actions:c,shouldSelectOnPressUp:d}=c1.get(t),p=c.onRowAction?()=>{var v;return(v=c.onRowAction)===null||v===void 0?void 0:v.call(c,i.key)}:l,{itemProps:m,...g}=gp({selectionManager:t.selectionManager,key:i.key,ref:r,isVirtualized:s,shouldSelectOnPressUp:d||a,onAction:p||!(i==null||(n=i.props)===null||n===void 0)&&n.onAction?fs(i==null||(o=i.props)===null||o===void 0?void 0:o.onAction,p):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 XN(e,t,r){let{node:n,isVirtualized:o,focusMode:i="child",shouldSelectOnPressUp:s,onAction:a}=e,{direction:l}=jn(),{keyboardDelegate:c,actions:{onCellAction:d}}=c1.get(t),p=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"?d1(k):k.firstChild();if(P){wn(P);return}}(p.current!=null&&n.key!==p.current||!r.current.contains(document.activeElement))&&wn(r.current)}},{itemProps:g,isPressed:b}=gp({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),gs(M,{containingElement:ms(r.current)});else{var E;if(((E=c.getKeyLeftOf)===null||E===void 0?void 0:E.call(c,n.key))!==n.key){var I;(I=r.current.parentElement)===null||I===void 0||I.dispatchEvent(new KeyboardEvent(k.nativeEvent.type,k.nativeEvent));break}i==="cell"&&l==="rtl"?(wn(r.current),gs(r.current,{containingElement:ms(r.current)})):(P.currentNode=r.current,M=l==="rtl"?P.firstChild():d1(P),M&&(wn(M),gs(M,{containingElement:ms(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),gs(M,{containingElement:ms(r.current)});else{var j;if(((j=c.getKeyRightOf)===null||j===void 0?void 0:j.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),gs(r.current,{containingElement:ms(r.current)})):(P.currentNode=r.current,M=l==="rtl"?d1(P):P.firstChild(),M&&(wn(M),gs(M,{containingElement:ms(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(p.current=n.key,k.target!==r.current){Ol()||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 d1(e){let t=null,r=null;do r=e.lastChild(),r&&(t=r);while(r);return t}function noe(e){return e&&e.__esModule?e.default:e}function ooe(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=ds(noe(uh),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":l.format("select"),isSelected:s,isDisabled:i,onChange:a}}}class ioe extends hN{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=Vi(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 p=c.textValue.slice(0,t.length);if(this.collator.compare(p,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 soe(e){return e&&e.__esModule?e.default:e}function aoe(e,t,r){let{keyboardDelegate:n,isVirtualized:o,layoutDelegate:i,layout:s}=e,a=Xd({usage:"search",sensitivity:"base"}),{direction:l}=jn(),c=t.selectionManager.disabledBehavior,d=x.useMemo(()=>n||new ioe({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]),p=rn(e.id);l1.set(t,p);let{gridProps:m}=eoe({...e,id:p,keyboardDelegate:d},t,r);o&&(m["aria-rowcount"]=t.collection.size+t.collection.headerRows.length),Od()&&"expandedKeys"in t&&(m.role="treegrid");let{column:g,direction:b}=t.sortDescriptor||{},y=ds(soe(lh),"@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=qd(v);return M4(()=>{v&&YN(v,"assertive",500)},[v]),{gridProps:it(m,C,{"aria-describedby":[C["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")})}}function loe(e){return e&&e.__esModule?e.default:e}function QN(e,t,r){var n,o;let{node:i}=e,s=i.props.allowsSorting,{gridCellProps:a}=XN({...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:p}=Li({},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&&!Wu()&&(m=g?b:"none");let y=ds(loe(lh),"@react-aria/table"),v;s&&(v=`${y.format("sortable")}`,g&&b&&Wu()&&(v=`${v}, ${y.format(b)}`));let C=qd(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(p,a,c,C,S?{tabIndex:-1}:null),role:"columnheader",id:qne(t,i.key),"aria-colspan":i.colSpan&&i.colSpan>1?i.colSpan:void 0,"aria-sort":m},isPressed:d}}const eD={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function uoe(e,t,r){let{node:n,isVirtualized:o}=e,{rowProps:i,...s}=roe(e,t,r),{direction:a}=jn();o&&!(Od()&&"expandedKeys"in t)?i["aria-rowindex"]=n.index+1+t.collection.headerRows.length:delete i["aria-rowindex"];let l={};if(Od()&&"expandedKeys"in t){let E=t.keyMap.get(n.key);if(E!=null){var c,d,p,m,g,b;let I=((c=E.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((p=E.props)===null||p===void 0||(d=p.children)===null||d===void 0?void 0:d.length)>t.userColumnCount;var y,v,C,S;l={onKeyDown:j=>{(j.key===eD.expand[a]&&t.selectionManager.focusedKey===E.key&&I&&t.expandedKeys!=="all"&&!t.expandedKeys.has(E.key)||j.key===eD.collapse[a]&&t.selectionManager.focusedKey===E.key&&I&&(t.expandedKeys==="all"||t.expandedKeys.has(E.key)))&&(t.toggleKey(E.key),j.stopPropagation())},"aria-expanded":I?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=Ds((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=Ds(t.collection.body.childNodes))===null||b===void 0?void 0:b.indexOfType)!==null&&S!==void 0?S:0)+1}}}let k=NL(n.props),P=s.hasAction?k:{};return{rowProps:{...it(i,l,P),"aria-labelledby":DI(t,n.key)},...s}}function coe(e,t,r){let{node:n,isVirtualized:o}=e,i={role:"row"};return o&&!(Od()&&"expandedKeys"in t)&&(i["aria-rowindex"]=n.index+1),{rowProps:i}}function tD(e,t,r){var n;let{gridCellProps:o,isPressed:i}=XN(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=NI(t,e.node.parentKey,s)),{gridCellProps:o,isPressed:i}}function doe(e){return e&&e.__esModule?e.default:e}function foe(e,t){let{key:r}=e;const{checkboxProps:n}=ooe(e,t);return{checkboxProps:{...n,"aria-labelledby":`${n.id} ${DI(t,r)}`}}}function poe(e){let{isEmpty:t,isSelectAll:r,selectionMode:n}=e.selectionManager;return{checkboxProps:{"aria-label":ds(doe(lh),"@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 f1(){return toe()}var rD=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,slots:a,state:l,selectionMode:c,color:d,checkboxesProps:p,disableAnimation:m,classNames:g,...b}=e,y=o||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=QN({node:s},l,C),{isFocusVisible:k,focusProps:P}=Ir(),{checkboxProps:E}=poe(l),I=A(g?.th,i,(r=s.props)==null?void 0:r.className),j=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:I}),children:j?h.jsx(jl,{children:E["aria-label"]}):h.jsx(qp,{color:d,disableAnimation:m,onValueChange:N,...Oe(p,D)})})});rD.displayName="HeroUI.TableSelectAllCheckbox";var nD=rD;function hoe(e){let{collection:t,focusMode:r}=e,n=e.UNSAFE_selectionState||LE(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,p;let y=Qr(b,t);var m,g;c==="last"?l=(m=(d=Ds(y))===null||d===void 0?void 0:d.key)!==null&&m!==void 0?m:null:l=(g=(p=Vi(y))===null||p===void 0?void 0:p.key)!==null&&g!==void 0?g:null}}i(l,c)};let s=x.useMemo(()=>new yp(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,p=t.rows,m=d.length-p.length;let g=Math.min(m>1?Math.max(c.index-m+1,0):c.index,p.length-1),b=null;for(;g>=0;){if(!s.isDisabled(p[g].key)&&p[g].type!=="headerrow"){b=p[g];break}g<p.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 moe{*[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=p=>{let m=this.keyMap.get(p.key);t.visitNode&&(p=t.visitNode(p)),this.keyMap.set(p.key,p);let g=new Set,b=null,y=!1;if(p.type==="item"){var v;for(let E of p.childNodes)if(((v=E.props)===null||v===void 0?void 0:v.colSpan)!==void 0){y=!0;break}}for(let E of p.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=p.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=p=>{this.keyMap.delete(p.key);for(let m of p.childNodes)this.keyMap.get(m.key)===m&&n(m)},o=null;for(let[p,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-"+p,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:p};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 oD="row-header-column-"+Math.random().toString(36).slice(2);let p1="row-header-column-"+Math.random().toString(36).slice(2);for(;oD===p1;)p1="row-header-column-"+Math.random().toString(36).slice(2);function goe(e,t){if(t.length===0)return[];let r=[],n=new Map;for(let d of t){let p=d.parentKey,m=[d];for(;p;){let g=e.get(p);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});p=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 p=s-1;for(let m of d){if(m){let g=a[p],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:p,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=p,m.colIndex=l,g.push(m)}p--}l++}let c=0;for(let d of a){let p=d.reduce((m,g)=>{var b;return m+((b=g.colSpan)!==null&&b!==void 0?b:1)},0);if(p<t.length){let m={type:"placeholder",key:"placeholder-"+d[d.length-1].key,colSpan:t.length-p,colspan:t.length-p,index:p,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:"",prevKey:d[d.length-1].key};d.push(m)}c++}return a.map((d,p)=>({type:"headerrow",key:"headerrow-"+p,index:p,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:d,textValue:""}))}class boe extends moe{*[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=Vi(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&r!==void 0?r:null}getLastKey(){var t,r;return(r=(t=Ds(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 p={type:"column",key:oD,value:null,textValue:"",level:0,index:n?.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};s.unshift(p)}if(n?.showDragButtons){let p={type:"column",key:p1,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};s.unshift(p)}let a=[],l=new Map,c=p=>{switch(p.type){case"body":i=p;break;case"column":l.set(p.key,p),p.hasChildNodes||(s.push(p),p.props.isRowHeader&&o.add(p.key));break;case"item":a.push(p);return}for(let m of p.childNodes)c(m)};for(let p of t)c(p);let d=goe(l,s);if(d.forEach((p,m)=>a.splice(m,0,p)),super({columnCount:s.length,items:a,visitNode:p=>(p.column=s[p.index],p)}),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 p=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)});p&&this.rowHeaderColumnKeys.add(p.key)}}}const voe={ascending:"descending",descending:"ascending"};function yoe(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=VE(e,x.useCallback(p=>new boe(p,null,s),[s]),s),{disabledKeys:l,selectionManager:c}=hoe({...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(p,m){var g,b;(b=e.onSortChange)===null||b===void 0||b.call(e,{column:p,direction:m??(((g=e.sortDescriptor)===null||g===void 0?void 0:g.column)===p?voe[e.sortDescriptor.direction]:"ascending")})}}}function iD(e){return null}iD.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 xoe=iD;function sD(e){return null}sD.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 woe=sD;function aD(e){return null}aD.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,p=>{d.push({type:"column",element:p})}),yield*d}},shouldInvalidate(d){return c(d),!1}},c=d=>{for(let p of l)p.hasChildNodes||d.columns.push(p)};c(r)};let Coe=aD;function h1(e){return null}h1.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===h1){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 Soe=h1;function lD(e){return null}lD.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 koe=lD;function uD(e){var t;const r=ur(),[n,o]=qr(e,fC.variantKeys),{ref:i,as:s,baseRef:a,children:l,className:c,classNames:d,removeWrapper:p=!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:I,bottomContent:j,sortIcon:N,onRowAction:D,onCellAction:M,...V}=n,R=s||"table",K=typeof R=="string",O=ot(i),B=ot(a),U=yoe({...e,children:l,showSelectionCheckboxes:k});g&&!U.isKeyboardNavigationDisabled&&U.setKeyboardNavigationDisabled(!0);const{collection:W}=U,{layout:L,...Z}=e,{gridProps:T}=aoe({...Z},U,O),F=b!=="none",$=b==="multiple",H=x.useMemo(()=>fC({...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:O,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:I,bottomContent:j,removeWrapper:p,topContentPlacement:y,bottomContentPlacement:v,sortIcon:N,getBaseProps:oe,getWrapperProps:Q,getTableProps:le}}var cD=Xe((e,t)=>{var r,n,o;const{as:i,className:s,node:a,rowKey:l,slots:c,state:d,classNames:p,...m}=e,g=i||"td",b=typeof g=="string",y=ot(t),{gridCellProps:v}=tD({node:a},d,y),C=A(p?.td,s,(r=a.props)==null?void 0:r.className),{isFocusVisible:S,focusProps:k}=Ir(),P=d.selectionManager.isSelected(l),E=x.useMemo(()=>{const j=typeof a.rendered;return j!=="object"&&j!=="function"?h.jsx("span",{children:a.rendered}):a.rendered},[a.rendered]),I=((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:I.align,class:C}),children:E})});cD.displayName="HeroUI.TableCell";var dD=cD,fD=Xe((e,t)=>{var r,n;const{as:o,className:i,node:s,rowKey:a,slots:l,state:c,color:d,disableAnimation:p,checkboxesProps:m,selectionMode:g,classNames:b,...y}=e,v=o||"td",C=typeof v=="string",S=ot(t),{gridCellProps:k}=tD({node:s},c,S),{isFocusVisible:P,focusProps:E}=Ir(),{checkboxProps:I}=foe({key:s?.parentKey||s.key},c),j=A(b?.td,i,(r=s.props)==null?void 0:r.className),N=g==="single",{onChange:D,...M}=I,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:j}),children:N?h.jsx(jl,{children:I["aria-label"]}):h.jsx(qp,{color:d,disableAnimation:p,onValueChange:D,...Oe(m,M)})})});fD.displayName="HeroUI.TableCheckboxCell";var pD=fD,hD=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,state:c,isSelectable:d,classNames:p,...m}=e,g=o||(e?.href?"a":"tr"),b=typeof g=="string",y=ot(t),{rowProps:v}=uoe({node:a},c,y),C=A(p?.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:I,hoverProps:j}=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(),O=!R&&!K,B=a?.index?(a.index+1)%2===0:!1;return{isFirst:R,isLast:K,isMiddle:O,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(I),"data-last":ae(D),"data-middle":ae(M),"data-odd":ae(V),"data-selected":ae(E),...Oe(v,k,d?j:{},Lt(a.props,{enabled:b}),m),className:(n=l.tr)==null?void 0:n.call(l,{class:C}),children:s})});hD.displayName="HeroUI.TableRow";var mD=hD,gD=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:p,selectionMode:m,classNames:g,rowVirtualizer:b,...y}=e,v=n||"tbody",C=typeof v=="string",S=ot(t),{rowGroupProps:k}=f1(),P=A(g?.tbody,o),E=a?.body.props,I=E?.isLoading||E?.loadingState==="loading"||E?.loadingState==="loadingMore",j=[...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:!I&&E.emptyContent})})),I&&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(I),children:[N.map((V,R)=>{const K=j[V.index];return K?h.jsx(mD,{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(O=>O.props.isSelectionCell?h.jsx(pD,{checkboxesProps:p,classNames:g,color:c,disableAnimation:d,node:O,rowKey:K.key,selectionMode:m,slots:i,state:s},String(O.key)):h.jsx(dD,{classNames:g,node:O,rowKey:K.key,slots:i,state:s},String(O.key)))},String(K.key)):null}),M,D]})});gD.displayName="HeroUI.VirtualizedTableBody";var Poe=gD,m1=e=>typeof e=="number"?`${e}px`:e,bD=Xe((e,t)=>{var r,n,o,i,s;const{as:a,className:l,state:c,node:d,slots:p,classNames:m,sortIcon:g,...b}=e,y=a||"th",v=typeof y=="string",C=ot(t),{columnHeaderProps:S}=QN({node:d},c,C),k=A(m?.th,l,(r=d.props)==null?void 0:r.className),{isFocusVisible:P,focusProps:E}=Ir(),{isHovered:I,hoverProps:j}=dn({}),{hideHeader:N,align:D,width:M,minWidth:V,maxWidth:R,...K}=d.props,O=K.allowsSorting,B={};M&&(B.width=m1(M)),V&&(B.minWidth=m1(V)),R&&(B.maxWidth=m1(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=p.sortIcon)==null?void 0:i.call(p,{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(I),"data-sortable":ae(O),style:B,...Oe(S,E,Lt(K,{enabled:v}),O?j:{},b),className:(s=p.th)==null?void 0:s.call(p,{align:D,class:k}),children:[N?h.jsx(jl,{children:d.rendered}):d.rendered,O&&(W||h.jsx(_P,{strokeWidth:3,...U}))]})});bD.displayName="HeroUI.TableColumnHeader";var vD=bD,yD=Xe((e,t)=>{var r,n;const{as:o,className:i,children:s,node:a,slots:l,classNames:c,state:d,...p}=e,m=o||"tr",g=typeof m=="string",b=ot(t),{rowProps:y}=coe({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}),p),className:(n=l.tr)==null?void 0:n.call(l,{class:v}),children:s})});yD.displayName="HeroUI.TableHeaderRow";var xD=yD,wD=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:p}=f1(),m=A(a?.thead,o);return h.jsx(c,{ref:d,className:(r=s.thead)==null?void 0:r.call(s,{class:m}),...Oe(p,l),children:i})});wD.displayName="HeroUI.TableRowGroup";var CD=wD,SD=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,getBaseProps:d,getWrapperProps:p,getTableProps:m}=uD({...e,ref:t}),{rowHeight:g=40,maxTableHeight:b=600}=e,y=x.useCallback(({children:N})=>h.jsx(r,{...p(),ref:S,style:{height:b,display:"block"},children:N}),[p,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 I=rT({count:C,getScrollElement:()=>S.current,estimateSize:()=>g,overscan:5}),j=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,{...j,style:{height:`calc(${I.getTotalSize()+k}px)`,...j.style},children:[h.jsx(CD,{ref:E,classNames:i.classNames,slots:i.slots,children:o.headerRows.map(N=>h.jsx(xD,{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(nD,{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(vD,{classNames:i.classNames,node:D,slots:i.slots,state:i.state},D?.key)})},N?.key))}),h.jsx(Poe,{checkboxesProps:i.checkboxesProps,classNames:i.classNames,collection:i.collection,color:i.color,disableAnimation:i.disableAnimation,isSelectable:i.isSelectable,rowVirtualizer:I,selectionMode:i.selectionMode,slots:i.slots,state:i.state})]}),l==="inside"&&c]})}),l==="outside"&&c]})});SD.displayName="HeroUI.VirtualizedTable";var Eoe=SD,kD=Xe((e,t)=>{var r;const{as:n,className:o,slots:i,state:s,collection:a,isSelectable:l,color:c,disableAnimation:d,checkboxesProps:p,selectionMode:m,classNames:g,...b}=e,y=n||"tbody",v=typeof y=="string",C=ot(t),{rowGroupProps:S}=f1(),k=A(g?.tbody,o),P=a?.body.props,E=P?.isLoading||P?.loadingState==="loading"||P?.loadingState==="loadingMore",I=x.useMemo(()=>[...a.body.childNodes].map(D=>h.jsx(mD,{classNames:g,isSelectable:l,node:D,slots:i,state:s,children:[...D.childNodes].map(M=>M.props.isSelectionCell?h.jsx(pD,{checkboxesProps:p,classNames:g,color:c,disableAnimation:d,node:M,rowKey:D.key,selectionMode:m,slots:i,state:s},M.key):h.jsx(dD,{classNames:g,node:M,rowKey:D.key,slots:i,state:s},M.key))},D.key)),[a.body.childNodes,g,l,i,s]);let j,N;return a.size===0&&P.emptyContent&&(j=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}),!j&&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:[I,N,j]})});kD.displayName="HeroUI.TableBody";var Toe=kD,PD=Xe((e,t)=>{const{BaseComponent:r,Component:n,collection:o,values:i,topContent:s,topContentPlacement:a,bottomContentPlacement:l,bottomContent:c,removeWrapper:d,sortIcon:p,getBaseProps:m,getWrapperProps:g,getTableProps:b}=uD({...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(Eoe,{...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(CD,{classNames:i.classNames,slots:i.slots,children:o.headerRows.map(P=>h.jsx(xD,{classNames:i.classNames,node:P,slots:i.slots,state:i.state,children:[...P.childNodes].map(E=>{var I;return(I=E?.props)!=null&&I.isSelectionCell?h.jsx(nD,{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(vD,{classNames:i.classNames,node:E,slots:i.slots,sortIcon:p,state:i.state},E?.key)})},P?.key))}),h.jsx(Toe,{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]})});PD.displayName="HeroUI.Table";var ch=PD,Aoe=Coe,$n=Aoe,$oe=xoe,dh=$oe,_oe=Soe,fh=_oe,Ioe=woe,ph=Ioe,Noe=koe,_n=Noe;function wi({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(ch,{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(dh,{children:[h.jsx($n,{children:"Label"}),h.jsx($n,{children:"Waarde"})]}),h.jsx(ph,{children:t.map(n=>h.jsxs(fh,{children:[h.jsx(_n,{children:n.label}),h.jsx(_n,{children:n.value})]},n.key))})]})]})}function Doe({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:`${Fc(e.planVariant.contractTerm)}${e.planVariant.contractTerm===1?` ${n("detailsModal.contractTermTerminable")}`:""}`,key:"duration"}]:[{label:n("detailsModal.contractTerm"),value:`${Fc(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:$I(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(ma,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(wi,{title:n("detailsModal.network"),rows:s,classNames:t}),h.jsx(wi,{title:e.productType==="fixed"?n("detailsModal.subscription"):n("detailsModal.bundle"),rows:a,classNames:t}),h.jsx(wi,{title:n("detailsModal.bundleSpeed"),rows:l,classNames:t}),e.productType==="fixed"&&h.jsx(wi,{title:n("detailsModal.termsAndConditions"),rows:c,classNames:t})]})}function ED({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(Zv,{orientation:"horizontal",hideScrollBar:!0,children:[h.jsxs(ch,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o(),children:[h.jsxs(dh,{children:[h.jsx($n,{children:t("creditInfo.totalDeviceCost")}),h.jsx($n,{children:t("creditInfo.oneTimeFee")}),h.jsx($n,{children:t("creditInfo.totalCreditAmount")})]}),h.jsx(ph,{children:h.jsxs(fh,{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(ch,{removeWrapper:!0,isCompact:!0,disableAnimation:!0,classNames:o("mt-4"),children:[h.jsxs(dh,{children:[h.jsx($n,{children:t("creditInfo.monthlyPayment")}),h.jsx($n,{children:t("creditInfo.contractTerm")}),h.jsx($n,{children:t("creditInfo.fixedInterest")})]}),h.jsx(ph,{children:h.jsxs(fh,{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(t4,{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 Moe(e,t){return e===0?Ee.t("format.firstMonth",{count:t}):Ee.t("format.thenMonth",{count:t})}function ko({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 TD({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 Ooe({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:p,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(TD,{icon:h.jsx(p4,{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(ko,{label:`${r("format.monthly")} ${k} x ${Ve(S,{symbol:"€"})}`,price:Ve(S*k),classNames:v?.monthlyFee},`${k}-${S}`))}),s!==0&&h.jsx(ko,{label:r("format.oneTime"),price:Ve(s),classNames:v?.oneTimeFee}),h.jsx(ko,{label:`${o.name} ${r("detailsModal.activationFee")}`,price:Ve(m),classNames:v?.activationFee}),n==="fixed"&&h.jsx(ko,{label:`${o.name} ${r("detailsModal.installationFee")}`,price:Ve(y),classNames:v?.installationFee}),g!==0&&h.jsx(ko,{label:r("detailsModal.cashback"),price:`-${Ve(g)}`,classNames:v?.cashback}),p!==0&&h.jsx(ko,{label:r("detailsModal.cashback"),price:Ve(p),classNames:v?.cashback}),h.jsx(ql,{orientation:"horizontal",className:A("my-3",v?.separator)}),h.jsx(ko,{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(TD,{icon:h.jsx(zu,{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(ko,{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(ko,{label:r("detailsModal.priceWithSubscription"),price:Ve(c*k+s),classNames:C?.priceWithSubscription}),h.jsx(ko,{label:h.jsxs(h.Fragment,{children:[P===i.length-1?r("detailsModal.deviceBundle"):Moe(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(ko,{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(ko,{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(ED,{proposition:e})]})]})}function joe({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,p=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(wi,{title:o("detailsModal.internet"),rows:k,classNames:t}),P.length>0&&h.jsx(wi,{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?`${p} ${b} ${m}`:p,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(ma,{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(ma,{size:16})]}),key:"terms-conditions"}]:[];return h.jsxs("div",{className:A("text-sm space-y-4 pb-4",t?.base),children:[h.jsx(wi,{title:o("detailsModal.outsideBundle"),rows:y,classNames:t}),h.jsx(wi,{title:o("detailsModal.subscriptionFlexibility"),rows:v,classNames:t}),h.jsx(wi,{title:o("detailsModal.abroad"),rows:C,classNames:t}),h.jsx(wi,{title:o("detailsModal.termsAndConditions"),rows:S,classNames:t})]})}function Loe(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 Bc({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:p,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(di,{isOpen:p("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(li,{children:[h.jsx(ui,{children:h.jsx("span",{children:n("detailsModal.title")})}),h.jsxs(si,{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:Loe(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:[i1(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(HE,{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(Hl,{title:n("detailsModal.general"),onClick:()=>d("general"),children:h.jsx(Doe,{proposition:e,classNames:s?.general,buildClickOutUrl:r})},"general"),h.jsx(Hl,{title:e.productType==="fixed"?n("detailsModal.bundles"):n("detailsModal.conditions"),onClick:()=>d("conditions"),children:h.jsx(joe,{proposition:e,classNames:s?.terms,onChannelsClick:()=>d("channels"),buildClickOutUrl:r})},"conditions"),e.productType==="fixed"&&h.jsx(Hl,{title:n("detailsModal.channels"),onClick:()=>d("channels"),children:h.jsx(Hne,{channels:e.content.channels,hdChannels:e.content.hdChannels,classNames:s?.channels})},"channels"),h.jsx(Hl,{title:n("detailsModal.costs"),onClick:()=>d("costs"),children:h.jsxs("div",{className:A(s?.costOverview?.base),children:[h.jsx(II,{proposition:e,classNames:s?.costOverview}),h.jsx(Ooe,{proposition:e,classNames:s?.costOverview?.propositionOverview})]})},"costs")]})]})]})})}function AD({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 $D({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 _D({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($D,{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 ID({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(p4,{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 hh({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(Kx,{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,p)=>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(Tj,{size:20,className:A("shrink-0 text-success-600",o?.promotionIcon)}),h.jsxs("span",{children:[typeof d=="object"?d.shortDescription:d,r&&t&&p===0&&h.jsx(Kx,{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(di,{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(li,{children:[h.jsx(ui,{children:s?.publicTitle??""}),h.jsx(si,{children:h.jsx(O_,{children:s?.slideOutDescription??""})}),h.jsx(zi,{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 Foe({slug:e,size:t=16,className:r}){switch(e){case"contract-term":return h.jsx(Aj,{size:t,className:r});case"data-speed-down":return h.jsx(_j,{size:t,className:r});case"provider-network":return h.jsx(kj,{size:t,className:r});case"data-eu":return h.jsx(Dj,{size:t,className:r});case"internet-speed":return h.jsx(f4,{size:t,className:r});case"channels":return h.jsx(h4,{size:t,className:r});case"tv-receiver":return h.jsx($j,{size:t,className:r});default:return null}}function ND({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(Foe,{slug:n.slug,className:A(t?.icon)}),h.jsx("span",{children:n.title})]},n.title))})}function g1({productTitle:e,propositionTitle:t,propositionSubtitle:r,imageUrl:n,imageAlt:o,hasProduct:i,horizontal:s,propositionSpecifications:a,onInfoClick:l,classNames:c,imageWidth:d=70,imageHeight:p=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(ND,{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:p,src:m(n,d,p),srcSet:g(n,d,p),width:d,classNames:{wrapper:A("flex shrink-0",c?.phone?.providerImageWrapper),img:A("aspect-2/1",c?.phone?.providerImage)}})]}),!i&&h.jsx(ND,{propositionSpecifications:a,classNames:c?.proposition?.specifications,onInfoClick:l})]})}function DD({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:p,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),I=!!(n&&o&&i);return h.jsxs(Ms,{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(_D,{horizontal:!0,hasProduct:I,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(g1,{horizontal:!0,hasProduct:I,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:I?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(hh,{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(ID,{horizontal:!0,monthlyFeePromotionText:y,productPrice:S,monthlyFee:p,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(ma,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function Boe({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(AD,{label:e,classNames:{wrapper:r?.label?.wrapper,text:A("w-max",r?.label?.text)}}),h.jsx(DD,{classNames:r,...t})]}):h.jsx(DD,{classNames:r,...t})}function MD({onClick:e,onInfoClick:t,disabled:r,productTitle:n,productImageUrl:o,productImageAlt:i,propositionTitle:s,propositionSubtitle:a,propositionImageUrl:l,propositionImageAlt:c,propositionSpecifications:d,monthlyFee:p,tcoPerMonth:m,specialPromotions:g,modificationPromotions:b,monthlyFeePromotionText:y,urgentText:v,productStockStatus:C,productPrice:S,isExternalLink:k,classNames:P}){const{t:E}=Je(),I=!!(n&&o&&i);return h.jsxs(Ms,{as:"div",isDisabled:r,disableRipple:!0,disableAnimation:!0,shadow:"sm",radius:"lg",className:A("@container h-full",P?.card),children:[h.jsx(Eq,{className:A("p-3 pt-6 @xs:px-6",P?.verticalCard?.header),children:h.jsx(_D,{hasProduct:I,productImageUrl:o,productImageAlt:i,productStockStatus:C,propositionImageUrl:l,propositionImageAlt:c,classNames:P?.mainImage})}),h.jsxs(iT,{className:A("py-0 px-3 @xs:px-6 gap-2 overflow-hidden",P?.verticalCard?.body),children:[h.jsx(g1,{hasProduct:I,productTitle:n,propositionTitle:s,propositionSubtitle:a,propositionSpecifications:I?void 0:d,onInfoClick:t,imageUrl:l,imageAlt:c,classNames:P?.propositionHeader}),h.jsx(hh,{promotions:[...g,...b],urgentText:v,classNames:P?.promotionList})]}),h.jsx(ql,{className:A("mt-3",P?.verticalCard?.divider)}),h.jsxs(Pq,{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(ID,{monthlyFeePromotionText:y,productPrice:S,monthlyFee:p,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(ma,{size:16}):void 0,disableAnimation:!0,disableRipple:!0,children:E("propositionCard.cta")})]})]})}function zoe({label:e,...t}){const{results:{propositionCard:r}={}}=vt();return e?h.jsxs("div",{className:A("flex flex-col",r?.cardWrapper),children:[h.jsx(AD,{label:e,classNames:r?.label}),h.jsx(MD,{classNames:r,...t})]}):h.jsx(MD,{classNames:r,...t})}function qa({horizontal:e,...t}){return e?h.jsx(Boe,{...t}):h.jsx(zoe,{...t})}function b1(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 Zs(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 OD(e){return e.sort((t,r)=>{if(Zs(t)&&Zs(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 Zs(t)&&!Zs(r)?-1:Zs(r)&&!Zs(t)?1:r.weight-t.weight})}function Ga(e){const t=OD(e.specialPromotions.filter(l=>l.shortDescription&&!l.shortDescription.includes("toestelkorting")&&l.weight>200)),r=Zs(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 Ys(e){const t=e.filter(n=>Zs(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 Koe(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 p=[i?`${i}:1`:void 0,...s?s.map(m=>`${m.scope}:${m.value}`):[]].filter(Boolean).join(",");l.set("klantvoordeel",p)}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 zc({addClickoutSearchParams:e}){const{profile:t}=sn();async function r(n,o){const i=await Cne();return Koe(n,t,i,s=>(o?.(s),e?e(s):s))}return{buildClickOutUrl:r}}function mh({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(Pj,{size:20}),children:o(r?"productResults.loadMore":"productResults.showMoreOffers")})}function Voe({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 Roe({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(Voe,{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," ",Rne(e.number,e.numberAddon),", ",e.city]})]})]})}function gh(){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(e6,{className:"mb-6 lg:hidden"}),h.jsx(nu,{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 Za({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 Woe=void 0,v1=Object,jD=e=>e===Woe,Uoe=e=>typeof e=="function",bh=new WeakMap,Hoe=e=>v1.prototype.toString.call(e),y1=(e,t)=>e===`[object ${t}]`;let qoe=0;const x1=e=>{const t=typeof e,r=Hoe(e),n=y1(r,"Date"),o=y1(r,"RegExp"),i=y1(r,"Object");let s,a;if(v1(e)===e&&!n&&!o){if(s=bh.get(e),s)return s;if(s=++qoe+"~",bh.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=x1(e[a])+",";bh.set(e,s)}if(i){s="#";const l=v1.keys(e).sort();for(;!jD(a=l.pop());)jD(e[a])||(s+=a+":"+x1(e[a])+",");bh.set(e,s)}}else s=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},Goe=e=>{if(Uoe(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?x1(e):"",[e,t]},Zoe=e=>Goe(e?e(0,null):null)[0],w1=Promise.resolve(),vh=JP(ap,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:p=!1}=n,[,,,m]=fi.get(gv);let g;try{g=Zoe(t),g&&(g=GP+g)}catch{}const[b,y,v]=Ns(i,g),C=x.useCallback(()=>mt(b()._l)?s:b()._l,[i,g,s]);Md.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());ip(()=>{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]=Ns(i,N),O=K().data,B=[];let U=null;for(let W=0;W<R;++W){const[L,Z]=mc(t(W,p?null:U));if(!L)break;const[T,F]=Ns(i,L);let $=T().data;const H=a||D||mt($)||c&&!W&&!mt(O)||P||O&&!mt(O[W])&&!n.compare(O[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]=$};p?B.push(Y):await Y()}else V[W]=$;p||(U=$)}return p&&await Promise.all(B.map(W=>W())),y({_i:Gr}),V},n),I=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()):w1},[g,i]),j=x.useCallback(N=>{if(!g)return w1;const[,D]=Ns(i,g);let M;if(zo(N)?M=N(S()):typeof N=="number"&&(M=N),typeof M!="number")return w1;D({_l:M}),k.current=M;const V=[],[R]=Ns(i,g);let K=null;for(let O=0;O<M;++O){const[B]=mc(t(O,K)),[U]=Ns(i,B),W=B?U().data:Gr;if(mt(W))return I(R().data);V.push(W),K=W}return I(V)},[g,i,I,S]);return{size:S(),setSize:j,mutate:I,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}});function yh(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 Yoe({query:e,modificationBlocks:t,address:r,pageSize:n}){function o(i,s){return yh(JJ,e,t,n,i,s,r?{postcode:r.postcode,number:parseInt(r.number),numberAddon:r.numberAddon}:void 0)}return vh(o,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Joe({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return yh(XJ,e,t,r,o,i)}return vh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Xoe({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return yh(QJ,e,t,r,o,i)}return vh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function Qoe({query:e,modificationBlocks:t,pageSize:r}){function n(o,i){return yh(eX,e,t,r,o,i)}return vh(n,nn,{revalidateFirstPage:!1,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,use:[Yn]})}function xh({filterOptions:e,activeFilters:t,limit:r,productCategory:n,profile:o,distinctProperties:i}){const s=pI(n,o),a=oX({filterOptions:e,filterValues:t,limit:r,currentProvider:s,distinctProperties:i});switch(n){case"sim-only-proposition":{const l=gi(t,"providers");a.groupBy(Array.isArray(l)&&l.length===1?"data_and_speed":"provider");const c=Joe({query:a.serialize(),modificationBlocks:Lc(n,o),pageSize:r}),{data:d=[],error:p,...m}=c;return{...m,data:d[0],dataArray:d,error:p}}case"fixed-proposition":{a.groupBy("provider_data_speed_down");const l=Yoe({query:a.serialize(),modificationBlocks:Lc(n,o),address:o.address,pageSize:r}),{data:c=[],error:d,...p}=l;return{...p,data:c[0],dataArray:c,error:d}}case"smartphone-proposition":{const l=gi(t,"sorteren"),c=gi(t,"providers");a.groupBy(Array.isArray(c)&&c.length===1?"data_and_speed":"provider"),l==="relevantie"&&a.sort("top");const d=Xoe({query:a.serialize(),modificationBlocks:Lc(n,o),pageSize:r}),{data:p=[],error:m,...g}=d;return{...g,data:p[0],dataArray:p,error:m}}case"smartphone-proposition-extended":{const l=gi(t,"sorteren");a.groupBy(l==="relevantie"?"product_provider_slug":"product_slug");const c=Qoe({query:a.serialize(),modificationBlocks:Lc(n,o),pageSize:r}),{data:d=[],error:p,...m}=c;return{...m,data:d[0],dataArray:d,error:p}}default:return{data:void 0,dataArray:[],isLoading:!1,isValidating:!1,error:void 0,mutate:async()=>{},size:0,setSize:()=>{}}}}function wh({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 eie({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=mi(),{results:d}=vt(),{profile:p}=sn(),{filterOptions:m,activeFilters:g}=bi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=zc({addClickoutSearchParams:s}),{data:S,dataArray:k,isLoading:P,isValidating:E,size:I,setSize:j,mutate:N,error:D}=xh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:p}),{isReachingEnd:M,loadMore:V}=wh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:I,setSize:j,activeFilters:g,profile:p,limit:n}),R=k.flatMap(L=>L.search.records),{polling:K,validating:O}=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]),Bo(()=>{p.address&&N()},[p.address?.postcode,p.address?.number,p.address?.numberAddon,N]),D)throw new Error(String(D));if(!K&&!E&&R.length===0)return h.jsx(gh,{});const B=S&&"fetchInfo"in S?S.search.pageInfo.fastestDownloadSpeedProposition?.key:void 0,{top:U,all:W}=P?{top:[],all:[]}:a1({propositions:R,productCategory:e,labelColorConfig:r,fastestInternetPropositionKey:B});return h.jsxs("div",{tabIndex:(E||O)&&!K?-1:void 0,children:[K&&p.address&&h.jsx(Roe,{address:p.address}),h.jsxs("div",{className:A((E||O)&&!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(Za,{count:3,horizontal:i==="horizontal"}):U.map(L=>{if(p.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:Gs(L),urgentText:Ys(L.specialPromotions),specialPromotions:Ga(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(Za,{count:n,horizontal:o==="horizontal"}):W.map(L=>{const Z=p.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:Gs(L),urgentText:Ys(L.specialPromotions),specialPromotions:Ga(L),modificationPromotions:L.modificationPromotions},L.key)}),h.jsx(mh,{isReachingEnd:M,loadMore:V,isValidating:E,className:d?.loadMoreButton})]})]}),h.jsx(Bc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function tie({productCategory:e,showTopPropositions:t,labelColorConfig:r,limit:n,propositionCardLayout:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=mi(),{results:d}=vt(),{profile:p}=sn(),{filterOptions:m,activeFilters:g}=bi(),{openModal:b}=Qt(),[y,v]=x.useState(null),{buildClickOutUrl:C}=zc({addClickoutSearchParams:s}),{dataArray:S,isLoading:k,isValidating:P,size:E,setSize:I,error:j}=xh({filterOptions:m,activeFilters:g,limit:n,productCategory:e,profile:p}),{isReachingEnd:N,loadMore:D}=wh({lastPageLength:S[S.length-1]?.search.records.length,isValidating:P,size:E,setSize:I,activeFilters:g,profile:p,limit:n});if(j)throw new Error(String(j));const M=S.flatMap(K=>K.search.records);if(!P&&M.length===0)return h.jsx(gh,{});const{top:V,all:R}=k?{top:[],all:[]}:a1({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(Za,{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(O=>window.open(O,"_blank"))},onInfoClick:O=>{c({type:"details_viewed",proposition:K,tab:O}),v({proposition:K,tab:O}),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:cu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:Gs(K),urgentText:Ys(K.specialPromotions),specialPromotions:Ga(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(Za,{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(O=>window.open(O,"_blank"))},onInfoClick:O=>{c({type:"details_viewed",proposition:K,tab:O}),v({proposition:K,tab:O}),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:cu(K.content),propositionImageUrl:K.provider.imageUrl,propositionImageAlt:K.provider.name,propositionSpecifications:Gs(K),urgentText:Ys(K.specialPromotions),specialPromotions:Ga(K),modificationPromotions:K.modificationPromotions},K.key)),h.jsx(mh,{isReachingEnd:N,loadMore:D,isValidating:P,className:d?.loadMoreButton})]}),h.jsx(Bc,{proposition:y?.proposition,defaultTab:y?.tab,buildClickOutUrl:C})]})}function LD({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(Zv,{orientation:"horizontal",hideScrollBar:!0,children:h.jsxs(ch,{"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(dh,{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(ph,{children:e.map(o=>h.jsxs(fh,{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(t4,{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 rie({showTopPropositions:e,labelColorConfig:t,limit:r,propositionCardLayout:n,productCategory:o,topPropositionCardLayout:i,addClickoutSearchParams:s,onDealSelected:a}){const{t:l}=Je(),{onAction:c}=mi(),{results:d}=vt(),{profile:p}=sn(),{filterOptions:m,activeFilters:g,distinctProperties:b}=bi(),{openModal:y}=Qt(),[v,C]=x.useState(null),{buildClickOutUrl:S}=zc({addClickoutSearchParams:s}),{dataArray:k,isLoading:P,isValidating:E,size:I,setSize:j,error:N}=xh({filterOptions:m,activeFilters:g,limit:r,productCategory:o,profile:p,distinctProperties:b}),{isReachingEnd:D,loadMore:M}=wh({lastPageLength:k[k.length-1]?.search.records.length,isValidating:E,size:I,setSize:j,activeFilters:g,profile:p,limit:r});if(N)throw new Error(String(N));const V=k.flatMap(O=>O.search.records);if(!E&&V.length===0)return h.jsx(gh,{});const{top:R,all:K}=P?{top:[],all:[]}:a1({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(Za,{count:3,horizontal:i==="horizontal"}):R.map(O=>h.jsx(qa,{onClick:()=>{if(c({type:"deal_selected",proposition:O}),a)return a(O.key);S(`/aanbieding/${O.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:O,tab:B}),C({proposition:O,tab:B}),y("details")},label:O.label,isExternalLink:!a,horizontal:i==="horizontal",monthlyFee:Ve(O.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:qs(O.monthlyFees,O.baseMonthlyFee,O.lifetimeMonthlyFee),tcoPerMonth:Ve(O.tcoPerMonth,{dashed:!0}),productPrice:Ve(O.price,{dashed:!0}),propositionTitle:Kn(O.content.data,l("format.gigabyte")),propositionSubtitle:cu(O.content),propositionImageUrl:O.provider.imageUrl,propositionImageAlt:O.provider.name,propositionSpecifications:Gs(O),urgentText:Ys(O.specialPromotions),specialPromotions:b1(Ga(O),o1(O)),modificationPromotions:O.modificationPromotions},`top-${O.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(Za,{count:r,horizontal:n==="horizontal"}):K.map(O=>h.jsx(qa,{onClick:()=>{if(c({type:"deal_selected",proposition:O}),a)return a(O.key);S(`/aanbieding/${O.key}`).then(B=>window.open(B,"_blank"))},onInfoClick:B=>{c({type:"details_viewed",proposition:O,tab:B}),C({proposition:O,tab:B}),y("details")},label:O.label,isExternalLink:!a,horizontal:n==="horizontal",monthlyFee:Ve(O.monthlyFees[0]?.fee,{dashed:!0}),monthlyFeePromotionText:qs(O.monthlyFees,O.baseMonthlyFee,O.lifetimeMonthlyFee),tcoPerMonth:Ve(O.tcoPerMonth,{dashed:!0}),productPrice:Ve(O.price,{dashed:!0}),propositionTitle:Kn(O.content.data,l("format.gigabyte")),propositionSubtitle:cu(O.content),propositionImageUrl:O.provider.imageUrl,propositionImageAlt:O.provider.name,propositionSpecifications:Gs(O),urgentText:Ys(O.specialPromotions),specialPromotions:b1(Ga(O),o1(O)),modificationPromotions:O.modificationPromotions},O.key)),h.jsx(mh,{isReachingEnd:D,loadMore:M,isValidating:E,className:d?.loadMoreButton}),h.jsx(LD,{propositions:V.slice(0,3)})]}),h.jsx(Bc,{proposition:v?.proposition,defaultTab:v?.tab,buildClickOutUrl:S})]})}function nie({productCategory:e,limit:t,propositionCardLayout:r,addClickoutSearchParams:n,onDealSelected:o}){const{t:i}=Je(),{onAction:s}=mi(),{results:a}=vt(),{profile:l}=sn(),{filterOptions:c,activeFilters:d}=bi(),{openModal:p}=Qt(),[m,g]=x.useState(null),{buildClickOutUrl:b}=zc({addClickoutSearchParams:n}),{dataArray:y,isLoading:v,isValidating:C,size:S,setSize:k,error:P}=xh({filterOptions:c,activeFilters:d,limit:t,productCategory:e,profile:l}),{isReachingEnd:E,loadMore:I}=wh({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 j=y.flatMap(N=>N.search.records);return!C&&j.length===0?h.jsx(gh,{}):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(Za,{count:t,horizontal:r==="horizontal",large:!0}):j.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}),p("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:cu(N.content),propositionImageUrl:N.provider.imageUrl,propositionImageAlt:N.provider.name,propositionSpecifications:Gs(N),urgentText:Ys(N.specialPromotions),specialPromotions:b1(Ga(N),o1(N)),modificationPromotions:N.modificationPromotions},N.key)),h.jsxs("div",{className:"flex flex-col gap-2 col-span-full mt-4",children:[h.jsx(mh,{isReachingEnd:E,loadMore:I,isValidating:C,className:a?.loadMoreButton}),h.jsx(LD,{propositions:j.slice(0,3)})]}),h.jsx(Bc,{proposition:m?.proposition,defaultTab:m?.tab,buildClickOutUrl:b})]})}function oie({...e}){const{width:t}=ha(),{getActiveFilterValue:r}=bi(),n=t<768,o=t>=1024;switch(e.productCategory){case"fixed-proposition":return h.jsx(eie,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"smartphone-proposition":return r("telefoons").length===0?h.jsx(nie,{...e,productCategory:"smartphone-proposition-extended",propositionCardLayout:n||o?"vertical":"horizontal"}):h.jsx(rie,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});case"sim-only-proposition":return h.jsx(tie,{...e,propositionCardLayout:n?"vertical":"horizontal",topPropositionCardLayout:n||o?"vertical":"horizontal"});default:return null}}function iie({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:p,handleFilterRemove:m,getActiveFilterValue:g}=bi(),{profile:b}=sn(),{width:y}=ha(),v=y>=1024,[C]=e==="smartphone-proposition"?g("telefoons"):[],[S]=g("sorteren"),k=(()=>{if(typeof n=="boolean")return n;const{requireNumberPreservation:E,requireCustomerBenefits:I}=n;return(!E||!!b.currentProviderSlug)&&(!I||!!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(VZ,{productSlug:C,selectedDistinctProperties:c,onChange:(E,I)=>{if(!E&&C){m({slug:"telefoons",value:C}),d([]),S!=="relevantie"&&p({slug:"sorteren",value:"relevantie"});return}E&&(!C||E!==C)&&p({slug:"telefoons",value:E}),!C&&S!=="relevantie"&&p({slug:"sorteren",value:"relevantie"}),d(I)}}),v&&h.jsxs(h.Fragment,{children:[h.jsx(AI,{isFixed:P}),h.jsx(b6,{})]})]}),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(Vne,{}),v?h.jsx(e6,{}):h.jsx(aX,{children:h.jsx(AI,{isFixed:P})})]}),i&&h.jsxs("div",{className:"flex flex-col gap-3 w-full @4xl:flex-row empty:hidden",children:[h.jsx(uu,{variant:"numberPreservation",isFixed:P}),h.jsx(uu,{variant:"postcodeCheck",isFixed:P}),h.jsx(uu,{variant:"combiDeal",isFixed:P})]}),h.jsx(oie,{productCategory:e,addClickoutSearchParams:o,onDealSelected:s,showTopPropositions:g("providers").length!==1&&["relevantie","top"].includes(S)&&k,labelColorConfig:t,limit:r})]}),P?h.jsx(Bne,{}):h.jsx(PI,{}),h.jsx(SI,{isFixed:P}),h.jsx(j_,{})]})}function sie({classNames:e,initialSelectedFilters:t,initialProfile:r,onProfileChange:n,onError:o,onAction:i,...s}){return h.jsxs(B_,{onError:o,children:[h.jsx(SP,{classNames:e,children:h.jsx(K_,{onAction:i,children:h.jsx(wI,{initialProfile:r,onProfileChange:n,children:h.jsx(HJ,{initialSelectedFilters:t,productCategory:s.productCategory,children:h.jsx(PP,{children:h.jsx(iie,{...s})})})})})}),h.jsx(Dne,{})]})}function aie(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}=Li(e,t),{pressProps:p,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,p),y=Uu(),v=eg(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=p.onClick)==null||S.call(p,C),DL(C,y,e.href,e.routerOptions)}})}}function lie(e){var t,r,n,o;const i=ur(),[s,a]=qr(e,aC.variantKeys),{ref:l,as:c,children:d,anchorIcon:p,isExternal:m=!1,showAnchorIcon:g=!1,autoFocus:b=!1,className:y,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,...P}=s,E=c||"a",I=ot(l),j=(r=(t=e?.disableAnimation)!=null?t:i?.disableAnimation)!=null?r:!1,{linkProps:N}=aie({...P,onPress:v,onPressStart:C,onPressEnd:S,onClick:k,isDisabled:e.isDisabled,elementType:`${c}`},I),{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(()=>aC({...a,disableAnimation:j,className:y}),[jr(a),j,y]),K=x.useCallback(()=>({ref:I,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:p,showAnchorIcon:g,getLinkProps:K}}var FD=Xe((e,t)=>{const{Component:r,children:n,showAnchorIcon:o,anchorIcon:i=h.jsx(SW,{className:K8}),getLinkProps:s}=lie({ref:t,...e});return h.jsx(r,{...s(),children:h.jsxs(h.Fragment,{children:[n,o&&i]})})});FD.displayName="HeroUI.Link";var Ch=FD;function uie({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 cie({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(([p])=>l(!p.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(uie,{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(ma,{size:16}),disableAnimation:!0,disableRipple:!0,onPress:i,isDisabled:o,children:"Bestellen"})]})}var C1,BD;function die(){if(BD)return C1;BD=1;var e=D$();function t(r){return r&&r.length?e(r):[]}return C1=t,C1}var fie=die();const pie=$u(fie),zD="|",hie=/plv-\d+/g,mie=/pvu?-\d+/g,gie=/pvu?-(\d+)/,bie=/^\d+-\d+/g,vie=/hc\d{1,2}-\d{1,2}(_\d{1,2})?/g,yie=/^(\d+)-\d+/,xie=/m\d+-\d+/g,wie=/m(\d+)-\d+/;function Kc(e){return pie(e.filter(Boolean)).sort().join(zD)}function KD(e){return e.split(zD)}function Sh(e,t){if(t===0)return[[]];if(!t)return Sh(e,e.length);const[r,...n]=e;return[...Sh(n,t-1).map(o=>[r,...o]),...Sh(n,t-1)]}function Cie(e){return Sh(KD(e)).map(Kc)}function VD(e){return decodeURI(e).replace(/:/gi,"|").replace(/%3A/gi,"|").replace(/%7C/gi,"|")}const Sie={planVariant:hie,phoneVariant:mie,bundleSet:bie,handsetCredit:vie,modification:xie};function pn(e){const t=Sie[e];return r=>r.match(t)!==null}const kie={bundleTypeSet:yie,modificationGroup:wie,productVersionId:gie};function Js(e){const t=kie[e];return r=>(r.match(t)||["",""])[1]}class Ya{unitKeys=[];constructor(t){this.update(t)}update(t){this.unitKeys=KD(VD(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)&&Js("bundleTypeSet")(n)===t)),...r]}toggleBundleSet(t,r){const n=this.unitKeys.includes(t),o=this.unitKeys.filter(i=>Js("bundleTypeSet")(i)===Js("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&&Js("productVersionId")(t)}modification(){return this.unitKeys.find(pn("modification"))}modifications(){return this.unitKeys.filter(pn("modification"))}modificationGroups(){return this.unitKeys.filter(pn("modification")).map(Js("modificationGroup"))}handsetCredit(){return this.unitKeys.find(pn("handsetCredit"))}bundleSets(){return this.unitKeys.filter(pn("bundleSet"))}bundleTypeSets(){return this.unitKeys.filter(pn("bundleSet")).map(Js("bundleTypeSet"))}key(){return Kc(this.unitKeys)}urlKey(){return this.unitKeys.join(":")}scope(){return Kc(this.unitKeys.filter(t=>pn("planVariant")(t)||pn("phoneVariant")(t)))}base(){return Kc(this.unitKeys.filter(t=>!pn("handsetCredit")(t)))}combinations(){return Cie(this.key())}}function Pie(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 RD=x.createContext({isLoading:!1,error:void 0,notFound:!1,propositionKey:new Ya(""),proposition:null,propositionSelector:null,setProductVersion:e=>{},setPlanVariant:e=>{},setHandsetCredit:e=>{},toggleBundleSet:e=>{}}),Eie=dt`
|
|
1323
1327
|
fragment ProductCardProduct on ProductVersion {
|
|
1324
1328
|
id
|
|
1325
1329
|
slug
|
|
@@ -1400,7 +1404,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1400
1404
|
}
|
|
1401
1405
|
}
|
|
1402
1406
|
}
|
|
1403
|
-
`,Tie=
|
|
1407
|
+
`,Tie=dt`
|
|
1404
1408
|
${Mv}
|
|
1405
1409
|
${Eie}
|
|
1406
1410
|
|
|
@@ -1509,7 +1513,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1509
1513
|
}
|
|
1510
1514
|
}
|
|
1511
1515
|
}
|
|
1512
|
-
`,Aie=
|
|
1516
|
+
`,Aie=dt`
|
|
1513
1517
|
query propositionSelector(
|
|
1514
1518
|
$key: String!
|
|
1515
1519
|
$productType: String!
|
|
@@ -1611,7 +1615,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1611
1615
|
creditFee
|
|
1612
1616
|
}
|
|
1613
1617
|
}
|
|
1614
|
-
`;function $ie(e,t){if(!t)return e;const r=new Ya(e);return r.bundleSets().includes(t)?e:(r.setBundleSetsByBundleTypeSet(Js("bundleTypeSet")(t),[t]),r.key())}function WD(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 UD(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 _ie(e,t){return{...e,planVariants:WD(e.planVariants,t?.contractTerms,e.planVariant?.contractType),bundleTypeSets:e.bundleTypeSets.map(r=>({...r,bundleSets:UD(r,r.bundleSets,t)}))}}function HD(e,t){const r=t.combinations();return e.filter(n=>r.includes(n.unitKey)).flatMap(n=>n.blacklist)}function qD(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 S1(e,t){const r=[];e.map(o=>Pie(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 Iie=
|
|
1618
|
+
`;function $ie(e,t){if(!t)return e;const r=new Ya(e);return r.bundleSets().includes(t)?e:(r.setBundleSetsByBundleTypeSet(Js("bundleTypeSet")(t),[t]),r.key())}function WD(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 UD(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 _ie(e,t){return{...e,planVariants:WD(e.planVariants,t?.contractTerms,e.planVariant?.contractType),bundleTypeSets:e.bundleTypeSets.map(r=>({...r,bundleSets:UD(r,r.bundleSets,t)}))}}function HD(e,t){const r=t.combinations();return e.filter(n=>r.includes(n.unitKey)).flatMap(n=>n.blacklist)}function qD(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 S1(e,t){const r=[];e.map(o=>Pie(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 Iie=dt`
|
|
1615
1619
|
query searchAvailableFixedProposition(
|
|
1616
1620
|
$query: ElasticQuery!
|
|
1617
1621
|
$postcode: String!
|