PageSourceSearch

https://oakberrychile.cl/_next/static/chunks/pages/_sites/[site]/app/mercadopago-payment-ce5850a5e6779f9f.js

js oakberrychile.cl collected 2026-10-02 00:16:03 UTC 4,178 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8848],{75611:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[site]/app/mercadopago-payment",function(){return n(67846)}])},15797:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var a=n(67294);function o(){let[e,t]=(0,a.useState)(null),[n,o]=(0,a.useState)(!0),[r,i]=(0,a.useState)(null),l=(0,a.useCallback)(()=>{let e=window.MP_DEVICE_SESSION_ID;return"string"==typeof e&&e.length>0?e:null},[]),u=(0,a.useCallback)(()=>{let e=document.querySelector('script[src*="mercadopago.com/v2/security.js"]');return null!==e},[]);return(0,a.useEffect)(()=>{if(!u()){i("MercadoPago security script not loaded"),o(!1);return}let e=l();if(e){t(e),o(!1);return}let n=0,a=()=>{let e=l();if(e){t(e),o(!1);return}if((n+=1)>=50){i("Timeout waiting for MercadoPago Device ID"),o(!1);return}setTimeout(a,100)};setTimeout(a,100)},[l,u]),{deviceId:e,isLoading:n,error:r,getDeviceId:l}}},67846:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return b},default:function(){return E}});var a=n(85893),o=n(11163),r=n(53218),i=n(49206),l=n(67294),u=n(26628),s=n(92990),c=n(92852),d=n(15797),_=n(16556),m=n.n(_),p=e=>{let{total:t,userEmail:n,onTokenReceived:o,onError:r}=e,[_,p]=(0,l.useState)(!1),y=(0,l.useRef)(null),f=(0,u.v9)(e=>e.core.settings),{getDeviceId:b}=(0,d.L)(),E=Number.isFinite(t)&&t>0;(0,l.useEffect)(()=>{E||(c.Z.paymentFormLoadFailed({tenant:null==f?void 0:f.tenant,paymentMethod:s.ig.mercadoPagoCard,stage:"init",errorMessage:"missing_amount"}),r())},[E]),(0,l.useEffect)(()=>{E&&(window.__mp_initialized__||((0,i.R6)("APP_USR-10651cce-ad7d-438d-814b-1c608d47e4b8",{locale:"es-CL"}),window.__mp_initialized__=!0),p(!0))},[E]);let g={visual:{style:{theme:"default",customVariables:{baseColor:"#".concat(f.brandPrimary),baseColorSecondVariant:"#".concat(f.brandSecondary)}}},paymentMethods:{maxInstallments:1}},S=async e=>{if(e.token){let t=b();o(e.token,t)}else c.Z.paymentFormLoadFailed({tenant:null==f?void 0:f.tenant,paymentMethod:s.ig.mercadoPagoCard,stage:"tokenization"}),r()};return((0,l.useEffect)(()=>{if(!_||!y.current)return;let e="app-mp-card-payment-brick";y.current.id=e;let t="mercado-pago-show-button-app",n=document.getElementById(t);n&&n.remove();let a=document.createElement("style");return a.id=t,a.textContent="\n      #".concat(e,' [data-testid="card_payment_submit_button"] {\n        display: block !important;\n        opacity: 1 !important;\n        position: relative !important;\n        left: auto !important;\n      }\n      #').concat(e,' button[data-testid="card_payment_submit_button"] {\n        display: block !important;\n        opacity: 1 !important;\n        position: relative !important;\n        left: auto !important;\n      }\n      #').concat(e," [data-mp-brick-root] button {\n        display: block !important;\n      }\n    "),document.head.appendChild(a),()=>{let e=document.getElementById(t);e&&e.remove(),y.current&&y.current.removeAttribute("id")}},[_]),_)?(0,a.jsx)("div",{ref:y,className:m().container,children:(0,a.jsx)(i.Wg,{initialization:{amount:t,payer:{email:n||""}},customization:g,onSubmit:S,onError:()=>{c.Z.paymentFormLoadFailed({tenant:null==f?void 0:f.tenant,paymentMethod:s.ig.mercadoPagoCard,stage:"brick_render"}),r()}})}):null},y=n(31974);let f=()=>{let e=(0,o.useRouter)(),{total:t,email:n}=e.query;return(0,a.jsx)("div",{children:(0,a.jsx)(p,{total:t?Number(t):0,userEmail:n,onTokenReceived:(t,n)=>{let a=n||window.MP_DEVICE_SESSION_ID||null;e.push({pathname:r.IQ.APP_PROCESSING_PURCHASE.path,query:{paymentToken:t,deviceId:a}})},onError:()=>{e.push(r.IQ.PURCHASE_FAILURE.path)}})})};f.getLayout=function(e){return(0,a.jsx)(y.p,{children:e})};var b=!0,E=f},16556:function(e){e.exports={row:"styles_row__EkSWK",wrap:"styles_wrap__6imEH",field:"styles_field__M_joe",label:"styles_label__QT_Sz",input:"styles_input__P_ppc",select:"styles_select__fKEY3",secureField:"styles_secureField__i0jjU",inlineGroup:"styles_inlineGroup__fEM8U",container:"styles_container__ez86u",containerModal:"styles_containerModal__yaPIr"}}},function(e){e.O(0,[9306,9206,1974,9774,2888,179],function(){return e(e.s=75611)}),_N_E=e.O()}]);

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.