var z=t=>{throw TypeError(t)};var B=(t,e,s)=>e.has(t)||z("Cannot "+s);var r=(t,e,s)=>(B(t,e,"read from private field"),s?s.call(t):e.get(t)),y=(t,e,s)=>e.has(t)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),d=(t,e,s,a)=>(B(t,e,"write to private field"),a?a.call(t,s):e.set(t,s),s);var C=(t,e,s,a)=>({set _(i){d(t,e,i,s)},get _(){return r(t,e,a)}});import{r as H,c as ie,g as ce,j as u}from"./jsx-runtime-CdEZBrzG.js";import{r as de,d as T}from"./dayjs.min-Be_3dA4G.js";import{A as fe}from"./index.modern-3pxDafzO.js";import{S as ne,f as oe,b as p,m as J,g as G,n as _,e as me,j as pe,k as ye,l as ge,o as V,p as U,q as ve,h as W,v as X,w as je,Q as _e,T as Me}from"./index-DX_OQrB9.js";import{Q as be}from"./query-6L-frBnO.js";import{M as Pe}from"./mutation-BM_gwdeO.js";import{H as Oe}from"./react-hotkeys-hook.esm-DjpEsNhM.js";import{N as we}from"./index-c7mLVowi.js";import{j as Qe,k as ke,_ as Se,l as De,M as xe,m as Ae,S as qe}from"./components-DIUic7No.js";import{b as Ee,f as Le,O as Ce}from"./index-DCEFW7vR.js";import"./index-QzMY4gyx.js";/**
 * @remix-run/react v2.12.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */let Z="positions";function Fe({getKey:t,...e}){let{isSpaMode:s}=Qe(),a=Ee(),i=Le();ke({getKey:t,storageKey:Z});let o=H.useMemo(()=>{if(!t)return null;let h=t(a,i);return h!==a.key?h:null},[]);if(s)return null;let l=((h,f)=>{if(!window.history.state||!window.history.state.key){let v=Math.random().toString(32).slice(2);window.history.replaceState({key:v},"")}try{let c=JSON.parse(sessionStorage.getItem(h)||"{}")[f||window.history.state.key];typeof c=="number"&&window.scrollTo(0,c)}catch(v){console.error(v),sessionStorage.removeItem(h)}}).toString();return H.createElement("script",Se({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${JSON.stringify(Z)}, ${JSON.stringify(o)})`}}))}var He={exports:{}};(function(t,e){(function(s,a){t.exports=a(de())})(ie,function(s){function a(c){return c&&typeof c=="object"&&"default"in c?c:{default:c}}var i=a(s),o="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),l="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),h=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,f=function(c,q){return h.test(q)?o[c.month()]:l[c.month()]};f.s=l,f.f=o;var v={name:"hr",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:f,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(c){return c+"."}};return i.default.locale(v,null,!0),v})})(He);var ue={exports:{}};(function(t,e){(function(s,a){t.exports=a()})(ie,function(){return function(s,a,i){i.updateLocale=function(o,l){var h=i.Ls[o];if(h)return(l?Object.keys(l):[]).forEach(function(f){h[f]=l[f]}),h}}})})(ue);var Te=ue.exports;const Ye=ce(Te);var j,se,Ie=(se=class extends ne{constructor(e={}){super();y(this,j);this.config=e,d(this,j,new Map)}build(e,s,a){const i=s.queryKey,o=s.queryHash??oe(i,s);let l=this.get(o);return l||(l=new be({cache:this,queryKey:i,queryHash:o,options:e.defaultQueryOptions(s),state:a,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){r(this,j).has(e.queryHash)||(r(this,j).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const s=r(this,j).get(e.queryHash);s&&(e.destroy(),s===e&&r(this,j).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){p.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return r(this,j).get(e)}getAll(){return[...r(this,j).values()]}find(e){const s={exact:!0,...e};return this.getAll().find(a=>J(s,a))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(a=>J(e,a)):s}notify(e){p.batch(()=>{this.listeners.forEach(s=>{s(e)})})}onFocus(){p.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){p.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},j=new WeakMap,se),m,A,ae,Ke=(ae=class extends ne{constructor(e={}){super();y(this,m);y(this,A);this.config=e,d(this,m,new Map),d(this,A,Date.now())}build(e,s,a){const i=new Pe({mutationCache:this,mutationId:++C(this,A)._,options:e.defaultMutationOptions(s),state:a});return this.add(i),i}add(e){const s=F(e),a=r(this,m).get(s)??[];a.push(e),r(this,m).set(s,a),this.notify({type:"added",mutation:e})}remove(e){var a;const s=F(e);if(r(this,m).has(s)){const i=(a=r(this,m).get(s))==null?void 0:a.filter(o=>o!==e);i&&(i.length===0?r(this,m).delete(s):r(this,m).set(s,i))}this.notify({type:"removed",mutation:e})}canRun(e){var a;const s=(a=r(this,m).get(F(e)))==null?void 0:a.find(i=>i.state.status==="pending");return!s||s===e}runNext(e){var a;const s=(a=r(this,m).get(F(e)))==null?void 0:a.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}clear(){p.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...r(this,m).values()].flat()}find(e){const s={exact:!0,...e};return this.getAll().find(a=>G(s,a))}findAll(e={}){return this.getAll().filter(s=>G(e,s))}notify(e){p.batch(()=>{this.listeners.forEach(s=>{s(e)})})}resumePausedMutations(){const e=this.getAll().filter(s=>s.state.isPaused);return p.batch(()=>Promise.all(e.map(s=>s.continue().catch(_))))}},m=new WeakMap,A=new WeakMap,ae);function F(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function ee(t){return{onFetch:(e,s)=>{var c,q,Y,I,K;const a=e.options,i=(Y=(q=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:q.fetchMore)==null?void 0:Y.direction,o=((I=e.state.data)==null?void 0:I.pages)||[],l=((K=e.state.data)==null?void 0:K.pageParams)||[];let h={pages:[],pageParams:[]},f=0;const v=async()=>{let w=!1;const E=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(e.signal.aborted?w=!0:e.signal.addEventListener("abort",()=>{w=!0}),e.signal)})},le=me(e.options,e.fetchOptions),N=async(g,M,x)=>{if(w)return Promise.reject();if(M==null&&g.pages.length)return Promise.resolve(g);const L={queryKey:e.queryKey,pageParam:M,direction:x?"backward":"forward",meta:e.options.meta};E(L);const he=await le(L),{maxPages:R}=e.options,$=x?pe:ye;return{pages:$(g.pages,he,R),pageParams:$(g.pageParams,M,R)}};if(i&&o.length){const g=i==="backward",M=g?Ne:te,x={pages:o,pageParams:l},L=M(a,x);h=await N(x,L,g)}else{const g=t??o.length;do{const M=f===0?l[0]??a.initialPageParam:te(a,h);if(f>0&&M==null)break;h=await N(h,M),f++}while(f<g)}return h};e.options.persister?e.fetchFn=()=>{var w,E;return(E=(w=e.options).persister)==null?void 0:E.call(w,v,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=v}}}function te(t,{pages:e,pageParams:s}){const a=e.length-1;return e.length>0?t.getNextPageParam(e[a],e,s[a],s):void 0}function Ne(t,{pages:e,pageParams:s}){var a;return e.length>0?(a=t.getPreviousPageParam)==null?void 0:a.call(t,e[0],e,s[0],s):void 0}var n,b,P,Q,k,O,S,D,re,Re=(re=class{constructor(t={}){y(this,n);y(this,b);y(this,P);y(this,Q);y(this,k);y(this,O);y(this,S);y(this,D);d(this,n,t.queryCache||new Ie),d(this,b,t.mutationCache||new Ke),d(this,P,t.defaultOptions||{}),d(this,Q,new Map),d(this,k,new Map),d(this,O,0)}mount(){C(this,O)._++,r(this,O)===1&&(d(this,S,ge.subscribe(async t=>{t&&(await this.resumePausedMutations(),r(this,n).onFocus())})),d(this,D,V.subscribe(async t=>{t&&(await this.resumePausedMutations(),r(this,n).onOnline())})))}unmount(){var t,e;C(this,O)._--,r(this,O)===0&&((t=r(this,S))==null||t.call(this),d(this,S,void 0),(e=r(this,D))==null||e.call(this),d(this,D,void 0))}isFetching(t){return r(this,n).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return r(this,b).findAll({...t,status:"pending"}).length}getQueryData(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=r(this,n).get(e.queryHash))==null?void 0:s.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const s=this.defaultQueryOptions(t),a=r(this,n).build(this,s);return t.revalidateIfStale&&a.isStaleByTime(U(s.staleTime,a))&&this.prefetchQuery(s),Promise.resolve(e)}}getQueriesData(t){return r(this,n).findAll(t).map(({queryKey:e,state:s})=>{const a=s.data;return[e,a]})}setQueryData(t,e,s){const a=this.defaultQueryOptions({queryKey:t}),i=r(this,n).get(a.queryHash),o=i==null?void 0:i.state.data,l=ve(e,o);if(l!==void 0)return r(this,n).build(this,a).setData(l,{...s,manual:!0})}setQueriesData(t,e,s){return p.batch(()=>r(this,n).findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,e,s)]))}getQueryState(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=r(this,n).get(e.queryHash))==null?void 0:s.state}removeQueries(t){const e=r(this,n);p.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=r(this,n),a={type:"active",...t};return p.batch(()=>(s.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(a,e)))}cancelQueries(t={},e={}){const s={revert:!0,...e},a=p.batch(()=>r(this,n).findAll(t).map(i=>i.cancel(s)));return Promise.all(a).then(_).catch(_)}invalidateQueries(t={},e={}){return p.batch(()=>{if(r(this,n).findAll(t).forEach(a=>{a.invalidate()}),t.refetchType==="none")return Promise.resolve();const s={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(s,e)})}refetchQueries(t={},e){const s={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},a=p.batch(()=>r(this,n).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,s);return s.throwOnError||(o=o.catch(_)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(_)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=r(this,n).build(this,e);return s.isStaleByTime(U(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(_).catch(_)}fetchInfiniteQuery(t){return t.behavior=ee(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(_).catch(_)}ensureInfiniteQueryData(t){return t.behavior=ee(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return V.isOnline()?r(this,b).resumePausedMutations():Promise.resolve()}getQueryCache(){return r(this,n)}getMutationCache(){return r(this,b)}getDefaultOptions(){return r(this,P)}setDefaultOptions(t){d(this,P,t)}setQueryDefaults(t,e){r(this,Q).set(W(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...r(this,Q).values()];let s={};return e.forEach(a=>{X(t,a.queryKey)&&(s={...s,...a.defaultOptions})}),s}setMutationDefaults(t,e){r(this,k).set(W(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...r(this,k).values()];let s={};return e.forEach(a=>{X(t,a.mutationKey)&&(s={...s,...a.defaultOptions})}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...r(this,P).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=oe(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===je&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...r(this,P).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){r(this,n).clear(),r(this,b).clear()}},n=new WeakMap,b=new WeakMap,P=new WeakMap,Q=new WeakMap,k=new WeakMap,O=new WeakMap,S=new WeakMap,D=new WeakMap,re);const $e=({googleMapsApiKey:t,children:e})=>{const[s]=H.useState(()=>new Re({defaultOptions:{queries:{staleTime:6e4,retry:!1}}}));return u.jsx(fe,{apiKey:t,children:u.jsx(_e,{client:s,children:u.jsxs(Oe,{children:[u.jsx(we.Provider,{children:e}),u.jsx(Me,{position:"bottom-right"})]})})})};T.extend(Ye);const at=()=>[],rt=()=>!1;function it(){const t=De();return T.locale("hr"),T.updateLocale("hr",{weekdays:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]}),u.jsxs("html",{lang:"en",children:[u.jsxs("head",{children:[u.jsx("meta",{charSet:"utf-8"}),u.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, user-scalable=no"}),u.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:"black-translucent"}),u.jsx("meta",{name:"description",content:"Otkrijte koncerte, izložbe, sportske događaje, sajmove i sve ostale događaje na području Hrvatske na jednom mjestu!"}),u.jsx(xe,{}),u.jsx(Ae,{})]}),u.jsxs("body",{className:"h-dvh text-sm text-[#C5C5C5]",children:[u.jsx("script",{dangerouslySetInnerHTML:{__html:`window.ENV = ${JSON.stringify(t.ENV)}`}}),u.jsx($e,{googleMapsApiKey:t.ENV.GOOGLE_MAPS_API_KEY,children:u.jsx(Ce,{})}),u.jsx(Fe,{}),u.jsx(qe,{}),u.jsx("script",{defer:!0,"data-domain":t.domain,src:"https://plausible.domore.hr/js/script.js"})]})]})}export{it as default,at as links,rt as shouldRevalidate};
