1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2233],{42233:function(e,c,n){"use strict";n.r(c);var r=n(52676),t=n(75271),i=n(40507),s=n.n(i),o=n(93858),u=n(54932),l=n(15011),a=n(69505),d=n(17129),p=n(73056),y=n.n(p);let f=e=>{let{currency:c,shopping:n,setCurrency:i}=e,[s,u]=(0,t.useState)(!0),[l,p]=(0,t.useState)([]);(0,t.useEffect)(()=>{(0,a.z)().then(e=>{p(e.data),u(!1)}).catch(()=>{u(!1)})},[]);let f=null;return l.length>0&&!s&&(f=(0,r.jsx)("ul",{className:"".concat(y().dropdownCurrency," dropdownCurrency"),children:l.filter(e=>e.iso_code!==c).map(e=>(0,r.jsx)("li",{className:"uppercase ".concat(y().currencyOption," currencyOption"),children:(0,r.jsxs)("button",{type:"button",onClick:()=>{if(null==window?void 0:window.Uplift){let e=document.getElementsByTagName("head")[0],c=document.getElementById("upliftScript");if(e&&c)try{e.removeChild(c)}catch(e){}window.Uplift.Payments.clear(),window.Uplift.Payments.exit()}u(!0),n?(0,d.SI)(e.iso_code,n.SessionId).then(()=>{i({currency:e.iso_code,currency_id:e.id})}).catch(()=>{i({currency:e.iso_code,currency_id:e.id})}).finally(()=>{u(!1)}):(i({currency:e.iso_code,currency_id:e.id}),u(!1))},className:"w-full py-2 bg-white text-darkgrey cursor-pointer flex items-center justify-center",children:[(0,r.jsx)("span",{className:"flag-icon mr-1 flag-icon-".concat(e.iso_code.toLowerCase())}),e.iso_code]})},e.id))})),(0,r.jsxs)("li",{className:"".concat(y().option," option px-3 relative py-1 cursor-pointer"),children:[s?(0,r.jsx)(o.G,{icon:"spinner",spin:!0}):(0,r.jsxs)("span",{className:"link flex items-center",children:[c,(0,r.jsx)(o.G,{className:"caret ml-1",icon:"caret-down"})]}),f]})},_={setCurrency:l.NW};f.propTypes={currency:s().string.isRequired,setCurrency:s().func.isRequired,shopping:s().instanceOf(Object)},f.defaultProps={shopping:null},c.default=(0,u.$j)(function(e){let{currency:c,shopping:n}=e;return{currency:c,shopping:n}},_)(f)},69505:function(e,c,n){"use strict";n.d(c,{z:function(){return t}});var r=n(31472);let t=()=>r.Z.get("/currencies")},73056:function(e){e.exports={dropdownCurrency:"currency-switch_dropdownCurrency__dQqrj",currencyOption:"currency-switch_currencyOption__5SOF4",option:"currency-switch_option__y_D04"}}}]);
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.