PageSourceSearch

https://www.nameclub.com/web/assets/BhCObGnq.js

js nameclub.com collected 2026-10-09 22:41:35 UTC 7,885 bytes, 1 lines download raw bytes

1import{as as wt,Y as d,E as R,k as h,aE as Q,B as b,a7 as Dt,y as _t,aF as G,X as V,v as u,aa as Et}from"./CYMs3uwY.js";import{P as Mt,A as kt}from"./rOmQOW4P.js";async function Pt(...r){const f=typeof r[r.length-1]=="string"?r.pop():void 0;typeof r[0]!="string"&&r.unshift(f);const[s,i,p]=r;if(!s||typeof s!="string")throw new TypeError("[nuxt] [callOnce] key must be a string: "+s);if(i!==void 0&&typeof i!="function")throw new Error("[nuxt] [callOnce] fn must be a function: "+i);const c=wt();(p==null?void 0:p.mode)==="navigation"&&c.hooks.hookOnce("page:start",()=>{c.payload.once.delete(s)}),!c.payload.once.has(s)&&(c._once=c._once||{},c._once[s]=c._once[s]||i()||!0,await c._once[s],c.payload.once.add(s),delete c._once[s])}const W=()=>({addTransferInItem:a=>d.post("/shopping-cart/add-transfer-in-item",a,{cartId:a.cartId}),addBuyListingItem:a=>d.post("/shopping-cart/add-buy-listing-item",{},a),checkout:a=>d.post("/shopping-cart/checkout",void 0,a),getPaymentInfo:(a,m)=>d.get("/shopping-cart/payment-info",{cartId:a,currency:m}),addLogoBuilderProItem:a=>d.post("/shopping-cart/add-logo-builder-pro-item",a,{cartId:a.cartId}),addNameclubDomainRenewItem:a=>d.post("/shopping-cart/add-nameclub-domain-renew-item",a),setItemAutoRenew:a=>d.post("/shopping-cart/item/auto-renew",void 0,a),previewInstallmentCost:a=>d.post("/shopping-cart/preview-installment-cost",a),calculateCost:a=>d.post("/shopping-cart/calculate-cost",a)}),Ot=r=>{const{previewInstallmentCost:f}=W(),s=R(),i=h();return b(r,async p=>{if(p)try{const c=await f(p);i.value=c.data}catch(c){i.value=void 0;const y=c;y!=null&&y.msg?s.handleError({message:y.msg}):s.handleError()}}),{previewInstallmentCostData:i}},At=(r,{onShoppingcartNotFound:f=()=>{}})=>{const{calculateCost:s}=W(),i=R(),p=h(),c=h(!1),S=Q(async()=>{if(r.value){c.value=!0;try{const v=await s(r.value);p.value=v.data}catch(v){p.value=void 0;const a=v;if((a==null?void 0:a.code)===52006)return f();a!=null&&a.msg?i.handleError({message:a.msg}):i.handleError()}finally{c.value=!1}}},100);return b(r,S),{partitionCart:p,getPartitionCart:S,partitionCartStatus:c}},Ft="nc_cart_id",Tt="nc_destination",X="cart_item_selected_ids",q=0,Rt=0,z=-1,J=-1,Nt=Dt("shoppingCartStore",()=>{const r=_t(),f=R(),s=G(Ft,{default:()=>""}),i=G(Tt,{default:()=>0}),p=h(!0),c=h(!1),y=h("cartViewStep"),S=h(),v=h(),a=h(),m=h({}),D=h(!1),Z=()=>{S.value=void 0,D.value=!1},L=V({}),tt={cartId:s.value,isOpenEdgeShoppingCart:!1,cartItemsCount:q,paymentAnchor:Rt,destination:i.value,selectedMethod:J,orderId:z,payLink:"",callbackUrl:"",paymentMethodForm:void 0},o=V({...tt}),et=u(()=>({cartId:s.value,currency:r.currency,destination:i.value})),I=u(()=>Object.keys(m.value).filter(t=>m.value[t])),_=u(()=>{var t,e;return((e=(t=v.value)==null?void 0:t.groups)==null?void 0:e.filter(l=>!l.isInvalid).map(l=>l.itemId))||[]}),M=u(()=>I.value.length>0?I.value.length:_.value.length),k=u({get:()=>{const t=_.value;return t.length>0&&t.every(e=>m.value[e])},set:t=>{_.value.forEach(e=>{m.value[e]=t})}}),at=u(()=>{var t,e;return I.value.length>0?I.value.length:((e=(t=v.value)==null?void 0:t.groups)==null?void 0:e.length)||0}),P=u(()=>{const t=I.value.join(","),e=_.value.join(",");return I.value.length>0?t:e}),nt=u(()=>{var t,e;return M.value===0?`${(t=r.currencyObj)==null?void 0:t.symbol}0.00`:(e=A.value)==null?void 0:e.totalPrice}),ot=u(()=>ct.value),N=u(()=>{var t;return((t=a.value)==null?void 0:t.needImproveAccountInfo)===!0}),x=u(()=>{var g;const t=(g=B.value)==null?void 0:g.isDestinationSupported,e=o.selectedMethod,l=Ct(e,o.paymentMethodForm),n=e!==void 0&&e>=0;return!!(t&&l&&n)}),st=u(()=>!(M.value>0)||!x.value||N.value||H.value);let O=0;const w=async()=>{var t,e,l;try{const n=await d.get("/shopping-cart/get",et.value);if(O=0,v.value=n.data,v.value){o.cartItemsCount=((t=v.value.groups)==null?void 0:t.length)||0,T(v.value.cartId);{const g=((e=localStorage.getItem(X))==null?void 0:e.split(","))||[];(l=v.value.groups)==null||l.forEach(C=>{g.includes(C.itemId)&&(m.value[C.itemId]=!0,y.value!=="cartPaymentStep"&&C.isInvalid&&(m.value[C.itemId]=!1))})}}}catch(n){console.error("Failed to refresh cart data:",n),(n==null?void 0:n.code)===52006&&O<2&&U()}},U=Q(async()=>{T(""),await Et(),v.value=void 0,m.value={},w(),O++},300),{partitionCart:A,getPartitionCart:rt,partitionCartStatus:ct}=At(u(()=>{if(!s.value)return;const t=new FormData;return t.append("currency",r.currency),t.append("selectedItemIds",P.value),t.append("destination",o.destination.toString()),t.append("cartId",s.value),t}),{onShoppingcartNotFound:U}),{previewInstallmentCostData:j}=Ot(u(()=>{var e;if(!D.value)return;const t=new FormData;return t.append("cartId",s.value),t.append("currency",r.currency),t.append("destination",o.destination.toString()),t.append("totalInstallment",((e=S.value)==null?void 0:e.toString())||"0"),t.append("selectedItemIds",P.value),t})),B=u(()=>D.value&&j.value?j.value:A.value),lt=()=>Pt(async()=>{await w(),p.value=!1},"$mrSlpKiKx0"),F=()=>{o.cartItemsCount=q,K(0),o.selectedMethod=J,o.cartId="",s.value=""},it=()=>{o.payLink="",o.orderId=z,o.callbackUrl=""},T=t=>{s.value=t,o.cartId=t},ut=t=>{o.isOpenEdgeShoppingCart=typeof t=="boolean"?t:!o.isOpenEdgeShoppingCart},K=async t=>{i.value=t,o.destination=t},dt=async t=>{o.selectedMethod=t},pt=t=>{y.value=t},vt=()=>{k.value=!k.value},mt=t=>{o.paymentMethodForm=t},ht=(t,e)=>
1{L[t]=e},Y=()=>L[o.selectedMethod],H=u(()=>{const t=Y();return t&&!t.validateForm()}),gt=async()=>{F(),await w(),it()},yt=()=>({refresh:w,handleRemoveItem:async l=>{const n={cartId:o.cartId,currency:r.currency,itemId:l};try{(await d.post("/shopping-cart/delete",void 0,n)).msg==="success"&&(m.value[l]&&(m.value[l]=!1),await w())}catch(g){f.handleError({message:g.msg})}},handleClearCart:async()=>{$.value=!1;const l={cartId:o.cartId,currency:r.currency};try{(await d.post("/shopping-cart/clear",void 0,l)).msg==="success"&&(F(),await w(),m.value={})}catch(n){f.handleError({message:n.msg})}}}),ft=()=>{const t={cartId:o.cartId,currency:r.currency},e=async()=>{try{const n=await d.get("/shopping-cart/payment-info",t);a.value=n.data}catch(n){console.error("Failed to retrieve payment information metadata:",n)}};return{refresh:e,handleLinkAccount:async(n,g)=>{const C={registrar:n,apiKey:g},E=await d.post("/user-cp/linked-registrar/link-account",void 0,C);return E.msg==="success"&&await e(),{res:E}}}},It=t=>{const e={cartId:o.cartId,currency:r.currency,paymentMethod:o.selectedMethod,destination:o.destination,selectedItemIds:P.value.split(",").filter(Boolean),totalInstallment:D.value?S.value:void 0};return d.post("/shopping-cart/checkout",{daContext:t,...e})},Ct=(t,e)=>t===Mt.CARD.value?St(e):!0,St=t=>{if(!t)return!1;const e=t;if(!e.savedPaymentMethodId||e.savedPaymentMethodId===kt){const{number:l,securityCode:n,holderName:g,expiryYear:C,expiryMonth:E}=t;if(!l||l.length<13||l.length>19||!n||n.length<3||n.length>4||!g||!C||C.length>2||!E||E.length>2)return!1}else{const{savedPaymentMethodId:l,securityCode:n}=t;if(!l||!n||n.length<3||n.length>4)return!1}return!0};b(I,()=>{I.value&&!p.value&&localStorage.setItem(X,I.value.join(","))});const $=h(!1);return{shoppingCart:o,setCartId:T,resetShoppingCart:F,clearAllCart:gt,setEdgeShoppingCart:ut,setDestination:K,setPaymentMethod:dt,cartData:v,processData:yt,paymentInfoData:a,processPaymentInfoData:ft,refreshShoppingCart:w,setPaymentMethodForm:mt,checkout:It,isInvalidMethodForm:H,setPaymentMethodFormRef:ht,getPaymentMethodFormRef:Y,currentMode:y,setCurrentMode:pt,selectedIds:m,validItemIds:_,isAllSelected:k,toggleSelectAll:vt,subTotal:nt,itemCount:at,subTotalLoading:ot,canCheckout:x,shouldShowContactForm:N,isPaymentCheckoutDisabled:st,checkoutLoading:c,partitionCart:A,cartDataUsedOnPayment:B,checkoutCount:M,partitionDataRefresh:rt,installmentCount:S,initShoppingCart:lt,isInstallment:D,resetInstallmentStatus:Z,showClearComfirmOverlay:$}});export{W as a,Pt as c,Nt as u};

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.