(()=>{"use strict";var e={911:(e,t,i)=>{i.d(t,{Z:()=>a});var s=i(537),n=i.n(s),o=i(645),r=i.n(o)()(n());r.push([e.id,'@font-face {\n font-family: "iconfont";\n /* Project id 4017216 */\n src: url("//cdn.vstar.app/static/css/fonts/iconfont.woff2?t=169") format("woff2"), url("//cdn.vstar.app/static/css/fonts/iconfont.woff?t=1681525258204") format("woff"), url("//cdn.vstar.app/static/css/fonts/iconfont.ttf?t=1681525258204") format("truetype");\n}\n.vstar-star {\n font-size: 0 !important;\n}\n.vstar-star.right {\n text-align: right;\n}\n.vstar-star.center {\n text-align: center;\n}\n.vstar-star > * {\n display: inline-block;\n vertical-align: middle;\n}\n.vstar-star .star-item {\n margin-right: 2px;\n font-size: 0;\n line-height: normal;\n}\n.vstar-star .star-item.half-star {\n position: relative;\n}\n.vstar-star .item-star,\n.vstar-star .item-nostar {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.vstar-star .item-star {\n overflow: hidden;\n}\n.vstar-star i.trustoo-icon-star,\n.vstar-star i.trustoo-icon-nostar {\n display: inline;\n}\n.collection-icon-list {\n margin: 5px 0;\n}\n.collection-icon-list .collection-reviews-num {\n margin: 1px 6px 0 3px;\n font-size: 13px;\n line-height: normal;\n color: #888;\n opacity: 0.8;\n}\n#vstar-reviews #reviews-head {\n display: flex;\n}\n#vstar-reviews .head-sort {\n position: absolute;\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n}\n#vstar-reviews .head-sort .sort-content {\n position: relative;\n width: 100%;\n height: 100%;\n}\n#vstar-reviews #reviews-body {\n position: relative;\n}\n#vstar-reviews .list-review .img-item,\n#vstar-reviews .list-review .resource-item {\n width: 100px;\n height: 100px;\n overflow: hidden;\n}\n#vstar-reviews .grid-review {\n position: absolute;\n display: inline-block;\n padding-bottom: 16px;\n vertical-align: top;\n box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.12);\n border-radius: 8px;\n animation: recover 1s linear;\n}\n#vstar-reviews .grid-review svg,\n#trustoo-review-detail .review-info svg {\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .grid-review-head,\n#trustoo-review-detail .review-info .grid-review-head {\n margin-top: 16px;\n padding: 0 16px;\n position: relative;\n}\n#vstar-reviews .grid-review .user-message,\n#trustoo-review-detail .review-info .user-message {\n margin: 12px 0 12px;\n}\n#vstar-reviews .grid-review .user-name,\n#trustoo-review-detail .review-info .user-name {\n padding: 0;\n margin-right: 6px;\n vertical-align: middle;\n font-weight: 700;\n font-size: 14px;\n}\n#vstar-reviews .grid-review .country-name,\n#trustoo-review-detail .review-info .country-name {\n font-size: 16px;\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .reviews-date,\n#trustoo-review-detail .review-info .reviews-date {\n line-height: 22px;\n font-size: 12px;\n}\n#vstar-reviews .grid-review .grid-review-body,\n#trustoo-review-detail .review-info .grid-review-body {\n padding: 0 16px;\n}\n#vstar-reviews .grid-review .reviews-text,\n#trustoo-review-detail .review-info .reviews-text {\n font-size: 14px;\n word-wrap: break-word;\n}\n#vstar-reviews .grid-review .display-text,\n#trustoo-review-detail .review-info .display-text {\n font-size: 14px;\n}\n#vstar-reviews .grid-review .img-item,\n#vstar-reviews .grid-review .resource-item {\n width: 100%;\n display: block;\n border-radius: 8px 8px 0 0;\n}\n#vstar-reviews .grid-review img {\n width: 100%;\n border-radius: 8px 8px 0 0;\n}\n[class^="trustoo-icon-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: "iconfont" !important;\n speak: never;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n font-size: 14px;\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.trustoo-icon-helpful:before {\n content: "\\e605";\n color: var(--font-color);\n}\n.trustoo-icon-unhelpful:before {\n content: "\\e606";\n color: var(--font-color);\n}\n.trustoo-icon-star:before {\n content: "\\e602";\n color: var(--star-color);\n}\n.trustoo-icon-nostar:before {\n content: "\\e602";\n color: var(--nostar-color);\n}\n',"",{version:3,sources:["webpack://./static/css/trustoo-insert.less"],names:[],mappings:"AAEA;EACC,uBAAA;EADC,uBAAuB;EAGxB,gQAAA;AADD;AASA;EACC,uBAAA;AAPD;AASC;EACC,iBAAA;AAPF;AAUC;EACC,kBAAA;AARF;AAWC;EACC,qBAAA;EACA,sBAAA;AATF;AAJA;EAiBE,iBAAA;EACA,YAAA;EACA,mBAAA;AAVF;AATA;EAuBE,kBAAA;AAXF;AAZA;;EA4BE,kBAAA;EACA,WAAA;EACA,YAAA;EACA,MAAA;EACA,OAAA;AAZF;AApBA;EAoCE,gBAAA;AAbF;AAvBA;;EAyCE,eAAA;AAdF;AAkBA;EACC,aAAA;AAhBD;AAeA;EAUE,qBAAA;EACA,eAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;AAtBF;AA0BA;EAEE,aAAA;AAzBF;AAuBA;EAME,kBAAA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;AA1BF;AAiBA;EAYG,kBAAA;EACA,WAAA;EACA,YAAA;AA1BH;AAgCA;EACC,kBAAA;AA9BD;AAiCA;;EAEC,YAAA;EACA,aAAA;EACA,gBAAA;AA/BD;AAkCA;EACC,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,gDAAA;EACA,kBAAA;EACA,4BAAA;AAhCD;AAmCA;;EAGE,sBAAA;AAlCF;AA+BA;;EAOE,gBAAA;EACA,eAAA;EACA,kBAAA;AAlCF;AAyBA;;EAaE,mBAAA;AAlCF;AAqBA;;EAiBE,UAAA;EACA,iBAAA;EACA,sBAAA;EACA,gBAAA;EACA,eAAA;AAlCF;AAaA;;EAyBE,eAAA;EACA,sBAAA;AAlCF;AAQA;;EA8BE,iBAAA;EACA,eAAA;AAlCF;AAGA;;EAmCE,eAAA;AAlCF;AADA;;EAuCE,eAAA;EACA,qBAAA;AAlCF;AANA;;EA4CE,eAAA;AAlCF;AAqCA;;EAGE,WAAA;EACA,cAAA;EACA,0BAAA;AApCF;AA+BA;EASE,WAAA;EACA,0BAAA;AArCF;AAyCA;EAvCE,+EAA+E;EAyChF,kCAAA;EACA,YAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;EAvCC,sCAAsC;EAyCvC,mCAAA;EACA,kCAAA;AAvCD;AA0CA;EACC,gBAAA;EACA,wBAAA;AAxCD;AA2CA;EACC,gBAAA;EACA,wBAAA;AAzCD;AA4CA;EACC,gBAAA;EACA,wBAAA;AA1CD;AA4CA;EACC,gBAAA;EACA,0BAAA;AA1CD",sourcesContent:['// out: false\n// Mark 星星样式\n@font-face {\n\tfont-family: "iconfont";\n\t/* Project id 4017216 */\n\tsrc: url("//cdn.vstar.app/static/css/fonts/iconfont.woff2?t=169")\n\t\t\tformat("woff2"),\n\t\turl("//cdn.vstar.app/static/css/fonts/iconfont.woff?t=1681525258204")\n\t\t\tformat("woff"),\n\t\turl("//cdn.vstar.app/static/css/fonts/iconfont.ttf?t=1681525258204")\n\t\t\tformat("truetype");\n}\n\n.vstar-star {\n\tfont-size: 0 !important;\n\n\t&.right {\n\t\ttext-align: right;\n\t}\n\n\t&.center {\n\t\ttext-align: center;\n\t}\n\n\t& > * {\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t}\n\n\t.star-item {\n\t\tmargin-right: 2px;\n\t\tfont-size: 0;\n\t\tline-height: normal;\n\t}\n\n\t.star-item.half-star {\n\t\tposition: relative;\n\t}\n\n\t.item-star,\n\t.item-nostar {\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n\n\t.item-star {\n\t\toverflow: hidden;\n\t}\n\n\ti.trustoo-icon-star,\n\ti.trustoo-icon-nostar {\n\t\tdisplay: inline;\n\t}\n}\n\n.collection-icon-list {\n\tmargin: 5px 0;\n\n\t// .star-item {\n\t// margin: 0;\n\t// margin-right: 2px;\n\t// line-height: 0px !important;\n\t// }\n\n\t.collection-reviews-num {\n\t\tmargin: 1px 6px 0 3px;\n\t\tfont-size: 13px;\n\t\tline-height: normal;\n\t\tcolor: #888;\n\t\topacity: 0.8;\n\t}\n}\n\n#vstar-reviews {\n\t#reviews-head {\n\t\tdisplay: flex;\n\t}\n\n\t.head-sort {\n\t\tposition: absolute;\n\t\twidth: 40px;\n\t\theight: 40px;\n\t\tbox-sizing: border-box;\n\n\t\t.sort-content {\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t}\n}\n\n// Mark 瀑布流样式\n#vstar-reviews #reviews-body {\n\tposition: relative;\n}\n\n#vstar-reviews .list-review .img-item,\n#vstar-reviews .list-review .resource-item {\n\twidth: 100px;\n\theight: 100px;\n\toverflow: hidden;\n}\n\n#vstar-reviews .grid-review {\n\tposition: absolute;\n\tdisplay: inline-block;\n\tpadding-bottom: 16px;\n\tvertical-align: top;\n\tbox-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.12);\n\tborder-radius: 8px;\n\tanimation: recover 1s linear;\n}\n\n#vstar-reviews .grid-review,\n#trustoo-review-detail .review-info {\n\tsvg {\n\t\tvertical-align: middle;\n\t}\n\n\t.grid-review-head {\n\t\tmargin-top: 16px;\n\t\tpadding: 0 16px;\n\t\tposition: relative;\n\t}\n\n\t.user-message {\n\t\tmargin: 12px 0 12px;\n\t}\n\n\t.user-name {\n\t\tpadding: 0;\n\t\tmargin-right: 6px;\n\t\tvertical-align: middle;\n\t\tfont-weight: 700;\n\t\tfont-size: 14px;\n\t}\n\n\t.country-name {\n\t\tfont-size: 16px;\n\t\tvertical-align: middle;\n\t}\n\n\t.reviews-date {\n\t\tline-height: 22px;\n\t\tfont-size: 12px;\n\t}\n\n\t.grid-review-body {\n\t\tpadding: 0 16px;\n\t}\n\n\t.reviews-text {\n\t\tfont-size: 14px;\n\t\tword-wrap: break-word;\n\t}\n\n\t.display-text {\n\t\tfont-size: 14px;\n\t}\n}\n#vstar-reviews .grid-review {\n\t.img-item,\n\t.resource-item {\n\t\twidth: 100%;\n\t\tdisplay: block;\n\t\tborder-radius: 8px 8px 0 0;\n\t}\n\n\timg {\n\t\twidth: 100%;\n\t\tborder-radius: 8px 8px 0 0;\n\t}\n}\n\n[class^="trustoo-icon-"] {\n\t/* use !important to prevent issues with browser extensions that change fonts */\n\tfont-family: "iconfont" !important;\n\tspeak: never;\n\tfont-style: normal;\n\tfont-weight: normal;\n\tfont-variant: normal;\n\ttext-transform: none;\n\tline-height: 1;\n\tfont-size: 14px;\n\t/* Better Font Rendering =========== */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\n.trustoo-icon-helpful:before {\n\tcontent: "\\e605";\n\tcolor: var(--font-color);\n}\n\n.trustoo-icon-unhelpful:before {\n\tcontent: "\\e606";\n\tcolor: var(--font-color);\n}\n\n.trustoo-icon-star:before {\n\tcontent: "\\e602";\n\tcolor: var(--star-color);\n}\n.trustoo-icon-nostar:before {\n\tcontent: "\\e602";\n\tcolor: var(--nostar-color);\n}\n'],sourceRoot:""}]);const a=r},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",s=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),s&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),s&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,s,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(s)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},537:e=>{e.exports=function(e){var t=e[1],i=e[3];if(!i)return t;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),o="/*# ".concat(n," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},379:e=>{var t=[];function i(e){for(var i=-1,s=0;s{var t={};e.exports=function(e,i){var s=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(i)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},575:e=>{e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},795:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var s="";i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,n&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(s,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},337:(e,t,i)=>{i.d(t,{E:()=>a});var s=i(642),n=i(957),o=i(247);function r(e,t,i,n=!1,r=!1){return new Promise(((a,l)=>{!function(e,t={},i="GET",n,r=!1,a,l){let d=new XMLHttpRequest;var c=`https://${Review.baseUrl}/api/v1/`;let p="";p=r?e:a?s.Z.uploadImgInfo.host:c+e;let u="";if("object"!=typeof t||a||(u=Object.keys(t).reduce(((e,i)=>e+"&"+i+"="+t[i]),"")),"POST"==i?u=u&&!a?u.slice(1):t:"GET"==i&&u&&(u=u.replace("&","?"),p+=u),d.open(i,p,!0),"undefined"!=typeof md5&&!a&&!r){const e=(0,o.getSign)(s.Z),t=e.t,i=e.v;d.setRequestHeader("sign",i),d.setRequestHeader("timestamp",t)}u&&"POST"==i?d.send(u):d.send(),d.onreadystatechange=()=>{if(4==d.readyState){let e=d.responseText;200==d.status||203==d.status?n&&n(e):l&&l({responseText:e,statusText:d.statusText})}}}(e,t,i,a,n,r,l)})).then((e=>{if(e=r?{name:t.get("name"),key:t.get("key")}:JSON.parse(e),!n&&!r){const t=e.code;if(-1===t)throw e;if(-2===t)throw e;e=e.data}return[null,e]})).catch((e=>{let i=[{error:e.message,params:t,code:e.code}];return r&&i.push(t.get("name")),i}))}const a={getUserSetting:()=>r("users/get_reviews_settings",{shop_id:Review.shop_id}),getInstallStatus:()=>r("reviews/get_shop_install_status",{shop_id:Review.shop_id}),getUserNeed:()=>r("reviews/get_custom_info",{shop_id:Review.shop_id}),getLang:()=>r("reviews/get_customer_self_define_lang",{shop_id:Review.shop_id,lang:Review.lang}),getProductRating(e){let t={shop_id:Review.shop_id},i=s.Z.productId;return i?t.product_id=i:e&&(t.product_handle=e),r("reviews/get_product_rating",t)},getCollRating(e,t){let i={shop_id:Review.shop_id};return e?i.product_handle=e:i.product_id=t,r("reviews/get_products_rating",i)},getProRevList(e,t,i,o,a,l,d){i||0===i||(i=(0,n.l)()),o||(o=s.Z.layoutReviewCount);let c={shop_id:Review.shop_id,limit:o};return i&&(c.page=i),s.Z.isMixReview||s.Z.isWdoRevOpen?c.is_show_all=1:c.product_id=s.Z.productId,0!==t&&(c.rating_filter=t),a&&(c.is_buyers_show=a),l&&(c.has_resource=1),d&&(c.review_id=d),c.sort_by=e,1!==s.Z.userSetting.is_translate_review&&1!==s.Z.userSetting.auto_switch_language||(c.lang=Review.lang),c.t=s.Z.revReqParam,r("reviews/get_product_reviews",c)},getProductInfo(e){let t={shop_id:Review.shop_id};return e?t.product_title=e:t.product_id=s.Z.productId,r("products/get_shopify_product_info",t)},recordInfo:e=>r(location.origin+"/apps/trustoo-proxy/api/v1/reviews/collect",e,"GET",!0),getOnlyOneProduct:()=>r("products/get_product_only_one",{shop_id:Review.shop_id}),getWriteRevSetting:()=>r("reviews/get_write_review_setting",{shop_id:Review.shop_id}),getPolicyToken:()=>r("review/get_policy_token",{shop_id:Review.shop_id}),uploadImg(e){const t=s.Z.uploadImgInfo;let i=(0,o.get_suffix)(e.name),n=new FormData;return n.append("name",e.name),n.append("key",t.dir+i),n.append("policy",t.policy),n.append("OSSAccessKeyId",t.accessid),n.append("success_action_status","200"),n.append("callback",t.callback),n.append("signature",t.signature),n.append("file",e),72898347282===s.Z.shop_id&&(n=n.fd),r("",n,"POST",!1,!0)},getUploadVideoUrl:()=>r("reviews/get_upload_url",{shop_id:Review.shop_id}),uploadVideo(e,t){let i=new FormData;return i.append("file",t),r(e,i,"POST",!0)},uploadReview(e,t,i){const{shop_id:n}=s.Z,o=s.Z.ratingVal;return 1===t?e.resources=i.map((e=>({url:"https://img.vstar.app/"+e.url,resource_type:1}))):2===t&&(i[0].resource_type=2,e.resources=i),Object.assign(e,{product_id:s.Z.productId,shop_id:n,rating:o}),r("reviews/add",JSON.stringify(e),"POST",!1)},getInsList(){const{shop_id:e,insPageSize:t,insCurPage:i}=s.Z;return r("reviews/get_instagram_fee_list",{shop_id:e,limit:t,cur_page:i})},getInsSetting(){const{shop_id:e}=s.Z;return r("reviews/get_instagram_setting",{shop_id:e})},likeOrDislikeReview(e,t,i){let n="";1===e?n="reviews/like_review":2===e&&(n="reviews/dislike_review");const{shop_id:o}=s.Z;return r(n,JSON.stringify({shop_id:o,review_id:i,type:t}),"POST")},getBuyerShowsSettings(){const{shop_id:e}=s.Z;return r("reviews/get_buyers_show_settings",{shop_id:e})},sendErrorMsg(e,t){let i={shop_id:Review.shop_id,theme_id:s.Z.themeId,type:e,content:t};return r("reviews/warning_feedback",JSON.stringify(i),"POST")}};s.Z.getRevList=a.getProRevList},841:(e,t,i)=>{i.d(t,{Z:()=>s});const s={verified:e=>`\n \n `,close:e=>`\n \n \n `,star:(e=14,t="")=>`\n \n \n `,store:(e="#666666")=>`\n \n \n `,hook:()=>'\n \n ',prePage:e=>``,nextPage:e=>``,helpful:e=>`\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t`,unhelpful:e=>`\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t`,multiPhoto:()=>'\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t'}},247:(e,t,i)=>{function s(){return(new Date).getTime()}function n(e,t){return 2==t&&(t=1),"rgba("+parseInt("0x"+e.slice(1,3))+","+parseInt("0x"+e.slice(3,5))+","+parseInt("0x"+e.slice(5,7))+","+t+")"}function o(e,t="10%",i="50%"){var s=document.createElement("div");s.className="toast",s.style.cssText=`left:${i};top:${t}`,s.innerHTML=e,document.body.appendChild(s),setTimeout((()=>{document.querySelector(".toast").remove()}),1500)}function r(e,t=20){var i=document.createElement("div");i.className="loader",i.style.cssText=`display: inline-block;width:${t}px;height:${t}px`,e.appendChild(i)}function a(e,t,i){let s=new Image;s.src=e,s.onload=function(){let e=document.createElement("canvas"),n=e.getContext("2d"),o=s.width,r=s.height,a="";ol||r>d)&&(o/r>1?(c=l,p=Math.round(l*(r/o))):(p=d,c=Math.round(d*(o/r)))),e.width=c,e.height=p,n.drawImage(s,0,0,c,p),a=e.toDataURL("image/jpg",.8),t.style.backgroundImage=`url(${a})`,i(a)}}function l(){return window.innerWidth}function d(e,t){const i=[...e];if(i.length<=t){const e=i.map((e=>{var t=p(e);return t.id=e,t}));return Promise.all(e)}const s=i.splice(0,t).map((e=>{var t=p(e);return t.url=e,t}));i.reduce(((e,t)=>e.then((()=>Promise.race(s))).then((e=>{let i=s.findIndex((t=>t.url==e));s.splice(i,1);var n=p(t);n.url=t,s.push(n)}))),Promise.resolve()).then((()=>Promise.all(s)))}function c(e){let t={},i=parseInt(Date.parse(new Date)/1e3);return t.v=md5("OLQ17a39ocWbAhhEq9E5RYZ08DEMACoZ"+e.shop_id+i),t.t=i,t}function p(e){return new Promise(((t,i)=>{var s=new Image;s.url=e,s.onerror=()=>{i()},s.onload=()=>{t(s)},s.src=e}))}function u(e){var t=null;return null!=window.createObjectURL?t=window.createObjectURL(e):null!=window.URL?t=window.URL.createObjectURL(e):null!=window.webkitURL&&(t=window.webkitURL.createObjectURL(e)),t}function v(e,t,i,s){s.observer=new MutationObserver(i),s.observer.observe(e,t)}function g(e,t="smooth"){e.scrollIntoView({behavior:t,block:"start"})}function m(){var e=navigator.userAgent,t=e.indexOf("Android")>-1||e.indexOf("Adr")>-1,i=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return t?"android":i?"ios":void 0}function h(e,t){let i;return i=t?t.querySelector(e):document.querySelector(e),i}function w(e,t){let i;return i=t?t.querySelectorAll(e):document.querySelectorAll(e),i}function f(){let e=navigator.userAgent,t=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),s=/(?:iPad|PlayBook)/.test(e)||t&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),n=/(?:iPhone)/.test(e)&&!s;return t||n}function _(e,t){var i=null;return function(...s){i&&clearTimeout(i),i=setTimeout((()=>{e(...s)}),t)}}function y(e){var t=document.createRange();window.getSelection().removeAllRanges(),t.selectNode(e),window.getSelection().addRange(t),document.execCommand("copy")&&o("Copy successfully"),window.getSelection().removeAllRanges()}function b(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}function A(e,t,i){if("set"!==e)return JSON.parse(sessionStorage.getItem(t));sessionStorage.setItem(t,JSON.stringify(i))}function Z(e,t,i){if("set"!==e)return JSON.parse(localStorage.getItem(t));localStorage.setItem(t,JSON.stringify(i))}function $(e){fetch("https://www.cloudflare.com/cdn-cgi/trace").then((e=>e.text())).then((t=>{t=t.split("\n"),e.ip=t[2].split("=")[1],e.loc=t[9].split("=")[1]}))}function x(e){let t=e.lastIndexOf("."),i="";return-1!=t&&(i=e.substring(t)),function(e){e=e||32;for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",i=t.length,s="",n=0;nh,$dqsa:()=>w,dealImage:()=>a,debounce:()=>_,getMobileSystem:()=>m,getObjectURL:()=>u,getSign:()=>c,getTimeStamp:()=>s,getWindowWidth:()=>l,get_suffix:()=>x,gsLocal:()=>Z,gsSession:()=>A,hexToRgba:()=>n,imgLoad:()=>p,imgLoadLimit:()=>d,isMobile:()=>f,isWebPSupported:()=>C,returnCitySN:()=>$,scrollTo:()=>g,setCopy:()=>y,setDelay:()=>b,setLoading:()=>r,setObserve:()=>v,setToast:()=>o})},642:(e,t,i)=>{i.d(t,{Z:()=>s});const s={wrapWid:0,isNullRev:!1,proTarget:null,collTarget:[],themeStyle:"",ip:"",isFirstExecute:!1,isCollPage:!1,isProPage:!1,isHomePage:!1,isCartPage:!1,isSettingUpdate:!1,isProRatingUpdate:!1,isReviewsUpdate:!1,isWebPSupported:!0,revIdBase:"vstar-",isRecordPV:!1,isRecordCart:!1,cartWatcher:null,RevIntersection:null,isCollOpen:!1,isProOpen:!1,isRevOpen:!1,isFirstPageRender:!0,buyersShowType:2,isMixReview:!1,page:0,isWdoRevFirstPageRendered:!1,reviewsList:[],pageRecord:[],reviewsBody:null,reviewsDom:null,revReqParam:"",productHandle:"",userSetting:{},layoutClass:"",layoutReviewCount:0,reviewsWidth:0,reviewsRow:5,uploadedCount:0,uploadedIndex:0,gridCardWidth:0,wdoGridCardWidth:0,listDisIndex:0,listNodeCount:0,viewer:null,origImg:[],thumbImg:[],likeRevLock:!1,lang:{},column:0,minHeight:0,reviews:{columnHighs:[],preColHighs:[],cardWid:0,cardCount:0,ratingFilter:0},bsInsertSelector:null,isInsertRev:!1,isCssLoaded:!1,globalStyle:null,reqErr:null,isProHasHalfStar:!1,pageCount:0,ratingData:{},allRatingData:{},searchACount:6,collTarInx:0,isOtherTheme:!1,isCollFinished:!1,observer:null,iObserver:null,curCollArr:[],isHomeRatingOpen:!1,allRevLoadLock:!1,mediaUrl:[],isSendLock:!1,ratingVal:5,uploadImgInfo:{},uploadType:1,wdoRev:{columnHighs:[],preColHighs:[],cardWid:0,cardCount:0,ratingFilter:0},isActWdoRev:!1,isWdoRevOpen:!1,isWdoRevExist:!1,wdoRevDom:!1,wdoRevBody:null,isLinkReqRev:!1,hasPyRating:!1,revDetailInfo:{page:0,no:0,imageIndex:0}}},597:(e,t,i)=>{i.d(t,{$$:()=>g,AB:()=>u,l4:()=>m,vW:()=>h});var s=i(337),n=i(642),o=i(732);const{$dqs:r,debounce:a,setObserve:l,$dqsa:d}=i(247),{setInsertTarget:c,starEmbeddedAdaptation:p}=i(894);function u(){const e=n.Z.curCollArr;let t=[],i='a[href*="/products/"]';if(-1===e.findIndex((e=>"A"!==e.tagName)))return e;if(-1===e.findIndex((e=>null===r(i,e))))return e.map((e=>r(i,e)));let s,o=e[0];for(let n=0;n{n.Z.observer.disconnect(),g();let{collTarget:e}=Review;const t=Array.from(e).map((e=>e.textContent.replace(/\n/g,"").trim())).join();h(),e=Review.collTarget;const i=Array.from(e).map((e=>e.textContent.replace(/\n/g,"").trim())).join(),s=d(".collection-icon-list").length;(0!==s&&s===e.length||0===s&&2===n.Z.userSetting.is_show_stars_without_review)&&t===i?g():(Review.observeCount++,c(2),Review.collectionTarget=e)}),400);function g(){let e=r("main");!e&&(e=document.body),l(e,{childList:!0,subtree:!0},(function(){v()}),n.Z)}function m(e){let t="";if(e.length){let i="A",s=[];for(let t=0;tp");break;case 730:e=d(".grid-product__title");break;case 775:e=d(".product-card__name");break;case 766:e=d(".product-item__title");break;case 887:case 1356:case 1363:case 1368:case 1567:e=d(".h5>.full-unstyled-link"),0===e.length&&(e=d(".card-information__text")),c=!1;break;case 829:e=d(".card__name,.spf-product-card__title");break;case 578:e=d(".product__title a");break;case 796:e=d(".product-card__title");break;case 380:var u=d(".grid-link__container .grid__item");e=[],u.forEach((t=>{e.push(t.querySelector(".grid-link__title"))}));break;case 885:if(a=!0,e=d(".product-card__title-wrapper"),i){let e=r(".shopify-section .product");e&&(wrapWid=e.offsetWidth)}break;default:if(Review.theme&&"warehouse"===Review.theme.name){const e=r(".product-item__price-list.price-list");e&&"-15px"===getComputedStyle(e).marginTop&&(n.Z.globalStyle.textContent+="div.collection-icon-list.vstar-star {\n margin-bottom: 20px;\n }")}a=!0,e=w()}if(a||0===e.length&&c&&(e=w()),n.Z.isCollPage&&0===e.length&&r('a[href*="/products"]')&&await s.E.sendErrorMsg(2,`集合页评价嵌入失败,店铺地址为:${window.location.href}`).then((t=>{if(t[1]){const i=p(4,t[1].selector);i&&(e=d(i))}})),0!==e.length&&(e=Array.from(e),i)){const t=Review.proTarget;t&&(e=e.filter((e=>e!==t&&!t.contains(e))))}Review.collTarget=e}function w(){let e=[];const{isCollPage:t,isProPage:i,isHomePage:s,hasPyRating:r}=n.Z;if(t||i||s||o.Z.otherPageColl||r){let t;return o.Z.customCollTarSel&&(t=o.Z.customCollTarSel,e=d(o.Z.customCollTarSel)),0===e.length&&(t=".product-details>span.title,.apb_product_list_product_item_title,.grid_title,.collection__grid-item__details,\n .popup_cart_title>a,h3.product-title,a.ga-product_title,h4.title-product,.grid-item .inner-top>.product-bottom>a.product-title,\n .product__grid__title,.pt-title.prod-thumb-title-color,.product-item-meta__title,.product-grid-item__title,.product-item-title",e=d(t),Review.collType="type1"),0===e.length&&(t=".product-bottom>.product-title,.product-details>.product-title,.product-item__details a,.info .title,.product-name>a,\n .collectionBlock__title>a,.product-grid-item>p,.innerer>.title,.grid__product-content>a,.ht-product-title>a,.h5>.full-unstyled-link,\n .product .card-title,.list_prod .title-product,.product.slick-slide .card-title,.product-title-price,.prd-title,.product-info>h3.title14,\n .list-view-item__title-column>a,.gt_product-name>h2,.block.text-base,.tt-description>h2.tt-title,.desc>h5,.product-item__title",e=d(t),Review.collType="type2"),0===e.length&&(t=".ftr,.product-grid-desc>h3,.gt_product-name,p.list-product__title,.product--details-container,.product--item-title,.h4.grid-view-item__title,\n .product-grid-item__product-name,h3.card__name.h4,.grid-crop-title,.title-wrap,h3>span.overflowed,.product-grid--title>a,a.gf_product-title,.bls__product-details a,\n a>.indiv-product-title-text,h2.product_name,.sf__pcard-content .max-w-full,h2.product-card__title,.proName>a,a.item__name.pg__sync-url,.spf-product-card__title",e=d(t),Review.collType="type3"),0===e.length&&(t=".grid-product__title,.product-block__title,\n .grid-view-item__title,.product-card__name,.ProductItem__Title,.product-info>a>h2,\n .card-information__text,span.indiv-product-title-text,.card__title:not(.heading),h4.product_name,\n .productitem--title,.grid-link__title,.boost-pfs-filter-product-item-title,.product-collection__title,\n .col_product_text_color,.js-product-details-link,.t4s-product-title,.ws-card__title,.product-thumbnail__info>.product-thumbnail__header",e=d(t),Review.collType="type4"),0===e.length&&(t='.card__heading[id^="title-template"],.lh-product-title',e=d(t),Review.collType="type5"),Review.coll_dqsa="$dqsa(`"+t+"`)",e}}},402:(e,t,i)=>{i.d(t,{f:()=>s});class s{init(){return this.emitCartChanges().then((()=>{this.observeCartChanges()}))}async fetchCart(){return(await fetch("/cart.js")).json()}storeCartToken(e){sessionStorage.setItem("ttCartToken",e)}storedCartToken(){return sessionStorage.getItem("ttCartToken")||""}async emitCartChanges(){const e=await this.fetchCart(),t=new CustomEvent("cart_changed",{detail:{token:e.token}});window.dispatchEvent(t),this.storeCartToken(e.token)}observeCartChanges(){new PerformanceObserver((e=>{e.getEntries().forEach((e=>{const t=["xmlhttprequest","fetch"].includes(e.initiatorType),i=/\/cart\//.test(e.name);t&&i&&this.emitCartChanges()}))})).observe({entryTypes:["resource"]})}}},894:(e,t,i)=>{i.r(t),i.d(t,{getHomeProTitle:()=>H,getTotalRating:()=>P,getTotalStarString:()=>B,insertReviewControl:()=>M,processRecordedData:()=>O,setInsertTarget:()=>E,starEmbeddedAdaptation:()=>N});var s=i(337),n=i(642),o=i(247);let r=null,a=null,l=0;const d=(0,o.debounce)(m,500);async function c(e,t){const{mediaUrl:i,isMobile:d}=n.Z;let c=!1,u=(0,o.$dqsa)(".uploaded-item").length,v=(0,o.$dqs)(".tt-uploader"),g=e.length,h="";if("image"===t&&!Object.keys(n.Z.uploadImgInfo).length){const e=await s.E.getPolicyToken();n.Z.uploadImgInfo=e[1]}e.length+u>=5&&(g=5-u,r.style.display="none");for(let r=0;re.style.display="none")),u=(0,o.getObjectURL)(g),h=g.name,s.E.uploadImg(g).then((e=>{let t=e[1].name;null===e[0]?((0,o.$dqs)(`.uploaded-item[name="${t}"]>.loader`).remove(),0===(0,o.$dqsa)(".uploaded-item>.loader").length&&m(),i.push({name:t,url:e[1].key})):(n.Z.uploadedCount--,(0,o.$dqs)(`.uploaded-item[name="${t}"]`).remove(),(0,o.$dqs)(".images-num").innerHTML=`${n.Z.uploadedCount}/5`,(0,o.setToast)("Failed to upload image"),(0,o.$dqs)(".tt-uploader").style.display="flex")})),l=1):"video"===t&&(l=2,(0,o.$dqsa)(".upload-area>div",a).forEach((e=>e.style.display="none")),s.E.getUploadVideoUrl().then((e=>{const{upload_url:t,domain:i}=e[1],r=e[1].video_service_uid;s.E.uploadVideo(t,g).then((()=>{const e=i+"/"+r,t=e+"/thumbnails/thumbnail.jpg";n.Z.mediaUrl[0]={url:e+"/iframe"},(0,o.$dqs)(".uploaded-item",a).style.backgroundImage=`url(${t})`,w((0,o.$dqs)(".uploaded-item",a),t,(()=>{const e=(0,o.$dqs)(".uploaded-item",a);e.classList.remove("uploading"),(0,o.$dqs)(".loader",e).remove(),m()}))})).catch((()=>{p()}))})).catch((()=>{p()}))),n.Z.uploadedCount++;let f=document.createElement("div");if(f.className="uploaded-item","image"===t?(h&&f.setAttribute("name",h),(0,o.$dqs)(".tt-image-uploader .images-num").innerHTML=`${n.Z.uploadedCount}/5`,w(f,u)):"video"===t&&f.classList.add("uploading"),f.innerHTML='\n ',v.before(f),(0,o.setLoading)(f,24),c||(c=!0,m()),d){let e=document.createElement("div");e.className="image-delete tt-mobile_delete_image",f.appendChild(e),e.onclick=function(){let e=this.parentNode.getAttribute("name"),t=i.findIndex((t=>t.name===e));i.splice(t,1),this.parentNode.remove(),n.Z.uploadedCount--,4==n.Z.uploadedCount&&((0,o.$dqs)(".tt-uploader").style.display="flex"),(0,o.$dqs)(".images-num").innerHTML=`${n.Z.uploadedCount}/5`}}else f.onmouseover=function(){(0,o.$dqs)(".loader",this)||((0,o.$dqs)(".hover-image",this).style.display="block")},f.onmouseleave=function(){(0,o.$dqs)(".hover-image",this).style.display="none"},(0,o.$dqs)(".hover-image",f).onclick=function(){let e=this.parentNode.getAttribute("name"),s=i.findIndex((t=>t.name===e));i.splice(s,1),this.parentNode.remove(),n.Z.uploadedCount--,0===n.Z.uploadedCount?(0,o.$dqsa)(".upload-area>div",a).forEach((e=>e.style.display="flex")):n.Z.uploadedCount>0&&"image"===t&&((0,o.$dqs)(".tt-image-uploader").style.display="flex"),(0,o.$dqs)(".images-num").innerHTML=`${n.Z.uploadedCount}/5`}}}function p(){n.Z.uploadedCount=0,(0,o.$dqs)(".uploaded-item",a).remove(),(0,o.$dqsa)(".upload-area>div",a).forEach((e=>e.style.display="flex")),(0,o.setToast)(n.Z.lang.error_tip),videoUploader.value=""}function u(){const{lang:e}=n.Z;let t=(0,o.$dqs)(".form-submit");t.innerHTML=`${e.submit}`,t.removeAttribute("disabled")}function v(){Object.assign(n.Z,{uploadedCount:0,uploadedIndex:0,mediaUrl:[]}),(0,o.$dqsa)(".user-input",a).forEach((e=>e.value="")),(0,o.$dqsa)(".error-tip",a).forEach((e=>e.innerHTML=""));let e=(0,o.$dqsa)(".error-border",a);e.length&&e.forEach((e=>e.classList.remove("error-border"))),(0,o.$dqsa)(".uploaded-item",a).forEach((e=>e.remove())),(0,o.$dqs)(".tt-image-uploader .images-num",a).innerText="0/5",2===l&&((0,o.$dqs)(".tt-video-uploader .images-num",a).innerText="0/1"),(0,o.$dqsa)(".tt-uploader,.upload-or",a).forEach((e=>e.style.display="flex"));const t=(0,o.$dqs)(".feedback-count>span",a);t&&(t.textContent="0/2000"),(0,o.$dqs)(".form-submit",a).setAttribute("disabled",!0),n.Z.ratingVal=5,g(5)}function g(e){let t=(0,o.$dqsa)("#trustoo-allinone .star-item"),i=e||n.Z.ratingVal;for(let e=0;e{e.value||"none"===e.parentNode.style.display||(s=!1)}));let n=0===(0,o.$dqsa)(".uploaded-item>.loader",e).length;s&&n&&0==(0,o.$dqsa)(".input-tip",e).length?i.removeAttribute("disabled"):i.setAttribute("disabled",!0)}function h(){(0,o.$dqs)("#trustoo-mask").style.display="none",(0,o.$dqs)("#trustoo-allinone").style.display="none",(0,o.$dqs)("#success-window").style.display="none",document.body.classList.remove("trustoo-open")}function w(e,t,i){(0,o.imgLoad)(t).then((s=>{i&&i(),s.width>=s.height?e.style.backgroundSize="100% auto":e.style.backgroundSize="auto 100%",e.style.backgroundImage=`url(${t})`})).catch((()=>{i&&(i(),e.style.backgroundImage="url(../../images/video_default.png)")}))}var f=i(693),_=i(597),y=i(755),b=i(732),A=i(231),Z=i(841);let $=0,x=588,C=!1,R="",q="";function k(){(0,o.$dqs)("#trustoo-mask").style.display="none",(0,o.$dqs)("#trustoo-slide").style.display="none";const e=(0,o.$dqs)("#trustoo-mask>.trustoo-power");e&&(e.style.display="none"),document.body.classList.remove("trustoo-open")}function S(){const e=(0,o.$dqs)(`.write-review-slide[index="${$}"]`);L(e,e.nextElementSibling),$++,(0,o.$dqs)(".write-review-container").style.left=(parseInt(e.getAttribute("index"))+1)*-x+"px"}function L(e,t){e.classList.remove("active"),t.classList.add("active")}var T=i(402);async function E(e){let t,i;if(1==e){if(!(0,o.$dqs)("#seal-star-rating-widget")){if(await(0,y.pL)(),!Review.proTarget)return;n.Z.globalStyle.textContent+=`\n\t\t\t.product-icon-list>.tt-rating-text{\n color: ${window.getComputedStyle(Review.proTarget).color} !important;\n }`,I()}}else if(2==e){if(0===Review.collTarget.length)return;if(n.Z.curCollArr=Review.collTarget.filter((e=>{if(!e.getAttribute("is-vstar-inserted"))return!0})),n.Z.curCollArr.length>50?(n.Z.isCollFinished=!1,n.Z.curCollArr=n.Z.curCollArr.slice(0,50)):n.Z.isCollFinished=!0,n.Z.hasPyRating||n.Z.hasEcomRt)i=n.Z.curCollArr.map((e=>e.getAttribute("product-id"))).join(",");else{let e=(0,_.AB)();t=(0,_.l4)(e)}}if(1!==e&&(t||i)){let[e,r]=await s.E.getCollRating(t,i);null===e&&async function(e){const t=n.Z.curCollArr,{userSetting:i,isProPage:s,hasPyRating:r,hasEcomRt:a}=n.Z,{isCollRevWord:l}=b.Z;var d="";const c=t.length;if(c){let u=0,v="afterEnd";(r||a)&&(v="afterbegin"),55363502159===n.Z.shop_id&&e.forEach((e=>e.total_reviews+=100));for(var p=0;p\n ${d}
${t}
`;a.insertAdjacentHTML(v,o)}}if((r||a)&&s){const e=shopifyObj.productId,t=(0,o.$dqsa)(`.custom-vstar-rating-widget[product-id="${e}"]`);0!==t.length&&n.Z.reviewsDom&&t.forEach((e=>{e.style.cursor="pointer",e.onclick=()=>(0,o.scrollTo)(n.Z.reviewsDom)}))}s&&!r||(n.Z.isCollFinished?("undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(n.Z,b.Z),setTimeout((()=>{(0,_.$$)()}),1e3)):E(2))}}(r)}}function I(){let{proTarget:e}=Review;const{ratingData:t,userSetting:i,lang:s,shop_id:r}=n.Z,{isShowRevClick:a}=b.Z;if(!(0,o.$dqs)(".product-icon-list",e.parentNode))if(2===i.is_show_stars_without_review&&0==t.rating);else{let i="afterEnd",l="",d="",c=window.getComputedStyle(e).textAlign;65065648358===r?(e=Review.proTarget.nextElementSibling,(0,o.$dqs)("span",e).remove(),(0,o.$dqs)(".sold_product",e).style.marginBottom=0,i="afterbegin"):55363502159===r&&(t.total_reviews+=100);const p=(0,o.$dqs)(".pagefly-star-rating-sealapp,.custom-vstar-rating-widget"),u=window.getComputedStyle(e.parentNode);p?(e=p,i="afterbegin"):"flex"===u.display&&"column"!==u.flexDirection&&"wrap"!==u.flexWrap&&(e=e.parentNode),"center"===c?l="center":"right"===c&&(l="right"),n.Z.isCssLoaded?n.Z.isProHasHalfStar&&(d+="display:none;",setTimeout((()=>{(0,o.$dqs)(".product-icon-list.vstar-star").style.display="block"}),300)):d+="display:none;";let v=s.product_pages_reviews.replace(/{{review_number}}/g,t.total_reviews).replace(/{{review_rating}}/g,t.rating).trim();const g=v.indexOf("{{star}}");let m="",h="",w="";-1!==g?(0!==g&&(m=`
${v.slice(0,g)}
`),h=`
${v.slice(g+8)}
`,w=B(t.rating,18,3,!0)):h=`
${v}
`;const f=`
\n\t\t\t${m} ${w}${h}
`;e.insertAdjacentHTML(i,f),e.style.marginBottom=0,(0,o.$dqs)(".product-icon-list").onclick=function(e){const{reviewsDom:t,isGrid:i}=n.Z;a&&(t.classList.remove("pending"),i&&(0,A.SU)()),O("reviews_click"),e.target.classList.contains("product-icon-list")||((0,y.xL)(),t&&(0,o.scrollTo)(t))}}}async function P(e={}){let t,i;const{isProRatingOpen:r,isHomeRatingOpen:a,isMixReview:l,isWdoRevOpen:d,isHomePage:c,isProPage:p}=n.Z,{proTarget:u}=Review,v=(0,o.$dqs)("#seal-star-rating-widget");(!l&&!d||n.Z.productId)&&("undefined"==typeof vstar_product_rating||n.Z.isProRatingUpdate?([t,i]=await s.E.getProductRating(),null===t&&i&&(n.Z.ratingData=i)):n.Z.ratingData=i=vstar_product_rating),(r||a)&&(p&&setTimeout((()=>{(0,o.$dqs)('a[href*="/products/"],.product-recommendations')&&n.Z.isOpenRecStars&&((0,_.vW)(),0!==Review.collTarget.length&&E(2),setTimeout((()=>{(0,_.$$)()}),1e3))}),1e3),v||(c?u&&I():E(1))),await M(i,e),n.Z.isProPage&&((0,o.gsSession)("set","tt_pv_product_id",null),async function(){n.Z.cartWatcher=new T.f,n.Z.cartWatcher.changeCount=0,window.addEventListener("cart_changed",(e=>{n.Z.cartWatcher.changeCount++,n.Z.isRecordPV&&n.Z.cartWatcher.changeCount>1&&O("add_to_cart",e.detail.token,!0)})),await n.Z.cartWatcher.init(),n.Z.reviewsDom&&!n.Z.isNullRev&&(0,f.UF)()}())}async function M(e,t){const{isMixReview:i,isNoNullReview:p,isActWdoRev:m,isWdoRevOpen:w}=n.Z;let _=!1;if((0,o.$dqs)("#seal-review-widget,.custom-vstar-review-widget")&&(_=!0),n.Z.isRevOpen||_){const _=(0,o.$dqsa)("#reviews-wrapper,#noreviews-wrapper");if(0!==_.length&&_.forEach((e=>e.remove())),e&&0!=e.rating||i||m&&w)n.Z.isInsertRev=!0,(0,f.Jh)(t);else{if(p||2===n.Z.userSetting.review_empty_status_display)return;(0,f.km)(t.tarNode),"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(n.Z,b.Z)}if(!(0,o.$dqs)(".mask.review-mask")){const e=await async function(){let e={show_email:1,require_email:1,show_phone:2,require_phone:2,show_feedback:1,require_feedback:1,review_button_background_color:"#000000",review_button_text_color:"#FFFFFF",thanks_button_background_color:"#000000",thanks_button_text_color:"#FFFFFF"};if("undefined"==typeof vstar_write_review_settings||n.Z.isSettingUpdate){const t=await s.E.getWriteRevSetting();null===t[0]&&(e=t[1])}else e=vstar_write_review_settings;return e}(),t=e.write_review_form;1===t?(async function(e){let t="",i="";const{lang:p,productImages:m,productName:w,isNoUploadImg:f}=n.Z;let _=1===n.Z.userSetting.is_del_powered,y="";"rtl"===getComputedStyle(document.body).direction&&(y=" trustoo-rtl"),n.Z.globalStyle.textContent+=`\n #trustoo-allinone .form-submit{background-color: ${e.review_button_background_color} !important;color:${e.review_button_text_color} !important}\n #trustoo-allinone .form-submit[disabled]{background-color:${(0,o.hexToRgba)(e.review_button_background_color,.3)} !important}\n #success-window button{background-color: ${e.thanks_button_background_color} !important;color:${e.thanks_button_text_color} !important; }\n `;const b=function(e,t){let i,s=`\n
\n \n
\n
`;return 1===e.show_email&&(i=1===e.require_email?"require":"",s+=`
`),1===e.show_phone&&(i=1===e.require_phone?"require":"",s+=`
\n \n
`),1===e.show_feedback&&(i=1===e.require_feedback?"require":"",s+=`
`),s}(e,p);t='
\n
';const A=e.discount_setting;if(1==A.discount_for_photo_reviews&&(1===A.discount_for_reviews_form||2===A.discount_for_reviews_form&&"undefined"!=typeof isEmailWrite)){const e=n.Z.lang.all_in_one_from.discount_setting;for(let t in e)e[t]=e[t].replace("{{Discount_amount}}",A.discount_value);let t="";1===A.discount_incentive_conditions?t=e.tip_3:2===A.discount_incentive_conditions&&(t=e.tip_1),i=`
${t}
`}let Z=`\n
\n
\n
\n ${p.all_in_one_from.write_reviews}\n
`,$="";m&&($=`
`);let x=`
\n ${B(5)} \n
`,C=1===e.enabled_add_video?` \n
${p.all_in_one_from.or}
\n
\n \n \n ${p.all_in_one_from.add_video}\n 0/1\n
\n `:"",R="";_||(R='
Powered by Trustoo.io
');let q=`
\n
${Z+`
${$}
${x}
`+`
\n ${b}\n
\n
\n \n \n ${p.add_photo}\n 0/5\n
\n ${C}\n
\n\t\t${i}\n \n
`+R}
`;if((0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeEnd",q),a=(0,o.$dqs)("#trustoo-allinone"),a=(0,o.$dqs)("#trustoo-allinone"),r=(0,o.$dqs)(".tt-image-uploader",a),1===e.show_feedback&&((0,o.$dqs)("textarea",a).style.fontFamily=window.getComputedStyle((0,o.$dqs)("input",a)).fontFamily),w){let e=(0,o.$dqs)(".product-right");w.length>100?e.innerHTML=w.substring(0,100)+"...":e.innerHTML=w}!function(e){e.addEventListener("touchmove",(e=>{e.stopPropagation()}),!1),(0,o.$dqs)(".window-close",e).onclick=function(){v(),h()},n.Z.productImages&&(0,o.imgLoad)(n.Z.productImages).then((t=>{const i=t.width,s=t.height;(0,o.$dqs)(".product-image",e).style.backgroundSize=i>=s?"auto 100%":"100% auto"}));let t=(0,o.$dqsa)(".star-item",e);g(n.Z.ratingVal);for(let e=1;e<=t.length;e++)t[e-1].index=e,t[e-1].onmouseover=function(){g(this.index)},t[e-1].onmouseout=function(){g(0)},t[e-1].onclick=function(){n.Z.ratingVal=this.index};let i=(0,o.$dqsa)(".user-input",e);const a=n.Z.lang,p=n.Z.isMobile;if(p){let t=(0,o.getMobileSystem)(),i=window.getComputedStyle(e).getPropertyValue("height"),s=function(){"android"==t&&((0,o.$dqs)("#trustoo-allinone").style.overflow="hidden");let s=setInterval((()=>{window.getComputedStyle(e).getPropertyValue("height")!=i&&("android"==t&&((0,o.$dqs)("#trustoo-allinone").style.overflow="scroll",(0,o.$dqs)("#trustoo-allinone").scrollTop=230),clearInterval(s))}),200)};(0,o.$dqsa)("#trustoo-allinone .user-input").forEach((e=>e.addEventListener("click",s))),(0,o.$dqsa)("#trustoo-allinone .user-input").forEach((e=>e.addEventListener("focus",s)))}i.forEach((e=>{e.onblur=function(){let e=this.parentNode.nextElementSibling;""==this.value&&this.classList.contains("require")&&(e.innerHTML=`
${a.required}\n
`,e.classList.add("display"),this.classList.add("error-border"))},e.addEventListener("input",(function(){const e=this.parentNode.nextElementSibling;var t;e.innerHTML="",e.classList.remove("display"),this.classList.remove("error-border"),this.parentNode.classList.contains("email-area")?!/^[a-zA-Z0-9_-]+(\.[A-Za-z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(this.value)&&this.value?(e.innerHTML=`
${a.email_error}\n
`,e.classList.add("display"),this.classList.add("error-border")):this.value||(e.innerHTML="",e.classList.remove("display"),this.classList.remove("error-border")):this.classList.contains("big-input")&&!p&&function(){let e=(0,o.$dqs)(".big-input"),t=e.value.length;t>=2e3&&(e.value=e.value.substr(0,2e3),t=2e3),(0,o.$dqs)("#trustoo-allinone .feedback-count>span").textContent=`${t}/2000`}(),this.classList.contains("small-input")&&(t=this).value.length>=120&&(t.value=t.value.substr(0,120)),d()}))})),(0,o.$dqs)("input",r).onchange=function(){c(this.files,"image").then((()=>this.value="")).catch((()=>{}))};const m=(0,o.$dqs)(".tt-video-uploader .upload-input",e);m&&(m.onchange=function(){const t=this.files[0],i=this.getAttribute("accept").split(",").map((e=>e.slice(1))),s=t.name.split(".").pop();return i.includes(s.toLowerCase())?parseInt(t.size/1048576)>=200?((0,o.setToast)("The file cannot exceed 200MB"),!1):((0,o.$dqsa)(".upload-area>div",e).forEach((e=>e.style.display="none")),void c(this.files,"video").then((()=>this.value=""))):((0,o.setToast)(n.Z.lang.error_tip),!1)}),(0,o.$dqs)(".form-submit",e).onclick=function(){this.setAttribute("disabled",!0),this.innerHTML=`${a.submitting}`;let e=12;n.Z.isMobile&&(e=20),(0,o.setLoading)(this,e),this.setAttribute("disabled",!0),function(){if(n.Z.isSendLock)return void(0,o.setToast)("Please comment again after 15 seconds");const e={};Array.from((0,o.$dqsa)("#trustoo-allinone .user-input")).forEach((t=>{const i=t.getAttribute("input-type");e[i]=t.value})),n.Z.ip&&(e.ip=n.Z.ip,e.author_country=n.Z.loc),n.Z.isLinkReqRev?"undefined"==typeof isEmailWrite&&(e.review_source=1):e.review_source=0,s.E.uploadReview(e,l,n.Z.mediaUrl).then((e=>{if(null===e[0]){u(),v(),document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-allinone").style.display="none";const t=(0,o.$dqs)("#success-window");if(t.style.display="block",e[1].discount_code){const i=n.Z.lang.all_in_one_from.discount_setting;(0,o.$dqs)(".window-discount",t).style.display="flex",(0,o.$dqs)(".window-title",t).textContent=i.title,(0,o.$dqs)(".window-content",t).textContent=i.subtitle,(0,o.$dqs)(".discount-code",t).textContent=e[1].discount_code}else(0,o.$dqs)(".window-image",t).style.display="block";n.Z.isLinkReqRev&&(window.history.replaceState({},"",location.href.replace("?req=review","")),n.Z.isLinkReqRev=!1),n.Z.isSendLock=!0,setTimeout((()=>n.Z.isSendLock=!1),1500)}else{u();let t="";t=-2===e[0].code?e[0].error:n.Z.lang.error_tip,(0,o.setToast)(t,"1%")}})).catch((()=>{u(),(0,o.setToast)(`${n.Z.lang.error_tip}`,"1%")}))}()}}(a),n.Z.isLinkReqRev&&(document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="flex",(0,o.$dqs)(".trustoo-write-review").style.display="block")}(e),function(){const{lang:e}=n.Z,t="https://cdn.vstar.app/static/images/Vector.png";let i=`\n
\n ${e.success_message}\n
`;(0,o.imgLoad)(t);let s="",r="";r=``;let a=`
${e.submitted_successfully}
`,l=`
`;s=``;let d=`
${'
'+i+a+s+r+l}
`;const c=(0,o.$dqs)("#success-windo");(0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeend",d),(0,o.$dqs)("#success-window .window-close").onclick=h,(0,o.$dqs)(".window-button button",c).onclick=function(){(0,o.$dqsa)(".window-discount,.window-image",c).forEach((e=>e.style.display="none")),h()},(0,o.$dqs)(".discount-copy",c).onclick=function(){(0,o.setCopy)((0,o.$dqs)(".discount-code",c))}}()):2===t&&function(e){n.Z.isMobile&&(x=window.innerWidth);const t=n.Z.lang.separate_review_form,i=n.Z.lang.separate_review_form.discount_setting,r=e.discount_setting;if(1==r.discount_for_photo_reviews&&(1===r.discount_for_reviews_form||2===r.discount_for_reviews_form&&"undefined"!=typeof isEmailWrite)){for(let e in i)i[e]=i[e].replace("{{Discount_amount}}",r.discount_value);1===r.discount_incentive_conditions?R=`
${i.tip_3}
`:2===r.discount_incentive_conditions&&(q=`
${i.tip_1}
`)}if(""!==R){let e=374;n.Z.isMobile&&(e+=20),n.Z.globalStyle.textContent+=`#trustoo-slide, .write-review-slide {\n\t\t\theight: ${e}px !important;\n\t}`}let a=1===e.enabled_add_video?`\n
\n ${t.or}\n
\n
\n ${t.add_video} \n \n
\n `:"",l="";1!==n.Z.userSetting.is_del_powered&&(l='
Powered byTrustoo.io
');const d=`\n
\n
\n
\n
\n
${t.slide_1_title}
\n
\n
${B(5,16,2,!1)}
${t.rating_options[0]}
\n
${B(4,16,2,!1)}
${t.rating_options[1]}
\n
${B(3,16,2,!1)}
${t.rating_options[2]}
\n
${B(2,16,2,!1)}
${t.rating_options[3]}
\n
${B(1,16,2,!1)}
${t.rating_options[4]}
\n
\n\t\t\t\t${R}\n
\n
\n
${t.slide_2_title}
\n
${t.slide_2_subtitle}
\n
\n ${q}\n
\n ${t.add_photo} \n \n
\n ${a}\n
\n \n \n
\n
\n
\n
${t.slide_3_title}
\n \n \n \n
\n
\n
${t.slide_4_title}
\n \n \n \n \n
\n
\n
${t.slide_5_title}
\n
${t.slide_5_subtitle}
\n \n \n \n
\n
\n
\n\t${l}\n `;if((0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeend",d),function(){const e=(0,o.$dqs)("#trustoo-slide");n.Z.slide=e,(0,o.$dqs)(".window-close",e).onclick=function(){k()},(0,o.$dqsa)(".slide-option",e).forEach((e=>{e.onclick=function(){n.Z.ratingVal=e.getAttribute("rating"),S()},e.onmouseover=function(){e.classList.add("active")},e.onmouseout=function(){e.classList.remove("active")}})),(0,o.$dqs)(".upload-input.tt-image-uploader",e).onchange=async function(){const e=this.files[0],t=this.getAttribute("accept").split(",").map((e=>e.slice(1))),i=e.name.split(".").pop();if(!t.includes(i.toLowerCase()))return(0,o.setToast)(n.Z.lang.error_tip),!1;if(n.Z.uploadType=1,(0,o.$dqs)(".upload-file-tip").style.display="block",(0,o.$dqs)(".upload-file-tip").innerHTML='Uploading',S(),!Object.keys(n.Z.uploadImgInfo).length){const e=await s.E.getPolicyToken();n.Z.uploadImgInfo=e[1]}const r=this;s.E.uploadImg(e).then((e=>{null===e[0]&&((0,o.$dqs)(".upload-file-tip").innerHTML='
',n.Z.mediaUrl[0]={url:e[1].key},r.value="")}))};const t=(0,o.$dqs)(".tt-video-uploader",e);function i(e,t){(0,o.$dqs)(".upload-file-tip").innerHTML="",C=!1,p(),3===$&&(e.textContent=n.Z.lang.separate_review_form.done),"fail"===t&&(0,o.setToast)(n.Z.lang.error_tip)}t&&(t.onchange=async function(){const e=this.files[0],r=this.getAttribute("accept").split(",").map((e=>e.slice(1))),a=e.name.split(".").pop();if(!r.includes(a.toLowerCase()))return(0,o.setToast)(n.Z.lang.error_tip),!1;if(parseInt(e.size/1048576)>=200)return(0,o.setToast)("The file cannot exceed 200MB"),!1;(0,o.$dqs)(".upload-file-tip").style.display="block",(0,o.$dqs)(".upload-file-tip").innerHTML='Uploading',S(),n.Z.uploadType=2,C=!0;const l=(0,o.$dqs)(".slide-done");l.setAttribute("disabled",!0),s.E.getUploadVideoUrl().then((r=>{const{upload_url:a,domain:d}=r[1],c=r[1].video_service_uid;s.E.uploadVideo(a,e).then((()=>{const e=d+"/"+c;i(l,"success"),(0,o.$dqs)(".upload-file-tip").innerHTML='
',n.Z.mediaUrl[0]={url:e+"/iframe"}})).catch((()=>{t.value="",i(l,"fail")}))})).catch((()=>{t.value="",i(l,"fail")}))});const r=(0,o.$dqs)(".slide-content",e),a=(0,o.$dqs)(".slide-next",e);r.oninput=function(){""!==this.value?a.removeAttribute("disabled"):a.setAttribute("disabled",!0)},r.onblur=function(){""===this.value&&a.setAttribute("disabled",!0)};const l=/^[a-zA-Z0-9_-]+(\.[A-Za-z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,d=(0,o.$dqsa)("input.slide-input",e),c=(0,o.$dqs)(".slide-done",e),p=(0,o.debounce)((function(){let t=!1,i=!1;if(""!==d[1].value){const t=(0,o.$dqs)(".input-tip",e);l.test(d[1].value)?(i=!0,t&&(0,o.$dqs)(".input-tip",e).remove()):t||d[1].insertAdjacentHTML("afterend",`
\n ${n.Z.lang.email_error}\n
`)}""!==d[0].value&&(t=!0),t&&i&&!C?c.removeAttribute("disabled"):c.setAttribute("disabled",!0)}),300);d.forEach((e=>{e.oninput=p,e.onblur=function(){""!==d[0].value&&""!==d[1].value||c.setAttribute("disabled",!0)}})),(0,o.$dqs)(".discount-copy",e).onclick=function(){(0,o.setCopy)((0,o.$dqs)(".discount-code",e))},(0,o.$dqsa)(".back-slide",e).forEach((e=>{e.onclick=function(){const e=(0,o.$dqs)(`.write-review-slide[index="${$}"]`);L(e,e.previousElementSibling),$--,(0,o.$dqs)(".write-review-container").style.left=(parseInt(e.getAttribute("index"))-1)*-x+"px"}})),(0,o.$dqsa)(".next-slide",e).forEach((t=>{t.onclick=function(){if(t.classList.contains("slide-next")&&C&&(c.textContent=n.Z.lang.separate_review_form.uploading_video_tip),t.classList.contains("slide-finish")){k(),$=0,(0,o.$dqsa)(".slide-discount,.slide-thank-img",e).forEach((e=>e.style.display="none")),(0,o.$dqs)(".write-review-slide.active").classList.remove("active"),(0,o.$dqs)('.write-review-slide[index="0"]').classList.add("active"),(0,o.$dqs)(".write-review-container").style.left=0;const t=(0,o.$dqs)("#trustoo-mask>.trustoo-power");t&&(t.style.display="none")}else t.classList.contains("slide-done")?(t.innerHTML="",(0,o.setLoading)(t),function(){const e={},t=n.Z.slide;n.Z.ip&&(e.ip=n.Z.ip);const i=(0,o.$dqs)(".slide-name",t),r=(0,o.$dqs)(".slide-email",t),a=(0,o.$dqs)(".slide-content",t);e.author=i.value,e.author_email=r.value,e.content=a.value,n.Z.isLinkReqRev?"undefined"==typeof isEmailWrite&&(e.review_source=1):e.review_source=0,s.E.uploadReview(e,n.Z.uploadType,n.Z.mediaUrl).then((e=>{if(e[0]){let t="";t=-2===e[0].code?e[0].error:n.Z.lang.error_tip,(0,o.setToast)(t)}else{const s=n.Z.lang.separate_review_form,l=e[1].discount_code;if(l){const e=s.discount_setting;(0,o.$dqs)('.write-review-slide[index="4"] .slide-title',t).textContent=e.title,(0,o.$dqs)('.write-review-slide[index="4"] .slide-desc',t).textContent=e.subtitle,(0,o.$dqs)(".slide-discount",t).style.display="flex",(0,o.$dqs)(".discount-code",t).textContent=l}else(0,o.$dqs)(".slide-thank-img").style.display="block";S(),(0,o.$dqsa)(".slide-next,.slide-done",t).forEach((e=>e.setAttribute("disabled",!0))),(0,o.$dqs)(".upload-file-tip",t).innerHTML="",i.value=r.value=a.value="",n.Z.mediaUrl=[],n.Z.isLinkReqRev&&(window.history.replaceState({},"",location.href.replace("?req=review","")),n.Z.isLinkReqRev=!1)}(0,o.$dqs)(".slide-done",t).innerHTML=n.Z.lang.separate_review_form.done}))}()):S()}}))}(),n.Z.isLinkReqRev){document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="flex",(0,o.$dqs)(".trustoo-write-review").style.display="block";const e=(0,o.$dqs)("#trustoo-mask .trustoo-power[unadjusted]");if(e.style.display="block",e.getAttribute("unadjusted")){var c=document.querySelector("#trustoo-slide").getBoundingClientRect();e.style.left=c.left+c.width/2+"px",e.style.top=c.bottom+5+"px",e.removeAttribute("unadjusted")}}}(e)}}else n.Z.isFirstPageRender&&"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(n.Z,b.Z)}function O(e,t="",i){let r="";if(localStorage.getItem("trustoo_uv")?r=localStorage.getItem("trustoo_uv"):(r=n.Z.shop_id+"_"+(new Date).getTime(),localStorage.setItem("trustoo_uv",r)),n.Z.isProPage&&(0,o.gsSession)("set","tt_pv_product_id",n.Z.productId),!n.Z.isRecordPV||i&&!n.Z.isRecordCart){n.Z.isRecordPV=!0;const a={client_id:r,event_category:e};t?(a.cart_token=t,n.Z.isRecordCart=!0):(t=n.Z.cartWatcher.storedCartToken(),a.cart_token=t),s.E.recordInfo(a).then((()=>{i&&(0,o.gsSession)("set","tt_pv_product_id",null)}))}}function B(e,t,i=1,s=!1){const{userSetting:o,isProPage:r}=n.Z;let a,l=`style="width:${t}px;height:${t}px"`,d="";3===i&&(d=o.star_color,a=o.nostar_color);const c=1===i?'':Z.Z.star(t,d),p=1===i?'':Z.Z.star(t,a),u=`
${c}
`,v=`
${p}
`;parseInt(e)||(e=0);for(var g="",m=Math.floor(e),h=0;h\n
\n ${p}\n
\n
\n ${c}\n
\n `}for(h=0;h<5-m;h++)g+=v;return g}function H(e){return encodeURIComponent(e)}function N(e,t){for(let i=0;i{i.d(t,{Ll:()=>c,pL:()=>l,xL:()=>d});var s=i(642),n=i(337),o=i(247),r=i(732),a=i(894);async function l(){const{isProPage:e,isHomePage:t}=s.Z,{customProTarSel:i}=r.Z;let l;l=function(){let e={},t=Review.theme.theme_store_id;var i=".product-single__title",s=".product__title",n='.grid-item>h1.h2[itemprop="name"]',o='.grid__item>h1.h2[itemprop="name"]';let r,a=[i,s,n,o].join(",");switch(t){case 730:case 578:case 775:case 796:case 380:r=i;break;case 887:case 829:case 1356:case 1363:case 1368:r=s;break;case 679:r=n;break;case 766:r=o;break;default:e.isAll=!0,r=a}e.main=r,e.mainAll=a;let l=[];l.push(".product__title .product__title--template",".ProductMeta__Title",".product_title",".tt-product-single-info .tt-title",".product-block-list__item .product-meta__title",".product-title",".gt_atom-cZGCOCvfkBpcRgQ_productTitle",".pr_title",".prd-block_title",".productInfo h1",".product_name",".product-description-header",".layout-column-half-right>.title",".product-page-info__title>h1","h1.gt_heading","#popup_cart_title",".apb_product_detail_information_title",".product-area__details__title",".product-info>h3.title30",".gt_product-content>h2",".product-detail__title",".prod__title",".product-meta>.product-meta__title",".productInfo>h2",".product-name",".product__section-title>h1");let d=[".page-header h1.title",".title-detail",".title>h1",".title-row>h1.title","h2.product-page--heading",".section-header__title.product-titre",".block.type-title","h2.product-details-product-title","h1.product-info__title",".product-detail-part>h2[itemprop='name']","h2.single_product__title","#product-description h1.h2","h1.product-item-caption-title.-product-page","h1.product-title","h2[data-attribute='productTitle']",".productView-title"].join(","),c=["h1.product__section-title","h1.product-single__title-text",'h1[itemprop="name"]',".proBoxInfo>h1",".product-header","h1.title-primary","[data-product-description-container]>h2.h1",".uppercase",".col-md-12>.title-sale",".shg-product-title-component",".t4s-product__title",".bls__product-title"].join(","),p=l.join(",");return e.other1=d,e.other2=p,e.other3=c,e}();let d,c=[],p=!1;const u=(0,o.$dqsa)(".custom-vstar-rating-widget");0!==u.length&&(c=u,p=!0),i&&!p&&(d=(0,o.$dqs)(i),d&&(p=!0,Review.proType="custom",Review.proSel=i,Review.proTarget=d),t&&d)||(p||(c=(0,o.$dqsa)(l.main),0!==c.length||l.isAll||(c=(0,o.$dqsa)(l.mainAll)),0!==c.length&&(p=!0),Review.proType="main",Review.proSel=l.main),p||(c=(0,o.$dqsa)(l.other1),Review.proType="other1",Review.proSel="`"+l.other1+"`",0===c.length&&(c=(0,o.$dqsa)(l.other2),Review.proType="other2",Review.proSel="`"+l.other2+"`"),0===c.length&&(c=(0,o.$dqsa)(l.other3),Review.proType="other3",Review.proSel="`"+l.other3+"`")),2===c.length?d=Array.from(c).find((e=>null!==e.offsetParent)):0!==c.length&&(d=c[0]),d||e&&await n.E.sendErrorMsg(3,`产品页评价嵌入失败,店铺地址为:${window.location.href}`).then((e=>{if(e[1]){const t=(0,a.starEmbeddedAdaptation)(5,e[1].selector);t&&(Review.proSel=t,d=(0,o.$dqs)(t))}})),d&&(Review.proTarget=d))}function d(){const e=s.Z.shop_id;if(1===r.Z.get_move_review_info.is_tab_review&&!s.Z.isWdoRevOpen)if(61646700724===e&&129829568692===s.Z.themeId){activeCls="t4s-active";let e=(0,o.$dqs)(`.panel.sp-tab.${activeCls},.t4s-tab-wrapper>.t4s-tab-content.${activeCls}`);e?e.classList.remove(activeCls):e=(0,o.$dqs)(".t4s-tab-wrapper:nth-child(2)>.t4s-tab-content");const t=(0,o.$dqs)("#tab_pr_reivew,.t4s-tab-wrapper:nth-child(4)>.t4s-tab-content");t.classList.add(activeCls),s.Z.isMobile?((0,o.$dqs)(".sp-tab-content",e).style.display="none",(0,o.$dqs)("#tab_pr_reivew .sp-tab-content").style.cssText=""):((0,o.$dqs)(".tab_title_block.active,.t4s-d-inline-flex>a.t4s-active").classList.remove(activeCls),(0,o.$dqsa)(".tab_title_block,.t4s-tab-wrapper")[1].classList.add(activeCls),e.style.display="none",t.style.display="block")}else if(67745513752===e&&137959506200===s.Z.themeId){const e=(0,o.$dqs)('[data-id="1670265256519"] .module'),t=(0,o.$dqs)("[data-control].opend",e);null!==t&&(t.classList.remove("opend"),t.nextElementSibling.style.display="none");const i=(0,o.$dqs)('[data-control][data-index="5"]',e);null!==i&&(i&&i.classList.add("opend"),i.nextElementSibling.style.display="block")}else if(69381783840===e&&144923328800===s.Z.themeId){const e=(0,o.$dqsa)(".product-simple-tab .tab-pane"),t=(0,o.$dqsa)(".nav-item .nav-link");e[0].className="tab-pane",e[2].className="tab-pane active show",t[0].className="nav-link",t[1].className="nav-link active show"}}function c(){if(s.Z.isProPage){const e=(0,o.$dqs)(`.pagefly-star-rating-sealapp[product-id="${s.Z.productId}"]`);e&&(e.style.cursor="pointer",e.onclick=function(){s.Z.reviewsDom&&(0,o.scrollTo)(s.Z.reviewsDom)})}}},231:(e,t,i)=>{i.d(t,{A1:()=>d,SU:()=>p,_1:()=>c,qT:()=>m});var s=i(247),n=i(642);let o,r=0,a=0;o=n.Z.isMobile?18:16;let l=!1;function d(e,t){const{isWdoRevOpen:i}=n.Z,r=(i?n.Z.wdoRev:n.Z.reviews).columnHighs,a=i?n.Z.wdoRevBody:n.Z.reviewsBody,l=(0,s.$dqs)(`[no="${t}"]`,a);var d=parseInt(l.style.top),c=l.offsetHeight+d+o;const p=e+"column's hight updates,hight is "+c;Review.checkGridHighMsg.push(p),c>r[e-1]&&(r[e-1]=c);let u=(0,s.$dqsa)(`.column${e}`,a);u.forEach(((i,s)=>{parseInt(i.getAttribute("no"))>t&&(i.style.top=c+"px",c=c+i.offsetHeight+o),s===u.length-1&&(r[e-1]=c)}));let v=30;n.Z.isMobile&&(v=0);var g=Math.max.apply(null,r);a.style.height=g+v+"px"}function c(e=[],t,i=!1){const{isWdoRevOpen:o}=n.Z,r=n.Z.isWdoRevOpen?n.Z.wdoRev:n.Z.reviews,d=r.columnHighs,c=o?n.Z.wdoRevBody:n.Z.reviewsBody;if(!o&&"none"===c.offsetParent)return;if(a=t,i)for(let e=0;e{const t=(0,s.$dqs)(".resource-item",e);if(null!==t){const e=t.getAttribute("proportion");t.style.width=p+"px",(0,s.$dqs)("img",t).width=p,t.style.height=p/e+"px",(0,s.$dqs)("img",t).height="auto"}})),v(c,e),l=e.length<=d.length&&n.Z.isFirstPageRender,n.Z.isCssLoaded&&setTimeout((()=>{m(c)}),200)}function p(){const{isWdoRevOpen:e}=n.Z,t=e?n.Z.wdoRevBody:n.Z.reviewsBody;if(!e&&"none"===t.offsetParent)return;(0,s.$dqsa)("[new-grid-img]",t).forEach((e=>{e.removeAttribute("style"),e.removeAttribute("new-grid-img")}));const i=Array.from((0,s.$dqsa)(".grid-review",t));u(t,i),v(t,i)}function u(e,t){const{isWdoRevOpen:i}=n.Z,o=i?n.Z.wdoRev:n.Z.reviews,a=e.parentNode,l=window.getComputedStyle(a);let d=parseInt(l.width)-2*parseInt(l.paddingLeft);Review.reviewsWidth=d,d<501&&(r=16);const c=function(e,t){const i=n.Z.isWdoRevOpen?n.Z.wdoRev:n.Z.reviews;let o=0,r=0;return e>=280&&e<501?(o=2,r=32):e>=501&&e<920?o=3:e>=920&&e<1150?o=4:e>=1150&&e<1420?o=5:e>=1420&&(o=6),n.Z.isMobile||(2===o||3===o?((0,s.$dqsa)(".reviews-date",t).forEach((e=>e.style.cssText="position: static;")),(0,s.$dqsa)(".grid-mobile",t).forEach((e=>e.style.cssText="margin-top: 10px;"))):o>0&&((0,s.$dqsa)(".reviews-date",t).forEach((e=>e.style.cssText="")),(0,s.$dqsa)(".grid-mobile",t).forEach((e=>e.style.cssText="")))),i.cardWid=(e-(16*(o-1)+r))/o,o}(d,e),p=o.columnHighs;p.length=0;for(let e=0;ee));for(var l=0;lt===e)),a[d]=a[d]+t[l].offsetHeight+o;const i=t[l].querySelector(".display-text");i&&i.setAttribute("index",d+1),t[l].className=`grid-review column${d+1}`,t[l].style.left=d*(s.cardWid+16)+r+"px",t[l].style.top=e+"px",n.Z.minHeight=e}var c=Math.max.apply(null,a);let p="";p=n.Z.isMobile?`${c}px`:`${c+30}px`,n.Z.isCssLoaded&&(e.style.opacity=1),e.style.height=p}function g(e,t){e.forEach((e=>{e.style.width=t+"px",(0,s.$dqs)("img",e)&&((0,s.$dqs)("img",e).width=t)}))}function m(e,t=!1){const i={highMsg:[]},r=(n.Z.isWdoRevOpen?n.Z.wdoRev:n.Z.reviews).preColHighs,c=r.length;if(i.loadedStyleCheck=t,0===c){if(t)return;p()}else for(let t=0;t{e.getAttribute("no")>a&&n.push(e)})),0===n.length)continue;s=e+n[0].offsetHeight+o;for(let e=1;e{i.d(t,{l:()=>r,u:()=>o});var s=i(841),n=i(642);function o(e,t="beforeend",i=5,o,a){this.activeIndex=0,this.middleIndex=parseInt(i/2);const{userSetting:l,isWdoRevOpen:d}=n.Z,c=d?n.Z.wdoRevDom:n.Z.reviewsDom,p=s.Z.prePage(l.font_color),u=s.Z.nextPage(l.font_color),v=e.parentNode.classList.contains("trustoo-rtl");for(var g=`
    \n `,m=1;m<=i;m++)g+=`
  • ${m}
  • `;if(g+=`
  • \n ${v?p:u}\n
  • \n
`,e.insertAdjacentHTML(t,g),o<5&&1!==o){var h=e.querySelectorAll(".page-control-item");for(m=o;m<5;m++)h[m].style.display="none"}setTimeout((()=>{1===o&&this.togglePageButton(2)}),0),this.pager=c.querySelectorAll(".page-control-item"),this.pager.forEach((e=>{e.onclick=()=>{this.activeIndex=e.getAttribute("index");let t=parseInt(e.innerHTML);this.pageClick(a,t)}})),this.pageClick=function(t,i){let s=c.querySelector(".page-control-item.active").innerHTML;const n=parseInt(e.parentNode.getAttribute("pageCount"));r(3,i),t?t():this.activeIndex=0,(1==s&&1!=i||1!=s&&1==i)&&this.togglePageButton(1),(s!=n&&i==n||s==n&&i!=n)&&this.togglePageButton(2),this.setPageNum()};var w=c.querySelector(".pre-page"),f=c.querySelector(".next-page");this.togglePageButton=function(e){1==e?"none"===w.style.display?w.style.display="flex":w.style.display="none":2==e&&("none"===f.style.display?f.style.display="flex":f.style.display="none")},this.setPageNum=function(){let t=r();const s=parseInt(e.parentNode.getAttribute("pageCount"));this.activeIndex>this.middleIndex&&this.pager[i-1].innerHTML<=s||this.activeIndex1?(t+this.middleIndex>s||t-this.middleIndex<=0?c.querySelector(".page-control-item.active").classList.remove("active"):this.activeIndex!=this.middleIndex&&(c.querySelector(".page-control-item.active").classList.remove("active"),this.activeIndex=this.middleIndex,this.pager[this.middleIndex].classList.add("active")),this.changePageNum()):(c.querySelector(".page-control-item.active").classList.remove("active"),this.pager[this.activeIndex].classList.add("active"))},this.getNextPageReviews=function(){r(1);const t=parseInt(e.parentNode.getAttribute("pageCount"));let i=r();this.activeIndex++,2==i&&this.togglePageButton(1),i==t&&this.togglePageButton(2),a&&a(),this.setPageNum(2)},this.getPrePageReviews=function(){const t=parseInt(e.parentNode.getAttribute("pageCount"));this.activeIndex--,r(2);let i=r();1==i&&this.togglePageButton(1),i==t-1&&this.togglePageButton(2),a&&a(),this.setPageNum(1)},f.onclick=()=>this.getNextPageReviews(),w.onclick=()=>this.getPrePageReviews(),this.changePageNum=function(){const t=parseInt(e.parentNode.getAttribute("pageCount"));let s=r();var n=!1,o=s-this.middleIndex,a=s+this.middleIndex;s+this.middleIndex>t?(n=!0,o=t-2*this.middleIndex,i%2==0&&o++,a=t):i%2==0&&a--,o<=0&&(n=!0,a=(o=1)+2*this.middleIndex);for(var l=0,d=o;d<=a;d++)d===s&&n&&(this.pager[l].classList.add("active"),this.activeIndex=l),this.pager[l].innerHTML=d,l++}}function r(e,t){let i=n.Z.isWdoRevOpen?n.Z.wdoRevDom:n.Z.reviewsDom,s=parseInt(i.getAttribute("page"));return 1===arguments.length?(1===e?s++:2===e&&s--,i.setAttribute("page",s)):3===e&&2===arguments.length&&i.setAttribute("page",t),s}},693:(e,t,i)=>{i.d(t,{km:()=>w,Jh:()=>h,UF:()=>y,fc:()=>A});var s=i(642),n=i(894),o=i(247),r=i(231),a=i(957),l=i(732),d=i(421),c=i(755),p=i(841),u=i(337);async function v(e,t){s.Z.couldPreLoading=!1,s.Z.imgCount=0,s.Z.loadedImgCount=0,s.Z.thumbImg=[];let i,n,r=[];const{isMixReview:l,isWdoRevOpen:d,isList:c,userSetting:p}=s.Z;let m=(0,a.l)();const h=p.review_pagination_type;n=d?s.Z.wdoRevDom:s.Z.reviewsDom;const w=s.Z.isWdoRevOpen?s.Z.wdoRev:s.Z.reviews,f=d?"trustoo_all_reviews":"trustoo_reviews",_=e||t;if(_?(r=[],(0,o.gsSession)("set",f,[])):r=(0,o.gsSession)("get",f),1===h&&r[m-1])g(r[m-1]);else{const e=n.getAttribute("review_sort_by");i="undefined"==typeof vstar_product_reviews||s.Z.isReviewsUpdate||1!==m||d||_||l||1===p.auto_switch_language?(await u.E.getProRevList(e,w.ratingFilter))[1]:vstar_product_reviews;const c=i.page.total_page;if(n.getAttribute("pageCount")||((s.Z.isMixReview||s.Z.isWdoRevOpen)&&(s.Z.allRatingData=i.total_rating),function(e,t){const{lang:i,isRevPage:n,isWdoRevOpen:r,isGrid:l,userSetting:d}=s.Z,c=d.review_pagination_type;if(1!==c||r||n){if(2===c&&t>1&&!n&&!r){const t=``;(0,o.$dqs)("#reviews-footer",e).insertAdjacentHTML("beforeend",t),(0,o.$dqs)(".more-review-btn",e).onclick=function(e){e.target.style.display="none",(0,o.$dqs)(".loader",e.target.parentNode).style.display="block",(0,a.l)(1),v()}}}else if(t>1){let i=new a.u((0,o.$dqs)("#reviews-footer",e),"beforeend",5,t,v);r?s.Z.wdoPager=i:s.Z.pager=i}}(n,c)),n.setAttribute("pageCount",c),l||d)if(0===i.page.count)n.parentNode.style.display="block",n.insertAdjacentHTML("beforeend",'There are no reviews yet');else{const e=(0,o.$dqs)(".no-review-tip",n);e&&e.remove()}s.Z.isWebPSupported||i.list.forEach((e=>{0!==e.resources.length&&e.resources.forEach((e=>{e.src=e.src.replace("trustoo_big","q_90"),e.thumb_src=e.thumb_src.replace("trustoo_small","w_220")}))}));const y=i.list;r[m-1]=y,(0,o.gsSession)("set",f,r),_&&1===h&&s.Z.pager&&s.Z.pager.pageClick(null,1),g(y,_,t)}}function g(e,t,i){const{userSetting:d,isRevPage:c,isWdoRevOpen:u,isMixReview:v,isGrid:g,globalStyle:h}=s.Z,{isShowRevRatingNum:w,isImgLoadLazy:f}=l.Z,_=u?s.Z.wdoRev:s.Z.reviews,y=u?s.Z.wdoRevBody:s.Z.reviewsBody,b=y.parentNode;let A=[];const Z=d.review_pagination_type,$=(0,a.l)();(!c&&!u&&(1===Z||t)||t&&(v||u))&&((0,o.$dqsa)("#vstar-reviews>#reviews-body>div",y).forEach((e=>e.remove())),g&&(y.style.opacity=0),_.cardCount=0,s.Z.isMobile&&u&&(0,o.scrollTo)(b)),w&&1===(0,a.l)()&&(h.innerHTML+="#vstar-reviews .star{display:flex;align-items:center}\n #vstar-reviews .rev-rating-num{font-size:15px;margin-left:8px}");let x="";f&&(x='loading="lazy"');let C="";g&&(C='style="visibility:hidden"');const R=_.cardCount;let q=_.cardCount;if(e.forEach((e=>{let t="";t=`no="${++q}"`,Object.assign(e,{imgAttr:x,cardCount:q,noText:t,styleText:C});const i=document.createElement("div");i.className=s.Z.layoutClass+"review",i.innerHTML=function(e){const{isMobile:t,layoutClass:i,userSetting:r,origImg:a,thumbImg:d,isGrid:c,isList:u,lang:v}=s.Z,{isShowRevVerified:g,isAddRevVrfy:m,isShowRevRatingNum:h}=l.Z,{noText:w,imgAttr:f}=e;let _="",y="",b="",A="",Z="",$="",x="";var C="",R="";let q="",k="",S=(0,n.getTotalStarString)(e.star);if(e.resources.forEach(((e,t)=>{let i=2===e.resource_type?'
\n \n
':"",n="";if(1===e.resource_type?n=e.src:2===e.resource_type&&(n=e.thumb_src),c){const o=(e.width/e.height).toFixed(2);if(0==t){let r="";""!==e.average_hue&&(r=`background-color:${e.average_hue}`),C+=`
\n ${t}\n ${i}\n
`,s.Z.imgCount++,d.push(e.thumb_src)}else C+=`
\n\t\t\t\t${t}
`;a.push(e.src)}else u&&(R+=function(e,t,i,n,o){const{origImg:r,thumbImg:a}=s.Z;let l="",d="";return d=e.width${n}\n ${o}\n `,s.Z.imgCount++,a.push(e.thumb_src),r.push(e.src),l}(e,f,w,t,i))})),0!==e.resources.length){let t="";e.resources.length>1&&(t=`
${p.Z.multiPhoto()}
`),c?C=`
${t+C}
`:u&&(R=`
${R}
`)}h&&(A=e.star);const L=p.Z.verified(r.verified_badge_color),T=`${v.verified_purchase}`,E=r.is_show_verified_badge;let I="";m&&(e.verified_badge=1),g&&1===e.verified_badge&&(1===E?Z=`
\n ${L+T}
\n `:2===E||3===E&&(I=L));let P="",M=[];-1!==e.commented_at.indexOf("/")?M=e.commented_at.split("/"):-1!==e.commented_at.indexOf("-")&&(M=e.commented_at.split("-")),1===r.review_date_format_type?P=M[1]+"/"+M[2]+"/"+M[0]:2===r.review_date_format_type?P=M[2]+"/"+M[1]+"/"+M[0]:3===r.review_date_format_type&&(P=e.commented_at);let O=P?`${P}`:"";c&&t&&(b=O);var B="";const H=``,N=` ${e.author_country}`,W=r.is_show_country_flag;if(1==W?B=H+N:3==W?B=H:4==W&&(B=N),t&&c?_=B:y=B,l.Z.isNoEllipsisReviews?q=e.content:c?q=e.content.length>200&&!t||e.content.length>100&&t?function(e,t){let i=200;s.Z.isMobile&&(i=100),i-=s.Z.lang.show_full_review.length;let n=t?`cardNo="${t}"`:"";return`${e.substr(0,i)}...${s.Z.lang.show_full_review}`}(e.content,e.cardCount):e.content:u&&(q=""),""!==e.reply_content&&($=`
\n
${p.Z.store(r.font_color)} ${s.Z.lang.reply}:
\n
${e.reply_content}
\n
`),1===s.Z.userSetting.is_show_helpful){const t="tt_review_"+s.Z.shop_id;let i=(0,o.gsLocal)("get",t),n="",r="";if(i){i=JSON.parse(i);const t=i.find((t=>t.id===e.id));t&&(1===t.likeType?n="active":2===t.likeType&&(r="active"))}k=`
${v.helpful}\n\t\t${p.Z.helpful(n)}${e.likes_count}\n\t\t${p.Z.unhelpful(r)}${e.dislike_count}
`}if((s.Z.isMixReview||s.Z.isWdoRevOpen)&&e.corresponding_product&&1===r.sidetab_setting.show_corresponding_product){const t=e.corresponding_product;let i=t.product_name;i.length>50&&(i=i.substr(0,50)+"..."),x=`\n \n
\n
${i}
\n
\n `}return`\n ${C}\n \n
\n
\n
${S} ${A}
\n ${O}\n
\n\n
${b+_}
\n
\n ${e.author} \n ${I}\n ${y} \n ${Z} \n \n
\n
\n
\n

\n ${q}\n

\n ${R}\n ${$}\n\t\t\t\t\t${k}\n ${x}\n\n
\n `}(e),y.appendChild(i),i.setAttribute("no",q),i.setAttribute("review-id",e.id),A.push(i),g||s.Z.isList&&!l.Z.isNoEllipsisReviews&&async function(e,t,i,n){var o=window.getComputedStyle(e)["line-height"],r=3*parseInt(o);await new Promise((e=>{setTimeout((()=>e()),200)}));var a=t;e.innerHTML=a;var l=a.length;let d="";if(e.offsetHeight<=r);else{for(var c,p=0,u=l;e.offsetHeight>r;)c=(p+u)/2,e.innerHTML=a.substring(0,c),e.offsetHeight<=r?(e.innerHTML=a.substring(0,u),p=c):u=c-1;d=a.substring(0,u-s.Z.lang.show_full_review.length-10),e.innerHTML=d}if(d){let i=`...${s.Z.lang.show_full_review}`;e.insertAdjacentHTML("beforeend",i)}}((0,o.$dqs)(".reviews-text",i),e.content)})),_.cardCount=q,A.forEach((e=>{let t=[];s.Z.isList?t=(0,o.$dqsa)(".resource-item>img",e):s.Z.isGrid&&(0,o.$dqs)(".resource-item>img",e)&&t.push((0,o.$dqs)(".resource-item>img",e)),0!==t.length&&(s.Z.isGrid&&s.Z.gridShowImgCount++,t.forEach((e=>{e.onload=function(){e.getAttribute("loaded")||(e.setAttribute("loaded",!0),m("success",this))},e.onerror=function(){if(!e.getAttribute("loaded")){e.setAttribute("loaded",!0);const t=e.closest(".resource-list");s.Z.isGrid?0==e.getAttribute("alt")&&t.remove():s.Z.isList&&(e.parentNode.remove(),0===t.children.length&&t.remove()),m("fail",this)}},e.src=e.getAttribute("data-original")})))})),1===$&&(s.Z.isFirstPageRender||u||c))g&&(0,r._1)(A,R,t);else if(g){let e=!1;u||c||(e=1===Z||t),(0,r._1)(A,R,e)}!function(e,t,i,n){const r=parseInt(t.getAttribute("pageCount")),a=(0,o.$dqs)("#reviews-footer",t);r>1&&1===i?a.style.display="block":r<=1&&(a.style.display="none");const l=(0,o.$dqs)(".loader",t);if("block"===l.style.display&&(l.style.display="none"),s.Z.allRevLoadLock=!1,!s.Z.isRevPage&&!s.Z.isWdoRevOpen)if(1===e){if(s.Z.isFirstPageRender||(s.Z.isList?(0,o.scrollTo)(t):(0,o.scrollTo)(t,"auto")),n&&r>1){const e=(0,o.$dqsa)(".page-control-item",a);(0,o.$dqs)(".pre-page",a).style.display="none",(0,o.$dqs)(".next-page",a).style.display="flex";for(let t=0;t<5;t++)e[t].style.display=t${i}`);return`
\n
\n ${'
\n
\n
'+o+''}
\n
`}();if(f(h,e.tarNode,e.position),e.tarNode&&i){let i=(0,o.$dqs)(`#${t}reviews`,e.tarNode),n=(0,o.$dqs)("#reviews-body",e.tarNode);g=i,m=n,Object.assign(s.Z,{wdoRevDom:i,wdoRevBody:n})}else g=(0,o.$dqs)(`#${t}reviews`),m=(0,o.$dqs)("#reviews-body"),Object.assign(s.Z,{reviewsDom:g,reviewsBody:m});g.setAttribute("review_sort_by",s.Z.userSetting.review_sort_by);const w=1===s.Z.userSetting.layout?"list":"gird";g.setAttribute("layout",w),i||s.Z.reviewsDom&&b();let y=parseInt(window.getComputedStyle(g).width);s.Z.isGrid&&(s.Z.reviewsWidth=y),(0,a.l)(3,1);const A=i?"trustoo_all_reviews":"trustoo_reviews";(0,o.gsSession)("set",A,[]),await v(),function(){const{lang:e,userSetting:t,revHeadType:i}=s.Z,{bigRatingDigits:r}=l.Z,d=s.Z.isWdoRevOpen?s.Z.wdoRev:s.Z.reviews,c=s.Z.isMixReview||s.Z.isWdoRevOpen,u=c?s.Z.allRatingData:s.Z.ratingData,g=s.Z.isWdoRevOpen?s.Z.wdoRevDom:s.Z.reviewsDom,m=(0,o.$dqs)("#reviews-head",g);let h="",w="";if(s.Z.isWdoRevOpen&&m&&(m.innerHTML+='
'+p.Z.close(t.font_color)+"
"),!u)return;var f=`
\n
\n \n \n
\n
\n
    \n
  • ${e.sort_by}
  • \n
  • ${e.sort_by_options[0]}
  • \n
  • ${e.sort_by_options[1]}
  • \n
  • ${e.sort_by_options[2]}
  • \n
  • ${e.sort_by_options[3]}
  • \n
\n
${p.Z.hook()}\n
\n
\n
`,_=(0,n.getTotalStarString)(u.rating,20,1,!0);let y=u.total_reviews,b="";2===t.is_show_review_button||c||(b=``);let A="",Z="",$=`

\n ${String(u.rating).slice(0,r+1)}\n

`;if(1===i?(Z=`

${e.customer_reviews}

`,A=`
\n
\n 5 ${e.star}\n
\n
\n 4 ${e.star}\n
\n
\n 3 ${e.star}\n
\n
\n 2 ${e.star}\n
\n
\n 1 ${e.star}\n
\n
`):2===i&&(h="review-head-type2"),Z+=`\n
\n ${$}\n
\n ${_} \n
\n

${y} ${e.reviews}

\n
\n `,Z=`
\n ${Z}\n
`,w=Z+A+b+f,m&&(m.className+=h,m.innerHTML+=w,2!==i)){const e=(0,o.$dqsa)(".star-range",m),i=(0,o.$dqsa)(".star-num",m);e.forEach(((e,n)=>{var r=5-n;const l=u["total_star"+r];i[n].textContent=l;var c=(l/u.total_reviews*100).toFixed(2);c+="%",e.setAttribute("index",r),e.style.cssText=`background:linear-gradient(to right, ${t.star_color} 0%, ${t.star_color} ${c},${t.nostar_color} ${c}, ${t.nostar_color})`,l>0&&1===s.Z.userSetting.rating_filter&&(e.onclick=function(){const t=e.getAttribute("index");t===d.ratingFilter?d.ratingFilter=0:d.ratingFilter=t,(0,a.l)(3,1),v(!1,!0)},e.parentNode.onmouseover=function(){(0,o.$dqs)(".head-center",m).classList.add("tt-hover"),this.classList.add("active")},e.parentNode.onmouseout=function(){(0,o.$dqs)(".head-center",m).classList.remove("tt-hover"),this.classList.remove("active")})}))}}(),function(){const{isMixReview:e,isWdoRevOpen:t,hasPyRating:i,reviewsDom:n}=s.Z,l=t?s.Z.wdoRevBody:s.Z.reviewsBody;e||t||2===s.Z.userSetting.is_show_review_button||(0,o.$dqs)(".head-button",n).addEventListener("click",(function(){document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="flex",(0,o.$dqs)(".trustoo-write-review").style.display="block";const e=(0,o.$dqs)("#trustoo-mask>.trustoo-power");if(e.style.display="block",e.getAttribute("unadjusted")){var t=document.querySelector("#trustoo-slide").getBoundingClientRect();e.style.left=t.left+t.width/2+"px",e.style.top=t.bottom+5+"px",e.removeAttribute("unadjusted")}})),(0,o.$dqs)("#reviews-head .head-sort")&&function(){const e=s.Z.isWdoRevOpen?s.Z.wdoRevDom:s.Z.reviewsDom,t=(0,o.$dqs)(".head-sort",e),i=(0,o.$dqs)(".sort-popup",e),n=(0,o.$dqs)(".sort-active",e);window.addEventListener("click",(function(e){t.contains(e.target)||(i.style.display="none")})),(0,o.$dqsa)(".sort-item",e).forEach((e=>e.onclick=function(){const e=s.Z.isWdoRevOpen?s.Z.wdoRevDom:s.Z.reviewsDom;if(!this.classList.contains("active")){(0,o.$dqs)(".sort-item.active",e).classList.remove("active"),this.classList.add("active"),n.style.top=this.offsetTop+3+"px";const t=this.getAttribute("sort-value");e.setAttribute("review_sort_by",t),1!==s.Z.userSetting.review_pagination_type||s.Z.isWdoRevOpen||(s.Z.reviewsList=[],s.Z.pageRecord=[]),i.style.display="none",e.setAttribute("page",1),v(!0)}})),(0,o.$dqs)(".sort-icon",e).onclick=function(){let e=i.style.display;i.style.display="block"===e?"none":"block"};let r=(0,o.$dqs)(`.sort-item[sort-value="${s.Z.userSetting.review_sort_by}"]`,e),a=parseInt(r.getAttribute("index"));r.classList.add("active"),n.style.top=35*a+53+"px"}(),l.addEventListener("click",(function(e){let t=e.target;"path"===t.tagName&&(t=t.closest("svg"));let i=t.classList;if(i.contains("resource-item")&&(t=(0,o.$dqs)("img",t)),"IMG"==t.tagName){let e=null;const i=t.parentNode.className;"tt-video-player"===i?e=t.parentNode.previousElementSibling:"resource-item"===i&&(e=t);let n=parseInt(e.getAttribute("no"));const r=parseInt(e.getAttribute("index")),l=(0,o.$dqs)(`.${s.Z.layoutClass}review[no="${n}"]`);let d,c="";s.Z.isGrid&&s.Z.isMobile&&(s.Z.globalStyle.textContent+="#trustoo-review-detail .review-row-one .reviews-date {display: none;}"),d=1===s.Z.userSetting.review_pagination_type&&!s.Z.isWdoRevOpen&&!s.Z.isMixReview||s.Z.isHomePage&&!s.Z.isWdoRevOpen?(0,a.l)()-1:Math.ceil(n/s.Z.userSetting.reviews_per_page_number)-1,n-=1,n%=s.Z.userSetting.reviews_per_page_number,s.Z.revDetailInfo.page=d,s.Z.revDetailInfo.no=n,s.Z.revDetailInfo.imageIndex=r;const p=s.Z.isWdoRevOpen?"trustoo_all_reviews":"trustoo_reviews",u=(0,o.gsSession)("get",p)[d][n];c+=(0,o.$dqs)(".grid-review-head,.list-review-head",l).innerHTML,c+=t.closest(".resource-list").outerHTML,c+=(0,o.$dqs)(".reviews-text",l).outerHTML,(0,o.$dqs)(".merchant-reply",l)&&(c+=(0,o.$dqs)(".merchant-reply",l).outerHTML),showReviewDetail(s.Z,c,u,p)}else i.contains("display-text")?function(e){e.parentNode.querySelector(".remain-text").removeAttribute("hidden");const t=e.getAttribute("index"),i=e.getAttribute("cardno");e.style.display="none",s.Z.isGrid&&(0,r.A1)(t,i)}(t):(i.contains("tt-helpful")||i.contains("tt-unhelpful"))&&function(e,t){if(s.Z.likeRevLock)return;s.Z.likeRevLock=!0;let i=2,n=1;t.contains("tt-helpful")?n=1:t.contains("tt-unhelpful")&&(n=2);const r=e.closest("[review-id]").getAttribute("review-id"),a=t.contains("active"),l=e.parentNode,d=(0,o.$dqs)(".tt-helpful-count",l),c=(0,o.$dqs)(".tt-unhelpful-count",l),p="tt_review_"+s.Z.shop_id;let v=(0,o.gsLocal)("get",p);v=v?JSON.parse(v):[];const g=v.findIndex((e=>e.id===r)),m=e.nextElementSibling;i=a?2:1,a||-1!==g&&u.E.likeOrDislikeReview(v[g].likeType,2,r).then((e=>{e[0]?s.Z.likeRevLock=!1:1===n?c.textContent=parseInt(c.textContent)-1:2===n&&(d.textContent=parseInt(d.textContent)-1)})),u.E.likeOrDislikeReview(n,i,r).then((t=>{if(t[0])return void(s.Z.likeRevLock=!1);const i=(0,o.$dqs)(".active",l);i&&i.classList.remove("active"),a?(e.classList.remove("active"),-1!==g&&v.splice(g,1),m.textContent=parseInt(m.textContent)-1):(-1!==g&&v.splice(g,1),e.classList.add("active"),v.push({id:r,likeType:n}),m.textContent=parseInt(m.textContent)+1),(0,o.gsLocal)("set",p,JSON.stringify(v)),setTimeout((()=>{s.Z.likeRevLock=!1}),300)}))}(t,i)})),i&&(0,c.Ll)(),s.Z.iObserver||(s.Z.iObserver=new IntersectionObserver((e=>{for(const t of e)if(t.isIntersecting&&!s.Z.allRevLoadLock&&(s.Z.isRevPage||s.Z.isWdoRevOpen)){const e=t.target.parentNode,i=parseInt(e.getAttribute("pageCount"));parseInt(e.getAttribute("page"))15?setTimeout((()=>{s.Z.reviewsDom.classList.remove("pending")}),100):s.Z.reviewsDom.classList.remove("pending")),s.Z.isActWdoRev&&!s.Z.isWdoRevOpen&&s.Z.isInsertRev&&(0,d.ru)(),"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(s.Z,l.Z),s.Z.isFirstPageRender=!1)}function w(e){const{lang:t}=s.Z,{isNoWriteBtn:i}=l.Z;s.Z.isNullRev=!0,s.Z.firstPageShow=!0;let r="";"rtl"===getComputedStyle(document.body).direction&&(r=" trustoo-rtl");let a="";2!==s.Z.userSetting.is_show_review_button&&(a=``);const d=(0,n.getTotalStarString)(0);f(`
\n \n
${t.customer_reviews}
\n
\n
\n
\n ${d}\n
\n
\n

${t.no_reviews}

\n
\n ${a}\n
`,e);const c=(0,o.$dqs)("#vstar-noreviews");2!==s.Z.userSetting.is_show_review_button&&(0,o.$dqs)(".noreviews-button",c).addEventListener("click",(function(){document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="block",(0,o.$dqs)(".trustoo-write-review").style.display="block",(0,n.processRecordedData)("reviews_click")})),s.Z.reviewsDom=c,b()}function f(e,t,i="beforebegin"){console.log("insertReview");let n=!1;const{isWdoRevOpen:a,isWdoRevExist:d}=s.Z;let c;const p=document.getElementById("seal-review-widget"),u=(0,o.$dqs)(".pagefly-review-widget-sealapp"),v=(0,o.$dqs)(".custom-vstar-review-widget");if(a&&!d)s.Z.isWdoRevExist=!0,c=t,i="afterbegin";else if(u)c=u,i="beforeEnd";else if(v)c=v,null===v.parentNode.offsetParent&&(n=!0),i="beforeEnd";else if(p)p.parentNode.parentNode.style.padding=0,c=p,i="beforeEnd";else{let e=null,r=l.Z.get_move_review_info;Object.keys(r).length?(61244833988===s.Z.shop_id&&130299592900===s.Z.themeId&&s.Z.isMobile&&(r.selector+=">.sf__accordion-content"),e=(0,o.$dqs)(r.selector),i=r.position,n=1===r.is_tab_review):t&&(e=t);let a=(0,o.$dqs)("#shopify-section-footer"),d=(0,o.$dqs)("main"),p=(0,o.$dqs)("footer"),u=(0,o.$dqs)('.shopify-section[id$="__main"],#shopify-section-product-template');e?c=e:u?(i="afterend",c=u):d?d.contains(p)?c=p:(i="afterend",c=d):a?c=a:p&&(c=p)}c&&(c.insertAdjacentHTML(i,e),!a&&(s.Z.revTar=c),s.Z.revTarWid=parseInt(window.getComputedStyle(c).width),n&&!s.Z.isNullRev&&function(){let e=(0,o.$dqs)(".custom-vstar-review-widget,#reviews-wrapper");if(e){e=e.parentNode;const t={attributes:!0},i=function(e,t){for(let i of e)null!==i.target.offsetParent&&(_(),s.Z.isGrid&&((0,r.SU)(),t.disconnect()))};(0,o.setObserve)(e,t,i,s.Z)}}())}function _(){const e=s.Z.reviewsDom,t=(0,o.$dqs)(".head-button",e),i=(0,o.$dqs)(".head-sort",e),n=(0,o.$dqs)(".head-center",e),r=(0,o.$dqs)(".head-left",e),a=(0,o.$dqs)("#reviews-head",e);e.padding=0,s.Z.revTarWid=parseInt(getComputedStyle(s.Z.revTar).width),s.Z.revTarWid<678&&!s.Z.isMobile&&(0,o.getWindowWidth)()>768?(s.Z.globalStyle.textContent+="#vstar-reviews .list-review{padding:30px 10px !important}\n #vstar-window-review .list-review{padding:30px 40px !important}",a.style.padding="33px 0 80px",n&&(n.style.left="200px",n.style.bottom="80px"),r.style.marginLeft="10px",e.style.padding=e.parentNode.style.padding=0,t&&(t.style.bottom=i.style.bottom="20px",i.style.left=t.style.right="auto",i.style.right=t.style.left="10px")):(n&&(n.style.cssText=""),t&&(t.style.cssText=""),r.style.cssText="",i.style.cssText="",a.style.cssText="")}function y(){!s.Z.RevIntersection&&s.Z.isProPage&&(s.Z.RevIntersection=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&((0,n.processRecordedData)("reviews_view"),s.Z.RevIntersection.disconnect())}),{})),s.Z.RevIntersection.observe(s.Z.reviewsDom)}function b(){let e=Review.theme.theme_store_id,t="";if(s.Z.isProPage){switch(e){case 887:case 1567:case 1356:case 1363:case 1368:case 1431:case 1434:case 1500:case 1499:case 796:case 775:case 829:t="page-width";break;case 730:case 679:case 380:t="wrapper";break;case 578:t="site-wrapper";break;default:"warehouse"===Review.theme.name?(s.Z.reviewsDom.parentNode.classList.add("container"),(0,o.$dqs)(".card--collapsed.card--sticky.card")&&(s.Z.reviewsDom.classList.add("card"),s.Z.globalStyle.textContent+="#vstar-reviews.card{border:none !important}")):s.Z.isMobile||(s.Z.globalStyle.textContent+="#vstar-reviews{max-width:1200px;padding: 0 40px;}")}if(""!=t){if(s.Z.isNullRev){const e=getComputedStyle((0,o.$dqs)("."+t)).paddingRight;s.Z.globalStyle.textContent+=`#vstar-noreviews button.noreviews-button {right:${e}}`}s.Z.reviewsDom.classList.add(t)}}else s.Z.isMobile||(s.Z.globalStyle.textContent+="#vstar-reviews{max-width:1200px;padding: 0 40px;}")}const A=(0,o.debounce)((()=>{s.Z.isGrid&&s.Z.isRevOpen&&(0,r.SU)()}),200);(0,o.debounce)((async()=>{const e=s.Z.reviewsDom,t=getReviewWidth();s.Z.wrapWid=t;let i=0;s.Z.revTar&&(i=parseInt(getComputedStyle(s.Z.revTar).width),s.Z.revTarWid=i),!s.Z.isMixReview&&_(),0!=t&&(e.style.width=i<678&&0!==i?s.Z.revTarWid+"px":t+"px")}),100)},421:(e,t,i)=>{i.d(t,{q3:()=>d,ru:()=>l});var s=i(247),n=i(642),o=i(894),r=i(693);let a=null;function l(){let e=`
${n.Z.userSetting.sidetab_setting.sidetab_button_text}
`;!(0,s.$dqs)("#vstar-tab")&&document.body.insertAdjacentHTML("beforeend",e),(0,s.$dqs)("#window-review-mask")||(document.body.insertAdjacentHTML("beforeend",''),a=(0,s.$dqs)(".window-review-mask"),a.onclick=function(e){(0,s.$dqs)("#vstar-window-review").contains(e.target)||c()}),(0,s.$dqs)("#vstar-tab").onclick=function(){if(n.Z.isWdoRevOpen=!0,document.body.classList.add("trustoo-open"),a=(0,s.$dqs)(".window-review-mask"),a.style.display="block",n.Z.isProPage&&(0,o.processRecordedData)("reviews_click"),!n.Z.isWdoRevExist&&(n.Z.wdoRev.node=(0,s.$dqs)("#vstar-window-review"),n.Z.isActWdoRev)){let e={};e.tarNode=n.Z.wdoRev.node,e.position="afterbegin",(0,r.Jh)(e)}}}function d(){(0,s.$dqs)(".window-close",n.Z.wdoRev.node).onclick=function(){c()}}function c(){n.Z.isWdoRevOpen=!1,a.style.display="none",document.body.classList.remove("trustoo-open")}},732:(e,t,i)=>{i.d(t,{Z:()=>r});var s=i(337),n=i(247),o=i(642);const r={get_move_review_info:{},custom_style_info:{},star_insert_adaptation_info:{},user_needs_solutions_info:{},bigRatingDigits:3,isOpenRecStars:!0,isShowRevVerified:!0,setUserNeed(){const{shop_id:e}=Review;55420682445===e&&o.Z.isProPage&&document.body.addEventListener("click",(function(e){e.target.classList.contains("reviews-text")&&"P"===e.target.tagName&&(0,n.$dqs)(".breadcrumb_pr_wrap").scrollIntoView({behavior:"smooth",block:"start"})})),Object.assign(this,function(){const e={};switch(o.Z.shop_id){case 55363502159:o.Z.isHomePage&&(e.customCollTarSel=".h1.product__title,.card__heading.h5>.full-unstyled-link");break;case 64402030811:o.Z.isHomePage&&(e.customCollTarSel='.glide-wrapper.glider-slide [data-product-type="title"]');break;case 59471560866:e.homeStarDelay=2e3,o.Z.isHomePage&&(e.customCollTarSel=".prod-thumb-title-color>a")}return e}())},setPageReview(e){let t=window.location.href,i=t.indexOf("pages/")+6,s=t.substring(i);const r=(0,n.$dqs)(".custom-vstar-review-widget,#vstar-all-reviews");r&&"vstar-all-reviews"===r.id&&(o.Z.isRevPage=!0),o.Z.allRev=r,([49048256661,62366974136,23928713].includes(e)||r||"reviews"===s)&&(["clienti-soddisfatti","shop-reviews","review-page","producto-mini","avis-menviking"].includes(s)||"reviews"===s||r&&"vstar-all-reviews"===r.id||r&&"custom-vstar-review-widget"===r.className&&!o.Z.productId)&&(this.isPageReview=!0)},async getUserNeedData(){const{pageType:e,themeId:t}=o.Z,i=this;if(o.Z.isHomePage||o.Z.isProPage||o.Z.otherPageColl||o.Z.isCollPage||i.isPageReview){let n,o;if("undefined"!=typeof vstar_custom_info?(n=vstar_custom_info,o=null):[o,n]=await s.E.getUserNeed(),null===o){for(let s in n){const o=n[s].list;if(0!==o.length)for(let n=0;n{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e=i(247),t=i(642),s=i(337),n=i(597),o=i(894),r=i(693),a=i(732),l=i(755),d=i(421),c=i(231),p=i(379),u=i.n(p),v=i(795),g=i.n(v),m=i(569),h=i.n(m),w=i(575),f=i.n(w),_=i(216),y=i.n(_),b=i(589),A=i.n(b),Z=i(911),$={attributes:{id:"trustoo-insert-css"}};$.styleTagTransform=A(),$.setAttributes=f(),$.insert=h().bind(null,"head"),$.domAPI=g(),$.insertStyleElement=y(),u()(Z.Z,$),Z.Z&&Z.Z.locals&&Z.Z.locals;let x=0,C=0,R=null;var q=i(402);async function k(i){let c,p,u;const{isActWdoRev:v,globalStyle:g,isHomePage:m,isProPage:h,isCartPage:w,isCollPage:f,hasPyRating:_,hasEcomRt:y}=t.Z,{pageType:b,isMobile:A}=Review;await a.Z.getUserNeedData();const{isCollReview:Z,isCollStartDelay:$,isPageReview:k,reviewsPageCount:S,homeStarDelay:L,isCollRevWord:T}=a.Z;Review.is_install=i.is_install,Review.is_product_open=i.is_activate_product_rating,Review.is_reviews_open=i.is_activate_reviews,Review.is_collection_open=i.is_activate_collection_rating,Review.is_activate_home_rating=i.is_activate_home_rating,Review.is_show_stars_without_review=i.is_show_stars_without_review,Review.theme_version=i.theme_version,t.Z.userSetting=i,t.Z.revHeadType=1===i.is_hide_ratings?2:1,(0,e.$dqs)("#trustoo-mask")||document.body.insertAdjacentHTML("beforeend",'');let E=i;Review.lang=Shopify.locale;const I="collection"!=b||Z||v||k;if(I){let s=!1,n=!1;1==i.layout?(c="list-",u=3,s=!0):2==i.layout&&(c="grid-",u=5,n=!0,t.Z.gridLoadedShowImg=0,t.Z.gridShowImgCount=0),p=E.reviews_per_page_number,S&&(p=S),(0,e.returnCitySN)(t.Z),Object.assign(t.Z,{layoutClass:c,layoutReviewCount:p,reviewsRow:u,globalStyle:g,isGrid:n,isList:s})}if((I||T)&&await async function(e){const i=["ar","bg","cs","da","de","el","en","es","ar","bg"].concat(["cs","da","de","el","en","es","et","fi","fr","he"]).concat(["hr","hu","id","it","ja","ka","lt","lv","ms","nl"]).concat(["no","pl","pt","ro","sk","sl","sv","th","tr","zh-TW"]);let n=!0;if(1===e.auto_switch_language){const t=Shopify.locale;Review.lang="zh-TW"===t?t:t.split("-")[0],i.includes(Review.lang)?Review.lang!==e.language&&(n=!1):Review.lang=e.language}else Review.lang=e.language;let o,r,a="undefined"!=typeof vstar_lang_json;a&&n&&!t.Z.isSettingUpdate?(o=null,r=vstar_lang_json):([o,e]=await s.E.getLang(),null===o?r=JSON.parse(e.lang_json):a&&(r=vstar_lang_json)),null===o&&r&&(r.show_full_review&&(t.Z.ellipsisText=r.show_full_review),45159514262===t.Z.shop_id&&"es"===Review.lang&&(r.reply="Respuesta"),Object.assign(t.Z,{lang:r}))}(i),function(i,s){let n=`.vstar-star{--star-color:${t.Z.userSetting.star_color};\n\t--nostar-color:${t.Z.userSetting.nostar_color};}`;if(s){const s=i.font_color;let o=i.box_bg_color;const r=t.Z.theme_store_id;1356!==r&&1567!==r||"#FFFFFF"===o&&(o="rgba(0,0,0,0)");let a=i.border_radius+"px";1356===r?a="10px":1567===r?a="40px":1368===r&&(a="6px");const l="Dark"===i.card_shadow?"1px 1px 6px rgba(0, 0, 0, 0.1)":"0px 0px 3px rgba(0, 0, 0, 0.2)";n+=`\n #reviews-wrapper,#noreviews-wrapper,#vstar-reviews,\n #vstar-noreviews{\n background-color: ${o};\n --font-color: ${s};\n --font-color-o4: ${(0,e.hexToRgba)(s,.4)};\n --font-color-o7: ${(0,e.hexToRgba)(s,.7)};\n --font-color-o8: ${(0,e.hexToRgba)(s,.8)};\n\t\t\t\t\t--font-size:${i.font_size}px;\n --bg-color:${o};\n --badge-text-color:${i.badge_text_color};\n --card-color:${i.card_bg_color};\n --box-bg-color:${o};\n --button-radius:${a};\n --button-color:${i.button_color};\n --button-bd-color:${i.button_bg_color};\n --button-border-color:${i.button_border_color};\n\t\t\t\t\t--line-color:${i.dividing_line_color};\n }\n\t\t\t\t.trustoo-widget{--sprites-image-url:url(https://${t.Z.staticBaseUrl}/static/images/sprites/trustoo_sprites.png?${t.Z.constructTime});}\n #vstar-window-review,#vstar-window-review #reviews-wrapper,\n #vstar-window-review #vstar-reviews{background-color: ${o.slice(0,7)};}\n @media only screen and (min-width:768px) {\n #reviews-wrapper.container #vstar-reviews {\n max-width: initial;\n padding: 0 40px;\n border: 1px solid var(--border-color);\n }\n }\n #vstar-reviews.pending>* {\n opacity: 0 !important;\n }\n\t\t\t\t#vstar-reviews #reviews-body .grid-review{\n\t\t\t\t\tbox-shadow: ${l};\n\t\t\t\t}\n\t\t\t\t#vstar-reviews #reviews-body .reviews-text{\n\t\t\t\t\tfont-size:${i.font_size}px;\n\t\t\t\t}\n .product-icon-list i,#trustoo-allinone i,\n .write-review-container i{font-size:16px}\n #reviews-head i{font-size:20px}\n `,t.Z.isGrid&&(n+=`.grid-review{background-color: ${i.card_bg_color}}\n #vstar-reviews #reviews-body{margin-top:16px !important}`)}void 0!==a.Z.custom_style_info.css_style_code&&(n+=a.Z.custom_style_info.css_style_code),a.Z.vstarCustomSty&&(n+=a.Z.vstarCustomSty),t.Z.globalStyle.insertAdjacentHTML("beforeend",n)}(i,I),_||y)(0,e.$dqs)(".pagefly-review-widget-sealapp,.custom-vstar-review-widget")||t.Z.isHomePage&&1===i.is_activate_home_reviews?(shopifyObj.productId||(t.Z.isMixReview=!0),t.Z.isRevOpen=!0):t.Z.isProPage&&1===i.is_activate_reviews&&(t.Z.isRevOpen=!0),(0,o.setInsertTarget)(2),await(0,o.getTotalRating)();else if(h)t.Z.isProRatingOpen=1===i.is_activate_product_rating,1==i.layout?((1==i.is_transparent||A)&&(i.is_transparent=0),E.card_bg_color=(0,e.hexToRgba)(i.card_bg_color,i.is_transparent)):E.card_bg_color=i.card_bg_color,async function(){x=0;let i=null,n="afterend";const r=(0,e.$dqs)("#trustoo-buyers-show-widget");if(i="undefined"==typeof vstar_buyers_show_settings||t.Z.isSettingUpdate?(await s.E.getBuyerShowsSettings())[1]:vstar_buyers_show_settings,!(i&&1===i.is_activated||r))return;if(t.Z.bsInsertSelector)R=(0,e.$dqs)(t.Z.bsInsertSelector),n="afterbegin";else if(r)R=r,n="afterbegin";else if(null!==(0,e.$dqs)("product-form.product-form")||[1499,1567,1356,1363,1368,1434,887,1500,1431,1841,1891].includes(t.Z.theme_store_id))R=(0,e.$dqs)("product-form.product-form").parentNode;else{let i="";switch(t.Z.theme_store_id){case 829:i=".product__form-wrapper";break;case 775:case 796:case 578:i="form.product-form";break;case 730:i="form.product-single__form";break;case 679:i="form.addToCartForm";break;case 380:i="form.product-form--wide";break;default:i="warehouse"===Review.theme.name?"form.product-form":"Tema-plano-ouro-ldo"===Review.theme.name?".product-form__payment-container":"form[id^=AddToCartForm],form.product-form,product-form.product-form,form[id^=product_form]"}i&&(0,e.$dqs)(i)?R=(0,e.$dqs)(i):reviewsData.buyersShowTip="买家秀嵌入失败"}x++,C=i.columns_count*i.rows_count;const a=1/i.columns_count*100+"%",l=document.createElement("style");document.head.appendChild(l),t.Z.is=l,R||(R=(0,e.$dqs)(".product-form")),t.Z.insHoverColor=i.hover_text_color;const d=await async function(i){t.Z.buyersShowType=2===i?1:2;const n=(await s.E.getProRevList("image-descending",0,x,C,t.Z.buyersShowType,!0))[1];t.Z.lastPageSize||(t.Z.lastPageSize=n.count%C,t.Z.total_page=n.total_page);const o=n.list,r=JSON.parse((0,e.gsSession)("get","tt_detail_reviews"));r.trustoo_show_reviews.push(o),(0,e.gsSession)("set","tt_detail_reviews",JSON.stringify(r)),1===x&&(t.Z.insPageCount=n.total_page);let a="";return o.forEach(((e,t)=>{if(0===e.resources.length||!e.resources[0].src&&!e.resources[0].thumb_src)return;const i=e.resources[0].src||e.resources[0].thumb_src;a+=`
\n
\n
\n
`})),a}(i.reviews_type);if(""===d)return;const c=``;R.insertAdjacentHTML(n,c);const p=(0,e.$dqs)("#tt-bs-list");d?p.insertAdjacentHTML("beforeend",d):t.Z.isNoPost=!0,p.onclick=i=>{if("review-item"===i.target.className){const[s,n]=i.target.getAttribute("index").split("-"),r=JSON.parse((0,e.gsSession)("get","tt_detail_reviews")).trustoo_show_reviews;(0,o.processRecordedData)("reviews_click"),showReviewDetail(t.Z,"",r[s][n],"trustoo_buyers_show")}},l.textContent+=`\n #tt-bs-area .tt-bs-title{color:${i.title_text_color};font-size:${i.title_font_size}px;text-align:${i.title_align}}\n #tt-bs-list .tt-wrapper{flex-basis:${a};padding:${i.item_padding}px;}\n #tt-bs-list .review-item{border-radius:${i.border_radius}px;}\n `,(0,e.$dqs)("#tt-bs-area").style.display="block"}(),-1!==location.search.indexOf("req=review")&&(t.Z.isLinkReqRev=!0),1===i.is_activate_reviews&&(t.Z.isRevOpen=!0),await(0,o.getTotalRating)();else if(f||a.Z.otherPageColl)2!==i.is_activate_collection_rating&&($&&await(0,e.setDelay)(2e3),await(0,n.vW)(),0===Review.collTarget.length||(0,o.setInsertTarget)(2)),1===E.is_activate_reviews&&Z&&(t.Z.isMixReview=!0,(0,r.Jh)({}));else if(m){let r,d,c="",p=[],{productId:u,productImages:v,productName:g}=t.Z,m=!1;if(t.Z.isHomeRatingOpen=1===i.is_activate_home_rating,1===i.is_activate_home_reviews){t.Z.isRevOpen=!0,t.Z.isHomeReview=m=!0;let[e,i]=await s.E.getOnlyOneProduct();r=i,null===e&&r&&(u=r.product_id,g=r.product_title,v=r.image_src,c=r.product_handle)}if(1===i.is_activate_home_rating||m){if(await(0,l.pL)(),d=Review.proTarget,1===i.is_activate_home_rating){L&&await(0,e.setDelay)(L),await(0,n.vW)(),p=Review.collTarget;let t=p.length;1===t?p[0]===d?p.pop():(0,o.setInsertTarget)(2):0!==t&&((p.includes(d)||p[0].contains(d))&&(Review.proTarget=d=null),(0,o.setInsertTarget)(2))}if(!u&&d&&(g=Review.proTarget.textContent.replace(/\n/g,"").trim(),g)){let[e,t]=await s.E.getProductInfo(encodeURIComponent(g));null===e&&t&&(u=t.product_id,v=t.image_src,c=t.product_handle)}1===i.is_activate_home_reviews&&(r||u||(t.Z.isMixReview=!0)),a.Z.isHomeAllReviews&&(t.Z.isMixReview=!0),Review.productId=u,Object.assign(t.Z,{productId:u,productName:g,productImages:v,productHandle:c}),(u||t.Z.isMixReview)&&await(0,o.getTotalRating)()}}else if(w)(0,e.gsSession)("get","tt_pv_product_id")&&(t.Z.cartWatcher=new q.f,await t.Z.cartWatcher.init(),(0,o.processRecordedData)("add_to_cart",t.Z.cartWatcher.storedCartToken(),!0));else if(k){t.Z.isMixReview=!0;let e={};t.Z.allRev&&(e.tarNode=t.Z.allRev,e.position="afterbegin"),t.Z.isInsertRev=!0,(0,r.Jh)(e)}if(v){t.Z.isInsertRev||(0,d.ru)();const e=i.sidetab_setting,s=`#vstar-tab{ background-color:${e.sidetab_background_color}; color:${e.sidetab_font_color} } `;g.insertAdjacentHTML("beforeend",s)}}setTimeout((()=>async function(){if("undefined"!=typeof trustoo_shopify_block_status){if(1===trustoo_shopify_block_status)return;2===trustoo_shopify_block_status&&(trustoo_shopify_block_status=1)}let i,n,o,l="";if(window.Review={},Review.observeCount=0,Review.theme=Shopify.theme,(0,e.$dqs)("body.warehouse--v1")&&(Review.theme.name="warehouse"),t.Z.productId=shopifyObj.productId,t.Z.env="production",t.Z.staticBaseUrl="cdn.vstar.app",t.Z.isMobile=Review.isMobile=(0,e.isMobile)(),Review.constructTime="2023-11-20 10:50:43",t.Z.constructTime=new Date("2023-11-20 10:50:43").getTime()/1e3,Review.shop=Shopify.shop,t.Z.baseUrl=Review.baseUrl="api.trustoo.io",t.Z.isWebPSupported=(0,e.isWebPSupported)(),Review.collTarget=[],Review.loadedPhoto=[],Review.checkGridHighMsg=[],Review.checkGridMsg=[],window.ShopifyAnalytics)i=window.ShopifyAnalytics&&ShopifyAnalytics.lib&&ShopifyAnalytics.lib.config&&ShopifyAnalytics.lib.config.Trekkie.defaultAttributes.shopId,i||(i=shopifyObj.shop_id),Review.shop_id=t.Z.shop_id=i,Shopify&&Shopify.theme&&(t.Z.theme_store_id=Shopify.theme.theme_store_id,t.Z.themeId=Shopify.theme.id),l=window.ShopifyAnalytics&&window.ShopifyAnalytics.meta.page.pageType;else{if(!document.querySelector("#seal_shop_id"))return;"undefined"!=typeof tt_page_type&&(l=tt_page_type);const e=JSON.parse(document.querySelector("#seal_shop_id").textContent);if(Review.shop_id=t.Z.shop_id=e,"product"===l){const e=JSON.parse(document.querySelector("#tt_product").textContent);Review.productId=t.Z.productId=e.id,t.Z.productName=e.title,t.Z.productImages=e.image_url}}Review.pageType=l,t.Z.pageType=l,t.Z.isHomePage="index"===l||"home"===l,t.Z.isCollPage="collection"===l,t.Z.isProPage="product"===l,t.Z.isCartPage="cart"===l;const d=await s.E.getInstallStatus();if(null!==d[0]||-1===d[1].code)return;if(t.Z.isProRatingUpdate=1===d[1].product_rating_updating,t.Z.isSettingUpdate=1===d[1].shop_setting_updating,t.Z.isReviewsUpdate=1===d[1].product_review_updating,t.Z.isReviewsUpdate?t.Z.revReqParam=(new Date).getTime():t.Z.revReqParam=d[1].product_review_updating,(0,e.gsSession)("set","instagram_is_install",d[1].instagram_is_install),(0,e.gsSession)("set","tt_detail_reviews",JSON.stringify({trustoo_reviews:[],trustoo_show_reviews:[],trustoo_all_reviews:[]})),1!==d[1].review_is_install)return;const p="undefined"!=typeof vstar_review_settings&&vstar_review_settings;p&&!t.Z.isSettingUpdate?o=p:([n,o]=await s.E.getUserSetting(),null!==n&&(await(0,e.setDelay)(1e3),[n,o]=await s.E.getUserSetting()),null!==n&&(await(0,e.setDelay)(3e3),[n,o]=await s.E.getUserSetting()));const u=(0,e.gsSession)("get","vstarTimestamp");if(u)t.Z.timestamp=u,t.Z.isCssLoaded=!0;else{t.Z.isFirstExecute=!0;const i=(new Date).getTime();(0,e.gsSession)("set","vstarTimestamp",i),t.Z.timestamp=i}t.Z.isActWdoRev=1===o.sidetab_setting.sidetab_is_enabled,a.Z.setPageReview(i);const v=(0,e.$dqsa)(".pagefly-star-rating-sealapp"),g=(0,e.$dqsa)(".ecom-star-rating-sealapp"),m=(0,e.$dqsa)(".custom-vstar-rating-widget");if(0!==v.length){const e=".pagefly-star-rating-sealapp";a.Z.isCollRevWord=!0,t.Z.hasPyRating=!0,a.Z.customCollTarSel=e,Review.collTarget=Array.from(v)}else 0!==g.length&&(a.Z.customCollTarSel=".ecom-star-rating-sealapp",t.Z.hasEcomRt=!0,Review.collTarget=Array.from(g));if(0!==m.length&&(t.Z.isProPage||(a.Z.isCollRevWord=!0,a.Z.customCollTarSel=".custom-vstar-rating-widget",t.Z.hasPyRating=!0,Review.collTarget=Array.from(m))),"undefined"!=typeof trustooBeforeExecute&&trustooBeforeExecute(t.Z,a.Z),t.Z.isProPage||t.Z.isCollPage||t.Z.isHomePage||t.Z.isCardPage||Shopify.designMode||a.Z.isPageReview||t.Z.isActWdoRev||a.Z.otherPageColl||t.Z.hasPyRating||t.Z.hasEcomRt){let i=document.createElement("style");i.id="trustoo-css",document.head.appendChild(i),t.Z.globalStyle=i,a.Z.setUserNeed(),Object.assign(t.Z,a.Z);const s=async function(){if(t.Z.isProPage){let e=shopifyObj.productId,i=shopifyObj.productImage[0],s=shopifyObj.productName;Review.productId=e,Object.assign(t.Z,{productId:e,productImages:i,productName:s});const n=location.href.indexOf("/products/");-1!==n&&(t.Z.productHandle=location.href.substring(n+10))}(0,e.imgLoadLimit)(["//cdn.vstar.app/static/images/default.png","//cdn.vstar.app/static/images/video_default.png",`//${t.Z.staticBaseUrl}/static/images/sprites/trustoo_sprites.png?${t.Z.constructTime}`,"//rtestweb.sealapps.com/static/images/player.png"],3),k(o),function(){let i=Review.baseUrl;if("production"===t.Z.env&&(i="cdn.vstar.app"),"local"!==t.Z.env){var s=document.createElement("link");s.rel="stylesheet";const n=`https://${i}/static/dist/css/trustoo-reviews.min.css?`+t.Z.constructTime;s.href=n,s.onerror=function(){this.href=n},s.onload=async function(){if(!t.Z.isCssLoaded){t.Z.isCssLoaded=!0;const i=(0,e.$dqs)("#vstar-tab");i&&(i.style.display="flex");const s=(0,e.$dqs)(".product-icon-list.vstar-star");s&&(s.style.display="block"),t.Z.reviewsDom&&t.Z.firstPageShow&&(t.Z.reviewsDom.classList.remove("pending"),(0,e.$dqs)("#reviews-body",t.Z.reviewsDom).style.opacity=1)}t.Z.isFirstExecute&&t.Z.reviewsDom&&t.Z.isGrid&&(0,c.qT)((0,e.$dqs)("#reviews-body",t.Z.reviewsDom),!0)},document.head.appendChild(s)}else t.Z.isCssLoaded=!0;var n=document.createElement("link");n.rel="stylesheet",n.href=`https://${i}/static/css/index.css`;var o=document.createElement("link");o.rel="stylesheet",o.href=`https://${i}/static/css/trustoo-sprite.min.css`,document.head.appendChild(n),document.head.appendChild(o)}(),function(){let i=["https://cdn.bootcss.com/blueimp-md5/2.12.0/js/md5.min.js"];if(!(0,e.$dqs)(".tt-review-detail-js")){let e=`https://${t.Z.staticBaseUrl}/static/js/tt-review-detail.js?`+t.Z.constructTime;"local"===t.Z.env&&(e=`../../js/tt-review-detail.js?${(new Date).getTime()}`),i.push(e)}i.forEach(((e,i)=>{let s=document.createElement("script");s.src=e,s.setAttribute("defer",!0),1===i&&(s.className="tt-review-detail-js",s.onload=function(){insertReviewDetail(t.Z)}),document.head.appendChild(s)}))}(),(t.Z.isProPage||t.Z.isHomePage||a.Z.isPageReview)&&window.addEventListener("resize",(function(){!t.Z.isMobile&&t.Z.isGrid&&(0,r.fc)()}))};a.Z.executeDelay&&await(0,e.setDelay)(a.Z.executeDelay),s()}}()),100)})()})(); //# sourceMappingURL=seal-review.min.js.map