1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2419],{25236:function(e,n,t){var r=t(85893);t(67294);n.Z=function(e){return(0,r.jsx)("div",{className:"container",children:(0,r.jsx)("div",{className:"row justify-content-center",children:(0,r.jsx)("div",{className:(e.lg?"col-lg-".concat(e.lg):"col-lg-12")+" col-12",children:e.children})})})}},65354:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(51438),s=t(88029),i=t(60460),a=t(85893),o=t(67294),c=t(9008),l=t.n(c),u=t(40782),d=t(55739),h=t(49892),m=t(11275),p=t(86319),f=function(e){var n=(0,o.useState)(!0),t=n[0],r=n[1],s=(0,o.useState)({}),i=s[0],c=s[1],l=(0,o.useState)("/"),u=(l[0],l[1]);(0,o.useEffect)((function(){var e=(0,h.VW)(),n=(0,h.$8)();t&&(u(n[0]),c(e),r(!1))}),[]);return(0,a.jsx)("header",{children:(0,a.jsxs)("div",{className:"content-header",children:[(0,a.jsx)("div",{className:"content-btn-mobile d-flex d-lg-none h-100 align-items-center",children:(0,a.jsx)("button",{onClick:function(){return function(){var e=document.getElementById("pageWrapper");(null===e||void 0===e?void 0:e.classList.contains("show-sidebar-mobile"))?null===e||void 0===e||e.classList.remove("show-sidebar-mobile"):null===e||void 0===e||e.classList.add("show-sidebar-mobile")}()},children:(0,a.jsx)("i",{className:"fa-solid fa-bars"})})}),(0,a.jsx)("div",{className:"content-topbar",children:(0,a.jsxs)("div",{className:"topbar-container",children:[(0,a.jsx)("div",{className:"content-page-meta-name",children:(0,a.jsx)("a",{href:"/",title:"Regresar a Exportemos",children:(0,a.jsx)("img",{fetchpriority:"high",src:"/static/images/dashboard/logo_exportemos.svg",alt:"Logo"})})}),(0,a.jsx)("div",{className:"content-page-data-user-top",children:(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(d.Z.Toggle,{as:"div",id:"dropdown-basic",className:"user-dropdown",children:(0,a.jsxs)("div",{className:"content-top-user-container",children:[(0,a.jsxs)("div",{className:"content-top-user-data",children:[(0,a.jsxs)("div",{className:"top-user-name",children:["Bienvenido ",!t&&i&&i.nombres&&""!==i.nombres?i.nombres:"Usuario"]}),(0,a.jsx)("div",{className:"top-user-email",children:!t&&i&&i.email&&""!==i.email?i.email:"[email protected]"})]}),(0,a.jsx)("div",{className:"content-top-user-icon",children:(0,a.jsx)("img",{fetchpriority:"high",src:"/static/images/dashboard/userimg.svg",alt:"user icon"})})]})}),(0,a.jsx)(d.Z.Menu,{align:"end",children:(0,a.jsx)(m.Z,{user:!t&&i&&i.nombres&&""!==i.nombres?i.nombres:"Usuario",email:!t&&i&&i.email&&""!==i.email?i.email:"[email protected]",logout:function(){(0,p.kS)(!0)}})})]})})]})})]})})},g=function(e){(0,s.Z)(t,e);var n=(0,i.Z)(t);function t(e){var s;return(0,r.Z)(this,t),(s=n.call(this,e)).toggleSidebarMobile=function(){var e=document.getElementById("pageWrapper");(null===e||void 0===e?void 0:e.classList.contains("show-sidebar-mobile"))?null===e||void 0===e||e.classList.remove("show-sidebar-mobile"):null===e||void 0===e||e.classList.add("show-sidebar-mobile")},s.state={username:"",email:""},s}return t.prototype.render=function(){var e=this;return(0,a.jsxs)("div",{className:"page-wrapper",id:"pageWrapper",children:[(0,a.jsx)("div",{onClick:function(){return e.toggleSidebarMobile()},className:"overlay-sidebar"}),(0,a.jsx)(l(),{children:(0,a.jsx)("link",{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css",integrity:"sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})}),(0,a.jsx)(u.Ix,{}),(0,a.jsxs)("main",{children:[(0,a.jsx)(f,{}),(0,a.jsx)("div",{className:"content-page show-sidebar",children:(0,a.jsx)("div",{className:"page",children:this.props.children})})]})]})},t}(o.Component)},89268:function(e,n,t){var r=t(85893);t(67294);n.Z=function(){return(0,r.jsx)("div",{className:"text-center",children:(0,r.jsxs)("div",{className:"lds-roller",children:[(0,r.jsx)("div",{}),(0,r.jsx)("div",{}),(0,r.jsx)("div",{}),(0,r.jsx)("div",{})]})})}},37968:function(e,n,t){t.d(n,{Z:function(){return O}});var r=t(85893),s=t(67294),i=t(40782),a=t(94136),o=t(79535),c=t(49892),l=t(26042),u=t(69396);function d(e,n){if(null==e)return{};var t,r,s=function(e,n){if(null==e)return{};var t,r,s={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(s[t]=e[t]);return s}
1(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}var h=t(39474),m=t(13375),p=t(53128),f=t(91566);function g(e,n){return(0,h.Z)(e)||(0,m.Z)(e,n)||(0,f.Z)(e,n)||(0,p.Z)()}var v=t(45350),b=t(19154),j=(v.c.MultiValueContainer,v.c.Placeholder,function(e){var n=e.getStyles,t=(e.Icon,e.isDisabled),i=e.isFocused,a=e.isSelected,o=e.children,c=e.innerProps,h=d(e,["getStyles","Icon","isDisabled","isFocused","isSelected","children","innerProps"]),m=(0,s.useState)(!1),p=m[0],f=m[1],g="transparent";i&&(g="#eee"),p&&(g="#B2D4FF");var b={alignItems:"center",backgroundColor:g,color:"inherit",display:"flex "},j=(0,u.Z)((0,l.Z)({},c),{onMouseDown:function(){return f(!0)},onMouseUp:function(){return f(!1)},onMouseLeave:function(){return f(!1)},style:b});return(0,r.jsxs)(v.c.Option,(0,u.Z)((0,l.Z)({},h),{isDisabled:t,isFocused:i,isSelected:a,getStyles:n,innerProps:j,children:[(0,r.jsx)("input",{type:"checkbox",className:"me-2 mr-2",checked:a}),o]}))}),x=function(e){var n=e.children,t=d(e,["children"]),s=g(n,2),i=s[0],a=s[1];if(Array.isArray(i))if(i.length===t.options.length)i="Todas mis partidas";else{var o=1===i.length?"":"s";i="".concat(i.length," partida").concat(o," seleccionada").concat(o)}return(0,r.jsxs)(v.c.ValueContainer,(0,u.Z)((0,l.Z)({},t),{children:[i,a]}))};var y=function(e){var n=e.onChange,t=e.value,i=e.user,c=e.onLoadedOptions,l=(0,s.useState)(!0),u=l[0],d=(l[1],(0,s.useState)("Todos mis productos")),h=d[0],m=(d[1],(0,s.useState)([])),p=m[0],f=m[1];return(0,s.useEffect)((function(){u&&function(){var e=a.Le+"/WebUX/ListarPartidasUsuario/".concat(i.id);o.Z.get(e).then((function(e){var n=e.data.result,t=window.location.search,r=new
1URLSearchParams(t).get("partidas");if(r&&r.length>0&&n.length>0){var s=r.split(","),i=[];s.length>0&&(n.map((function(e){s.includes(e.value.toString())&&i.push(e)})),f(n),c(i))}else f(n),c(n)})).catch((function(e){console.error(e)}))}()}),[]),(0,r.jsx)("div",{children:(0,r.jsx)(b.ZP,{isClearable:!0,options:p,placeholder:h,isMulti:!0,closeMenuOnSelect:!1,hideSelectedOptions:!1,onChange:function(e){return function(e){n&&(Array.isArray(e)&&e.length>0?e.length===p.length?n(p):n(e):n(p))}(e)},value:Array.isArray(t)&&0===t.length||null===t?p:t,components:{Option:j,ValueContainer:x}})})},w=(v.c.MultiValueContainer,v.c.Placeholder,function(e){var n=e.getStyles,t=(e.Icon,e.isDisabled),i=e.isFocused,a=e.isSelected,o=e.children,c=e.innerProps,h=d(e,["getStyles","Icon","isDisabled","isFocused","isSelected","children","innerProps"]),m=(0,s.useState)(!1),p=m[0],f=m[1],g="transparent";i&&(g="#eee"),p&&(g="#B2D4FF");var b={alignItems:"center",backgroundColor:g,color:"inherit",display:"flex "},j=(0,u.Z)((0,l.Z)({},c),{onMouseDown:function(){return f(!0)},onMouseUp:function(){return f(!1)},onMouseLeave:function(){return f(!1)},style:b});return(0,r.jsxs)(v.c.Option,(0,u.Z)((0,l.Z)({},h),{isDisabled:t,isFocused:i,isSelected:a,getStyles:n,innerProps:j,children:[(0,r.jsx)("input",{type:"checkbox",className:"me-2 mr-2",checked:a}),o]}))}),S=function(e){var n=e.children,t=d(e,["children"]),s=g(n,2),i=s[0],a=s[1];if(Array.isArray(i))if(i.length===t.options.length)i="Todos los mercados";else{var o=1===i.length?"":"s";i="".concat(i.length," paise").concat(o," seleccionado").concat(o)}return(0,r.jsxs)(v.c.ValueContainer,(0,u.Z)((0,l.Z)({},t),{children:[i,a]}))};var N=function(e){var n=e.onChange,t=e.value,i=e.user,c=e.onLoadedOptions,l=(0,s.useState)(!0),u=l[0],d=l[1],h=(0,s.useState)("Todos los mercados"),m=h[0],p=(h[1],(0,s.useState)([])),f=p[0],g=p[1];return(0,s.useEffect)((function(){u&&function(){var e=a.Le+"/Webux/ListarPaisesUsuario/".concat(i.id);o.Z.get(e).then((function(e){var n=e.data.result,t=window.location.search,r=new
1URLSearchParams(t).get("paises");if(r&&r.length>0&&n.length>0){var s=r.split(","),i=[];s.length>0&&(n.map((function(e){s.includes(e.value.toString())&&i.push(e)})),g(n),c(i))}else g(n),c(n);d(!1)})).catch((function(e){console.error(e)}))}()}),[]),(0,r.jsx)("div",{children:(0,r.jsx)(b.ZP,{isClearable:!0,options:f,placeholder:m,isMulti:!0,closeMenuOnSelect:!1,hideSelectedOptions:!1,onChange:function(e){return function(e){n&&(Array.isArray(e)&&e.length>0?e.length===f.length?n(f):n(e):n(f))}(e)},value:Array.isArray(t)&&0===t.length||null===t?f:t,components:{Option:w,ValueContainer:S}})})};var O=function(e){var n=(0,s.useState)(!0),t=n[0],l=n[1],u=(0,s.useState)([]),d=u[0],h=u[1],m=(0,s.useState)([]),p=m[0],f=m[1],g=(0,s.useState)(0),v=(g[0],g[1],(0,s.useState)(0)),b=(v[0],v[1],(0,s.useState)(!1)),j=(b[0],b[1]),x=(0,s.useState)(!1),w=x[0],S=x[1],O=(0,c.VW)(),Z=function(e,n){"partidas"===e?h(n):"paises"===e&&f(n)};return(0,s.useEffect)((function(){d.length>0&&p.length>0?(l(!1),e.onSearchByLoadedFilters&&e.onSearchByLoadedFilters({partidaCodigo:d.length>0?d.map((function(e){return e.value})):"X",paisCodigo:p.length>0?p.map((function(e){return e.value})):"X"})):e.onSearchByLoadedFilters&&e.onSearchByLoadedFilters(null)}),[t,p,d]),(0,r.jsx)("div",{className:"header-form py-2",children:(0,r.jsx)("form",{onSubmit:function(n){return function(n){n.preventDefault(),j(!0),e.onSearch&&e.onSearch({partidaCodigo:d.length>0?d.map((function(e){return e.value})):"X",paisCodigo:p.length>0?p.map((function(e){return e.value})):"X"})}(n)},action:"",children:(0,r.jsx)("div",{className:"container-fluid",children:(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)("div",{className:"col-lg-4 col-12 col-sm-6 mb-2",children:(0,r.jsx)(y,{user:O,value:d,onChange:function(e){return h(e)},onLoadedOptions:function(e){return Z("partidas",e)}})}),(0,r.jsx)("div",{className:"col-lg-4 col-12 col-sm-6 mb-2",children:(0,r.jsx)(N,{user:O,value:p,onChange:function(e){return f(e)},onLoadedOptions:function(e){return Z("paises",e)}})}),(0,r.jsx)("div",{className:"col-lg-2 col-12 col-sm-6 mb-2",children:(0,r.jsx)("button",{type:"submit",className:"btn btn-primary w-100 btn-top text-uppercase fw-light",children:"Aplicar"})}),(0,r.jsx)("div",{className:"col-lg-2 col-12 col-sm-6 mb-2",children:(0,r.jsx)("button",{onClick:function(e){return function(e){e.preventDefault(),S(!0);var n={usua_Id:O.id,partidas:d.length<=0?"":d.map((function(e){return e.value})).toString(),paises:p.length<=0?"":p.map((function(e){return e.value})).toString(),hbus_Url:window.location.origin+window.location.pathname,hbus_EsArmonizado:!1},t=JSON.stringify(n),r=a.Le+"/WebUX/RegistrarHistorialBusqueda";o.Z.post(r,JSON.stringify(t)).then((function(e){i.Am.info("Se ha guardado su b\xfasqueda"),S(!1)})).catch((function(e){console.error(e),S(!0)}))}(e)},disabled:d.length<=0&&p.length<=0,type:"button",className:"btn w-100 btn-save",children:w?"Guardando..":"Guardar b\xfasqueda"})})]})})})})}},11275:function(e,n,t){var r=t(85893),s=t(67294),i=t(49892),a=t(86319);n.Z=function(e){var n=(0,s.useState)(!1);return n[0],n[1],(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"content-data-user-dropdown",children:[(0,r.jsxs)("div",{className:"user-top-dropdown-content-data",children:[(0,r.jsxs)("h3",{className:"username fw-bold",children:["Bienvenido(a) ",e.user]}),(0,r.jsx)("h6",{className:"useremail",children:e.email})]}),e.private?(0,r.jsx)("div",{children:(0,r.jsxs)("button",{onClick:function(){return function(){var e=(0,i.$8)();e.length>1?window.open("/dashboard".concat(e[1]),"_blank"):1===e.length&&window.open("/dashboard".concat(e[0]),"_blank")}()},className:(e.private?"btn-red":"")+" btn-dropdown-top btn btn-primary w-100 mb-18",children:[(0,r.jsx)("i",{className:"fa fa-arrow-left",style:{marginRight:8},"aria-hidden":"true"}),"Administrar mi cuenta"]})}):(0,r.jsx)("div",{children:(0,r.jsxs)("button",{onClick:function(){window.location.href="/"},className:(e.private?"btn-red":"")+" btn-dropdown-top btn btn-primary w-100 mb-18",children:[(0,r.jsx)("i",{className:"fa-solid fa-arrow-left me-2"}),"Ir a Exportemos.pe"]})}),(0,r.jsx)("div",{className:"divider-data"}),(0,r.jsx)("button",{style:{marginTop:4},className:(e.private?"btn-logout-top":"")+" btn w-100 fw-bold",onClick:function(){return e.logout?e.logout():void(0,a.kS)(!0)},children:"Cerrar sesi\xf3n"})]})})}},46052:function(e,n,t){t.d(n,{_:function(){return r}});var r=function(e){return Array.isArray(e)?e:[]}},39474:function(e,n,t){function r(e){if(Array.isArray(e))return e}t.d(n,{Z:function(){return r}})},53128:function(e,n,t){function r(){throw new TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.d(n,{Z:function(){return r}})},69396:function(e,n,t){function r(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}t.d(n,{Z:function(){return r}})}}]);
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.