PageSourceSearch

https://www.citiesocial.com/cdn/shop/t/18/assets/main.bundle.js?v=6404864979587091091789718571

js citiesocial.com collected 2026-09-24 17:39:31 UTC 54,226 bytes, 1 lines download raw bytes

1(self.webpackChunkcitiesocial_theme=self.webpackChunkcitiesocial_theme||[]).push([[792],{48:()=>{document.addEventListener("DOMContentLoaded",()=>{const{slideshow:e}=window;e&&function(){const{slideshow:e}=window,{referralLabel:t}=e;let n="";e.blocks.forEach((e,o)=>{const{link:i,isShowHeadingAndSubheading:r,contentColor:a,contentColor2:s,contentColor3:c,contentVerticalPosition:l,contentHorizontalPosition:d,heading:u,subheading:p,buttonText:f,imageURL:h}=e,m=`horizontal-position-${d} vertical-position-${l}`,g=r?`<h2>${u}</h2>\n        <h5>${p}</h5>\n        ${f?`<div\n          class="slideshow__item-content-btn"\n          style="background-color: ${c}; color: ${s};">${f}</div>`:""}`:"";let v=i;t&&(v=i.includes("?")?`${i}&ref=${t}`:`${i}?ref=${t}`);const _=`<div class="slideshow__item-container">\n                        <div class="slideshow__item-image">\n                          <picture>\n                            <source media="(min-width: 992px)" srcset="${h.w1080} 1x, ${h.w1440} 1.5x">\n                            <source media="(max-width: 991px)" srcset="${h.w1080} 1x, ${h.w1440} 1.5x">\n                            <source media="(max-width: 767px)" srcset="${h.w720} 1x, ${h.w960} 1.5x">\n                            <img src="${h.w1440}">\n                          </picture>\n                        </div>       \n                        <div class="slideshow__item-content" style="color: ${a};">\n                          ${g}\n                        </div>\n                        <div class="slideshow__item-overlay">\n                        </div>\n                      </div>\n                      `;n+=i?`\n        <a\n          data-carousel-index="${o+1}" data-title="${u}" \n          href="${v}" class="item slideshow__item ${m}"\n        >\n          ${_}\n        </a>`:`\n        <div \n          data-carousel-index="${o+1}" data-title="${u}" \n          class="item slideshow__item ${m}"\n        >\n          ${_}\n        </div>`});const o=$(".js-slideshow");o.removeClass("slideshow-skeleton"),o.html(n);let i=!1;$(".slideshow__item").click(e=>{if(i)return;const t=$(e.target).closest("a.slideshow__item"),n=t.attr("data-title"),o=t.attr("data-carousel-index"),r=t.attr("href");
1window.segmentTracking.topBannerClicked({title:n,index:o,click_url:r})}),o.on("beforeChange",()=>{i=!0}),o.on("init afterChange",()=>{i=!1}),o.slick({centerMode:!0,centerPadding:"42px",autoplay:!1,autoplaySpeed:e.autoplayTimeout,arrows:!1,dots:!0,fade:!1,mobileFirst:!0,touchThreshold:4,initialSlide:0,slidesToShow:1,slidesToScroll:1,prevArrow:'<div class="slick-prev"><i class="cs_icon icon-arrow-left"></i></div>',nextArrow:'<div class="slick-next"><i class="cs_icon icon-arrow-right"></i></div>',responsive:[{breakpoint:RESPONSIVE_MIDDLE_BREAKING_POINT,settings:{centerMode:!0,variableWidth:!0,arrows:!0,dots:!1}}]})}()})},1614:()=>{window.addEventListener("DOMContentLoaded",()=>{}),window.document.documentMode&&(window.location.href="https://www.citiesocial.com/pages/browser-not-supported"),function(){const e=window.localStorage.getItem("cart-session-id");e&&(document.cookie=`cart=${e};path=/`,window.localStorage.removeItem("cart-session-id"),location.reload())}()},35856:()=>{async function e(){if(Citiesocial.authManager.getAccessToken()){const e=await Citiesocial.userManager.fetchUserFavoriteProductIds(),t=sessionStorage.getItem("favoriteProductID");t&&(await Citiesocial.userManager.addProductsToFavorites([t.toString()]),e.push(parseInt(t)),sessionStorage.removeItem("favoriteProductID"),window.segmentTracking.productAddedToWishlist({product_id:JSON.parse(t)})),Citiesocial.userManager.setUserFavoriteProductIds(e),window.dispatchEvent(new Event("userFavoriteProductIdsUpdate"))}else Citiesocial.userManager.setUserFavoriteProductIds([])}document.addEventListener("DOMContentLoaded",()=>{!async function(){const e=await Citiesocial.productManager.fetchAllCategories();e.results.forEach(e=>{e.shopify_collection_handle=`pg_${e.id}`,e.collection_groups.forEach(e=>{e.menu_collections.forEach(e=>{e.shopify_collection_handle=`pg_${e.id}`})})}),window.localStorage.setItem("categories",JSON.stringify(e.results)),window.dispatchEvent(new Event("categories"));const t=function(e){const t={},n=e.length;for(let o=0;o<n;o+=1){const n=e[o],i=n.collection_groups,r=i.length;for(let e=0;e<r;e+=1){const o=i[e],r=o.menu_collections,a=r.length;for(let e=0;e<a;e+=1){const i=r[e];t[i.shopify_collection_handle]={menuCollectionTitle:i.title,collectionGroupTitle:o.title,categoryTitle:n.title}}}}return t}(e.results);window.localStorage.setItem("menuCollectionsByHandleWithCategory",JSON.stringify(t)),window.dispatchEvent(new Event("menuCollectionsByHandleWithCategory"))}(),$(".menu__group").on("hide.bs.collapse",function(){$(this).find(".icon-accordion-close").css("display","block"),$(this).find(".icon-accordion-open").css("display","none")}),$(".menu__group").on("show.bs.collapse",function(){$(this).find(".icon-accordion-close").css("display","none"),$(this).find(".icon-accordion-open").css("display","block")}),e(),$(document).on("favorite.init",e)})},40462:()=>{document.addEventListener("DOMContentLoaded",async()=>{const e=new URLSearchParams(window.location.search).get("clid");e&&(await async function({clid:e}){const t=await Citiesocial.userManager.getLineMember({clid:e});localStorage.setItem("lineMember",JSON.stringify(t))}({clid:e}),function({key:e}){const t=new URL(window.location.href);t.searchParams.delete(e),window.history.replaceState({},"",t)}({key:"clid"}));const t=JSON.parse(localStorage.getItem("lineMember")),n=sessionStorage.getItem("cs_userId");if(t)if(n){if(!localStorage.getItem("cs_access_token"))return;Citiesocial.userManager.mapLineMemberToCustomer({customer_id:n,line_uid:t.line_uid}),localStorage.removeItem("lineMember")}else if(t.customer_id){if(t.hasIdentified)return;window.analytics.identify(t.customer_id),localStorage.setItem("lineMember",JSON.stringify({...t,hasIdentified:!0}))}})},53223:()=>{document.addEventListener("DOMContentLoaded",()=>{!function(){const e=document.querySelector(".search__query"),t=document.querySelector(".search__results"),n=document.querySelector(".search__icon"),o=document.querySelector(".search-results-back__icon"),i=document.querySelector(".search__clear"),r=document.querySelector(".cs3-header"),a=document.getElementById("mobile-search__results"),s=document.querySelector(".mobile-search__recommend"),c=document.querySelector(".mobile-search__main-content"),l=document.querySelector("#mobile-search__results .spinner-container"),d=(document.querySelector('#mobile-search__results [data-action="ai-assistant-start"]'),document.querySelector('.cs-header__search [data-action="ai-assistant-start-desktop"]'),window.innerWidth<RESPONSIVE_MIDDLE_BREAKING_POINT),u='<div class="search__results-no-results">
1沒有搜尋結果</div>';function p(){l.classList.remove("is-show")}async function f(){const n=function(e){const t=e.toString();return encodeURIComponent(t.trim())}(e.value);if(!n||""===n)return t.innerHTML="",p(),s.classList.add("is-show"),void c.classList.remove("is-show");if(d){if(IS_LAUNCH_MOBILE_AUTOCOMPLETE){l.classList.add("is-show"),s.classList.remove("is-show"),c.classList.remove("is-show");const e={collectionHandle:SEARCH_SUGGESTION,searchText:n},{categories:t,tags:o,brands:i,products:r}=await Citiesocial.productManager.fetchProducts(e),a=function({categories:e=[],tags:t=[],brands:n=[],products:o=[],searchText:i=""}){const r=e.length>0,a=t.length>0,s=n.length>0,c=o.length>0;let l="";if(!(r||a||s||c))return u;if(r){let t="";e.forEach(e=>{t+=`<a href="/pages/in-house-search-results-page?category=${e}&search=true"><div class="label-item">${e}</div></a>`}),l+=`<div class="search__results-lists"><h4>分類</h4>${t}</div>`}if(a){let e="";t.forEach(t=>{e+=`<a href="/pages/in-house-search-results-page?type=general&q=${t}&search=true"><div class="label-item">${t}</div></a>`}),l+=`<div class="search__results-lists"><h4>關鍵字</h4>${e}</div>`}if(s){let e="";n.forEach(t=>{e+=`<a href="/pages/in-house-search-results-page?type=brand&q=${encodeURIComponent(t)}&search=true"><div class="label-item">${t}</div></a>`}),l+=`<div class="search__results-lists"><h4>品牌</h4>${e}</div>`}if(c){const e=o.length,t=8;let n=0;for(let i=0;i<e;i+=1){const{cover_image_url:e,handle:r,title:a}=o[i];if(n===t)break;l+=`<a href="/products/${r}?search=true" class="search__results-item">\n                                <img class="item__img" src="${e}">\n                                <div class="item__title">${a}</div>\n                              </a>`,n+=1}l+=`<a href="/pages/in-house-search-results-page?type=general&q=${i}" class="search__results-all">顯示全部商品</a>`}return l}({categories:t,tags:o,brands:i,products:r,searchText:n});p(),c.innerHTML=a,c.classList.add("is-show")}}else if(t.innerHTML='<div class="spinner-container"><div class="spinner spinner--circle"></div></div>',"in-house"===SEARCH_ENGINE){const e={collectionHandle:SEARCH_SUGGESTION,searchText:n},{categories:o,tags:i,brands:r,products:a}=await Citiesocial.productManager.fetchProducts(e),s=function({categories:e=[],tags:t=[],brands:n=[],products:o=[],searchText:i=""}){const r=e.length>0,a=t.length>0,s=n.length>0,c=o.length>0;let l="";if(!(r||a||s||c))return u;if(r){let t="";e.forEach(e=>{t+=`<a href="/pages/in-house-search-results-page?category=${e}&search=true"><div class="tag__item">${e}</div></a>`}),l+=`<div class="search__results-tags"><h4 class="tags-title">商品分類</h4><div class="tags-wrapper">${t}</div></div>`}if(a){let e="";t.forEach(t=>{e+=`<a href="/pages/in-house-search-results-page?type=general&q=${t}&search=true"><div class="tag__item">${t}</div></a>`}),l+=`<div class="search__results-tags"><h4 class="tags-title">關鍵字</h4><div class="tags-wrapper">${e}</div></div>`}if(s){let e="";n.forEach(t=>{e+=`<a href="/pages/in-house-search-results-page?type=brand&q=${encodeURIComponent(t)}&search=true"><div class="tag__item">${t}</div></a>`}),l+=`<div class="search__results-tags"><h4 class="tags-title">品牌</h4><div class="tags-wrapper">${e}</div></div>`}if(c){const e=o.length,t=8;let n=0;for(let i=0;i<e;i+=1){const{cover_image_url:e,handle:r,title:a,price:s}=o[i];if(n===t)break;l+=`<a href="/products/${r}?search=true" class="search__results-item">\n                                <img class="item__img" src="${e}">\n                                <div class="item__title">${a}</div>\n                                <div class="item__price" data-money-convertible data-base-value="${s}" data-base-currency="TWD">\n                                  <span class="money">\n                                    NT$ ${Number(s).toLocaleString("zh-TW")}\n                                  </span>\n                                </div>\n                              </a>`,n+=1}l+=`<a href="/pages/in-house-search-results-page?type=general&q=${i}" class="search__results-all">顯示全部商品</a>`}return l}({categories:o,tags:i,brands:r,products:a,searchText:n});t.innerHTML=s}else if("shopify"===SEARCH_ENGINE){const n=[],o=function(e,t){let n="";if(1===e.length&&0===t.length)return u;if(t.length>0){let e="";t.forEach(t=>{e+=`<a href="/pages/in-house-search-results-page?type=keyword&q=${t.title}"><div class="tag__item">${t.title}</div></a>`}),n+=`<div class="search__results-tags">${e}</div>`}return e.length>
11&&e.forEach(e=>{if("product"===e.object_type){const{title:t,url:o,image:i,price_min:r}=e,a=r/100;n+=`<a href="${o}" class="search__results-item">\n                                <img class="item__img" src="${i}">\n                                <div class="item__title">${t}</div>\n                                <div class="item__price" data-money-convertible data-base-value="${a}" data-base-currency="TWD">\n                                  <span class="money">\n                                    NT$ ${Number(a).toLocaleString("zh-TW")}\n                                  </span>\n                                </div>\n                              </a>`}if("all_results"===e.object_type){const{url:t}=e;n+=`<a href="${t}" class="search__results-all">顯示全部商品</a>`}}),n}(await fetch(`/search?q=${e.value}*&view=json&type=product&options%5Bunavailable_products%5D=hide`).then(e=>e.json()),n);t.innerHTML=o}window.segmentTracking.productsSearched("autocomplete","show","general","",e.value)}e.addEventListener("input",Citiesocial.utils.debounce(f,400,{callFirst:!0})),[t,a].forEach(t=>{t.addEventListener("click",()=>{window.segmentTracking.productsSearched("autocomplete","click","general","",e.value)})}),d&&"in-house"===SEARCH_ENGINE&&IS_LAUNCH_MOBILE_AUTOCOMPLETE&&(n.addEventListener("click",()=>{r.classList.add("cs-header--search-results-show"),a.classList.add("is-show"),$(".addToCart").hide(),$(".cs3-navbar li").length&&$(".cs3-navbar").hide(),$("body").addClass("no-scroll")}),o.addEventListener("click",()=>{r.classList.remove("cs-header--search-results-show"),a.classList.remove("is-show"),$(".addToCart").show(),$(".cs3-navbar li").length&&$(".cs3-navbar").show(),$("body").removeClass("no-scroll")}),i.addEventListener("click",()=>{e.value="",f()}))}()}),document.addEventListener("DOMContentLoaded",()=>{const e=window.innerWidth<RESPONSIVE_MIDDLE_BREAKING_POINT,t=(e,t)=>{const n=e.slice();return Citiesocial.utils.shuffle(n),n.slice(0,t)};(async()=>{function n(t){if(e){const e=document.getElementById("mobile-search__results");new IntersectionObserver(([e])=>{"is-show"===e.target.className&&window.segmentTracking.searchBarKeywordViewed({query:t})},{attributes:!0}).observe(e)}else window.segmentTracking.searchBarKeywordViewed({query:t});document.querySelectorAll(".popular-keyword-label").forEach(e=>{e.addEventListener("click",e=>{window.segmentTracking.searchBarKeywordClicked({query:e.currentTarget.innerText,target_url:e.currentTarget.href})})})}!function(o){Citiesocial.utils.shuffle(o);let i="",r="";const a=t(o,7),s=t(o,20);e?(s.forEach(e=>{r+=`<a href="/pages/in-house-search-results-page?type=general&q=${e}" class="label-item popular-keyword-label">${e}</a>`}),document.querySelector(".mobile-search__popular-keywords .popular-keywords-items").innerHTML=r,n(s)):(a.forEach(e=>{i+=`<a href="/pages/in-house-search-results-page?type=general&q=${e}" class="keyword-link popular-keyword-label">${e}</a>`}),document.getElementById("header__popular-keywords").innerHTML=i,n(a))}(await(async()=>fetch("https://py3-api.citiesocial.com/api/v1.2/search-engine/trending-keywords/").then(e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()}).then(({results:{trending_keywords:e}})=>e.map(e=>e.word)).catch(e=>{console.error("Fetching error:",e)}))())})()})},67640:(e,t,n)=>{"use strict";function o(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){return e instanceof o(e).Element||e instanceof Element}function r(e){return e instanceof o(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}n(35856),n(53223),n(94872),n(48),n(40462);var s=Math.max,c=Math.min,l=Math.round;function d(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function u(){return!/^((?!chrome|android).)*safari/i.test(d())}function p(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var a=e.getBoundingClientRect(),s=1,c=1;t&&r(e)&&(s=e.offsetWidth>0&&l(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&l(a.height)/e.offsetHeight||1);
vendor: 4,186 bytes, line 1
1var d=(i(e)?o(e):window).visualViewport,p=!u()&&n,f=(a.left+(p&&d?d.offsetLeft:0))/s,h=(a.top+(p&&d?d.offsetTop:0))/c,m=a.width/s,g=a.height/c;return{width:m,height:g,top:h,right:f+m,bottom:h+g,left:f,x:f,y:h}}function f(e){var t=o(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function m(e){return((i(e)?e.ownerDocument:e.document)||window.document).documentElement}function g(e){return p(m(e)).left+f(e).scrollLeft}function v(e){return o(e).getComputedStyle(e)}function _(e){var t=v(e),n=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function w(e,t,n){void 0===n&&(n=!1);var i,a,s=r(t),c=r(t)&&function(e){var t=e.getBoundingClientRect(),n=l(t.width)/e.offsetWidth||1,o=l(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),d=m(t),u=p(e,c,n),v={scrollLeft:0,scrollTop:0},w={x:0,y:0};return(s||!s&&!n)&&(("body"!==h(t)||_(d))&&(v=(i=t)!==o(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:f(i)),r(t)?((w=p(t,!0)).x+=t.clientLeft,w.y+=t.clientTop):d&&(w.x=g(d))),{x:u.left+v.scrollLeft-w.x,y:u.top+v.scrollTop-w.y,width:u.width,height:u.height}}function y(e){var t=p(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function b(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||m(e)}function E(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:r(e)&&_(e)?e:E(b(e))}function L(e,t){var n;void 0===t&&(t=[]);var i=E(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),a=o(i),s=r?[a].concat(a.visualViewport||[],_(i)?i:[]):i,c=t.concat(s);return r?c:c.concat(L(b(s)))}function S(e){return["table","td","th"].indexOf(h(e))>=0}function O(e){return r(e)&&"fixed"!==v(e).position?e.offsetParent:null}function I(e){for(var t=o(e),n=O(e);n&&S(n)&&"static"===v(n).position;)n=O(n);return n&&("html"===h(n)||"body"===h(n)&&"static"===v(n).position)?t:n||function(e){var t=/firefox/i.test(d());if(/Trident/i.test(d())&&r(e)&&"fixed"===v(e).position)return null;var n=b(e);for(a(n)&&(n=n.host);r(n)&&["html","body"].indexOf(h(n))<0;){var o=v(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}var x="top",C="bottom",k="right",T="left",M="auto",A=[x,C,k,T],N="start",P="end",D="viewport",q="popper",H=A.reduce(function(e,t){return e.concat([t+"-"+N,t+"-"+P])},[]),R=[].concat(A,[M]).reduce(function(e,t){return e.concat([t,t+"-"+N,t+"-"+P])},[]),B=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function j(e){var t=new Map,n=new Set,o=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var o=t.get(e);o&&i(o)}}),o.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),o}var W={placement:"bottom",modifiers:[],strategy:"absolute"};function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function G(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,a=void 0===r?W:r;return function(e,t,n){void 0===n&&(n=a);var r,s,c={placement:"bottom",orderedModifiers:[],options:Object.assign({},W,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],d=!1,u={state:c,setOptions:function(n){var r="function"==typeof n?n(c.options):n;p(),c.options=Object.assign({},a,c.options,r),c.scrollParents={reference:i(e)?L(e):e.contextElement?L(e.contextElement):[],popper:L(t)};var s,d,f=function(e){var t=j(e);return B.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((s=[].concat(o,c.options.modifiers),d=s.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}
vendor: 4,828 bytes, line 1
1),Object.keys(d).map(function(e){return d[e]})));return c.orderedModifiers=f.filter(function(e){return e.enabled}),c.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var r=i({state:c,name:t,instance:u,options:o});l.push(r||function(){})}}),u.update()},forceUpdate:function(){if(!d){var e=c.elements,t=e.reference,n=e.popper;if(U(t,n)){c.rects={reference:w(t,I(n),"fixed"===c.options.strategy),popper:y(n)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(e){return c.modifiersData[e.name]=Object.assign({},e.data)});for(var o=0;o<c.orderedModifiers.length;o++)if(!0!==c.reset){var i=c.orderedModifiers[o],r=i.fn,a=i.options,s=void 0===a?{}:a,l=i.name;"function"==typeof r&&(c=r({state:c,options:s,name:l,instance:u})||c)}else c.reset=!1,o=-1}}},update:(r=function(){return new Promise(function(e){u.forceUpdate(),e(c)})},function(){return s||(s=new Promise(function(e){Promise.resolve().then(function(){s=void 0,e(r())})})),s}),destroy:function(){p(),d=!0}};if(!U(e,t))return u;function p(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(n).then(function(e){!d&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var F={passive:!0};function V(e){return e.split("-")[0]}function z(e){return e.split("-")[1]}function K(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Y(e){var t,n=e.reference,o=e.element,i=e.placement,r=i?V(i):null,a=i?z(i):null,s=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(r){case x:t={x:s,y:n.y-o.height};break;case C:t={x:s,y:n.y+n.height};break;case k:t={x:n.x+n.width,y:c};break;case T:t={x:n.x-o.width,y:c};break;default:t={x:n.x,y:n.y}}var l=r?K(r):null;if(null!=l){var d="y"===l?"height":"width";switch(a){case N:t[l]=t[l]-(n[d]/2-o[d]/2);break;case P:t[l]=t[l]+(n[d]/2-o[d]/2)}}return t}var J={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Z(e){var t,n=e.popper,i=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,c=e.position,d=e.gpuAcceleration,u=e.adaptive,p=e.roundOffsets,f=e.isFixed,h=s.x,g=void 0===h?0:h,_=s.y,w=void 0===_?0:_,y="function"==typeof p?p({x:g,y:w}):{x:g,y:w};g=y.x,w=y.y;var b=s.hasOwnProperty("x"),$=s.hasOwnProperty("y"),E=T,L=x,S=window;if(u){var O=I(n),M="clientHeight",A="clientWidth";O===o(n)&&"static"!==v(O=m(n)).position&&"absolute"===c&&(M="scrollHeight",A="scrollWidth"),(r===x||(r===T||r===k)&&a===P)&&(L=C,w-=(f&&O===S&&S.visualViewport?S.visualViewport.height:O[M])-i.height,w*=d?1:-1),r!==T&&(r!==x&&r!==C||a!==P)||(E=k,g-=(f&&O===S&&S.visualViewport?S.visualViewport.width:O[A])-i.width,g*=d?1:-1)}var N,D=Object.assign({position:c},u&&J),q=!0===p?function(e,t){var n=e.x,o=e.y,i=t.devicePixelRatio||1;return{x:l(n*i)/i||0,y:l(o*i)/i||0}}({x:g,y:w},o(n)):{x:g,y:w};return g=q.x,w=q.y,d?Object.assign({},D,((N={})[L]=$?"0":"",N[E]=b?"0":"",N.transform=(S.devicePixelRatio||1)<=1?"translate("+g+"px, "+w+"px)":"translate3d("+g+"px, "+w+"px, 0)",N)):Object.assign({},D,((t={})[L]=$?w+"px":"",t[E]=b?g+"px":"",t.transform="",t))}var Q={left:"right",right:"left",bottom:"top",top:"bottom"};function X(e){return e.replace(/left|right|bottom|top/g,function(e){return Q[e]})}var ee={start:"end",end:"start"};function te(e){return e.replace(/start|end/g,function(e){return ee[e]})}function ne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&a(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function oe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t,n){return t===D?oe(function(e,t){var n=o(e),i=m(e),r=n.visualViewport,a=i.clientWidth,s=i.clientHeight,c=0,l=0;if(r){a=r.width,s=r.height;var d=u();(d||!d&&"fixed"===t)&&(c=r.offsetLeft,l=r.offsetTop)}return{width:a,height:s,x:c+g(e),y:l}}(e,n)):i(t)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):oe(function(e){var t,n=m(e),o=f(e),i=null==(t=e.ownerDocument)?void 0:t.body,r=s(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=s(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-o.scrollLeft+g(e),l=-o.scrollTop;return"rtl"===v(i||n).direction&&(c+=s(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:c,y:l}}(m(e)))}function re(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ae(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function se(e,t){void 0===t&&(t={});var n=t,o=n.placement,a=void 0===o?e.placement:o,l=n.strategy,d=void 0===l?e.strategy:l,u=n.boundary,f=void 0===u?"clippingParents":u,g=n.rootBoundary,_=void 0===g?D:g,w=n.elementContext,y=void 0===w?q:w,$=n.altBoundary,E=void 0!==$&&$,
vendor: 3,740 bytes, line 1
1S=n.padding,O=void 0===S?0:S,T=re("number"!=typeof O?O:ae(O,A)),M=y===q?"reference":q,N=e.rects.popper,P=e.elements[E?M:y],H=function(e,t,n,o){var a="clippingParents"===t?function(e){var t=L(b(e)),n=["absolute","fixed"].indexOf(v(e).position)>=0&&r(e)?I(e):e;return i(n)?t.filter(function(e){return i(e)&&ne(e,n)&&"body"!==h(e)}):[]}(e):[].concat(t),l=[].concat(a,[n]),d=l[0],u=l.reduce(function(t,n){var i=ie(e,n,o);return t.top=s(i.top,t.top),t.right=c(i.right,t.right),t.bottom=c(i.bottom,t.bottom),t.left=s(i.left,t.left),t},ie(e,d,o));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(i(P)?P:P.contextElement||m(e.elements.popper),f,_,d),R=p(e.elements.reference),B=Y({reference:R,element:N,strategy:"absolute",placement:a}),j=oe(Object.assign({},N,B)),W=y===q?j:R,U={top:H.top-W.top+T.top,bottom:W.bottom-H.bottom+T.bottom,left:H.left-W.left+T.left,right:W.right-H.right+T.right},G=e.modifiersData.offset;if(y===q&&G){var F=G[a];Object.keys(U).forEach(function(e){var t=[k,C].indexOf(e)>=0?1:-1,n=[x,C].indexOf(e)>=0?"y":"x";U[e]+=F[n]*t})}return U}function ce(e,t,n){return s(e,c(t,n))}function le(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function de(e){return[x,k,C,T].some(function(t){return e[t]>=0})}var ue=G({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,a=void 0===r||r,s=i.resize,c=void 0===s||s,l=o(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(e){e.addEventListener("scroll",n.update,F)}),c&&l.addEventListener("resize",n.update,F),function(){a&&d.forEach(function(e){e.removeEventListener("scroll",n.update,F)}),c&&l.removeEventListener("resize",n.update,F)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Y({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,a=void 0===r||r,s=n.roundOffsets,c=void 0===s||s,l={placement:V(t.placement),variation:z(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Z(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Z(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&h(i)&&(Object.assign(i.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});
1r(o)&&h(o)&&(Object.assign(o.style,a),Object.keys(i).forEach(function(e){o.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,i=n.offset,r=void 0===i?[0,0]:i,a=R.reduce(function(e,n){return e[n]=function(e,t,n){var o=V(e),i=[T,x].indexOf(o)>=0?-1:1,r="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=r[0],s=r[1];return a=a||0,s=(s||0)*i,[T,k].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,r),e},{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=n.mainAxis,r=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=V(g),_=c||(v!==g&&h?function(e){if(V(e)===M)return[];var t=X(e);return[te(e),t,te(t)]}(g):[X(g)]),w=[g].concat(_).reduce(function(e,n){return e.concat(V(n)===M?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,i=n.boundary,r=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?R:c,d=z(o),u=d?s?H:H.filter(function(e){return z(e)===d}):A,p=u.filter(function(e){return l.indexOf(e)>=0});0===p.length&&(p=u);var f=p.reduce(function(t,n){return t[n]=se(e,{placement:n,boundary:i,rootBoundary:r,padding:a})[V(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}(t,{placement:n,boundary:d,rootBoundary:u,padding:l,flipVariations:h,allowedAutoPlacements:m}):n)},[]),y=t.rects.reference,b=t.rects.popper,$=new Map,E=!0,L=w[0],S=0;S<w.length;S++){var O=w[S],I=V(O),P=z(O)===N,D=[x,C].indexOf(I)>=0,q=D?"width":"height",B=se(t,{placement:O,boundary:d,rootBoundary:u,altBoundary:p,padding:l}),j=D?P?k:T:P?C:x;y[q]>b[q]&&(j=X(j));var W=X(j),U=[];if(r&&U.push(B[I]<=0),s&&U.push(B[j]<=0,B[W]<=0),U.every(function(e){return e})){L=O,E=!1;break}$.set(O,U)}if(E)for(var G=function(e){var t=w.find(function(t){var n=$.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return L=t,"break"},F=h?3:1;F>0&&"break"!==G(F);F--);t.placement!==L&&(t.modifiersData[o]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,i=n.mainAxis,r=void 0===i||i,a=n.altAxis,l=void 0!==a&&a,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,h=n.tether,m=void 0===h||h,g=n.tetherOffset,v=void 0===g?0:g,_=se(t,{boundary:d,rootBoundary:u,padding:f,altBoundary:p}),w=V(t.placement),b=z(t.placement),$=!b,E=K(w),L="x"===E?"y":"x",S=t.modifiersData.popperOffsets,O=t.rects.reference,M=t.rects.popper,A="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,P="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(S){if(r){var H,R="y"===E?x:T,B="y"===E?C:k,j="y"===E?"height":"width",W=S[E],U=W+_[R],G=W-_[B],F=m?-M[j]/2:0,Y=b===N?O[j]:M[j],J=b===N?-M[j]:-O[j],Z=t.elements.arrow,Q=m&&Z?y(Z):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=X[R],te=X[B],ne=ce(0,O[j],Q[j]),oe=$?O[j]/2-F-ne-ee-P.mainAxis:Y-ne-ee-P.mainAxis,ie=$?-O[j]/2+F+ne+te+P.mainAxis:J+ne+te+P.mainAxis,re=t.elements.arrow&&I(t.elements.arrow),ae=re?"y"===E?re.clientTop||0:re.clientLeft||0:0,le=null!=(H=null==D?void 0:D[E])?H:0,de=W+ie-le,ue=ce(m?c(U,W+oe-le-ae):U,W,m?s(G,de):G);S[E]=ue,q[E]=ue-W}if(l){var pe,fe="x"===E?x:T,he="x"===E?C:k,me=S[L],ge="y"===L?"height":"width",ve=me+_[fe],_e=me-_[he],we=-1!==[x,T].indexOf(w),ye=null!=(pe=null==D?void 0:D[L])?pe:0,be=we?ve:me-O[ge]-M[ge]-ye+P.altAxis,$e=we?me+O[ge]+M[ge]-ye-P.altAxis:_e,Ee=m&&we?function(e,t,n){var o=ce(e,t,n);return o>n?n:o}(be,me,$e):ce(m?be:ve,me,m?$e:_e);S[L]=Ee,q[L]=Ee-me}t.modifiersData[o]=q}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,i=e.options,r=n.elements.arrow,a=n.modifiersData.popperOffsets,s=V(n.placement),c=K(s),l=[T,k].indexOf(s)>=0?"height":"width";if(r&&a){var d=function(e,t){return re("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ae(e,A))}(i.padding,n),u=y(r),p="y"===c?x:T,f="y"===c?C:k,h=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],m=a[c]-n.rects.reference[c],g=I(r),v=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,_=h/2-m/2,w=d[p],b=v-u[l]-d[f],$=v/2-u[l]/2+_,E=ce(w,$,b),L=c;n.modifiersData[o]=((t={})[L]=E,t.centerOffset=E-$,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&ne(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,a=se(t,{elementContext:"reference"}),s=se(t,{altBoundary:!0}),c=le(a,o),l=le(s,i,r),d=de(c),u=de(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]});let pe=null,fe={};const he={name:"",create(e=null,{title:t="",content:n="",placement:o="top",name:i="",offset:r=0,zIndex:a=1,fadeIn:s=null}){if(!e)return;var c;if(this.name=i,c=this.name,fe=JSON.parse(window.localStorage.getItem("tooltipStorage"))||{},fe[c])return;const l=document.querySelector("#cs-tooltip");l.style.zIndex=a;const d=document.querySelector("#cs-tooltip h4"),u=document.querySelector("#cs-tooltip p");d.innerHTML=t,u.innerHTML=n;const p=document.querySelector(".cs-tooltip__container");s&&p.setAttribute("data-fade-in",s),p.setAttribute("data-show",""),pe=ue(e,l,{placement:o,modifiers:[{name:"offset",options:{offset:[0,r]}}],onFirstUpdate:()=>{s&&setTimeout(()=>{p.setAttribute("data-fade-in","done")},0)}})},destroy(){pe&&(document.querySelector(".cs-tooltip__container").removeAttribute("data-show"),pe.destroy(),pe
1=null)},handleDoNotShowAgain(){var e;e=this.name,fe[e]=true,window.localStorage.setItem("tooltipStorage",JSON.stringify(fe))}};async function me(){const e=await async function(){const e=Citiesocial.productManager.getProductId(),t=await fetch(`${PY3_API_BASE_URL}/api/v1.1/product/by-shopify-id/${e}/?fields=id,shopify_id,keywords,category&version=4`);return await t.json()}();null!==e.category&&function(e){const t=e.primary_group.title,n=e.collection_group.title,o=e.menu_collection.title,i=`\n    <li class="breadcrumb__item btn-link-secondary btn-link__breadcrumb">\n      <span class="breadcrumb__title">\n        <a href="/pages/in-house-search-results-page?category=${t}">${t}</a>\n      </span>\n    </li>\n    <li data-breadcrumb-separator=">" class="breadcrumb__item breadcrumb__item--active">\n      <span class="breadcrumb__title">\n        <a href="/pages/in-house-search-results-page?category=${n}">${n}</a>\n      </span>\n    </li>\n    <li data-breadcrumb-separator=">" class="breadcrumb__item breadcrumb__item--active">
1\n      <span class="breadcrumb__title">\n        <a href="/pages/in-house-search-results-page?category=${o}">${o}</a>\n      </span>\n    </li>`,r=document.getElementById("product-breadcrumb");r&&(r.innerHTML=i)}(e.category),"成人情趣"===e.category?.menu_collection?.title&&function(){const e=new Event("adultProductAgeCheck"),t=document.getElementById("age-check-prompt");t&&t.dispatchEvent(e)}(),Citiesocial.favoriteManager.start(),function(){const e=document.querySelector("select[data-product-select]");e&&e.addEventListener("change",function(){const e=this.options[this.selectedIndex].getAttribute("data-image-id"),t=document.querySelector(`.product__thumbnail[data-image-id="${e}"]`);t&&t.click()})}(),async function(){const e=document.querySelector(".product__frequently-bought-together");if(!e)return;const t=Citiesocial.productManager.getProductId(),n=await Citiesocial.productManager.fetchFrequentlyBoughtTogetherProducts(t);if(0===n.length)return;const o=function(e=null,t=[]){const n=[...t],o=n.length;let i=0,r="",a="",s=0;if(o<2||null===e)return"";const c=n.findIndex(t=>t.id===e);[n[0],n[c]]=[n[c],n[0]];for(let e=0;e<o;e+=1){const{price:t,variantId:o,handle:c,title:l,cover_image_url:d}=n[e];if(3===i)break;e>=1&&(r+='<i class="cs_icon icon-accordion-close" ></i>'),r+=`<a href="https://www.citiesocial.com/products/${c}" class="images__image-wrap">\n                      <img src="${d}" alt="${l}"/>\n                    </a>`,a+=`<div class="items__content">\n                      <label class="items__content-icon" for="${o}">\n                        <input type="checkbox" id="${o}" name="${o}" value="${t}" checked>\n                        <i class="cs_icon icon-checkbox-checked" ></i>\n                        <i class="cs_icon icon-checkbox-uncheck" ></i>\n                      </label>\n                      <a href="https://www.citiesocial.com/products/${c}" class="items__content-text">\n                        ${0===e?'<span class="text-bold">此商品:</span>':""}\n                        <span class="text">${l}</span>\n                        <div class="text-price" data-money-convertible="" data-base-value="${t}" data-base-currency="TWD">\n                          <span class="money">NT$ ${t}</span>\n                        </div>\n                      </a>\n                    </div>`,s+=t,i+=1}return i<2?"":`<h4 class="frequently-bought-together__title">通常也會買</h4>\n            <form class="frequently-bought-together__container">\n              <div class="container__images">\n                ${r}\n              </div>\n              <div class="container__actions">\n                <div class="actions__total-price">\n                  <span class="actions__total-price-text">總價:</span>\n                  <div class="actions__total-price-number" data-money-convertible="" data-base-value="${s}" data-base-currency="TWD">\n                    <span class="money">NT$ ${s}</span>\n                  </div>\n                </div>\n                <button class="actions__all-add-to-cart">${window.languages.allAddToCartButton}</button>\n              </div>\n              <div class="container__items">\n                ${a}\n              </div>\n            </form>`}(t,n);e.innerHTML=o,""===o&&(e.style.display="none"),function(){const e=document.querySelector("form.frequently-bought-together__container");if(!e)return;const t=e.querySelector(".actions__total-price-number"),n=e.querySelector(".actions__all-add-to-cart");e.addEventListener("change",()=>{const o=function(){const t=e.querySelectorAll('.container__items input[type="checkbox"]:checked');let n=0;return t.forEach(e=>{n+=Number(e.value)}),n}();t.dataset.baseValue=o,t.querySelector(".money").innerHTML=Citiesocial.utils.getCurrency(o),n.disabled=0===o}),e.addEventListener("submit",async t=>{t.preventDefault(),n.disabled=!0,n.innerHTML='<div class="spinner spinner--circle"></div>';const o=[...e.querySelectorAll('.container__items input[type="checkbox"]:checked')].map(e=>Number(e.name)).map(e=>({id:e,quantity:1}));await Citiesocial.cartManager.addToCart(o),n.disabled=!1,n.innerHTML=window.languages.allAddToCartButton,$(document).trigger("product.added")})}(),function(){const e=document.querySelector("form.frequently-bought-together__container");e&&(setTimeout(()=>{window.segmentTracking.frequentlyBoughtTogether("show")},250),e.addEventListener("click",e=>{"checkbox"!==e.target.type&&window.segmentTracking.frequentlyBoughtTogether("click")}),e.addEventListener("submit",e=>{e.preventDefault(),setTimeout(()=>{window.segmentTracking.frequentlyBoughtTogether("submit")},250)}))}()}(),async function(){if(0===$(".product__recommendation-products").length)return;const e=Citiesocial.productManager.getProductId(),t=await fetch(`${window.Shopify.routes.root}recommendations/products.json?product_id=${e}&limit=10&intent=related`);let{products:n}=await t.json();n=n.filter(({tags:e})=>!e.includes("group-buy"));const o=n.map(e=>Citiesocial.productManager.shopifyProductFormat(e));if(0===o.length)return;const i=Citiesocial.productManager.makeProductCardsHTML(o,{collectionHandle:"shopify_recommendation"},{});$(".product__recommendation-products").show(),window.innerWidth<=800?($(".product__recommendation-products .list__list").append(i),$(".product__recommendation-products").appendTo(".product__description.u-mobile-only")):($(".product__recommendation-products .owl-carousel").append(i),$(".product__recommendation-products .owl-carousel").owlCarousel({rewind:!0,margin:15,slideBy:3,dots:!1,items:3,nav:!0,navText:['<i class="cs_icon icon-arrow-left"></i>','<i class="cs_icon icon-arrow-right"></i>']})),Citiesocial.favoriteManager.start();const r=$(".product__recommendation-products").find(".carousel__header-title").text(),a=document.querySelector(".product__recommendation-products"),s=new IntersectionObserver(([e])=>{1===e.intersectionRatio&&(window.segmentTracking.carouselView("shopify_recommendation",r,null),s.disconnect())},{threshold:1});s.observe(a),document.querySelectorAll(".product__recommendation-products .product-card").forEach(e
1=>{e.addEventListener("click",()=>{window.segmentTracking.carouselClicked("shopify_recommendation",r,null,"product_card")})})}(),window.addEventListener("load",()=>{})}document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#cs-tooltip i.icon-close"),t=document.querySelector("#cs-tooltip .do-not-show-again__button");e&&e.addEventListener("click",he.destroy),t&&t.addEventListener("click",()=>{he.destroy(),he.handleDoNotShowAgain()})}),IS_ACCOUNT_PAGES&&(window.addEventListener("DOMContentLoaded",()=>{if(IS_LOGIN_PAGE||IS_REGISTER_PAGE){if(!sessionStorage.getItem("targetRedirectPath")&&document.referrer){const e=new URL(document.referrer),t=e.pathname+e.search,n=["/pages/reset-password"];sessionStorage.setItem("isDirectlyFromLoginOrRegister",!0),n.includes(e.pathname)||sessionStorage.setItem("targetRedirectPath",t)}const e=new URL(window.location.href).searchParams.get("checkout_url");if(e&&(sessionStorage.setItem("targetRedirectPath",e),sessionStorage.setItem("isDirectlyFromLoginOrRegister",!0),sessionStorage.setItem("isLoginOrRegisterFromCheckout",!0)),IS_OPEN_NEW_LOGIN_REGISTER)return;[document.querySelector("form#customer_login"),document.querySelector("form#create_customer")].forEach(e=>{e&&e.addEventListener("submit",()=>{sessionStorage.setItem("isDirectlyFromLoginOrRegister",!0)})}),[document.querySelector(".js-login-facebook"),document.querySelector(".js-login-google"),document.querySelector(".js-login-line")].forEach(e=>{e.addEventListener("click",()=>{sessionStorage.setItem("isDirectlyFromSocialLogin",!0)})})}}),window.addEventListener("load",()=>{})),IS_PRODUCT_PAGES&&!IS_EARLY_BIRD_PAGE&&document.addEventListener("DOMContentLoaded",()=>{me()}),n(83957),n(84872),n(80831),n(1614),n(69675),window.addEventListener("DOMContentLoaded",()=>{})},69675:()=>{window.addEventListener("DOMContentLoaded",()=>{const e=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes&&e.addedNodes.forEach(e=>{"IFRAME"===e.nodeName&&"launcher"===e.id&&e.remove()})})});navigator.userAgent.includes("cs_webview")&&($("#shopify-section-top_bar").hide(),$("#shopify-section-header").hide(),$(".breadcrumb").hide(),$("#shopify-section-engagement").hide(),$("#shopify-section-footer").hide(),$(".cs-productItem-quickAddWrapper").hide(),$("#cs-tooltip").hide(),e.observe(document.body,{childList:!0,subtree:!0}))})},80831:()=>{if(Citiesocial.userManager.isLogin()&&("/"===location.pathname||IS_ACCOUNT_PAGES)&&firebase.messaging.isSupported()){firebase.initializeApp({apiKey:"AIzaSyArHzfPT5O61POp2omRB1x85eQvev5dZIQ",authDomain:"iterable-d12b8.firebaseapp.com",databaseURL:"https://iterable-d12b8.firebaseio.com",projectId:"iterable-d12b8",storageBucket:"iterable-d12b8.appspot.com",messagingSenderId:"625321616406",appId:"1:625321616406:web:9b540db69093cc978d0137"});const e=firebase.messaging();"serviceWorker"in navigator&&window.addEventListener("load",()=>{const t={user_id:customer_id,email:customer_email};navigator.serviceWorker.register("/a/s/firebase-messaging-sw.js").then(function(n){e.useServiceWorker(n),e.requestPermission().then(function(){e.getToken({vapidKey:"BBs-_eP5fMorx7xoeZLNvg-YvLGcqT29LWi-oz9t-ay4oZqaLIPHbqk1MXax-gG53Y1ZMHCFHxXLkEtIiZEycv0"}).then(e=>{$.ajax({type:"POST",url:`${PY3_API_BASE_URL}/api/v1.1/iterable/browser-token/?token=${e}`,headers:{"Content-Type":"application/json"},data:JSON.stringify(t)})})}).catch(function(e){console.log("Unable to get permission to notify.",e)}),e.onTokenRefresh(()=>{e.getToken().then(e=>{console.log("Token refresh")})}),e.onMessage(e=>{console.log("Message received.",e)})})})}},83957:()=>{function e(e,t){const n=document.querySelector(".flash-collections .sort-by-date-selector"),o=n.options[n.selectedIndex].value;"start-date-time"===o?e.sort((e,t)=>new Date(t.start_datetime)-new Date(e.start_datetime)):"end-date-time"===o&&e.sort((e,t)=>new Date(e.end_datetime)-new Date(t.end_datetime));const i=document.querySelector(".flash-collections input[name=category]:checked").value,r=e.filter(e=>"全部"===i||e.category===i),a=Citiesocial.productManager.makeProductCardsHTML(r,t,{});document.querySelector(".flash-collections__item-grid").innerHTML=a}async function t(t){const{products:n}=await Citiesocial.productManager.fetchProducts(t);!function(e){const t=[...e];Citiesocial.utils.shuffle(t);let n="",o=0;const i=t.length;for(let e=0;e<21;e+=1)o===i&&(o=0),n+=`<div class="header_background-img" style="background-image: url('${t[o].cover_image_url}');"></div>`,o+=1;document.querySelector(".flash-collections .header_background").innerHTML=n}(n),function(e){const t=function(e){const t=["全部"];
1return e.forEach(e=>{e.category&&t.push(e.category)}),new Set(t)}(e),n=["全部",...(JSON.parse(window.localStorage.getItem("categories"))||[]).map(e=>e.title)];let o="",i=!0;n.forEach(e=>{const n=!t.has(e);o+=`<div class="category__item">\n                      <input type="radio" id="${e}" name="category"\n                        value="${e}"\n                        ${i&&"checked"}\n                        ${n&&"disabled"}>\n                      <label for="${e}">${e}</label>\n                    </div>`,i=!1}),document.querySelector(".flash-collections .control-panel__category").innerHTML=o}(n),e(n,t),document.querySelectorAll(".flash-collections input[name=category]").forEach(o=>{const i=o;i.onclick=function(){e(n,t),window.segmentTracking.levelOneCategoryTabChanged({level_one_category_name:i.value})}}),document.querySelector(".flash-collections .sort-by-date-selector").onchange=function(){e(n,t)}}IS_FLASH_COLLECTION_PAGE&&window.addEventListener("DOMContentLoaded",()=>{const{flashCollection:e}=window;t(e)})},84872:()=>{window.addEventListener("DOMContentLoaded",()=>{if(window.productCollection){const t=window.productCollection,{popularKeywordText:n}=t;n&&(e=n,document.querySelector(".api-based-collection .collection__title h2").innerHTML=e),function(e){const{collectionHandle:t}=e,n=$(`#${t}-collection`);n.infiniteScrollHelper("destroy"),n.empty(),n.infiniteScrollHelper({triggerInitialLoad:!0,startingPageCount:1,loadMore(t,n){!async function(e,t=1,n=null){const o=$(".collection__spinner"),i=$(".collection__products-no-results"),r=$(".collection__recommendation-products");function a(){const e=document.getElementById("js-collection-skeleton");e&&(e.style.display="none"),o.removeClass("is-show")}o.addClass("is-show"),i.removeClass("is-show"),r.removeClass("is-show");let{products:s,pageInfo:c}=await Citiesocial.productManager.fetchProducts({...e,page:t});const{collectionHandle:l}=e;if(c&&t!==c.num_pages||l===PERSONALIZED_RECOMMENDATION||$(`#${l}-collection`).infiniteScrollHelper("destroy"),(!c||c.num_pages<=1)&&0===s.length){if(l!==PERSONALIZED_RECOMMENDATION)return i.addClass("is-show"),a(),void r.addClass("is-show");{const e=await Citiesocial.productManager.fetchProducts({position:"grid",collectionId:1905950738,collectionHandle:"top-100-best-selling",popularKeywordText:null});s=e.products,c=e.pageInfo,$(`#${l}-collection`).infiniteScrollHelper("destroy")}}const d=Citiesocial.productManager.makeProductCardsHTML(s,e,{productLimit:l===TOP_100_BEST_SELLING?100:null});document.getElementById(`${l}-collection`).insertAdjacentHTML("beforeend",DOMPurify.sanitize(d)),a(),Citiesocial.favoriteManager.start(),n()}(e,t,n)}})}(t)}var e;Citiesocial.favoriteManager.start()})},94872:()=>{document.addEventListener("DOMContentLoaded",async()=>{const e=[],t=[EARLY_BIRD,FLASH_COLLECTIONS,PERSONALIZED_RECOMMENDATION,TOP_100_BEST_SELLING,CROSS_SELLING_PRODUCTS,CAYENNE_RANKING],n=window.apiBasedCarousel&&window.apiBasedCarousel.filter(e=>!t.includes(e.collectionHandle)).map(e=>`collection_shopify_id=${e.collectionId}`),{collections:o}=n?await Citiesocial.productManager.fetchProducts({collectionHandle:MULTI_COLLECTION,collectionShopifyIds:n.join("&")}):[];window.apiBasedCarousel&&window.apiBasedCarousel.forEach(t=>{if(t.collectionHandle===EARLY_BIRD_RECOMMENDED)return;const n=o&&o.find(e=>e.handle===t.collectionHandle);t.collectionHandle!==CAYENNE_RANKING&&Citiesocial.productManager.displayProducts(t,n);const i=$(`#${t.sectionId}`).parent().hasClass("u-desktop-only"),r=$(`#${t.sectionId}`).parent().hasClass("u-mobile-only");if(i&&!window.matchMedia("(min-width: 768px)").matches)return;if(r&&!window.matchMedia("(max-width: 767px)").matches)return;const a=$(`#${t.sectionId} > .container__inner`);$(`#${t.sectionId} .carousel__wrapper, #${t.sectionId} .list__wrapper`).on("click","a",()=>{window.segmentTracking.carouselClicked(t.collectionHandle,$(`#${t.sectionId}`).find(".carousel__header-title").text(),t.sectionId,"product_card")}),$(`#${t.sectionId} a.carousel__header-read-more`).on("click",()=>{window.segmentTracking.carouselClicked(t.collectionHandle,$(`#${t.sectionId}`).find(".carousel__header-title").text(),t.sectionId,"read_more_text")}),$(`#${t.sectionId} a.carousel__header-read-more-btn, #${t.sectionId} a.new-arrival-carousel-read-more-bottom, #${t.sectionId} a.new-arrival-carousel-read-more-top`).on("click",()=>{window.segmentTracking.carouselClicked(t.collectionHandle,$(`#${t.sectionId}`).find(".carousel__header-title").text(),t.sectionId,"read_more_btn")}),$(window).on("DOMContentLoaded load resize scroll",function(e,t){let n;return()=>{const o=function(e){let t;"function"==typeof jQuery&&e instanceof jQuery&&([t]=e);const n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)}(e);o!==n&&(n=o,"function"==typeof t&&o&&t())}}(a,()=>(e.includes(t.sectionId)||$(`#shopify-section-${t.sectionId}`).is(":visible")&&window.segmentTracking.carouselView(t.collectionHandle,$(`#${t.sectionId}`).find(".carousel__header-title").text(),t.sectionId),e.push(t.sectionId),!1)))})}),document.addEventListener("DOMContentLoaded",async()=>{const e=[];
1if($(".cs-carousel").each((t,n)=>{const o=$(n).data("collection-id");o&&e.push(`collection_shopify_id=${o}`)}),e.length>0){const{collections:t}=await Citiesocial.productManager.fetchProducts({collectionHandle:MULTI_COLLECTION,collectionShopifyIds:e.join("&")});t.forEach(e=>(e=>{const t=NORMAL_CAROUSEL_ITEM_LIMIT,n=$(`.cs-carousel[data-collection-id=${e.id}]`).attr("class").includes("cs-carousel-inline"),o=$(`.cs-carousel[data-collection-id=${e.id}]`).data("title"),i=$(`.cs-carousel[data-collection-id=${e.id}]`).data("read-more"),r=`\n  <div class="container" id="${e.id}">\n    <div class="container__inner">\n      <div class="carousel__header">\n        <h2 class="carousel__header-title">${o||e.title}</h2>\n        <a class="carousel__header-read-more" href="/collections/${e.handle}?ref=carousel">${i||"看更多"}</a>\n      </div>\n      <div class="u-desktop-only carousel__wrapper">\n        <div class="owl-carousel owl-theme api-based-owl carousel-skeleton-grid" id="${e.id}-owl-carousel">\n        </div>\n      </div>\n      <div class="u-mobile-only list__wrapper">\n        <div class="list__list list__list--scroll">\n        </div>\n      </div>     \n    </div> \n  </div>`,a=window.innerWidth>=RESPONSIVE_MIDDLE_BREAKING_POINT;n&&a?($(`.cs-carousel[data-collection-id=${e.id}]`).parent().append(r),$(`#${e.id}`).parent().css({display:"flex","justify-content":"space-between","margin-bottom":"0"}),$(`#${e.id}`).css({width:"47%",margin:"inherit"}),$(`.cs-carousel[data-collection-id=${e.id}]`).hide()):$(`.cs-carousel[data-collection-id=${e.id}]`).html(r);const s=a?$(`#${e.id}-owl-carousel`):$(`#${e.id} .list__list`),c={productLimit:t};"/pages/helly-hansen"===window.location.pathname&&(c.ref="page-helly-hansen",c.isOpenLinkInNewTab=!0);const l=Citiesocial.productManager.makeProductCardsHTML(e.products,e,c);if(a){s.removeClass("carousel-skeleton-grid"),s.html(l);const t=Citiesocial.productManager.makeOwlCarouselOptions(e.collectionHandle,!1);n&&(t.responsive[RESPONSIVE_LARGE_BREAKING_POINT].items=3),"/pages/helly-hansen"===window.location.pathname&&(t.responsive[RESPONSIVE_LARGE_BREAKING_POINT].items=5),s.owlCarousel(t)}else s.html(l);Citiesocial.favoriteManager.start(),$(`.cs-carousel[data-collection-id=${e.id}]`).trigger("displayed")})({...e,collectionHandle:MULTI_COLLECTION}))}})}},e=>{e(e.s=67640)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.