PageSourceSearch

https://eu.aspadz.com/cdn/shop/t/41/assets/shine-trust-v4-countdown-timer.js?v=47704714524026286891789954244

js aspadz.com collected 2026-10-02 00:15:54 UTC 17,921 bytes, 1 lines download raw bytes

1"use strict";const STCountdown=function(){};STCountdown.timer=function(e,t,n,o){let i=t-e;const l=864e5,s=36e5,c=6e4,r=1e3,a=function(){if(i>0){let e=i,t=Math.floor(e/l);e%=l;let o=Math.floor(e/s);e%=s;let a=Math.floor(e/c);e%=c;let d=Math.floor(e/r);n({days:t,hours:o,minutes:a,seconds:d}),i-=1e3}else i-=1e3,clearInterval(d),o()},d=setInterval((u=this,function(){a.call(u)}),1e3);var u;return a.call(this),{abort:function(){clearInterval(d)},getTimeRemaining:function(){let e=i;const t=Math.floor(e/l);e%=l;const n=Math.floor(e/s);e%=s;const o=Math.floor(e/c);e%=c;return{days:t,hours:n,minutes:o,seconds:Math.floor(e/r)}}}},function(e){const t=setInterval((()=>{window.ST_GLOBALS&&(clearInterval(t),p().then((()=>console.info("ST Countdown loaded"))))}));class n{constructor(t){this.countdown=t;const{id:n,htmlRender:o}=t;this.countdownEl=e.createElement("div"),this.countdownEl.classList.add(`st-countdown-wrapper-${n}`),this.countdownEl.innerHTML=o}render(){const{productFilters:e,selectedProducts:t}=this.countdown;return{countdownEl:this.countdownEl,countdownData:this.countdown,filters:window.ST_GLOBALS.convertFilters(e,t)}}}let o=null,i=!1,l="",s=null,c=!1,r=!1;const a=["absolute","fixed","sticky"],d={default:null,custom:null},u={},p=async function(){if(!window.ST_PLAN||"Advanced"!==window.ST_PLAN?.name||"ACTIVE"!==window.ST_PLAN?.status)return;o=window.ST_GLOBALS.getBaseCDN(),i=window.ST_META_DATA.fixMultiLanguage||!1,c=window.ST_META_DATA.prefixLanguageCode||!1,r=window.ST_META_DATA.useUrlLocate||!1,l=window.ST_META_DATA.mainLanguageCode||"",s=window.ST_GLOBALS.currentLanguage;const t=window.ST_COUNTDOWNS||[];if(0===t.length)return;const a=window.ST_GLOBALS.pageType||"index",p=[];let S="";if(t.map((e=>{const{id:t,status:o,editorData:i,htmlRender:l,cssRender:s,startTime:c,endTime:r}=e,{countdownType:d,visibleSetting:w,displayPosition:T,pageFilter:h,pageShow:f,collections:m=[],fontFamily:y,titleFontWeight:_,subTitleFontWeight:A,numberFontWeight:b}=i;if(o){let o=!1;const i=window.ST_GLOBALS.dateWithTimeZone(new Date,window.ST_META_DATA.timeZone);if("right_now"===d||"definite_time"===d){const e=window.ST_GLOBALS.dateWithTimeZone(r,window.ST_META_DATA.timeZone);if("right_now"===d&&e.getTime()>i.getTime()&&(o=!0),"definite_time"===d){const t=window.ST_GLOBALS.dateWithTimeZone(c,window.ST_META_DATA.timeZone);e.getTime()>t.getTime()&&e.getTime()>i.getTime()&&t.getTime()<i.getTime()&&(o=!0)}}if("fixed_time"===d&&(o=!0),o){let o=!1;"product-image"!==T&&"product-title"!==T||!g(a,w)||(o=!0),"top-bar"===T&&L(a,h,f,m)&&(o=!0),("other-pages"===T||"product-page"===T&&"product"===window.ST_GLOBALS.pageType)&&(o=!0),o&&(u[t]=new n(e).render(),S+=s,y?.fontFamily&&(p.hasOwnProperty(y.fontFamily)?p[y.fontFamily]={...p[y.fontFamily],titleFontWeight:_,subTitleFontWeight:A,numberFontWeight:b}:p[y.fontFamily]={titleFontWeight:_,subTitleFontWeight:A,numberFontWeight:b}))}}})),Object.keys(p).length){const e=Object.keys(p).map((e=>({fontFamily:e,fontWeight:[...new Set([parseInt(p[e].titleFontWeight),parseInt(p[e].numberFontWeight),parseInt(p[e].subTitleFontWeight),parseInt(p[e].labelFontWeight)])].filter((e=>!isNaN(e)&&e>0)).sort((function(e,t){return e-t})).join(";")})));e.length&&e.map((e=>{window.ST_LOADED_FONTS.includes(e.fontFamily)||window.ST_GLOBALS.loadFont(e)}))}S&&window.ST_GLOBALS.addStyle(S),d.default=_(),d.custom=y(),w().then((()=>!0)),setInterval((()=>{w()}),500);for(const t in u){const{countdownEl:n,countdownData:o}=u[t],{countdownID:i,editorData:{displayPosition:l,displayProductPage:s,cssSelector:c}}=o;if("top-bar"===l){e.body.insertAdjacentElement("afterbegin",n),T(n,o);const l=n.querySelector(`[id="st-countdown-${i}"]`);null!==l&&(l.style.zIndex=25-t);const s=l.querySelector(".countdown-close");s&&s.addEventListener("click",(function(e){window.ST_GLOBALS.closeBar(e,".st-countdown-bar")}));const c=l.querySelector(".st-coupon-code");c&&c.addEventListener("click",(function(e){window.ST_GLOBALS.copy(e)})),window.ST_GLOBALS.changeBodyStyle(".st-countdown-bar.countdown-topbar",window.ST_GLOBALS.cssFixed,window.ST_META_DATA?.effectElementTopBar)}else if("product-page"===l&&"product"===window.ST_GLOBALS.pageType)try{const{filters:i}=u[t],l=window.ST_GLOBALS.product||null;if(l){let{published_at:t,on_sale:r,inventory:a,collections:d,tags:u,title:p,id:w,available:S,price:h,price_min:f,price_max:m,compare_at_price:g,vendor:L,type:y}=l;h=window.ST_GLOBALS.fixPrice(h),f=window.ST_GLOBALS.fixPrice(f),m=window.ST_GLOBALS.fixPrice(m),g=window.ST_GLOBALS.fixPrice(g);let _=!1;if(i?.type||!i.select_all||0!==Object.keys(i.filters).length||0!==i.collection.length&&"all"!==i.collection.toString()){if(i.select_all&&i.collection.length){d.some((e=>i.collection.includes(e.toString())))&&(_=!0)}else if(!i.select_all&&i.products.size)i.products.has(w)&&(_=!0);else if(i.select_all&&Object.keys(i.filters).length){let e=0,t=Object.keys(i.filters).length;for(const t in i.filters)"_s"===t&&p.toString().toLowerCase().includes(i.filters[t])&&(e+=1),"price"===t&&!isNaN(f)&&!isNaN(m)&&f>=i.filters[t].min&&m<=i.filters[t].max&&(e+=1),"tag"===t&&u.includes(`${i.filters.tag}`)&&(e+=1),"vendor"===t&&L===i.filters.vendor&&(e+=1),"type"===t&&y===i.filters.type&&(e+=1),"inventory"===t&&("instock"===i.filters.inventory.type&&S&&(e+=1),"outstock"!==i.filters.inventory.type||S||(e+=1),"less-than"===i.filters.inventory.type&&S&&!isNaN(a)&&a<=i.filters.inventory.lte&&(e+=1),"great-than"===i.filters.inventory.type&&S&&!isNaN(a)&&a>=i.filters.inventory.gte&&(e+=1));e===t&&(_=!0)}else if(i.type)if("new-arrival"===i.type){const e=window.ST_GLOBALS.dateWithTimeZone(t,window.ST_META_DATA.timeZone),n=window.ST_GLOBALS.dateWithTimeZone(i.date,window.ST_META_DATA.timeZone);e.getTime()>=n.getTime()&&(_=!0)}
1else"on-sale"===i.type&&r||"low-stock"===i.type&&a>0&&a<=i.quantity?_=!0:"out-stock"!==i.type||S||(_=!0)}else _=!0;if(_){if("above_cart_button"===s){const t=window.ST_GLOBALS.selectorForm,i=e.querySelectorAll(t);if(i.length)for(let e=0;e<i.length;e++){const t=i[e].parentNode,l=n.cloneNode(!0);t.insertBefore(l,i[e]),T(l,o)}}if("custom"===s&&c?.cssSelector){const t=e.querySelectorAll(c.cssSelector);if(null!==t)for(let e=0;e<t.length;e++){const i=t[e].parentNode,l=n.cloneNode(!0);"above"===c?.cssPosition&&i.insertBefore(l,t[e]),"below"===c?.cssPosition&&i.insertBefore(l,t[e].nextSibling),T(l,o)}}}}}catch(e){console.log(e)}else if("other-pages"===l){const t=e.querySelectorAll(".st-countdown-block-wrapper");for(let e=0;e<t.length;e++){const i=t[e],l=i.getAttribute("data-countdown-id");if(!i.classList.contains(`countdown-item-${l}`)){const e=n.cloneNode(!0);i.appendChild(e),T(e,o);const t=i.querySelector(".st-editor-preview");t&&(t.style.display="none"),i.classList.add(`countdown-item-${l}`)}}}}},w=async function(){const t=A();let n=[];const o={};for(let e=0;e<t.length;e++){const i=t[e],l=i.getAttribute("href")||i.getAttribute("data-href"),s=b(l);o.hasOwnProperty(s)?o[s].push(i):o[s]=[i],n.push(s),i.classList.add("stCountdownLoaded")}if("product"===window.ST_GLOBALS.pageType&&window.ST_GLOBALS.productHandle&&!e.body.classList.contains("st-single-countdown-loaded")&&(o.hasOwnProperty(window.ST_GLOBALS.productHandle)?o[window.ST_GLOBALS.productHandle].push(null):o[window.ST_GLOBALS.productHandle]=[null],e.body.classList.add("st-single-countdown-loaded")),n=[...new Set(n)],n.length){let e="";const t=n.length;n.map(((n,o)=>{e+=i&&s!==l&&!r?`${n}${o<t-1?" OR ":""}`:`handle:"${n}"${o<t-1?" OR ":""}`}));let c="";c=i&&s!==l?`${r?window.ST_GLOBALS.shopUrlLocate:window.ST_GLOBALS.shopUrl}/search.js?q=${e}&view=shinetrust.product-handles`:`${window.ST_GLOBALS.shopUrl}/search.js?q=${e}&view=shinetrust.product-handles`;try{const e=await fetch(c,{mode:"no-cors"}),t=await e.json();for(const e in u){const n=u[e],{filters:i,countdownData:l}=n,{editorData:{displayPosition:s}}=l;"product-image"!==s&&"product-title"!==s||t.map((e=>{let{handle:t,published_at:l,on_sale:s,inventory:c,collections:r,tags:a,title:d,id:u,featured_image:p,available:w,price_min:T,price_max:h,vendor:f,type:m}=e;if(T=window.ST_GLOBALS.fixPrice(T),h=window.ST_GLOBALS.fixPrice(h),o.hasOwnProperty(t))if(i?.type||!i.select_all||0!==Object.keys(i.filters).length||0!==i.collection.length&&"all"!==i.collection.toString()){if(i.select_all&&i.collection.length){r.some((e=>i.collection.includes(e.toString())))&&S(o[t],n,d,p)}else if(!i.select_all&&i.products.size)i.products.has(u)&&S(o[t],n,d,p);else if(i.select_all&&Object.keys(i.filters).length){let e=0,l=Object.keys(i.filters).length;for(const t in i.filters)"_s"===t&&d.includes(i.filters[t])&&(e+=1),"price"===t&&!isNaN(T)&&!isNaN(h)&&T>=i.filters[t].min&&h<=i.filters[t].max&&(e+=1),"tag"===t&&a.includes(`${i.filters.tag}`)&&(e+=1),"vendor"===t&&f===i.filters.vendor&&(e+=1),"type"===t&&m===i.filters.type&&(e+=1),"inventory"===t&&("instock"===i.filters.inventory.type&&w&&(e+=1),"outstock"!==i.filters.inventory.type||w||(e+=1),"less-than"===i.filters.inventory.type&&w&&!isNaN(c)&&c<=i.filters.inventory.lte&&(e+=1),"great-than"===i.filters.inventory.type&&w&&!isNaN(c)&&c>=i.filters.inventory.gte&&(e+=1));e===l&&S(o[t],n,d,p)}else if(i.type)if("new-arrival"===i.type){const e=window.ST_GLOBALS.dateWithTimeZone(l,window.ST_META_DATA.timeZone),s=window.ST_GLOBALS.dateWithTimeZone(i.date,window.ST_META_DATA.timeZone);e.getTime()>=s.getTime()&&S(o[t],n,d,p)}else"on-sale"===i.type&&s||"low-stock"===i.type&&c>0&&c<=i.quantity?S(o[t],n,d,p):"out-stock"!==i.type||w||S(o[t],n,d,p)}else S(o[t],n,d,p)}))}}catch(e){console.log(e)}}},S=function(t,n,o,i){const{countdownEl:l,countdownData:s}=n,{id:c,editorData:r}=s,{displayPosition:u}=r;if(d.default){const n="product"===window.ST_GLOBALS.pageType;for(let o=0;o<t.length;o++){const i=t[o];if("product-image"===u){let t=[];d.default&&(t=d.default?.loop.thumbnail,n&&(t=[...t,...d.default?.single.thumbnail])),d.custom&&(t=d.custom?.loop.thumbnail,n&&(t=[...t,...d.custom?.single.thumbnail])),t.map((async t=>{const{parent:n,child:o,await:r=!1}=t;if(i&&n||!i&&!n){const t=i?i.closest(n):e.body;if(t&&!t.classList.contains(`countdown-item-${c}
1`)){let e=t.querySelectorAll(o);if(0===e.length&&r){let n=0;for(;n<=5;)e=t.querySelectorAll(o),0===e.length?(await new Promise((e=>setTimeout(e,300))),n++):n=6}for(let n=0;n<e.length;n++){const o=e[n],i=getComputedStyle(o);a.includes(i.position)||(o.style.position="relative");const r=l.cloneNode(!0);o.appendChild(r),T(r,s),r.classList.add("st-countdown-image"),t.classList.add(`countdown-item-${c}`)}}}}))}else if("product-title"===u){let t=[];d.default&&(t=d.default?.loop.title,n&&(t=[...t,...d.default?.single.title])),d.custom&&(t=d.custom?.loop.title,n&&(t=[...t,...d.custom?.single.title])),t.map((async t=>{const{parent:n,child:o,await:r=!1}=t;if(i&&n||!i&&!n){const t=i?i.closest(n):e.body;if(t&&!t.classList.contains(`countdown-item-${c}`)){let e=t.querySelectorAll(o);if(0===e.length&&r){let n=0;for(;n<=5;)e=t.querySelectorAll(o),0===e.length?(await new Promise((e=>setTimeout(e,300))),n++):n=6}for(let n=0;n<e.length;n++){const o=e[n],i=getComputedStyle(o);a.includes(i.position)||(o.style.position="relative");const r=l.cloneNode(!0),d=o.parentNode,u=o.nextSibling;null===u?d.appendChild(r):d.insertBefore(r,u),T(r,s),r.classList.add("st-countdown-title"),t.classList.add(`countdown-item-${c}`)}}}}))}}}else if("product-image"===u){if(!i)return;i=i.split("?")[0];const t=e.body.querySelectorAll('div[data-bg*="'+i+'"], div[data-bgset*="'+i+'"],img[src*="'+i+'"], img[srcset*="'+i+'"]');for(let e=0;e<t.length;e++){const n=t[e].parentElement;if(n&&!n.classList.contains(`countdown-item-${c}`)){const e=getComputedStyle(n);a.includes(e.position)||(n.style.position="relative");const t=l.cloneNode(!0);n.appendChild(t),T(t,s),t.classList.add("st-countdown-image"),n.classList.add(`countdown-item-${c}`)}}}else if("product-title"===u){const e=f(o);for(let t=0;t<e.length;t++){const n=e[t].parentNode;if(n&&!n.classList.contains(`countdown-item-${c}`)){const o=l.cloneNode(!0),i=e[t].nextSibling;null===i?n.appendChild(o):n.insertBefore(o,i),T(o,s),o.classList.add("st-countdown-title"),n.classList.add(`countdown-item-${c}`)}}}},T=function(e,t){const{editorData:n,startTime:o,endTime:i}=t,{messageText:l,messageSubText:s,buttonText:c}=n,r=e.querySelector(".countdown-text-inner"),a=e.querySelector(".countdown-sub-text-inner"),d=e.querySelector(".countdown-action");r&&l&&(r.innerHTML=window.ST_GLOBALS.translate(l)),a&&s&&(a.innerHTML=window.ST_GLOBALS.translate(s)),d&&c&&(d.innerHTML=window.ST_GLOBALS.translate(c));let{countdownType:u,fixedTime:p,whenCountdownEnds:w,startTime:S}=n;const T=window.ST_GLOBALS.dateWithTimeZone(new Date,window.ST_META_DATA.timeZone);if("right_now"===u||"definite_time"===u){const t=window.ST_GLOBALS.dateWithTimeZone(i,window.ST_META_DATA.timeZone);if("right_now"===u&&h(e,n,T,t),"definite_time"===u){window.ST_GLOBALS.dateWithTimeZone(o,window.ST_META_DATA.timeZone).getTime()<t.getTime()&&h(e,n,T,t)}}if("fixed_time"===u){let t=window.ST_GLOBALS.dateWithTimeZone(new Date,window.ST_META_DATA.timeZone);if(S){const e=S.search("PM")>=0,n=S.replace(/\sAM\\sPM/g,"").split(":");2===n.length&&(e?t.setHours(parseInt(n[0])+12):t.setHours(parseInt(n[0])),t.setMinutes(parseInt(n[1])),t.setSeconds(0))}const o=parseInt(p),i=new Date(t.getTime()+6e4*o);T.getTime()>t.getTime()&&(t=new Date,t.setTime(T.getTime()-(T.getTime()-t.getTime()))),h(e,n,t,i,o,w,S)}},h=function(e,t,n,o,i,l="nothing",s=null){const c=e.querySelector(".countdown-day"),r=e.querySelector(".countdown-hour"),a=e.querySelector(".countdown-minute"),d=e.querySelector(".countdown-seconds"),u=String(t.dayLabel).split("||"),p=String(t.hourLabel).split("||"),w=String(t.minuteLabel).split("||"),S=String(t.secondsLabel).split("||");STCountdown.timer(n,o,(function(e){c.querySelector(".value").innerHTML=m(e.days),0===e.days||e.days>=2?c.querySelector(".unit").innerHTML=u[0]:c.querySelector(".unit").innerHTML=2===u.length?u[1]:u[0],r.querySelector(".value").innerHTML=m(e.hours),0===e.hours||e.hours>=2?r.querySelector(".unit").innerHTML=p[0]:r.querySelector(".unit").innerHTML=2===p.length?p[1]:p[0],a.querySelector(".value").innerHTML=m(e.minutes),0===e.minutes||e.minutes>=2?a.querySelector(".unit").innerHTML=w[0]:a.querySelector(".unit").innerHTML=2===w.length?w[1]:w[0],d.querySelector(".value").innerHTML=m(e.seconds),0===e.seconds||e.seconds>=2?d.querySelector(".unit").innerHTML=S[0]:d.querySelector(".unit").innerHTML=2===S.length?S[1]:S[0]}),(function(){if(c.querySelector(".value").innerHTML="00",r.querySelector(".value").innerHTML="00",a.querySelector(".value").innerHTML="00",d.querySelector(".value").innerHTML="00",d.querySelector(".unit").innerHTML=2===S.length?S[1]:S[0],"hide_bar"===l&&(e.style.display="none"),i&&"repeat"===l){if(s){const e=-1===s.search("PM");2===(s=s.replace(/\sAM\\sPM/g,"").split(":")).length&&(e?o.setHours(parseInt(s[0])+12):o.setHours(parseInt(s[0])),o.setMinutes(parseInt(s[1])))}const n=new Date(o.getTime()+6e4*i);h(e,t,o,n,i,l,s)}}))},f=function(t,n=null){const o=[],i=null===n?e:n;for(const e of i.querySelectorAll("div, h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a"))e.textContent.trim()===t&&0===e.children.length&&o.push(e);return o},m=function(e){return String(e).padStart(2,"0").split("").map(((e,t)=>`<span class="num-split num-${t}">${e}</span>`)).join("")},g=function(e,t){let n="";switch(t){case"collection_page":n="collection";break;case"product_page":n="product"}return"all"===t||n===e},L=function(e,t="include",n,o=[]){let i=!1,l="";switch(n){case"collection_page":l="collection";break;case"collection_list":l="list-collections";break;case"product_page":l="product";break;case"homepage":l="index";break;case"cart":l="cart"}if("include"===t)if("collection"===e&&"collection"===l){const e=`gid://shopify/Collection/${window.ST_GLOBALS.collectionID}`;(o.includes("selectall")||window.ST_GLOBALS.collectionID&&o.includes(e)||!window.ST_GLOBALS.collectionID&&o.includes("all"))&&(i=!0)}else"all"!==n&&e!==l||(i=!0);else if("exclude"===t)if("collection"===e&&"collection"===l){const e=`gid://shopify/Collection/${window.ST_GLOBALS.collectionID}`;o.includes("selectall")?window.ST_GLOBALS.collectionID&&!o.includes(e)?i=!0:window.ST_GLOBALS.collectionID||o.includes("all")||(i=!0):i=!0}else e!==l&&(i=!0);return i},y=function(){if(window.ST_META_DATA.customCompatibleTheme){const e=window.ST_META_DATA.customCompatibleTheme.replace(/[\n\r\t]+/g,"").trim().split(";;"),t={loop:{thumbnail:[],title:[],price:[]},single:{thumbnail:[],title:[],price:[]}};return e.map((e=>{if(""!==e){const n=e.split(":");if(2===n.length){n[1].split(",").map((e=>{const o=e.split("||"),i={parent:o[0],child:o[1],await:3===o.length};switch(n[0]){case"image":t.loop.thumbnail.push(i);break;case"title":t.loop.title.push(i);break;case"price":t.loop.price.push(i);break;case"imageSingle":t.single.thumbnail.push(i);break;case"titleSingle":t.single.title.push(i);break;case"priceSingle":t.single.price.push(i)}}))}}})),t}return null},_=function(){if(window.ST_META_DATA.compatibleData){const{selectors:{image:e,imageSingleProduct:t,detail
1:{title:n,price:o,titleSingleProduct:i,priceSingleProduct:l}}}=window.ST_META_DATA.compatibleData,s={loop:{thumbnail:[],title:[],price:[]},single:{thumbnail:[],title:[],price:[]}};return e.map((e=>{const t=e.split("||");s.loop.thumbnail.push({parent:t[0],child:t[1]})})),t.map((e=>{s.single.thumbnail.push({parent:null,child:e})})),n.map((e=>{const t=e.split("||");s.loop.title.push({parent:t[0],child:t[1]})})),i.map((e=>{s.single.title.push({parent:null,child:e})})),o.map((e=>{const t=e.split("||");s.loop.price.push({parent:t[0],child:t[1]})})),l.map((e=>{s.single.price.push({parent:null,child:e})})),s}return null},A=function(){return e.querySelectorAll('a[href*="/products/"]:not(.stCountdownLoaded),[data-href]:not(.stCountdownLoaded)')},b=function(e){const t=e.split("#")[0].split("?")[0].split("/products/");return decodeURIComponent(t[1])}}(document);

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.