PageSourceSearch

https://web.mobileinventory.net/static/js/8936.0ea52e5d.chunk.js

js mobileinventory.net collected 2026-10-01 23:56:13 UTC 41,809 bytes, 4 lines download raw bytes

1/*! For license information please see 8936.0ea52e5d.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkmobileinventory=self.webpackChunkmobileinventory||[]).push([[8936],{96628:(e,t,i)=>{i.d(t,{A:()=>o,J:()=>n});i(9950);var s=i(44414);const l=e=>{let{children:t,value:i,disabled:l,ariaLabelledby:n,...o}=e;return(0,s.jsx)("option",{value:i,disabled:l,"aria-labelledby":n||t,...o,children:t})};l.defaultProps={disabled:!1,ariaLabelledby:null};const n=e=>{let{list:t}=e;return null===t||void 0===t?void 0:t.map((e=>(0,s.jsx)(l,{value:e.value,...e,children:e.text||e.label},e.value)))},o=l},35087:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(9950),l=i(48738),n=i.n(l),o=i(96628),a=i(10034),r=i(44414);const d=(0,s.forwardRef)(((e,t)=>{let{id:i,name:s,className:l,children:d=null,required:c=!1,placeholder:u,ariaDescribedby:m,ariaLabelledby:p,ariaLabel:v,list:h,multiple:x=!1,title:f,size:_,disabled:y=!1,value:b,defaultValue:g,isValid:j=!1,isTouched:N=!1,invalidFeedback:w,validFeedback:S,isValidMessage:I=!0,isTooltipFeedback:k=!1,onBlur:C,onChange:A,onFocus:
2F,onInput:L,onInvalid:M,onSelect:V,...B}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("select",{ref:t,id:i,className:n()("form-select",{["form-select-".concat(_)]:_,"text-muted":""===b&&u,"is-invalid":!j&&N&&w,"is-valid":!j&&N&&!w},l),name:s,"aria-label":v,"aria-describedby":m,"aria-labelledby":p,multiple:x,disabled:y,title:f,value:b,defaultValue:g,required:c,onBlur:C,onChange:A,onFocus:F,onInput:L,onInvalid:M,onSelect:V,...B,children:[u&&(0,r.jsx)(o.A,{value:"",hidden:!0,children:u}),d||h&&(0,r.jsx)(o.J,{list:h})]}),I&&(0,r.jsx)(a.A,{isTouched:N,invalidFeedback:w,validFeedback:S,isTooltip:k})]})}));d.displayName="Select";const c=d},83418:(e,t,i)=>{i.d(t,{A:()=>m});var s=i(9950),l=i(28429),n=i(8459),o=i(83592),a=i(67818),r=i(40616),d=i(74172),c=i(66987),u=i(44414);const m=e=>{let{isVisible:t,onClose:i}=e;const{t:m}=(0,a.Bd)(),{darkModeStatus:p}=(0,d.A)(),[v,h]=(0,s.useState)(!1),[x,f]=(0,s.useState)(null),_=(0,l.Zp)();(0,s.useEffect)((()=>{t&&f(null)}),[t]);return t?(0,u.jsx)("div",{id:"feature-needs-license",className:"position-absolute top-0 start-0 w-100 h-100",style:{backgroundColor:"rgba(255, 255, 255, 0.85)",zIndex:1e3},children:(0,u.jsx)("div",{className:"p-4 h-100 d-flex flex-column justify-content-center align-items-center",children:(0,u.jsxs)("div",{style:{backgroundColor:"#f5f5f5",padding:"2.5em",border:"1px solid #e0e0e0",borderRadius:"8px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",transition:"all 0.3s ease",position:"relative",maxWidth:"1200px",margin:"0 auto"},children:[(0,u.jsx)("div",{className:"d-flex justify-content-center align-items-center w-100 mb-4",children:(0,u.jsx)("h5",{className:"m-0",children:(0,u.jsx)(a.x6,{children:"trans_feature_needs_license_title"})})}),(0,u.jsx)("br",{}),(0,u.jsx)("br",{}),(0,u.jsxs)("div",{className:"text-center mb-4",children:[(0,u.jsx)("p",{style:{fontSize:"1.4rem",lineHeight:"1.6"},children:(0,u.jsx)(a.x6,{i18nKey:"trans_feature_needs_license_body_v2",components:{close:(0,u.jsx)("span",{onClick:i,style:{cursor:"pointer"},role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||i()}})}})}),(0,u.jsx)("p",{style:{fontSize:"1.2rem",lineHeight:"1.6",color:"grey"},children:(0,u.jsx)(a.x6,{children:"trans_feature_needs_license_body2_v2"})})]}),(0,u.jsx)("br",{}),(0,u.jsx)("br",{}),(0,u.jsxs)("div",{className:"d-flex flex-column align-items-center w-100",children:[(0,u.jsx)("div",{className:"d-flex align-items-center gap-2 mb-3",children:(0,u.jsx)(n.A,{color:"success",onClick:()=>_("../".concat(o.Tb.licenses.path)),children:(0,u.jsx)(a.x6,{children:"trans_check_the_available_licenses_v2"})})}),(0,u.jsx)("p",{className:"text-muted my-2",children:(0,u.jsx)(a.x6,{children:"trans_OR"})}),(0,u.jsx)(n.A,{color:"link",className:"text-muted opacity-75 px-2",onClick:()=>_("/trial"),children:(0,u.jsx)(a.x6,{children:"trans_start_a_trial"})}),(0,u.jsx)(n.A,{color:"link",size:"sm",className:"text-muted opacity-50",onClick:()=>{h(!0),window.location.reload()},isDisable:v,children:v?(0,u.jsx)(r.A,{size:"sm",inButton:!0,isSmall:!0}):(0,u.jsx)(c.A,{size:16})})]})]})})}):null}},58936:(e,t,i)=>{i.r(t),i.d(t,{default:()=>W});var s=i(9950),l=i(67818),n=i(28429),o=i(75475),a=i(68635),r=i(97976),d=i(8459),c=i(40616),u=i(97516),m=i(23884),p=i(90373),v=i(24201),h=i(35087),x=i(96628),f=i(41825),_=i(8495),y=i(3317),b=i(84486),g=i(55246),j=i(44414);const N=e=>"object"===typeof e&&null!==e,w=e=>{if(!N(e))return{};const t={};return"string"===typeof e.code&&(t.code=e.code),"string"===typeof e.message&&(t.message=e.message),N(e.data)&&(t.data=e.data),t},S=e=>{var t;let{isOpen:i,onClose:n,disableStart:o=!1,onExportStarted:a}=e;const{t:r}=(0,l.Bd)(),[p,f]=(0,s.useState)(!1),[_,b]=(0,s.useState)([]),[g,N]=(0,s.useState)(""),[S,I]=(0,s.useState)(null),[k,C]=(0,s.useState)(!1),[A,F]=(0,s.useState)(null),[L,M]=(0,s.useState)(""),[V,B]=(0,s.useState)(null),[O,E]=(0,s.useState)(!1),J=(0,s.useMemo)((()=>_.find((e=>e.inventoryId===g))||null),[_,g]),z=(0,s.useMemo)((()=>{var e;const t=null===A||void 0===A||null===(e=A.savedMapping)||void 0===e?void 0:e.shopifyLocationId;return!!t&&!((null===A||void 0===A?void 0:A.locations)||[]).some((e=>e.id===t))}),[null===A||void 0===A?void 0:A.locations,null===A||void 0===A||null===(t=A.savedMapping)||void 0===t?void 0:t.shopifyLocationId]),q=(0,s.useCallback)((async e=>{C(!0),B(null);try{var t;const i=await(0,y.gG)(e.inventoryId,e.inventoryIdFb||void 0),s=(null===i||void 0===i?void 0:i.data)||null;F(s);const l=new Set(((null===s||void 0===s?void 0:s.locations)||[]).map((e=>e.id))),n=(null===s||void 0===s||null===(t=s.savedMapping)||void 0===t?void 0:t.shopifyLocationId)||"";M((e=>{var t,i;return n&&l.has(n)?n:e&&l.has(e)?e:(null===s||void 0===s||null===(t=s.locations)||void 0===t||null===(i=t[0])||void 0===i?void 0:i.id)||""}))}catch(i){const e=w(i);
2B((e.message||r("trans_shopify_export_error_generic").toString()).slice(0,280)),F(null),M("")}finally{C(!1)}}),[r]);(0,s.useEffect)((()=>{if(!i)return;let e=!0;return(async()=>{f(!0),B(null),F(null),M("");try{const t=await(0,y.w$)(y.vZ.getInventories()),i=(Array.isArray(null===t||void 0===t?void 0:t.data)?t.data:[]).map((e=>{var t,i,s,l;return{inventoryId:(null===e||void 0===e||null===(t=e.idNomInventory)||void 0===t?void 0:t.toString())||"",inventoryIdFb:(null===e||void 0===e||null===(i=e.idNomInventoryFb)||void 0===i||null===(s=i.toString())||void 0===s?void 0:s.trim())||null,name:(null===e||void 0===e||null===(l=e.name)||void 0===l?void 0:l.toString())||""}})).filter((e=>e.inventoryId.length>0));if(!e)return;if(b(i),0===i.length)return N(""),I(null),F(null),void M("");const s=localStorage.getItem("selectedidInventory")||i[0].inventoryId,l=i.find((e=>e.inventoryId===s))||i[0];N(l.inventoryId),I(l.inventoryIdFb)}catch(t){if(!e)return;const i=w(t);B((i.message||r("trans_shopify_export_error_generic").toString()).slice(0,280)),b([]),N(""),I(null)}finally{e&&f(!1)}})(),()=>{e=!1}}),[i,r]),(0,s.useEffect)((()=>{i&&J&&(I(J.inventoryIdFb),q(J).catch((()=>{})))}),[i,q,J]);const D=(0,s.useCallback)((e=>{const t=e.target.value||"";N(t);const i=_.find((e=>e.inventoryId===t));I((null===i||void 0===i?void 0:i.inventoryIdFb)||null),F(null),M(""),B(null)}),[_]),P=(0,s.useCallback)((e=>{M(e.target.value||""),B(null)}),[]),T=(0,s.useCallback)((async()=>{if(g&&L&&!o&&!O){E(!0),B(null);try{var e;const t=await(0,y.fr)({inventoryId:g,inventoryIdFb:S||void 0,shopifyLocationId:L}),i=(null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.job)||null;if(i)return null===a||void 0===a||a(i),void n();B(r("trans_shopify_export_error_generic").toString())}catch(i){var t;const e=w(i),s=null===(t=e.data)||void 0===t?void 0:t.activeJob;if("SHOPIFY_EXPORT_ACTIVE_JOB"===e.code&&null!==s&&void 0!==s&&s.jobId)return null===a||void 0===a||a(s),void n();
2B((e.message||r("trans_shopify_export_error_generic").toString()).slice(0,280))}finally{E(!1)}}}),[o,O,n,a,g,S,L,r]),R=!o&&!O&&!p&&!k&&Boolean(g)&&Boolean(L),$=e=>{!1!==e||O||n()};return(0,j.jsxs)(u.Ay,{id:"shopifyExportModal",titleId:"shopify-export-title",isOpen:i,setIsOpen:$,size:"md",isCentered:!0,children:[(0,j.jsx)(u.rQ,{setIsOpen:$,children:(0,j.jsx)(u.wt,{id:"shopify-export-title",children:r("trans_shopify_export_modal_title")})}),(0,j.jsxs)(u.cw,{children:[(0,j.jsx)("p",{className:"text-muted mb-4",children:r("trans_shopify_export_modal_description")}),p?(0,j.jsxs)("div",{className:"d-flex align-items-center gap-2 text-muted",children:[(0,j.jsx)(c.A,{isSmall:!0,color:"primary"}),(0,j.jsx)("span",{children:r("trans_shopify_status_loading")})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(m.A,{tag:"div",className:"mb-3",children:[(0,j.jsx)(v.A,{htmlFor:"shopifyExportInventorySelect",children:r("trans_shopify_export_inventory_label")}),(0,j.jsxs)(h.A,{id:"shopifyExportInventorySelect",ariaLabel:r("trans_shopify_export_inventory_label").toString(),value:g,onChange:D,disabled:O||0===_.length,children:[0===_.length&&(0,j.jsx)(x.A,{value:"",children:r("trans_shopify_export_no_inventories")}),_.map((e=>(0,j.jsx)(x.A,{value:e.inventoryId,children:e.name||e.inventoryId},e.inventoryId)))]})]}),(0,j.jsxs)(m.A,{tag:"div",className:"mb-3",children:[(0,j.jsx)(v.A,{htmlFor:"shopifyExportLocationSelect",children:r("trans_shopify_export_location_label")}),(0,j.jsxs)(h.A,{id:"shopifyExportLocationSelect",ariaLabel:r("trans_shopify_export_location_label").toString(),value:L,onChange:P,disabled:O||k||!A,children:[(0,j.jsx)(x.A,{value:"",children:r("trans_shopify_export_location_placeholder")}),((null===A||void 0===A?void 0:A.locations)||[]).map((e=>(0,j.jsx)(x.A,{value:e.id,children:e.name},e.id)))]})]}),A&&(0,j.jsxs)("div",{className:"border rounded p-3 bg-light",children:[(0,j.jsx)("div",{className:"fw-semibold mb-2",children:r("trans_shopify_export_summary_title")}),(0,j.jsxs)("div",{className:"small text-muted mb-1",children:[r("trans_shopify_export_summary_mapped_products"),":"," ",(0,j.jsx)("span",{className:"fw-semibold text-dark",children:A.eligibility.mappedProducts})]}),(0,j.jsxs)("div",{className:"small text-muted mb-1",children:[r("trans_shopify_export_summary_eligible_products"),":"," ",(0,j.jsx)("span",{className:"fw-semibold text-dark",children:A.eligibility.eligibleProducts})]}),(0,j.jsxs)("div",{className:"small text-muted mb-1",children:[r("trans_shopify_export_summary_decimal"),":"," ",(0,j.jsx)("span",{className:"fw-semibold text-dark",children:A.eligibility.decimalQuantityCount})]}),(0,j.jsxs)("div",{className:"small text-muted mb-1",children:[r("trans_shopify_export_summary_negative"),":"," ",(0,j.jsx)("span",{className:"fw-semibold text-dark",children:A.eligibility.negativeQuantityCount})]}),(0,j.jsxs)("div",{className:"small text-muted mb-1",children:[r("trans_shopify_export_summary_invalid_variant"),":"," ",(0,j.jsx)("span",{className:"fw-semibold text-dark",children:A.eligibility.invalidVariantIdCount})]}),(0,j.jsxs)("div",{className:"small text-muted",children:[r("trans_shopify_export_summary_duplicate_variant"),":"," ",(0,j.jsx)("span",{className:"fw-semibold text-dark",children:A.eligibility.duplicateVariantIdCount})]})]}),z&&(0,j.jsx)("div",{className:"alert alert-warning py-2 px-3 mt-3 mb-0",role:"alert",children:r("trans_shopify_export_saved_location_inactive")})]}),V&&(0,j.jsx)("div",{className:"alert alert-danger py-2 px-3 mb-0 mt-3",role:"alert",children:V})]}),(0,j.jsx)(u.jl,{children:(0,j.jsxs)("div",{className:"d-flex flex-wrap gap-2 w-100 justify-content-end",children:[(0,j.jsx)(d.A,{color:"light",onClick:n,isDisable:O,children:r("trans_no_cancel",{defaultValue:"Cancel"})}),(0,j.jsx)(d.A,{color:"primary",onClick:T,isDisable:!R,children:O?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c.A,{inButton:"onlyIcon",isSmall:!0}
2),r("trans_shopify_export_starting")]}):r("trans_shopify_export_start_button")})]})})]})};var I=i(83418);const k=280,C="/integrations/shopify",A="__all_locations__",F=/^\[(?:error|conflict)\]\s*/i,L=/^\[(?:error|conflict)\]\s*/i,M=/\s*\(gid:\/\/shopify\/ProductVariant\/\d+\)/gi,V=/gid:\/\/shopify\/ProductVariant\/\d+/gi,B=/\s*\(gid:\/\/shopify\/Location\/\d+\)/gi,O=/gid:\/\/shopify\/Location\/\d+/gi,E=/\(variance\s+([+-]?\d+(?:\.\d+)?)\)\s*$/i,J=e=>"queued"===(null===e||void 0===e?void 0:e.status)||"running"===(null===e||void 0===e?void 0:e.status),z=e=>"queued"===(null===e||void 0===e?void 0:e.status)||"running"===(null===e||void 0===e?void 0:e.status),q=e=>"object"===typeof e&&null!==e,D=e=>{if(!q(e))return{};const t={};return"string"===typeof e.code&&(t.code=e.code),"string"===typeof e.message&&(t.message=e.message),q(e.data)&&(t.data=e.data),t},P=e=>!F.test((e||"").toString().trim()),T=(e,t)=>{const i=(e=>{const t=(e=>{const t=(e||"").toString().trim().toLowerCase();return t?t.replace(/^https?:\/\//i,"").replace(/\/.*$/,""):""})(e);if(!t)return"";const i=t.match(/^([a-z0-9][a-z0-9-]*)\.myshopify\.com$/i);if(null!==i&&void 0!==i&&i[1])return i[1].toLowerCase();const s=t.split(".")[0]||"";return/^[a-z0-9][a-z0-9-]*$/i.test(s)?s.toLowerCase():""})(e);if(!i)return"";const s=(e=>{const t=(e||"").toString().trim();if(!t)return"";const i=t.match(/^(\d+)$/);if(null!==i&&void 0!==i&&i[1])return i[1];const s=t.match(/^gid:\/\/shopify\/Location\/(\d+)$/i);return null!==s&&void 0!==s&&s[1]?s[1]:""})(t||"");return s?"https://admin.shopify.com/store/".concat(i,"/products/inventory?location_id=").concat(s):"https://admin.shopify.com/store/".concat(i,"/products?selectedView=all")},R=e=>{const t=(e=>{const t=(e||"").toString().trim();return t?t.replace(L,"").replace(M,"").replace(V,"").replace(B,"").replace(O,"").replace(/\s{2,}/g," ").trim():""})(e);if(!t)return"";const i=t.indexOf(":");if(i<=0)return t;const s=t.slice(0,i).trim(),l=t.slice(i+1).trim();if(!s||!l)return t;const n=l.match(E);if(null!==n&&void 0!==n&&n[0]&&null!==n&&void 0!==n&&n[1]){const e="(".concat(n[1],")"),t=Number(n[1]),i=l.slice(0,Math.max(0,l.length-n[0].length)).trimEnd(),o=t>0?"text-success fw-semibold":t<0?"text-danger fw-semibold":"text-muted fw-semibold";return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("strong",{children:s}),": ",i,i?" ":"",(0,j.jsx)("span",{className:o,children:e})]})}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("strong",{children:s}),": ".concat(l)]})},$=e=>"trans_shopify_import_status_".concat(e),U=e=>"trans_shopify_export_status_".concat(e),W=()=>{var e,t;const{t:i}=(0,l.Bd)(),N=(0,n.Zp)(),w=(0,n.zy)(),{userInfo:F}=(0,s.useContext)(b.A),L=(0,s.useMemo)((()=>w.pathname.replace(/\/+$/,"")||"/"),[w.pathname])===C,M=(0,s.useMemo)((()=>{var e,t,i;return(null===F||void 0===F||null===(e=F.settings)||void 0===e||null===(t=e.shopifyShopDomain)||void 0===t||null===(i=t.toString())||void 0===i?void 0:i.trim())||""}),[null===F||void 0===F||null===(e=F.settings)||void 0===e?void 0:e.shopifyShopDomain]),[V,B]=(0,s.useState)(!0),[O,q]=(0,s.useState)(!1),[W,Z]=(0,s.useState)(null),[H,Q]=(0,s.use
2State)(!1),[K,G]=(0,s.useState)(!1),[Y,X]=(0,s.useState)(!1),[ee,te]=(0,s.useState)(null),[ie,se]=(0,s.useState)(""),[le,ne]=(0,s.useState)(""),[oe,ae]=(0,s.useState)(null),[re,de]=(0,s.useState)(null),[ce,ue]=(0,s.useState)(null),[me,pe]=(0,s.useState)(null),[ve,he]=(0,s.useState)(!1),[xe,fe]=(0,s.useState)(null),[_e,ye]=(0,s.useState)(null),[be,ge]=(0,s.useState)(null),[je,Ne]=(0,s.useState)(null),[we,Se]=(0,s.useState)(!1),Ie=!0===(null===F||void 0===F||null===(t=F.configs)||void 0===t?void 0:t.sync),ke=(0,s.useCallback)((()=>{Ie?L||N(C):Se(!0)}),[Ie,L,N]),Ce=(0,s.useCallback)((()=>{L&&N("/misc/integrations",{replace:!0})}),[L,N]),Ae=(0,s.useCallback)((e=>{Z(e),q(!1),B(!1),ue(null),ge(null)}),[]),Fe=(0,s.useCallback)((async e=>{if(!W)return;const t=await(0,y.a_)(e),i=(null===t||void 0===t?void 0:t.data)||null;de(i);const s=(null===i||void 0===i?void 0:i.requestedJob)||null,l=(null===i||void 0===i?void 0:i.activeJob)||null,n=J(s)?s:J(l)?l:null;null!==n&&void 0!==n&&n.jobId?ae(n.jobId):(e&&s&&!J(s)&&ae(null),e||l||ae(null))}),[W]),Le=(0,s.useCallback)((async e=>{if(!W)return;const t=await(0,y.pF)(e),i=(null===t||void 0===t?void 0:t.data)||null;ye(i);const s=(null===i||void 0===i?void 0:i.requestedJob)||null,l=(null===i||void 0===i?void 0:i.activeJob)||null,n=z(s)?s:z(l)?l:null;null!==n&&void 0!==n&&n.jobId?fe(n.jobId):(e&&s&&!z(s)&&fe(null),e||l||fe(null))}),[W]);(0,s.useEffect)((()=>{(async()=>{if(!M)return B(!1),q(!1),void Z(null);try{const e=y.vZ.getShopifyConnectionStatus(),t=await(0,y.w$)(e);if(1!==Number(null===t||void 0===t?void 0:t.status))return q(!0),void Z(null);const i=t.data||{},s=!0===(null===i||void 0===i?void 0:i.isConnected),l=(null===i||void 0===i?void 0:i.shopDomain)||M;Z(s?l:null),q(!1)}catch(e){q(!0),Z(null)}finally{B(!1)}})()}),[M]),(0,s.useEffect)((()=>{if(!W)return de(null),ae(null),ue(null),G(!1),X(!1),te(null),se(""),ne(""),pe(null),ye(null),fe(null),ge(null),void Ne(null);Fe().catch((e=>{const t=D(e);ue((t.message||i("trans_shopify_import_error_generic").toString()).slice(0,k))})),Le().catch((e=>{const t=D(e);ge((t.message||i("trans_shopify_export_error_generic").toString()).slice(0,280))}))}),[W,Le,Fe,i]),(0,s.useEffect)((()=>{if(!oe||!W)return;const e=window.setInterval((()=>{Fe(oe).catch((e=>{const t=D(e);ue((t.message||i("trans_shopify_import_error_generic").toString()).slice(0,k))}))}),2e3);return()=>window.clearInterval(e)}),[W,Fe,i,oe]),(0,s.useEffect)((()=>{if(!xe||!W)return;const e=window.setInterval((()=>{Le(xe).catch((e=>{const t=D(e);ge((t.message||i("trans_shopify_export_error_generic").toString()).slice(0,280))}))}),2e3);return()=>window.clearInterval(e)}),[W,Le,i,xe]);const Me=(0,s.useCallback)((()=>{Ie?W&&(ge(null),he(!0)):Se(!0)}),[W,Ie]),Ve=(0,s.useCallback)((async e=>{he(!1);const t=(null===e||void 0===e?void 0:e.jobId)||null;if(t)return fe(t),void await Le(t);await Le()}),[Le]),Be=(0,s.useCallback)((async()=>{if(Ie){if(W){Q(!0),ue(null),pe(null);try{var e,t,s,l;const i=await(0,y.Bc)(),n=(null===i||void 0===i?void 0:i.data)||null,o=(null===n||void 0===n||null===(e=n.defaultInventoryName)||void 0===e?void 0:e.toString().trim())||(()=>{const e=(new Date).toISOString().slice(0,16).replace("T"," ");return"Shopify Import ".concat(e)})(),a=(null===n||void 0===n||null===(t=n.locations)||void 0===t||null===(s=t[0])||void 0===s||null===(l=s.id)||void 0===l?void 0:l.toString().trim())||A;te(n),se(o),ne(a),X(!1),G(!0)}catch(n){const e=D(n);ue((e.message||i("trans_shopify_import_error_generic").toString()).slice(0,k))}finally{Q(!1)}}}else Se(!0)}),[W,Ie,i]),Oe=(0,s.useCallback)((e=>{!1!==e||H||(pe(null),G(!1))}),[H]),Ee=(0,s.useCallback)((e=>{se(e.target.value||""),pe(null)}),[]),Je=(0,s.useCallback)((e=>{ne(e.target.value||""),pe(null)}),[]),ze=(0,s.useCallback)((()=>{ie.trim()?le?(pe(null),G(!1),X(!0)):pe(i("trans_shopify_import_location_required",{defaultValue:"Please select a Shopify location."}).toString()):pe(i("trans_shopify_import_inventory_name_required",{defaultValue:"Inventory name is required."}).toString())}),[ie,le,i]),qe=(0,s.useCallback)((async e=>{if(!ee)throw new Error(i("trans_shopify_import_error_generic").toString());const t=ie.trim(),s=le.trim();if(!t||!s)throw new Error(i("trans_shopify_import_error_generic",{defaultValue:"Unable to start Shopify import."}).toString());Q(!0),ue(null);try{var l;const i=new Map(ee.targetFields.map((e=>[e.id,e]))),n=e.map((e=>{const t=i.get(e.targetFieldId),s=!e.targetFieldId.startsWith("sys_field_")||"custom"===(null===t||void 0===t?void 0:t.kind);return{sourceFieldId:e.sourceFieldId,targetFieldId:e.targetFieldId,targetFieldName:s?(null===t||void 0===t?void 0:t.defaultTargetFieldName)||e.targetFieldName||(null===t||void 0===t?void 0:t.name):void 0}})),o=await(0,y.Gv)({fieldMappings:n,inventoryName:t,shopifyLocationId:s===A?void 0:s}),a=(null===o||void 0===o||null===(l=o.data)||void 0===l?void 0:l.job)||null,r=(null===a||void 0===a?void 0:a.jobId)||null;X(!1),r?(ae(r),await Fe(r)):await Fe()}catch(a){var n,o;const e=D(a),t=null===(n=e.data)||void 0===n||null===(o=n.activeJob)||void 0===o?void 0:o.jobId;if("SHOPIFY_IMPORT_ACTIVE_JOB"===e.code&&t)return X(!1),ae(t),void await Fe(t);throw ue((e.message||i("trans_shopify_import_error_generic").toString()).slice(0,k)),a}finally{Q(!1)}}),[ie,ee,Fe,le,i]),De=(0,s.useCallback)((e=>{e&&(localStorage.setItem("selectedidInventory",e),N("/products/".concat(e)))}),[N]),Pe=(0,s.useMemo)((()=>null!==re&&void 0!==re&&re.requestedJob&&oe&&re.requestedJob.jobId===oe?re.requestedJob:null),[null===re||void 0===re?void 0:re.requestedJob,oe]),Te=(0,s.useMemo)((()=>J(Pe)?Pe:J(null===re||void 0===re?void 0:re.activeJob)&&(null===re||void 0===re?void 0:re.activeJob)||null),[null===re||void 0===re?void 0:re.activeJob,Pe]),Re=(0,s.useMemo)((()=>Pe&&!J(Pe)?Pe:(null===re||void 0===re?void 0:re.latestJob)||null),[null===re||void 0===re?void 0:re.latestJob,Pe]),$e=(0,s.useMemo)((()=>null!==_e&&void 0!==_e&&_e.requestedJob&&xe&&_e.requestedJob.jobId===xe?_e.requestedJob:null),[null===_e||void 0===_e?void 0:_e.requestedJob,xe]),Ue=(0,s.useMemo)((()=>z($e)?$e:z(null===_e||void 0===_e?void 0:_e.activeJob)&&(null===_e||void 0===_e?void 0:_e.activeJob)||null),[null===_e||void 0===_e?void 0:_e.activeJob,$e]),We=(0,s.useMemo)((()=>$e&&!z($e)?$e:(null===_e||void 0===_e?void 0:_e.latestJob)||null),[null===_e||void 0===_e?void 0:_e.latestJob,$e]),Ze=J(Te),He=z(Ue),Qe=Ze||He,Ke=Te||Re,Ge=Ue||We,Ye=(null===Ke||void 0===Ke?void 0:Ke.errorSamples)||[],Xe=(null===Ge||void 0===Ge?void 0:Ge.errorSamples)||[],et=((null===Ge||void 0===Ge?void 0:Ge.updatedSamples)||[]).filter((e=>(e=>{const t=(e||"").toString().trim();if(!t)return!1;const i=t.match(E);if(!i)return!0;const s=Number(i[1]);return!Number.isFinite(s)||Math.abs(s)>1e-6})(e))),tt=et.length,it=Xe.filter((e=>P(e))),st=Xe.filter((e=>!P(e))),lt=Ye.length>0||((null===Ke||void 0===Ke?void 0:Ke.errorCount)||0)>0,nt=((null===Ge||void 0===Ge?void 0:Ge.skippedProducts)||0)>0,ot=st.length>0||((null===Ge||void 0===Ge?void 0:Ge.errorCount)||0)>0,at=Boolean(Ke)&&"completed_with_errors"===Ke.status&&lt,rt=Boolean(Ge)&&"completed_with_errors"===Ge.status&&ot,dt=Boolean(Ge)&&nt,ct=Boolean(Ge)&&tt>0,ut=(0,s.useMemo)((()=>Ke?T(Ke.shopDomain||W||M||"",Ke.shopifyLocationId||""):""),[W,Ke,M]),mt=(0,s.useMemo)((()=>Ge?T(Ge.shopDomain||W||M||"",Ge.shopifyLocationId||""):""),[W,Ge,M]),pt=Boolean(Re&&("completed"===Re.status||"completed_with_errors"===Re.status)&&Re.inventoryId)&&!Ze,vt=Boolean(We&&("completed"===We.status||"completed_with_errors"===We.status)&&We.inventoryId)&&!He,ht=(null===ee||void 0===ee?void 0:ee.locations)||[],xt=!H&&Boolean(ie.trim())&&Boolean(le),ft=(0,s.useMemo)((()=>{var e,t;const s=null===Ke||void 0===Ke||null===(e=Ke.shopifyLocationName)||void 0===e?void 0:e.toString().trim();if(s)return s;const l=null===Ke||void 0===Ke||null===(t=Ke.shopifyLocationId)||void 0===t?void 0:t.toString().trim();if(l){const e=ht.find((e=>e.id===l));return(null===e||void 0===e?void 0:e.name)||l}const n=le.toString().trim();if(n){if(n===A)return i("trans_shopify_import_all_locations_option",{defaultValue:"Import products from all Shopify locations"}).toString();const e=ht.find((e=>e.id===n));if(null!==e&&void 0!==e&&e.name)return e.name}return Ke?i("trans_shopify_import_all_locations_option",{defaultValue:"Import products from all Shopify locations"}).toString():i("trans_shopify_import_location_fallback_name",{defaultValue:"Shop location"}).toString()}),[Ke,ht,le,i]),_t=Boolean(W&&Ke&&Ge),yt=(0,s.useMemo)((()=>
2{if(!ee)return[];const e=(ee.sourceFields||[]).map((e=>e.name||"")),t=e.map(((e,t)=>(e=>{let t=e+1,i="";for(;t>0;){const e=(t-1)%26;i=String.fromCharCode(65+e)+i,t=Math.floor((t-1)/26)}return i})(t))),i=(ee.sampleRows||[]).slice(0,2).map((t=>e.map(((e,i)=>{var s;return(null===t||void 0===t||null===(s=t[i])||void 0===s?void 0:s.toString())||""}))));return[t,e,...i]}),[ee]),bt=(0,s.useMemo)((()=>{var e;return(null===ee||void 0===ee||null===(e=ee.sourceFields)||void 0===e?void 0:e.map((e=>e.id)))||[]}),[null===ee||void 0===ee?void 0:ee.sourceFields]),gt=(0,s.useMemo)((()=>{var e;return(null===ee||void 0===ee||null===(e=ee.targetFields)||void 0===e?void 0:e.map((e=>({id:e.id,name:e.name}))))||[]}),[null===ee||void 0===ee?void 0:ee.targetFields]),jt=(0,s.useMemo)((()=>{if(!ee)return[];const e=new Map;return(ee.suggestedMappings||[]).forEach((t=>{var i,s;const l=null===t||void 0===t||null===(i=t.sourceFieldId)||void 0===i?void 0:i.toString().trim(),n=null===t||void 0===t||null===(s=t.targetFieldId)||void 0===s?void 0:s.toString().trim();l&&n&&(e.has(l)||e.set(l,n))})),(ee.sourceFields||[]).map((t=>e.get(t.id)||""))}),[ee]),Nt=(0,s.useCallback)((()=>{Ke&&at&&Ne({title:i("trans_shopify_import_errors").toString(),samples:Ye.length>0?Ye:[i("trans_no_data_available").toString()]})}),[at,Ye,Ke,i]),wt=(0,s.useCallback)((()=>{Ge&&rt&&Ne({title:i("trans_shopify_export_errors").toString(),samples:st.length>0?st:[i("trans_no_data_available").toString()]})}),[rt,Ge,st,i]),St=(0,s.useCallback)((()=>{Ge&&dt&&Ne({title:i("trans_shopify_export_skipped_products").toString(),samples:it.length>0?it:Xe.length>0?Xe:[i("trans_no_data_available").toString()]})}),[dt,Xe,Ge,it,i]),It=(0,s.useCallback)((()=>{Ge&&ct&&Ne({title:i("trans_shopify_export_updated_products_stock",{defaultValue:"Updated products stock"}).toString(),samples:et.length>0?et:[i("trans_no_data_available").toString()]})}),[ct,Ge,et,i]),kt=(0,s.useCallback)((()=>{Ne(null)}),[]),Ct=(0,s.useCallback)((e=>{!1===e&&kt()}),[kt]),At=W&&Ke?(0,j.jsxs)("div",{className:"border rounded p-3 ".concat(Ze?"bg-light border-primary border-opacity-50":""),children:[(0,j.jsx)("div",{className:"d-flex justify-content-between align-items-start mb-3",children:(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{className:"fw-bold fs-5 mb-1",children:i(Ze?"trans_shopify_import_status_title":"trans_shopify_import_latest_summary")}),(0,j.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[Ze&&(0,j.jsx)(c.A,{color:"primary",isSmall:!0}),at?(0,j.jsx)("button",{type:"button",className:"btn btn-link p-0 fw-semibold text-decoration-underline ".concat(Ze?"text-primary":"completed"===Ke.status?"text-success":"failed"===Ke.status?"text-danger":"text-warning"),onClick:Nt,children:i($(Ke.status))}):(0,j.jsx)("span",{className:"fw-semibold ".concat(Ze?"text-primary":"completed"===Ke.status?"text-success":"failed"===Ke.status?"text-danger":"text-warning"),children:i($(Ke.status))})]})]})}),((null===Ke||void 0===Ke?void 0:Ke.inventoryName)||ut)&&(0,j.jsxs)("div",{className:"mb-3 pb-2 border-bottom d-flex flex-column gap-1",children:[(null===Ke||void 0===Ke?void 0:Ke.inventoryName)&&(0,j.jsxs)("div",{className:"d-flex align-items-center flex-wrap gap-2",children:[(0,j.jsxs)("span",{className:"text-muted",children:[i("trans_inventory"),": "]}),!Ze&&pt&&null!==Re&&void 0!==Re&&Re.inventoryId?(0,j.jsxs)("span",{className:"fw-semibold text-primary d-inline-flex align-items-center text-decoration-underline cursor-pointer",style:{cursor:"pointer"},onClick:()=>De(Re.inventoryId||""),children:[null===Ke||void 0===Ke?void 0:Ke.inventoryName,(0,j.jsx)(f.A,{icon:"OpenInNew",className:"ms-1",size:"sm"})]}):(0,j.jsx)("span",{className:"fw-medium",children:null===Ke||void 0===Ke?void 0:Ke.inventoryName})]}),(null===Ke||void 0===Ke?void 0:Ke.inventoryName)&&(0,j.jsx)("div",{className:"d-flex align-items-center text-primary",style:{marginLeft:"100px"},children:(0,j.jsx)(f.A,{icon:"ArrowUpward",size:"md",className:"fw-bold"})}),(0,j.jsxs)("div",{className:"d-flex align-items-center gap-2 flex-wrap",children:[(0,j.jsxs)("span",{className:"text-muted",children:[i("trans_shopify_export_location_label",{defaultValue:"Shopify location"}),":"," "]}),ut?(0,j.jsxs)("a",{href:ut,target:"_blank",rel:"noreferrer",className:"fw-semibold text-primary d-inline-flex align-items-center text-decoration-underline",children:[ft,(0,j.jsx)(f.A,{icon:"OpenInNew",className:"ms-1",size:"sm"})]}):(0,j.jsx)("span",{className:"fw-medium",children:ft})]})]}),(0,j.jsxs)("div",{className:"row g-3",children:[(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_import_processed_variants")}),(0,j.jsx)("div",{className:"fw-semibold fs-5",children:(null===Ke||void 0===Ke?void 0:Ke.processedVariants)||0})]}),(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_import_imported_products")}),pt&&null!==Re&&void 0!==Re&&Re.inventoryId?(0,j.jsx)("button",{type:"button",className:"btn btn-link p-0 fw-semibold fs-5 text-decoration-underline text-primary",onClick:()=>De(Re.inventoryId||""),children:(null===Ke||void 0===Ke?void 0:Ke.importedProducts)||0}):(0,j.jsx)("div",{className:"fw-semibold fs-5",children:(null===Ke||void 0===Ke?void 0:Ke.importedProducts)||0})]}),(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_import_skipped_products")}),(0,j.jsx)("div",{className:"fw-semibold fs-5",children:(null===Ke||void 0===Ke?void 0:Ke.skippedProducts)||0})]}),(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_import_errors")}),at?(0,j.jsx)("button",{type:"button",className:"btn btn-link p-0 fw-semibold fs-5 text-decoration-underline text-danger",onClick:Nt,children:(null===Ke||void 0===Ke?void 0:Ke.errorCount)||0}):(0,j.jsx)("div",{className:"fw-semibold fs-5",children:(null===Ke||void 0===Ke?void 0:Ke.errorCount)||0})]})]})]}):!W||Re||Te?null:(0,j.jsx)("div",{className:"p-4 bg-light rounded text-center text-muted border",children:i("trans_shopify_no_imports_yet")}),Ft=W?(0,j.jsx)("div",{className:"d-flex justify-content-center",children:(0,j.jsx)(d.A,{color:"primary",isDisable:H||Qe,onClick:Be,children:H?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c.A,{inButton:"onlyIcon",isSmall:!0}),i("trans_shopify_import_starting")]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(f.A,{icon:"Download",className:"me-2"}),i("trans_shopify_import_products_from_shopify",{defaultValue:"Import products from Shopify"})]})})}):null,Lt=W&&Ge?(0,j.jsxs)("div",{className:"border rounded p-3 ".concat(He?"bg-light border-success border-opacity-50":""),children:[(0,j.jsx)("div",{className:"d-flex justify-content-between align-items-start mb-3",children:(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{className:"fw-bold fs-5 mb-1",children:i(He?"trans_shopify_export_status_title":"trans_
2shopify_export_latest_summary")}),(0,j.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[He&&(0,j.jsx)(c.A,{color:"success",isSmall:!0}),rt?(0,j.jsx)("button",{type:"button",className:"btn btn-link p-0 fw-semibold text-decoration-underline ".concat(He||"completed"===Ge.status?"text-success":"failed"===Ge.status?"text-danger":"text-warning"),onClick:wt,children:i(U(Ge.status))}):(0,j.jsx)("span",{className:"fw-semibold ".concat(He||"completed"===Ge.status?"text-success":"failed"===Ge.status?"text-danger":"text-warning"),children:i(U(Ge.status))})]})]})}),((null===Ge||void 0===Ge?void 0:Ge.inventoryName)||(null===Ge||void 0===Ge?void 0:Ge.shopifyLocationName))&&(0,j.jsxs)("div",{className:"mb-3 pb-2 border-bottom d-flex flex-column gap-1",children:[(null===Ge||void 0===Ge?void 0:Ge.inventoryName)&&(0,j.jsxs)("div",{className:"d-flex align-items-center flex-wrap gap-2",children:[(0,j.jsxs)("span",{className:"text-muted",children:[i("trans_inventory"),": "]}),vt&&null!==We&&void 0!==We&&We.inventoryId?(0,j.jsxs)("span",{className:"fw-semibold text-primary d-inline-flex align-items-center text-decoration-underline cursor-pointer",style:{cursor:"pointer"},onClick:()=>De(We.inventoryId||""),children:[null===Ge||void 0===Ge?void 0:Ge.inventoryName,(0,j.jsx)(f.A,{icon:"OpenInNew",className:"ms-1",size:"sm"})]}):(0,j.jsx)("span",{className:"fw-medium",children:null===Ge||void 0===Ge?void 0:Ge.inventoryName})]}),(null===Ge||void 0===Ge?void 0:Ge.inventoryName)&&(null===Ge||void 0===Ge?void 0:Ge.shopifyLocationName)&&(0,j.jsx)("div",{className:"d-flex align-items-center text-success",style:{marginLeft:"100px"},children:(0,j.jsx)(f.A,{icon:"ArrowDownward",size:"md",className:"fw-bold"})}),(null===Ge||void 0===Ge?void 0:Ge.shopifyLocationName)&&(0,j.jsxs)("div",{className:"d-flex align-items-center gap-2 flex-wrap",children:[(0,j.jsxs)("span",{className:"text-muted",children:[i("trans_shopify_export_location_label"),":"," "]}),mt?(0,j.jsxs)("a",{href:mt,target:"_blank",rel:"noreferrer",className:"fw-semibold text-primary d-inline-flex align-items-center text-decoration-underline",children:[null===Ge||void 0===Ge?void 0:Ge.shopifyLocationName,(0,j.jsx)(f.A,{icon:"OpenInNew",className:"ms-1",size:"sm"})]}):(0,j.jsx)("span",{className:"fw-medium",children:null===Ge||void 0===Ge?void 0:Ge.shopifyLocationName})]})]}),(0,j.jsxs)("div",{className:"row g-3",children:[(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_export_processed_products")}),(0,j.jsx)("div",{className:"fw-semibold fs-5",children:(null===Ge||void 0===Ge?void 0:Ge.processedProducts)||0})]}),(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_export_updated_products_stock",{defaultValue:"Updated products stock"})}),ct?(0,j.jsx)("button",{type:"button",className:"btn btn-link p-0 fw-semibold fs-5 text-decoration-underline text-success",onClick:It,children:tt}):(0,j.jsx)("div",{className:"fw-semibold fs-5",children:tt})]}),(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_export_skipped_products")}),dt?(0,j.jsx)("button",{type:"button",className:"btn btn-link p-0 fw-semibold fs-5 text-decoration-underline text-warning",onClick:St,children:(null===Ge||void 0===Ge?void 0:Ge.skippedProducts)||0}):(0,j.jsx)("div",{className:"fw-semibold fs-5",children:(null===Ge||void 0===Ge?void 0:Ge.skippedProducts)||0})]}),(0,j.jsxs)("div",{className:"col-6",children:[(0,j.jsx)("div",{className:"text-muted mb-1",children:i("trans_shopify_export_errors")}),rt?(0,j.jsx)("button",{type:"button",className:"btn btn-link p-0 fw-semibold fs-5 text-decoration-underline text-danger",onClick:wt,children:(null===Ge||void 0===Ge?void 0:Ge.errorCount)||0}):(0,j.jsx)("div",{className:"fw-semibold fs-5",children:(null===Ge||void 0===Ge?void 0:Ge.errorCount)||0})]})]})]}):!W||We||Ue?null:(0,j.jsx)("div",{className:"p-4 bg-light rounded text-center text-muted border",children:i("trans_shopify_no_exports_yet")}),Mt=W?(0,j.jsx)("div",{className:"d-flex justify-content-center",children:(0,j.jsxs)(d.A,{color:"success",isDisable:Qe,onClick:Me,children:[(0,j.jsx)(f.A,{icon:"Upload",className:"me-2"}),i("trans_shopify_export_quantities_to_shopify",{defaultValue:"Export quantities to Shopify"})]})}):null;return(0,j.jsxs)(o.A,{title:i("trans_integrations").toString(),children:[(0,j.jsxs)(a.A,{container:"fluid",children:[(0,j.jsxs)("div",{className:"pt-3 pb-4",children:[(0,j.jsx)("div",{className:"display-5 fw-bold",children:i("trans_integrations")}),(0,j.jsx)("div",{className:"text-muted mt-2",children:i("trans_integrations_hub_subtitle")})]}),(0,j.jsx)("div",{className:"row g-4",children:(0,j.jsx)("div",{className:_t?"col
2-12":"col-12 col-md-7 col-lg-6 col-xl-5",children:(0,j.jsxs)(r.Ay,{className:"h-100",children:[(0,j.jsxs)(r.aR,{children:[(0,j.jsxs)(r.Bh,{children:[(0,j.jsxs)(r.ZB,{children:[i("trans_integrations_shopify_title"),(0,j.jsx)("span",{className:"badge bg-warning text-dark ms-2 fs-6 fw-semibold",children:"BETA"})]}),W&&(0,j.jsx)(r.vo,{children:(0,j.jsx)("span",{className:"text-success fw-semibold",children:i("trans_shopify_connected_as",{shop:W})})})]}),W&&(0,j.jsx)(r.w,{children:(0,j.jsx)(f.A,{icon:"Settings",className:"cursor-pointer",size:"2x",color:"primary",onClick:ke,title:i("trans_shopify_manage").toString()})})]}),(0,j.jsxs)(r.bw,{className:"d-flex flex-column gap-3",children:[!W&&(0,j.jsx)("p",{className:"text-muted mb-0",children:i("trans_integrations_shopify_description")}),W&&_t?(0,j.jsxs)("div",{className:"row g-3",children:[(0,j.jsxs)("div",{className:"col-12 col-lg-6 d-flex flex-column gap-3",children:[At,Ft]}),(0,j.jsxs)("div",{className:"col-12 col-lg-6 d-flex flex-column gap-3",children:[Lt,Mt]})]}):(0,j.jsxs)(j.Fragment,{children:[At,Ft,Lt,Mt]}),ce&&(0,j.jsx)("div",{className:"alert alert-danger py-2 px-3 mb-0",role:"alert",children:ce}),be&&(0,j.jsx)("div",{className:"alert alert-danger py-2 px-3 mb-0",role:"alert",children:be}),!W&&(0,j.jsxs)("div",{className:"mt-auto d-flex justify-content-between align-items-center gap-2 pt-2",children:[V?(0,j.jsx)("span",{className:"badge bg-light text-dark",children:i("trans_shopify_status_loading")}):O?(0,j.jsx)("span",{className:"badge bg-light text-dark",children:i("trans_shopify_status_unavailable")}):(0,j.jsx)("span",{className:"badge bg-light text-dark",children:i(M?"trans_not_connected":"trans_not_configured")}),!V&&(0,j.jsx)(d.A,{color:"primary",onClick:ke,children:i("trans_set_up")})]})]})]})})})]}),(0,j.jsx)(g.A,{isOpen:L,onClose:Ce,onConnectionChange:Ae}),(0,j.jsx)(S,{isOpen:ve,onClose:()=>he(!1),disableStart:Qe,onExportStarted:e=>{Ve(e)}}),(0,j.jsxs)(u.Ay,{id:"shopifyImportOptionsModal",titleId:"shopify-import-options-title",isOpen:K,setIsOpen:Oe,size:"md",isCentered:!0,children:[(0,j.jsx)(u.rQ,{setIsOpen:Oe,children:(0,j.jsx)(u.wt,{id:"shopify-import-options-title",children:i("trans_shopify_import_modal_title",{defaultValue:"Import from Shopify"})})}),(0,j.jsxs)(u.cw,{children:[(0,j.jsx)("p",{className:"text-muted mb-4",children:i("trans_shopify_import_modal_description",{defaultValue:"Choose the destination inventory name and Shopify location before mapping fields."})}),(0,j.jsxs)(m.A,{tag:"div",className:"mb-3",children:[(0,j.jsx)(v.A,{htmlFor:"shopifyImportInventoryNameInput",children:i("trans_inventory")}),(0,j.jsx)(p.A,{id:"shopifyImportInventoryNameInput",ariaLabel:i("trans_inventory").toString(),value:ie,onChange:Ee,disabled:H})]}),(0,j.jsxs)(m.A,{tag:"div",className:"mb-0",children:[(0,j.jsx)(v.A,{htmlFor:"shopifyImportLocationSelect",children:i("trans_shopify_export_location_label",{defaultValue:"Shopify location"})}),(0,j.jsxs)(h.A,{id:"shopifyImportLocationSelect",ariaLabel:i("trans_shopify_export_location_label",{defaultValue:"Shopify location"}).toString(),value:le,onChange:Je,disabled:H,children:[(0,j.jsx)(x.A,{value:A,children:i("trans_shopify_import_all_locations_option",{defaultValue:"Import products from all Shopify locations"})}),ht.map((e=>(0,j.jsx)(x.A,{value:e.id,children:e.name},e.id)))]})]}),me&&(0,j.jsx)("div",{className:"alert alert-danger py-2 px-3 mt-3 mb-0",role:"alert",children:me})]}),(0,j.jsx)(u.jl,{children:(0,j.jsxs)("div",{className:"d-flex w-100 justify-content-end gap-2 flex-wrap",children:[(0,j.jsx)(d.A,{color:"light",onClick:()=>{pe(null),G(!1)},isDisable:H,children:i("trans_no_cancel",{defaultValue:"Cancel"})}),(0,j.jsx)(d.A,{color:"primary",onClick:ze,isDisable:!xt,children:i("trans_continue",{defaultValue:"Continue"})})]})})]}),(0,j.jsxs)(u.Ay,{id:"shopifySyncErrorsModal",titleId:"shopify-sync-errors-title",isOpen:Boolean(je),setIsOpen:Ct,size:"md",isCentered:!0,children:[(0,j.jsx)(u.rQ,{setIsOpen:Ct,children:(0,j.jsx)(u.wt,{id:"shopify-sync-errors-title",children:(null===je||void 0===je?void 0:je.title)||i("trans_error")})}),(0,j.jsx)(u.cw,{children:(0,j.jsx)("ul",{className:"small mb-0 ps-3",children:((null===je||void 0===je?void 0:je.samples)||[i("trans_no_data_available").toString()]).map(((e,t)=>(0,j.jsx)("li",{children:R(e)},"shopify-error-popup-".concat(t))))})})]}),(0,j.jsx)(_.A,{selectedInventory:null,threeRowsData:yt,sourceType:"shopify",isOpen:Y,onClose:()=>X(!1),title:i("trans_shopify_map_fields_title").toString(),importType:"products",onConfirmSelection:qe,fieldOptionsOverride:gt,initialSelectedFields:jt,sourceFieldIds:bt,mappingStorageKey:"shopify_products",enforceUniqueTargetSelection:!0,disableCustomFieldLoading:!0,disableAddFieldButton:!1,allowManualCustomFields:!0,suggestedMappings:(null===ee||void 0===ee?void 0:ee.suggestedMappings)||[],confirmButtonLabel:i("trans_shopify_import_modal_confirm").toString()}),(0,j.jsx)(I.A,{isVisible:we,onClose:()=>Se(!1)})]})}},36230:(e,t,i)=>{i.d(t,{A:()=>a});var s=i(9950);const l=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.filter(((e,t,i)=>Boolean(e)&&""!==e.trim()&&i.indexOf(e)===t)).join(" ").trim()};var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const o=(0,s.forwardRef)(((e,t)=>{let{color:i="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:d="",children:c,iconNode:u,...m}=e;return(0,s.createElement)("svg",{ref:t,...n,width:o,height:o,stroke:i,strokeWidth:r?24*Number(a)/Number(o):a,className:l("lucide",d),...m},[...u.map((e=>{let[t,i]=e;return(0,s.createElement)(t,i)}
2)),...Array.isArray(c)?c:[c]])})),a=(e,t)=>{const i=(0,s.forwardRef)(((i,n)=>{let{className:a,...r}=i;return(0,s.createElement)(o,{ref:n,iconNode:t,className:l("lucide-".concat((d=e,d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())),a),...r});var d}));return i.displayName="".concat(e),i}},66987:(e,t,i)=>{i.d(t,{A:()=>s});const s=(0,i(36230).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])}}]);
3!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b2b54142-6033-5007-b0bf-53666d582477")}catch(e){}}();
4//# debugId=b2b54142-6033-5007-b0bf-53666d582477

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.