1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[593],{33441:function(e,t,n){n.r(t);var r=n(82729),o=n(85893),i=n(67294),l=n(89578),c=n(48006),s=n(24920),a=n(2469),u=n(68458),p=n(26471),d=n(8772),m=n(54021),b=n(79571),f=n(5434),h=n(58445);function _templateObject(){let e=(0,r._)(["\n font-weight: 500;\n color: #000;\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 50px;\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,r._)(["\n height: 350px;\n padding: 0 24px 24px;\n margin: 0;\n overflow-y: scroll;\n overflow-x: hidden;\n overscroll-behavior-y: contain;\n -webkit-overflow-scrolling: touch;\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,r._)(["\n position: relative;\n height: 100px;\n display: flex;\n align-items: center;\n background-color: #FFF;\n padding: 0 12px;\n &:before {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n background-color: #0000001A;\n }\n\n &:first-of-type {\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n &:before {\n display: none;\n }\n }\n &:last-of-type {\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,r._)(["\n width: 60px;\n min-width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 0 0 10px;\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,r._)(["\n flex: 1;\n display: flex;\n flex-direction: column;\n margin: 0 0 0 12px;\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,r._)(["\n font-size: 14px;\n line-height: 1.6em;\n color: #000;\n max-height: ","em;\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,r._)(["\n display: contents;\n &:after {\n content: '/';\n display: contents;\n }\n\n &:last-of-type {\n &:after {\n display: none;\n }\n }\n"]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,r._)(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin: 6px 0 0;\n"]);return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,r._)(["\n font-size: 14px;\n font-weight: 500;\n color: ",";\n"]);return _templateObject8=function(){return e},e}function _templateObject9(){let e=(0,r._)(["\n display: inline-flex;\n width: 88px;\n border: 1px solid #0000004D;\n border-radius: 8px;\n height: 26px;\n"]);return _templateObject9=function(){return e},e}function _templateObject10(){let e=(0,r._)(["\n box-shadow: 0px 0px 32px 0px #0000001A;\n background-color: #FFF;\n padding: 16px 16px 24px;\n"]);return _templateObject10=function(){return e},e}let x=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-0"})(_templateObject()),g=u.ZP.ul.withConfig({componentId:"sc-c26b1e2e-1"})(_templateObject1()),j=u.ZP.li.withConfig({componentId:"sc-c26b1e2e-2"})(_templateObject2()),_=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-3"})(_templateObject3()),w=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-4"})(_templateObject4()),O=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-5"})(_templateObject5(),3.2),C=u.ZP.span.withConfig({componentId:"sc-c26b1e2e-6"})(_templateObject6()),y=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-7"})(_templateObject7()),v=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-8"})(_templateObject8(),p.w.Main),F=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-9"})(_templateObject9()),N=u.ZP.div.withConfig({componentId:"sc-c26b1e2e-10"})(_templateObject10());t.default=e=>{let{isOpen:t,order:n,orderitemids:r,orderitems:u,selecteds:k,selectedsCount:z,callback:I,closeModal:Z}=e,{t:P}=(0,d.$G)("common"),[E,S]=(0,i.useState)([]),[M,A]=(0,i.useState)({}),L=(0,i.useCallback)(e=>{let t=[...E],n={...M},r=t.indexOf(e);if(-1===r){t.push(e);let r=n[e];if(!r){let t=u[e];t&&(r=t.count,n[e]=r)}}else t.splice(r,1);S(t),A(n)},[E,M,u]),B=(0,i.useCallback)(e=>{let t={...M},n=t[e];if(!n){let t=u[e];t&&(n=t.count)}n>1&&(n-=1),t[e]=n,A(t)}
1,[M,u]),H=(0,i.useCallback)(e=>{let t={...M},n=t[e],r=u[e];n<(r?r.count:1)&&(n+=1),t[e]=n,A(t)},[M,u]),V=(0,i.useCallback)((e,t)=>{let n={...M},r=u[e],o=r?r.count:1;t<1?t=1:t>o&&(t=o),n[e]=t,A(n)},[M,u]),W=(0,i.useCallback)(()=>{let e=[];for(let t=0;t<E.length;t++){let n=u[E[t]];n&&e.push(n)}I(e,M),Z()},[E,M,u,I,Z]);return(0,m.Z)(()=>{t&&(S([...k]),A({...z}))},[t]),(0,o.jsxs)(l.u,{opened:t,onClose:Z,closeOnClickOutside:!0,closeOnEscape:!0,size:"100%",padding:"0",transitionProps:{transition:"slide-up"},styles:{header:{display:"none"},inner:{padding:0,alignItems:"flex-end"},content:{borderRadius:"12px 12px 0 0",backgroundColor:p.w.GrayBackground}},children:[(0,o.jsx)(x,{children:P("鏿éæè²¨åå")}),(0,o.jsx)(g,{children:r.map(e=>{let t=u[e];if(!t)return null;let n=t.count;M[e]&&(n=M[e]);let r="";if(t.spec&&t.spec.user_selectors)for(let e in t.spec.user_selectors){let n=t.spec.user_selectors[e];n&&(r+=n.uid)}let i=t.homeCoverURL;return t.selectorHomeCoversMap&&t.selectorHomeCoversMap[r]&&(i=t.selectorHomeCoversMap[r]),(0,o.jsxs)(j,{children:[(0,o.jsx)(c.X,{color:p.w.Main,onChange:()=>L(e),checked:-1!==E.indexOf(e)}),(0,o.jsx)(_,{children:i&&(0,o.jsx)(h.Z,{alt:t.productname,src:i,width:60,height:60,style:{objectFit:"contain"},priority:!1,loading:"lazy"})}),(0,o.jsxs)(w,{children:[(0,o.jsxs)(O,{children:[t.productname,t.spec&&t.spec.selectors&&t.spec.selectors.length>0&&t.spec.user_selectors&&(0,o.jsxs)(o.Fragment,{children:[" - ",t.spec.selectors.map(e=>{let n=t.spec.user_selectors[e.uid];return n?(0,o.jsx)(C,{children:n.displayValue?n.displayValue:n.value},e.uid):null})]})]}),(0,o.jsxs)(y,{children:[(0,o.jsx)(v,{children:t.quoteitemid?P("å ±å¹åå"):(0,o.jsxs)(o.Fragment,{children:["NT$",(0,o.jsx)(b.ZP,{number:t.amount*n})]})}),(0,o.jsxs)(F,{children:[(0,o.jsx)(s.z,{variant:"transparent",onClick:()=>B(e),styles:{root:{width:24,height:26,padding:0}},children:(0,o.jsx)(f.eqC,{size:16,color:"#00000099"})}),(0,o.jsx)(a.I,{type:"number",min:1,max:t.count,variant:"transparent",value:n,onChange:t=>V(e,Number(t.target.value)),styles:{wrapper:{height:24},input:{width:38,height:24,minHeight:24,padding:0,textAlign:"center",fontSize:14}}}),(0,o.jsx)(s.z,{variant:"transparent",onClick:()=>H(e),styles:{root:{width:24,height:26,padding:0}},children:(0,o.jsx)(f.x06,{size:16,color:"#00000099"})})]})]})]})]},e)})}),(0,o.jsx)(N,{children:(0,o.jsx)(s.z,{color:p.w.Main,onClick:W,fullWidth:!0,styles:{root:{height:44,borderRadius:8},label:{fontSize:16,fontWeight:500}},children:P("å å
¥")})}),(0,o.jsx)(s.z,{onClick:Z,variant:"transparent",styles:{root:{position:"absolute",top:12,right:24,padding:0,width:28,height:28}},children:(0,o.jsx)(f.FU5,{size:20,color:"#000"})})]})}},79571:function(e,t,n){n.d(t,{cc:function(){return baseFormatNumber}});var r,o,i=n(85893);(r=o||(o={})).FILE="file",r.SOCIAL="social";let baseFormatNumber=(e,t)=>{if(isNaN(e))return 0;let n=(e.toFixed(t)+"").split("."),r=n[0],o=n.length>1?"."+n[1]:"",i=/(\d+)(\d{3})/;for(;i.test(r);)r=r.replace(i,"$1,$2");return t&&t>=1&&(o="0"===(o="".concat(parseFloat("0"+o)))?"":o.substring(1)),r+o},formatSocialNumber=e=>e>=1e6?baseFormatNumber(e/1e6,1)+"M":e>=1e3?baseFormatNumber(e/1e3,1)+"k":baseFormatNumber(e,0),formatFileSizeNumber=e=>isNaN(e)?0:e/1073741824>1?baseFormatNumber(e/1073741824,2)+"GB":e/1048576>1?baseFormatNumber(e/1048576,2)+"MB":e>=1024?baseFormatNumber(e/1024,0)+"KB":baseFormatNumber(e,0)+"byte",formatNumber=e=>{let{number:t,decimal:n,format:r}=e;switch(r){case"file":return formatFileSizeNumber(t);case"social":return formatSocialNumber(t);default:return baseFormatNumber(t,n)}};t.ZP=e=>{let{number:t,decimal:n,format:r}=e,o=formatNumber({number:t,decimal:n,format:r});return(0,i.jsx)(i.Fragment,{children:o})}},95404:function(e,t,n){n.d(t,{o:function(){return getAutoContrastValue}});function getAutoContrastValue(e,t){return"boolean"==typeof e?e:t.autoContrast}},77953:function(e,t,n){n.d(t,{s:function(){return useWindowEvent}});var r=n(67294);function useWindowEvent(e,t,n){(0,r.useEffect)(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}}}]);
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.