(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ff3258ec"],{"1faf":function(t,e,i){"use strict";i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"d",(function(){return c}));var s=i("66a5");const a=t=>Object(s["a"])({url:"/shopapi/pay/shopify/application_charge/status",method:"post",data:t}),n=t=>Object(s["a"])({url:"/shopapi/pay/shopify/subscription/change",method:"post",data:t}),o=t=>Object(s["a"])({url:"/shopapi/pay/shopify/subscription/status",method:"post",data:t}),c=t=>Object(s["a"])({url:"/shopapi/pay/subscription/cancel",method:"post",data:t})},"35f0":function(t,e,i){"use strict";i("a7a7")},"4a47":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,top:"30vh"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[i("PaypalSubscriptionButton",{ref:"PaypalButton"})],1)},a=[],n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{"text-align":"center"},attrs:{id:"paypal-button-container3"}})},o=[],c=i("7b32"),r=i("6b29"),l=i("ed08"),u={name:"PaypalSubscriptionButton",data(){return{paypal:null}},inject:["reload"],watch:{},created(){},mounted(){this.paypalReady()},methods:{close(){const t=document.querySelector("#paypal-button-container3");t.removeChild(t.lastElementChild)},async paypalReady(){var t=this;try{this.paypal=await Object(c["a"])({"client-id":"Ad_2nWfHg-jljIyJdtNKa_8Vt9CzTPSn99w5REF3BFBV13lrA1QUF7HV5uSN3dwfV1Gag-YUMKfQyl2B",intent:"subscription",vault:!0})}catch(e){console.error("failed to load the PayPal JS SDK script",e)}this.paypal&&await this.paypal.Buttons({env:"production",commit:!0,style:{size:"large",color:"blue",shape:"rect",label:"subscribe"},locale:"en_US",createSubscription:function(e,i){return t.ceatePayPals().then(t=>i.subscription.create({plan_id:t.planId,custom_id:t.customId,subscriber:{email:t.email}}))},onApprove:(e,i)=>{t.queryStatus(e.subscriptionID)},onError:t=>{console.log(t,"paypal err")}}).render("#paypal-button-container3")},async ceatePayPals(){const t=await Object(r["b"])({});return t.data},async queryStatus(t){var e={};e.subscriptionID=t;var i=this,s=await Object(r["d"])(e);if(200===s.code){if(2===s.data.status)return i.$message.success("Change subscription success!"),void setTimeout(()=>{i.reload()},500);if(3===s.data.status)return i.$message.error(s.data.failReason),void this.reload();1===s.data.status&&(await Object(l["e"])(2e3),i.queryStatus(t))}}}},p=u,d=i("2877"),b=Object(d["a"])(p,n,o,!1,null,"4c3d627c",null),m=b.exports,v={name:"PaypalSubscriptionDialog",components:{PaypalSubscriptionButton:m},props:{value:{type:Boolean,default:!1}},data(){return{dialogVisible:!1}},watch:{value:{handler(t){this.dialogVisible=t},immediate:!0},dialogVisible:{handler(t){this.$emit("input",t)},immediate:!0}},mounted(){},methods:{close(){this.dialogVisible=!1}}},f=v,h=Object(d["a"])(f,s,a,!1,null,"2cd31193",null);e["a"]=h.exports},"4d0d":function(t,e){t.exports="data:image/webp;base64,UklGRkYEAABXRUJQVlA4WAoAAAAQAAAAPwAAcwAAQUxQSAoCAAABkEVrkyFJMWvbtm082bZt27Zt27Zt27bNxsSiKzIn/vVTREwABWS0zusvvPp0Y8/IDAQZdeIndvTfkgmg4HMWe7qpa+hh0wWBdZXzZ/MJquK8YZtFNS1mq7eC6knitcM19Axgyzv1HLflCqUlmMcWZ9cSl61X0ZLAXiu4dj+X4DECQRXexfxxfSKcSezzbWGUhuz4KhZGoAdOPM5KwoDLysLLGMUlLoxSEv67cn2X73NGwRpuu7yvQ1inBPbsElGa6/zjk7woEe6y77cJfSXU1oed54BcFbwLguEScHyAL0QsTe0jkaqTcI3QZpKuF7cMr66tRMrakV3RhF4/jgYK8D+Vt3CnFLW11Bsu0nM97SxRfhca5Xuopa01ClVn4flbwnsApgnttfsnEXK6m3Ef1yWazdhF6Q3YFGLwJf+B3QEbTE2x3sQnqrJs1weQWzsnpSWfR0DakfMmkNqC+SAlBGNBcgt6g6QQtACJJqiG4R9EUBjjNQmzYtyUJMY4JomAsVlCHoiFomcQ40SXIfqKDkK0Eq2DqC6aA1FUNBIiu6gbRBJRU4hIokoIHj9RAYTnJM6EcFWWAOGQLCzCBhm5AOYaPAYYbXABoLvBPoBmBqsBKhvMAChoMAwgs0EXgIQGDQHCGZTX5ybDPPoem6TXd9Ekjr59JsFc6paY0DJ1JY0izXmt6nITcgZWUDggFgIAAPANAJ0BKkAAdAA+aSyRRaQioZh7xmRABoSzAywFWAJOYgP7d2U3Uu6/kVzxvDkYtJF+Z6Ve3A8wH7AeZn7K/KA6xr0AP0W6zL91fSiCcLGknHC9spI6i8geoq0yQ8xSf/lW0/nR6KL2Or8vLRdUyMGGtlnYJWXEwAD+/W5zM/2RWXYU4QZo6NHoqc5EKS5t8ysvHjqsLXFR7fCE1kZeuXOUgCcs5k21Wa/1GnlxZN1jh2ikokwPHrBuJ/AUml//znhSBY7HtBWEHfcPMA6SCJmWNOnVFYDgevf78NAiv1/e+vKQ169z2BebfsijNF1EEQ8ctEQ6S73onUcogTgVSD8VvuvGi5/FcfybOG2N57109DMuCnkQxzbk00XYH9srrTMWZ9vHbjqLq1PoVDCY16FfbDH3EYju3aXsbWSNa8qVw01XWuibp2f4Kp//A1JPqHhAn6z3d/KTzJ1D0x7g9NSML5RAJ7bhczcP+V2cmV7IdN6Eyc+wXzkpjdTU3H0AruTcR8Pw5acjSQdancfMB9p/LkDrGHD735Jtj//sYm8OZ8J6oqeGIxc0o7bs+9jVuN+ko/+FtOFa5YQJ9+QH0yq0f1iJMjuqJsdR7eciFJcOobPZvlbrWN7wfx1ID5bGkZF8vh/kR0uUvKf096831Vn4boEPUin6uD2+z36Nj52JdjHAgC8nye5Lima4eviEf/8cQAAAAA=="},a7a7:function(t,e,i){},c046:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"subscription-page default-main"},[s("BackPage"),t._m(0),s("div",{staticClass:"subscription-list"},t._l(t.subscriptionList,(function(e){return s("div",{key:e.level,staticClass:"subscription-item"},[1!==e.level?s("div",{staticClass:"subscription-popular"},[t._v("Popular")]):t._e(),s("div",{staticClass:"subscription-item-top"},[s("img",{staticClass:"subscription-item-img",attrs:{alt:"subscription img",src:1===e.level?i("4d0d"):i("f5ad")}}),s("div",{staticClass:"subscription-item-title"},[t._v(t._s(e.title))]),s("div",{staticClass:"subscription-item-sub-title"},[t._v(t._s(e.subTitle))]),s("div",{staticClass:"subscription-item-price"},[s("div",{staticClass:"subscription-item-price-unit"},[t._v("$")]),s("div",{staticClass:"subscription-item-price-content"},[s("span",{staticClass:"subscription-item-price-num"},[t._v(t._s(e.price))]),s("span",{staticClass:"subscription-item-price-diagonal"},[t._v("/")]),s("span",[t._v("month")])])]),t._l(e.tips,(function(e,i){return s("div",{key:i,staticClass:"subscription-item-tips"},[t._m(1,!0),s("span",{staticClass:"subscription-item-tips-content"},[t._v(t._s(e))])])}))],2),s("div",{staticClass:"subscription-item-bottom"},[s("div",{staticClass:"subscription-item-images"},t._l(e.images,(function(t,e){return s("div",{key:e,staticClass:"subscription-item-images-item-box"},[s("my-img",{staticClass:"subscription-item-images-item",attrs:{src:t}})],1)})),0),s("div",{staticClass:"subscription-item-button-box"},[t.currentFittingsLevel!==e.level?s("div",{staticClass:"subscription-item-button div-hover purple",on:{click:function(i){return t.selectSubscription(e.level)}}},[t._v("Select")]):t._e(),t.currentFittingsLevel===e.level&&1===t.currentFittingsLevel?s("div",{staticClass:"subscription-item-button div-hover"},[s("span",[t._v("Current plan")])]):t._e(),t.currentFittingsLevel===e.level&&1!==t.currentFittingsLevel?s("div",{staticClass:"subscription-item-button div-hover",on:{click:function(i){return t.cancelSubscription(e.level)}}},[t._v("Cancel")]):t._e()])])])})),0),s("div",{staticClass:"subscription-faq"},[t._m(2),s("el-collapse",{staticClass:"subscription-faq-bottom",model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},t._l(t.faqList,(function(e){return s("el-collapse-item",{key:e.title,staticClass:"subscription-faq-item",attrs:{title:e.title,name:e.num}},[s("div",[t._v(t._s(e.content))])])})),1)],1),s("PaypalSubscriptionDialog",{model:{value:t.showPaypal,callback:function(e){t.showPaypal=e},expression:"showPaypal"}})],1)},a=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"subscription-top"},[i("div",{staticClass:"subscription-title"},[t._v("Accessory Subscription Program")]),i("div",{staticClass:"subscription-sub-title"},[t._v("According to statistics,advanced jewelry packaging will bring a better repurchase rate and transaction rater,and the exquisite packaging of products will make customers have a higher degree of goodwill for the brand")])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"subscription-item-tips-round-box"},[i("span",{staticClass:"subscription-item-tips-round"})])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"subscription-faq-top"},[i("div",{staticClass:"subscription-faq-title"},[t._v("FAQ'S")]),i("div",{staticClass:"subscription-faq-sub-title"},[t._v("Let us help answer the most common questions.")])])}],n=i("623f"),o=i("2f62"),c=i("4a47"),r=i("1faf"),l=i("86b8"),u=(i("6b29"),{name:"Subscription",components:{PaypalSubscriptionDialog:c["a"]},data(){return{subscriptionList:[],faqList:[{num:1,title:"Products that have been distributed should be repackaged",content:"For products that have already been distributed, if you have subscribed to a more advanced plan, you can click Edit Product in the distribution list to re-select the jewelry box. After saving, the modified product will be displayed in a higher-end jewelry "},{num:2,title:"Why Shine can be offered to you below market price",content:"We have special subsidies to support our customers so that they can improve their buying experience for products"},{num:3,title:"Will it be required automatically",content:"We will not auto-renew, but usually customers get a pretty good experience from the plan and they tend to come back and subscribe again"}],activeNames:1,showPaypal:!1,orderId:"",loadingInstance:null}},computed:{...Object(o["b"])("user",{currentFittingsLevel:"getFittingsLevel",fittingsLevelEndTime:"getFittingsLevelEndTime",currentShop:"getCurrentShop"}),...Object(o["b"])("shopify",{app:"getApp",shop:"getShop"})},inject:["reload"],created(){this.getSubscription()},methods:{async getSubscription(){const t=await Object(n["p"])();this.subscriptionList=[{level:1,title:"Base",subTitle:"Basjc jewelry box packaging",price:0,tips:["Free jewelry box that can meet most purchase needs"],images:t.data.level1Photos},{level:2,title:"Standard",subTitle:"For small to medium businesses",price:t.data.level2Price,tips:["Get more advanced jewelry gift box below the market price","High - end gift boxes are beneficial to improve buyers'favorable impression of your brand"],images:t.data.level2Photos}]},selectSubscription(t){var e=this;1===this.currentShop.shopType?(this.loadingInstance=this.$loading(),Object(r["b"])({level:t,returnUrl:this.getReturnUrl()}).then(t=>{if(200===t.code){var i=t.data;if(1===i.status)return this.$message.success("Change subscription success!"),void setTimeout(()=>{e.reload()},500);2===i.status&&this.toShopifyConfirmationUrl(i.confirmationUrl)}else this.$message.error(t.msg)}).finally(()=>{this.loadingInstance.close()})):1===t?this.cancelSubscription():this.showPaypal=!0},cancelSubscription(){var t=this;this.loadingInstance=this.$loading(),Object(r["d"])({}).then(e=>{200===e.code?(this.$message.success("Cancel subscription success"),setTimeout(()=>{t.reload()},500)):this.$message.error(e.msg)}).finally(()=>{this.loadingInstance.close()})},queryShopifyApplicationChargeStatus(t){var e=this;setTimeout((function(){Object(r["a"])({id:t}).then(i=>{if(200===i.code){var s=i.data.status;1===s&&e.queryShopifyApplicationChargeStatus(t),2===s&&(e.$message.success("Pay success"),setTimeout(()=>{e.reload()},500)),3===s&&e.$message.error(i.data.failReason)}else e.$message.error(i.msg)})}),3e3)},toShopifyConfirmationUrl(t){if(this.app){const e=l["Redirect"].create(this.app);e.dispatch(l["Redirect"].Action.REMOTE,{url:t,newContext:!1})}else location.href=t},getReturnUrl(){if(this.app){var t="e0080c246e19620838062418c3259ac2",e=this.shop;return`https://${e}/admin/apps/${t}/PaymentStatus`}return"https://"+location.host+"/PaymentStatus"}}}),p=u,d=(i("35f0"),i("2877")),b=Object(d["a"])(p,s,a,!1,null,"22648e1c",null);e["default"]=b.exports},ed08:function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"a",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"e",(function(){return o})),i.d(e,"d",(function(){return c}));i("b7ef"),i("907a"),i("3c5d"),i("fa9e"),i("77d9");const s=t=>{const e=t.split(","),i=e[0].match(/:(.*?);/)[1],s=atob(e[1]);let a=s.length;const n=new Uint8Array(a);while(a--)n[a]=s.charCodeAt(a);return new Blob([n],{type:i})},a=(t,e)=>(t.lastModifiedDate=new Date,t.name=e,t);function n(t,e){var i=t.split(","),s=i[0].match(/:(.*?);/)[1],a=atob(i[1]),n=a.length,o=new Uint8Array(n);while(n--)o[n]=a.charCodeAt(n);return new File([o],e,{type:s})}async function o(t){return new Promise(e=>{setTimeout(e,t)})}function c(t,e=2){if(isNaN(Number(t)))return t;const i=Number(t).toFixed(e);return Number(i.substring(0,i.toString().length-1))}},f5ad:function(t,e){t.exports="data:image/webp;base64,UklGRjoLAABXRUJQVlA4WAoAAAAQAAAAWwAAzgAAQUxQSBkGAAABoIVt2xlJ+qatqR7btm3btm03xp41xrZt27bWu2NPu4vvQSX5//z5VmcRMQH0f29Rf75q38NQrvzmA/iRm0n9fb1sxwHgB2ZyAdcLEqW7C+/JzLQH8KZY6F1odmNmFAC8Pw7t4oyMqkwU6aUf68vIBFyqN8rYYWI0mxt4YmwUJ3QYorMLcdJMCLjex48NuiEGPMzLRi2PBESIzL/wZX69+uuDVaI1YsnjSPQ84F6fXWMA0EOp4Dsie/KR8DoASIzwJWoFYJ1SlPGWEdfKPCRxmBdwKWeuGAB3iCiwpDJk22MA9qm+EvJo4cNdAPhIVOpmW3WITnv0gDNZxOi6lq7PeDsyK1TV3W74fT28rSs2VGALcJ/UDXiyiohKdo/+btXq74fUyUTioZ+MAYhQaM4zG5k9TSQ5nTrFnO3J9FIugW9I3fMnyOwsmz0w/jJcnV6Ogmb1joWgoxopG/72SzK5CYS7kro/vgozq+BrkSGkbh5HfzI90zq7EU8fUnjjfR/ziNKP3J+s5TlICpf2NCYlww/A2/lV+U9zFDp8gpRM9wgAn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