PageSourceSearch

https://radiare.ai/cdn/shopifycloud/checkout-web/assets/c1/01f1d1bd.t6GhMZ9b.js

js radiare.ai collected 2026-10-05 13:29:00 UTC 10,638 bytes, 1 lines download raw bytes

1import{z as e,h as t,aa as a,R as n,s as r,k as l,u as i,m as o,T as s,p as c,g as u,w as d,L as h}from"./2c1ab0fe.XVnTovwp.js";import{cW as m,H as p,f as v,L as b,S as f,b as g,h as y,a9 as _,i as w,a8 as x,a0 as k,bz as T,r as S,j as A,k as I,aa as j,cX as q,d as V,aA as z,ax as E,ay as N,az as P,au as R,as as D,av as $,cY as C}from"./164ad2e3.hrg71Gqs.js";import{S as L}from"./79974aab.Di299gsN.js";import{a as U,j as M,p as W,b5 as H,z as G}from"./f67abd2c.DYpmk7mw.js";import{u as B}from"./5fda1420.DrrBq7aV.js";import{u as O,S as F}from"./71ae3d5c.DAFuGUTz.js";import{S as Q}from"./app.Bke-0Cv3.js";import{d as X}from"./b8733b27.DWzot3ty.js";import"./d0bb51ec.Bel_y502.js";import"./60a453ce.Al5ISuVm.js";import"./e12db40c.D-IRYT_x.js";import"./9dba8418.C8BcPjk_.js";import"./2495faa4.BfsiRcE8.js";function Y(){const[a,n]=e("undefined"==typeof document?"visible":document.visibilityState);return t(()=>{const e=()=>n(document.visibilityState);return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}},[]),a}function Z(e){return!1===e.available}const J={id:"186ea50e2b37f36013ff760cddcee64b27d2785edc79d3078d8bb95e4186410b",type:"query",name:"ThrottlePoll",source:"query ThrottlePoll($token:String!,$variantIdsV2:[Int!]){poll(token:$token,variantIdsV2:$variantIdsV2){...on PollContinue{token pollAfter queueEtaSeconds productVariantAvailabilityV2{available id __typename}__typename}...on PollComplete{token __typename}__typename}}"};class K extends Q{constructor(){super(...arguments),this.name="ThrottleError",this.defaultGroupingHash="ThrottleError::Exiting::Status"}}class ee extends Q{constructor(){super(...arguments),this.name="UnactionableThrottleError",this.unactionable=!0}}function te(){const[r,l]=e(null),i=m(),o=a(),[s,c]=e(),{checkout:{negotiator:u},graphql:{throttleGraphql:d},observability:h}=U(),{value:p}=u.current.fields.merchandiseLines,v=u.throttleState.value;if(t(()=>{l(e=>e??new Date)},[]),function(e,a){const r=M(async()=>{if("queued"===v.status)try{const e=p?p.lines.filter(e=>e.variantId).map(e=>ae(e.variantId)):[],{data:t,error:a}=await d.staticQuery(J,{cache:!1,variables:{token:v.token,variantIdsV2:e}});if(!i.current)return;if(a)throw a;if(!t)throw new K("Throttle poll did not return data",{groupingHash:"ThrottleError::PollMissingReturnData"});const n=function({poll:e},t){if("PollContinue"===e.__typename)return{status:"queued",pollAfter:new Date(e.pollAfter).getTime(),token:e.token,queueEtaSeconds:e.queueEtaSeconds??void 0,productVariantAvailabilityV2:e.productVariantAvailabilityV2,pollUrl:t.pollUrl};if("PollComplete"===e.__typename)return{status:"complete",token:e.token,productVariantAvailabilityV2:t.productVariantAvailabilityV2};throw new K("unable to handle Throttle type",{groupingHash:"ThrottleError::ThrottleType"})}(t,v);"queued"===n.status&&v?.pollAfter===n.pollAfter&&(n.pollAfter=Date.now()+1e3),u.setThrottle(n),l(new Date),o.reset()}catch(e){const t=o.next(),a=t.done,r=X(e),l=e instanceof n?e.response.status:void 0;if(a)return c(new(r.actionable?K:ee)("Throttle exited on maximum retries",{cause:e})),void h.counter({name:"throttle_exited_on_maximum_retries",value:1});if(l&&l<500)return void c(new(r.actionable?K:ee)(`Throttle exiting on ${l} status`,{cause:e}));u.setThrottle({...v,pollAfter:Date.now()+t.value})}}),s=Y();t(()=>{if(!a)return;const e=Math.max(a-Date.now(),0);if(0!==e){const t=setTimeout(r.current,e);return()=>clearTimeout(t)}r.current()},[a,r,s])}(0,"queued"===v.status?v.pollAfter:void 0),s)throw s;return{throttle:v,lastUpdated:r}}function ae(e){return parseInt(W(e),10)}function ne({inventoryStatus:e}){const{i18n:t,shop:{hasStorefront:a},url:n,checkout:{configuration:r}}=U(),l="empty"===e?t.translate("stock.empty_cart_label"):t.translate("throttle.inventory.sold_out.heading"),o="empty"===e?t.translate("stock.return_to_store_label"):t.translate("throttle.inventory.sold_out.link");return i(f,{gap:"small-200",alignItems:"center",padding:"large-300",children:[i(p,{level:1,children:l}),a&&"unavailable"===e&&i(v,{size:"large",textAlign:"center",children:t.translate("throttle.inventory.sold_out.storefront_body")}),a&&r.allowRedirectToStorefront&&i(v,{textAlign:"center",children:i(b,{href:n.storefront(),children:o})}),!a&&"unavailable"===e&&i(v,{size:"large",textAlign:"center",children:t.translate("throttle.inventory.sold_out.no_storefront_body")})]})}function re({heading:e,details:t,children:a}){return i(y,{borderRadius:"base",border:"base",children:[i(g,{padding:"large-200",accessibilityRole:"header",children:i(f,{direction:"inline",gap:"small-200",alignItems:"baseline",children:[i(p,{level:2,children:e}),t?i(v,{color:"subdued",type:"small",children:t}):null]})}),i(g,{borderWidth:"base none none none",padding:"large-200",children:a})]})}function le(){const{i18n:e}=U();return i(x,{tone:"warning",errorType:_.InventoryError,children:i(v,{type:"small",children:i(w,{type:"strong",children:e.translate("throttle.inventory.partial_inventory_banner")})})})}function ie({barCount:e=7}){const t={"--ProgressBar-width":13*e+"px"},a=[];for(let n=0;n<e;n++)a.push(i("div",{className:o("zetxR")},n));return i("div",{className:"NMORO",style:t,children:a})}function oe(){const{checkout:e,i18n:t}=U(),a=e.negotiator.throttleState.value,n="queued"===a.status?a.queueEtaSeconds:0,r=s(()=>null==n?t.translate("throttle.estimated_wait_time.calculating"):n<60?t.translate("throttle.estimated_wait_time.less_than_one"):t.translate("throttle.estimated_wait_time",{count:Math.round(n/60)}),[n,t]);return i(f,{alignItems:"center",gap:"large-200",padding:"large-200",children:[i(ie,{}),i(f,{gap:"small-200",alignItems:"center",children:[i(p,{level:1,textAlign:"center",children:t.translate("throttle.line_to_check_out")}),i(v,{size:"base",children:r})]})]})}function se(){const{i18n:e}=U(),t=e.translate("throttle.merchandise.available").trim();return 0===t.length?null:i(v,{children:i(f,{direction:"inline",gap:"small-400",alignItems:"center",children:[i(k,{size:"small-200",tone:"success",type:"check"}),i(w,{type:"strong",tone:"success",size:"small",children:i("span",{className:"broxv",children:t})})]})})}function ce(){const{i18n:e}=U(),t=e.translate("throttle.merchandise.sold_out").trim();return 0===t.length?null:i(T,{children:i(f,{direction:"inline",gap:"small-400",alignItems:"center",children:[i(k,{size:"small-200",tone:"critical",type:"disabled"}),i(w,{size:"small",children:i("span",{className:"hG8Tu",children:t})})]})})}function ue(){const{progress:e}=S(),a=r(te()),{i18n:n,shop:o,url:s,observability:p,embed:b,router:_}=U(),x=Y(),k=function(){const{checkout:{negotiator:e}}=U(),t=e.throttleState.value,a=r(t),n=e.current.fields.merchandiseLines;return l(()=>{const e=a.value;if("inactive"===e.status||"loading"===e.status||!n.value)return[];const t=new Map(e.productVariantAvailabilityV2.map(({id:e,available:t})=>[e,t]));return n.value.lines.filter(e=>e.variantId).map(e=>({...e,available:t.get(ae(e.variantId))}))})}(),T=l(()=>k.value.length>0?k.value:null),M=m(),W=l(()=>a.value.throttle.status),Q=l(()=>"inactive"!==W.value);c(()=>
1{if(!Q.value||!G(b?.embedder))return;const e=h(()=>b?.presentation?.acquire());return()=>h(()=>e?.())});const X=l(()=>a.value.lastUpdated),J=l(()=>"complete"===W.value||"queued"===W.value?function(e){return 0===e.length?"empty":e.every(Z)?"unavailable":e.some(Z)?"partially_available":"available"}(k.value):null),K=u(e),{currentPage:ee}=A().value;K.current=e;const ie=u(!1);c(()=>{if(ie.current)return;const e=J.value;if(!e)return;const t=k.value;p.counter({name:"throttle_rendered",value:1,attributes:{throttle_status:W.value,inventory_status:e,merchandise_available:t.filter(({available:e})=>e).length,merchandise_unavailable:t.filter(({available:e})=>!e).length,has_storefront:o.hasStorefront}}),ie.current=!0});const se=u(!1);t(()=>{se.current||(se.current=!0,H(b,"throttle"))},[b]),B("complete"===W.value&&"hidden"===x?n.translate("throttle.time_to_checkout_title",{shopName:o.name}):"loading"===W.value?n.translate("general.loading_title",{shopName:o.name}):n.translate("general.full_title",{pageTitle:n.translate("throttle.title"),shopName:o.name}));const ce=ee?.route,ue=u(!1);t(()=>{!function e(){K.current("throttle-run",t=>{"throttled"===t.status&&M.current?(ue.current=!1,e()):function(e){return"fetch_failed"===e.status&&e.reason.endsWith("status: 429")&&!ue.current&&M.current}(t)?(ue.current=!0,e()):"error"!==t.status&&"fetch_failed"!==t.status||(ce?_.navigate(ce,{replace:!0}):window.location.assign(s.cart()))})}()},[K,M,s,ce,_]),O({stage:F.Usable,id:"Throttle"});const{header:{logo:he}}=I();return"inactive"===W.value?null:i(j,{placeItems:"center",minBlockSize:"100vh",background:"base",children:i(g,{maxInlineSize:"450px",padding:"base",children:i(L,{target:"card",children:i(y,{accessibilityLabel:n.translate("throttle.title"),children:i(f,{gap:"base",children:[he&&i(j,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"center",justifyItems:"center",children:i(q,{width:he.maxWidth})}),i(d,{when:()=>"empty"===J.value,fallback:i(d,{when:()=>"unavailable"===J.value,fallback:i(oe,{}),children:i(ne,{inventoryStatus:"unavailable"})}),children:i(ne,{inventoryStatus:"empty"})}),i(d,{when:T,children:e=>i(re,{heading:n.translate("throttle.cart_summary_heading"),details:X.value?n.translate("throttle.last_checked",{time:n.formatDate(X.value,{hour:"numeric",minute:"numeric",timeZoneName:"short"})}):void 0,children:[i(d,{when:()=>"partially_available"===J.value,children:[i(le,{}),i(V,{blockSize:"large-200"})]}),i(z,{children:[i(E,{hidden:!0,children:[i(N,{hidden:!0,children:n.translate("order_summary.product_image_label")}),i(N,{hidden:!0,children:n.translate("order_summary.description_label")})]}),i(P,{children:e.map(({digest:e,image:t,available:a,title:n,subtitle:r,quantity:l,properties:o})=>i(R,{children:[i(D,{children:i($,{src:t?.one,srcSet:t?`${t.one} 1x, ${t.two} 2x, ${t.four} 4x`:void 0,alt:t?.altText,totalItems:l})}),i(D,{primary:!0,children:[i(v,{children:i(w,{type:"strong",children:n})}),r?i(v,{color:"subdued",children:r}):null,o?i(C,{properties:o}):null,null==a?null:i(de,{available:a})]})]},e))})]})]})}),i(d,{when:()=>"empty"!==J.value&&"unavailable"!==J.value,children:i(g,{padding:"large-200 none",children:i(f,{alignItems:"center",gap:"small-200",accessibilityRole:"footer",children:[i(v,{color:"subdued",textAlign:"center",children:n.translate("throttle.footer.heading")}),i(v,{color:"subdued",textAlign:"center",children:n.translate("throttle.footer.body")})]})})})]})})})})})}function de({available:e}){return i(e?se:ce,{})}export{ue 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.