PageSourceSearch

https://www.rawraw.tw/view/default/assets/bundles/wish_list/index.bundle.js?v=4e38c46f

js rawraw.tw collected 2026-10-07 21:06:48 UTC 21,037 bytes, 1 lines download raw bytes

1!function(){"use strict";var e={6212:function(e,t){t.Z=(e,t)=>{const s=e.__vccOpts||e;for(const[e,i]of t)s[e]=i;return s}}},t={};function s(i){var c=t[i];if(void 0!==c)return c.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,s),l.exports}!function(){var e=Vue;const t={class:"table-pd-info table-content"},i={class:"table-pd-img"},c=["href"],l=["src"],r={class:"table-pd-content"},n={class:"card-content"},a={class:"card-title"},o=["href"],p={key:0,class:"table-content"},u={key:0,class:"product-price-prefix mr-1"},d={key:0,class:"table-content"},h={class:"wishlist-select-list"},m={class:"select-spec custom-select-wrapper narrow-select"},_=["value"],g={class:"select-amount custom-select-wrapper narrow-select"},f={key:0,value:null},y=["value"],k={class:"select-btn"},b=["disabled"],S={key:1,class:"table-content"},v={key:2,class:"table-content"};var E={props:{product:{type:Object,default:{}},specs:{type:Array,default:[]},maxQuantity:{type:Number,default:99},showPreorder:{type:Boolean,default:!1},showStock:{type:Boolean,default:!1}},data(){return{defaults:{product:{id:"",sn:"",name:"",price:{},is_multi_price:!1,is_enable:!1,src:"",image:"",specs:[],selling:""},spec:{id:0,color:"",size:"",price:{},selectable:0,stock:0,is_enable:!1}},inputs:{product:null,specs:[],displays:{},max:99,show_preorder:!1,show_stock:!1},selected:{spec:null,quantity:null}}},created(){this.$_construct()},watch:{selected:{deep:!0,handler(e){this.$emit("select",Object.assign({},e))}}},computed:{isProductValidate(){return null!==this.inputs.product},isSpecsValidate(){return this.inputs.specs.length>0},isSoldout(){return!(this.isProductValidate&&this.isSpecsValidate)||this.maximumSelectableQuantity<=0},isSelling(){return"during"===(this.product.selling||this.defaults.product.selling)||""===(this.product.selling||this.defaults.product.selling)},priceDisplayList(){if(this.$_isMultiPrice()){const e=this.$_getSelectedSpec();if(null!==e){if(this.$_isSpecPriceValidate(e)){const t=[...Object.values(e.price)].sort(((e,t)=>this.$_getPrice(t)-this.$_getPrice(e)));return t.map(((e,s)=>s!==t.length-1?this.$_getPrice(e):e))}}else{const e=this.$_getGroupedPrices(),t=[...Object.keys(e)].sort(((t,s)=>this.$_getPrice(e[s][0])-this.$_getPrice(e[t][0]))),s=t.map(((s,i)=>{if(i===t.length-1){const t=e[s][0].display_prefix?e[s][0].display_prefix:"";return e[s][0].display_prefix?{display_prefix:t,value:this.$_getScopedNewPrice(e[s])}
1:this.$_getScopedNewPrice(e[s])}return 0!==i?this.$_getScopedNewPrice(e[s]):this.$_getPrice(e[s][e[s].length-1])}));if(s.length>0)return s}}return[...Object.values(this.inputs.product.price)].sort(((e,t)=>this.$_getPrice(t)-this.$_getPrice(e)))},selectableSpecs(){let e=[];for(let t in this.inputs.specs)this.inputs.specs[t].is_enable&&this.inputs.specs[t].selectable>0&&e.push(this.inputs.specs[t]);return[...new Set(e)]},isSpecSelected(){return null!==this.selected.spec},selectableQuantities(){let e=[];const t=this.$_getSelectedSpec();if(null===t)return e;let s=Math.min(t.selectable,this.inputs.max);for(let i=1;i<=s;i++)e.push({num:i,text:null===t?i:this.$_getDisplayQuantityText(i,t),disabled:null===t||i>t.selectable});return e},maximumSelectableQuantity(){return this.specs.reduce(((e,t)=>e.selectable>t.selectable?e:t),0).selectable}},methods:{$_construct(){this.$_validate()&&(this.inputs.product=this.$_parseProduct(this.product),this.inputs.specs=this.$_parseSpecs(this.specs),Object.assign(this.inputs.displays,this.defaults.displays,this.displays),this.inputs.max=this.maxQuantity,this.inputs.show_preorder=this.showPreorder,this.inputs.show_stock=this.showStock,this.$_selectSpecIfOnlyOne())},$_validate(){if(!B(this.defaults.product,this.product))return!1;for(let e in this.specs)if(!B(this.defaults.spec,this.specs[e]))return!1;return!0},$_parseProduct(e){return Object.keys(e.price).forEach((t=>{this.$_isObject(e.price[t])?e.price[t].value=parseInt(e.price[t].value):e.price[t]=parseInt(e.price[t])})),e},$_parseSpecs(e){for(let t in e)Object.keys(e[t].price).forEach((s=>{this.$_isObject(e[t].price[s])?e[t].price[s].value=parseInt(e[t].price[s].value):e[t].price[s]=parseInt(e[t].price[s])}));return e},$_selectSpecIfOnlyOne(){const e=this.selectableSpecs;1==e.length&&(this.selected.spec=e[0],this.$_onSpecSelected())},$_isMultiPrice(){return this.inputs.product.is_multi_price},$_getSelectedSpec(){return this.isSpecSelected?this.selected.spec:null},$_isSpecPriceValidate(e){return Object.keys(e.price).every((t=>this.$_getPrice(e.price[t])>0))},$_getScopedNewPrice(e){const t=this.$_getPrice(e[0]),s=this.$_getPrice(e[e.length-1]);return t==s?""+t:t<s?t+"-"+s:""},$_getGroupedPrices(){let e=this.inputs.specs.filter((e=>this.isColorSelected?e.is_enable&&e.selectable>0&&e.color==this.selected.color:e.is_enable&&e.selectable>0)).map((e=>e.price));const t={};return e.map((e=>{Object.keys(e).map((s=>{e[s].value?e[s].value:e[s];void 0!==t[s]?t[s].push(e[s]):t[s]=[e[s]]}))})),Object.keys(t).map((e=>{t[e];t[e].sort(((e,t)=>this.$_getPrice(e)-this.$_getPrice(t)))})),t},$_getPrice(e){return void 0!==e.value?e.value:e},$_getDisplayQuantityText(e,t){return e<=t.stock&&this.inputs.show_stock?e+" (現貨)":e>t.stock&&this.inputs.show_preorder?e+" (預購)":e},$_onSpecSelected(){this.$_keepQuantitySelected(this.selected.quantity)},$_keepQuantitySelected(e){const t=this.selectableQuantities;-1!==t.findIndex((t=>t.num==e))?this.selected.quantity=e:t.length>0?this.selected.quantity=t[0].num:this.selected.quantity=null},$_onButtonClick(e){this.$emit("submit",e,this.inputs.product,this.$_getSelectedSpec(),this.selected.quantity)},$_isObject(e){return e&&e instanceof Object&&!(e instanceof Array)}}};function B(e,t){let s=Object.keys(e),i=Object.keys(t);return i.filter((function(e){return-1!==s.indexOf(e)})).length===i.length}var P=s(6212);const V=(0,P.Z)(E,[["render",function(s,$,E,B,P,V){return(0,e.openBlock)(),(0,e.createElementBlock)("tr",null,[(0,e.createElementVNode)("td",t,[(0,e.createElementVNode)("div",i,[(0,e.createElementVNode)("a",{href:P.inputs.product.src},[(0,e.createElementVNode)("img",{src:P.inputs.product.image,class:"img-fluid",alt:""},null,8,l)],8,c)]),(0,e.createElementVNode)("div",r,[(0,e.createElementVNode)("div",n,(0,e.toDisplayString)(P.inputs.product.sn),1),(0,e.createElementVNode)("div",a,[(0,e.createElementVNode)("a",{href:P.inputs.product.src},(0,e.toDisplayString)(P.inputs.product.name),9,o)]),(0,e.createElementVNode)("button",{class:"btn btn-delete pl-0",onClick:$[0]||($[0]=e=>V.$_onButtonClick("delete"))},$[5]||($[5]=[(0,e.createElementVNode)("i",{class:"fal fa-trash-alt"},null,-1)]))])]),V.isProductValidate?((0,e.openBlock)(),(0,e.createElementBlock)("td",p,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(V.priceDisplayList,((t,s)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:s},[t.display_prefix?((0,e.openBlock)(),(0,e.createElementBlock)("span",u,(0,e.toDisplayString)(t.display_prefix),1)):(0,e.createCommentVNode)("v-if",!0),t.display_prefix?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:1,class:(0,e.normalizeClass)(["product-price",{"mr-1":s+1<V.priceDisplayList.length}])},(0,e.toDisplayString)(t.value),3)):((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:2,class:(0,e.normalizeClass)(["product-price",{"mr-1 text-muted":s+1<V.priceDisplayList.length}])},(0,e.toDisplayString)(t),3))],64)))),128))])):(0,e.createCommentVNode)("v-if",!0),s.isSoldOut?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[V.isSelling?((0,e.openBlock)(),(0,e.createElementBlock)("td",d,[(0,e.createElementVNode)("div",h,[(0,e.createElementVNode)("div",m,[$[7]||($[7]=(0,e.createElementVNode)("i",{class:"icon-custom-select fal fa-angle-down"},null,-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":$[1]||($[1]=e=>P.selected.spec=e),class:"form-control",onChange:$[2]||($[2]=function(){return V.$_onSpecSelected&&V.$_onSpecSelected(...arguments)})},[$[6]||($[6]=(0,e.createElementVNode)("option",{value:"null",selected:"",disabled:""},"選擇規格",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(V.selectableSpecs,((t,
1s)=>((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:s,value:t},(0,e.toDisplayString)(t.color)+" / "+(0,e.toDisplayString)(t.size),9,_)))),128))],544),[[e.vModelSelect,P.selected.spec]])]),(0,e.createElementVNode)("div",g,[$[8]||($[8]=(0,e.createElementVNode)("i",{class:"icon-custom-select fal fa-angle-down"},null,-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":$[3]||($[3]=e=>P.selected.quantity=e),class:"form-control"},[V.isSpecSelected?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:1},(0,e.renderList)(V.selectableQuantities,((t,s)=>((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:s,value:t.num},(0,e.toDisplayString)(t.text),9,y)))),128)):((0,e.openBlock)(),(0,e.createElementBlock)("option",f,"請選擇規格"))],512),[[e.vModelSelect,P.selected.quantity,void 0,{number:!0}]])]),(0,e.createElementVNode)("div",k,[(0,e.createElementVNode)("button",{class:"btn btn-block btn-custom primary",disabled:!V.isSpecSelected,onClick:$[4]||($[4]=e=>V.$_onButtonClick("add_cart"))},(0,e.toDisplayString)(V.isSpecSelected?"加入購物車":"請先選規格"),9,b)])])])):((0,e.openBlock)(),(0,e.createElementBlock)("td",S,$[9]||($[9]=[(0,e.createElementVNode)("span",{class:"text-muted"},"商品不在販售時間",-1)])))],64)),V.isSoldout?((0,e.openBlock)(),(0,e.createElementBlock)("td",v,$[10]||($[10]=[(0,e.createElementVNode)("span",{class:"text-muted"},"已售完",-1)]))):(0,e.createCommentVNode)("v-if",!0)])}]]);var x=V;const N={class:"product-card d-flex align-items-center"},w={class:"table-pd-img"},O=["href"],j=["src"],D={class:"table-pd-content"},C={class:"card-title"},Q=["href"],I={key:0,class:"card-content"},q={key:0,class:"product-price-prefix mr-1"},L={key:0,class:"wishlist-select-list"},M={class:"select-spec custom-select-wrapper narrow-select"},z=["value"],F={class:"select-amount custom-select-wrapper narrow-select"},A={key:0,value:null},G=["value"],T={class:"select-btn"},U=["disabled"],Z={key:1,class:"text-muted"},W={key:2,class:"row no-gutters"};var H={props:{product:{type:Object,default:{}},specs:{type:Array,default:[]},maxQuantity:{type:Number,default:99},showPreorder:{type:Boolean,default:!1},showStock:{type:Boolean,default:!1}},data(){return{defaults:{product:{id:"",sn:"",name:"",price:{},is_multi_price:!1,is_enable:!1,src:"",image:"",specs:[],selling:""},spec:{id:0,color:"",size:"",price:{},selectable:0,stock:0,is_enable:!1}},inputs:{product:null,specs:[],displays:{},max:99,show_preorder:!1,show_stock:!1},selected:{spec:null,quantity:null}}},created(){this.$_construct()},watch:{selected:{deep:!0,handler(e){this.$emit("select",Object.assign({},e))}}},computed:{isProductValidate(){return null!==this.inputs.product},isSpecsValidate(){return this.inputs.specs.length>0},isSoldout(){return!(this.isProductValidate&&this.isSpecsValidate)||this.maximumSelectableQuantity<=0},isSelling(){return"during"===(this.product.selling||this.defaults.product.selling)||""===(this.product.selling||this.defaults.product.selling)},priceDisplayList(){if(this.$_isMultiPrice()){const e=this.$_getSelectedSpec();if(null!==e){if(this.$_isSpecPriceValidate(e)){const t=[...Object.values(e.price)].sort(((e,t)=>this.$_getPrice(t)-this.$_getPrice(e)));return t.map(((e,s)=>s!==t.length-1?this.$_getPrice(e):e))}}else{const e=this.$_getGroupedPrices(),t=[...Object.keys(e)].sort(((t,s)=>this.$_getPrice(e[s][0])-this.$_getPrice(e[t][0]))),s=t.map(((s,i)=>{if(i===t.length-1){const t=e[s][0].display_prefix?e[s][0].display_prefix:"";return e[s][0].display_prefix?{display_prefix:t,value:this.$_getScopedNewPrice(e[s])}
1:this.$_getScopedNewPrice(e[s])}return 0!==i?this.$_getScopedNewPrice(e[s]):this.$_getPrice(e[s][e[s].length-1])}));if(s.length>0)return s}}return[...Object.values(this.inputs.product.price)].sort(((e,t)=>this.$_getPrice(t)-this.$_getPrice(e)))},selectableSpecs(){let e=[];for(let t in this.inputs.specs)this.inputs.specs[t].is_enable&&this.inputs.specs[t].selectable>0&&e.push(this.inputs.specs[t]);return[...new Set(e)]},isSpecSelected(){return null!==this.selected.spec},selectableQuantities(){let e=[];const t=this.$_getSelectedSpec();if(null===t)return e;let s=Math.min(t.selectable,this.inputs.max);for(let i=1;i<=s;i++)e.push({num:i,text:null===t?i:this.$_getDisplayQuantityText(i,t),disabled:null===t||i>t.selectable});return e},maximumSelectableQuantity(){return this.specs.reduce(((e,t)=>e.selectable>t.selectable?e:t),0).selectable}},methods:{$_construct(){this.$_validate()&&(this.inputs.product=this.$_parseProduct(this.product),this.inputs.specs=this.$_parseSpecs(this.specs),Object.assign(this.inputs.displays,this.defaults.displays,this.displays),this.inputs.max=this.maxQuantity,this.inputs.show_preorder=this.showPreorder,this.inputs.show_stock=this.showStock,this.$_selectSpecIfOnlyOne())},$_validate(){if(!J(this.defaults.product,this.product))return!1;for(let e in this.specs)if(!J(this.defaults.spec,this.specs[e]))return!1;return!0},$_parseProduct(e){return Object.keys(e.price).forEach((t=>{this.$_isObject(e.price[t])?e.price[t].value=parseInt(e.price[t].value):e.price[t]=parseInt(e.price[t])})),e},$_parseSpecs(e){for(let t in e)Object.keys(e[t].price).forEach((s=>{this.$_isObject(e[t].price[s])?e[t].price[s].value=parseInt(e[t].price[s].value):e[t].price[s]=parseInt(e[t].price[s])}));return e},$_selectSpecIfOnlyOne(){const e=this.selectableSpecs;1==e.length&&(this.selected.spec=e[0],this.$_onSpecSelected())},$_isMultiPrice(){return this.inputs.product.is_multi_price},$_getSelectedSpec(){return this.isSpecSelected?this.selected.spec:null},$_isSpecPriceValidate(e){return Object.keys(e.price).every((t=>this.$_getPrice(e.price[t])>0))},$_getScopedNewPrice(e){const t=this.$_getPrice(e[0]),s=this.$_getPrice(e[e.length-1]);return t==s?""+t:t<s?t+"-"+s:""},$_getGroupedPrices(){let e=this.inputs.specs.filter((e=>this.isColorSelected?e.is_enable&&e.selectable>0&&e.color==this.selected.color:e.is_enable&&e.selectable>0)).map((e=>e.price));const t={};return e.map((e=>{Object.keys(e).map((s=>{e[s].value?e[s].value:e[s];void 0!==t[s]?t[s].push(e[s]):t[s]=[e[s]]}))})),Object.keys(t).map((e=>{t[e];t[e].sort(((e,t)=>this.$_getPrice(e)-this.$_getPrice(t)))})),t},$_getPrice(e){return void 0!==e.value?e.value:e},$_getDisplayQuantityText(e,t){return e<=t.stock&&this.inputs.show_stock?e+" (現貨)":e>t.stock&&this.inputs.show_preorder?e+" (預購)":e},$_onSpecSelected(){this.$_keepQuantitySelected(this.selected.quantity)},$_keepQuantitySelected(e){const t=this.selectableQuantities;-1!==t.findIndex((t=>t.num==e))?this.selected.quantity=e:t.length>0?this.selected.quantity=t[0].num:this.selected.quantity=null},$_onButtonClick(e){this.$emit("submit",e,this.inputs.product,this.$_getSelectedSpec(),this.selected.quantity)},$_isObject(e){return e&&e instanceof Object&&!(e instanceof Array)}}};function J(e,t){let s=Object.keys(e),i=Object.keys(t);return i.filter((function(e){return-1!==s.indexOf(e)})).length===i.length}const K=(0,P.Z)(H,[["render",function(t,s,i,c,l,r){return(0,e.openBlock)(),(0,e.createElementBlock)("div",N,[(0,e.createElementVNode)("div",w,[(0,e.createElementVNode)("a",{href:l.inputs.product.src},[(0,e.createElementVNode)("img",{src:l.inputs.product.image,class:"img-fluid",alt:"",style:{"max-width":"90px"}},null,8,j)],8,O)]),(0,e.createElementVNode)("div",D,[(0,e.createElementVNode)("button",{class:"btn btn-delete float-right",onClick:s[0]||(s[0]=e=>r.$_onButtonClick("delete"))},s[5]||(s[5]=[(0,e.createElementVNode)("i",{class:"fal fa-trash-alt mr-0"},null,-1)])),(0,e.createElementVNode)("div",C,[(0,e.createElementVNode)("a",{href:l.inputs.product.src},(0,e.toDisplayString)(l.inputs.product.name),9,Q)]),r.isProductValidate?((0,e.openBlock)(),(0,e.createElementBlock)("div",I,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.priceDisplayList,((t,s)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:s},[t.display_prefix?((0,e.openBlock)(),(0,e.createElementBlock)("span",q,(0,e.toDisplayString)(t.display_prefix),1)):(0,e.createCommentVNode)("v-if",!0),t.display_prefix?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:1,class:(0,e.normalizeClass)(["product-price",{"mr-1":s+1<r.priceDisplayList.length}])},(0,e.toDisplayString)(t.value),3)):((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:2,class:(0,e.normalizeClass)(["product-price",{"mr-1":s+1<r.priceDisplayList.length}])},(0,e.toDisplayString)(t),3))],64)))),128))])):(0,e.createCommentVNode)("v-if",!0),t.isSoldOut?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.createCommentVNode)("規格選擇"),r.isSelling?((0,e.openBlock)(),(0,e.createElementBlock)("div",L,[(0,e.createElementVNode)("div",M,[s[7]||(s[7]=(0,e.createElementVNode)("i",{class:"icon-custom-select fal fa-angle-down"},null,-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":s[1]||(s[1]=e=>l.selected.spec=e),class:"form-control",onChange:s[2]||(s[2]=function(){return r.$_onSpecSelected&&r.$_onSpecSelected(...arguments)})},[s[6]||(s[6]=(0,e.createElementVNode)("option",{value:"null",selected:"",disabled:""},"選擇規格",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.selectableSpecs,((t,
1s)=>((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:s,value:t},(0,e.toDisplayString)(t.color)+" / "+(0,e.toDisplayString)(t.size),9,z)))),128))],544),[[e.vModelSelect,l.selected.spec]])]),(0,e.createElementVNode)("div",F,[s[8]||(s[8]=(0,e.createElementVNode)("i",{class:"icon-custom-select fal fa-angle-down"},null,-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":s[3]||(s[3]=e=>l.selected.quantity=e),class:"form-control"},[r.isSpecSelected?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:1},(0,e.renderList)(r.selectableQuantities,((t,s)=>((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:s,value:t.num},(0,e.toDisplayString)(t.text),9,G)))),128)):((0,e.openBlock)(),(0,e.createElementBlock)("option",A,"請選擇規格"))],512),[[e.vModelSelect,l.selected.quantity,void 0,{number:!0}]])]),(0,e.createElementVNode)("div",T,[(0,e.createElementVNode)("button",{class:"btn btn-block btn-custom primary",disabled:!r.isSpecSelected,onClick:s[4]||(s[4]=e=>r.$_onButtonClick("add_cart"))},(0,e.toDisplayString)(r.isSpecSelected?"加入購物車":"請先選規格"),9,U)])])):((0,e.openBlock)(),(0,e.createElementBlock)("span",Z,"商品不在販售時間"))],64)),(0,e.createCommentVNode)(" 售完標籤 "),r.isSoldout?((0,e.openBlock)(),(0,e.createElementBlock)("div",W,s[9]||(s[9]=[(0,e.createElementVNode)("span",{class:"text-muted"},"已售完",-1)]))):(0,e.createCommentVNode)("v-if",!0)])])}]]);var R=K;!function(t){function s(e,t){try{var s=e();return null==s?t:s}catch(e){return t}}(0,e.createApp)({components:{WishListDesktopProductCard:x,WishListMobileProductCard:R},data(){return{spec_picker:t.spec_picker,price_prefix:null==t?void 0:t.price_prefix}},methods:{$_buildProduct(e){var t;return{id:e.id,sn:e.sn,name:e.title,price:this.$_buildPrice(e),is_multi_price:1==e.is_price_on_spec,is_enable:0==e.deleted,src:e.url,image:e.image,selling:(null==e||null===(t=e.selling)||void 0===t?void 0:t.status)||"during"}},$_buildPrice(e){const t={"售價":parseInt(e.price)};var s;(parseInt(e.original_price)>0&&(t["原價"]=parseInt(e.original_price)),e.hasOwnProperty("special_price")&&parseInt(e.special_price)>0)&&(null!==(s=this.price_prefix)&&void 0!==s&&s.special_price?t["特價"]={value:parseInt(e.special_price),display_prefix:this.price_prefix.special_price}:t["特價"]=parseInt(e.special_price));return t},$_buildSpecs(e){let t=[];for(let i in e){let c=e[i];t.push({id:c.id,color:c.color,size:c.size,price:this.$_buildPrice(c),selectable:c.max_selectable,stock:s((()=>c.amount),0),is_enable:0==c.disable})}return t},$_onPickerSelect(e){},$_onPickerSubmit(e,s,i,c){switch(e){case"add_cart":!function(e,s,i,c,l){if(null===s)return void toastMessage('請選擇"'+l.color+'"和"'+l.size+'"',"warning");if(i<=0)return void toastMessage("已售完","warning");const r=t.endpoints.cart,n={action:"add",amount:i,spec_id:s.id},a=t.endpoints.checkout;$.post(r,n,(function(t){0==t.result&&$("body").trigger("after.add.cart",[s,e,i]),!0===c?location.href=a:($("body").trigger("cart_reload"),toastMessage(t.message))}),"json").fail((function(e,t,s){toastMessage("發生錯誤,請重新操作。"+s,"danger")}))}(s,i,c,!1,this.displays);break;case"delete":!function(e){if(null===e)return void toastMessage("請選擇必要資訊");const s=t.endpoints.wish_list,i={action:"delete",product_id:e.id};$.jAlert({content:"確定要刪除此項目嗎?",btns:[{text:"是",onClick:function(e,t){location.href=s+"?"+$.param(i)}},{text:"否"}]})}(s)}}}}).mount('[data-vue-id="vue-wish-list"]')}(wish_list_index_state)}()}();

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.