PageSourceSearch

https://www.briscoes.co.nz/paymentMethods.e36fb670bec8df8e6dc8.chunk.js

js briscoes.co.nz collected 2026-10-03 23:00:57 UTC 26,851 bytes, 1 lines download raw bytes

1(self.webpackChunkpwa_briscoes=self.webpackChunkpwa_briscoes||[]).push([[5551],{34183:(t,e,r)=>{"use strict";r.d(e,{k:()=>y});var n,o,i=r(96540),a=r(80296),c=r(95420),u=r(57528),l=r(12759),s=(0,l.J1)(n||(n=(0,u.A)(["\nmutation GetAfterpayConfig($product_sku: String!, $store_id: String!) {\n    getAfterpayConfigPdp(input: { product_sku: $product_sku, store_id: $store_id }) {\n        allowed_currencies\n        api_mode\n        is_cbt_enabled\n        is_enabled\n        is_enabled_cta_pdp_headless\n        is_enabled_ec_pdp_headless\n        is_in_stock\n        is_product_allowed\n        max_amount\n        min_amount\n        mpid\n        placement_after_selector\n        placement_after_selector_bundle\n        price_selector\n        price_selector_bundle\n        product_type\n        show_lover_limit\n    }\n}"]))),f=(0,l.J1)(o||(o=(0,u.A)(["\nmutation GetAfterpayConfigCart($cart_id: String!, $store_id: String!) {\n    getAfterpayConfigCart(input: { cart_id: $cart_id, store_id: $store_id }) {\n        allowed_currencies\n        is_cbt_enabled\n        is_enabled\n        is_enabled_cta_cart_page_headless\n        is_enabled_ec_cart_page_headless\n        is_product_allowed\n        is_virtual\n        max_amount\n        min_amount\n        mpid\n        placement_after_selector\n        price_selector\n        show_lover_limit\n    }\n}"])));var d=r(27907),p=r(75691);const h="afterPayMessage-root-tsQ mb-4 min-h-[38px]",v="afterPayMessage-checkoutRoot-ZM2 min-h-[38px]";var y=function(t){var e=t.productSKU,r=t.storeViewId,n=t.locale,o=t.isFullVariantSelected,u=t.productPriceText,l=t.variantPriceText,y=t.isCheckoutAfterpay,m=t.cartGrandTotal,g=t.cartId,w=y?m:function(t){var e,r=null==t?void 0:t.text_data;if(!r||!Array.isArray(r))return null;var n=null===(e=r.find((function(t){return"now"===t.type})))||void 0===e?void 0:e.text;return n?n.includes("-")?n.split("-")[0].trim():n:null}(o?l:u),_=function(t,e,r,n){var o=(0,c.n)(n?f:s,{errorPolicy:"ignore"}),u=(0,a.A)(o,2),l=u[0],h=u[1],v=h.loading,y=h.data,m=h.error;return(0,i.useEffect)((function(){(t||n)&&l({variables:n?{cart_id:r,store_id:null==e?void 0:e.toString()}:{product_sku:t,store_id:null==e?void 0:e.toString()},skip:!!n&&!r})}),[l,t,e,n,r]),(0,i.useEffect)((function(){var t,e=null==y||null===(t=y.getAfterpayConfigPdp)||void 0===t?void 0:t.api_mode;e&&(e===p.TJ.PRODUCTION?(0,d.A)(p.dl.PRODUCTION,"afterpay-message"):(0,d.A)(p.dl.SANDBOX,"afterpay-message"))}),[y]),{loading:v,error:m,data:y}}(e,r,g,y),b=_.data,E=_.loading,x=_.error,P=(null==b?void 0:b.getAfterpayConfigPdp)||(null==b?void 0:b.getAfterpayConfigCart);if(!w||!E&&!P||x)return null;var A=P||{},L=A.mpid,S=void 0===L?"":L,k=A.is_product_allowed,O=void 0===k||k,C=A.show_lover_limit,I=void 0===C||C,j=A.is_cbt_enabled,T=void 0===j||j;return i.createElement("div",{className:y?v:h},P&&i.createElement("square-placement",{id:"afterpay-cta-pdp","data-show-lower-limit":Boolean(I).toString(),"data-currency":"NZD","data-locale":n,"data-is-eligible":Boolean(O).toString(),"data-amount":w,"data-mpid":S,"data-cbt-enabled":Boolean(T).toString(),"data-platform":"Magento","data-page-type":y?"cart":"product"}))}},7502:(t,e,r)=>{"use strict";r.d(e,{A:()=>f});var n=r(99418),o=r(5556),i=r(96540),a=r(34183);const c="afterpay-afterpayContainer--Cr text-[15px]",u="afterpay-afterpayMessage-O03 font-bold",l="afterpay-afterpayContent-lU2 pt-3";var s=function(t){var e=t.data,r=t.shouldSubmit,o=t.onPaymentSuccess,s=t.isAfterpayTriggerPlacingOrder,f=(0,i.useRef)(!1),d=(0,i.useRef)(!1),p=e.isEnable,h=e.locale,v=e.storeViewId,y=e.cartGrandTotal,m=e.isCheckoutAfterpay,g=e.cartId,w=e.content;return(0,i.useEffect)((function(){s&&f.current&&(d.current=!0),!s&&d.current&&(f.current=!1)}),[s]),(0,i.useLayoutEffect)((function(){r&&!f.current&&(f.current=!0,o())}),[r,o]),p?i.createElement("div",{className:c},i.createElement("div",{className:u},i.createElement(a.k,{locale:h,storeViewId:v,cartGrandTotal:y,isCheckoutAfterpay:m,cartId:g})),i.createElement("div",{className:l,dangerouslySetInnerHTML:{__html:n.A.sanitize(w)}})):null};
vendor: 4,402 bytes, line 1
1s.propTypes={data:(0,o.shape)({locale:o.string,storeViewId:o.number,cartGrandTotal:o.number,isCheckoutAfterpay:o.bool,content:o.string,isEnable:o.bool,cartId:o.string}),shouldSubmit:o.bool.isRequired,onPaymentSuccess:o.func.isRequired};const f=s},38827:(t,e,r)=>{"use strict";r.d(e,{A:()=>w});var n=r(96540),o=r(82284),i=r(10467),a=r(80296),c=r(27907),u=r(46374),l=r(50424),s=r(1723),f=r(47248),d=r(93912),p=r(61225),h=r(68503),v=r(38245),y=r(98373),m=r(64120);function g(){g=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),c=new j(n||[]);return i(a,"_invoke",{value:k(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",h="suspendedYield",v="executing",y="completed",m={};function w(){}function _(){}function b(){}var E={};s(E,c,(function(){return this}));var x=Object.getPrototypeOf,P=x&&x(x(T([])));P&&P!==r&&n.call(P,c)&&(E=P);var A=b.prototype=w.prototype=Object.create(E);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(i,a,c,u){var l=d(t[i],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,o.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var a;i(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?y:h,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError((0,o.A)(e)+" is not iterable")}return _.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:_,configurable:!0}),_.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Prom
1ise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(A),s(A,l,"Generator"),s(A,c,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}const w=function(t){var e=function(t){var e=t.shouldRender,r=t.checkoutError,o=t.onPaymentSuccess,w=void 0===o?function(){}:o,_=t.onPaymentError,b=void 0===_?function(){}:_,E=t.onBeforeSubmit,x=void 0===E?function(){}:E,P=(0,p.wA)(),A=(0,n.useRef)(null),L=(0,n.useRef)(null),S=(0,f.B)(),k=(0,a.A)(S,1)[0].cartId,O=(0,n.useState)(!1),C=(0,a.A)(O,2),I=C[0],j=C[1],T=(0,n.useState)(!1),N=(0,a.A)(T,2),R=N[0],G=N[1],M=(0,s.IT)(l.bo,{fetchPolicy:"no-cache",variables:{cartId:k},skip:!k||!e}),D=M.data,F=M.refetch,W=(0,y.A)({}).items,q=(0,n.useMemo)((function(){return null==W?void 0:W.map((function(t){return{label:t.product.name,type:"final",amount:t.quantity*t.prices.price_including_tax.value}}))}),[W]),B=(0,n.useCallback)((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.p.APPLE_PAY;P((0,h.r1)({loading:t,context:e}))}),[P]),Y=(0,n.useMemo)((function(){return!!D&&!(null==W||!W.length)}),[D,W]),$=(0,n.useMemo)((function(){var t;return null==D||null===(t=D.storeConfig)||void 0===t?void 0:t.payment_apple_description}),[D]),H=(0,n.useCallback)((function(){return(0,i.A)(g().mark((function t(){var e;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,x();case 2:if(t.sent){t.next=8;break}throw null===(e=globalThis.applePayController)||void 0===e||null===(e=e.session)||void 0===e||e.abort(),new Error("On before submit failed");case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})))()}),[x]),U=(0,n.useMemo)((function(){var t,e,r,n,o,i,a,c;if(null!=D&&null!==(t=D.ApplePayRestAPIRedirectLink)&&void 0!==t&&t.redirect_url)return{url:null==D||null===(e=D.ApplePayRestAPIRedirectLink)||void 0===e?void 0:e.redirect_url,container:d.Ut,displayName:null==D||null===(r=D.storeConfig)||void 0===r?void 0:r.payment_apple_merchant_name,countryCode:null==D||null===(n=D.storeConfig)||void 0===n?void 0:n.default_country,currencyCode:null==D||null===(o=D.storeConfig)||void 0===o?void 0:o.base_currency_code,merchantCapabilities:["supports3DS"],supportedNetworks:["visa","mastercard","amex"],button:{type:"pay",style:"white-outline",locale:"en-US"},mid:null==D||null===(i=D.storeConfig)||void 0===i?void 0:i.payment_apple_merchant_identifier,total:{label:null==D||null===(a=D.storeConfig)||void 0===a?void 0:a.store_name,amount:null==D||null===(c=D.cart)||void 0===c||null===(c=c.prices)||void 0===c||null===(c=c.grand_total)||void 0===c?void 0:c.value},lineItems:q,onBeforeSubmit:H}}),[D,q,H]),V=(0,n.useCallback)((0,i.A)(g().mark((function t(){var e;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,c.A)(u.A.APPLE,"windcave-applepay");case 3:t.t0=!!t.sent,e={applePay:t.t0},j(Object.values(e).every(Boolean)),t.next=12;break;case 8:return t.prev=8,t.t1=t.catch(0),t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t,null,[[0,8]])}))),[]),K=(0,n.useCallback)((0,i.A)(g().mark((function t(){var e,r,n,o;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,d.Lk)(null==D||null===(e=D.storeConfig)||void 0===e?void 0:e.payment_apple_merchant_identifier);case 2:t.sent&&null!==(r=globalThis.WindcavePayments)&&void 0!==r&&r.ApplePay&&U&&A.current!==U.url&&(m.$.windcaveSessionId=null==D||null===(n=D.ApplePayRestAPIRedirectLink)||void 0===n?void 0:n.session_id,A.current=U.url,(o=document.getElementById(d.Ut))&&(o.innerHTML=""),L.current=o,B(!0,v.p.APPLE_PAY_INIT),G(!0),globalThis.applePayController=globalThis.WindcavePayments.ApplePay.create(U,(function(t){if("done"==t)return w(),!0}),(function(t,e){"submit"===t&&b()}),(function(t,e,r){e()}
1)),globalThis.applePayController.isAvailable(5e3).then((function(){B(!1,v.p.APPLE_PAY_INIT),window.applePayController.attach(),setTimeout((function(){var t=null==o?void 0:o.querySelector("apple-pay-button");t&&t.setAttribute("tabindex","-1")}),500)})).catch((function(){B(!1,v.p.APPLE_PAY_INIT)})));case 4:case"end":return t.stop()}}),t)}))),[D,U,B,w,b]);return(0,n.useLayoutEffect)((function(){B(!Y||!I)})),(0,n.useEffect)((function(){return function(){B(!1)}}),[B]),(0,n.useEffect)((function(){I&&D&&K()}),[I,D,K]),(0,n.useEffect)((function(){V()}),[V]),(0,n.useEffect)((function(){r&&(B(!0,v.p.APPLE_PAY_INIT),F())}),[r,F,B]),{scriptReady:I,description:$,isCanMakePayment:R}}(t),r=e.description;return n.createElement("div",{className:"text-[15px] leading-normal text-[#222]"},r)}},27462:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(58168),o=r(96540),i=r(69274);const a=function(t){return o.createElement(i.A,(0,n.A)({},t,{isFarmLands:!0}))}},69274:(t,e,r)=>{"use strict";r.d(e,{A:()=>j});var n=r(64467),o=r(96540),i=r(82284),a=r(10467),c=r(80296),u=r(47248),l=r(1723),s=r(50424),f=r(27907),d=r(28654),p=r(61225),h=r(68503),v=r(38245),y=r(67050),m=r(49144),g=r(46374),w=r(64120);function _(){_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new j(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",h="suspendedYield",v="executing",y="completed",m={};function g(){}function w(){}function b(){}var E={};s(E,c,(function(){return this}));var x=Object.getPrototypeOf,P=x&&x(x(T([])));P&&P!==r&&n.call(P,c)&&(E=P);var A=b.prototype=g.prototype=Object.create(E);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,c,u){var l=d(t[o],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,i.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?y:h,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);
vendor: 4,189 bytes, line 1
1if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError((0,i.A)(e)+" is not iterable")}return w.prototype=b,o(A,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},L(S.prototype),s(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(A),s(A,l,"Generator"),s(A,c,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}const b="windCave-root--en windCave-root--en relative lg_p-2 min-h-[60px] grid gap-y-4",E="windCave-container-FW3 h-60 -mx-2 min-h-[280px] lg_min-h-[0px]",x="windCave-containerHasError-Sm- w-full h-[345px] md_h-[310px] md_h-[290px]";var P=r(5556),A=r(66824),L=r(66492),S=r(99756);function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function O(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach((function(e){(0,n.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEac
1h((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var C="iframe-container-"+(0,L.gj)(),I=function(t){var e=(0,p.d4)((function(t){return t.checkout})).isWindcave3DSecure,r=(0,p.wA)(),n=function(t){var e,r=t.shouldSubmit,n=t.shouldRender,i=t.checkoutError,b=t.onPaymentSuccess,E=void 0===b?function(){}:b,x=t.onPaymentError,P=void 0===x?function(){}:x,A=t.resetShouldSubmit,L=void 0===A?function(){}:A,S=t.isFarmLands,k=t.iframeContainerId,O=(0,u.B)(),C=(0,c.A)(O,1)[0].cartId,I=(0,p.wA)(),j=(0,o.useState)(!1),T=(0,c.A)(j,2),N=T[0],R=T[1],G=(0,o.useState)(y.y4.LOADED),M=(0,c.A)(G,2),D=M[0],F=M[1],W=(0,d.WZ)(),q=(0,o.useMemo)((function(){return S?"FarmlandRestAPIRedirectLink":"WindCaveRestAPIRedirectLink"}),[S]),B=(0,l.IT)(S?s.hH:s._q,{fetchPolicy:"no-cache",variables:{cartId:C},skip:!C||!n}),Y=B.data,$=B.refetch,H=B.loading,U=B.called;(0,o.useEffect)((function(){var t;w.$.windcaveSessionId=null==Y||null===(t=Y[q])||void 0===t?void 0:t.session_id}),[Y,q]);var V=(0,o.useMemo)((function(){return H||!U}),[H,U]),K=(0,o.useCallback)((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.p.CHECKOUT_WINDCAVE;I((0,h.r1)({loading:t,context:e}))}),[I]),J=null==Y||null===(e=Y[q])||void 0===e?void 0:e.redirect_url,Z=(0,o.useCallback)((function(){if("undefined"!=typeof window&&window.WindcavePayments){if(J)return window.WindcavePayments.Seamless.prepareIframe({url:J,containerId:k,loadTimeout:30,width:400,height:500,threeDS:{width:300,height:600,duration:300,challenge:{requestedWidth:300,containerWidth:300,containerHeight:600}},onProcessed:function(t){F(t),K(!1)},onError:function(){K(!1),F(y.y4.SESSION_ERROR)}});V||K(!1)}}),[J,K,k,V]),X=(0,o.useCallback)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m.Vo;t&&W.setError("selectedPaymentMethod",t)}),[W]),z=(0,o.useCallback)((0,a.A)(_().mark((function t(){var e,r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=D)!==y.y4.DONE){t.next=4;break}return L(),t.abrupt("return",E());case 4:return t.next=7,(0,y.NG)({state:e,setLoading:K,onError:X,setHasError:R,dispatch:I,iframeContainerId:k});case 7:r=t.sent,L(),r?E():P();case 10:case"end":return t.stop()}}),t)}))),[D,K,X,L,E,P,I,k]);return(0,o.useEffect)((function(){i&&(K(!0),$())}),[i,$,K]),(0,o.useLayoutEffect)((function(){var t;return K(!0),(0,f.A)(g.A.SEAMLESS,"windcave-seamless").then((function(){t=setInterval((function(){window.WindcavePayments&&(Z(),clearInterval(t))}),1e3)})),function(){t&&clearInterval(t),K(!1)}}),[Z,K]),(0,o.useEffect)((function(){r&&z()}),[r,z]),{state:D,hasError:N,iframe:J}}(O(O({},t),{},{iframeContainerId:C})),i=n.hasError;return(0,o.useEffect)((function(){return function(){r((0,S.Wb)(!1))}}),[r]),o.createElement("div",{className:b},o.createElement("div",{className:i?x:E,style:e?{minHeight:"600px"}:{},id:C}),o.createElement("div",{className:"lg_hidden"},o.createElement(A.r,null)))};I.propTypes={shouldSubmit:P.bool.isRequired,shouldRender:P.bool.isRequired,onPaymentSuccess:P.func.isRequired,resetShouldSubmit:P.func.isRequired,isFarmLands:P.bool};const j=(0,o.memo)(I)},46374:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var n={APPLE:"https://sec.windcave.com/js/windcavepayments-applepay-v1.js",SEAMLESS:"https://sec.windcave.com/js/windcavepayments-seamless-v1.js"}},47303:(t,e,r)=>{t.exports=r.p+"american-express-card-new-oTK.png"},32162:(t,e,r)=>{t.exports=r.p+"master-card-new-bYG.png"},70970:(t,e,r)=>{t.exports=r.p+"visa-new-NKR.png"},70977:(t,e,r)=>{t.exports=r.p+"windcave-3uh.png"},43364:(t,e,r)=>{t.exports=r.p+"afterpay-sSX.png"},96086:(t,e,r)=>{t.exports=r.p+"applepay-qTD.png"},18568:(t,e,r)=>{t.exports=r.p+"farmlands-gtn.png"},29907:(t,e,r)=>{t.exports=r.p+"lock-4n3.svg"}}]);

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.