1import{dU as q,ah as F,dm as I,dn as N,r as g,d as A,dV as L,a as s,b as v,c as i,b6 as U,f as e,s as y,aZ as D,F as w,L as H,w as S,aR as Z,aS as z,p as x,t as k,ab as Q,m as X,l as j,v as f,dC as G,cb as J,dZ as K,o as O,Z as W,aa as E,e as R,d_ as Y,ai as V}from"./index-DcSVvNrM.js";import{_ as ee}from"./Breadcrumbs.vue_vue_type_script_setup_true_lang-CUc-InVy.js";import{a as M,c as te}from"./marketplace-B6Bs0ObQ.js";import{_ as ae,u as se,a as oe}from"./ProductSearchInput.vue_vue_type_script_setup_true_lang-E5VqCiF9.js";import{_ as ne}from"./EsimBalanceButton.vue_vue_type_style_index_0_lang-PSNKIF2o.js";async function ce(){const u=q(),{setPageProperties:n}=F(),{catchError:m}=I(),c=g([]),r=g(null),p=g(!1);async function l(){await m(async()=>{const a=await u.getEsimConfig(),_=await u.getProducts(["esim"]);c.value=_[0].products??[],r.value=a,p.value=!0,c.value.forEach(d=>{d.route=M(d.id,"esim")}),n({title:a.metaTitle,meta:{description:a.metaDescription},schema:a.faq.length>0?te(a.faq):void 0})})}return await N({onServer:l,onHydration:l,onAfterClientRender:async()=>{c.value.length===0&&await l()}}),{products:c,esimConfig:r,isReady:p}}const ie={class:"product-list"},le={key:2,class:"product-list__grid"},re={class:"product-list__content"},ue={class:"product-list__name"},de={class:"product-list__details"},me=A({__name:"ProductList",props:{products:{},searchable:{type:Boolean},searchPlaceholder:{},initialCount:{},expandButtonText:{type:Function}},setup(u){const n=u,{t:m}=L(),c=g(!1),{searchQuery:r,isSearching:p,isEmpty:l,filteredProducts:a}=se(f(()=>n.products),["name"]),_=f(()=>c.value?a.value:a.value.slice(0,n.initialCount)),d=f(()=>a.value.length>n.initialCount&&!c.value),b=f(()=>a.value.length-n.initialCount),C=f(()=>n.expandButtonText(b.value));function P(){c.value=!0}return(o,h)=>(s(),v("div",ie,[u.searchable?(s(),i(ae,{key:0,modelValue:e(r),"onUpdate:modelValue":h[0]||(h[0]=t=>U(r)?r.value=t:null),class:"product-list__search",placeholder:u.searchPlaceholder},null,8,["modelValue","placeholder"])):y("",!0),e(p)&&e(l)?(s(),i(e(D),{key:1,text:e(m)("common.nothingFound")},null,8,["text"])):(s(),v("div",le,[(s(!0),v(w,null,H(_.value,t=>(s(),i(e(Q),{key:t.id,class:"product-list__item",to:t.route??e(M)(t.id)},{default:S(()=>[t.cardImageUuid?(s(),i(e(Z),{key:0,class:"product-list__image",data:e(z)({uuid:t.cardImageUuid,width:80,height:80}).data,rounded:!0,bordered:!0,disablePreview:!0},null,8,["data"])):y("",!0),x("div",re,[x("p",ue,k(t.name),1),x("p",de,k(t.details),1)])]),_:2},1032,["to"]))),128))])),d.value?(s(),i(e(j),{key:3,class:"product-list__expand",size:"l",type:"minimal",onClick:P},{default:S(()=>[X(k(C.value),1)]),_:1})):y("",!0)]))}}),pe={class:"esim-page__breadcrumbs"},_e={class:"esim-page__title"},he={class:"esim-page__description"},ge=A({__name:"Esim",async setup(u){let n,m;const{t:c,p:r}=L(),{products:p,isReady:l,esimConfig:a}=([n,m]=G(()=>ce()),n=await n,m(),n),{isHidden:_}=J(),{isHidden:d}=K(),b=f(()=>[{label:c("marketplace.home.breadcrumbTitle"),to:V({name:"Marketplace"})},{label:c("marketplace.esim.breadcrumbTitle"),to:V({name:"MarketplaceEsim"})}]),C=({bar:o,gapX:h})=>[[[o("130px")],[h("30px")],[o("130px")]]],P=({bar:o,gapX:h,gapY:t})=>[[t("8px")],[o("45%","24px")],[t("18px")],[o("80%","18px")],[t("8px")],[o("80%","18px")],[t("8px")],[o("60%","18px")],[t("32px")],[o("100%","44px")],[t("32px")],[o("50%","74px")],[t("8px")],[o("50%","74px")],[t("8px")],[o("50%","74px")]];return O(()=>{_.value=!0,d.value=!0}),W(()=>{_.value=!1,d.value=!1}),(o,h)=>{var t;return s(),v(w,null,[x("div",pe,[e(l)?(s(),i(e(ee),{key:1,items:b.value},null,8,["items"])):(s(),i(e(E),{key:0,schema:C}))]),R(e(Y),{class:"esim-page"},{default:S(()=>{var $,B;return[e(l)?(s(),v(w,{key:1},[x("h1",_e,k(($=e(a))==null?void 0:$.title),1),x("p",he,k((B=e(a))==null?void 0:B.description),1),R(ne,{class:"esim-page__balance-button"}),e(l)?(s(),i(me,{key:0,products:e(p),searchable:!0,"search-placeholder":e(c)("marketplace.esim.searchPlaceholder"),"expand-button-text":T=>e(r)("marketplace.esim.showMore",T,{excludeNumber:!0}),"initial-count":20},null,8,["products","search-placeholder","expand-button-text"])):y("",!0)],64)):(s(),i(e(E),{key:0,schema:P}))]}),_:1}
1),(t=e(a))!=null&&t.faq?(s(),i(oe,{key:0,data:e(a).faq},null,8,["data"])):y("",!0)],64)}}});export{ge as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.