PageSourceSearch

https://shop.motorolasolutions.com/storefront/occ-public/esm/min/component-833b032a.js

js motorolasolutions.com collected 2026-09-24 08:31:52 UTC 5,861 bytes, 2 lines download raw bytes

1import{_ as e}from"./_rollupPluginBabelHelpers-927c6dd0.js";import{aj as t,am as a,j as s,L as o,bx as r,ah as c,ag as n,R as i,a_ as d}from"./client-c7cf1e30.js";import{u as l}from"./index-fbaff3ff.js";import{S as u,P as p}from"./contexts-1fa00dc9.js";import m from"./index-5e03f400.js";import{C as h}from"./list-alt-230bb7cb.js";import{C as L}from"./check-circle-7e5eeadb.js";import{S as b}from"./index-6b1ab753.js";import{C as y}from"./index-d06de53d.js";function P(e){let t=[];return Array.isArray(e)?t=e.map((e=>({productId:e.productId,catRefId:e.skuId,op:"add",quantityDesired:e.quantity?e.quantity:1}))):"object"==typeof e&&(t=[{productId:e.productId,catRefId:e.skuId,op:"add",quantityDesired:e.quantity?e.quantity:1}]),t}function A(e,o){const{productId:r,skuId:c,quantity:n,commerceItem:i}=o;if(r&&c){const o=t(e,{productId:r}),i=a(e,{skuId:c});if(!s(o)&&!s(i))return function(e,t,a){const s=t.repositoryId,{variantToSkuLookup:o,variantOptionsSeed:r}=e,c=[];let n=[null];t.thumbImageURLs&&t.thumbImageURLs.length?({thumbImageURLs:n}=t):e.thumbImageURLs&&e.thumbImageURLs.length&&({thumbImageURLs:n}=e);const i=Object.entries(o).find((e=>e[1]===s))[0];return(i||"").split(";").forEach((e=>{if(e){const[t,a]=e.split("="),s=r[t],{options:o}=s,{optionName:n}=s,i=o.find((e=>e.value===parseInt(a,10))).name;c.push({optionName:n,optionValue:i})}})),{productId:e.id,skuId:t.repositoryId,productDisplayName:t.displayName?t.displayName:e.displayName,productSalePrice:t.salePrice?t.salePrice:t.listPrice,productThumbImageURL:n[0],productVariantValues:c,quantity:a}}(o,i,n)}else if(i&&!s(i))return function(e){return{productId:e.productId,skuId:e.catRefId,productDisplayName:e.displayName,productSalePrice:e.salePrice?e.salePrice:e.listPrice,productThumbImageURL:e.primaryThumbImageURL,productVariantValues:e.variant,quantity:e.quantity}}(i);return{}}const _=i.lazy((()=>import("./index-673a9683.js"))),I=i.lazy((()=>import("./index-5d75ed77.js"))),f=i.lazy((()=>import("./index-df5c2004.js"))),T=i.lazy((()=>import("./index-7d8f1b2a.js"))),g={show:!1,title:"",content:()=>null,params:{}},k=e=>i.createElement("button",{disabled:e.disabled,type:"button",className:"AddToPurchaseList__Link",onClick:e.handleClick},i.createElement(h,{className:"AddToPurchaseList__Icon"}),i.createElement("span",null,e.label)),x=e=>i.createElement("button",{disabled:e.disabled,type:"button",className:"AddToPurchaseList__Button secondary",onClick:e.handleClick},i.createElement("span",null,e.label)),C=t=>{const a=(()=>{const{getState:e}=o.exports.useContext(u),{productSelection:t}=o.exports.useContext(p);return Array.isArray(t)?t.map((t=>A(e(),t))):"object"==typeof t?A(e(),t):{}})(),{getState:s,action:h}=o.exports.useContext(u),[P,C]=o.exports.useState(g),{labelAddToPurchaseList:E="",labelAddSelectedToPurchaseList:j="",closeLinkAltText:S="",headerLoginOrCreateAccount:v="",headerAddToPurchaseList:w="",headerCreatePurchaseList:N="",headerAddedToPurchaseList:R=""}=t,q=l(n),U=o.exports.useCallback((()=>{C(g)}),[]),z=o.exports.useCallback((e=>{e.ok?C({show:!0,title:i.createElement("span",null,i.createElement(L,{className:"AddToPurchaseList__SuccessIcon"}),i.createElement("span",{id:"AddToPurchaseListModal__Header"},R)),content:T,params:{purchaseListId:e.data.id}}):h("notify",{level:"error",message:e.error.message})}),[h,R]),H=o.exports.useCallback((()=>{C({show:!0,title:i.createElement("span",{id:"AddToPurchaseListModal__Header"},N),content:f,params:{onAddToPurchaseListComplete:z,onCancel:U}})}),[z,U,N]),M=o.exports.useCallback((()=>{q?h("listPurchaseLists").then((()=>{const e=d(s());e&&Object.keys(e).length?C({show:!0,title:i.createElement("span",{id:"AddToPurchaseListModal__Header"},w),content:I,params:{onAddToPurchaseListComplete:z,onCancel:U,onNewPurchaseListClick:H}}):C({show:!0,title:i.createElement("span",{id:"AddToPurchaseListModal__Header"},N),content:f,params:{onAddToPurchaseListComplete:z,onCancel:U}})})):C({show:!0,title:i.createElement("span",{id:"AddToPurchaseListModal__Header"},v),content:_,params:{}})}),[h,q,s,z,U,H,w,N,v]);return(e=>{let t=!1;const{action:a,getState:s}=o.exports.useContext(u),n=r(s()),i=c(s());n.pages&&n.pages[i]&&n.pages[i].showAddToPurchaseList&&(t=!0),o.exports.useEffect((()=>{t&&(e(),a("saveComponentData",{pages:{[c(s())]:{showAddToPurchaseList:!1}}}))}),[a,t,s,e])})(M),i.createElement(b,{id:"AddToPurchaseList",css:".AddToPurchaseList{display:inline-flex}.AddToPurchaseList__Link{align-items:center;background:none;color:#4a4a4a;color:var(--cc-color);display:flex;font-size:.875rem;font-size:var(--cc-font-size-small);justify-content:center;padding:0;text-decoration:underline;width:auto}.AddToPurchaseList__Link .Icon{height:1.075rem;height:calc(var(--cc-font-size-small) + .2rem);margin:.3rem auto;padding-right:.25rem}.AddToPurchaseList__Link:disabled,button:not(:disabled).AddToPurchaseList__Link:active,button:not(:disabled).AddToPurchaseList__Link:hover{background:none}.AddToPurchaseList__SuccessIcon{color:#060;color:var(--cc-success-message-icon-color)}.AddToPurchaseList__SuccessIcon+#AddToPurchaseListModal__Header{margin:auto 0 auto 1rem}@media only screen and (max-width:768px){.AddToPurchaseList__Button{width:100%}}"},i.createElement("div",{className:"AddToPurchaseList"},a&&Array.isArray(a)&&i.createElement(x,{disabled:0===a.length,label:j,handleClick:M}),a&&!Array.isArray(a)&&"object"==typeof a&&i.createElement(k,{disabled:!(a.productId&&a.skuId),label:E,handleClick:M}),i.createElement(y,null,i.createElement(m,{show:P.show,onClose:U,closeIconTitle:S,closeAriaLabel:S,title:P.title},i.createElement("div",{"aria-live":"polite"},i.createElement(o.exports.Suspense,{fallback:null},i.createElement(P.content,e({productSelection:a},P.params,t))))))))};C.propTypes={},C.defaultProps={};var E={__proto__:null,default:C};export{C as A,E as c,P as g};
2//# sourceMappingURL=component-833b032a.js.map

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.