PageSourceSearch

https://www.techry.com.au/cdn/shopifycloud/checkout-web/assets/c1/01f1d1bd.0IZJn5_c.js

js techry.com.au collected 2026-10-06 18:33:15 UTC 10,664 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.Bywc2Brn.js";import{cY as m,H as p,f as v,L as b,S as f,b as g,i as y,aa as _,j as w,a9 as x,a1 as k,bA as S,s as T,k as A,l as I,ab as j,cZ as q,d as V,aB as z,ay as E,az as N,aA as P,av as R,at as C,aw as D,c_ as L}from"./164ad2e3.CwFFCQJV.js";import{S as $}from"./79974aab.D1vRvKbg.js";import{c as U,n as M,v as B,bb as H,I as G}from"./9dba8418.BjFsJfKG.js";import{u as W}from"./5fda1420.renPlTOa.js";import{u as O,S as Z}from"./71ae3d5c.DB_FveVu.js";import{S as F}from"./app.CGAYdtrm.js";import{d as Q}from"./b8733b27.DvuLr62Z.js";import"./d0bb51ec.B6dL-tOK.js";import"./f67abd2c.BWsb-1Zx.js";import"./60a453ce.CEvWNvTm.js";import"./e12db40c.BZEbMADi.js";import"./2495faa4.Ugq9r3_W.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 J(e){return!1===e.available}const K={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 X extends F{constructor(){super(...arguments),this.name="ThrottleError",this.defaultGroupingHash="ThrottleError::Exiting::Status"}}class ee extends F{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(K,{cache:!1,variables:{token:v.token,variantIdsV2:e}});if(!i.current)return;if(a)throw a;if(!t)throw new X("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 X("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=Q(e),l=e instanceof n?e.response.status:void 0;if(a)return c(new(r.actionable?X: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?X: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(B(e),10)}function ne({inventoryStatus:e}){const{i18n:t,shop:{hasStorefront:a,partnerStorefrontUrl:n},url:r,checkout:{configuration:l}}=U(),o="empty"===e?t.translate("stock.empty_cart_label"):t.translate("throttle.inventory.sold_out.heading"),s="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:o}),a&&"unavailable"===e&&i(v,{size:"large",textAlign:"center",children:t.translate("throttle.inventory.sold_out.storefront_body")}),a&&l.allowRedirectToStorefront&&i(v,{textAlign:"center",children:i(b,{href:n??r.storefront(),children:s})}),!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(S,{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}=T(),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))}))})}(),S=l(()=>k.value.length>0?k.value:null),M=m(),B=l(()=>a.value.throttle.status),F=l(()=>"inactive"!==B.value);c(()=>
1{if(!F.value||!G(b?.embedder))return;const e=h(()=>b?.presentation?.acquire());return()=>h(()=>e?.())});const Q=l(()=>a.value.lastUpdated),K=l(()=>"complete"===B.value||"queued"===B.value?function(e){return 0===e.length?"empty":e.every(J)?"unavailable":e.some(J)?"partially_available":"available"}(k.value):null),X=u(e),{currentPage:ee}=A().value;X.current=e;const ie=u(!1);c(()=>{if(ie.current)return;const e=K.value;if(!e)return;const t=k.value;p.counter({name:"throttle_rendered",value:1,attributes:{throttle_status:B.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]),W("complete"===B.value&&"hidden"===x?n.translate("throttle.time_to_checkout_title",{shopName:o.name}):"loading"===B.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(){X.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()))})}()},[X,M,s,ce,_]),O({stage:Z.Usable,id:"Throttle"});const{header:{logo:he}}=I();return"inactive"===B.value?null:i(j,{placeItems:"center",minBlockSize:"100vh",background:"base",children:i(g,{maxInlineSize:"450px",padding:"base",children:i($,{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"===K.value,fallback:i(d,{when:()=>"unavailable"===K.value,fallback:i(oe,{}),children:i(ne,{inventoryStatus:"unavailable"})}),children:i(ne,{inventoryStatus:"empty"})}),i(d,{when:S,children:e=>i(re,{heading:n.translate("throttle.cart_summary_heading"),details:Q.value?n.translate("throttle.last_checked",{time:n.formatDate(Q.value,{hour:"numeric",minute:"numeric",timeZoneName:"short"})}):void 0,children:[i(d,{when:()=>"partially_available"===K.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(C,{children:i(D,{src:t?.one,srcSet:t?`${t.one} 1x, ${t.two} 2x, ${t.four} 4x`:void 0,alt:t?.altText,totalItems:l})}),i(C,{primary:!0,children:[i(v,{children:i(w,{type:"strong",children:n})}),r?i(v,{color:"subdued",children:r}):null,o?i(L,{properties:o}):null,null==a?null:i(de,{available:a})]})]},e))})]})]})}),i(d,{when:()=>"empty"!==K.value&&"unavailable"!==K.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.