1import{x as b,y as E,D as I,r as k}from"./app-eHacUajv.js";import{u as x}from"./i18n-DiJuqdZO.js";const p=864e5;function A(){const a=new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/Prague",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(new Date),n={};return a.forEach(t=>n[t.type]=t.value),{y:+n.year,m:+n.month,d:+n.day,h:+n.hour%24,min:+n.minute,s:+n.second}}function H(a){const n=a%19,t=Math.floor(a/100),o=a%100,s=Math.floor(t/4),d=t%4,i=Math.floor((t+8)/25),g=Math.floor((t-i+1)/3),f=(19*n+t-s-g+15)%30,v=Math.floor(o/4),C=o%4,h=(32+2*d+2*v-f-C)%7,m=Math.floor((n+11*f+22*h)/451),y=Math.floor((f+h-7*m+114)/31),e=(f+h-7*m+114)%31+1;return Date.UTC(a,y-1,e)}const $={CZ:[[1,1],[5,1],[5,8],[7,5],[7,6],[9,28],[10,28],[11,17],[12,24],[12,25],[12,26]],SK:[[1,1],[1,6],[5,1],[5,8],[7,5],[8,29],[9,1],[9,15],[11,1],[11,17],[12,24],[12,25],[12,26]]},T={};function P(a,n){const t=a+n;if(T[t])return T[t];const o={};($[a]??$.CZ).forEach(([d,i])=>o[Date.UTC(n,d-1,i)]=1);const s=H(n);return o[s-2*p]=1,o[s+p]=1,T[t]=o,o}function U(a,n){const t=new Date(n),o=t.getUTCDay();return o===0||o===6?!1:!P(a,t.getUTCFullYear())[n]}const w=a=>`<strong>${a}</strong>`;function S(){return I().props.deliveryBadge??null}function F(a=!0,n={}){const t=S(),o=x(),s=k(""),d=()=>!!t&&(typeof a=="function"?a():a),i={};(t?.noDispatch??[]).forEach(e=>{const r=e.split("-");i[Date.UTC(+r[0],+r[1]-1,+r[2])]=1});const g=e=>U("CZ",e)&&!i[e],f=e=>U(t?.country,e);function v(e,r){do e+=p;while(!r(e));return e}function C(e,r){if(e===r+p)return o("delivery_tomorrow");const c=new Date(e);return`${o("delivery_day_"+c.getUTCDay())} ${c.getUTCDate()}. ${c.getUTCMonth()+1}.`}function h(e){const r=t.cutoffH*3600+t.cutoffM*60-(e.h*3600+e.min*60+e.s);if(r<=0)return"";const c=Math.floor(r/3600),l=Math.floor(r%3600/60),u=r%60;return c>0?`${c} h ${l} min ${u} s`:l>0?`${l} min ${u} s`:`${u} s`}function m(){const e=A(),r=Date.UTC(e.y,e.m-1,e.d),c=e.h<t.cutoffH||e.h===t.cutoffH&&e.min<t.cutoffM,l=g(r)&&c,u=l?r:v(r,g),_=v(u,f);if(l){const D=h(e),M=`<strong class="tabular-nums">${D!==""?D:t.cutoffLabel}</strong>${n.breakAfterTime?"<br>":""}`;s.value=t.mode==="full"?o("delivery_full_today",{time:M,day:w(C(_,r))}):o("delivery_dispatch_today",{time:M})}else{const D=u===r+p?o("delivery_tomorrow"):o("delivery_day_"+new Date(u).getUTCDay());s.value=t.mode==="full"?o("delivery_full_later",{ship:D,day:w(C(_,r))}):o("delivery_dispatch_later",{ship:D})}s.value=s.value.replace(".</strong>.",".</strong>")}let y=null;return b(()=>{if(d()){try{m()}catch{return}y=setInterval(()=>{try{m()}catch{}},1e3)}}),E(()=>y&&clearInterval(y)),{html:s}}export{S as d,F as u};
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.