(window.webpackJsonpalfagresalfa_components_10_3_71=window.webpackJsonpalfagresalfa_components_10_3_71||[]).push([["UnidadMedidaPlp"],{0:function(e,n){e.exports=React},31:function(e,n){e.exports=ReactApollo},346:function(e,n,a){"use strict";a.r(n),function(e){var n=a(1);a.p=Object(n.getPublicPath)("alfagresalfa.components@10.3.71");var i=Object(n.register)((function(){return a(347)}),e,"alfagresalfa.components@10.3.71","alfagresalfa.components@10.x","UnidadMedidaPlp");i.renderHotReload,i.setupHMR}.call(this,a(5)(e))},347:function(e,n,a){"use strict";a.r(n);var i=a(0),t=a.n(i),d=a(6),l=a.n(d),r=a(3),u=a.n(r),m=a(31),o=a(37),c=a.n(o);n.default=function(){var e,n,a,d,r,o,s,v,f,k=l()(),p=Object(m.useQuery)(c.a,{variables:{value:(null===(e=k.selectedItem)||void 0===e?void 0:e.itemId)||""}}),g=p.data;if(p.loading||!g||!g.product)return null;var b=null==g?void 0:g.product.items.find((function(e){var n;return e.itemId==(null===(n=k.selectedItem)||void 0===n?void 0:n.itemId)})),N=(null==b?void 0:b.measurementUnit)||k.product.items[0].measurementUnit,x=(null==g?void 0:g.product.properties)||(null==k||null===(n=k.product)||void 0===n?void 0:n.properties);null==x||x.forEach((function(e){if("Unidad de empaque"==(null==e?void 0:e.name)){var n=e.values[0]?e.values[0]:"";N=n.toLowerCase()}}));var V=[{nombre:" m²",unidadVtex:"M2"},{nombre:" m²",unidadVtex:"m2"},{nombre:" m²",unidadVtex:"m²"},{nombre:" m³",unidadVtex:"m3"},{nombre:" m³",unidadVtex:"m³"},{nombre:" Un",unidadVtex:"un"},{nombre:" Galón",unidadVtex:"gl"},{nombre:" Caja",unidadVtex:"cj"},{nombre:" Caja",unidadVtex:"ca"},{nombre:" Kg",unidadVtex:"kg"},{nombre:" Metro",unidadVtex:"m"},{nombre:" Galón",unidadVtex:"gls"},{nombre:" Galón",unidadVtex:"GLS"},{nombre:" Mililitro",unidadVtex:"ml"},{nombre:" Litro",unidadVtex:"l"},{nombre:" Rollo",unidadVtex:"rol"},{nombre:" Gramo",unidadVtex:"g"},{nombre:" Tonelada",unidadVtex:"t"},{nombre:" Cuarto galón",unidadVtex:"cto"},{nombre:" Bolsa",unidadVtex:"bol"},{nombre:" Cuñete",unidadVtex:"cun"}].find((function(e){return e.unidadVtex===N}));V=V?V.nombre:N;var _=null===(a=b.variations.find((function(e){return"Formato"==e.name})))||void 0===a?void 0:a.values[0];" Galón"==V&&"5 GL"==_?V=" Cuñete":" Galón"!=V&&" Cuñete"!=V||"2.5 GL"!=_||(V=" Medio cuñete");var S=null===(d=k.selectedItem)||void 0===d?void 0:d.sellers[0].commertialOffer.AvailableQuantity,F=(null===(r=b.sellers.find((function(e){return e.sellerDefault})))||void 0===r?void 0:r.commertialOffer.ListPrice)||Math.round(null===(o=k.selectedItem)||void 0===o?void 0:o.sellers[0].commertialOffer.ListPrice),y=(null===(s=b.sellers.find((function(e){return e.sellerDefault})))||void 0===s?void 0:s.commertialOffer.Price)||Math.round(null===(v=k.selectedItem)||void 0===v?void 0:v.sellers[0].commertialOffer.Price),h=null===(f=k.selectedItem)||void 0===f?void 0:f.sellers[0].commertialOffer.taxPercentage,P=F;(h*=100)>0&&(P=19*F/100+F),P=(P=Math.round(P)).toLocaleString("es-CO",{style:"currency",currency:"COP",minimumFractionDigits:0});var O=y;return h>0&&(O=19*y/100+y),O=(O=Math.round(O)).toLocaleString("es-CO",{style:"currency",currency:"COP",minimumFractionDigits:0}),t.a.createElement(i.Fragment,null,S>0?t.a.createElement("div",{className:u.a.containerPreciosIVA},F!=y?t.a.createElement("div",{className:u.a.containerPrecioFullAntes},t.a.createElement("p",{className:u.a.precioFullPlp},O),t.a.createElement("p",{className:u.a.precioFullPlpAntes},P)):t.a.createElement("div",{className:u.a.containerPrecioFull},t.a.createElement("p",{className:u.a.precioFullPlp},O)),t.a.createElement("div",{className:u.a.containerUnidadMedida},t.a.createElement("p",{className:u.a.unidadMedidaPlp}," ",V))):null)}},37:function(e,n){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getRewardValue"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"value"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"alfagresalfa.components@10.3.71",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"product"},arguments:[{kind:"Argument",name:{kind:"Name",value:"identifier"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"sku"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"value"}}}]}}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"provider"},value:{kind:"StringValue",value:"vtex.search-graphql",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"a264ce74fc9008ebcb0c7dc584bf59e70013c285c249a2181c247885dc9ee76c",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"properties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"values"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"measurementUnit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"variations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"values"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sellers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sellerDefault"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commertialOffer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"Price"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ListPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"RewardValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"AvailableQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:721}};a.loc.source={body:'query getRewardValue($value: ID!) @context(sender: "alfagresalfa.components@10.3.71") {\n product(identifier: {field: sku, value: $value}) @context(provider: "vtex.search-graphql") @runtimeMeta(hash: "a264ce74fc9008ebcb0c7dc584bf59e70013c285c249a2181c247885dc9ee76c") {\n productId\n properties {\n name\n values\n __typename\n }\n items {\n itemId\n measurementUnit\n variations {\n name\n values\n __typename\n }\n sellers {\n sellerDefault\n commertialOffer {\n Price\n ListPrice\n RewardValue\n AvailableQuantity\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function t(e,n){for(var a=0;a0;){var u=r;r=new Set,u.forEach((function(e){l.has(e)||(l.add(e),(i[e]||new Set).forEach((function(e){r.add(e)})))}))}return l.forEach((function(n){var i=t(e,n);i&&a.definitions.push(i)})),a}(a,"getRewardValue")},6:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]}},[[346,"common",0]]]);; (window.webpackJsonpalfagresalfa_components_10_3_71=window.webpackJsonpalfagresalfa_components_10_3_71||[]).push([["HideEspecification"],{0:function(t,e){t.exports=React},210:function(t,e,a){"use strict";a.r(e),function(t){var e=a(1);a.p=Object(e.getPublicPath)("alfagresalfa.components@10.3.71");var o=Object(e.register)((function(){return a(211)}),t,"alfagresalfa.components@10.3.71","alfagresalfa.components@10.x","HideEspecification");o.renderHotReload,o.setupHMR}.call(this,a(5)(t))},211:function(t,e,a){"use strict";a.r(e);var o=a(0),i=function(t){var e=t.valores;return Object(o.useEffect)((function(){var t=new Set(e.map((function(t){return t.__editorItemTitle})));document.querySelectorAll('table[class*="'.concat("specificationsTable--Item-description",'"]')).forEach((function(e){e.querySelectorAll("td[data-specification]").forEach((function(e){t.has(e.getAttribute("data-specification"))&&(e.closest("tr").style.display="none")}))}))}),[e,"specificationsTable--Item-description"]),null};i.schema={title:"Ocultar Valores [Tabla de atributos]",type:"object",properties:{valores:{title:"Valores",type:"array",items:{title:"Valor a Ocultar",type:"object",properties:{__editorItemTitle:{title:"Valor",type:"string"}}}}}},i.defaultProps={__editorItemTitle:"N/A"},e.default=i}},[[210,"common"]]]);; (window.webpackJsonpalfagresalfa_components_10_3_71=window.webpackJsonpalfagresalfa_components_10_3_71||[]).push([["SecondDescriptionByCollectionInPDP"],{0:function(e,t){e.exports=React},323:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("alfagresalfa.components@10.3.71");var c=Object(t.register)((function(){return n(375)}),e,"alfagresalfa.components@10.3.71","alfagresalfa.components@10.x","SecondDescriptionByCollectionInPDP");c.renderHotReload,c.setupHMR}.call(this,n(5)(e))},375:function(e,t,n){"use strict";n.r(t);var c=n(2),o=n(0),i=n.n(o),l=n(6),r=n.n(l),a=n(39),s=n.n(a),u=n(4),p=function(e){var t=e.collections,n=void 0===t?[]:t,l=r()(),a=Object(o.useState)([]),p=Object(c.a)(a,2),d=p[0],f=p[1];return Object(o.useEffect)((function(){var e,t,c;if(null===(e=null==l?void 0:l.product)||void 0===e?void 0:e.productClusters){var o=null===(c=null===(t=null==l?void 0:l.product)||void 0===t?void 0:t.productClusters)||void 0===c?void 0:c.map((function(e){return e.id})),i=null==n?void 0:n.filter((function(e){return o.includes(e.collection)}));f(i)}}),[l,n]),i.a.createElement(i.a.Fragment,null,!u.canUseDOM&&i.a.createElement("div",null,i.a.createElement(s.a,{color:"currentColor",size:20})),d.length>0&&i.a.createElement("div",null,d.map((function(e,t){return i.a.createElement("span",{key:t,"data-collection":e.collection,className:"f6 fl w-100"},e.secondDescription)}))))};p.schema={title:"Descripción Secundaria",type:"object",properties:{collections:{title:"Colecciones",type:"array",items:{title:"Nueva Descripción",type:"object",properties:{__editorItemTitle:{title:"Titulo",type:"string"},collection:{title:"ID de la colección",description:"Agrega el ID de la colección. Ej: (123)",type:"string",default:""},secondDescription:{title:"Descripción de la colección",description:"Segunda descripción, para los productos de esta colección",type:"string"}}}}}};var d=p;t.default=d},39:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Spinner"]},4:function(e,t){e.exports=__RENDER_8_RUNTIME__},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]}},[[323,"common"]]]);; (window.webpackJsonpalfagresalfa_components_10_3_71=window.webpackJsonpalfagresalfa_components_10_3_71||[]).push([["CalculadoraModal"],{0:function(e,a){e.exports=React},167:function(e,a,t){"use strict";t.r(a),function(e){var a=t(1);t.p=Object(a.getPublicPath)("alfagresalfa.components@10.3.71");var l=Object(a.register)((function(){return t(168)}),e,"alfagresalfa.components@10.3.71","alfagresalfa.components@10.x","CalculadoraModal");l.renderHotReload,l.setupHMR}.call(this,t(5)(e))},168:function(e,a,t){"use strict";t.r(a);var l=t(2),c=t(14),n=t.n(c),o=t(0),s=t.n(o),r=t(49),i=t.n(r),u=t(22),d=t(6),m=t.n(d),p=t(50),b=t(3),f=t.n(b);a.default=function(){var e=m()(),a=(e.selectedItem.referenceId[0].Value,e.selectedItem.itemId),t=(e.selectedItem.sellers[0].sellerId,Object(o.useState)("")),c=Object(l.a)(t,2),r=c[0],d=c[1],b=Object(o.useState)(""),h=Object(l.a)(b,2),g=h[0],v=h[1],E=Object(o.useState)(1),y=Object(l.a)(E,2),O=y[0],N=y[1],x=Object(o.useState)(""),M=Object(l.a)(x,2),j=(M[0],M[1],Object(o.useState)(1)),_=Object(l.a)(j,2),S=_[0],F=_[1],C=Object(o.useState)(1),D=Object(l.a)(C,2),I=D[0],q=D[1],P=Object(o.useState)(1),k=Object(l.a)(P,2),R=k[0],T=k[1],w=Object(o.useState)(1),L=Object(l.a)(w,2),A=(L[0],L[1],Object(o.useState)(1)),z=Object(l.a)(A,2),J=z[0],B=z[1],G=Object(o.useState)(1),U=Object(l.a)(G,2),H=U[0],V=U[1],K=Object(o.useState)(0),Q=Object(l.a)(K,2),W=Q[0],Y=(Q[1],Object(o.useState)("")),X=Object(l.a)(Y,2),Z=(X[0],X[1],Object(o.useState)(0)),$=Object(l.a)(Z,2),ee=$[0],ae=$[1],te=Object(o.useState)(0),le=Object(l.a)(te,2),ce=le[0],ne=le[1],oe=Object(o.useState)(""),se=Object(l.a)(oe,2),re=se[0],ie=se[1],ue=Object(o.useState)(""),de=Object(l.a)(ue,2),me=de[0],pe=de[1],be=Object(o.useState)(""),fe=Object(l.a)(be,2),he=fe[0],ge=fe[1],ve=Object(o.useState)(""),Ee=Object(l.a)(ve,2),ye=Ee[0],Oe=Ee[1],Ne=Object(o.useState)(""),xe=Object(l.a)(Ne,2),Me=xe[0],je=xe[1],_e=Object(o.useState)(""),Se=Object(l.a)(_e,2),Fe=(Se[0],Se[1]),Ce=Object(o.useState)(""),De=Object(l.a)(Ce,2),Ie=(De[0],De[1]),qe=Object(o.useState)(!0),Pe=Object(l.a)(qe,2),ke=Pe[0],Re=Pe[1];setTimeout((function(){if(("m²"==g||"m2"==g||"M2"==g)&&(document.querySelector(".vtex-flex-layout-0-x-flexCol--container-calculadora").style.display="flex",W>0))document.querySelector(".vtex-numeric-stepper__input").value.split(" ")[1]}),500),Object(o.useEffect)((function(){setTimeout((function(){for(var a=e.product.properties,t=0;t=1){q(t),T(Math.ceil(t/S)),e.product.categories.includes("/Decorados/Mallas/")?(c>=30||c<30)&&N(Math.ceil(t/(c/100*(n/100))).toFixed(0)):N((Math.ceil(t/S)*S).toFixed(0)),ne(Math.ceil(Math.ceil(t/S)*S*parseFloat(ee)/25));var o=JSON.parse(localStorage.getItem("orderform")).id;pe(o)}else q(1),T(1);else if(1==ke)if(t>=1){q(1.05*Math.abs(t)),T(Math.ceil(1.05*t/S)),e.product.categories.includes("/Decorados/Mallas/")?(c>=30||c<30)&&N(Math.ceil(1.05*t/(c/100*(n/100))).toFixed(0)):N((Math.ceil(1.05*t/S)*S).toFixed(0)),ne(Math.ceil(Math.ceil(1.05*t/S)*S*parseFloat(ee)/25));var s=JSON.parse(localStorage.getItem("orderform")).id;pe(s)}else q(1),T(1)}else alert("Aceptamos solo números")}}),s.a.createElement("p",{className:f.a.titulos5}," ",g))),s.a.createElement("div",{style:{display:"none"},className:f.a.columna},s.a.createElement("p",{className:f.a.titulos5}," Desperdicio"),s.a.createElement("input",{className:f.a.input,type:"number",value:I}),s.a.createElement("p",{className:f.a.titulos5}," ",g)))),s.a.createElement("hr",null),s.a.createElement("div",{className:f.a.contenedorGeneral_columna},s.a.createElement("div",{className:f.a.columna},s.a.createElement("div",{className:f.a.columna},s.a.createElement("h1",{className:f.a.titulos7},"No conozco el área, pero conozco el largo y el ancho "),s.a.createElement("div",{className:f.a.columna},s.a.createElement("div",{style:{paddingBottom:"0.5rem"}},"Largo"),s.a.createElement("div",{className:f.a.contenedorPopup},s.a.createElement("input",{className:f.a.input2,type:"number",id:"medidas_largo",min:0,placeholder:"Largo",onChange:function(e){return B(Math.abs(e.target.value))}}),s.a.createElement("p",{className:f.a.titulos5}," m"))),s.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},s.a.createElement("button",{onClick:function(){var a=Math.abs(J),t=Math.abs(H);if("number"==typeof parseFloat(J)||"number"==typeof parseFloat(H)){var l=a*t;document.querySelector("#medidas_largo").value=a,document.querySelector("#medidas_ancho").value=t,q(l),T(Math.ceil(l/S)),N(Math.ceil(l/S)*S);var c=e.selectedItem.variations[1].values[0].split(/x/i),n=parseInt(c[0]),o=parseInt(c[1]);0==ke?l>=1?(ne(Math.ceil(Math.ceil(l/S)*S*parseFloat(ee)/25)),q(l),T(Math.ceil(l/S)),e.product.categories.includes("/Decorados/Mallas/")?(n>=30||n<30)&&N(Math.ceil(l/(n/100*(o/100))).toFixed(0)):N((Math.ceil(l/S)*S).toFixed(0))):(q(1),T(1)):1==ke&&(l>=1?(ne(Math.ceil(Math.ceil(1.05*l/S)*S*parseFloat(ee)/25)),q(1.05*l),T(Math.ceil(1.05*l/S)),e.product.categories.includes("/Decorados/Mallas/")?(n>=30||n<30)&&N(Math.ceil(1.05*l/(n/100*(o/100))).toFixed(0)):N((Math.ceil(1.05*l/S)*S).toFixed(0))):(q(1),T(1)))}else alert("Aceptamos solo números")},style:{fontFamily:"Gilroy Light",border:"0",backgroundColor:"#1b262e",color:"white",borderRadius:"50px",width:"60%",display:"flex",justifyContent:"center",padding:"2%"}},"Calcular")),s.a.createElement("div",{className:f.a.columna},s.a.createElement("div",{style:{paddingBottom:"0.5rem"}},"Ancho"),s.a.createElement("div",{className:f.a.contenedorPopup},s.a.createElement("input",{className:f.a.input2,type:"number",id:"medidas_ancho",min:0,placeholder:"Ancho",onChange:function(e){return V(Math.abs(e.target.value))}}),s.a.createElement("p",{className:f.a.titulos5}," m")))))),s.a.createElement("hr",null),s.a.createElement("div",{className:f.a.columna},s.a.createElement("div",null,s.a.createElement("div",null,s.a.createElement("h1",{style:{borderLeft:"2px solid #FF4D00",paddingLeft:"10px",fontSize:"18px"},className:f.a.titulos3},s.a.createElement("strong",null,"Resultado"))),s.a.createElement("div",null,s.a.createElement("h1",{className:f.a.titulos7},"Te recomendamos inlcuir el 5% adicional para cubrir costos posibles de daños o faltantes")),s.a.createElement("div",{className:f.a.contenedorPopup},s.a.createElement("div",{className:f.a.img_cubo,style:{display:1==r?"none":"block"}},s.a.createElement("img",{src:"/arquivos/cubo-calculadora-pdp.png",alt:"cubo-calculadora"})),s.a.createElement("div",{style:{display:1==r?"flex":"block"}},s.a.createElement("h1",{className:f.a.titulos3},"Necesitas un total de ",s.a.createElement("strong",{style:{display:1==r?"none":"inline-block"}}," ",R," cajas")),s.a.createElement("h1",{className:f.a.titulos3},s.a.createElement("i",null,"( ",O," ",g," )")))),s.a.createElement("div",{style:{justifyContent:"center"},className:f.a.contenedorPopup},s.a.createElement("input",{className:f.a.box,checked:ke,onChange:function(){Re((function(a){var t=!a,l=e.selectedItem.variations[1].values[0].split(/x/i),c=parseInt(l[0]),n=parseInt(l[1]);t?I>=1?(ne(Math.ceil(Math.ceil(1.05*I/S)*S*parseFloat(ee)/25)),q(1.05*Math.abs(I)),T(Math.ceil(1.05*I/S)),e.product.categories.includes("/Decorados/Mallas/")?(c>=30||c<30)&&N(Math.ceil(1.05*I/(c/100*(n/100))).toFixed(0)):N((Math.ceil(1.05*I/S)*S).toFixed(0))):(q(1),T(1)):I>=1?(ne(Math.ceil(Math.ceil(I/1.05/S)*S*parseFloat(ee)/25)),q(Math.abs(I)/1.05),T(Math.ceil(I/1.05/S)),e.product.categories.includes("/Decorados/Mallas/")?(c>=30||c<30)&&N(Math.ceil(I/1.05/(c/100*(n/100))).toFixed(0)):N((Math.ceil(I/1.05/S)*S).toFixed(0))):(q(1),T(1))}))},type:"checkbox"}),s.a.createElement("h4",{style:{color:"#1b262e"},className:f.a.titulos4},"Adicionar 5% de desperdicio"))),s.a.createElement("div",{style:{marginTop:"1rem",display:"none"},className:f.a.contenedorPopup},s.a.createElement("div",{style:{width:"50%"}},s.a.createElement("img",{src:"/arquivos/cubo-calculadora-pdp.png",alt:"cubo-calculadora"})),s.a.createElement("div",{className:f.a.columna},s.a.createElement("h3",{className:f.a.titulos3},"Te recomendamos que la cantidad de pegante que necesitas para tu producto es el ",s.a.createElement("strong",null,"5kg")," de pegante."),s.a.createElement("h3",{className:f.a.titulos3},"Conoce ",s.a.createElement("a",{className:f.a.titulos4},"Aqui")," los productos recomendados en pegantes."))),s.a.createElement("div",{className:f.a.columna},s.a.createElement("button",{style:{fontFamily:"Gilroy Light",border:"0",backgroundColor:"#1b262e",color:"white",borderRadius:"50px",width:"60%",display:"flex",justifyContent:"center",padding:"2%",margin:"auto",marginTop:"1rem"},onClick:function(){var e,a=Ae.current.querySelector(".vtex-button");null===(e=Te.find((function(e){return e.id==(null==we?void 0:we.itemId)})))||void 0===e||e.quantity;!function(e,a,t){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=new Headers;n.append("Content-Type","application/json");var o=JSON.stringify({expectedOrderFormSections:["items","totalizers","clientProfileData","shippingData","paymentData","sellers","messages","marketingData","clientPreferencesData","storePreferencesData","giftRegistryData","ratesAndBenefitsData","openTextField","commercialConditionData","customData"],orderItems:[{id:a,quantity:t,seller:c}]}),s={method:"POST",headers:n,body:o,redirect:"follow"};fetch("/api/checkout/pub/orderForm/"+e+"/items?sc="+l,s).then((function(e){return e.text()})).then((function(e){return console.log(e)})).catch((function(e){return console.log("error",e)}))}(me,re,ce),Le({type:"SET_QUANTITY",args:{quantity:R}}),setTimeout((function(){return a.click()}),1e3)}},"Agregar al carrito"),s.a.createElement("div",{style:{display:"none"},ref:Ae},s.a.createElement(i.a,null)))),ee>0?s.a.createElement("div",{className:f.a.box_pegantes},s.a.createElement("div",null,s.a.createElement("a",{href:Me},s.a.createElement("img",{src:ye}))),s.a.createElement("div",null,s.a.createElement("h5",null,"La cantidad de pegante que necesitas para instalar tu producto es de ",ce," bolsas de ",he),s.a.createElement("h5",{style:{display:"none"}},"Conoce ",s.a.createElement("a",null,"aqui")," los productos recomendamos en pegante"))):null)}},22:function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.order-manager@0.x/OrderForm"]},49:function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.add-to-cart-button@0.x/Wrapper"]},50:function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductDispatchContext"]},6:function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]}},[[167,"common",1,0]]]);; (window.webpackJsonpalfagresalfa_components_10_3_71=window.webpackJsonpalfagresalfa_components_10_3_71||[]).push([["Image3d"],{0:function(e,t){e.exports=React},221:function(e,t,o){"use strict";o.r(t),function(e){var t=o(1);o.p=Object(t.getPublicPath)("alfagresalfa.components@10.3.71");var r=Object(t.register)((function(){return o(222)}),e,"alfagresalfa.components@10.3.71","alfagresalfa.components@10.x","Image3d");r.renderHotReload,r.setupHMR}.call(this,o(5)(e))},222:function(e,t,o){"use strict";o.r(t);var r=o(2),s=o(0),n=o.n(s),c=o(6),l=o.n(c),a=o(3),i=o.n(a),u=function(e){var t,o=e.position,c=l()(),a="https://universal-web-viewer.web.app/?referenceId="+c.selectedItem.referenceId[0].Value+"&companyId=9WK9YFdjwUhfdzTtwOuW",u=Object(s.useState)(!1),m=Object(r.a)(u,2),d=m[0],p=m[1],f=null==c||null===(t=c.product)||void 0===t?void 0:t.properties,x="no";f.forEach((function(e){"3D"==e.name&&(x=(x=e.values[0]).toLowerCase())}));return Object(s.useEffect)((function(){!function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;document.querySelector(".vtex-store-components-3-x-productImagesThumb-custom")&&document.querySelector(".vtex-store-components-3-x-productImagesThumb-custom").remove();var r=!1,s=document.querySelector(".vtex-store-components-3-x-carouselGaleryThumbs"),n=document.querySelector(".vtex-store-components-3-x-carouselGaleryThumbs .swiper-wrapper"),c=document.querySelector(".vtex-store-components-3-x-carouselGaleryCursor .vtex-store-components-3-x-productImagesGallerySwiperContainer"),l=document.querySelector(".vtex-flex-layout-0-x-flexCol--product-images-3d"),i=document.querySelectorAll(".vtex-flex-layout-0-x-flexColChild--product-images-3d"),u=document.querySelector(".vtex-store-components-3-x-productImagesGallerySlide"),m=document.querySelectorAll(".vtex-store-components-3-x-productImagesThumb");if(a&&t<300&&s&&n&&c){s.style.display="block";var d=document.querySelector(".vtex-store-components-3-x-productImagesThumb-custom"),f=document.querySelector("vtex-flex-layout-0-x-flexRow--3d-objects");if("si"==x||"s"==x){var v,y,h=function(){window.innerWidth<768?c.style.display="none":c.style.visibility="hidden",p(!0),l.style.display="flex",l.style.flexDirection="row",i.forEach((function(e,t){0===t&&(e.style.width="100%")}))};if(null==f){var b='
Product-3D
',g=document.createElement("div");g.style="height:115px;max-height:unset;position:relative;order: 3",g.className="vtex-store-components-3-x-productImagesThumb-custom mb5 pointer w-20",g.innerHTML=b,n.matches(".vtex-store-components-3-x-carouselGaleryThumbs .swiper-wrapper:has(.vtex-store-components-3-x-figure--video)")&&(n.lastElementChild.style.order=o?2*o:2),d=document.querySelector(".vtex-store-components-3-x-productImagesThumb-custom"),f=document.querySelector(".vtex-flex-layout-0-x-flexRow--3d-objects")}m.forEach((function(e){null==e||e.addEventListener("click",(function(){p(!1),window.innerWidth<768?c.style.display="block":c.style.visibility="visible",l.style.display="block",u.style.width="100%",i.forEach((function(e,t){0===t?e.style.width="100%":1===t&&(e.style.width="0%")}))}),!1)})),console.log("url3D",a),null===(v=d)||void 0===v||v.addEventListener("click",h,!1),null===(y=f)||void 0===y||y.addEventListener("click",h,!1)}}else!r&&t<300&&setTimeout((function(){return e(t++)}),100)}()}),[c.selectedItem]),n.a.createElement(s.Fragment,null,d?n.a.createElement("div",{className:i.a.contenedor_iframe,style:{display:"block"}},n.a.createElement("iframe",{src:a,frameborder:"0"})):null)};u.schema={title:"Posicion video PDP",type:"object",properties:{position:{title:"Posicion",type:"number"}}},t.default=u},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]}},[[221,"common",0]]]);;