PageSourceSearch

https://www.shopback.co.th/__sbcdn/_next/static/chunks/23579.e1ef164648ce6b64.js

js shopback.co.th collected 2026-10-02 16:43:41 UTC 8,185 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1740,23579],{1740:(r,s,e)=>{e.r(s),e.d(s,{default:()=>b});var t=e(695155),o=e(981980),a=e(821628),n=e(202543),i=e(508296),d=e(33489),l=e(934515),c=e(445154);let u=(0,e(158765).A)(),b=r=>{let{dateTime:s,hideIcon:e=!1,dateFormat:b}=r,m=(0,n.t)(),f=(0,a.A)();if(!s)return null;let g=new Date(s).getTime()-new Date().getTime()>864e5,p=r=>{let s;return s=g?m("Ends {time}",{time:f.formatDate(b||m("dd MMM • h:mmaaa"),r)}):m("Ends in {time}",{time:r}),u?(0,t.jsx)(d.A,{variant:"alert","data-testid":"upsized-countdown",children:(0,t.jsxs)(o.so,{gap:"sbds-dimension-space-size-s",alignItems:"center",children:[!e&&(0,t.jsx)(l.zD7,{tone:"error",size:"sm"}),(0,t.jsx)(i.A,{variant:"caption-1",tone:"error",weight:"bold",children:s})]})}):null};return g?p(s):(0,t.jsx)(c.A,{datetime:s,render:p,maxDays:1})}},33489:(r,s,e)=>{e.d(s,{A:()=>t.A});var t=e(822769)},123982:(r,s,e)=>{e.r(s),e.d(s,{default:()=>l,enGB:()=>d});var t=e(291031),o=e(662418),a=e(673818),n=e(754344),i=e(131611);let d={code:"en-GB",formatDistance:t.B,formatLong:i.s,formatRelative:o.o,localize:a.k,match:n.Y,options:{weekStartsOn:1,firstWeekContainsDate:4}},l=d},131611:(r,s,e)=>{e.d(s,{s:()=>o});var t=e(589821);let o={date:(0,t.k)({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:(0,t.k)({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:(0,t.k)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})}},208589:(r,s,e)=>{e.d(s,{A:()=>l});var t=e(158765),o=e(202543),a=e(212115);let n=r=>r.toString().padStart(2,"0"),i=r=>{let{datetime:s,...e}=r;return(r=>{let{countDownDate:s,maxDays:e,hideHoursFormat:t,hideDays:o,applyDayFormat:a,t:i}=r,d=s-new Date().getTime();if(d<0||e&&d>864e5*e)return"";let l=Math.floor(d/864e5),c=Math.floor(d%864e5/36e5),u=Math.floor(d%36e5/6e4),b=Math.floor(d%6e4/1e3);o&&(c+=24*l,l=0);let m="".concat(n(u),":").concat(n(b));return((!t||c)&&(m="".concat(n(c),":").concat(m)),l)?m=a&&i?"".concat(i("{days}d",{days:l})," ").concat(m):"".concat(l,":").concat(m):m})({countDownDate:("string"==typeof s?new Date(s):s).getTime(),...e})},d=function(r){let{datetime:s,maxDays:e=0,hideHoursFormat:t=!1,hideDays:o=!1,applyDayFormat:a=!1,t:n}=r,d=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return d?i({datetime:s,maxDays:e,hideHoursFormat:t,hideDays:o,applyDayFormat:a,t:n}):""},l=r=>{let{datetime:s,render:e,maxDays:n,hideHoursFormat:l=!1,showInitialCountdown:c,hideDays:u=!1,applyDayFormat:b=!1,alwaysRender:m}=r,f={datetime:s,maxDays:n,hideHoursFormat:l,hideDays:u,applyDayFormat:b,t:(0,o.A)()},[g,p]=(0,a.useState)(d(f,c)),h=(0,a.useRef)(void 0),k=(0,a.useCallback)(()=>{let r=i(f);p(r),r&&(h.current=setTimeout(k,1e3))},[s,n,l]);return(0,a.useEffect)(()=>{if((0,t.A)())return k(),()=>{clearTimeout(h.current)}},[s]),g||m?e(g):null}},445154:(r,s,e)=>{e.d(s,{A:()=>t.A});var t=e(208589)},623579:(r,s,e)=>{e.r(s),e.d(s,{default:()=>n});var t=e(695155),o=e(202543),a=e(1740);let n=r=>{let{expiresAt:s}=r,e=(0,o.t)();return s&&(0,t.jsx)(a.default,{dateTime:s,dateFormat:e("dd MMM"),hideIcon:!0})}},662428:(r,s,e)=>{e.d(s,{b:()=>o});var t=e(943371);function o(r,s,e){var o;let a;return void 0===(o=s)||"locale"in o?e=s:a=s,new Intl.DateTimeFormat(null==e?void 0:e.locale,a).format((0,t.a)(r))}},821628:(r,s,e)=>{e.d(s,{A:()=>l});var t=e(212115),o=e(654354),a=e(398122),n=e(177325),i=e(662428),d=e(123982);let l=()=>{let[r,s]=(0,t.useState)(d.enGB),{locale:e}=(0,a.T)();return(0,t.useEffect)(()=>{(async()=>{let r=o.T4o[e||"en-GB"];r&&s(await r())})()},[]),{formatDate:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!e)return"";try{return(0,n.GP)(e,s,{locale:r})}catch(r){return""}},formatIntl:function(r){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!s)return"";try{return(0,i.b)(s,r,{locale:null!=e?e:"en-US"})}catch(r){return""}}}}},822769:(r,s,e)=>{e.d(s,{A:()=>u,J:()=>l});var t=e(695155),o=e(268030),a=e(981980),n=e(508296);let i={small:"caption-2",default:"caption-1",large:"section-heading-2"},d=(0,o.Fj)({base:{borderRadius:"sbds-dimension-border-radius-xs",border:"1px solid {colors.sbds-background-color-transparent}"},variants:{withBorder:{true:{borderColor:"sbds-border-color-subtle"}},variant:{info:{color:"sbds-status-color-info-darker",backgroundColor:"sbds-status-color-info-lighter"},neutral:{color:"sbds-status-color-neutral-darker",backgroundColor:"sbds-status-color-neutral-lighter"},success:{color:"sbds-status-color-success-darker",backgroundColor:"sbds-status-color-success-lighter"},warning:{color:"sbds-status-color-warning-darker",backgroundColor:"sbds-status-color-warning-lighter"},promo:{color:"sbds-status-color-trending-darker",backgroundColor:"sbds-status-color-trending-lighter"},alert:{color:"sbds-status-color-error-darker",backgroundColor:"sbds-status-color-error-lighter"},critical:{color:"sbds-font-color-inverse",backgroundColor:"sbds-brand-color-primary",border:"none",pos:"relative",overflow:"hidden",_before:{content:'""',pos:"absolute",width:"120.5%",aspectRatio:1,left:"50%",top:"50%",transformOrigin:"top left",background:"linear-gradient(0, #FFD6CD 0%, #FFD6CD00 70%)",transform:"rotateZ(30deg) translate(-50%, -50%)"}},new:{color:"sbds-font-color-inverse",backgroundColor:"sbds-brand-color-primary",border:"none",pos:"relative",overflow:"hidden",_before:{content:'""',pos:"absolute",width:"120.5%",aspectRatio:1,left:"50%",top:"50%",transformOrigin:"top left",transform:"rotateZ(30deg) translate(-50%, -50%)",background:"linear-gradient(0, #FFD6CD 0%, #FFD6CD00 70%)"}}},size:{small:{fontWeight:700,px:"calc({sizes.sbds-dimension-size-2-5}
1 - 1px)",py:"calc({sizes.sbds-dimension-size-1-5} - 1px)"},default:{px:"calc({sizes.sbds-dimension-size-3} - 1px)",py:"calc({sizes.sbds-dimension-size-1} - 1px)",fontWeight:500},large:{px:"calc({sizes.sbds-dimension-size-3} - 1px)",py:"calc({sizes.sbds-dimension-size-1} - 1px)",fontWeight:700}},solid:{true:{color:"sbds-font-color-inverse"}},corner:{true:{borderRightRadius:"{sizes.sbds-dimension-size-4}",borderBottomLeftRadius:0}}},compoundVariants:[{variant:"promo",solid:!0,css:{backgroundColor:"sbds-status-color-trending-dark"}},{variant:"info",solid:!0,css:{backgroundColor:"sbds-status-color-info-dark"}},{variant:"success",solid:!0,css:{backgroundColor:"sbds-status-color-success-dark"}},{variant:"warning",solid:!0,css:{backgroundColor:"sbds-status-color-warning-dark",color:"sbds-status-color-warning-darker"}},{variant:"alert",solid:!0,css:{backgroundColor:"sbds-status-color-error-dark"}},{variant:"neutral",solid:!0,css:{backgroundColor:"sbds-status-color-neutral-dark"}},{size:"small",corner:!0,css:{borderTopLeftRadius:"{sizes.sbds-dimension-size-3}"}},{size:"default",corner:!0,css:{borderTopLeftRadius:"{sizes.sbds-dimension-size-4}"}},{variant:"critical",size:"small",css:{px:"sbds-dimension-size-2-5",py:"sbds-dimension-size-1-5"}},{variant:"critical",size:"default",css:{px:"sbds-dimension-size-3",py:"sbds-dimension-size-1"}},{variant:"new",size:"small",css:{px:"sbds-dimension-size-2-5",py:"sbds-dimension-size-1-5"}},{variant:"new",size:"default",css:{px:"sbds-dimension-size-3",py:"sbds-dimension-size-1"}}]}),l=(0,o.Fj)({variants:{variant:{promo:{color:"sbds-status-color-trending-dark"},info:{color:"sbds-status-color-info-dark"},success:{color:"sbds-status-color-success-dark"},warning:{color:"sbds-status-color-warning-dark"},alert:{color:"sbds-status-color-error-dark"},neutral:{color:"sbds-status-color-neutral-dark"},critical:{color:"sbds-brand-color-primary"},new:{color:"sbds-brand-color-primary"}}}}),c=(0,a.I4)("div",d),u=r=>{let{variant:s="neutral",size:e="default",solid:o=!1,corner:a=!1,children:d,className:l,withBorder:u=!1,...b}=r,{truncate:m,...f}=b;return(0,t.jsx)(c,{variant:s,size:e,solid:o,corner:a,withBorder:u,className:l,...f,children:(0,t.jsx)(n.A,{htmlTag:"div",variant:i[e],color:"inherit",truncate:1,children:d})})}}}]);

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.