@rulecms/widget-svelte 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +61 -16
- package/dist/index.d.ts +169 -15
- package/dist/index.js +2977 -2303
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,21 +1,66 @@
|
|
|
1
|
-
"use strict";var Ys=Object.defineProperty;var Kr=e=>{throw TypeError(e)};var qs=(e,t,n)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>qs(e,typeof t!="symbol"?t+"":t,n),Kn=(e,t,n)=>t.has(e)||Kr("Cannot "+n);var v=(e,t,n)=>(Kn(e,t,"read from private field"),n?n.call(e):t.get(e)),V=(e,t,n)=>t.has(e)?Kr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),re=(e,t,n,r)=>(Kn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),U=(e,t,n)=>(Kn(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tr=require("svelte"),Xs="5";var fi;typeof window<"u"&&((fi=window.__svelte??(window.__svelte={})).v??(fi.v=new Set)).add(Xs);const Zs=1,Js=2,hi=4,Qs=8,$s=16,el=1,tl=2,K=Symbol("uninitialized"),gi="http://www.w3.org/1999/xhtml",nl="http://www.w3.org/2000/svg",rl="@attach",vi=!1;var fr=Array.isArray,il=Array.prototype.indexOf,gn=Array.prototype.includes,dr=Array.from,ol=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,sl=Object.getOwnPropertyDescriptors,ll=Object.prototype,al=Array.prototype,yi=Object.getPrototypeOf;function kt(e){return typeof e=="function"}const ul=()=>{};function cl(e){for(var t=0;t<e.length;t++)e[t]()}function mi(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const q=2,Et=4,pr=8,hr=1<<24,Ee=16,ye=32,He=64,fl=128,pe=512,z=1024,H=2048,Se=4096,ne=8192,he=16384,It=32768,Hr=1<<25,Ge=65536,vn=1<<17,dl=1<<18,Pn=1<<19,pl=1<<20,Le=1<<25,rt=65536,yn=1<<21,vt=1<<22,Ue=1<<23,yt=Symbol("$state"),hl=Symbol("legacy props"),gl=Symbol(""),Hn=Symbol("attributes"),Gr=Symbol("class"),zr=Symbol("style"),un=Symbol("text"),$t=new class extends Error{constructor(){super(...arguments);be(this,"name","StaleReactionError");be(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var di;const gr=!!((di=globalThis.document)!=null&&di.contentType)&&globalThis.document.contentType.includes("xml");function vl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function yl(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ml(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function _l(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function bl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function wl(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Cl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Al(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function El(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Sl(){console.warn("https://svelte.dev/e/derived_inert")}function Tl(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function _i(e){return e===this.v}function Il(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function bi(e){return!Il(e,this.v)}let Dl=!1,ge=null;function mn(e){ge=e}function Ie(e,t=!1,n){ge={p:ge,i:!1,c:null,e:null,s:e,x:null,r:N,l:null}}function De(e){var t=ge,n=t.e;if(n!==null){t.e=null;for(var r of n)Wi(r)}return t.i=!0,ge=t.p,{}}function wi(){return!0}let pt=[];function Pl(){var e=pt;pt=[],cl(e)}function Kt(e){if(pt.length===0){var t=pt;queueMicrotask(()=>{t===pt&&Pl()})}pt.push(e)}function kl(e){var t=N;if(t===null)return L.f|=Ue,e;if((t.f&It)===0&&(t.f&Et)===0)throw e;_n(e,t)}function _n(e,t){if(!(t!==null&&(t.f&he)!==0)){for(;t!==null;){if((t.f&fl)!==0){if((t.f&It)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const Ll=-7169;function j(e,t){e.f=e.f&Ll|t}function vr(e){(e.f&pe)!==0||e.deps===null?j(e,z):j(e,Se)}function Ci(e){if(e!==null)for(const t of e)(t.f&q)===0||(t.f&rt)===0||(t.f^=rt,Ci(t.deps))}function Rl(e,t,n){(e.f&H)!==0?t.add(e):(e.f&Se)!==0&&n.add(e),Ci(e.deps),j(e,z)}function xl(e,t){if(t){const n=document.body;e.autofocus=!0,Kt(()=>{document.activeElement===n&&e.focus()})}}function en(e){var t=L,n=N;xe(null),Ye(null);try{return e()}finally{xe(t),Ye(n)}}function Ai(e,t,n,r){const i=yr;var o=e.filter(d=>!d.settled),s=t.map(i);if(n.length===0&&o.length===0){r(s);return}var l=N,a=Nl(),u=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(d=>d.promise)):null;function f(d){if((l.f&he)===0){a();try{r([...s,...d])}catch(y){_n(y,l)}bn()}}var h=Ei();if(n.length===0){u.then(()=>f([])).finally(h);return}function c(){Promise.all(n.map(d=>Ol(d))).then(f).catch(d=>_n(d,l)).finally(h)}u?u.then(()=>{a(),c(),bn()}):c()}function Nl(){var e=N,t=L,n=ge,r=R;return function(o=!0){Ye(e),xe(t),mn(n),o&&(e.f&he)===0&&(r==null||r.activate(),r==null||r.apply())}}function bn(e=!0){Ye(null),xe(null),mn(null),e&&(R==null||R.deactivate())}function Ei(){var e=N,t=e.b,n=R,r=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,n),n.increment(r,e),()=>{t==null||t.update_pending_count(-1,n),n.decrement(r,e)}}function yr(e){var t=q|H;return N!==null&&(N.f|=Pn),{ctx:ge,deps:null,effects:null,equals:_i,f:t,fn:e,reactions:null,rv:0,v:K,wv:0,parent:N,ac:null}}const Nt=Symbol("obsolete");function Ol(e,t,n){let r=N;r===null&&vl();var i=void 0,o=Gt(K),s=!L,l=new Set;return Jl(()=>{var d,y;var a=N,u=mi();i=u.promise;try{Promise.resolve(e()).then(u.resolve,m=>{m!==$t&&u.reject(m)}).finally(bn)}catch(m){u.reject(m),bn()}var f=R;if(s){if((a.f&It)!==0)var h=Ei();if((d=r.b)!=null&&d.is_rendered())(y=f.async_deriveds.get(a))==null||y.reject(Nt);else for(const m of l.values())m.reject(Nt);l.add(u),f.async_deriveds.set(a,u)}const c=(m,g=void 0)=>{h==null||h(),l.delete(u),g!==Nt&&(f.activate(),g?(o.f|=Ue,zt(o,g)):((o.f&Ue)!==0&&(o.f^=Ue),zt(o,m)),f.deactivate())};u.promise.then(c,m=>c(null,m||"unknown"))}),wr(()=>{for(const a of l)a.reject(Nt)}),new Promise(a=>{function u(f){function h(){f===i?a(o):u(i)}f.then(h,h)}u(i)})}function T(e){const t=yr(e);return Gi(t),t}function Ml(e){const t=yr(e);return t.equals=bi,t}function Wl(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ve(t[n])}}function mr(e){var t,n=N,r=e.parent;if(!ze&&r!==null&&e.v!==K&&(r.f&(he|ne))!==0)return Sl(),e.v;Ye(r);try{e.f&=~rt,Wl(e),t=Xi(e)}finally{Ye(n)}return t}function Si(e){var t=mr(e);if(!e.equals(t)&&(e.wv=Yi(),(!(R!=null&&R.is_fork)||e.deps===null)&&(R!==null?(R.capture(e,t,!0),jt==null||jt.capture(e,t,!0)):e.v=t,e.deps===null))){j(e,z);return}ze||(Z!==null?(Mi()||R!=null&&R.is_fork)&&Z.set(e,t):vr(e))}function Fl(e){var t;if(e.effects!==null)for(const n of e.effects)(n.teardown||n.ac)&&((t=n.teardown)==null||t.call(n),n.ac!==null&&en(()=>{n.ac.abort($t),n.ac=null}),n.fn!==null&&(n.teardown=ul),Yt(n,0),Ar(n))}function Ti(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&St(t)}let Gn=null,ft=null,R=null,jt=null,Z=null,nr=null,zn=!1,ht=null,fn=null;var Yr=0;let Vl=1;var mt,je,Je,_t,bt,wt,Oe,Ct,ie,Zt,Me,Ce,Pe,At,Qe,O,rr,Ot,ir,Ii,Di,dt,jl,Mt;const In=class In{constructor(){V(this,O);be(this,"id",Vl++);V(this,mt,!1);be(this,"linked",!0);V(this,je,null);V(this,Je,null);be(this,"async_deriveds",new Map);be(this,"current",new Map);be(this,"previous",new Map);V(this,_t,new Set);V(this,bt,new Set);V(this,wt,0);V(this,Oe,new Map);V(this,Ct,null);V(this,ie,[]);V(this,Zt,[]);V(this,Me,new Set);V(this,Ce,new Set);V(this,Pe,new Map);V(this,At,new Set);be(this,"is_fork",!1);V(this,Qe,!1);ft===null?Gn=ft=this:(re(ft,Je,this),re(this,je,ft)),ft=this}skip_effect(t){v(this,Pe).has(t)||v(this,Pe).set(t,{d:[],m:[]}),v(this,At).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=v(this,Pe).get(t);if(r){v(this,Pe).delete(t);for(var i of r.d)j(i,H),n(i);for(i of r.m)j(i,Se),n(i)}v(this,At).add(t)}capture(t,n,r=!1){t.v!==K&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ue)===0&&(this.current.set(t,[n,r]),Z==null||Z.set(t,n)),this.is_fork||(t.v=n)}activate(){R=this}deactivate(){R=null,Z=null}flush(){try{zn=!0,R=this,U(this,O,Ot).call(this)}finally{Yr=0,nr=null,ht=null,fn=null,zn=!1,R=null,Z=null,et.clear()}}discard(){var t;for(const n of v(this,bt))n(this);v(this,bt).clear();for(const n of this.async_deriveds.values())n.reject(Nt);U(this,O,Mt).call(this),(t=v(this,Ct))==null||t.resolve()}register_created_effect(t){v(this,Zt).push(t)}increment(t,n){if(re(this,wt,v(this,wt)+1),t){let r=v(this,Oe).get(n)??0;v(this,Oe).set(n,r+1)}}decrement(t,n){if(re(this,wt,v(this,wt)-1),t){let r=v(this,Oe).get(n)??0;r===1?v(this,Oe).delete(n):v(this,Oe).set(n,r-1)}v(this,Qe)||(re(this,Qe,!0),Kt(()=>{re(this,Qe,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)v(this,Me).add(r);for(const r of n)v(this,Ce).add(r);t.clear(),n.clear()}oncommit(t){v(this,_t).add(t)}ondiscard(t){v(this,bt).add(t)}settled(){return(v(this,Ct)??re(this,Ct,mi())).promise}static ensure(){if(R===null){const t=R=new In;zn||Kt(()=>{v(t,mt)||t.flush()})}return R}apply(){{Z=null;return}}schedule(t){var i;if(nr=t,(i=t.b)!=null&&i.is_pending&&(t.f&(Et|pr|hr))!==0&&(t.f&It)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(ht!==null&&n===N&&(L===null||(L.f&q)===0))return;if((r&(He|ye))!==0){if((r&z)===0)return;n.f^=z}}v(this,ie).push(n)}};mt=new WeakMap,je=new WeakMap,Je=new WeakMap,_t=new WeakMap,bt=new WeakMap,wt=new WeakMap,Oe=new WeakMap,Ct=new WeakMap,ie=new WeakMap,Zt=new WeakMap,Me=new WeakMap,Ce=new WeakMap,Pe=new WeakMap,At=new WeakMap,Qe=new WeakMap,O=new WeakSet,rr=function(){if(this.is_fork)return!0;for(const r of v(this,Oe).keys()){for(var t=r,n=!1;t.parent!==null;){if(v(this,Pe).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Ot=function(){var a,u,f,h;re(this,mt,!0),Yr++>1e3&&(U(this,O,Mt).call(this),Bl());for(const c of v(this,Me))v(this,Ce).delete(c),j(c,H),this.schedule(c);for(const c of v(this,Ce))j(c,Se),this.schedule(c);const t=v(this,ie);re(this,ie,[]),this.apply();var n=ht=[],r=[],i=fn=[];for(const c of t)try{U(this,O,ir).call(this,c,n,r)}catch(d){throw Li(c),U(this,O,rr).call(this)||this.discard(),d}if(R=null,i.length>0){var o=In.ensure();for(const c of i)o.schedule(c)}if(ht=null,fn=null,U(this,O,rr).call(this)){U(this,O,dt).call(this,r),U(this,O,dt).call(this,n);for(const[c,d]of v(this,Pe))ki(c,d);i.length>0&&U(a=R,O,Ot).call(a);return}const s=U(this,O,Ii).call(this);if(s){U(this,O,dt).call(this,r),U(this,O,dt).call(this,n),U(u=s,O,Di).call(u,this);return}v(this,Me).clear(),v(this,Ce).clear();for(const c of v(this,_t))c(this);v(this,_t).clear(),jt=this,qr(r),qr(n),jt=null,(f=v(this,Ct))==null||f.resolve();var l=R;if(v(this,wt)===0&&(v(this,ie).length===0||l!==null)&&U(this,O,Mt).call(this),v(this,ie).length>0)if(l!==null){const c=l;v(c,ie).push(...v(this,ie).filter(d=>!v(c,ie).includes(d)))}else l=this;l!==null&&U(h=l,O,Ot).call(h)},ir=function(t,n,r){t.f^=z;for(var i=t.first;i!==null;){var o=i.f,s=(o&(ye|He))!==0,l=s&&(o&z)!==0,a=l||(o&ne)!==0||v(this,Pe).has(i);if(!a&&i.fn!==null){s?i.f^=z:(o&Et)!==0?n.push(i):rn(i)&&((o&Ee)!==0&&v(this,Ce).add(i),St(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}},Ii=function(){for(var t=v(this,je);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=v(t,je)}return null},Di=function(t){var r;for(const[i,o]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,o);for(const[i,o]of t.async_deriveds){const s=this.async_deriveds.get(i);s&&o.promise.then(s.resolve).catch(s.reject)}t.async_deriveds.clear(),this.transfer_effects(v(t,Me),v(t,Ce));const n=i=>{var o=i.reactions;if(o!==null&&!((i.f&q)!==0&&(i.f&(H|Se))===0))for(const a of o){var s=a.f;if((s&q)!==0)n(a);else{var l=a;s&(vt|Ee)&&!this.async_deriveds.has(l)&&(v(this,Ce).delete(l),j(l,H),this.schedule(l))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>t.discard()),U(r=t,O,Mt).call(r),R=this,U(this,O,Ot).call(this)},dt=function(t){for(var n=0;n<t.length;n+=1)Rl(t[n],v(this,Me),v(this,Ce))},jl=function(){var h;for(let c=Gn;c!==null;c=v(c,Je)){var t=c.id<this.id,n=[];for(const[d,[y,m]]of this.current){if(c.current.has(d)){var r=c.current.get(d)[0];if(t&&y!==r)c.current.set(d,[y,m]);else continue}n.push(d)}if(t)for(const[d,y]of this.async_deriveds){const m=c.async_deriveds.get(d);m&&y.promise.then(m.resolve).catch(m.reject)}var i=[...c.current.keys()].filter(d=>!c.current.get(d)[1]);if(!(!v(c,mt)||i.length===0)){var o=i.filter(d=>!this.current.has(d));if(o.length===0)t&&c.discard();else if(n.length>0){if(t)for(const d of v(this,At))c.unskip_effect(d,y=>{var m;(y.f&(Ee|vt))!==0?c.schedule(y):U(m=c,O,dt).call(m,[y])});c.activate();var s=new Set,l=new Map;for(var a of n)Pi(a,o,s,l);l=new Map;var u=[...c.current].filter(([d,y])=>{const m=this.current.get(d);return m?m[0]!==y[0]||m[1]!==y[1]:!0}).map(([d])=>d);if(u.length>0)for(const d of v(this,Zt))(d.f&(he|ne|vn))===0&&_r(d,u,l)&&((d.f&(vt|Ee))!==0?(j(d,H),c.schedule(d)):v(c,Me).add(d));if(v(c,ie).length>0&&!v(c,Qe)){c.apply();for(var f of v(c,ie))U(h=c,O,ir).call(h,f,[],[]);re(c,ie,[])}c.deactivate()}}}},Mt=function(){if(this.linked){var t=v(this,je),n=v(this,Je);t===null?Gn=n:re(t,Je,n),n===null?ft=t:re(n,je,t),this.linked=!1}};let Ht=In;function Bl(){try{wl()}catch(e){_n(e,nr)}}let we=null;function qr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(he|ne))===0&&rn(r)&&(we=new Set,St(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Bi(r),(we==null?void 0:we.size)>0)){et.clear();for(const i of we){if((i.f&(he|ne))!==0)continue;const o=[i];let s=i.parent;for(;s!==null;)we.has(s)&&(we.delete(s),o.push(s)),s=s.parent;for(let l=o.length-1;l>=0;l--){const a=o[l];(a.f&(he|ne))===0&&St(a)}}we.clear()}}we=null}}function Pi(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;(o&q)!==0?Pi(i,t,n,r):(o&(vt|Ee))!==0&&(o&H)===0&&_r(i,t,r)&&(j(i,H),br(i))}}function _r(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(gn.call(t,i))return!0;if((i.f&q)!==0&&_r(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function br(e){R.schedule(e)}function ki(e,t){if(!((e.f&ye)!==0&&(e.f&z)!==0)){(e.f&H)!==0?t.d.push(e):(e.f&Se)!==0&&t.m.push(e),j(e,z);for(var n=e.first;n!==null;)ki(n,t),n=n.next}}function Li(e){j(e,z);for(var t=e.first;t!==null;)Li(t),t=t.next}let wn=new Set;const et=new Map;let Ri=!1;function Gt(e,t){var n={f:0,v:e,reactions:null,equals:_i,rv:0,wv:0};return n}function ae(e,t){const n=Gt(e);return Gi(n),n}function Ul(e,t=!1,n=!0){const r=Gt(e);return t||(r.equals=bi),r}function M(e,t,n=!1){L!==null&&(!Be||(L.f&vn)!==0)&&wi()&&(L.f&(q|Ee|vt|vn))!==0&&(Re===null||!Re.has(e))&&El();let r=n?gt(t):t;return zt(e,r,fn)}function zt(e,t,n=null){if(!e.equals(t)){et.set(e,ze?t:e.v);var r=Ht.ensure();if(r.capture(e,t),(e.f&q)!==0){const i=e;(e.f&H)!==0&&mr(i),Z===null&&vr(i)}e.wv=Yi(),xi(e,H,n),N!==null&&(N.f&z)!==0&&(N.f&(ye|He))===0&&(fe===null?ea([e]):fe.push(e)),!r.is_fork&&wn.size>0&&!Ri&&Kl()}return t}function Kl(){Ri=!1;for(const e of wn){(e.f&z)!==0&&j(e,Se);let t;try{t=rn(e)}catch{t=!0}t&&St(e)}wn.clear()}function Yn(e){M(e,e.v+1)}function xi(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,o=0;o<i;o++){var s=r[o],l=s.f,a=(l&H)===0;if(a&&j(s,t),(l&vn)!==0)wn.add(s);else if((l&q)!==0){var u=s;Z==null||Z.delete(u),(l&rt)===0&&(l&pe&&(N===null||(N.f&yn)===0)&&(s.f|=rt),xi(u,Se,n))}else if(a){var f=s;(l&Ee)!==0&&we!==null&&we.add(f),n!==null?n.push(f):br(f)}}}function gt(e){if(typeof e!="object"||e===null||yt in e)return e;const t=yi(e);if(t!==ll&&t!==al)return e;var n=new Map,r=fr(e),i=ae(0),o=tt,s=l=>{if(tt===o)return l();var a=L,u=tt;xe(null),Jr(o);var f=l();return xe(a),Jr(u),f};return r&&n.set("length",ae(e.length)),new Proxy(e,{defineProperty(l,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Cl();var f=n.get(a);return f===void 0?s(()=>{var h=ae(u.value);return n.set(a,h),h}):M(f,u.value,!0),!0},deleteProperty(l,a){var u=n.get(a);if(u===void 0){if(a in l){const f=s(()=>ae(K));n.set(a,f),Yn(i)}}else M(u,K),Yn(i);return!0},get(l,a,u){var d;if(a===yt)return e;var f=n.get(a),h=a in l;if(f===void 0&&(!h||(d=Vt(l,a))!=null&&d.writable)&&(f=s(()=>{var y=gt(h?l[a]:K),m=ae(y);return m}),n.set(a,f)),f!==void 0){var c=p(f);return c===K?void 0:c}return Reflect.get(l,a,u)},getOwnPropertyDescriptor(l,a){var u=Reflect.getOwnPropertyDescriptor(l,a);if(u&&"value"in u){var f=n.get(a);f&&(u.value=p(f))}else if(u===void 0){var h=n.get(a),c=h==null?void 0:h.v;if(h!==void 0&&c!==K)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return u},has(l,a){var c;if(a===yt)return!0;var u=n.get(a),f=u!==void 0&&u.v!==K||Reflect.has(l,a);if(u!==void 0||N!==null&&(!f||(c=Vt(l,a))!=null&&c.writable)){u===void 0&&(u=s(()=>{var d=f?gt(l[a]):K,y=ae(d);return y}),n.set(a,u));var h=p(u);if(h===K)return!1}return f},set(l,a,u,f){var C;var h=n.get(a),c=a in l;if(r&&a==="length")for(var d=u;d<h.v;d+=1){var y=n.get(d+"");y!==void 0?M(y,K):d in l&&(y=s(()=>ae(K)),n.set(d+"",y))}if(h===void 0)(!c||(C=Vt(l,a))!=null&&C.writable)&&(h=s(()=>ae(void 0)),M(h,gt(u)),n.set(a,h));else{c=h.v!==K;var m=s(()=>gt(u));M(h,m)}var g=Reflect.getOwnPropertyDescriptor(l,a);if(g!=null&&g.set&&g.set.call(f,u),!c){if(r&&typeof a=="string"){var _=n.get("length"),S=Number(a);Number.isInteger(S)&&S>=_.v&&M(_,S+1)}Yn(i)}return!0},ownKeys(l){p(i);var a=Reflect.ownKeys(l).filter(h=>{var c=n.get(h);return c===void 0||c.v!==K});for(var[u,f]of n)f.v!==K&&!(u in l)&&a.push(u);return a},setPrototypeOf(){Al()}})}function Xr(e){try{if(e!==null&&typeof e=="object"&&yt in e)return e[yt]}catch{}return e}function Hl(e,t){return Object.is(Xr(e),Xr(t))}var Gl,zl,Yl;function Ke(e=""){return document.createTextNode(e)}function Cn(e){return zl.call(e)}function tn(e){return Yl.call(e)}function ue(e,t){return Cn(e)}function B(e,t=!1){{var n=Cn(e);return n instanceof Comment&&n.data===""?tn(n):n}}function We(e,t=1,n=!1){let r=e;for(;t--;)r=tn(r);return r}function ql(e){e.textContent=""}function Ni(){return!1}function Oi(e,t,n){return t==null||t===gi?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Xl(e){N===null&&(L===null&&bl(),_l()),ze&&ml()}function Zl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function qe(e,t){var n=N;n!==null&&(n.f&ne)!==0&&(e|=ne);var r={ctx:ge,deps:null,nodes:null,f:e|H|pe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};R==null||R.register_created_effect(r);var i=r;if((e&Et)!==0)ht!==null?ht.push(r):Ht.ensure().schedule(r);else if(t!==null){try{St(r)}catch(s){throw ve(r),s}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Pn)===0&&(i=i.first,(e&Ee)!==0&&(e&Ge)!==0&&i!==null&&(i.f|=Ge))}if(i!==null&&(i.parent=n,n!==null&&Zl(i,n),L!==null&&(L.f&q)!==0&&(e&He)===0)){var o=L;(o.effects??(o.effects=[])).push(i)}return r}function Mi(){return L!==null&&!Be}function wr(e){const t=qe(pr,null);return j(t,z),t.teardown=e,t}function Cr(e){Xl();var t=N.f,n=!L&&(t&ye)!==0&&ge!==null&&!ge.i;if(n){var r=ge;(r.e??(r.e=[])).push(e)}else return Wi(e)}function Wi(e){return qe(Et|pl,e)}function Fi(e){return qe(Et,e)}function Jl(e){return qe(vt|Pn,e)}function $(e,t=[],n=[],r=[]){Ai(r,t,n,i=>{qe(pr,()=>{e(...i.map(p))})})}function nn(e,t=0){var n=qe(Ee|t,e);return n}function Vi(e,t=0){var n=qe(hr|t,e);return n}function it(e){return qe(ye|Pn,e)}function ji(e){var t=e.teardown;if(t!==null){const n=ze,r=L;Zr(!0),xe(null);try{t.call(null)}finally{Zr(n),xe(r)}}}function Ar(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&en(()=>{i.abort($t)});var r=n.next;(n.f&He)!==0?n.parent=null:ve(n,t),n=r}}function Ql(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ye)===0&&ve(t),t=n}}function ve(e,t=!0){var n=!1;(t||(e.f&dl)!==0)&&e.nodes!==null&&e.nodes.end!==null&&($l(e.nodes.start,e.nodes.end),n=!0),e.f|=Hr,Ar(e,t&&!n),Yt(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();ji(e),e.f^=Hr,e.f|=he;var i=e.parent;i!==null&&i.first!==null&&Bi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function $l(e,t){for(;e!==null;){var n=e===t?null:tn(e);e.remove(),e=n}}function Bi(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Er(e,t,n=!0){var r=[];Ui(e,r,!0);var i=()=>{n&&ve(e),t&&t()},o=r.length;if(o>0){var s=()=>--o||i();for(var l of r)l.out(s)}else i()}function Ui(e,t,n){if((e.f&ne)===0){e.f^=ne;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var o=i.next;if((i.f&He)===0){var s=(i.f&Ge)!==0||(i.f&ye)!==0&&(e.f&Ee)!==0;Ui(i,t,s?n:!1)}i=o}}}function An(e){Ki(e,!0)}function Ki(e,t){if((e.f&ne)!==0){e.f^=ne,(e.f&z)===0&&(j(e,H),Ht.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Ge)!==0||(n.f&ye)!==0;Ki(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const s of o)(s.is_global||t)&&s.in()}}function Hi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:tn(n);t.append(n),n=i}}let dn=!1,ze=!1;function Zr(e){ze=e}let L=null,Be=!1;function xe(e){L=e}let N=null;function Ye(e){N=e}let Re=null;function Gi(e){L!==null&&(Re??(Re=new Set)).add(e)}let oe=null,se=0,fe=null;function ea(e){fe=e}let zi=1,Xe=0,tt=Xe;function Jr(e){tt=e}function Yi(){return++zi}function rn(e){var t=e.f;if((t&H)!==0)return!0;if(t&q&&(e.f&=~rt),(t&Se)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(rn(o)&&Si(o),o.wv>e.wv)return!0}(t&pe)!==0&&Z===null&&j(e,z)}return!1}function qi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Re!==null&&Re.has(e)))for(var i=0;i<r.length;i++){var o=r[i];(o.f&q)!==0?qi(o,t,!1):t===o&&(n?j(o,H):(o.f&z)!==0&&j(o,Se),br(o))}}function Xi(e){var m;var t=oe,n=se,r=fe,i=L,o=Re,s=ge,l=Be,a=tt,u=e.f;oe=null,se=0,fe=null,L=(u&(ye|He))===0?e:null,Re=null,mn(e.ctx),Be=!1,tt=++Xe,e.ac!==null&&(en(()=>{e.ac.abort($t)}),e.ac=null);try{e.f|=yn;var f=e.fn,h=f();e.f|=It;var c=e.deps,d=R==null?void 0:R.is_fork;if(oe!==null){var y;if(d||Yt(e,se),c!==null&&se>0)for(c.length=se+oe.length,y=0;y<oe.length;y++)c[se+y]=oe[y];else e.deps=c=oe;if(Mi()&&(e.f&pe)!==0)for(y=se;y<c.length;y++)((m=c[y]).reactions??(m.reactions=[])).push(e)}else!d&&c!==null&&se<c.length&&(Yt(e,se),c.length=se);if(wi()&&fe!==null&&!Be&&c!==null&&(e.f&(q|Se|H))===0)for(y=0;y<fe.length;y++)qi(fe[y],e);if(i!==null&&i!==e){if(Xe++,i.deps!==null)for(let g=0;g<n;g+=1)i.deps[g].rv=Xe;if(t!==null)for(const g of t)g.rv=Xe;fe!==null&&(r===null?r=fe:r.push(...fe))}return(e.f&Ue)!==0&&(e.f^=Ue),h}catch(g){return kl(g)}finally{e.f^=yn,oe=t,se=n,fe=r,L=i,Re=o,mn(s),Be=l,tt=a}}function ta(e,t){let n=t.reactions;if(n!==null){var r=il.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&q)!==0&&(oe===null||!gn.call(oe,t))){var o=t;(o.f&pe)!==0&&(o.f^=pe,o.f&=~rt),o.v!==K&&vr(o),o.ac!==null&&en(()=>{o.ac.abort($t),o.ac=null,j(o,H)}),Fl(o),Yt(o,0)}}function Yt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ta(e,n[r])}function St(e){var t=e.f;if((t&he)===0){j(e,z);var n=N,r=dn;N=e,dn=(t&(ye|He))===0;try{(t&(Ee|hr))!==0?Ql(e):Ar(e),ji(e);var i=Xi(e);e.teardown=typeof i=="function"?i:null,e.wv=zi;var o;vi&&Dl&&(e.f&H)!==0&&e.deps}finally{dn=r,N=n}}}function p(e){var t=e.f,n=(t&q)!==0;if(L!==null&&!Be){var r=N!==null&&(N.f&he)!==0;if(!r&&(Re===null||!Re.has(e))){var i=L.deps;if((L.f&yn)!==0)e.rv<Xe&&(e.rv=Xe,oe===null&&i!==null&&i[se]===e?se++:oe===null?oe=[e]:oe.push(e));else{L.deps??(L.deps=[]),gn.call(L.deps,e)||L.deps.push(e);var o=e.reactions;o===null?e.reactions=[L]:gn.call(o,L)||o.push(L)}}}if(ze&&et.has(e))return et.get(e);if(n){var s=e;if(ze){var l=s.v;return((s.f&z)===0&&s.reactions!==null||Ji(s))&&(l=mr(s)),et.set(s,l),l}var a=(s.f&pe)===0&&!Be&&L!==null&&(dn||(L.f&pe)!==0),u=(s.f&It)===0;rn(s)&&(a&&(s.f|=pe),Si(s)),a&&!u&&(Ti(s),Zi(s))}if(Z!=null&&Z.has(e))return Z.get(e);if((e.f&Ue)!==0)throw e.v;return e.v}function Zi(e){if(e.f|=pe,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&q)!==0&&(t.f&pe)===0&&(Ti(t),Zi(t))}function Ji(e){if(e.v===K)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(et.has(t)||(t.f&q)!==0&&Ji(t))return!0;return!1}const Ze=Symbol("events"),na=new Set,ra=new Set;function ia(e,t,n,r={}){function i(o){if(r.capture||la.call(t,o),!o.cancelBubble)return en(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Kt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function oa(e,t,n){(t[Ze]??(t[Ze]={}))[e]=n}function sa(e){for(var t=0;t<e.length;t++)na.add(e[t]);for(var n of ra)n(e)}let Qr=null;function la(e){var m,g;var t=this,n=t.ownerDocument,r=e.type,i=((m=e.composedPath)==null?void 0:m.call(e))||[],o=i[0]||e.target;Qr=e;var s=0,l=Qr===e&&e[Ze];if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e[Ze]=t;return}var u=i.indexOf(t);if(u===-1)return;a<=u&&(s=a)}if(o=i[s]||e.target,o!==t){ol(e,"currentTarget",{configurable:!0,get(){return o||n}});var f=L,h=N;xe(null),Ye(null);try{for(var c,d=[];o!==null&&o!==t;){try{var y=(g=o[Ze])==null?void 0:g[r];y!=null&&(!o.disabled||e.target===o)&&y.call(o,e)}catch(_){c?d.push(_):c=_}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(c){for(let _ of d)queueMicrotask(()=>{throw _});throw c}}finally{e[Ze]=t,delete e.currentTarget,xe(f),Ye(h)}}}var pi;const qn=((pi=globalThis==null?void 0:globalThis.window)==null?void 0:pi.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function aa(e){return(qn==null?void 0:qn.createHTML(e))??e}function ua(e){var t=Oi("template");return t.innerHTML=aa(e.replaceAll("<!>","<!---->")),t.content}function qt(e,t){var n=N;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function me(e,t){var n=(t&el)!==0,r=(t&tl)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=ua(o?e:"<!>"+e),n||(i=Cn(i)));var s=r||Gl?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Cn(s),a=s.lastChild;qt(l,a)}else qt(s,s);return s}}function on(e=""){{var t=Ke(e+"");return qt(t,t),t}}function Y(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Ke();return e.append(t,n),qt(t,n),e}function k(e,t){e!==null&&e.before(t)}function ca(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const fa=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function da(e){return fa.includes(e)}const pa={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ha(e){return e=e.toLowerCase(),pa[e]??e}function Dt(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[un]??(e[un]=e.nodeValue))&&(e[un]=n,e.nodeValue=`${n}`)}var Ae,ke,le,$e,Jt,Qt,Dn;class kn{constructor(t,n=!0){be(this,"anchor");V(this,Ae,new Map);V(this,ke,new Map);V(this,le,new Map);V(this,$e,new Set);V(this,Jt,!0);V(this,Qt,t=>{if(v(this,Ae).has(t)){var n=v(this,Ae).get(t),r=v(this,ke).get(n);if(r)An(r),v(this,$e).delete(n);else{var i=v(this,le).get(n);i&&(An(i.effect),v(this,ke).set(n,i.effect),v(this,le).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,s]of v(this,Ae)){if(v(this,Ae).delete(o),o===t)break;const l=v(this,le).get(s);l&&(ve(l.effect),v(this,le).delete(s))}for(const[o,s]of v(this,ke)){if(o===n||v(this,$e).has(o))continue;const l=()=>{if(Array.from(v(this,Ae).values()).includes(o)){var u=document.createDocumentFragment();Hi(s,u),u.append(Ke()),v(this,le).set(o,{effect:s,fragment:u})}else ve(s);v(this,$e).delete(o),v(this,ke).delete(o)};v(this,Jt)||!r?(v(this,$e).add(o),Er(s,l,!1)):l()}}});V(this,Dn,t=>{v(this,Ae).delete(t);const n=Array.from(v(this,Ae).values());for(const[r,i]of v(this,le))n.includes(r)||(ve(i.effect),v(this,le).delete(r))});this.anchor=t,re(this,Jt,n)}ensure(t,n){var r=R,i=Ni();if(n&&!v(this,ke).has(t)&&!v(this,le).has(t))if(i){var o=document.createDocumentFragment(),s=Ke();o.append(s),v(this,le).set(t,{effect:it(()=>n(s)),fragment:o})}else v(this,ke).set(t,it(()=>n(this.anchor)));if(v(this,Ae).set(r,t),i){for(const[l,a]of v(this,ke))l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of v(this,le))l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(v(this,Qt)),r.ondiscard(v(this,Dn))}else v(this,Qt).call(this,r)}}Ae=new WeakMap,ke=new WeakMap,le=new WeakMap,$e=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Dn=new WeakMap;function Sr(e,t,...n){var r=new kn(e);nn(()=>{const i=t()??null;r.ensure(i,i&&(o=>i(o,...n)))},Ge)}function ce(e,t,n=!1){var r=new kn(e),i=n?Ge:0;function o(s,l){r.ensure(s,l)}nn(()=>{var s=!1;t((l,a=0)=>{s=!0,o(a,l)}),s||o(-1,null)},i)}function ga(e,t,n){for(var r=[],i=t.length,o,s=t.length,l=0;l<i;l++){let h=t[l];Er(h,()=>{if(o){if(o.pending.delete(h),o.done.add(h),o.pending.size===0){var c=e.outrogroups;or(e,dr(o.done)),c.delete(o),c.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var a=r.length===0&&n!==null&&e.pending.size===0;if(a){var u=n,f=u.parentNode;ql(f),f.append(u),e.items.clear()}or(e,t,!a)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function or(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const s of e.pending.values())for(const l of s)r.add(e.items.get(l).e)}for(var i=0;i<t.length;i++){var o=t[i];if(r!=null&&r.has(o)){o.f|=Le;const s=document.createDocumentFragment();Hi(o,s)}else ve(t[i],n)}}var $r;function Bt(e,t,n,r,i,o=null){var s=e,l=new Map,a=(t&hi)!==0;if(a){var u=e;s=u.appendChild(Ke())}var f=null,h=Ml(()=>{var C=n();return fr(C)?C:C==null?[]:dr(C)}),c,d=new Map,y=!0;function m(C){(S.effect.f&he)===0&&(S.pending.delete(C),S.fallback=f,va(S,c,s,t,r),f!==null&&(c.length===0?(f.f&Le)===0?An(f):(f.f^=Le,Wt(f,null,s)):Er(f,()=>{f=null})))}function g(C){S.pending.delete(C)}var _=nn(()=>{c=p(h);for(var C=c.length,b=new Set,w=R,D=Ni(),E=0;E<C;E+=1){var I=c[E],W=r(I,E),A=y?null:l.get(W);A?(A.v&&zt(A.v,I),A.i&&zt(A.i,E),D&&w.unskip_effect(A.e)):(A=ya(l,y?s:$r??($r=Ke()),I,W,E,i,t,n),y||(A.e.f|=Le),l.set(W,A)),b.add(W)}if(C===0&&o&&!f&&(y?f=it(()=>o(s)):(f=it(()=>o($r??($r=Ke()))),f.f|=Le)),C>b.size&&yl(),!y)if(d.set(w,b),D){for(const[P,F]of l)b.has(P)||w.skip_effect(F.e);w.oncommit(m),w.ondiscard(g)}else m(w);p(h)}),S={effect:_,items:l,pending:d,outrogroups:null,fallback:f};y=!1}function Lt(e){for(;e!==null&&(e.f&ye)===0;)e=e.next;return e}function va(e,t,n,r,i){var A,P,F,X,J,x,Q,at,an;var o=(r&Qs)!==0,s=t.length,l=e.items,a=Lt(e.effect.first),u,f=null,h,c=[],d=[],y,m,g,_;if(o)for(_=0;_<s;_+=1)y=t[_],m=i(y,_),g=l.get(m).e,(g.f&Le)===0&&((P=(A=g.nodes)==null?void 0:A.a)==null||P.measure(),(h??(h=new Set)).add(g));for(_=0;_<s;_+=1){if(y=t[_],m=i(y,_),g=l.get(m).e,e.outrogroups!==null)for(const _e of e.outrogroups)_e.pending.delete(g),_e.done.delete(g);if((g.f&ne)!==0&&(An(g),o&&((X=(F=g.nodes)==null?void 0:F.a)==null||X.unfix(),(h??(h=new Set)).delete(g))),(g.f&Le)!==0)if(g.f^=Le,g===a)Wt(g,null,n);else{var S=f?f.next:a;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Ve(e,f,g),Ve(e,g,S),Wt(g,S,n),f=g,c=[],d=[],a=Lt(f.next);continue}if(g!==a){if(u!==void 0&&u.has(g)){if(c.length<d.length){var C=d[0],b;f=C.prev;var w=c[0],D=c[c.length-1];for(b=0;b<c.length;b+=1)Wt(c[b],C,n);for(b=0;b<d.length;b+=1)u.delete(d[b]);Ve(e,w.prev,D.next),Ve(e,f,w),Ve(e,D,C),a=C,f=D,_-=1,c=[],d=[]}else u.delete(g),Wt(g,a,n),Ve(e,g.prev,g.next),Ve(e,g,f===null?e.effect.first:f.next),Ve(e,f,g),f=g;continue}for(c=[],d=[];a!==null&&a!==g;)(u??(u=new Set)).add(a),d.push(a),a=Lt(a.next);if(a===null)continue}(g.f&Le)===0&&c.push(g),f=g,a=Lt(g.next)}if(e.outrogroups!==null){for(const _e of e.outrogroups)_e.pending.size===0&&(or(e,dr(_e.done)),(J=e.outrogroups)==null||J.delete(_e));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||u!==void 0){var E=[];if(u!==void 0)for(g of u)(g.f&ne)===0&&E.push(g);for(;a!==null;)(a.f&ne)===0&&a!==e.fallback&&E.push(a),a=Lt(a.next);var I=E.length;if(I>0){var W=(r&hi)!==0&&s===0?n:null;if(o){for(_=0;_<I;_+=1)(Q=(x=E[_].nodes)==null?void 0:x.a)==null||Q.measure();for(_=0;_<I;_+=1)(an=(at=E[_].nodes)==null?void 0:at.a)==null||an.fix()}ga(e,E,W)}}o&&Kt(()=>{var _e,ut;if(h!==void 0)for(g of h)(ut=(_e=g.nodes)==null?void 0:_e.a)==null||ut.apply()})}function ya(e,t,n,r,i,o,s,l){var a=(s&Zs)!==0?(s&$s)===0?Ul(n,!1,!1):Gt(n):null,u=(s&Js)!==0?Gt(i):null;return{v:a,i:u,e:it(()=>(o(t,a??n,u??i,l),()=>{e.delete(r)}))}}function Wt(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&(t.f&Le)===0?t.nodes.start:n;r!==null;){var s=tn(r);if(o.before(r),r===i)return;r=s}}function Ve(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Xn(e,t,n){var r=new kn(e);nn(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Ge)}function sn(e,t,n,r,i,o){var s=null,l=e,a=new kn(l,!1);nn(()=>{const u=t()||null;var f=u==="svg"?nl:void 0;if(u===null){a.ensure(null,null);return}return a.ensure(u,h=>{if(u){if(s=Oi(u,f),qt(s,s),r){var c=null,d=s.appendChild(Ke());r(s,d),c==null||c.remove()}N.nodes.end=s,h.before(s)}}),()=>{}},Ge),wr(()=>{})}function ma(e,t){var n=void 0,r;Vi(()=>{n!==(n=t())&&(r&&(ve(r),r=null),n&&(r=it(()=>{Fi(()=>n(e))})))})}function Qi(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Qi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _a(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Qi(e))&&(r&&(r+=" "),r+=t);return r}function Xt(e){return typeof e=="object"?_a(e):e??""}const ei=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function ba(e,t,n){var r=e==null?"":""+e;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var l=s+o;(s===0||ei.includes(r[s-1]))&&(l===r.length||ei.includes(r[l]))?r=(s===0?"":r.substring(0,s))+r.substring(l+1):s=l}}return r===""?null:r}function ti(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];o!=null&&o!==""&&(r+=" "+i+": "+o+n)}return r}function Zn(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function wa(e,t){if(t){var n="",r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,l=!1,a=[];r&&a.push(...Object.keys(r).map(Zn)),i&&a.push(...Object.keys(i).map(Zn));var u=0,f=-1;const m=e.length;for(var h=0;h<m;h++){var c=e[h];if(l?c==="/"&&e[h-1]==="*"&&(l=!1):o?o===c&&(o=!1):c==="/"&&e[h+1]==="*"?l=!0:c==='"'||c==="'"?o=c:c==="("?s++:c===")"&&s--,!l&&o===!1&&s===0){if(c===":"&&f===-1)f=h;else if(c===";"||h===m-1){if(f!==-1){var d=Zn(e.substring(u,f).trim());if(!a.includes(d)){c!==";"&&h++;var y=e.substring(u,h).trim();n+=" "+y+";"}}u=h+1,f=-1}}}}return r&&(n+=ti(r)),i&&(n+=ti(i,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Tt(e,t,n,r,i,o){var s=e[Gr];if(s!==n||s===void 0){var l=ba(n,r,o);l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l),e[Gr]=n}else if(o&&i!==o)for(var a in o){var u=!!o[a];(i==null||u!==!!i[a])&&e.classList.toggle(a,u)}return o}function Jn(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function ee(e,t,n,r){var i=e[zr];if(i!==t){var o=wa(t,r);o==null?e.removeAttribute("style"):e.style.cssText=o,e[zr]=t}else r&&(Array.isArray(r)?(Jn(e,n==null?void 0:n[0],r[0]),Jn(e,n==null?void 0:n[1],r[1],"important")):Jn(e,n,r));return r}function sr(e,t,n=!1){if(e.multiple){if(t==null)return;if(!fr(t))return Tl();for(var r of e.options)r.selected=t.includes(ni(r));return}for(r of e.options){var i=ni(r);if(Hl(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Ca(e){var t=new MutationObserver(()=>{"__value"in e&&sr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),wr(()=>{t.disconnect()})}function ni(e){return"__value"in e?e.__value:e.value}const Rt=Symbol("class"),xt=Symbol("style"),$i=Symbol("is custom element"),eo=Symbol("is html"),Aa=gr?"input":"INPUT",Ea=gr?"option":"OPTION",Sa=gr?"select":"SELECT";function Ta(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function nt(e,t,n,r){var i=to(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[gl]=n),n==null?e.removeAttribute(t):typeof n!="string"&&no(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ia(e,t,n,r,i=!1,o=!1){var s=to(e),l=s[$i],a=!s[eo],u=t||{},f=e.nodeName===Ea;for(var h in t)h in n||(n[h]=null);n.class?n.class=Xt(n.class):n[Rt]&&(n.class=null),n[xt]&&(n.style??(n.style=null));var c=no(e);if(e.nodeName===Aa&&"type"in n&&("value"in n||"__value"in n)){var d=n.type;(d!==u.type||d===void 0&&e.hasAttribute("type"))&&(u.type=d,nt(e,"type",d))}for(const b in n){let w=n[b];if(f&&b==="value"&&w==null){e.value=e.__value="",u[b]=w;continue}if(b==="class"){var y=e.namespaceURI==="http://www.w3.org/1999/xhtml";Tt(e,y,w,r,t==null?void 0:t[Rt],n[Rt]),u[b]=w,u[Rt]=n[Rt];continue}if(b==="style"){ee(e,w,t==null?void 0:t[xt],n[xt]),u[b]=w,u[xt]=n[xt];continue}var m=u[b];if(!(w===m&&!(w===void 0&&e.hasAttribute(b)))){u[b]=w;var g=b[0]+b[1];if(g!=="$$")if(g==="on"){const D={},E="$$"+b;let I=b.slice(2);var _=da(I);if(ca(I)&&(I=I.slice(0,-7),D.capture=!0),!_&&m){if(w!=null)continue;e.removeEventListener(I,u[E],D),u[E]=null}if(_)oa(I,e,w),sa([I]);else if(w!=null){let W=function(A){u[b].call(this,A)};u[E]=ia(I,e,W,D)}}else if(b==="style")nt(e,b,w);else if(b==="autofocus")xl(e,!!w);else if(!l&&(b==="__value"||b==="value"&&w!=null))e.value=e.__value=w;else if(b==="selected"&&f)Ta(e,w);else{var S=b;a||(S=ha(S));var C=S==="defaultValue"||S==="defaultChecked";if(w==null&&!l&&!C)if(s[b]=null,S==="value"||S==="checked"){let D=e;const E=t===void 0;if(S==="value"){let I=D.defaultValue;D.removeAttribute(S),D.defaultValue=I,D.value=D.__value=E?I:null}else{let I=D.defaultChecked;D.removeAttribute(S),D.defaultChecked=I,D.checked=E?I:!1}}else e.removeAttribute(b);else C||c.includes(S)&&(l||typeof w!="string")?(e[S]=w,S in s&&(s[S]=K)):typeof w!="function"&&nt(e,S,w)}}}return u}function Tr(e,t,n=[],r=[],i=[],o,s=!1,l=!1){Ai(i,n,r,a=>{var u=void 0,f={},h=e.nodeName===Sa,c=!1;if(Vi(()=>{var y=t(...a.map(p)),m=Ia(e,u,y,o,s,l);c&&h&&"value"in y&&sr(e,y.value);for(let _ of Object.getOwnPropertySymbols(f))y[_]||ve(f[_]);for(let _ of Object.getOwnPropertySymbols(y)){var g=y[_];_.description===rl&&(!u||g!==u[_])&&(f[_]&&ve(f[_]),f[_]=it(()=>ma(e,()=>g))),m[_]=g}u=m}),h){var d=e;Fi(()=>{sr(d,u.value,!0),Ca(d)})}c=!0})}function to(e){return e[Hn]??(e[Hn]={[$i]:e.nodeName.includes("-"),[eo]:e.namespaceURI===gi})}var ri=new Map;function no(e){var t=e.getAttribute("is")||e.nodeName,n=ri.get(t);if(n)return n;ri.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=sl(i);for(var s in r)r[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&n.push(s);i=yi(i)}return n}const Da={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(kt(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];kt(i)&&(i=i());const o=Vt(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(kt(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const i=Vt(r,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===yt||t===hl)return!1;for(let n of e.props)if(kt(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(kt(n)&&(n=n()),!!n){for(const r in n)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(n))t.includes(r)||t.push(r)}return t}};function Qn(...e){return new Proxy({props:e},Da)}function de(e,t,n,r){var i=r,o=!0,s=()=>(o&&(o=!1,i=r),i),l;l=e[t],l===void 0&&r!==void 0&&(l=s());var a;return a=()=>{var u=e[t];return u===void 0?s():(o=!0,u)},a}const Pt="default";function Ir(e,t){return!(e!=null&&e.length)||e===Pt?t:`${e}/${t}`}const Pa=`RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-svelte README.`;function ii(e){if(!e||typeof e!="object")return!1;const t=e;return!!t.manifest&&typeof t.manifest=="object"&&!!t.components&&typeof t.components=="object"&&!Array.isArray(t.components)}function ka(e){if(ii(e))return e;const t=e;return ii(t==null?void 0:t.default)?t.default:null}function $n(e){return e.usesDefaultLibrary?[Pt,...e.libraryIds]:[...e.libraryIds]}function oi({registrations:e,referenced:t}){if(t.usesDefaultLibrary&&!(e!=null&&e[Pt]))throw new Error(Pa)}function La(e){const t=[],n=new Set;for(const r of e.values()){if(typeof r.stylesheet!="string")continue;const i=r.stylesheet.trim();!i||n.has(i)||(n.add(i),t.push(i))}return t.length>0?t:void 0}function ro(e){const t={};for(const[r,i]of e){const o=r===Pt;for(const[s,l]of Object.entries(i.components))t[o?s:`${r}/${s}`]=l}const n=La(e);return n?{components:t,stylesheets:n}:{components:t}}function ln(){const e=new Map,t=new Map,n=new Map,r=new Map;let i=0;function o(u,f){var h;e.get(u)!==f&&((h=f.manifest)!=null&&h.id&&f.manifest.id!==u&&console.warn(`RuleCMS widget: component library registered as "${u}" declares manifest id "${f.manifest.id}". The registered id wins for resolution.`),e.set(u,f),i+=1)}function s(u){const f=$n(u),h=[...f].sort().join("|"),c=r.get(h);if(c&&c.loadedVersion===i)return c.plugin;const d=new Map;for(const m of f){const g=e.get(m);g&&d.set(m,g)}const y=ro(d);return r.set(h,{loadedVersion:i,plugin:y}),y}function l(u){oi(u);const{registrations:f,referenced:h}=u;for(const c of $n(h)){if(e.has(c)||n.has(c))continue;const d=f==null?void 0:f[c];if(!d){console.error(`RuleCMS widget: no component library registered for libraryId "${c}"; its components will not render.`),n.set(c,new Error(`No registration for libraryId "${c}"`));continue}if(typeof d=="function")return null;o(c,d)}return s(h)}async function a(u){oi(u);const{registrations:f,referenced:h}=u,c=$n(h);return await Promise.all(c.map(async d=>{if(e.has(d)||n.has(d))return;const y=f==null?void 0:f[d];if(!y){console.error(`RuleCMS widget: no component library registered for libraryId "${d}"; its components will not render.`),n.set(d,new Error(`No registration for libraryId "${d}"`));return}if(typeof y!="function"){o(d,y);return}let m=t.get(d);m||(m=y().then(g=>{const _=ka(g);if(!_)throw new Error(`Registration for libraryId "${d}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`);o(d,_)}).catch(g=>{n.set(d,g),console.error(`RuleCMS widget: failed to load component library "${d}":`,g)}).finally(()=>{t.delete(d)}),t.set(d,m)),await m})),s(h)}return{resolveSync:l,resolve:a}}const Ra={Preview:"Preview",Compose:"Compose",RenderedPage:"RenderedPage"},Ln={DroppableBox:"droppable-box"},lr={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly"},xa={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly",Stretch:"stretch"},En="cssAttrArray",Na={Phone:"phone",Tablet:"tablet",Desktop:"desktop"},Dr={ComposerComponent:"ComposerWidget",Collection:"Collection",MoveComponentHandle:"MoveWidgetHandle"},Pr=`${Dr.Collection}_`,io="dev.",oo="https://rulecms.com",so="https://widget-cache.rulecms.com",lo="/api/v1/c/widget/get",ao="/api/v1/c/dev/widget/get";function ot(e){return typeof e=="string"&&e.startsWith(io)}function uo(e,t){return t?t.replace(/\/$/,""):ot(e)?oo:so}function kr({publishedKey:e,token:t,endpoint:n}){const r=ot(t),i=r?ao:lo,o=r?new URLSearchParams({widgetKey:e,token:t}):new URLSearchParams({publishedKey:e,token:t});return`${uo(t,n)}${i}?${o.toString()}`}const Oa=({id:e,prefix:t})=>`${t}_${e}`,co=e=>{if(!(e!=null&&e.length)||!e.includes("_")){console.error(`Invalid drag item id: ${e}. Type does not exist.`);return}return fo(e)},Lr=e=>e.includes("_"),fo=e=>{const t=e.indexOf("_"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:n,id:r}},Rr=e=>{if(!Lr(e))return;const n=co(e);return(n==null?void 0:n.prefix)===Dr.Collection||console.error("getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."),n==null?void 0:n.id},Ma=e=>{if(!(e!=null&&e.length)){console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");return}const t=e.split("$");if(t.length<2){console.error("getNameAndInstanceIdFromWidgetKey: Invalid widget key format");return}const n=t[0];if(!t[1].includes("@"))return{name:n,instanceId:t[1]};const i=t[1].split("@");return{name:n,instanceId:i[0],parentId:i[1]}},Wa=e=>{if(!(e!=null&&e.length))return{errorMessage:"getNameFromWidgetKey: Missing widget key"};const t=e.split("$");return t.length<2?{errorMessage:"getNameFromWidgetKey: Invalid widget key format"}:{name:t[0]}},po=e=>{var i,o,s,l;if(!e)return{error:"getWidgetKeyForCollection: Missing collection"};if(!((i=e.name)!=null&&i.length))return{error:"getWidgetKeyForCollection: Missing collection name"};const t=(o=e.name)==null?void 0:o.trim().toLowerCase();if(!((s=e.id)!=null&&s.length))return{error:"getWidgetKeyForCollection: Missing collection id"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.id}@${e.parentId}`:`${e.id}`;return{data:`${t}$${r}`}},ho=e=>{var i,o,s,l;if(!e)return{error:"getWidgetKeyForPublishedCollection: Missing collection"};if(!((i=e.name)!=null&&i.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection name"};const t=(o=e.name)==null?void 0:o.trim().toLowerCase();if(!((s=e.publishedKey)!=null&&s.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection publishedKey"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.publishedKey}@${e.parentId}`:`${e.publishedKey}`;return{data:`${t}$${r}`}},Fa=e=>{const t=po(e);return`${Pr}${t.data}`},Va=e=>{const t=ho(e);return`${Pr}${t.data}`},go="---",vo="___";function yo(e,t){return`${e}${go}${t}`}function ja(e,t,n){return`${yo(e,t)}${vo}${n}`}function Ba(e){const t=e.split(".");if(t.length!==3)throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);const n=t[0],r=t[1],i=parseInt(t[2],10);if(isNaN(i))throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);return`${n}.${r}.${i+1}`}function Rn({displayItemList:e,widgetCollections:t}){const n=new Set;let r=!1;const i=o=>{var s,l,a;if((s=o==null?void 0:o.rows)!=null&&s.length){for(const u of o.rows)if((l=u==null?void 0:u.columns)!=null&&l.length)for(const f of u.columns)f.collection&&i(f.collection.collectionRows),!(!f.type||f.type===Ln.DroppableBox)&&(Lr(f.type)||(!((a=f.libraryId)!=null&&a.length)||f.libraryId===Pt?r=!0:n.add(f.libraryId)))}};i(e);for(const o of Object.values(t??{}))i(o==null?void 0:o.collectionRows);return{libraryIds:Array.from(n),usesDefaultLibrary:r}}const xr=Symbol("rulecms-widget-context");function Ua(){return{token:"",endpoint:void 0,libraries:void 0,libraryRegistry:ln()}}function Ka(e,t){Ie(t,!0);const n=gt(Ua());Cr(()=>{n.token=t.token,n.endpoint=t.endpoint,n.libraries=t.libraries}),tr.setContext(xr,n);var r=Y(),i=B(r);Sr(i,()=>t.children),k(e,r),De()}const mo="1200px",Nr="500px",Or="820px",Ha=mo,_o="rulecms",Ga=1920,za={f:"auto",q:"auto",c:"limit"},Ya=/^[A-Za-z0-9][A-Za-z0-9._\-/]*$/,qa=300,Xa=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,Za=100,Ja=/^https:\/\/[^\s"'()\\<>]+$/,Qa=2e3,$a=/^[A-Za-z0-9_,.:\-/]*$/,eu=300,bo=e=>typeof e=="string"&&e.length<=qa&&Ya.test(e),wo=e=>typeof e=="string"&&e.length<=Za&&Xa.test(e),Co=e=>typeof e=="string"&&e.length<=Qa&&Ja.test(e),Ao=e=>typeof e=="string"&&e.length<=eu&&$a.test(e),tu=e=>Object.entries(e).map(([t,n])=>`${t}_${n}`).join(","),nu=e=>{const t={};for(const n of e.split(",")){const r=n.trim(),i=r.indexOf("_");i<=0||(t[r.slice(0,i)]=r.slice(i+1))}return t},Eo=({publicId:e,cloudName:t=_o,transformations:n,width:r=Ga})=>{const i=typeof n=="string"?nu(n):n,o={...za,...i,w:r};return encodeURI(`https://res.cloudinary.com/${t}/image/upload/${tu(o)}/${e}`)},So=/^--[A-Za-z0-9_-]+$/,To=200,xn=e=>{if(typeof e!="string")return!1;const t=e.trim();return t.length<=To&&So.test(t)},Te=e=>`var(${e.trim()})`,G=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return;const t=e.cssVariable;if(t!=null)return xn(t)?t.trim():void 0},Ne=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e.cssVariable;return t==null?!1:!xn(t)},ru=(e,t)=>{const n=G(e);return n?{[t]:Te(n)}:void 0},Io=e=>{if(typeof e!="object"||e===null||Array.isArray(e)||Ne(e))return!1;if(G(e))return!0;const t=e;return t.source==="none"?!0:t.source==="url"?Co(t.url):t.source==="cloudinary"?!bo(t.publicId)||t.cloudName!==void 0&&t.cloudName!==null&&!wo(t.cloudName)?!1:t.transformations===void 0||t.transformations===null||Ao(t.transformations):!1},Do=["px","%","em","rem","vh","vw"],Nn=["inherit","unset"],Po=["allSides","top","right","bottom","left"],st=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;return Ne(e)?!1:G(e)?!0:n.unit==="auto"?t.allowAuto!==!1:n.unit==="keyword"?t.allowKeywords!==!1&&Nn.includes(n.keyword):Do.includes(n.unit)?typeof n.value!="number"||!Number.isFinite(n.value)?!1:t.allowNegative!==!1||n.value>=0:!1},ko=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;for(const r of Po){const i=n[r];if(i!=null&&!st(i,t))return!1}return!0},iu=[...Nn,"transparent","currentColor"],ou=/^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/,On=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Ne(e)?!1:G(e)?!0:t.unit==="keyword"?iu.includes(t.keyword):t.unit==="color"?typeof t.value=="string"&&ou.test(t.value.trim()):!1},Mn=e=>{const t=G(e);return t?Te(t):"unit"in e?e.unit==="keyword"?e.keyword:e.value.trim():""},Lo=(e,t)=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Ne(e)&&!!G(e):typeof e!="string"||!e.length?!1:t.includes(e)?!0:Nn.includes(e),Ro=['system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif','Georgia, "Times New Roman", Times, serif',"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace","Arial, Helvetica, sans-serif",'"Helvetica Neue", Helvetica, Arial, sans-serif',"Verdana, Geneva, sans-serif"],xo=["normal","bold","100","200","300","400","500","600","700","800","900"],No=["normal","italic","oblique"],Oo=["left","center","right","justify","start","end"],Mo=["none","underline","line-through","overline"],Wo=["none","uppercase","lowercase","capitalize"],pn=["visible","hidden","scroll","auto","clip"],Fo=["auto","none"],Vo=["flex-start","flex-end","center","space-between","space-around","space-evenly"],jo=["flex-start","flex-end","center","baseline","stretch"],Bo=["wrap","nowrap"],Uo=["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch"],Ko=["row","row-reverse","column","column-reverse"],Ho=["cover","contain","auto"],Go=["center center","center top","center bottom","left center","left top","left bottom","right center","right top","right bottom"],zo=["no-repeat","repeat","repeat-x","repeat-y","space","round"],Yo=["justifyContent","alignItems","flexWrap","alignContent","flexDirection"],qo=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],Xo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Ne(e)&&!!G(e):qo.includes(e),Zo=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Ne(e)?!1:G(e)?!0:!(t.width!==void 0&&t.width!==null&&!st(t.width,{allowAuto:!1,allowNegative:!1})||t.style!==void 0&&t.style!==null&&!Xo(t.style)||t.color!==void 0&&t.color!==null&&!On(t.color))},su={allowAuto:!1,allowKeywords:!1,allowNegative:!0},lu={allowAuto:!1,allowKeywords:!1,allowNegative:!1},Jo=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;if(Ne(e))return!1;if(G(e))return!0;for(const n of["offsetX","offsetY","spread"]){const r=t[n];if(r!=null&&!st(r,su))return!1}return!(t.blur!==void 0&&t.blur!==null&&!st(t.blur,lu)||t.color!==void 0&&t.color!==null&&!On(t.color)||t.inset!==void 0&&t.inset!==null&&typeof t.inset!="boolean")},Qo=e=>e?e.cssVariable!==void 0&&e.cssVariable!==null||e.offsetX!==void 0||e.offsetY!==void 0||e.blur!==void 0||e.spread!==void 0||e.color!==void 0:!1,$o=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Ne(e)?!1:G(e)?!0:t.unit==="number"?typeof t.value=="number"&&Number.isFinite(t.value)&&t.value>0:st(e,{allowAuto:!1,allowNegative:!1})},es=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Ne(e)&&!!G(e):typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=1,ts=e=>{if(!Io(e))return{};const t=G(e);if(t)return{backgroundImage:Te(t)};const n=e;return n.source==="none"?{backgroundImage:"none"}:n.source==="url"?{backgroundImage:`url("${n.url}")`}:{backgroundImage:`url("${Eo({publicId:n.publicId,cloudName:n.cloudName,transformations:n.transformations})}")`}},lt=e=>{const t=G(e);return t?Te(t):"unit"in e?e.unit==="auto"?"auto":e.unit==="keyword"?e.keyword:`${e.value}${e.unit}`:""},ns=e=>{if(!Zo(e))return{};const t=G(e);if(t)return{border:Te(t)};const n={};if(e.width&&(n.borderWidth=lt(e.width)),e.style){const r=G(e.style);n.borderStyle=r?Te(r):e.style}return e.color&&(n.borderColor=Mn(e.color)),n},cn=e=>e?lt(e):"0px",rs=e=>{if(!Jo(e)||!Qo(e))return{};const t=G(e);if(t)return{boxShadow:Te(t)};const n=[cn(e.offsetX),cn(e.offsetY),cn(e.blur),cn(e.spread)];return e.color&&n.push(Mn(e.color)),e.inset&&n.unshift("inset"),{boxShadow:n.join(" ")}},au=e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`,is=(e,t)=>{if(!ko(e))return{};if(e.allSides)return{[t]:lt(e.allSides)};const n={};for(const r of["top","right","bottom","left"]){const i=e[r];i&&(n[`${t}${au(r)}`]=lt(i))}return n},os=(e,t)=>On(e)?{[t]:Mn(e)}:{},ss=(e,t,n)=>{if(!Lo(e,n))return{};const r=G(e);return r?{[t]:Te(r)}:{[t]:e}},ls=(e,t,n={})=>st(e,n)?{[t]:lt(e)}:{},as=e=>{if(!$o(e))return{};const t=G(e);return t?{lineHeight:Te(t)}:"unit"in e&&e.unit==="number"?{lineHeight:e.value}:{lineHeight:lt(e)}},us=e=>{if(!es(e))return{};const t=G(e);return t?{opacity:Te(t)}:{opacity:e}},Wn={"margin-3-resolutions":{kind:"boxSpacing",cssProperty:"margin"},"padding-3-resolutions":{kind:"boxSpacing",cssProperty:"padding"},"border-3-resolutions":{kind:"border"},"box-shadow-3-resolutions":{kind:"boxShadow"},"border-radius-3-resolutions":{kind:"length",cssProperty:"borderRadius",capabilities:{allowAuto:!1,allowNegative:!1}},"width-3-resolutions":{kind:"length",cssProperty:"width",capabilities:{allowAuto:!0,allowNegative:!1}},"height-3-resolutions":{kind:"length",cssProperty:"height",capabilities:{allowAuto:!0,allowNegative:!1}},"min-width-3-resolutions":{kind:"length",cssProperty:"minWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"max-width-3-resolutions":{kind:"length",cssProperty:"maxWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"min-height-3-resolutions":{kind:"length",cssProperty:"minHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"max-height-3-resolutions":{kind:"length",cssProperty:"maxHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"gap-3-resolutions":{kind:"length",cssProperty:"gap",capabilities:{allowAuto:!1,allowNegative:!1}},"justify-content-3-resolutions":{kind:"enum",cssProperty:"justifyContent",allowedValues:Vo},"align-items-3-resolutions":{kind:"enum",cssProperty:"alignItems",allowedValues:jo},"flex-wrap-3-resolutions":{kind:"enum",cssProperty:"flexWrap",allowedValues:Bo},"align-content-3-resolutions":{kind:"enum",cssProperty:"alignContent",allowedValues:Uo},"flex-direction-3-resolutions":{kind:"enum",cssProperty:"flexDirection",allowedValues:Ko},"overflow-3-resolutions":{kind:"enum",cssProperty:"overflow",allowedValues:pn},"overflow-x-3-resolutions":{kind:"enum",cssProperty:"overflowX",allowedValues:pn},"overflow-y-3-resolutions":{kind:"enum",cssProperty:"overflowY",allowedValues:pn},"pointer-events-3-resolutions":{kind:"enum",cssProperty:"pointerEvents",allowedValues:Fo},"background-color-3-resolutions":{kind:"color",cssProperty:"backgroundColor"},"color-3-resolutions":{kind:"color",cssProperty:"color"},"background-image-3-resolutions":{kind:"backgroundImage"},"background-size-3-resolutions":{kind:"enum",cssProperty:"backgroundSize",allowedValues:Ho},"background-position-3-resolutions":{kind:"enum",cssProperty:"backgroundPosition",allowedValues:Go},"background-repeat-3-resolutions":{kind:"enum",cssProperty:"backgroundRepeat",allowedValues:zo},"opacity-3-resolutions":{kind:"opacity"},"font-family-3-resolutions":{kind:"enum",cssProperty:"fontFamily",allowedValues:Ro},"font-size-3-resolutions":{kind:"length",cssProperty:"fontSize",capabilities:{allowAuto:!1,allowNegative:!1}},"font-weight-3-resolutions":{kind:"enum",cssProperty:"fontWeight",allowedValues:xo},"font-style-3-resolutions":{kind:"enum",cssProperty:"fontStyle",allowedValues:No},"line-height-3-resolutions":{kind:"lineHeight"},"letter-spacing-3-resolutions":{kind:"length",cssProperty:"letterSpacing",capabilities:{allowAuto:!1,allowNegative:!0}},"text-align-3-resolutions":{kind:"enum",cssProperty:"textAlign",allowedValues:Oo},"text-decoration-3-resolutions":{kind:"enum",cssProperty:"textDecoration",allowedValues:Mo},"text-transform-3-resolutions":{kind:"enum",cssProperty:"textTransform",allowedValues:Wo}},cs=(e,t)=>{const n=Wn[e];if(!n)return{};switch(n.kind){case"boxSpacing":return is(t,n.cssProperty);case"length":return ls(t,n.cssProperty,n.capabilities);case"border":return ns(t);case"boxShadow":return rs(t);case"color":return os(t,n.cssProperty);case"opacity":return us(t);case"enum":return ss(t,n.cssProperty,n.allowedValues);case"lineHeight":return as(t);case"backgroundImage":return ts(t);default:return{}}},uu=Object.fromEntries(Object.entries(Wn).filter(([,e])=>e.kind==="boxSpacing").map(([e,t])=>[e,t.cssProperty])),cu=e=>e!=null&&e!=="",fs=e=>e?!Yo.some(n=>cu(e[n]))||e.display==="flex"?e:{...e,display:"flex"}:{},ds=({dbEntryType:e,libraryId:t,sourceComponentsPlugin:n})=>{if(!(e!=null&&e.length))return;const r=n.components[Ir(t,e)];if(!r||!("defaultAttributeValues"in r))return;const o=r.defaultAttributeValues;if(o!=null&&o.length)return o.reduce((s,l)=>({...s,[l.name]:l.defaultValues}),{})},Fe=({deviceDisplayType:e,componentAttributes:t})=>{if(!t)return;const n={},r={};for(const[i,o]of Object.entries(t)){if(!i.includes("3-resolutions")||!o)continue;const s=o.all,l=s??o[e.toLowerCase()];r[i]=l,Wn[i]&&Object.assign(n,cs(i,l))}return Object.keys(n).length||Object.keys(r).length?{styles:Object.keys(n).length?n:void 0,componentAttributesSpecificToDeviceType:Object.keys(r).length?r:void 0}:void 0},ps=({defaultAttributes:e,userModifiedAttributes:t})=>e?t?{...e,...t}:e:t;function Ut(e){return e.componentAttributes??e.widgetAttributes}function ar({col:e,deviceDisplayType:t,isComposeMode:n,sourceComponentsPlugin:r}){const i=Ut(e),o=ds({dbEntryType:e.type,libraryId:e.libraryId,sourceComponentsPlugin:r})||[],s=ps({defaultAttributes:o,userModifiedAttributes:i}),{styles:l,componentAttributesSpecificToDeviceType:a}=Fe({deviceDisplayType:t,componentAttributes:s})||{styles:void 0,componentAttributesSpecificToDeviceType:void 0};let u={};const f={};if(l)for(const[c,d]of Object.entries(l))n&&f[c]||(u={...u,[c]:d});let h=Ut(e);for(const c in a)if(c.includes("3-resolutions")){h={...Ut(e)||{},...a||{}};break}return{componentAttributesBasedOnDevice:h,componentStyles:fs(u)}}const hs=e=>{const t=(e==null?void 0:e.rows)||[];for(const n of t)if(((n==null?void 0:n.columns)||[]).length>0)return!0;return(e==null?void 0:e.containerAttributes)&&Object.keys(e.containerAttributes).length>0},gs="var(--sl-spacing-x-small)";function vs(e){return e!=null&&e.horizontalAlignment||e!=null&&e.verticalAlignment||e!=null&&e.flexWrap||e!=null&&e.gap||e!=null&&e.alignContent?!0:!!(e!=null&&e.rowAttributes&&Object.keys(e.rowAttributes).length>0)}function ys({row:e,deviceDisplayType:t}){var r;const n=Fe({deviceDisplayType:t,componentAttributes:e.rowAttributes});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r["hide-component-3-resolutions"])==="true"}function ms({row:e,deviceDisplayType:t,isComposeMode:n}){var d;const r=((d=Fe({deviceDisplayType:t,componentAttributes:e.rowAttributes}))==null?void 0:d.styles)||{},i=r.justifyContent??e.horizontalAlignment??lr.Center,o=r.alignItems??e.verticalAlignment??lr.Center,s=r.flexDirection??"row",l=r.gap??e.gap??gs,a=n?"nowrap":r.flexWrap??e.flexWrap??"nowrap",u=r.alignContent??e.alignContent??void 0,f=new Set(["justifyContent","alignItems","flexDirection","gap","flexWrap","alignContent","display"]),h={};for(const[y,m]of Object.entries(r))f.has(y)||(h[y]=m);const c={display:"flex",flexDirection:s,gap:l,flexWrap:a,justifyContent:i,alignItems:o,...h};return u!==void 0&&(c.alignContent=u),c}const Fn="css-classes-3-resolutions",fu=500,du=/[\x00-\x1f\x7f]/g,Vn=e=>{if(typeof e!="string")return;const t=new Set,n=[];for(const i of e.split(/\s+/)){const o=i.replace(du,"");o&&(t.has(o)||(t.add(o),n.push(o)))}if(!n.length)return;let r="";for(const i of n){const o=r?`${r} ${i}`:i;if(o.length>fu)break;r=o}return r.length?r:void 0},Mr="hide-component-3-resolutions",_s="pointer-events-3-resolutions",bs=["width-3-resolutions","min-width-3-resolutions","max-width-3-resolutions","height-3-resolutions","min-height-3-resolutions","max-height-3-resolutions","margin-3-resolutions","padding-3-resolutions","border-3-resolutions","border-radius-3-resolutions","box-shadow-3-resolutions","overflow-3-resolutions","overflow-x-3-resolutions","overflow-y-3-resolutions",Mr,_s],pu=new Set(bs);function jn({containerAttributes:e,deviceDisplayType:t}){var r;const n=Fe({deviceDisplayType:t,componentAttributes:e});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r[Mr])==="true"}function Wr({containerAttributes:e,deviceDisplayType:t,isComposeMode:n}){var o;if(!e)return{styles:{}};const r=n?Object.fromEntries(Object.entries(e).filter(([s])=>!pu.has(s))):e,i=Fe({deviceDisplayType:t,componentAttributes:r});return{styles:(i==null?void 0:i.styles)??{},cssClasses:Vn((o=i==null?void 0:i.componentAttributesSpecificToDeviceType)==null?void 0:o[Fn])}}function ws(e){return Object.keys(e.styles).length>0||!!e.cssClasses}function Fr({containerAttributes:e,widgetContainerStyles:t}){return((e==null?void 0:e[En])||[]).some(r=>r.toLowerCase().startsWith("height:"))||t.styles.height!==void 0}const Cs="z-index-3-resolutions",Vr=0;function As(e){var t,n;return!!((n=(t=e==null?void 0:e.overlayLayers)==null?void 0:t.layers)!=null&&n.length)}function ur({containerAttributes:e,deviceDisplayType:t}){var i;const n=Fe({deviceDisplayType:t,componentAttributes:e}),r=(i=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:i[Cs];if(typeof r=="number"&&Number.isFinite(r))return r;if(typeof r=="string"&&r.trim().length){const o=Number(r);if(Number.isFinite(o))return o}return Vr}function Es(e,t){return e+t+1}function Ss({containerAttributes:e,deviceDisplayType:t}){var i;const n=Fe({deviceDisplayType:t,componentAttributes:e}),r=(i=n==null?void 0:n.styles)==null?void 0:i.pointerEvents;return typeof r=="string"?r:void 0}function Ts({layer:e,deviceDisplayType:t}){var n;return(n=e==null?void 0:e.rows)!=null&&n.length?jn({containerAttributes:e.containerAttributes,deviceDisplayType:t}):!0}function Is({isWithinCollection:e,baseDeclaresOwnHeight:t,baseZIndex:n}){return{position:"relative",isolation:"isolate",display:"flex",flexDirection:"column",...t?{}:{height:e?"auto":"100%"},...n===Vr?{}:{zIndex:n}}}function Ds({zIndex:e,pointerEvents:t}){return{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxSizing:"border-box",zIndex:e,...t?{pointerEvents:t}:{}}}function te(e){if(!e)return;const t=[];for(const[n,r]of Object.entries(e)){if(r==null||r==="")continue;const i=n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);t.push(`${i}: ${r}`)}return t.length>0?t.join("; "):void 0}const Bn="/";function Ps({componentProps:e,ancestorColumnIds:t,columnId:n}){if(!e||!n)return;const r=[...t??[],n];for(let i=0;i<r.length;i+=1){const o=r.slice(i).join(Bn),s=e[o];if(s)return s}}function ks({displayItemList:e,widgetCollections:t}){const n=[],r=(i,o)=>{var s;if((s=i==null?void 0:i.rows)!=null&&s.length)for(const l of i.rows)for(const a of l.columns){if(!a.id||a.type===Ln.DroppableBox)continue;const u=Rr(a.type);if(u!=null&&u.length){const f=a.collection??(t==null?void 0:t[u]);f&&!o.includes(a.id)&&r(f.collectionRows,[...o,a.id]);continue}n.push([...o,a.id].join(Bn))}};return r(e,[]),n}function hu(e,t){const n=`${Bn}${e}`;return t.some(r=>r===e||r.endsWith(n))}function Ls({componentProps:e,displayItemList:t,widgetCollections:n}){const r=e?Object.keys(e):[];if(!r.length)return[];const i=ks({displayItemList:t,widgetCollections:n});return r.filter(o=>!hu(o,i))}function Rs({componentProps:e,displayItemList:t,widgetCollections:n,publishedKey:r}){if(process.env.NODE_ENV==="production")return;const i=Ls({componentProps:e,displayItemList:t,widgetCollections:n});i.length&&console.warn(`RuleCMSWidget "${r}": componentProps ${i.map(o=>`"${o}"`).join(", ")} ${i.length===1?"matches":"match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`)}function gu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vu(e){if(e.all!==void 0&&e.all!==null)return!1;const t=e.phone,n=e.tablet,r=e.desktop;return t!==n||t!==r||n!==r}function cr(e){var t,n;if(!((t=e==null?void 0:e.rows)!=null&&t.length))return!1;if(er(e.containerAttributes))return!0;for(const r of e.rows){if(er(r.rowAttributes))return!0;for(const i of r.columns)if(er(Ut(i)))return!0}for(const r of((n=e.overlayLayers)==null?void 0:n.layers)??[])if(cr(r))return!0;return!1}function er(e){if(!e)return!1;for(const[t,n]of Object.entries(e))if(!(!t.includes("3-resolutions")||!gu(n))){if(t==="hide-component-3-resolutions"){const r=n,i=o=>o==="true"||o===!0;if(i(r.phone)!==i(r.tablet)||i(r.phone)!==i(r.desktop))return!0;continue}if(vu(n))return!0}return!1}function xs(e,t){if(cr(e))return!0;for(const n of Object.values(t))if(cr(n.collectionRows))return!0;return!1}const Ns=parseInt(Nr,10),Os=parseInt(Or,10),yu=Ns+1,mu=Os+1;function _u(e){const t=`.${e}-phone`,n=`.${e}-tablet`,r=`.${e}-desktop`;return`
|
|
1
|
+
"use strict";var hl=Object.defineProperty;var Xr=e=>{throw TypeError(e)};var gl=(e,t,n)=>t in e?hl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Te=(e,t,n)=>gl(e,typeof t!="symbol"?t+"":t,n),qn=(e,t,n)=>t.has(e)||Xr("Cannot "+n);var m=(e,t,n)=>(qn(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Xr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ae=(e,t,n,r)=>(qn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Y=(e,t,n)=>(qn(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const lr=require("svelte"),yl="5";var ms;typeof window<"u"&&((ms=window.__svelte??(window.__svelte={})).v??(ms.v=new Set)).add(yl);const ml=1,vl=2,bs=4,_l=8,bl=16,Cl=1,wl=2,G=Symbol("uninitialized"),Cs="http://www.w3.org/1999/xhtml",Al="http://www.w3.org/2000/svg",El="@attach",ws=!1;var vr=Array.isArray,Sl=Array.prototype.indexOf,bn=Array.prototype.includes,_r=Array.from,Tl=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Il=Object.getOwnPropertyDescriptors,Pl=Object.prototype,Dl=Array.prototype,As=Object.getPrototypeOf;function jt(e){return typeof e=="function"}const kl=()=>{};function Ll(e){for(var t=0;t<e.length;t++)e[t]()}function Es(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const Q=2,Ot=4,br=8,Cr=1<<24,ke=16,Ee=32,$e=64,Ol=128,be=512,J=1024,X=2048,Le=4096,le=8192,Ce=16384,Nt=32768,qr=1<<25,et=65536,Cn=1<<17,Rl=1<<18,xn=1<<19,xl=1<<20,je=1<<25,ft=65536,wn=1<<21,Et=1<<22,Ze=1<<23,St=Symbol("$state"),Nl=Symbol("legacy props"),Ml=Symbol(""),Zn=Symbol("attributes"),Zr=Symbol("class"),Jr=Symbol("style"),pn=Symbol("text"),ln=new class extends Error{constructor(){super(...arguments);Te(this,"name","StaleReactionError");Te(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var vs;const wr=!!((vs=globalThis.document)!=null&&vs.contentType)&&globalThis.document.contentType.includes("xml");function jl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Wl(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Fl(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Vl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Bl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Kl(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ul(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function zl(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Yl(){console.warn("https://svelte.dev/e/derived_inert")}function Gl(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Ss(e){return e===this.v}function Xl(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ts(e){return!Xl(e,this.v)}let ql=!1,we=null;function An(e){we=e}function ee(e,t=!1,n){we={p:we,i:!1,c:null,e:null,s:e,x:null,r:N,l:null}}function te(e){var t=we,n=t.e;if(n!==null){t.e=null;for(var r of n)Us(r)}return t.i=!0,we=t.p,{}}function Is(){return!0}let Ct=[];function Zl(){var e=Ct;Ct=[],Ll(e)}function Zt(e){if(Ct.length===0){var t=Ct;queueMicrotask(()=>{t===Ct&&Zl()})}Ct.push(e)}function Jl(e){var t=N;if(t===null)return L.f|=Ze,e;if((t.f&Nt)===0&&(t.f&Ot)===0)throw e;En(e,t)}function En(e,t){if(!(t!==null&&(t.f&Ce)!==0)){for(;t!==null;){if((t.f&Ol)!==0){if((t.f&Nt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const Ql=-7169;function z(e,t){e.f=e.f&Ql|t}function Ar(e){(e.f&be)!==0||e.deps===null?z(e,J):z(e,Le)}function Ps(e){if(e!==null)for(const t of e)(t.f&Q)===0||(t.f&ft)===0||(t.f^=ft,Ps(t.deps))}function $l(e,t,n){(e.f&X)!==0?t.add(e):(e.f&Le)!==0&&n.add(e),Ps(e.deps),z(e,J)}function ea(e,t){if(t){const n=document.body;e.autofocus=!0,Zt(()=>{document.activeElement===n&&e.focus()})}}function an(e){var t=L,n=N;Fe(null),nt(null);try{return e()}finally{Fe(t),nt(n)}}function Ds(e,t,n,r){const s=Er;var o=e.filter(h=>!h.settled),i=t.map(s);if(n.length===0&&o.length===0){r(i);return}var l=N,a=ta(),c=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(h=>h.promise)):null;function u(h){if((l.f&Ce)===0){a();try{r([...i,...h])}catch(y){En(y,l)}Sn()}}var p=ks();if(n.length===0){c.then(()=>u([])).finally(p);return}function f(){Promise.all(n.map(h=>na(h))).then(u).catch(h=>En(h,l)).finally(p)}c?c.then(()=>{a(),f(),Sn()}):f()}function ta(){var e=N,t=L,n=we,r=O;return function(o=!0){nt(e),Fe(t),An(n),o&&(e.f&Ce)===0&&(r==null||r.activate(),r==null||r.apply())}}function Sn(e=!0){nt(null),Fe(null),An(null),e&&(O==null||O.deactivate())}function ks(){var e=N,t=e.b,n=O,r=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,n),n.increment(r,e),()=>{t==null||t.update_pending_count(-1,n),n.decrement(r,e)}}function Er(e){var t=Q|X;return N!==null&&(N.f|=xn),{ctx:we,deps:null,effects:null,equals:Ss,f:t,fn:e,reactions:null,rv:0,v:G,wv:0,parent:N,ac:null}}const Bt=Symbol("obsolete");function na(e,t,n){let r=N;r===null&&jl();var s=void 0,o=Qt(G),i=!L,l=new Set;return va(()=>{var h,y;var a=N,c=Es();s=c.promise;try{Promise.resolve(e()).then(c.resolve,v=>{v!==ln&&c.reject(v)}).finally(Sn)}catch(v){c.reject(v),Sn()}var u=O;if(i){if((a.f&Nt)!==0)var p=ks();if((h=r.b)!=null&&h.is_rendered())(y=u.async_deriveds.get(a))==null||y.reject(Bt);else for(const v of l.values())v.reject(Bt);l.add(c),u.async_deriveds.set(a,c)}const f=(v,g=void 0)=>{p==null||p(),l.delete(c),g!==Bt&&(u.activate(),g?(o.f|=Ze,$t(o,g)):((o.f&Ze)!==0&&(o.f^=Ze),$t(o,v)),u.deactivate())};c.promise.then(f,v=>f(null,v||"unknown"))}),Pr(()=>{for(const a of l)a.reject(Bt)}),new Promise(a=>{function c(u){function p(){u===s?a(o):c(s)}u.then(p,p)}c(s)})}function w(e){const t=Er(e);return Js(t),t}function ra(e){const t=Er(e);return t.equals=Ts,t}function sa(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ae(t[n])}}function Sr(e){var t,n=N,r=e.parent;if(!tt&&r!==null&&e.v!==G&&(r.f&(Ce|le))!==0)return Yl(),e.v;nt(r);try{e.f&=~ft,sa(e),t=to(e)}finally{nt(n)}return t}function Ls(e){var t=Sr(e);if(!e.equals(t)&&(e.wv=$s(),(!(O!=null&&O.is_fork)||e.deps===null)&&(O!==null?(O.capture(e,t,!0),Gt==null||Gt.capture(e,t,!0)):e.v=t,e.deps===null))){z(e,J);return}tt||($!==null?(Ks()||O!=null&&O.is_fork)&&$.set(e,t):Ar(e))}function oa(e){var t;if(e.effects!==null)for(const n of e.effects)(n.teardown||n.ac)&&((t=n.teardown)==null||t.call(n),n.ac!==null&&an(()=>{n.ac.abort(ln),n.ac=null}),n.fn!==null&&(n.teardown=kl),en(n,0),kr(n))}function Os(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Rt(t)}let Jn=null,_t=null,O=null,Gt=null,$=null,ar=null,Qn=!1,wt=null,yn=null;var Qr=0;let ia=1;var Tt,Xe,it,It,Pt,Dt,Ke,kt,ce,rn,Ue,Pe,Ne,Lt,lt,j,cr,Kt,ur,Rs,xs,bt,la,Ut;const On=class On{constructor(){U(this,j);Te(this,"id",ia++);U(this,Tt,!1);Te(this,"linked",!0);U(this,Xe,null);U(this,it,null);Te(this,"async_deriveds",new Map);Te(this,"current",new Map);Te(this,"previous",new Map);U(this,It,new Set);U(this,Pt,new Set);U(this,Dt,0);U(this,Ke,new Map);U(this,kt,null);U(this,ce,[]);U(this,rn,[]);U(this,Ue,new Set);U(this,Pe,new Set);U(this,Ne,new Map);U(this,Lt,new Set);Te(this,"is_fork",!1);U(this,lt,!1);_t===null?Jn=_t=this:(ae(_t,it,this),ae(this,Xe,_t)),_t=this}skip_effect(t){m(this,Ne).has(t)||m(this,Ne).set(t,{d:[],m:[]}),m(this,Lt).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=m(this,Ne).get(t);if(r){m(this,Ne).delete(t);for(var s of r.d)z(s,X),n(s);for(s of r.m)z(s,Le),n(s)}m(this,Lt).add(t)}capture(t,n,r=!1){t.v!==G&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ze)===0&&(this.current.set(t,[n,r]),$==null||$.set(t,n)),this.is_fork||(t.v=n)}activate(){O=this}deactivate(){O=null,$=null}flush(){try{Qn=!0,O=this,Y(this,j,Kt).call(this)}finally{Qr=0,ar=null,wt=null,yn=null,Qn=!1,O=null,$=null,ct.clear()}}discard(){var t;for(const n of m(this,Pt))n(this);m(this,Pt).clear();for(const n of this.async_deriveds.values())n.reject(Bt);Y(this,j,Ut).call(this),(t=m(this,kt))==null||t.resolve()}register_created_effect(t){m(this,rn).push(t)}increment(t,n){if(ae(this,Dt,m(this,Dt)+1),t){let r=m(this,Ke).get(n)??0;m(this,Ke).set(n,r+1)}}decrement(t,n){if(ae(this,Dt,m(this,Dt)-1),t){let r=m(this,Ke).get(n)??0;r===1?m(this,Ke).delete(n):m(this,Ke).set(n,r-1)}m(this,lt)||(ae(this,lt,!0),Zt(()=>{ae(this,lt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)m(this,Ue).add(r);for(const r of n)m(this,Pe).add(r);t.clear(),n.clear()}oncommit(t){m(this,It).add(t)}ondiscard(t){m(this,Pt).add(t)}settled(){return(m(this,kt)??ae(this,kt,Es())).promise}static ensure(){if(O===null){const t=O=new On;Qn||Zt(()=>{m(t,Tt)||t.flush()})}return O}apply(){{$=null;return}}schedule(t){var s;if(ar=t,(s=t.b)!=null&&s.is_pending&&(t.f&(Ot|br|Cr))!==0&&(t.f&Nt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(wt!==null&&n===N&&(L===null||(L.f&Q)===0))return;if((r&($e|Ee))!==0){if((r&J)===0)return;n.f^=J}}m(this,ce).push(n)}};Tt=new WeakMap,Xe=new WeakMap,it=new WeakMap,It=new WeakMap,Pt=new WeakMap,Dt=new WeakMap,Ke=new WeakMap,kt=new WeakMap,ce=new WeakMap,rn=new WeakMap,Ue=new WeakMap,Pe=new WeakMap,Ne=new WeakMap,Lt=new WeakMap,lt=new WeakMap,j=new WeakSet,cr=function(){if(this.is_fork)return!0;for(const r of m(this,Ke).keys()){for(var t=r,n=!1;t.parent!==null;){if(m(this,Ne).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Kt=function(){var a,c,u,p;ae(this,Tt,!0),Qr++>1e3&&(Y(this,j,Ut).call(this),aa());for(const f of m(this,Ue))m(this,Pe).delete(f),z(f,X),this.schedule(f);for(const f of m(this,Pe))z(f,Le),this.schedule(f);const t=m(this,ce);ae(this,ce,[]),this.apply();var n=wt=[],r=[],s=yn=[];for(const f of t)try{Y(this,j,ur).call(this,f,n,r)}catch(h){throw js(f),Y(this,j,cr).call(this)||this.discard(),h}if(O=null,s.length>0){var o=On.ensure();for(const f of s)o.schedule(f)}if(wt=null,yn=null,Y(this,j,cr).call(this)){Y(this,j,bt).call(this,r),Y(this,j,bt).call(this,n);for(const[f,h]of m(this,Ne))Ms(f,h);s.length>0&&Y(a=O,j,Kt).call(a);return}const i=Y(this,j,Rs).call(this);if(i){Y(this,j,bt).call(this,r),Y(this,j,bt).call(this,n),Y(c=i,j,xs).call(c,this);return}m(this,Ue).clear(),m(this,Pe).clear();for(const f of m(this,It))f(this);m(this,It).clear(),Gt=this,$r(r),$r(n),Gt=null,(u=m(this,kt))==null||u.resolve();var l=O;if(m(this,Dt)===0&&(m(this,ce).length===0||l!==null)&&Y(this,j,Ut).call(this),m(this,ce).length>0)if(l!==null){const f=l;m(f,ce).push(...m(this,ce).filter(h=>!m(f,ce).includes(h)))}else l=this;l!==null&&Y(p=l,j,Kt).call(p)},ur=function(t,n,r){t.f^=J;for(var s=t.first;s!==null;){var o=s.f,i=(o&(Ee|$e))!==0,l=i&&(o&J)!==0,a=l||(o&le)!==0||m(this,Ne).has(s);if(!a&&s.fn!==null){i?s.f^=J:(o&Ot)!==0?n.push(s):fn(s)&&((o&ke)!==0&&m(this,Pe).add(s),Rt(s));var c=s.first;if(c!==null){s=c;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}},Rs=function(){for(var t=m(this,Xe);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=m(t,Xe)}return null},xs=function(t){var r;for(const[s,o]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,o);for(const[s,o]of t.async_deriveds){const i=this.async_deriveds.get(s);i&&o.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(m(t,Ue),m(t,Pe));const n=s=>{var o=s.reactions;if(o!==null&&!((s.f&Q)!==0&&(s.f&(X|Le))===0))for(const a of o){var i=a.f;if((i&Q)!==0)n(a);else{var l=a;i&(Et|ke)&&!this.async_deriveds.has(l)&&(m(this,Pe).delete(l),z(l,X),this.schedule(l))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),Y(r=t,j,Ut).call(r),O=this,Y(this,j,Kt).call(this)},bt=function(t){for(var n=0;n<t.length;n+=1)$l(t[n],m(this,Ue),m(this,Pe))},la=function(){var p;for(let f=Jn;f!==null;f=m(f,it)){var t=f.id<this.id,n=[];for(const[h,[y,v]]of this.current){if(f.current.has(h)){var r=f.current.get(h)[0];if(t&&y!==r)f.current.set(h,[y,v]);else continue}n.push(h)}if(t)for(const[h,y]of this.async_deriveds){const v=f.async_deriveds.get(h);v&&y.promise.then(v.resolve).catch(v.reject)}var s=[...f.current.keys()].filter(h=>!f.current.get(h)[1]);if(!(!m(f,Tt)||s.length===0)){var o=s.filter(h=>!this.current.has(h));if(o.length===0)t&&f.discard();else if(n.length>0){if(t)for(const h of m(this,Lt))f.unskip_effect(h,y=>{var v;(y.f&(ke|Et))!==0?f.schedule(y):Y(v=f,j,bt).call(v,[y])});f.activate();var i=new Set,l=new Map;for(var a of n)Ns(a,o,i,l);l=new Map;var c=[...f.current].filter(([h,y])=>{const v=this.current.get(h);return v?v[0]!==y[0]||v[1]!==y[1]:!0}).map(([h])=>h);if(c.length>0)for(const h of m(this,rn))(h.f&(Ce|le|Cn))===0&&Tr(h,c,l)&&((h.f&(Et|ke))!==0?(z(h,X),f.schedule(h)):m(f,Ue).add(h));if(m(f,ce).length>0&&!m(f,lt)){f.apply();for(var u of m(f,ce))Y(p=f,j,ur).call(p,u,[],[]);ae(f,ce,[])}f.deactivate()}}}},Ut=function(){if(this.linked){var t=m(this,Xe),n=m(this,it);t===null?Jn=n:ae(t,it,n),n===null?_t=t:ae(n,Xe,t),this.linked=!1}};let Jt=On;function aa(){try{Kl()}catch(e){En(e,ar)}}let Ie=null;function $r(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Ce|le))===0&&fn(r)&&(Ie=new Set,Rt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Gs(r),(Ie==null?void 0:Ie.size)>0)){ct.clear();for(const s of Ie){if((s.f&(Ce|le))!==0)continue;const o=[s];let i=s.parent;for(;i!==null;)Ie.has(i)&&(Ie.delete(i),o.push(i)),i=i.parent;for(let l=o.length-1;l>=0;l--){const a=o[l];(a.f&(Ce|le))===0&&Rt(a)}}Ie.clear()}}Ie=null}}function Ns(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const o=s.f;(o&Q)!==0?Ns(s,t,n,r):(o&(Et|ke))!==0&&(o&X)===0&&Tr(s,t,r)&&(z(s,X),Ir(s))}}function Tr(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(bn.call(t,s))return!0;if((s.f&Q)!==0&&Tr(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Ir(e){O.schedule(e)}function Ms(e,t){if(!((e.f&Ee)!==0&&(e.f&J)!==0)){(e.f&X)!==0?t.d.push(e):(e.f&Le)!==0&&t.m.push(e),z(e,J);for(var n=e.first;n!==null;)Ms(n,t),n=n.next}}function js(e){z(e,J);for(var t=e.first;t!==null;)js(t),t=t.next}let Tn=new Set;const ct=new Map;let Ws=!1;function Qt(e,t){var n={f:0,v:e,reactions:null,equals:Ss,rv:0,wv:0};return n}function ye(e,t){const n=Qt(e);return Js(n),n}function ca(e,t=!1,n=!0){const r=Qt(e);return t||(r.equals=Ts),r}function V(e,t,n=!1){L!==null&&(!qe||(L.f&Cn)!==0)&&Is()&&(L.f&(Q|ke|Et|Cn))!==0&&(We===null||!We.has(e))&&zl();let r=n?At(t):t;return $t(e,r,yn)}function $t(e,t,n=null){if(!e.equals(t)){ct.set(e,tt?t:e.v);var r=Jt.ensure();if(r.capture(e,t),(e.f&Q)!==0){const s=e;(e.f&X)!==0&&Sr(s),$===null&&Ar(s)}e.wv=$s(),Fs(e,X,n),N!==null&&(N.f&J)!==0&&(N.f&(Ee|$e))===0&&(ve===null?Ca([e]):ve.push(e)),!r.is_fork&&Tn.size>0&&!Ws&&ua()}return t}function ua(){Ws=!1;for(const e of Tn){(e.f&J)!==0&&z(e,Le);let t;try{t=fn(e)}catch{t=!0}t&&Rt(e)}Tn.clear()}function $n(e){V(e,e.v+1)}function Fs(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,o=0;o<s;o++){var i=r[o],l=i.f,a=(l&X)===0;if(a&&z(i,t),(l&Cn)!==0)Tn.add(i);else if((l&Q)!==0){var c=i;$==null||$.delete(c),(l&ft)===0&&(l&be&&(N===null||(N.f&wn)===0)&&(i.f|=ft),Fs(c,Le,n))}else if(a){var u=i;(l&ke)!==0&&Ie!==null&&Ie.add(u),n!==null?n.push(u):Ir(u)}}}function At(e){if(typeof e!="object"||e===null||St in e)return e;const t=As(e);if(t!==Pl&&t!==Dl)return e;var n=new Map,r=vr(e),s=ye(0),o=ut,i=l=>{if(ut===o)return l();var a=L,c=ut;Fe(null),ns(o);var u=l();return Fe(a),ns(c),u};return r&&n.set("length",ye(e.length)),new Proxy(e,{defineProperty(l,a,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Ul();var u=n.get(a);return u===void 0?i(()=>{var p=ye(c.value);return n.set(a,p),p}):V(u,c.value,!0),!0},deleteProperty(l,a){var c=n.get(a);if(c===void 0){if(a in l){const u=i(()=>ye(G));n.set(a,u),$n(s)}}else V(c,G),$n(s);return!0},get(l,a,c){var h;if(a===St)return e;var u=n.get(a),p=a in l;if(u===void 0&&(!p||(h=Yt(l,a))!=null&&h.writable)&&(u=i(()=>{var y=At(p?l[a]:G),v=ye(y);return v}),n.set(a,u)),u!==void 0){var f=d(u);return f===G?void 0:f}return Reflect.get(l,a,c)},getOwnPropertyDescriptor(l,a){var c=Reflect.getOwnPropertyDescriptor(l,a);if(c&&"value"in c){var u=n.get(a);u&&(c.value=d(u))}else if(c===void 0){var p=n.get(a),f=p==null?void 0:p.v;if(p!==void 0&&f!==G)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(l,a){var f;if(a===St)return!0;var c=n.get(a),u=c!==void 0&&c.v!==G||Reflect.has(l,a);if(c!==void 0||N!==null&&(!u||(f=Yt(l,a))!=null&&f.writable)){c===void 0&&(c=i(()=>{var h=u?At(l[a]):G,y=ye(h);return y}),n.set(a,c));var p=d(c);if(p===G)return!1}return u},set(l,a,c,u){var A;var p=n.get(a),f=a in l;if(r&&a==="length")for(var h=c;h<p.v;h+=1){var y=n.get(h+"");y!==void 0?V(y,G):h in l&&(y=i(()=>ye(G)),n.set(h+"",y))}if(p===void 0)(!f||(A=Yt(l,a))!=null&&A.writable)&&(p=i(()=>ye(void 0)),V(p,At(c)),n.set(a,p));else{f=p.v!==G;var v=i(()=>At(c));V(p,v)}var g=Reflect.getOwnPropertyDescriptor(l,a);if(g!=null&&g.set&&g.set.call(u,c),!f){if(r&&typeof a=="string"){var _=n.get("length"),S=Number(a);Number.isInteger(S)&&S>=_.v&&V(_,S+1)}$n(s)}return!0},ownKeys(l){d(s);var a=Reflect.ownKeys(l).filter(p=>{var f=n.get(p);return f===void 0||f.v!==G});for(var[c,u]of n)u.v!==G&&!(c in l)&&a.push(c);return a},setPrototypeOf(){Hl()}})}function es(e){try{if(e!==null&&typeof e=="object"&&St in e)return e[St]}catch{}return e}function fa(e,t){return Object.is(es(e),es(t))}var da,pa,ha;function Je(e=""){return document.createTextNode(e)}function In(e){return pa.call(e)}function cn(e){return ha.call(e)}function me(e,t){return In(e)}function R(e,t=!1){{var n=In(e);return n instanceof Comment&&n.data===""?cn(n):n}}function re(e,t=1,n=!1){let r=e;for(;t--;)r=cn(r);return r}function ga(e){e.textContent=""}function Vs(){return!1}function Bs(e,t,n){return t==null||t===Cs?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function ya(e){N===null&&(L===null&&Bl(),Vl()),tt&&Fl()}function ma(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function rt(e,t){var n=N;n!==null&&(n.f&le)!==0&&(e|=le);var r={ctx:we,deps:null,nodes:null,f:e|X|be,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};O==null||O.register_created_effect(r);var s=r;if((e&Ot)!==0)wt!==null?wt.push(r):Jt.ensure().schedule(r);else if(t!==null){try{Rt(r)}catch(i){throw Ae(r),i}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&xn)===0&&(s=s.first,(e&ke)!==0&&(e&et)!==0&&s!==null&&(s.f|=et))}if(s!==null&&(s.parent=n,n!==null&&ma(s,n),L!==null&&(L.f&Q)!==0&&(e&$e)===0)){var o=L;(o.effects??(o.effects=[])).push(s)}return r}function Ks(){return L!==null&&!qe}function Pr(e){const t=rt(br,null);return z(t,J),t.teardown=e,t}function Dr(e){ya();var t=N.f,n=!L&&(t&Ee)!==0&&we!==null&&!we.i;if(n){var r=we;(r.e??(r.e=[])).push(e)}else return Us(e)}function Us(e){return rt(Ot|xl,e)}function Hs(e){return rt(Ot,e)}function va(e){return rt(Et|xn,e)}function H(e,t=[],n=[],r=[]){Ds(r,t,n,s=>{rt(br,()=>{e(...s.map(d))})})}function un(e,t=0){var n=rt(ke|t,e);return n}function zs(e,t=0){var n=rt(Cr|t,e);return n}function dt(e){return rt(Ee|xn,e)}function Ys(e){var t=e.teardown;if(t!==null){const n=tt,r=L;ts(!0),Fe(null);try{t.call(null)}finally{ts(n),Fe(r)}}}function kr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&an(()=>{s.abort(ln)});var r=n.next;(n.f&$e)!==0?n.parent=null:Ae(n,t),n=r}}function _a(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Ee)===0&&Ae(t),t=n}}function Ae(e,t=!0){var n=!1;(t||(e.f&Rl)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ba(e.nodes.start,e.nodes.end),n=!0),e.f|=qr,kr(e,t&&!n),en(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();Ys(e),e.f^=qr,e.f|=Ce;var s=e.parent;s!==null&&s.first!==null&&Gs(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ba(e,t){for(;e!==null;){var n=e===t?null:cn(e);e.remove(),e=n}}function Gs(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Lr(e,t,n=!0){var r=[];Xs(e,r,!0);var s=()=>{n&&Ae(e),t&&t()},o=r.length;if(o>0){var i=()=>--o||s();for(var l of r)l.out(i)}else s()}function Xs(e,t,n){if((e.f&le)===0){e.f^=le;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var o=s.next;if((s.f&$e)===0){var i=(s.f&et)!==0||(s.f&Ee)!==0&&(e.f&ke)!==0;Xs(s,t,i?n:!1)}s=o}}}function Pn(e){qs(e,!0)}function qs(e,t){if((e.f&le)!==0){e.f^=le,(e.f&J)===0&&(z(e,X),Jt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&et)!==0||(n.f&Ee)!==0;qs(n,s?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const i of o)(i.is_global||t)&&i.in()}}function Zs(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:cn(n);t.append(n),n=s}}let mn=!1,tt=!1;function ts(e){tt=e}let L=null,qe=!1;function Fe(e){L=e}let N=null;function nt(e){N=e}let We=null;function Js(e){L!==null&&(We??(We=new Set)).add(e)}let ue=null,he=0,ve=null;function Ca(e){ve=e}let Qs=1,st=0,ut=st;function ns(e){ut=e}function $s(){return++Qs}function fn(e){var t=e.f;if((t&X)!==0)return!0;if(t&Q&&(e.f&=~ft),(t&Le)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var o=n[s];if(fn(o)&&Ls(o),o.wv>e.wv)return!0}(t&be)!==0&&$===null&&z(e,J)}return!1}function eo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(We!==null&&We.has(e)))for(var s=0;s<r.length;s++){var o=r[s];(o.f&Q)!==0?eo(o,t,!1):t===o&&(n?z(o,X):(o.f&J)!==0&&z(o,Le),Ir(o))}}function to(e){var v;var t=ue,n=he,r=ve,s=L,o=We,i=we,l=qe,a=ut,c=e.f;ue=null,he=0,ve=null,L=(c&(Ee|$e))===0?e:null,We=null,An(e.ctx),qe=!1,ut=++st,e.ac!==null&&(an(()=>{e.ac.abort(ln)}),e.ac=null);try{e.f|=wn;var u=e.fn,p=u();e.f|=Nt;var f=e.deps,h=O==null?void 0:O.is_fork;if(ue!==null){var y;if(h||en(e,he),f!==null&&he>0)for(f.length=he+ue.length,y=0;y<ue.length;y++)f[he+y]=ue[y];else e.deps=f=ue;if(Ks()&&(e.f&be)!==0)for(y=he;y<f.length;y++)((v=f[y]).reactions??(v.reactions=[])).push(e)}else!h&&f!==null&&he<f.length&&(en(e,he),f.length=he);if(Is()&&ve!==null&&!qe&&f!==null&&(e.f&(Q|Le|X))===0)for(y=0;y<ve.length;y++)eo(ve[y],e);if(s!==null&&s!==e){if(st++,s.deps!==null)for(let g=0;g<n;g+=1)s.deps[g].rv=st;if(t!==null)for(const g of t)g.rv=st;ve!==null&&(r===null?r=ve:r.push(...ve))}return(e.f&Ze)!==0&&(e.f^=Ze),p}catch(g){return Jl(g)}finally{e.f^=wn,ue=t,he=n,ve=r,L=s,We=o,An(i),qe=l,ut=a}}function wa(e,t){let n=t.reactions;if(n!==null){var r=Sl.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&Q)!==0&&(ue===null||!bn.call(ue,t))){var o=t;(o.f&be)!==0&&(o.f^=be,o.f&=~ft),o.v!==G&&Ar(o),o.ac!==null&&an(()=>{o.ac.abort(ln),o.ac=null,z(o,X)}),oa(o),en(o,0)}}function en(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)wa(e,n[r])}function Rt(e){var t=e.f;if((t&Ce)===0){z(e,J);var n=N,r=mn;N=e,mn=(t&(Ee|$e))===0;try{(t&(ke|Cr))!==0?_a(e):kr(e),Ys(e);var s=to(e);e.teardown=typeof s=="function"?s:null,e.wv=Qs;var o;ws&&ql&&(e.f&X)!==0&&e.deps}finally{mn=r,N=n}}}function d(e){var t=e.f,n=(t&Q)!==0;if(L!==null&&!qe){var r=N!==null&&(N.f&Ce)!==0;if(!r&&(We===null||!We.has(e))){var s=L.deps;if((L.f&wn)!==0)e.rv<st&&(e.rv=st,ue===null&&s!==null&&s[he]===e?he++:ue===null?ue=[e]:ue.push(e));else{L.deps??(L.deps=[]),bn.call(L.deps,e)||L.deps.push(e);var o=e.reactions;o===null?e.reactions=[L]:bn.call(o,L)||o.push(L)}}}if(tt&&ct.has(e))return ct.get(e);if(n){var i=e;if(tt){var l=i.v;return((i.f&J)===0&&i.reactions!==null||ro(i))&&(l=Sr(i)),ct.set(i,l),l}var a=(i.f&be)===0&&!qe&&L!==null&&(mn||(L.f&be)!==0),c=(i.f&Nt)===0;fn(i)&&(a&&(i.f|=be),Ls(i)),a&&!c&&(Os(i),no(i))}if($!=null&&$.has(e))return $.get(e);if((e.f&Ze)!==0)throw e.v;return e.v}function no(e){if(e.f|=be,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&Q)!==0&&(t.f&be)===0&&(Os(t),no(t))}function ro(e){if(e.v===G)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ct.has(t)||(t.f&Q)!==0&&ro(t))return!0;return!1}const ot=Symbol("events"),Aa=new Set,Ea=new Set;function Sa(e,t,n,r={}){function s(o){if(r.capture||Pa.call(t,o),!o.cancelBubble)return an(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Zt(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ta(e,t,n){(t[ot]??(t[ot]={}))[e]=n}function Ia(e){for(var t=0;t<e.length;t++)Aa.add(e[t]);for(var n of Ea)n(e)}let rs=null;function Pa(e){var v,g;var t=this,n=t.ownerDocument,r=e.type,s=((v=e.composedPath)==null?void 0:v.call(e))||[],o=s[0]||e.target;rs=e;var i=0,l=rs===e&&e[ot];if(l){var a=s.indexOf(l);if(a!==-1&&(t===document||t===window)){e[ot]=t;return}var c=s.indexOf(t);if(c===-1)return;a<=c&&(i=a)}if(o=s[i]||e.target,o!==t){Tl(e,"currentTarget",{configurable:!0,get(){return o||n}});var u=L,p=N;Fe(null),nt(null);try{for(var f,h=[];o!==null&&o!==t;){try{var y=(g=o[ot])==null?void 0:g[r];y!=null&&(!o.disabled||e.target===o)&&y.call(o,e)}catch(_){f?h.push(_):f=_}if(e.cancelBubble)break;i++,o=i<s.length?s[i]:null}if(f){for(let _ of h)queueMicrotask(()=>{throw _});throw f}}finally{e[ot]=t,delete e.currentTarget,Fe(u),nt(p)}}}var _s;const er=((_s=globalThis==null?void 0:globalThis.window)==null?void 0:_s.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Da(e){return(er==null?void 0:er.createHTML(e))??e}function ka(e){var t=Bs("template");return t.innerHTML=Da(e.replaceAll("<!>","<!---->")),t.content}function tn(e,t){var n=N;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function fe(e,t){var n=(t&Cl)!==0,r=(t&wl)!==0,s,o=!e.startsWith("<!>");return()=>{s===void 0&&(s=ka(o?e:"<!>"+e),n||(s=In(s)));var i=r||da?document.importNode(s,!0):s.cloneNode(!0);if(n){var l=In(i),a=i.lastChild;tn(l,a)}else tn(i,i);return i}}function Re(e=""){{var t=Je(e+"");return tn(t,t),t}}function M(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Je();return e.append(t,n),tn(t,n),e}function E(e,t){e!==null&&e.before(t)}function La(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Oa=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ra(e){return Oa.includes(e)}const xa={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Na(e){return e=e.toLowerCase(),xa[e]??e}function Se(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[pn]??(e[pn]=e.nodeValue))&&(e[pn]=n,e.nodeValue=`${n}`)}var De,Me,ge,at,sn,on,Rn;class Nn{constructor(t,n=!0){Te(this,"anchor");U(this,De,new Map);U(this,Me,new Map);U(this,ge,new Map);U(this,at,new Set);U(this,sn,!0);U(this,on,t=>{if(m(this,De).has(t)){var n=m(this,De).get(t),r=m(this,Me).get(n);if(r)Pn(r),m(this,at).delete(n);else{var s=m(this,ge).get(n);s&&(Pn(s.effect),m(this,Me).set(n,s.effect),m(this,ge).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[o,i]of m(this,De)){if(m(this,De).delete(o),o===t)break;const l=m(this,ge).get(i);l&&(Ae(l.effect),m(this,ge).delete(i))}for(const[o,i]of m(this,Me)){if(o===n||m(this,at).has(o))continue;const l=()=>{if(Array.from(m(this,De).values()).includes(o)){var c=document.createDocumentFragment();Zs(i,c),c.append(Je()),m(this,ge).set(o,{effect:i,fragment:c})}else Ae(i);m(this,at).delete(o),m(this,Me).delete(o)};m(this,sn)||!r?(m(this,at).add(o),Lr(i,l,!1)):l()}}});U(this,Rn,t=>{m(this,De).delete(t);const n=Array.from(m(this,De).values());for(const[r,s]of m(this,ge))n.includes(r)||(Ae(s.effect),m(this,ge).delete(r))});this.anchor=t,ae(this,sn,n)}ensure(t,n){var r=O,s=Vs();if(n&&!m(this,Me).has(t)&&!m(this,ge).has(t))if(s){var o=document.createDocumentFragment(),i=Je();o.append(i),m(this,ge).set(t,{effect:dt(()=>n(i)),fragment:o})}else m(this,Me).set(t,dt(()=>n(this.anchor)));if(m(this,De).set(r,t),s){for(const[l,a]of m(this,Me))l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of m(this,ge))l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(m(this,on)),r.ondiscard(m(this,Rn))}else m(this,on).call(this,r)}}De=new WeakMap,Me=new WeakMap,ge=new WeakMap,at=new WeakMap,sn=new WeakMap,on=new WeakMap,Rn=new WeakMap;function Or(e,t,...n){var r=new Nn(e);un(()=>{const s=t()??null;r.ensure(s,s&&(o=>s(o,...n)))},et)}function q(e,t,n=!1){var r=new Nn(e),s=n?et:0;function o(i,l){r.ensure(i,l)}un(()=>{var i=!1;t((l,a=0)=>{i=!0,o(a,l)}),i||o(-1,null)},s)}function Ma(e,t,n){for(var r=[],s=t.length,o,i=t.length,l=0;l<s;l++){let p=t[l];Lr(p,()=>{if(o){if(o.pending.delete(p),o.done.add(p),o.pending.size===0){var f=e.outrogroups;fr(e,_r(o.done)),f.delete(o),f.size===0&&(e.outrogroups=null)}}else i-=1},!1)}if(i===0){var a=r.length===0&&n!==null&&e.pending.size===0;if(a){var c=n,u=c.parentNode;ga(u),u.append(c),e.items.clear()}fr(e,t,!a)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function fr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const i of e.pending.values())for(const l of i)r.add(e.items.get(l).e)}for(var s=0;s<t.length;s++){var o=t[s];if(r!=null&&r.has(o)){o.f|=je;const i=document.createDocumentFragment();Zs(o,i)}else Ae(t[s],n)}}var ss;function Xt(e,t,n,r,s,o=null){var i=e,l=new Map,a=(t&bs)!==0;if(a){var c=e;i=c.appendChild(Je())}var u=null,p=ra(()=>{var A=n();return vr(A)?A:A==null?[]:_r(A)}),f,h=new Map,y=!0;function v(A){(S.effect.f&Ce)===0&&(S.pending.delete(A),S.fallback=u,ja(S,f,i,t,r),u!==null&&(f.length===0?(u.f&je)===0?Pn(u):(u.f^=je,Ht(u,null,i)):Lr(u,()=>{u=null})))}function g(A){S.pending.delete(A)}var _=un(()=>{f=d(p);for(var A=f.length,b=new Set,C=O,k=Vs(),T=0;T<A;T+=1){var P=f[T],W=r(P,T),x=y?null:l.get(W);x?(x.v&&$t(x.v,P),x.i&&$t(x.i,T),k&&C.unskip_effect(x.e)):(x=Wa(l,y?i:ss??(ss=Je()),P,W,T,s,t,n),y||(x.e.f|=je),l.set(W,x)),b.add(W)}if(A===0&&o&&!u&&(y?u=dt(()=>o(i)):(u=dt(()=>o(ss??(ss=Je()))),u.f|=je)),A>b.size&&Wl(),!y)if(h.set(C,b),k){for(const[se,Be]of l)b.has(se)||C.skip_effect(Be.e);C.oncommit(v),C.ondiscard(g)}else v(C);d(p)}),S={effect:_,items:l,pending:h,outrogroups:null,fallback:u};y=!1}function Wt(e){for(;e!==null&&(e.f&Ee)===0;)e=e.next;return e}function ja(e,t,n,r,s){var x,se,Be,mt,Ye,de,D,I,F;var o=(r&_l)!==0,i=t.length,l=e.items,a=Wt(e.effect.first),c,u=null,p,f=[],h=[],y,v,g,_;if(o)for(_=0;_<i;_+=1)y=t[_],v=s(y,_),g=l.get(v).e,(g.f&je)===0&&((se=(x=g.nodes)==null?void 0:x.a)==null||se.measure(),(p??(p=new Set)).add(g));for(_=0;_<i;_+=1){if(y=t[_],v=s(y,_),g=l.get(v).e,e.outrogroups!==null)for(const B of e.outrogroups)B.pending.delete(g),B.done.delete(g);if((g.f&le)!==0&&(Pn(g),o&&((mt=(Be=g.nodes)==null?void 0:Be.a)==null||mt.unfix(),(p??(p=new Set)).delete(g))),(g.f&je)!==0)if(g.f^=je,g===a)Ht(g,null,n);else{var S=u?u.next:a;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Ge(e,u,g),Ge(e,g,S),Ht(g,S,n),u=g,f=[],h=[],a=Wt(u.next);continue}if(g!==a){if(c!==void 0&&c.has(g)){if(f.length<h.length){var A=h[0],b;u=A.prev;var C=f[0],k=f[f.length-1];for(b=0;b<f.length;b+=1)Ht(f[b],A,n);for(b=0;b<h.length;b+=1)c.delete(h[b]);Ge(e,C.prev,k.next),Ge(e,u,C),Ge(e,k,A),a=A,u=k,_-=1,f=[],h=[]}else c.delete(g),Ht(g,a,n),Ge(e,g.prev,g.next),Ge(e,g,u===null?e.effect.first:u.next),Ge(e,u,g),u=g;continue}for(f=[],h=[];a!==null&&a!==g;)(c??(c=new Set)).add(a),h.push(a),a=Wt(a.next);if(a===null)continue}(g.f&je)===0&&f.push(g),u=g,a=Wt(g.next)}if(e.outrogroups!==null){for(const B of e.outrogroups)B.pending.size===0&&(fr(e,_r(B.done)),(Ye=e.outrogroups)==null||Ye.delete(B));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||c!==void 0){var T=[];if(c!==void 0)for(g of c)(g.f&le)===0&&T.push(g);for(;a!==null;)(a.f&le)===0&&a!==e.fallback&&T.push(a),a=Wt(a.next);var P=T.length;if(P>0){var W=(r&bs)!==0&&i===0?n:null;if(o){for(_=0;_<P;_+=1)(D=(de=T[_].nodes)==null?void 0:de.a)==null||D.measure();for(_=0;_<P;_+=1)(F=(I=T[_].nodes)==null?void 0:I.a)==null||F.fix()}Ma(e,T,W)}}o&&Zt(()=>{var B,ne;if(p!==void 0)for(g of p)(ne=(B=g.nodes)==null?void 0:B.a)==null||ne.apply()})}function Wa(e,t,n,r,s,o,i,l){var a=(i&ml)!==0?(i&bl)===0?ca(n,!1,!1):Qt(n):null,c=(i&vl)!==0?Qt(s):null;return{v:a,i:c,e:dt(()=>(o(t,a??n,c??s,l),()=>{e.delete(r)}))}}function Ht(e,t,n){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end,o=t&&(t.f&je)===0?t.nodes.start:n;r!==null;){var i=cn(r);if(o.before(r),r===s)return;r=i}}function Ge(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function tr(e,t,n){var r=new Nn(e);un(()=>{var s=t()??null;r.ensure(s,s&&(o=>n(o,s)))},et)}function xe(e,t,n,r,s,o){var i=null,l=e,a=new Nn(l,!1);un(()=>{const c=t()||null;var u=c==="svg"?Al:void 0;if(c===null){a.ensure(null,null);return}return a.ensure(c,p=>{if(c){if(i=Bs(c,u),tn(i,i),r){var f=null,h=i.appendChild(Je());r(i,h),f==null||f.remove()}N.nodes.end=i,p.before(i)}}),()=>{}},et),Pr(()=>{})}function Fa(e,t){var n=void 0,r;zs(()=>{n!==(n=t())&&(r&&(Ae(r),r=null),n&&(r=dt(()=>{Hs(()=>n(e))})))})}function so(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=so(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Va(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=so(e))&&(r&&(r+=" "),r+=t);return r}function nn(e){return typeof e=="object"?Va(e):e??""}const os=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Ba(e,t,n){var r=e==null?"":""+e;if(n){for(var s of Object.keys(n))if(n[s])r=r?r+" "+s:s;else if(r.length)for(var o=s.length,i=0;(i=r.indexOf(s,i))>=0;){var l=i+o;(i===0||os.includes(r[i-1]))&&(l===r.length||os.includes(r[l]))?r=(i===0?"":r.substring(0,i))+r.substring(l+1):i=l}}return r===""?null:r}function is(e,t=!1){var n=t?" !important;":";",r="";for(var s of Object.keys(e)){var o=e[s];o!=null&&o!==""&&(r+=" "+s+": "+o+n)}return r}function nr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Ka(e,t){if(t){var n="",r,s;if(Array.isArray(t)?(r=t[0],s=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,i=0,l=!1,a=[];r&&a.push(...Object.keys(r).map(nr)),s&&a.push(...Object.keys(s).map(nr));var c=0,u=-1;const v=e.length;for(var p=0;p<v;p++){var f=e[p];if(l?f==="/"&&e[p-1]==="*"&&(l=!1):o?o===f&&(o=!1):f==="/"&&e[p+1]==="*"?l=!0:f==='"'||f==="'"?o=f:f==="("?i++:f===")"&&i--,!l&&o===!1&&i===0){if(f===":"&&u===-1)u=p;else if(f===";"||p===v-1){if(u!==-1){var h=nr(e.substring(c,u).trim());if(!a.includes(h)){f!==";"&&p++;var y=e.substring(c,p).trim();n+=" "+y+";"}}c=p+1,u=-1}}}}return r&&(n+=is(r)),s&&(n+=is(s,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function xt(e,t,n,r,s,o){var i=e[Zr];if(i!==n||i===void 0){var l=Ba(n,r,o);l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l),e[Zr]=n}else if(o&&s!==o)for(var a in o){var c=!!o[a];(s==null||c!==!!s[a])&&e.classList.toggle(a,c)}return o}function rr(e,t={},n,r){for(var s in n){var o=n[s];t[s]!==o&&(n[s]==null?e.style.removeProperty(s):e.style.setProperty(s,o,r))}}function oe(e,t,n,r){var s=e[Jr];if(s!==t){var o=Ka(t,r);o==null?e.removeAttribute("style"):e.style.cssText=o,e[Jr]=t}else r&&(Array.isArray(r)?(rr(e,n==null?void 0:n[0],r[0]),rr(e,n==null?void 0:n[1],r[1],"important")):rr(e,n,r));return r}function dr(e,t,n=!1){if(e.multiple){if(t==null)return;if(!vr(t))return Gl();for(var r of e.options)r.selected=t.includes(ls(r));return}for(r of e.options){var s=ls(r);if(fa(s,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Ua(e){var t=new MutationObserver(()=>{"__value"in e&&dr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Pr(()=>{t.disconnect()})}function ls(e){return"__value"in e?e.__value:e.value}const Ft=Symbol("class"),Vt=Symbol("style"),oo=Symbol("is custom element"),io=Symbol("is html"),Ha=wr?"input":"INPUT",za=wr?"option":"OPTION",Ya=wr?"select":"SELECT";function Ga(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Qe(e,t,n,r){var s=lo(e);s[t]!==(s[t]=n)&&(t==="loading"&&(e[Ml]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ao(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Xa(e,t,n,r,s=!1,o=!1){var i=lo(e),l=i[oo],a=!i[io],c=t||{},u=e.nodeName===za;for(var p in t)p in n||(n[p]=null);n.class?n.class=nn(n.class):n[Ft]&&(n.class=null),n[Vt]&&(n.style??(n.style=null));var f=ao(e);if(e.nodeName===Ha&&"type"in n&&("value"in n||"__value"in n)){var h=n.type;(h!==c.type||h===void 0&&e.hasAttribute("type"))&&(c.type=h,Qe(e,"type",h))}for(const b in n){let C=n[b];if(u&&b==="value"&&C==null){e.value=e.__value="",c[b]=C;continue}if(b==="class"){var y=e.namespaceURI==="http://www.w3.org/1999/xhtml";xt(e,y,C,r,t==null?void 0:t[Ft],n[Ft]),c[b]=C,c[Ft]=n[Ft];continue}if(b==="style"){oe(e,C,t==null?void 0:t[Vt],n[Vt]),c[b]=C,c[Vt]=n[Vt];continue}var v=c[b];if(!(C===v&&!(C===void 0&&e.hasAttribute(b)))){c[b]=C;var g=b[0]+b[1];if(g!=="$$")if(g==="on"){const k={},T="$$"+b;let P=b.slice(2);var _=Ra(P);if(La(P)&&(P=P.slice(0,-7),k.capture=!0),!_&&v){if(C!=null)continue;e.removeEventListener(P,c[T],k),c[T]=null}if(_)Ta(P,e,C),Ia([P]);else if(C!=null){let W=function(x){c[b].call(this,x)};c[T]=Sa(P,e,W,k)}}else if(b==="style")Qe(e,b,C);else if(b==="autofocus")ea(e,!!C);else if(!l&&(b==="__value"||b==="value"&&C!=null))e.value=e.__value=C;else if(b==="selected"&&u)Ga(e,C);else{var S=b;a||(S=Na(S));var A=S==="defaultValue"||S==="defaultChecked";if(C==null&&!l&&!A)if(i[b]=null,S==="value"||S==="checked"){let k=e;const T=t===void 0;if(S==="value"){let P=k.defaultValue;k.removeAttribute(S),k.defaultValue=P,k.value=k.__value=T?P:null}else{let P=k.defaultChecked;k.removeAttribute(S),k.defaultChecked=P,k.checked=T?P:!1}}else e.removeAttribute(b);else A||f.includes(S)&&(l||typeof C!="string")?(e[S]=C,S in i&&(i[S]=G)):typeof C!="function"&&Qe(e,S,C)}}}return c}function He(e,t,n=[],r=[],s=[],o,i=!1,l=!1){Ds(s,n,r,a=>{var c=void 0,u={},p=e.nodeName===Ya,f=!1;if(zs(()=>{var y=t(...a.map(d)),v=Xa(e,c,y,o,i,l);f&&p&&"value"in y&&dr(e,y.value);for(let _ of Object.getOwnPropertySymbols(u))y[_]||Ae(u[_]);for(let _ of Object.getOwnPropertySymbols(y)){var g=y[_];_.description===El&&(!c||g!==c[_])&&(u[_]&&Ae(u[_]),u[_]=dt(()=>Fa(e,()=>g))),v[_]=g}c=v}),p){var h=e;Hs(()=>{dr(h,c.value,!0),Ua(h)})}f=!0})}function lo(e){return e[Zn]??(e[Zn]={[oo]:e.nodeName.includes("-"),[io]:e.namespaceURI===Cs})}var as=new Map;function ao(e){var t=e.getAttribute("is")||e.nodeName,n=as.get(t);if(n)return n;as.set(t,n=[]);for(var r,s=e,o=Element.prototype;o!==s;){r=Il(s);for(var i in r)r[i].set&&i!=="innerHTML"&&i!=="textContent"&&i!=="innerText"&&n.push(i);s=As(s)}return n}const qa={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(jt(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let s=e.props[r];jt(s)&&(s=s());const o=Yt(s,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(jt(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const s=Yt(r,t);return s&&!s.configurable&&(s.configurable=!0),s}}},has(e,t){if(t===St||t===Nl)return!1;for(let n of e.props)if(jt(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(jt(n)&&(n=n()),!!n){for(const r in n)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(n))t.includes(r)||t.push(r)}return t}};function sr(...e){return new Proxy({props:e},qa)}function _e(e,t,n,r){var s=r,o=!0,i=()=>(o&&(o=!1,s=r),s),l;l=e[t],l===void 0&&r!==void 0&&(l=i());var a;return a=()=>{var c=e[t];return c===void 0?i():(o=!0,c)},a}const Mt="default";function Rr(e,t){return!(e!=null&&e.length)||e===Mt?t:`${e}/${t}`}const Za=`RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-svelte README.`;function cs(e){if(!e||typeof e!="object")return!1;const t=e;return!!t.manifest&&typeof t.manifest=="object"&&!!t.components&&typeof t.components=="object"&&!Array.isArray(t.components)}function Ja(e){if(cs(e))return e;const t=e;return cs(t==null?void 0:t.default)?t.default:null}function or(e){return e.usesDefaultLibrary?[Mt,...e.libraryIds]:[...e.libraryIds]}function us({registrations:e,referenced:t}){if(t.usesDefaultLibrary&&!(e!=null&&e[Mt]))throw new Error(Za)}function Qa(e){const t=[],n=new Set;for(const r of e.values()){if(typeof r.stylesheet!="string")continue;const s=r.stylesheet.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function co(e){const t={};for(const[r,s]of e){const o=r===Mt;for(const[i,l]of Object.entries(s.components))t[o?i:`${r}/${i}`]=l}const n=Qa(e);return n?{components:t,stylesheets:n}:{components:t}}function dn(){const e=new Map,t=new Map,n=new Map,r=new Map;let s=0;function o(c,u){var p;e.get(c)!==u&&((p=u.manifest)!=null&&p.id&&u.manifest.id!==c&&console.warn(`RuleCMS widget: component library registered as "${c}" declares manifest id "${u.manifest.id}". The registered id wins for resolution.`),e.set(c,u),s+=1)}function i(c){const u=or(c),p=[...u].sort().join("|"),f=r.get(p);if(f&&f.loadedVersion===s)return f.plugin;const h=new Map;for(const v of u){const g=e.get(v);g&&h.set(v,g)}const y=co(h);return r.set(p,{loadedVersion:s,plugin:y}),y}function l(c){us(c);const{registrations:u,referenced:p}=c;for(const f of or(p)){if(e.has(f)||n.has(f))continue;const h=u==null?void 0:u[f];if(!h){console.error(`RuleCMS widget: no component library registered for libraryId "${f}"; its components will not render.`),n.set(f,new Error(`No registration for libraryId "${f}"`));continue}if(typeof h=="function")return null;o(f,h)}return i(p)}async function a(c){us(c);const{registrations:u,referenced:p}=c,f=or(p);return await Promise.all(f.map(async h=>{if(e.has(h)||n.has(h))return;const y=u==null?void 0:u[h];if(!y){console.error(`RuleCMS widget: no component library registered for libraryId "${h}"; its components will not render.`),n.set(h,new Error(`No registration for libraryId "${h}"`));return}if(typeof y!="function"){o(h,y);return}let v=t.get(h);v||(v=y().then(g=>{const _=Ja(g);if(!_)throw new Error(`Registration for libraryId "${h}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`);o(h,_)}).catch(g=>{n.set(h,g),console.error(`RuleCMS widget: failed to load component library "${h}":`,g)}).finally(()=>{t.delete(h)}),t.set(h,v)),await v})),i(p)}return{resolveSync:l,resolve:a}}const $a={Preview:"Preview",Compose:"Compose",RenderedPage:"RenderedPage"},Mn={DroppableBox:"droppable-box"},pr={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly"},ec={FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly",Stretch:"stretch"},Dn="cssAttrArray",tc={Phone:"phone",Tablet:"tablet",Desktop:"desktop"},xr={ComposerComponent:"ComposerWidget",Collection:"Collection",MoveComponentHandle:"MoveWidgetHandle"},Nr=`${xr.Collection}_`,uo="dev.",fo="https://rulecms.com",po="https://widget-cache.rulecms.com",ho="/api/v1/c/widget/get",go="/api/v1/c/dev/widget/get";function pt(e){return typeof e=="string"&&e.startsWith(uo)}function yo(e,t){return t?t.replace(/\/$/,""):pt(e)?fo:po}function Mr({publishedKey:e,token:t,endpoint:n}){const r=pt(t),s=r?go:ho,o=r?new URLSearchParams({widgetKey:e,token:t}):new URLSearchParams({publishedKey:e,token:t});return`${yo(t,n)}${s}?${o.toString()}`}const nc=({id:e,prefix:t})=>`${t}_${e}`,mo=e=>{if(!(e!=null&&e.length)||!e.includes("_")){console.error(`Invalid drag item id: ${e}. Type does not exist.`);return}return vo(e)},jr=e=>e.includes("_"),vo=e=>{const t=e.indexOf("_"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:n,id:r}},Wr=e=>{if(!jr(e))return;const n=mo(e);return(n==null?void 0:n.prefix)===xr.Collection||console.error("getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."),n==null?void 0:n.id},rc=e=>{if(!(e!=null&&e.length)){console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");return}const t=e.split("$");if(t.length<2){console.error("getNameAndInstanceIdFromWidgetKey: Invalid widget key format");return}const n=t[0];if(!t[1].includes("@"))return{name:n,instanceId:t[1]};const s=t[1].split("@");return{name:n,instanceId:s[0],parentId:s[1]}},sc=e=>{if(!(e!=null&&e.length))return{errorMessage:"getNameFromWidgetKey: Missing widget key"};const t=e.split("$");return t.length<2?{errorMessage:"getNameFromWidgetKey: Invalid widget key format"}:{name:t[0]}},_o=e=>{var s,o,i,l;if(!e)return{error:"getWidgetKeyForCollection: Missing collection"};if(!((s=e.name)!=null&&s.length))return{error:"getWidgetKeyForCollection: Missing collection name"};const t=(o=e.name)==null?void 0:o.trim().toLowerCase();if(!((i=e.id)!=null&&i.length))return{error:"getWidgetKeyForCollection: Missing collection id"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.id}@${e.parentId}`:`${e.id}`;return{data:`${t}$${r}`}},bo=e=>{var s,o,i,l;if(!e)return{error:"getWidgetKeyForPublishedCollection: Missing collection"};if(!((s=e.name)!=null&&s.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection name"};const t=(o=e.name)==null?void 0:o.trim().toLowerCase();if(!((i=e.publishedKey)!=null&&i.length))return{error:"getWidgetKeyForPublishedCollection: Missing collection publishedKey"};const r=((l=e.parentId)==null?void 0:l.length)?`${e.publishedKey}@${e.parentId}`:`${e.publishedKey}`;return{data:`${t}$${r}`}},oc=e=>{const t=_o(e);return`${Nr}${t.data}`},ic=e=>{const t=bo(e);return`${Nr}${t.data}`},Co="---",wo="___";function Ao(e,t){return`${e}${Co}${t}`}function lc(e,t,n){return`${Ao(e,t)}${wo}${n}`}function ac(e){const t=e.split(".");if(t.length!==3)throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);const n=t[0],r=t[1],s=parseInt(t[2],10);if(isNaN(s))throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);return`${n}.${r}.${s+1}`}function jn({displayItemList:e,widgetCollections:t}){const n=new Set;let r=!1;const s=o=>{var i,l,a;if((i=o==null?void 0:o.rows)!=null&&i.length){for(const c of o.rows)if((l=c==null?void 0:c.columns)!=null&&l.length)for(const u of c.columns)u.collection&&s(u.collection.collectionRows),!(!u.type||u.type===Mn.DroppableBox)&&(jr(u.type)||(!((a=u.libraryId)!=null&&a.length)||u.libraryId===Mt?r=!0:n.add(u.libraryId)))}};s(e);for(const o of Object.values(t??{}))s(o==null?void 0:o.collectionRows);return{libraryIds:Array.from(n),usesDefaultLibrary:r}}const Fr=Symbol("rulecms-widget-context");function cc(){return{token:"",endpoint:void 0,libraries:void 0,libraryRegistry:dn()}}function uc(e,t){ee(t,!0);const n=At(cc());Dr(()=>{n.token=t.token,n.endpoint=t.endpoint,n.libraries=t.libraries}),lr.setContext(Fr,n);var r=M(),s=R(r);Or(s,()=>t.children),E(e,r),te()}const Eo="1200px",Vr="500px",Br="820px",fc=Eo,So="rulecms",dc=1920,pc={f:"auto",q:"auto",c:"limit"},hc=/^[A-Za-z0-9][A-Za-z0-9._\-/]*$/,gc=300,yc=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,mc=100,vc=/^https:\/\/[^\s"'()\\<>]+$/,_c=2e3,bc=/^[A-Za-z0-9_,.:\-/]*$/,Cc=300,To=e=>typeof e=="string"&&e.length<=gc&&hc.test(e),Io=e=>typeof e=="string"&&e.length<=mc&&yc.test(e),Po=e=>typeof e=="string"&&e.length<=_c&&vc.test(e),Do=e=>typeof e=="string"&&e.length<=Cc&&bc.test(e),wc=e=>Object.entries(e).map(([t,n])=>`${t}_${n}`).join(","),Ac=e=>{const t={};for(const n of e.split(",")){const r=n.trim(),s=r.indexOf("_");s<=0||(t[r.slice(0,s)]=r.slice(s+1))}return t},ko=({publicId:e,cloudName:t=So,transformations:n,width:r=dc})=>{const s=typeof n=="string"?Ac(n):n,o={...pc,...s,w:r};return encodeURI(`https://res.cloudinary.com/${t}/image/upload/${wc(o)}/${e}`)},Lo=/^--[A-Za-z0-9_-]+$/,Oo=200,yt=e=>{if(typeof e!="string")return!1;const t=e.trim();return t.length<=Oo&&Lo.test(t)},Oe=e=>`var(${e.trim()})`,Z=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return;const t=e.cssVariable;if(t!=null)return yt(t)?t.trim():void 0},Ve=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e.cssVariable;return t==null?!1:!yt(t)},Ec=(e,t)=>{const n=Z(e);return n?{[t]:Oe(n)}:void 0},Ro=e=>{if(typeof e!="object"||e===null||Array.isArray(e)||Ve(e))return!1;if(Z(e))return!0;const t=e;return t.source==="none"?!0:t.source==="url"?Po(t.url):t.source==="cloudinary"?!To(t.publicId)||t.cloudName!==void 0&&t.cloudName!==null&&!Io(t.cloudName)?!1:t.transformations===void 0||t.transformations===null||Do(t.transformations):!1},xo=["px","%","em","rem","vh","vw"],Wn=["inherit","unset"],No=["allSides","top","right","bottom","left"],ht=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;return Ve(e)?!1:Z(e)?!0:n.unit==="auto"?t.allowAuto!==!1:n.unit==="keyword"?t.allowKeywords!==!1&&Wn.includes(n.keyword):xo.includes(n.unit)?typeof n.value!="number"||!Number.isFinite(n.value)?!1:t.allowNegative!==!1||n.value>=0:!1},Mo=(e,t={})=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const n=e;for(const r of No){const s=n[r];if(s!=null&&!ht(s,t))return!1}return!0},Sc=[...Wn,"transparent","currentColor"],Tc=/^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/,Fn=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Ve(e)?!1:Z(e)?!0:t.unit==="keyword"?Sc.includes(t.keyword):t.unit==="color"?typeof t.value=="string"&&Tc.test(t.value.trim()):!1},Vn=e=>{const t=Z(e);return t?Oe(t):"unit"in e?e.unit==="keyword"?e.keyword:e.value.trim():""},jo=(e,t)=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Ve(e)&&!!Z(e):typeof e!="string"||!e.length?!1:t.includes(e)?!0:Wn.includes(e),Wo=['system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif','Georgia, "Times New Roman", Times, serif',"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace","Arial, Helvetica, sans-serif",'"Helvetica Neue", Helvetica, Arial, sans-serif',"Verdana, Geneva, sans-serif"],Fo=["normal","bold","100","200","300","400","500","600","700","800","900"],Vo=["normal","italic","oblique"],Bo=["left","center","right","justify","start","end"],Ko=["none","underline","line-through","overline"],Uo=["none","uppercase","lowercase","capitalize"],vn=["visible","hidden","scroll","auto","clip"],Ho=["auto","none"],zo=["flex-start","flex-end","center","space-between","space-around","space-evenly"],Yo=["flex-start","flex-end","center","baseline","stretch"],Go=["wrap","nowrap"],Xo=["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch"],qo=["row","row-reverse","column","column-reverse"],Zo=["cover","contain","auto"],Jo=["center center","center top","center bottom","left center","left top","left bottom","right center","right top","right bottom"],Qo=["no-repeat","repeat","repeat-x","repeat-y","space","round"],$o=["justifyContent","alignItems","flexWrap","alignContent","flexDirection"],ei=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],ti=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Ve(e)&&!!Z(e):ei.includes(e),ni=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Ve(e)?!1:Z(e)?!0:!(t.width!==void 0&&t.width!==null&&!ht(t.width,{allowAuto:!1,allowNegative:!1})||t.style!==void 0&&t.style!==null&&!ti(t.style)||t.color!==void 0&&t.color!==null&&!Fn(t.color))},Ic={allowAuto:!1,allowKeywords:!1,allowNegative:!0},Pc={allowAuto:!1,allowKeywords:!1,allowNegative:!1},ri=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;if(Ve(e))return!1;if(Z(e))return!0;for(const n of["offsetX","offsetY","spread"]){const r=t[n];if(r!=null&&!ht(r,Ic))return!1}return!(t.blur!==void 0&&t.blur!==null&&!ht(t.blur,Pc)||t.color!==void 0&&t.color!==null&&!Fn(t.color)||t.inset!==void 0&&t.inset!==null&&typeof t.inset!="boolean")},si=e=>e?e.cssVariable!==void 0&&e.cssVariable!==null||e.offsetX!==void 0||e.offsetY!==void 0||e.blur!==void 0||e.spread!==void 0||e.color!==void 0:!1,oi=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Ve(e)?!1:Z(e)?!0:t.unit==="number"?typeof t.value=="number"&&Number.isFinite(t.value)&&t.value>0:ht(e,{allowAuto:!1,allowNegative:!1})},ii=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?!Ve(e)&&!!Z(e):typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=1,li=e=>{if(!Ro(e))return{};const t=Z(e);if(t)return{backgroundImage:Oe(t)};const n=e;return n.source==="none"?{backgroundImage:"none"}:n.source==="url"?{backgroundImage:`url("${n.url}")`}:{backgroundImage:`url("${ko({publicId:n.publicId,cloudName:n.cloudName,transformations:n.transformations})}")`}},gt=e=>{const t=Z(e);return t?Oe(t):"unit"in e?e.unit==="auto"?"auto":e.unit==="keyword"?e.keyword:`${e.value}${e.unit}`:""},ai=e=>{if(!ni(e))return{};const t=Z(e);if(t)return{border:Oe(t)};const n={};if(e.width&&(n.borderWidth=gt(e.width)),e.style){const r=Z(e.style);n.borderStyle=r?Oe(r):e.style}return e.color&&(n.borderColor=Vn(e.color)),n},hn=e=>e?gt(e):"0px",ci=e=>{if(!ri(e)||!si(e))return{};const t=Z(e);if(t)return{boxShadow:Oe(t)};const n=[hn(e.offsetX),hn(e.offsetY),hn(e.blur),hn(e.spread)];return e.color&&n.push(Vn(e.color)),e.inset&&n.unshift("inset"),{boxShadow:n.join(" ")}},Dc=e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`,ui=(e,t)=>{if(!Mo(e))return{};if(e.allSides)return{[t]:gt(e.allSides)};const n={};for(const r of["top","right","bottom","left"]){const s=e[r];s&&(n[`${t}${Dc(r)}`]=gt(s))}return n},fi=(e,t)=>Fn(e)?{[t]:Vn(e)}:{},di=(e,t,n)=>{if(!jo(e,n))return{};const r=Z(e);return r?{[t]:Oe(r)}:{[t]:e}},pi=(e,t,n={})=>ht(e,n)?{[t]:gt(e)}:{},hi=e=>{if(!oi(e))return{};const t=Z(e);return t?{lineHeight:Oe(t)}:"unit"in e&&e.unit==="number"?{lineHeight:e.value}:{lineHeight:gt(e)}},gi=e=>{if(!ii(e))return{};const t=Z(e);return t?{opacity:Oe(t)}:{opacity:e}},Bn={"margin-3-resolutions":{kind:"boxSpacing",cssProperty:"margin"},"padding-3-resolutions":{kind:"boxSpacing",cssProperty:"padding"},"border-3-resolutions":{kind:"border"},"box-shadow-3-resolutions":{kind:"boxShadow"},"border-radius-3-resolutions":{kind:"length",cssProperty:"borderRadius",capabilities:{allowAuto:!1,allowNegative:!1}},"width-3-resolutions":{kind:"length",cssProperty:"width",capabilities:{allowAuto:!0,allowNegative:!1}},"height-3-resolutions":{kind:"length",cssProperty:"height",capabilities:{allowAuto:!0,allowNegative:!1}},"min-width-3-resolutions":{kind:"length",cssProperty:"minWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"max-width-3-resolutions":{kind:"length",cssProperty:"maxWidth",capabilities:{allowAuto:!1,allowNegative:!1}},"min-height-3-resolutions":{kind:"length",cssProperty:"minHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"max-height-3-resolutions":{kind:"length",cssProperty:"maxHeight",capabilities:{allowAuto:!1,allowNegative:!1}},"gap-3-resolutions":{kind:"length",cssProperty:"gap",capabilities:{allowAuto:!1,allowNegative:!1}},"justify-content-3-resolutions":{kind:"enum",cssProperty:"justifyContent",allowedValues:zo},"align-items-3-resolutions":{kind:"enum",cssProperty:"alignItems",allowedValues:Yo},"flex-wrap-3-resolutions":{kind:"enum",cssProperty:"flexWrap",allowedValues:Go},"align-content-3-resolutions":{kind:"enum",cssProperty:"alignContent",allowedValues:Xo},"flex-direction-3-resolutions":{kind:"enum",cssProperty:"flexDirection",allowedValues:qo},"overflow-3-resolutions":{kind:"enum",cssProperty:"overflow",allowedValues:vn},"overflow-x-3-resolutions":{kind:"enum",cssProperty:"overflowX",allowedValues:vn},"overflow-y-3-resolutions":{kind:"enum",cssProperty:"overflowY",allowedValues:vn},"pointer-events-3-resolutions":{kind:"enum",cssProperty:"pointerEvents",allowedValues:Ho},"background-color-3-resolutions":{kind:"color",cssProperty:"backgroundColor"},"color-3-resolutions":{kind:"color",cssProperty:"color"},"background-image-3-resolutions":{kind:"backgroundImage"},"background-size-3-resolutions":{kind:"enum",cssProperty:"backgroundSize",allowedValues:Zo},"background-position-3-resolutions":{kind:"enum",cssProperty:"backgroundPosition",allowedValues:Jo},"background-repeat-3-resolutions":{kind:"enum",cssProperty:"backgroundRepeat",allowedValues:Qo},"opacity-3-resolutions":{kind:"opacity"},"font-family-3-resolutions":{kind:"enum",cssProperty:"fontFamily",allowedValues:Wo},"font-size-3-resolutions":{kind:"length",cssProperty:"fontSize",capabilities:{allowAuto:!1,allowNegative:!1}},"font-weight-3-resolutions":{kind:"enum",cssProperty:"fontWeight",allowedValues:Fo},"font-style-3-resolutions":{kind:"enum",cssProperty:"fontStyle",allowedValues:Vo},"line-height-3-resolutions":{kind:"lineHeight"},"letter-spacing-3-resolutions":{kind:"length",cssProperty:"letterSpacing",capabilities:{allowAuto:!1,allowNegative:!0}},"text-align-3-resolutions":{kind:"enum",cssProperty:"textAlign",allowedValues:Bo},"text-decoration-3-resolutions":{kind:"enum",cssProperty:"textDecoration",allowedValues:Ko},"text-transform-3-resolutions":{kind:"enum",cssProperty:"textTransform",allowedValues:Uo}},yi=(e,t)=>{const n=Bn[e];if(!n)return{};switch(n.kind){case"boxSpacing":return ui(t,n.cssProperty);case"length":return pi(t,n.cssProperty,n.capabilities);case"border":return ai(t);case"boxShadow":return ci(t);case"color":return fi(t,n.cssProperty);case"opacity":return gi(t);case"enum":return di(t,n.cssProperty,n.allowedValues);case"lineHeight":return hi(t);case"backgroundImage":return li(t);default:return{}}},kc=Object.fromEntries(Object.entries(Bn).filter(([,e])=>e.kind==="boxSpacing").map(([e,t])=>[e,t.cssProperty])),Lc=e=>e!=null&&e!=="",mi=e=>e?!$o.some(n=>Lc(e[n]))||e.display==="flex"?e:{...e,display:"flex"}:{},vi=({dbEntryType:e,libraryId:t,sourceComponentsPlugin:n})=>{if(!(e!=null&&e.length))return;const r=n.components[Rr(t,e)];if(!r||!("defaultAttributeValues"in r))return;const o=r.defaultAttributeValues;if(o!=null&&o.length)return o.reduce((i,l)=>({...i,[l.name]:l.defaultValues}),{})},ze=({deviceDisplayType:e,componentAttributes:t})=>{if(!t)return;const n={},r={};for(const[s,o]of Object.entries(t)){if(!s.includes("3-resolutions")||!o)continue;const i=o.all,l=i??o[e.toLowerCase()];r[s]=l,Bn[s]&&Object.assign(n,yi(s,l))}return Object.keys(n).length||Object.keys(r).length?{styles:Object.keys(n).length?n:void 0,componentAttributesSpecificToDeviceType:Object.keys(r).length?r:void 0}:void 0},_i=({defaultAttributes:e,userModifiedAttributes:t})=>e?t?{...e,...t}:e:t;function qt(e){return e.componentAttributes??e.widgetAttributes}function hr({col:e,deviceDisplayType:t,isComposeMode:n,sourceComponentsPlugin:r}){const s=qt(e),o=vi({dbEntryType:e.type,libraryId:e.libraryId,sourceComponentsPlugin:r})||[],i=_i({defaultAttributes:o,userModifiedAttributes:s}),{styles:l,componentAttributesSpecificToDeviceType:a}=ze({deviceDisplayType:t,componentAttributes:i})||{styles:void 0,componentAttributesSpecificToDeviceType:void 0};let c={};const u={};if(l)for(const[h,y]of Object.entries(l))n&&u[h]||(c={...c,[h]:y});let p=qt(e);for(const h in a)if(h.includes("3-resolutions")){p={...qt(e)||{},...a||{}};break}const f=mi(c);if(n&&f.pointerEvents!==void 0){const h={...f};return delete h.pointerEvents,{componentAttributesBasedOnDevice:p,componentStyles:h}}return{componentAttributesBasedOnDevice:p,componentStyles:f}}const bi=e=>{const t=(e==null?void 0:e.rows)||[];for(const n of t)if(((n==null?void 0:n.columns)||[]).length>0)return!0;return(e==null?void 0:e.containerAttributes)&&Object.keys(e.containerAttributes).length>0},Ci="var(--sl-spacing-x-small)";function wi(e){return e!=null&&e.horizontalAlignment||e!=null&&e.verticalAlignment||e!=null&&e.flexWrap||e!=null&&e.gap||e!=null&&e.alignContent?!0:!!(e!=null&&e.rowAttributes&&Object.keys(e.rowAttributes).length>0)}function Ai({row:e,deviceDisplayType:t}){var r;const n=ze({deviceDisplayType:t,componentAttributes:e.rowAttributes});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r["hide-component-3-resolutions"])==="true"}function Ei({row:e,deviceDisplayType:t,isComposeMode:n}){var h;const r=((h=ze({deviceDisplayType:t,componentAttributes:e.rowAttributes}))==null?void 0:h.styles)||{},s=r.justifyContent??e.horizontalAlignment??pr.Center,o=r.alignItems??e.verticalAlignment??pr.Center,i=r.flexDirection??"row",l=r.gap??e.gap??Ci,a=n?"nowrap":r.flexWrap??e.flexWrap??"nowrap",c=r.alignContent??e.alignContent??void 0,u=new Set(["justifyContent","alignItems","flexDirection","gap","flexWrap","alignContent","display"]),p={};for(const[y,v]of Object.entries(r))u.has(y)||(p[y]=v);const f={display:"flex",flexDirection:i,gap:l,flexWrap:a,justifyContent:s,alignItems:o,...p};return c!==void 0&&(f.alignContent=c),f}const Kn="css-classes-3-resolutions",Oc=500,Rc=/[\x00-\x1f\x7f]/g,Un=e=>{if(typeof e!="string")return;const t=new Set,n=[];for(const s of e.split(/\s+/)){const o=s.replace(Rc,"");o&&(t.has(o)||(t.add(o),n.push(o)))}if(!n.length)return;let r="";for(const s of n){const o=r?`${r} ${s}`:s;if(o.length>Oc)break;r=o}return r.length?r:void 0},Kr="hide-component-3-resolutions",Si="pointer-events-3-resolutions",Ti=["width-3-resolutions","min-width-3-resolutions","max-width-3-resolutions","height-3-resolutions","min-height-3-resolutions","max-height-3-resolutions","margin-3-resolutions","padding-3-resolutions","border-3-resolutions","border-radius-3-resolutions","box-shadow-3-resolutions","overflow-3-resolutions","overflow-x-3-resolutions","overflow-y-3-resolutions",Kr,Si],xc=new Set(Ti);function Hn({containerAttributes:e,deviceDisplayType:t}){var r;const n=ze({deviceDisplayType:t,componentAttributes:e});return((r=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:r[Kr])==="true"}function Ur({containerAttributes:e,deviceDisplayType:t,isComposeMode:n}){var o;if(!e)return{styles:{}};const r=n?Object.fromEntries(Object.entries(e).filter(([i])=>!xc.has(i))):e,s=ze({deviceDisplayType:t,componentAttributes:r});return{styles:(s==null?void 0:s.styles)??{},cssClasses:Un((o=s==null?void 0:s.componentAttributesSpecificToDeviceType)==null?void 0:o[Kn])}}function Ii(e){return Object.keys(e.styles).length>0||!!e.cssClasses}function Hr({containerAttributes:e,widgetContainerStyles:t}){return((e==null?void 0:e[Dn])||[]).some(r=>r.toLowerCase().startsWith("height:"))||t.styles.height!==void 0}const Pi="z-index-3-resolutions",zr=0;function Di(e){var t,n;return!!((n=(t=e==null?void 0:e.overlayLayers)==null?void 0:t.layers)!=null&&n.length)}function gr({containerAttributes:e,deviceDisplayType:t}){var s;const n=ze({deviceDisplayType:t,componentAttributes:e}),r=(s=n==null?void 0:n.componentAttributesSpecificToDeviceType)==null?void 0:s[Pi];if(typeof r=="number"&&Number.isFinite(r))return r;if(typeof r=="string"&&r.trim().length){const o=Number(r);if(Number.isFinite(o))return o}return zr}function ki(e,t){return e+t+1}function Li({containerAttributes:e,deviceDisplayType:t}){var s;const n=ze({deviceDisplayType:t,componentAttributes:e}),r=(s=n==null?void 0:n.styles)==null?void 0:s.pointerEvents;return typeof r=="string"?r:void 0}function Oi({layer:e,deviceDisplayType:t}){var n;return(n=e==null?void 0:e.rows)!=null&&n.length?Hn({containerAttributes:e.containerAttributes,deviceDisplayType:t}):!0}function Ri({isWithinCollection:e,baseDeclaresOwnHeight:t,baseZIndex:n}){return{position:"relative",isolation:"isolate",display:"flex",flexDirection:"column",...t?{}:{height:e?"auto":"100%"},...n===zr?{}:{zIndex:n}}}function xi({zIndex:e,pointerEvents:t}){return{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxSizing:"border-box",zIndex:e,...t?{pointerEvents:t}:{}}}function ie(e){if(!e)return;const t=[];for(const[n,r]of Object.entries(e)){if(r==null||r==="")continue;const s=n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);t.push(`${s}: ${r}`)}return t.length>0?t.join("; "):void 0}const zn="/";function Ni({componentProps:e,ancestorColumnIds:t,columnId:n}){if(!e||!n)return;const r=[...t??[],n];for(let s=0;s<r.length;s+=1){const o=r.slice(s).join(zn),i=e[o];if(i)return i}}function Mi({displayItemList:e,widgetCollections:t}){const n=[],r=(s,o)=>{var i;if((i=s==null?void 0:s.rows)!=null&&i.length)for(const l of s.rows)for(const a of l.columns){if(!a.id||a.type===Mn.DroppableBox)continue;const c=Wr(a.type);if(c!=null&&c.length){const u=a.collection??(t==null?void 0:t[c]);u&&!o.includes(a.id)&&r(u.collectionRows,[...o,a.id]);continue}n.push([...o,a.id].join(zn))}};return r(e,[]),n}function Nc(e,t){const n=`${zn}${e}`;return t.some(r=>r===e||r.endsWith(n))}function ji({componentProps:e,displayItemList:t,widgetCollections:n}){const r=e?Object.keys(e):[];if(!r.length)return[];const s=Mi({displayItemList:t,widgetCollections:n});return r.filter(o=>!Nc(o,s))}function Wi({componentProps:e,displayItemList:t,widgetCollections:n,publishedKey:r}){if(process.env.NODE_ENV==="production")return;const s=ji({componentProps:e,displayItemList:t,widgetCollections:n});s.length&&console.warn(`RuleCMSWidget "${r}": componentProps ${s.map(o=>`"${o}"`).join(", ")} ${s.length===1?"matches":"match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`)}function Mc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function jc(e){if(e.all!==void 0&&e.all!==null)return!1;const t=e.phone,n=e.tablet,r=e.desktop;return t!==n||t!==r||n!==r}function yr(e){var t,n;if(!((t=e==null?void 0:e.rows)!=null&&t.length))return!1;if(ir(e.containerAttributes))return!0;for(const r of e.rows){if(ir(r.rowAttributes))return!0;for(const s of r.columns)if(ir(qt(s)))return!0}for(const r of((n=e.overlayLayers)==null?void 0:n.layers)??[])if(yr(r))return!0;return!1}function ir(e){if(!e)return!1;for(const[t,n]of Object.entries(e))if(!(!t.includes("3-resolutions")||!Mc(n))){if(t==="hide-component-3-resolutions"){const r=n,s=o=>o==="true"||o===!0;if(s(r.phone)!==s(r.tablet)||s(r.phone)!==s(r.desktop))return!0;continue}if(jc(n))return!0}return!1}function Fi(e,t){if(yr(e))return!0;for(const n of Object.values(t))if(yr(n.collectionRows))return!0;return!1}const Vi=parseInt(Vr,10),Bi=parseInt(Br,10),Wc=Vi+1,Fc=Bi+1;function Vc(e){const t=`.${e}-phone`,n=`.${e}-tablet`,r=`.${e}-desktop`;return`
|
|
3
3
|
${t}, ${n}, ${r} { display: none; }
|
|
4
|
-
@media (max-width: ${
|
|
5
|
-
@media (min-width: ${
|
|
6
|
-
@media (min-width: ${
|
|
7
|
-
`.trim()}function
|
|
8
|
-
`)}),
|
|
9
|
-
${
|
|
10
|
-
}`:""),f=T(()=>!n()&&jn({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:o()})),h=T(()=>Wr({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:o(),isComposeMode:n()})),c=T(()=>{var E;const w=((E=t.displayItemList.containerAttributes)==null?void 0:E[En])||[],D=ws(p(h));return n()&&!i()||r()||w.length>0||D||l(n(),t.displayItemList.rows,i())}),d=T(()=>[p(a)?s:void 0,p(h).cssClasses].filter(Boolean).join(" ")),y=T(()=>({...Fr({containerAttributes:t.displayItemList.containerAttributes,widgetContainerStyles:p(h)})?{}:{height:i()?"auto":"100%"},display:"flex",flexDirection:"column",...p(h).styles})),m=T(()=>p(c)?p(d):""),g=T(()=>p(f)?{display:"none"}:p(c)?p(y):{display:"contents"});var _=wu(),S=ue(_);{var C=w=>{var D=Y(),E=B(D);sn(E,()=>"style",!1,(I,W)=>{var A=on();$(()=>Dt(A,p(u))),k(W,A)}),k(w,D)};ce(S,w=>{p(a)&&w(C)})}var b=We(S,2);Sr(b,()=>t.children),$(w=>{nt(_,"hidden",p(f)||void 0),Tt(_,1,Xt(p(m)||void 0)),ee(_,w)},[()=>te(p(g))]),k(e,_),De()}var Au=me("<div><!></div>");function Eu(e,t){Ie(t,!0);let n=de(t,"isComposeMode",3,!1),r=de(t,"showDropContainers",3,!1),i=de(t,"isWithinCollection",3,!1),o=de(t,"deviceDisplayType",3,"Desktop");function s(m,g,_){var C;const S=m&&!_?3:1;return!!((C=g==null?void 0:g.columns)!=null&&C.length)&&g.columns.length>S}const l=T(()=>!n()&&ys({row:t.row,deviceDisplayType:o()})),a=T(()=>r()||vs(t.row)||s(n(),t.row,i())),u=T(()=>ms({row:t.row,deviceDisplayType:o(),isComposeMode:n()})),f=T(()=>{var g;const m=Fe({deviceDisplayType:o(),componentAttributes:t.row.rowAttributes});return Vn((g=m==null?void 0:m.componentAttributesSpecificToDeviceType)==null?void 0:g[Fn])??""}),h=T(()=>p(a)?p(f):""),c=T(()=>p(l)?{display:"none"}:p(a)?p(u):{display:"contents"});var d=Au(),y=ue(d);Sr(y,()=>t.children),$(m=>{nt(d,"hidden",p(l)||void 0),Tt(d,1,Xt(p(h)||void 0)),ee(d,m)},[()=>te(p(c))]),k(e,d),De()}const Ms=["minWidth","maxWidth","minHeight","maxHeight","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","borderWidth","borderStyle","borderColor","border","borderRadius","boxShadow","width","height","gap","display","justifyContent","alignItems","flexWrap","alignContent","flexDirection","overflow","overflowX","overflowY","backgroundColor","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","opacity","fontFamily","fontSize","fontWeight","fontStyle","color","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],Su=e=>e!=null&&e!=="",Tu=e=>e?Ms.reduce((t,n)=>{const r=e[n];return Su(r)&&(t[n]=r),t},{}):{},Iu=e=>{if(!e)return;const t={...e};for(const n of Ms)delete t[n];return Object.keys(t).length?t:void 0},Du=e=>Object.keys(e).length>0,Pu=(e,t)=>{const n=(e==null?void 0:e.noContainer)??!1,r=e==null?void 0:e.resolveNoContainer;if(typeof r!="function")return n;try{const i=r(t);if(typeof i=="boolean")return i;console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" returned ${typeof i} instead of a boolean; falling back to noContainer=${n}`)}catch(i){console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" threw; falling back to noContainer=${n}`,i)}return n},ku=(e,t)=>{const n=e==null?void 0:e.resolveRendersOwnElement;if(typeof n!="function")return!1;try{const r=n(t);if(typeof r=="boolean")return r;console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" returned ${typeof r} instead of a boolean; falling back to false`)}catch(r){console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" threw; falling back to false`,r)}return!1};var si=me("<div><!></div>");function Ws(e,t){Ie(t,!0);const n=T(()=>t.components[Ir(t.libraryId,t.componentType)]),r=T(()=>{var _;const g=(_=p(n))==null?void 0:_.card;return g||(console.error(`DisplayComponent: Component with type ${t.componentType}${t.libraryId?` (library "${t.libraryId}")`:""} not found in components`),null)}),i=T(()=>({componentAttributes:t.componentAttributes,styleProps:t.styleProps})),o=T(()=>p(n)?Pu(p(n),p(i)):!1),s=T(()=>Tu(t.styleProps)),l=T(()=>p(o)?Iu(t.styleProps):t.styleProps),a=T(()=>{var g;return Vn((g=t.componentAttributes)==null?void 0:g[Fn])}),u=T(()=>p(o)&&Du(p(s))),f=T(()=>!p(o)||(p(n)?ku(p(n),p(i)):!1)),h=T(()=>!p(u)&&p(f)?p(a):void 0),c=T(()=>({componentAttributes:t.componentAttributes,styleProps:p(l),className:p(h),widgetInstanceProps:t.widgetInstanceProps,mounts:t.mounts}));var d=Y(),y=B(d);{var m=g=>{const _=T(()=>p(r));var S=Y(),C=B(S);{var b=E=>{var I=si(),W=ue(I);Xn(W,()=>p(_),(A,P)=>{P(A,Qn(()=>p(c)))}),$(A=>{Tt(I,1,Xt(p(a)||void 0)),ee(I,A)},[()=>te(p(s))]),k(E,I)},w=E=>{var I=si(),W=ue(I);Xn(W,()=>p(_),(A,P)=>{P(A,Qn(()=>p(c)))}),$(()=>Tt(I,1,Xt(p(a)))),k(E,I)},D=E=>{var I=Y(),W=B(I);Xn(W,()=>p(_),(A,P)=>{P(A,Qn(()=>p(c)))}),k(E,I)};ce(C,E=>{p(u)?E(b):!p(f)&&p(a)?E(w,1):E(D,-1)})}k(g,S)};ce(y,g=>{p(r)&&g(m)})}k(e,d),De()}var Lu=me("<div><!></div>"),Ru=me("<div><!> <!></div>");function Sn(e,t){Ie(t,!0);const n=C=>{Cu(C,{get displayItemList(){return t.displayItemList},get isComposeMode(){return r()},get showDropContainers(){return o()},get isWithinCollection(){return i()},get deviceDisplayType(){return t.deviceDisplayType},children:(b,w)=>{var D=Y(),E=B(D);Bt(E,17,()=>t.displayItemList.rows,I=>I.id,(I,W)=>{Eu(I,{get row(){return p(W)},get isComposeMode(){return r()},get showDropContainers(){return o()},get isWithinCollection(){return i()},get deviceDisplayType(){return t.deviceDisplayType},children:(A,P)=>{var F=Y(),X=B(F);Bt(X,17,()=>p(W).columns,J=>J.id,(J,x)=>{var Q=Y(),at=B(Q);{var an=ut=>{const Br=T(()=>c(p(x)));var Ur=Y(),Us=B(Ur);{var Ks=ct=>{{let Un=T(()=>d(p(x).id));Sn(ct,{get displayItemList(){return p(Br)},get isComposeMode(){return r()},isWithinCollection:!0,get widgetCollections(){return t.widgetCollections},get showDropContainers(){return o()},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return p(Un)}})}},Hs=ct=>{{let Un=T(()=>h(p(x)).componentAttributes),Gs=T(()=>h(p(x)).styleProps),zs=T(()=>y(p(x).id));Ws(ct,{get componentType(){return p(x).type},get libraryId(){return p(x).libraryId},get componentAttributes(){return p(Un)},get components(){return p(s)},get styleProps(){return p(Gs)},get widgetInstanceProps(){return p(zs)},get mounts(){return t.mounts}})}};ce(Us,ct=>{p(Br)?ct(Ks):ct(Hs,-1)})}k(ut,Ur)},_e=T(()=>f(p(x)));ce(at,ut=>{p(_e)&&ut(an)})}k(J,Q)}),k(A,F)},$$slots:{default:!0}})}),k(b,D)},$$slots:{default:!0}})};let r=de(t,"isComposeMode",3,!1),i=de(t,"isWithinCollection",3,!1),o=de(t,"showDropContainers",3,!1);const s=T(()=>hn(t.plugins).components),l=T(()=>!r()&&As(t.displayItemList)&&!jn({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType})),a=T(()=>{const C=ur({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType});return Is({isWithinCollection:i(),baseDeclaresOwnHeight:Fr({containerAttributes:t.displayItemList.containerAttributes,widgetContainerStyles:Wr({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType,isComposeMode:r()})}),baseZIndex:C})}),u=T(()=>{var w;const C=((w=t.displayItemList.overlayLayers)==null?void 0:w.layers)??[],b=ur({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType});return C.flatMap((D,E)=>Ts({layer:D,deviceDisplayType:t.deviceDisplayType})?[]:[{index:E,layer:D,boxStyles:Ds({zIndex:Es(b,E),pointerEvents:Ss({containerAttributes:D.containerAttributes,deviceDisplayType:t.deviceDisplayType})})}])});function f(C){if(r()&&C.type===Ln.DroppableBox)return!1;const{componentAttributesBasedOnDevice:b}=ar({col:C,deviceDisplayType:t.deviceDisplayType,isComposeMode:r(),sourceComponentsPlugin:hn(t.plugins)}),w=!!b&&b["hide-component-3-resolutions"]==="true";return!(!r()&&w)}function h(C){const{componentAttributesBasedOnDevice:b,componentStyles:w}=ar({col:C,deviceDisplayType:t.deviceDisplayType,isComposeMode:r(),sourceComponentsPlugin:hn(t.plugins)});return{componentAttributes:b,styleProps:w}}function c(C){const b=Rr(C.type);if(!(b!=null&&b.length))return null;const w=C.collection??t.widgetCollections[b];if(!w)throw new Error(`DisplayCollection - Collection with ID ${b} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`);return!w.collectionRows||!hs(w.collectionRows)?null:w.collectionRows}function d(C){return[...t.ancestorColumnIds??[],C]}function y(C){return Ps({componentProps:t.componentProps,ancestorColumnIds:t.ancestorColumnIds,columnId:C})}var m=Y(),g=B(m);{var _=C=>{var b=Ru(),w=ue(b);n(w);var D=We(w,2);Bt(D,17,()=>p(u),E=>E.index,(E,I)=>{var W=Lu(),A=ue(W);Sn(A,{get displayItemList(){return p(I).layer},get isComposeMode(){return r()},isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return t.ancestorColumnIds}}),$(P=>{nt(W,"data-rulecms-overlay-layer",p(I).index),ee(W,P)},[()=>te(p(I).boxStyles)]),k(E,W)}),$(E=>ee(b,E),[()=>te(p(a))]),k(C,b)},S=C=>{n(C)};ce(g,C=>{p(l)?C(_):C(S,-1)})}k(e,m),De()}function Tn(e,t){Ie(t,!0);var n=Y(),r=B(n);{var i=o=>{Sn(o,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return t.ancestorColumnIds}})};ce(r,o=>{var s,l;(l=(s=t.displayItemList)==null?void 0:s.rows)!=null&&l.length&&o(i)})}k(e,n),De()}function Fs(e,t){var n=Y(),r=B(n);Bt(r,16,()=>t.stylesheets??[],i=>i,(i,o)=>{var s=Y(),l=B(s);sn(l,()=>"style",!1,(a,u)=>{Tr(a,()=>({"data-rulecms-library-stylesheet":""}));var f=on();$(()=>Dt(f,o)),k(u,f)}),k(i,s)}),k(e,n)}let xu=0;var Nu=me("<div><!></div>"),li=me("<!> <!>",1);function Vs(e,t){Ie(t,!0);const n=["Phone","Tablet","Desktop"],r=`rulecms-bp-${++xu}`,i=T(()=>t.scopeIdInput??r),o=T(()=>xs(t.displayItemList,t.widgetCollections)),s=T(()=>_u(p(i)));var l=li(),a=B(l);{let c=T(()=>{var d;return(d=t.plugins.sourceComponents)==null?void 0:d.stylesheets});Fs(a,{get stylesheets(){return p(c)}})}var u=We(a,2);{var f=c=>{Tn(c,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",deviceDisplayType:"Desktop",get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},h=c=>{var d=li(),y=B(d);sn(y,()=>"style",!1,(g,_)=>{var S=on();$(()=>Dt(S,p(s))),k(_,S)});var m=We(y,2);Bt(m,16,()=>n,g=>g,(g,_)=>{var S=Nu(),C=ue(S);Tn(C,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get deviceDisplayType(){return _},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),$(b=>Tt(S,1,b),[()=>`${p(i)}-${_.toLowerCase()}`]),k(g,S)}),k(c,d)};ce(u,c=>{p(o)?c(h,-1):c(f)})}k(e,l),De()}function Ou(e,t,n){if(e)return"Phone";if(t)return"Tablet";const r=(n==null?void 0:n.toLowerCase())||"desktop";return r==="phone"?"Phone":r==="tablet"?"Tablet":"Desktop"}const Mu=`(max-width: ${Nr})`,Wu=`(max-width: ${Or})`;var Fu=me("<!> <!>",1);function js(e,t){Ie(t,!0);let n=ae("Desktop"),r,i;function o(){M(n,Ou((r==null?void 0:r.matches)??!1,(i==null?void 0:i.matches)??!1,t.reduxDeviceDisplayType),!0)}Cr(()=>(typeof matchMedia=="function"&&(r=matchMedia(Mu),i=matchMedia(Wu),r.addEventListener("change",o),i.addEventListener("change",o)),o(),()=>{r==null||r.removeEventListener("change",o),i==null||i.removeEventListener("change",o)}));var s=Fu(),l=B(s);{var a=f=>{{let h=T(()=>{var c;return(c=t.plugins.sourceComponents)==null?void 0:c.stylesheets});Fs(f,{get stylesheets(){return p(h)}})}};ce(l,f=>{t.isWithinCollection||f(a)})}var u=We(l,2);Tn(u,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get deviceDisplayType(){return p(n)},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),k(e,s),De()}function Bs(e){return e!==!1}const Vu=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),ju=e=>e.replace(/[^A-Za-z0-9_-]/g,t=>`\\${t}`),Bu=["</","<script","@import","javascript:","vbscript:","expression("],Uu=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/,Ku=/[\s{};"]/,Hu=/^[A-Za-z0-9_:%./[\]%-]+$/,Gu=e=>{let t=0;for(const n of e)if(n==="{")t+=1;else if(n==="}"&&(t-=1,t<0))return!1;return t===0},zu=e=>{const t=e.startsWith(".")?e.slice(1):e;return!t||t.length>200||t.startsWith(".")||Ku.test(t)?!1:Hu.test(t)},Yu=e=>{const t=e.trim();if(!t||t.length>4e3||Uu.test(t)||!Gu(t))return!1;const n=t.toLowerCase();return!Bu.some(r=>n.includes(r))},qu=e=>{if(!e)return{};const t={};for(const[n,r]of Object.entries(e)){const i=n.startsWith(".")?n.slice(1):n.trim();if(!zu(i)||typeof r!="string")continue;const o=r.trim();Yu(o)&&(t[i]=o)}return t},Xu=e=>e.split(`
|
|
4
|
+
@media (max-width: ${Vi}px) { ${t} { display: block; } }
|
|
5
|
+
@media (min-width: ${Wc}px) and (max-width: ${Bi}px) { ${n} { display: block; } }
|
|
6
|
+
@media (min-width: ${Fc}px) { ${r} { display: block; } }
|
|
7
|
+
`.trim()}function _n(e){if(!e)throw new Error("Source components plugin is required, but no plugins were provided");const t=e.sourceComponents;if(!t)throw new Error("Source components plugin is required, but was not found in plugins object");if(!t.components)throw new Error("Source components plugin is missing required property: components");if(typeof t.components!="object"||t.components===null||Array.isArray(t.components))throw new Error("Source components plugin components must be an object (Record<string, LibraryComponentEntry>)");return t}let Bc=0;var Kc=fe("<div><!> <!></div>");function Uc(e,t){ee(t,!0);let n=_e(t,"isComposeMode",3,!1),r=_e(t,"showDropContainers",3,!1),s=_e(t,"isWithinCollection",3,!1),o=_e(t,"deviceDisplayType",3,"Desktop");const i=`rulecms-vc-${++Bc}`;function l(C,k,T){const P=C&&!T?3:1;return!!(k!=null&&k.length)&&k.length>P}const a=w(()=>{var C;return(((C=t.displayItemList.containerAttributes)==null?void 0:C[Dn])||[]).join(`;
|
|
8
|
+
`)}),c=w(()=>d(a)?`.${i} {
|
|
9
|
+
${d(a)}
|
|
10
|
+
}`:""),u=w(()=>!n()&&Hn({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:o()})),p=w(()=>Ur({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:o(),isComposeMode:n()})),f=w(()=>{var T;const C=((T=t.displayItemList.containerAttributes)==null?void 0:T[Dn])||[],k=Ii(d(p));return n()&&!s()||r()||C.length>0||k||l(n(),t.displayItemList.rows,s())}),h=w(()=>[d(a)?i:void 0,d(p).cssClasses].filter(Boolean).join(" ")),y=w(()=>({...Hr({containerAttributes:t.displayItemList.containerAttributes,widgetContainerStyles:d(p)})?{}:{height:s()?"auto":"100%"},display:"flex",flexDirection:"column",...d(p).styles})),v=w(()=>d(f)?d(h):""),g=w(()=>d(u)?{display:"none"}:d(f)?d(y):{display:"contents"});var _=Kc(),S=me(_);{var A=C=>{var k=M(),T=R(k);xe(T,()=>"style",!1,(P,W)=>{var x=Re();H(()=>Se(x,d(c))),E(W,x)}),E(C,k)};q(S,C=>{d(a)&&C(A)})}var b=re(S,2);Or(b,()=>t.children),H(C=>{Qe(_,"hidden",d(u)||void 0),xt(_,1,nn(d(v)||void 0)),oe(_,C)},[()=>ie(d(g))]),E(e,_),te()}var Hc=fe("<div><!></div>");function zc(e,t){ee(t,!0);let n=_e(t,"isComposeMode",3,!1),r=_e(t,"showDropContainers",3,!1),s=_e(t,"isWithinCollection",3,!1),o=_e(t,"deviceDisplayType",3,"Desktop");function i(v,g,_){var A;const S=v&&!_?3:1;return!!((A=g==null?void 0:g.columns)!=null&&A.length)&&g.columns.length>S}const l=w(()=>!n()&&Ai({row:t.row,deviceDisplayType:o()})),a=w(()=>r()||wi(t.row)||i(n(),t.row,s())),c=w(()=>Ei({row:t.row,deviceDisplayType:o(),isComposeMode:n()})),u=w(()=>{var g;const v=ze({deviceDisplayType:o(),componentAttributes:t.row.rowAttributes});return Un((g=v==null?void 0:v.componentAttributesSpecificToDeviceType)==null?void 0:g[Kn])??""}),p=w(()=>d(a)?d(u):""),f=w(()=>d(l)?{display:"none"}:d(a)?d(c):{display:"contents"});var h=Hc(),y=me(h);Or(y,()=>t.children),H(v=>{Qe(h,"hidden",d(l)||void 0),xt(h,1,nn(d(p)||void 0)),oe(h,v)},[()=>ie(d(f))]),E(e,h),te()}const Ki=["minWidth","maxWidth","minHeight","maxHeight","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","borderWidth","borderStyle","borderColor","border","borderRadius","boxShadow","width","height","gap","display","justifyContent","alignItems","flexWrap","alignContent","flexDirection","overflow","overflowX","overflowY","backgroundColor","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","opacity","fontFamily","fontSize","fontWeight","fontStyle","color","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],Yc=e=>e!=null&&e!=="",Gc=e=>e?Ki.reduce((t,n)=>{const r=e[n];return Yc(r)&&(t[n]=r),t},{}):{},Xc=e=>{if(!e)return;const t={...e};for(const n of Ki)delete t[n];return Object.keys(t).length?t:void 0},qc=e=>Object.keys(e).length>0,Zc=(e,t)=>{const n=(e==null?void 0:e.noContainer)??!1,r=e==null?void 0:e.resolveNoContainer;if(typeof r!="function")return n;try{const s=r(t);if(typeof s=="boolean")return s;console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" returned ${typeof s} instead of a boolean; falling back to noContainer=${n}`)}catch(s){console.error(`resolveNoContainer: component "${e==null?void 0:e.id}" threw; falling back to noContainer=${n}`,s)}return n},Jc=(e,t)=>{const n=e==null?void 0:e.resolveRendersOwnElement;if(typeof n!="function")return!1;try{const r=n(t);if(typeof r=="boolean")return r;console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" returned ${typeof r} instead of a boolean; falling back to false`)}catch(r){console.error(`resolveRendersOwnElement: component "${e==null?void 0:e.id}" threw; falling back to false`,r)}return!1};var fs=fe("<div><!></div>");function Ui(e,t){ee(t,!0);const n=w(()=>t.components[Rr(t.libraryId,t.componentType)]),r=w(()=>{var _;const g=(_=d(n))==null?void 0:_.card;return g||(console.error(`DisplayComponent: Component with type ${t.componentType}${t.libraryId?` (library "${t.libraryId}")`:""} not found in components`),null)}),s=w(()=>({componentAttributes:t.componentAttributes,styleProps:t.styleProps})),o=w(()=>d(n)?Zc(d(n),d(s)):!1),i=w(()=>Gc(t.styleProps)),l=w(()=>d(o)?Xc(t.styleProps):t.styleProps),a=w(()=>{var g;return Un((g=t.componentAttributes)==null?void 0:g[Kn])}),c=w(()=>d(o)&&qc(d(i))),u=w(()=>!d(o)||(d(n)?Jc(d(n),d(s)):!1)),p=w(()=>!d(c)&&d(u)?d(a):void 0),f=w(()=>({componentAttributes:t.componentAttributes,styleProps:d(l),className:d(p),widgetInstanceProps:t.widgetInstanceProps,mounts:t.mounts}));var h=M(),y=R(h);{var v=g=>{const _=w(()=>d(r));var S=M(),A=R(S);{var b=T=>{var P=fs(),W=me(P);tr(W,()=>d(_),(x,se)=>{se(x,sr(()=>d(f)))}),H(x=>{xt(P,1,nn(d(a)||void 0)),oe(P,x)},[()=>ie(d(i))]),E(T,P)},C=T=>{var P=fs(),W=me(P);tr(W,()=>d(_),(x,se)=>{se(x,sr(()=>d(f)))}),H(()=>xt(P,1,nn(d(a)))),E(T,P)},k=T=>{var P=M(),W=R(P);tr(W,()=>d(_),(x,se)=>{se(x,sr(()=>d(f)))}),E(T,P)};q(A,T=>{d(c)?T(b):!d(u)&&d(a)?T(C,1):T(k,-1)})}E(g,S)};q(y,g=>{d(r)&&g(v)})}E(e,h),te()}var Qc=fe("<div><!></div>"),$c=fe("<div><!> <!></div>");function kn(e,t){ee(t,!0);const n=A=>{Uc(A,{get displayItemList(){return t.displayItemList},get isComposeMode(){return r()},get showDropContainers(){return o()},get isWithinCollection(){return s()},get deviceDisplayType(){return t.deviceDisplayType},children:(b,C)=>{var k=M(),T=R(k);Xt(T,17,()=>t.displayItemList.rows,P=>P.id,(P,W)=>{zc(P,{get row(){return d(W)},get isComposeMode(){return r()},get showDropContainers(){return o()},get isWithinCollection(){return s()},get deviceDisplayType(){return t.deviceDisplayType},children:(x,se)=>{var Be=M(),mt=R(Be);Xt(mt,17,()=>d(W).columns,Ye=>Ye.id,(Ye,de)=>{var D=M(),I=R(D);{var F=ne=>{const K=w(()=>f(d(de)));var pe=M(),Gn=R(pe);{var ul=vt=>{{let Xn=w(()=>h(d(de).id));kn(vt,{get displayItemList(){return d(K)},get isComposeMode(){return r()},isWithinCollection:!0,get widgetCollections(){return t.widgetCollections},get showDropContainers(){return o()},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return d(Xn)}})}},fl=vt=>{{let Xn=w(()=>p(d(de)).componentAttributes),dl=w(()=>p(d(de)).styleProps),pl=w(()=>y(d(de).id));Ui(vt,{get componentType(){return d(de).type},get libraryId(){return d(de).libraryId},get componentAttributes(){return d(Xn)},get components(){return d(i)},get styleProps(){return d(dl)},get widgetInstanceProps(){return d(pl)},get mounts(){return t.mounts}})}};q(Gn,vt=>{d(K)?vt(ul):vt(fl,-1)})}E(ne,pe)},B=w(()=>u(d(de)));q(I,ne=>{d(B)&&ne(F)})}E(Ye,D)}),E(x,Be)},$$slots:{default:!0}})}),E(b,k)},$$slots:{default:!0}})};let r=_e(t,"isComposeMode",3,!1),s=_e(t,"isWithinCollection",3,!1),o=_e(t,"showDropContainers",3,!1);const i=w(()=>_n(t.plugins).components),l=w(()=>!r()&&Di(t.displayItemList)&&!Hn({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType})),a=w(()=>{const A=gr({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType});return Ri({isWithinCollection:s(),baseDeclaresOwnHeight:Hr({containerAttributes:t.displayItemList.containerAttributes,widgetContainerStyles:Ur({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType,isComposeMode:r()})}),baseZIndex:A})}),c=w(()=>{var C;const A=((C=t.displayItemList.overlayLayers)==null?void 0:C.layers)??[],b=gr({containerAttributes:t.displayItemList.containerAttributes,deviceDisplayType:t.deviceDisplayType});return A.flatMap((k,T)=>Oi({layer:k,deviceDisplayType:t.deviceDisplayType})?[]:[{index:T,layer:k,boxStyles:xi({zIndex:ki(b,T),pointerEvents:Li({containerAttributes:k.containerAttributes,deviceDisplayType:t.deviceDisplayType})})}])});function u(A){if(r()&&A.type===Mn.DroppableBox)return!1;const{componentAttributesBasedOnDevice:b}=hr({col:A,deviceDisplayType:t.deviceDisplayType,isComposeMode:r(),sourceComponentsPlugin:_n(t.plugins)}),C=!!b&&b["hide-component-3-resolutions"]==="true";return!(!r()&&C)}function p(A){const{componentAttributesBasedOnDevice:b,componentStyles:C}=hr({col:A,deviceDisplayType:t.deviceDisplayType,isComposeMode:r(),sourceComponentsPlugin:_n(t.plugins)});return{componentAttributes:b,styleProps:C}}function f(A){const b=Wr(A.type);if(!(b!=null&&b.length))return null;const C=A.collection??t.widgetCollections[b];if(!C)throw new Error(`DisplayCollection - Collection with ID ${b} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`);return!C.collectionRows||!bi(C.collectionRows)?null:C.collectionRows}function h(A){return[...t.ancestorColumnIds??[],A]}function y(A){return Ni({componentProps:t.componentProps,ancestorColumnIds:t.ancestorColumnIds,columnId:A})}var v=M(),g=R(v);{var _=A=>{var b=$c(),C=me(b);n(C);var k=re(C,2);Xt(k,17,()=>d(c),T=>T.index,(T,P)=>{var W=Qc(),x=me(W);kn(x,{get displayItemList(){return d(P).layer},get isComposeMode(){return r()},isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return t.ancestorColumnIds}}),H(se=>{Qe(W,"data-rulecms-overlay-layer",d(P).index),oe(W,se)},[()=>ie(d(P).boxStyles)]),E(T,W)}),H(T=>oe(b,T),[()=>ie(d(a))]),E(A,b)},S=A=>{n(A)};q(g,A=>{d(l)?A(_):A(S,-1)})}E(e,v),te()}function Ln(e,t){ee(t,!0);var n=M(),r=R(n);{var s=o=>{kn(o,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get plugins(){return t.plugins},get deviceDisplayType(){return t.deviceDisplayType},get componentProps(){return t.componentProps},get mounts(){return t.mounts},get ancestorColumnIds(){return t.ancestorColumnIds}})};q(r,o=>{var i,l;(l=(i=t.displayItemList)==null?void 0:i.rows)!=null&&l.length&&o(s)})}E(e,n),te()}function Hi(e,t){var n=M(),r=R(n);Xt(r,16,()=>t.stylesheets??[],s=>s,(s,o)=>{var i=M(),l=R(i);xe(l,()=>"style",!1,(a,c)=>{He(a,()=>({"data-rulecms-library-stylesheet":""}));var u=Re();H(()=>Se(u,o)),E(c,u)}),E(s,i)}),E(e,n)}let eu=0;var tu=fe("<div><!></div>"),ds=fe("<!> <!>",1);function zi(e,t){ee(t,!0);const n=["Phone","Tablet","Desktop"],r=`rulecms-bp-${++eu}`,s=w(()=>t.scopeIdInput??r),o=w(()=>Fi(t.displayItemList,t.widgetCollections)),i=w(()=>Vc(d(s)));var l=ds(),a=R(l);{let f=w(()=>{var h;return(h=t.plugins.sourceComponents)==null?void 0:h.stylesheets});Hi(a,{get stylesheets(){return d(f)}})}var c=re(a,2);{var u=f=>{Ln(f,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",deviceDisplayType:"Desktop",get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},p=f=>{var h=ds(),y=R(h);xe(y,()=>"style",!1,(g,_)=>{var S=Re();H(()=>Se(S,d(i))),E(_,S)});var v=re(y,2);Xt(v,16,()=>n,g=>g,(g,_)=>{var S=tu(),A=me(S);Ln(A,{get displayItemList(){return t.displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return t.widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get deviceDisplayType(){return _},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),H(b=>xt(S,1,b),[()=>`${d(s)}-${_.toLowerCase()}`]),E(g,S)}),E(f,h)};q(c,f=>{d(o)?f(p,-1):f(u)})}E(e,l),te()}function nu(e,t,n){if(e)return"Phone";if(t)return"Tablet";const r=(n==null?void 0:n.toLowerCase())||"desktop";return r==="phone"?"Phone":r==="tablet"?"Tablet":"Desktop"}const ru=`(max-width: ${Vr})`,su=`(max-width: ${Br})`;var ou=fe("<!> <!>",1);function Yi(e,t){ee(t,!0);let n=ye("Desktop"),r,s;function o(){V(n,nu((r==null?void 0:r.matches)??!1,(s==null?void 0:s.matches)??!1,t.reduxDeviceDisplayType),!0)}Dr(()=>(typeof matchMedia=="function"&&(r=matchMedia(ru),s=matchMedia(su),r.addEventListener("change",o),s.addEventListener("change",o)),o(),()=>{r==null||r.removeEventListener("change",o),s==null||s.removeEventListener("change",o)}));var i=ou(),l=R(i);{var a=u=>{{let p=w(()=>{var f;return(f=t.plugins.sourceComponents)==null?void 0:f.stylesheets});Hi(u,{get stylesheets(){return d(p)}})}};q(l,u=>{t.isWithinCollection||u(a)})}var c=re(l,2);Ln(c,{get displayItemList(){return t.displayItemList},get isComposeMode(){return t.isComposeMode},get isWithinCollection(){return t.isWithinCollection},get widgetCollections(){return t.widgetCollections},get showDropContainers(){return t.showDropContainers},get reduxDeviceDisplayType(){return t.reduxDeviceDisplayType},get deviceDisplayType(){return d(n)},get plugins(){return t.plugins},get componentProps(){return t.componentProps},get mounts(){return t.mounts}}),E(e,i),te()}function Gi(e){return e!==!1}const iu=["utilities","components"],lu=new Set(iu),Xi=e=>typeof e=="string"&&lu.has(e),au=e=>e.split(`
|
|
11
|
+
`).map(t=>t.length>0?` ${t}`:t).join(`
|
|
12
|
+
`),cu=(e,t)=>e?Xi(t)?`@layer ${t} {
|
|
13
|
+
${au(e)}
|
|
14
|
+
}`:e:null,uu=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),fu=e=>e.replace(/[^A-Za-z0-9_-]/g,t=>`\\${t}`),du=["</","<script","@import","javascript:","vbscript:","expression("],pu=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/,hu=/[\s{};"]/,gu=/^[A-Za-z0-9_:%./[\]%-]+$/,yu=e=>{let t=0;for(const n of e)if(n==="{")t+=1;else if(n==="}"&&(t-=1,t<0))return!1;return t===0},mu=e=>{const t=e.startsWith(".")?e.slice(1):e;return!t||t.length>200||t.startsWith(".")||hu.test(t)?!1:gu.test(t)},vu=e=>{const t=e.trim();if(!t||t.length>4e3||pu.test(t)||!yu(t))return!1;const n=t.toLowerCase();return!du.some(r=>n.includes(r))},_u=e=>{if(!e)return{};const t={};for(const[n,r]of Object.entries(e)){const s=n.startsWith(".")?n.slice(1):n.trim();if(!mu(s)||typeof r!="string")continue;const o=r.trim();vu(o)&&(t[s]=o)}return t},bu=e=>e.split(`
|
|
11
15
|
`).map(t=>` ${t}`).join(`
|
|
12
|
-
`),
|
|
13
|
-
${
|
|
16
|
+
`),Cu=(e,t,n,r)=>{if(!Gi(n))return null;const s=_u(t),o=Object.keys(s);if(o.length===0||!e)return null;const i=`[data-rulecms-published-key="${uu(e)}"]`,l=o.sort((a,c)=>a.localeCompare(c)).map(a=>`${i} .${fu(a)} {
|
|
17
|
+
${bu(s[a])}
|
|
14
18
|
}`).join(`
|
|
15
|
-
`)};function
|
|
16
|
-
`
|
|
17
|
-
|
|
18
|
-
}`
|
|
19
|
+
`);return cu(l,r)};function wu(e,t){ee(t,!0);const n=w(()=>Cu(t.publishedKey,t.classes,void 0,t.classLayer));var r=M(),s=R(r);{var o=i=>{var l=M(),a=R(l);xe(a,()=>"style",!1,(c,u)=>{He(c,()=>({"data-rulecms-project-class-definitions":""}));var p=Re();H(()=>Se(p,d(n))),E(u,p)}),E(i,l)};q(s,i=>{d(n)&&i(o)})}E(e,r),te()}function Yr(e){return e!==!1}const qi=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),Au=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-sans-serif","ui-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]),Eu=/^[a-zA-Z_\u00A0-\uFFFF-][a-zA-Z0-9_\u00A0-\uFFFF-]*$/,Su=/url\(|@|[{};\\<>]|javascript:/i,Tu=/url\(|@|[{};\\<>]|javascript:|expression\(/i,Iu=/^--[A-Za-z_][\w-]*$/,Pu=/^[A-Za-z0-9 ]+$/,Du=new Set([100,200,300,400,500,600,700,800,900]),ku=4,Lu=8,Ou=255,mr=e=>Au.has(e.toLowerCase())||Eu.test(e)?e:`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,ps=e=>typeof e=="string"&&e.trim()!==""&&e.trim().length<=80&&!e.includes(",")&&!Su.test(e),Ru=e=>typeof e=="string"&&Iu.test(e.trim())&&e.trim().length<=80,xu=e=>typeof e=="string"&&e.trim()!==""&&e.trim().length<=400&&!Tu.test(e),Nu=e=>typeof e!="number"||!Number.isInteger(e)||e<0||e>Ou?null:e,Mu=(e,t,n)=>{if(!Array.isArray(e))return[];const r=[];for(const s of e){if(!s||typeof s!="object"||r.length>=ku)continue;const o=s;if(!Ru(o.name))continue;const i=o.name.trim();if(t.has(i))continue;const l=[],a=new Set;for(const u of o.overrideColors??[]){if(l.length>=Lu)break;const p=Nu(u==null?void 0:u.index);p===null||a.has(p)||!xu(u==null?void 0:u.color)||(a.add(p),l.push({index:p,color:u.color.trim()}))}l.sort((u,p)=>u.index-p.index);const c=o.applyToWidget===!0&&!n.current;c&&(n.current=!0),t.add(i),r.push({name:i,...l.length>0?{overrideColors:l}:{},...c?{applyToWidget:!0}:{}})}return r},Yn=e=>{var i;if(!Array.isArray(e))return[];const t=[],n=new Set,r=new Set,s={current:!1};let o=!1;for(const l of e){if(!l||!ps(l.family))continue;const a=l.family.trim(),c=a.toLowerCase();if(n.has(c)||t.length>=12)continue;const u=(l.fallbacks??[]).filter(ps).slice(0,8),p=typeof l.cssVariable=="string"&&yt(l.cssVariable.trim())?l.cssVariable.trim():void 0;let f={kind:"stack-only"};if(((i=l.source)==null?void 0:i.kind)==="google"){if(!Pu.test(a))continue;const g=(Array.isArray(l.source.weights)?l.source.weights:[]).filter(_=>typeof _=="number"&&Du.has(_)).filter((_,S,A)=>A.indexOf(_)===S).sort((_,S)=>_-S);if(g.length===0)continue;f={kind:"google",weights:g}}n.add(c);const h=l.applyToWidget===!0&&!o;h&&(o=!0);const y=Mu(l.palettes,r,s);t.push({family:a,...p?{cssVariable:p}:{},fallbacks:u,applyToWidget:h,source:f,...y.length>0?{palettes:y}:{}})}return t},ju=e=>{const t=Yn(e).filter(n=>n.source.kind==="google").map(n=>{const r=n.source.kind==="google"?n.source.weights.join(";"):"400";return`family=${n.family.replace(/ /g,"+")}:wght@${r}`});return t.length===0?null:`https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`},Wu=e=>[mr(e.family),...(e.fallbacks??[]).map(mr)].join(", "),Fu=e=>{const t=[];for(const n of e)for(const r of n.palettes??[]){const s=[` font-family: ${mr(n.family)};`];if(r.overrideColors&&r.overrideColors.length>0){const o=r.overrideColors.map(i=>`${i.index} ${i.color}`).join(", ");s.push(` override-colors: ${o};`)}t.push(`@font-palette-values ${r.name} {
|
|
20
|
+
${s.join(`
|
|
21
|
+
`)}
|
|
22
|
+
}`)}return t.length>0?t.join(`
|
|
23
|
+
|
|
24
|
+
`):null},Vu=e=>{for(const t of e)for(const n of t.palettes??[])if(n.applyToWidget)return n.name},Bu=(e,t,n)=>{if(!Yr(n)||!e)return null;const r=Yn(t),s=[];for(const c of r){const u=Wu(c);c.cssVariable&&s.push(` ${c.cssVariable}: ${u};`),c.applyToWidget&&s.push(` font-family: ${c.cssVariable?`var(${c.cssVariable})`:u};`)}const o=Vu(r);o&&s.push(` font-palette: ${o};`);const i=Fu(r),l=`[data-rulecms-published-key="${qi(e)}"] > *`,a=s.length>0?`${l} {
|
|
25
|
+
${s.join(`
|
|
26
|
+
`)}
|
|
27
|
+
}`:null;return!i&&!a?null:i?a?`${i}
|
|
28
|
+
|
|
29
|
+
${a}`:i:a};var Ku=fe('<link rel="stylesheet" data-rulecms-project-fonts=""/>'),Uu=fe("<!> <!>",1);function Hu(e,t){ee(t,!0);const n=w(()=>Yn(t.fonts)),r=w(()=>Yr(t.includeFontFaces)?ju(d(n)):null),s=w(()=>Bu(t.publishedKey,d(n),t.includeFontFaces));var o=Uu(),i=R(o);{var l=u=>{var p=Ku();H(()=>Qe(p,"href",d(r))),E(u,p)};q(i,u=>{d(r)&&u(l)})}var a=re(i,2);{var c=u=>{var p=M(),f=R(p);xe(f,()=>"style",!1,(h,y)=>{He(h,()=>({"data-rulecms-project-fonts":""}));var v=Re();H(()=>Se(v,d(s))),E(y,v)}),E(u,p)};q(a,u=>{d(s)&&u(c)})}E(e,o),te()}function Zi(e){return e!==!1}const zu=80,Yu=4e3,Gu=32,Ji=["url(","@import","@font-face","@media","@keyframes","</","<script","javascript:","expression(","behavior:"],Xu=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/,qu=/^[A-Za-z_][\w-]*$/,Zu=e=>{let t=0;for(const n of e)if(n==="{")t+=1;else if(n==="}"&&(t-=1,t<0))return!1;return t===0},Ju=e=>{if(!e||e.length>zu||e.includes("@")||e.includes(".")||/\s/.test(e))return!1;const t=e.toLowerCase();return Ji.some(n=>t.includes(n))?!1:qu.test(e)},Qu=e=>{const t=e.trim();if(t==="")return!1;const n=t.toLowerCase();if(n==="from"||n==="to")return!0;const r=t.match(/^(\d{1,3}(?:\.\d+)?)%$/);if(!r)return!1;const s=Number(r[1]);return s>=0&&s<=100},$u=e=>{let t=0;const n=e.length;let r=0;const s=()=>{for(;t<n&&/\s/.test(e[t]);)t+=1};for(s();t<n;){const o=e.indexOf("{",t);if(o===-1||!e.slice(t,o).trim().split(",").every(c=>Qu(c)))return!1;t=o+1;const l=e.indexOf("}",t);if(l===-1)return!1;const a=e.slice(t,l);if(a.includes("{")||a.includes("}")||a.includes("@"))return!1;t=l+1,r+=1,s()}return r>0},ef=e=>{const t=e.trim();if(!t||t.length>Yu||Xu.test(t)||!Zu(t))return!1;const n=t.toLowerCase();return Ji.some(r=>n.includes(r))||t.includes("@")?!1:$u(t)},Qi=e=>{if(!e)return{};const t={};for(const[n,r]of Object.entries(e)){const s=n.trim();if(!Ju(s)||t[s]!==void 0||typeof r!="string")continue;const o=r.trim();if(ef(o)&&(t[s]=o,Object.keys(t).length===Gu))break}return Object.fromEntries(Object.entries(t).sort(([n],[r])=>n.localeCompare(r)))},tf=e=>e.split(`
|
|
30
|
+
`).map(t=>` ${t}`).join(`
|
|
31
|
+
`),nf=(e,t,n)=>{if(!Zi(n))return null;const r=Qi(t),s=Object.keys(r);return s.length===0?null:s.map(o=>`@keyframes ${o} {
|
|
32
|
+
${tf(r[o])}
|
|
33
|
+
}`).join(`
|
|
34
|
+
|
|
35
|
+
`)};function rf(e,t){ee(t,!0);const n=w(()=>nf(t.publishedKey,t.keyframes));var r=M(),s=R(r);{var o=i=>{var l=M(),a=R(l);xe(a,()=>"style",!1,(c,u)=>{He(c,()=>({"data-rulecms-project-keyframes":""}));var p=Re();H(()=>Se(p,d(n))),E(u,p)}),E(i,l)};q(s,i=>{d(n)&&i(o)})}E(e,r),te()}const $i=e=>e!==!1,sf=80,of=2e3,lf=16,el=["url(","@","</","<script","javascript:","expression("],af=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/,cf=/^--[A-Za-z_][\w-]*$/,uf=e=>{for(const t of e)if(t==="{"||t==="}")return!1;return!0},ff=e=>{if(!e||e.length>sf||e.includes("@")||e.includes(".")||/\s/.test(e))return!1;const t=e.toLowerCase();return el.some(n=>t.includes(n))?!1:cf.test(e)},df=e=>{const t=e.trim();if(!t||t.length>of||af.test(t)||!uf(t))return!1;const n=t.toLowerCase();return!el.some(r=>n.includes(r))},tl=e=>{if(!e)return{};const t={};for(const[n,r]of Object.entries(e)){const s=n.trim();if(!ff(s)||t[s]!==void 0||typeof r!="string")continue;const o=r.trim();if(df(o)&&(t[s]=o,Object.keys(t).length===lf))break}return Object.fromEntries(Object.entries(t).sort(([n],[r])=>n.localeCompare(r)))},pf=e=>e.split(`
|
|
36
|
+
`).map(t=>` ${t}`).join(`
|
|
37
|
+
`),hf=(e,t,n)=>{if(!$i(n))return null;const r=tl(t),s=Object.keys(r);return s.length===0?null:s.map(o=>`@position-try ${o} {
|
|
38
|
+
${pf(r[o])}
|
|
39
|
+
}`).join(`
|
|
40
|
+
|
|
41
|
+
`)};function gf(e,t){ee(t,!0);const n=w(()=>hf(t.publishedKey,t.positionTry));var r=M(),s=R(r);{var o=i=>{var l=M(),a=R(l);xe(a,()=>"style",!1,(c,u)=>{He(c,()=>({"data-rulecms-project-position-try":""}));var p=Re();H(()=>Se(p,d(n))),E(u,p)}),E(i,l)};q(s,i=>{d(n)&&i(o)})}E(e,r),te()}function nl(e){return e!==!1}const yf=["*","<number>","<integer>","<length>","<percentage>","<length-percentage>","<color>","<angle>","<time>","<transform-function>","<transform-list>"],mf=new Set(yf),vf=/[{};]/,_f=40,bf=200,Cf=e=>typeof e=="string"&&mf.has(e),wf=(e,t)=>t!=="*"&&e===""?!1:t==="*"&&e===""?!0:!(e.length>bf||vf.test(e)||e.includes("url(")||e.includes("@")),rl=e=>{if(!Array.isArray(e))return[];const t=[],n=new Set;for(const r of e){if(!r||typeof r.name!="string"||!yt(r.name.trim()))continue;const s=r.name.trim();if(n.has(s)||t.length>=_f||!Cf(r.syntax)||typeof r.inherits!="boolean")continue;const o=typeof r.initialValue=="string"?r.initialValue.trim():"";wf(o,r.syntax)&&(n.add(s),t.push({name:s,syntax:r.syntax,inherits:r.inherits,initialValue:o}))}return t},Af=e=>{const t=[`@property ${e.name} {`,` syntax: "${e.syntax}";`,` inherits: ${e.inherits?"true":"false"};`];return e.initialValue!==""&&t.push(` initial-value: ${e.initialValue};`),t.push("}"),t.join(`
|
|
42
|
+
`)},Ef=(e,t,n)=>{if(!nl(n))return null;const r=rl(t);return r.length===0?null:r.map(Af).join(`
|
|
43
|
+
|
|
44
|
+
`)};function Sf(e,t){ee(t,!0);const n=w(()=>Ef(t.publishedKey,t.cssProperties));var r=M(),s=R(r);{var o=i=>{var l=M(),a=R(l);xe(a,()=>"style",!1,(c,u)=>{He(c,()=>({"data-rulecms-project-css-properties":""}));var p=Re();H(()=>Se(p,d(n))),E(u,p)}),E(i,l)};q(s,i=>{d(n)&&i(o)})}E(e,r),te()}function sl(e){return e!==!1}const ol=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),Tf=/[{};]/,If=e=>{if(!e)return{};const t={};for(const[n,r]of Object.entries(e)){if(!yt(n)||typeof r!="string")continue;const s=r.trim();s===""||Tf.test(s)||(t[n.trim()]=s)}return t},Pf=(e,t,n)=>{if(!sl(n))return null;const r=If(t),s=Object.keys(r);if(s.length===0||!e)return null;const o=`[data-rulecms-published-key="${ol(e)}"] > *`,i=s.sort((l,a)=>l.localeCompare(a)).map(l=>` ${l}: ${r[l]};`).join(`
|
|
45
|
+
`);return`${o} {
|
|
46
|
+
${i}
|
|
47
|
+
}`};function il(e){return e!==!1}const Df=5,kf=200,Lf=[{kind:"prefers-color-scheme",value:"dark"},{kind:"prefers-color-scheme",value:"light"},{kind:"html-class",value:"dark"},{kind:"data-theme",value:"dark"},{kind:"data-theme",value:"light"}],Of=/[{};]/,Rf=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return Lf.some(n=>n.kind===t.kind&&n.value===t.value)},xf=e=>{if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[n,r]of Object.entries(e)){if(!yt(n)||typeof r!="string")continue;const s=r.trim();s===""||Of.test(s)||s.includes("url(")||s.includes("@")||(t[n.trim()]=s)}return Object.fromEntries(Object.entries(t).sort(([n],[r])=>n.localeCompare(r)))},ll=e=>{if(!Array.isArray(e))return[];const t=[],n=new Set;let r=0;for(const s of e){if(!s||!Rf(s.condition))continue;const o=`${s.condition.kind}:${s.condition.value}`;if(n.has(o))continue;const i=xf(s.variables),l=r+Object.keys(i).length;if(!(Object.keys(i).length===0||l>kf)&&(n.add(o),r=l,t.push({condition:s.condition,variables:i}),t.length===Df))break}return t},Nf=(e,t)=>{const n=Object.entries(e).map(([r,s])=>` ${r}: ${s};`);return`${t} {
|
|
48
|
+
${n.join(`
|
|
49
|
+
`)}
|
|
50
|
+
}`},Mf=e=>e.split(`
|
|
51
|
+
`).map(t=>` ${t}`).join(`
|
|
52
|
+
`),jf=(e,t)=>{const n=Nf(e.variables,t),{kind:r,value:s}=e.condition;return r==="prefers-color-scheme"?`@media (prefers-color-scheme: ${s}) {
|
|
53
|
+
${Mf(n)}
|
|
54
|
+
}`:r==="html-class"?`html.${s} ${n}`:`[data-theme="${s}"] ${n}`},Wf=(e,t,n)=>{if(!il(n)||!e)return null;const r=ll(t);if(r.length===0)return null;const s=`[data-rulecms-published-key="${ol(e)}"] > *`;return r.map(o=>jf(o,s)).join(`
|
|
55
|
+
|
|
56
|
+
`)};function Ff(e,t){ee(t,!0);const n=w(()=>Wf(t.publishedKey,t.themes));var r=M(),s=R(r);{var o=i=>{var l=M(),a=R(l);xe(a,()=>"style",!1,(c,u)=>{He(c,()=>({"data-rulecms-project-themes":""}));var p=Re();H(()=>Se(p,d(n))),E(u,p)}),E(i,l)};q(s,i=>{d(n)&&i(o)})}E(e,r),te()}function Vf(e,t){ee(t,!0);const n=w(()=>Pf(t.publishedKey,t.variables));var r=M(),s=R(r);{var o=i=>{var l=M(),a=R(l);xe(a,()=>"style",!1,(c,u)=>{He(c,()=>({"data-rulecms-project-css-variables":""}));var p=Re();H(()=>Se(p,d(n))),E(u,p)}),E(i,l)};q(s,i=>{d(n)&&i(o)})}E(e,r),te()}function al(e){return e!==!1}const Bf=["light","dark","light dark"],Kf=["auto","thin","none"],Uf=new Set(Bf),Hf=new Set(Kf),zf=/[{};]|url\(|@/i,Yf=e=>typeof e=="string"&&e.trim()!==""&&e.trim().length<=400&&!zf.test(e),gn=e=>Yf(e)?e.trim():void 0,cl=e=>{if(!e||typeof e!="object"||Array.isArray(e))return null;const t=gn(e.selectionBackground),n=gn(e.selectionColor),r=gn(e.caretColor),s=gn(e.scrollbarColor),o={...typeof e.colorScheme=="string"&&Uf.has(e.colorScheme)?{colorScheme:e.colorScheme}:{},...t?{selectionBackground:t}:{},...n?{selectionColor:n}:{},...r?{caretColor:r}:{},...s?{scrollbarColor:s}:{},...typeof e.scrollbarWidth=="string"&&Hf.has(e.scrollbarWidth)?{scrollbarWidth:e.scrollbarWidth}:{}};return Object.keys(o).length>0?o:null},Gf=(e,t,n)=>{if(!al(n)||!e)return null;const r=cl(t);if(!r)return null;const s=`[data-rulecms-published-key="${qi(e)}"]`,o=[];r.colorScheme&&o.push(` color-scheme: ${r.colorScheme};`),r.caretColor&&o.push(` caret-color: ${r.caretColor};`),r.scrollbarWidth&&o.push(` scrollbar-width: ${r.scrollbarWidth};`),r.scrollbarColor&&o.push(` scrollbar-color: ${r.scrollbarColor};`);const i=[];r.selectionBackground&&i.push(` background: ${r.selectionBackground};`),r.selectionColor&&i.push(` color: ${r.selectionColor};`);const l=[];return o.length>0&&l.push(`${s} > * {
|
|
57
|
+
${o.join(`
|
|
58
|
+
`)}
|
|
59
|
+
}`),i.length>0&&l.push(`${s} > * ::selection {
|
|
60
|
+
${i.join(`
|
|
61
|
+
`)}
|
|
62
|
+
}`),l.length>0?l.join(`
|
|
63
|
+
`):null};function Xf(e,t){ee(t,!0);const n=w(()=>Gf(t.publishedKey,t.widgetChrome));var r=M(),s=R(r);{var o=i=>{var l=M(),a=R(l);xe(a,()=>"style",!1,(c,u)=>{He(c,()=>({"data-rulecms-project-widget-chrome":""}));var p=Re();H(()=>Se(p,d(n))),E(u,p)}),E(i,l)};q(s,i=>{d(n)&&i(o)})}E(e,r),te()}function qf(e){return e!==!1}function Zf(e){const t={};return Object.entries(e).forEach(([n,r])=>{const s={...r};if(s.itemList)try{s.collectionRows=typeof s.itemList=="string"?JSON.parse(s.itemList):s.itemList}catch(i){console.error(`Failed to parse itemList for collection ${n}:`,i),s.collectionRows={rows:[]}}let o=`${s.name}$${n}`;s.parentId&&(o=`${o}@${s.parentId}`),t[o]=s}),t}function Jf(e){return typeof e.itemList=="string"?JSON.parse(e.itemList):e.itemList}function Gr(e){const t=Yn(e.fontFaces),n=Qi(e.keyframes),r=ll(e.themes),s=rl(e.cssProperties),o=cl(e.widgetChrome),i=tl(e.positionTry),l=qf(e.includeClassLayer)&&Xi(e.classLayer)?e.classLayer:void 0;return{displayItemList:Jf(e.widget),widgetCollections:Zf(e.childCollections),...e.libraries?{libraries:e.libraries}:{},...sl(e.includeCssVariables)&&e.cssVariables&&Object.keys(e.cssVariables).length>0?{cssVariables:e.cssVariables}:{},...Gi(e.includeClassDefinitions)&&e.classDefinitions&&Object.keys(e.classDefinitions).length>0?{classDefinitions:e.classDefinitions}:{},...Yr(e.includeFontFaces)&&t.length>0?{fontFaces:t}:{},...Zi(e.includeKeyframes)&&Object.keys(n).length>0?{keyframes:n}:{},...il(e.includeThemes)&&r.length>0?{themes:r}:{},...nl(e.includeCssProperties)&&s.length>0?{cssProperties:s}:{},...al(e.includeWidgetChrome)&&o?{widgetChrome:o}:{},...l?{classLayer:l}:{},...$i(e.includePositionTry)&&Object.keys(i).length>0?{positionTry:i}:{}}}function Qf(e){const t=e.registry??dn(),n=jn({displayItemList:e.displayItemList,widgetCollections:e.widgetCollections});return t.resolveSync({registrations:e.libraries,referenced:n})}function $f(e){const t=e.registry??dn(),n=jn({displayItemList:e.displayItemList,widgetCollections:e.widgetCollections});return t.resolve({registrations:e.libraries,referenced:n})}const ed={display:"flex",justifyContent:"center",alignItems:"center",padding:"3rem",color:"#e2e8f0"},td={display:"flex",alignItems:"center",gap:"1rem"},nd={width:"40px",height:"40px",border:"4px solid #4a5568",borderTopColor:"#63b3ed",borderRadius:"50%",animation:"spin 1s linear infinite"},hs={padding:"1.5rem",backgroundColor:"#742a2a",border:"1px solid #9b2c2c",borderRadius:"8px",color:"#fed7d7"},gs={fontSize:"16px",fontWeight:"600",marginBottom:"0.5rem",color:"#feb2b2"},ys={fontSize:"14px",color:"#fed7d7"},rd=`
|
|
19
64
|
@keyframes spin {
|
|
20
65
|
from {
|
|
21
66
|
transform: rotate(0deg);
|
|
@@ -24,4 +69,4 @@ ${o}
|
|
|
24
69
|
transform: rotate(360deg);
|
|
25
70
|
}
|
|
26
71
|
}
|
|
27
|
-
`,fc="data-rulecms-published-key";var dc=me("<div><div><div></div></div></div>"),pc=me("<div><div>Error Loading Widget</div> <div> </div></div>"),hc=me("<div><div>No Widget Data</div> <div>No widget data available</div></div>"),gc=me('<span style="display: contents"><!> <!> <!></span>');function vc(e,t){Ie(t,!0);let n=de(t,"mode",3,"client-fetch");const r=tr.getContext(xr);let i=ae(!1),o=ae(null),s=ae(null),l=ae(null);const a=T(()=>n()==="pre-fetched"),u=T(()=>({sourceComponents:p(l)??void 0}));let f=null,h=null,c=!1;function d(){if(!p(s)){M(l,null);return}const A=t.libraries??(r==null?void 0:r.libraries),P=r==null?void 0:r.libraryRegistry,F=oc({displayItemList:p(s).displayItemList,widgetCollections:p(s).widgetCollections,libraries:A,registry:P});if(F){M(l,F,!0);return}sc({displayItemList:p(s).displayItemList,widgetCollections:p(s).widgetCollections,libraries:A,registry:P}).then(X=>{M(l,X,!0)})}function y(){p(s)&&Rs({componentProps:t.componentProps,displayItemList:p(s).displayItemList,widgetCollections:p(s).widgetCollections,publishedKey:t.publishedKey})}function m(){if(c||typeof document>"u")return;const A="rulecms-widget-spinner-styles";if(!document.getElementById(A)){const P=document.createElement("style");P.id=A,P.textContent=cc,document.head.appendChild(P)}c=!0}function g(){const A=t.token??(r==null?void 0:r.token),P=t.endpoint??(r==null?void 0:r.endpoint);if(!t.publishedKey||!A){M(o,t.publishedKey?"Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider.":ot(A)?"Widget key is required":"Published key is required",!0),M(s,null);return}const F=`${t.publishedKey}|${A}`;if(h===F&&p(s)){d();return}f==null||f.abort(),f=new AbortController;const X=f.signal;h=F,M(i,!0),M(o,null);const J=kr({publishedKey:t.publishedKey,token:A,endpoint:P});fetch(J,{method:"GET",headers:{"Content-Type":"application/json"},...ot(A)?{cache:"no-store"}:{},signal:X}).then(async x=>{if(x.ok){const Q=await x.json();Q.success?(M(s,jr(Q.data),!0),M(o,null),d(),y()):(M(o,"Failed to fetch widget data"),M(s,null))}else{const Q=await x.json().catch(()=>({error:"Unknown error"}));M(o,Q.error||`Request failed with status ${x.status}`,!0),M(s,null)}}).catch(x=>{x instanceof DOMException&&x.name==="AbortError"||(console.error("Error fetching widget:",x),M(o,"Failed to fetch widget"),M(s,null))}).finally(()=>{M(i,!1)})}function _(){if(n()==="pre-fetched"){M(s,t.initialData??null,!0),M(i,!1),M(o,null),d(),y();return}m(),g()}Cr(()=>(t.publishedKey,t.token,t.endpoint,n(),t.initialData,t.libraries,t.componentProps,tr.untrack(()=>_()),()=>{f==null||f.abort()}));var S=gc(),C=ue(S);{let A=T(()=>{var P;return(P=p(s))==null?void 0:P.cssVariables});nc(C,{get publishedKey(){return t.publishedKey},get variables(){return p(A)}})}var b=We(C,2);{let A=T(()=>{var P;return(P=p(s))==null?void 0:P.classDefinitions});Ju(b,{get publishedKey(){return t.publishedKey},get classes(){return p(A)}})}var w=We(b,2);{var D=A=>{var P=dc(),F=ue(P),X=ue(F);$((J,x,Q)=>{ee(P,J),ee(F,x),ee(X,Q)},[()=>te(lc),()=>te(ac),()=>te(uc)]),k(A,P)},E=A=>{var P=pc(),F=ue(P),X=We(F,2),J=ue(X);$((x,Q,at)=>{ee(P,x),ee(F,Q),ee(X,at),Dt(J,p(o))},[()=>te(ai),()=>te(ui),()=>te(ci)]),k(A,P)},I=A=>{var P=hc(),F=ue(P),X=We(F,2);$((J,x,Q)=>{ee(P,J),ee(F,x),ee(X,Q)},[()=>te(ai),()=>te(ui),()=>te(ci)]),k(A,P)},W=A=>{var P=Y(),F=B(P);{var X=x=>{Vs(x,{get displayItemList(){return p(s).displayItemList},get widgetCollections(){return p(s).widgetCollections},get plugins(){return p(u)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},J=x=>{js(x,{get displayItemList(){return p(s).displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return p(s).widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get plugins(){return p(u)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})};ce(F,x=>{p(a)?x(X):x(J,-1)})}k(A,P)};ce(w,A=>{n()!=="pre-fetched"&&p(i)?A(D):n()!=="pre-fetched"&&p(o)?A(E,1):n()!=="pre-fetched"&&!p(s)?A(I,2):p(l)&&p(s)&&A(W,3)})}$(()=>nt(S,"data-rulecms-published-key",t.publishedKey)),k(e,S),De()}class Ft extends Error{constructor(n,r){super(n);be(this,"status");this.name="FetchRuleCMSWidgetError",this.status=r}}async function yc(e){const{publishedKey:t,token:n,endpoint:r,fetchOptions:i}=e;if(!t)throw new Ft(ot(n)?"Widget key is required":"Published key is required");if(!n)throw new Ft("Token is required");const o=kr({publishedKey:t,token:n,endpoint:r}),s=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json"},...ot(n)?{cache:"no-store"}:{},...i});if(!s.ok){const a=await s.json().catch(()=>({error:"Unknown error"}));throw new Ft(a.error||`Request failed with status ${s.status}`,s.status)}const l=await s.json();if(!l.success)throw new Ft("Failed to fetch widget data");return jr(l.data)}async function mc(e){const{data:t,libraries:n}=e,r=Rn({displayItemList:t.displayItemList,widgetCollections:t.widgetCollections});return ln().resolve({registrations:n,referenced:r})}exports.AlignContentTypes=xa;exports.BreakpointVariantRender=Vs;exports.COLLECTION_TYPE_PREFIX=Pr;exports.COMPONENT_PROPS_PATH_SEPARATOR=Bn;exports.CSS_CLASSES_ATTRIBUTE_NAME=Fn;exports.CSS_VARIABLE_NAME_MAX_LENGTH=To;exports.CSS_VARIABLE_NAME_PATTERN=So;exports.DEFAULT_BASE_Z_INDEX=Vr;exports.DEFAULT_CLOUDINARY_CLOUD_NAME=_o;exports.DEFAULT_LIBRARY_ID=Pt;exports.DEFAULT_ROW_GAP=gs;exports.DEV_CLIENT_TOKEN_PREFIX=io;exports.DEV_WIDGET_API_PATH=ao;exports.DeviceDisplayTypes=Na;exports.DisplayComponent=Ws;exports.DisplayItemTypes=Ln;exports.DragItemIdPrefixTypes=Dr;exports.EMBEDDED_KEY_SEPARATOR=vo;exports.FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY=Yo;exports.FetchRuleCMSWidgetError=Ft;exports.HIDE_WIDGET_ATTRIBUTE_NAME=Mr;exports.JustifyContentTypes=lr;exports.POINTER_EVENTS_ATTRIBUTE_NAME=_s;exports.PUBLISHED_KEY_SEPARATOR=go;exports.PUBLISHED_WIDGET_API_PATH=lo;exports.PageViewTypes=Ra;exports.RULECMS_API_ORIGIN=oo;exports.RULECMS_PUBLISHED_KEY_ATTRIBUTE=fc;exports.RULECMS_WIDGET_CONTEXT_KEY=xr;exports.RenderComponents=js;exports.RenderComponentsForDevice=Tn;exports.RenderComponentsInner=Sn;exports.RuleCMSWidget=vc;exports.RuleCMSWidgetProvider=Ka;exports.WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE=bs;exports.WIDGET_CACHE_API_ORIGIN=so;exports.Z_INDEX_WIDGET_ATTRIBUTE_NAME=Cs;exports.alignContentAllowlist=Uo;exports.alignItemsAllowlist=jo;exports.backgroundPositionAllowlist=Go;exports.backgroundRepeatAllowlist=zo;exports.backgroundSizeAllowlist=Ho;exports.borderStyleKeywords=qo;exports.boxSpacingSideKeys=Po;exports.boxSpacingStyleAttributeEntries=uu;exports.buildCloudinaryBackgroundUrl=Eo;exports.buildOverlayLayerBoxStyles=Ds;exports.buildOverlayStackStyles=Is;exports.buildWidgetFetchUrl=kr;exports.collectComponentInstancePaths=ks;exports.collectReferencedLibraryIds=Rn;exports.composeSourceComponentsPlugin=ro;exports.createComponentLibraryRegistry=ln;exports.cssAttrArrayKey=En;exports.defaultPageWidth=mo;exports.deriveDisplayFlexIfNeeded=fs;exports.desktopModeWidth=Ha;exports.fetchRuleCMSWidget=yc;exports.findUnmatchedComponentPropsKeys=Ls;exports.flexDirectionAllowlist=Ko;exports.flexWrapAllowlist=Bo;exports.fontFamilyAllowlist=Ro;exports.fontStyleAllowlist=No;exports.fontWeightAllowlist=xo;exports.formatBackgroundImageStyles=ts;exports.formatBorderStyles=ns;exports.formatBoxShadowStyles=rs;exports.formatBoxSpacingStyles=is;exports.formatCssColorStyles=os;exports.formatCssColorValue=Mn;exports.formatCssEnumStyles=ss;exports.formatCssLengthStyles=ls;exports.formatCssVariable=Te;exports.formatCssVariableStyles=ru;exports.formatLineHeightStyles=as;exports.formatObjectStyleAttribute=cs;exports.formatOpacityStyles=us;exports.formatSpacingSideValue=lt;exports.generatePublishedKey=yo;exports.generatePublishedKeyForEmbedded=ja;exports.getCollectionIdForCollectionType=Rr;exports.getColumnAttributes=Ut;exports.getComponentAttributesAndStyles=ar;exports.getComponentsPluginFromPlugins=hn;exports.getCssVariableFromLeaf=G;exports.getDefaultDimensionAttributes=ds;exports.getDeviceTypeBasedAttributes=Fe;exports.getDragItemId=Oa;exports.getDragItemPrefixAndId=co;exports.getIdAndPrefix=fo;exports.getMergedAttributes=ps;exports.getNameAndInstanceIdFromWidgetKey=Ma;exports.getNameFromWidgetKey=Wa;exports.getOverlayLayerZIndex=Es;exports.getWidgetKeyForCollection=po;exports.getWidgetKeyForCollectionWithPrefix=Fa;exports.getWidgetKeyForPublishedCollection=ho;exports.getWidgetKeyForPublishedCollectionWithPrefix=Va;exports.hasBoxShadowLeaf=Qo;exports.hasDeviceDivergentValues=xs;exports.hasInvalidCssVariable=Ne;exports.hasItems=hs;exports.hasOverlayLayers=As;exports.incrementVersion=Ba;exports.isBackgroundImageValue=Io;exports.isBorderStyleValue=Xo;exports.isBorderValue=Zo;exports.isBoxShadowValue=Jo;exports.isBoxSpacingValue=ko;exports.isCloudinaryCloudName=wo;exports.isCloudinaryPublicId=bo;exports.isCloudinaryTransformationString=Ao;exports.isCssColorValue=On;exports.isCssEnumValue=Lo;exports.isCssVariableName=xn;exports.isDevClientToken=ot;exports.isLineHeightValue=$o;exports.isOpacityValue=es;exports.isOverlayLayerEmptyForDevice=Ts;exports.isRowHiddenForDevice=ys;exports.isSafeImageUrl=Co;exports.isSpacingSideValue=st;exports.isWidgetHiddenForDevice=jn;exports.justifyContentAllowlist=Vo;exports.normalizeCssClasses=Vn;exports.objectStyleAttributeRegistry=Wn;exports.overflowAllowlist=pn;exports.phoneModeWidth=Nr;exports.pointerEventsAllowlist=Fo;exports.prepareRuleCMSWidgetData=jr;exports.resolveBaseZIndex=ur;exports.resolveKey=Ir;exports.resolveOverlayLayerPointerEvents=Ss;exports.resolveRowStyles=ms;exports.resolveWidgetApiOrigin=uo;exports.resolveWidgetContainerStyles=Wr;exports.resolveWidgetInstanceProps=Ps;exports.resolveWidgetLibraries=mc;exports.rowBasedPropertiesAreAssigned=vs;exports.spacingKeywords=Nn;exports.spacingLengthUnits=Do;exports.tabletModeWidth=Or;exports.textAlignAllowlist=Oo;exports.textDecorationAllowlist=Mo;exports.textTransformAllowlist=Wo;exports.toStyleAttr=te;exports.typeHasPrefix=Lr;exports.warnUnmatchedComponentProps=Rs;exports.widgetBasedPropertiesAreAssigned=ws;exports.widgetDeclaresOwnHeight=Fr;
|
|
72
|
+
`,sd="data-rulecms-published-key";var od=fe("<div><div><div></div></div></div>"),id=fe("<div><div>Error Loading Widget</div> <div> </div></div>"),ld=fe("<div><div>No Widget Data</div> <div>No widget data available</div></div>"),ad=fe('<span style="display: contents"><!> <!> <!> <!> <!> <!> <!> <!> <!></span>');function cd(e,t){ee(t,!0);let n=_e(t,"mode",3,"client-fetch");const r=lr.getContext(Fr);let s=ye(!1),o=ye(null),i=ye(null),l=ye(null);const a=w(()=>n()==="pre-fetched"),c=w(()=>({sourceComponents:d(l)??void 0}));let u=null,p=null,f=!1;function h(){if(!d(i)){V(l,null);return}const D=t.libraries??(r==null?void 0:r.libraries),I=r==null?void 0:r.libraryRegistry,F=Qf({displayItemList:d(i).displayItemList,widgetCollections:d(i).widgetCollections,libraries:D,registry:I});if(F){V(l,F,!0);return}$f({displayItemList:d(i).displayItemList,widgetCollections:d(i).widgetCollections,libraries:D,registry:I}).then(B=>{V(l,B,!0)})}function y(){d(i)&&Wi({componentProps:t.componentProps,displayItemList:d(i).displayItemList,widgetCollections:d(i).widgetCollections,publishedKey:t.publishedKey})}function v(){if(f||typeof document>"u")return;const D="rulecms-widget-spinner-styles";if(!document.getElementById(D)){const I=document.createElement("style");I.id=D,I.textContent=rd,document.head.appendChild(I)}f=!0}function g(){const D=t.token??(r==null?void 0:r.token),I=t.endpoint??(r==null?void 0:r.endpoint);if(!t.publishedKey||!D){V(o,t.publishedKey?"Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider.":pt(D)?"Widget key is required":"Published key is required",!0),V(i,null);return}const F=`${t.publishedKey}|${D}`;if(p===F&&d(i)){h();return}u==null||u.abort(),u=new AbortController;const B=u.signal;p=F,V(s,!0),V(o,null);const ne=Mr({publishedKey:t.publishedKey,token:D,endpoint:I});fetch(ne,{method:"GET",headers:{"Content-Type":"application/json"},...pt(D)?{cache:"no-store"}:{},signal:B}).then(async K=>{if(K.ok){const pe=await K.json();pe.success?(V(i,Gr(pe.data),!0),V(o,null),h(),y()):(V(o,"Failed to fetch widget data"),V(i,null))}else{const pe=await K.json().catch(()=>({error:"Unknown error"}));V(o,pe.error||`Request failed with status ${K.status}`,!0),V(i,null)}}).catch(K=>{K instanceof DOMException&&K.name==="AbortError"||(console.error("Error fetching widget:",K),V(o,"Failed to fetch widget"),V(i,null))}).finally(()=>{V(s,!1)})}function _(){if(n()==="pre-fetched"){V(i,t.initialData??null,!0),V(s,!1),V(o,null),h(),y();return}v(),g()}Dr(()=>(t.publishedKey,t.token,t.endpoint,n(),t.initialData,t.libraries,t.componentProps,lr.untrack(()=>_()),()=>{u==null||u.abort()}));var S=ad(),A=me(S);{let D=w(()=>{var I;return(I=d(i))==null?void 0:I.fontFaces});Hu(A,{get publishedKey(){return t.publishedKey},get fonts(){return d(D)}})}var b=re(A,2);{let D=w(()=>{var I;return(I=d(i))==null?void 0:I.keyframes});rf(b,{get publishedKey(){return t.publishedKey},get keyframes(){return d(D)}})}var C=re(b,2);{let D=w(()=>{var I;return(I=d(i))==null?void 0:I.themes});Ff(C,{get publishedKey(){return t.publishedKey},get themes(){return d(D)}})}var k=re(C,2);{let D=w(()=>{var I;return(I=d(i))==null?void 0:I.cssProperties});Sf(k,{get publishedKey(){return t.publishedKey},get cssProperties(){return d(D)}})}var T=re(k,2);{let D=w(()=>{var I;return(I=d(i))==null?void 0:I.widgetChrome});Xf(T,{get publishedKey(){return t.publishedKey},get widgetChrome(){return d(D)}})}var P=re(T,2);{let D=w(()=>{var I;return(I=d(i))==null?void 0:I.positionTry});gf(P,{get publishedKey(){return t.publishedKey},get positionTry(){return d(D)}})}var W=re(P,2);{let D=w(()=>{var I;return(I=d(i))==null?void 0:I.cssVariables});Vf(W,{get publishedKey(){return t.publishedKey},get variables(){return d(D)}})}var x=re(W,2);{let D=w(()=>{var F;return(F=d(i))==null?void 0:F.classDefinitions}),I=w(()=>{var F;return(F=d(i))==null?void 0:F.classLayer});wu(x,{get publishedKey(){return t.publishedKey},get classes(){return d(D)},get classLayer(){return d(I)}})}var se=re(x,2);{var Be=D=>{var I=od(),F=me(I),B=me(F);H((ne,K,pe)=>{oe(I,ne),oe(F,K),oe(B,pe)},[()=>ie(ed),()=>ie(td),()=>ie(nd)]),E(D,I)},mt=D=>{var I=id(),F=me(I),B=re(F,2),ne=me(B);H((K,pe,Gn)=>{oe(I,K),oe(F,pe),oe(B,Gn),Se(ne,d(o))},[()=>ie(hs),()=>ie(gs),()=>ie(ys)]),E(D,I)},Ye=D=>{var I=ld(),F=me(I),B=re(F,2);H((ne,K,pe)=>{oe(I,ne),oe(F,K),oe(B,pe)},[()=>ie(hs),()=>ie(gs),()=>ie(ys)]),E(D,I)},de=D=>{var I=M(),F=R(I);{var B=K=>{zi(K,{get displayItemList(){return d(i).displayItemList},get widgetCollections(){return d(i).widgetCollections},get plugins(){return d(c)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})},ne=K=>{Yi(K,{get displayItemList(){return d(i).displayItemList},isComposeMode:!1,isWithinCollection:!1,get widgetCollections(){return d(i).widgetCollections},showDropContainers:!1,reduxDeviceDisplayType:"desktop",get plugins(){return d(c)},get componentProps(){return t.componentProps},get mounts(){return t.mounts}})};q(F,K=>{d(a)?K(B):K(ne,-1)})}E(D,I)};q(se,D=>{n()!=="pre-fetched"&&d(s)?D(Be):n()!=="pre-fetched"&&d(o)?D(mt,1):n()!=="pre-fetched"&&!d(i)?D(Ye,2):d(l)&&d(i)&&D(de,3)})}H(()=>Qe(S,"data-rulecms-published-key",t.publishedKey)),E(e,S),te()}class zt extends Error{constructor(n,r){super(n);Te(this,"status");this.name="FetchRuleCMSWidgetError",this.status=r}}async function ud(e){const{publishedKey:t,token:n,endpoint:r,fetchOptions:s}=e;if(!t)throw new zt(pt(n)?"Widget key is required":"Published key is required");if(!n)throw new zt("Token is required");const o=Mr({publishedKey:t,token:n,endpoint:r}),i=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json"},...pt(n)?{cache:"no-store"}:{},...s});if(!i.ok){const a=await i.json().catch(()=>({error:"Unknown error"}));throw new zt(a.error||`Request failed with status ${i.status}`,i.status)}const l=await i.json();if(!l.success)throw new zt("Failed to fetch widget data");return Gr(l.data)}async function fd(e){const{data:t,libraries:n}=e,r=jn({displayItemList:t.displayItemList,widgetCollections:t.widgetCollections});return dn().resolve({registrations:n,referenced:r})}exports.AlignContentTypes=ec;exports.BreakpointVariantRender=zi;exports.COLLECTION_TYPE_PREFIX=Nr;exports.COMPONENT_PROPS_PATH_SEPARATOR=zn;exports.CSS_CLASSES_ATTRIBUTE_NAME=Kn;exports.CSS_VARIABLE_NAME_MAX_LENGTH=Oo;exports.CSS_VARIABLE_NAME_PATTERN=Lo;exports.DEFAULT_BASE_Z_INDEX=zr;exports.DEFAULT_CLOUDINARY_CLOUD_NAME=So;exports.DEFAULT_LIBRARY_ID=Mt;exports.DEFAULT_ROW_GAP=Ci;exports.DEV_CLIENT_TOKEN_PREFIX=uo;exports.DEV_WIDGET_API_PATH=go;exports.DeviceDisplayTypes=tc;exports.DisplayComponent=Ui;exports.DisplayItemTypes=Mn;exports.DragItemIdPrefixTypes=xr;exports.EMBEDDED_KEY_SEPARATOR=wo;exports.FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY=$o;exports.FetchRuleCMSWidgetError=zt;exports.HIDE_WIDGET_ATTRIBUTE_NAME=Kr;exports.JustifyContentTypes=pr;exports.POINTER_EVENTS_ATTRIBUTE_NAME=Si;exports.PUBLISHED_KEY_SEPARATOR=Co;exports.PUBLISHED_WIDGET_API_PATH=ho;exports.PageViewTypes=$a;exports.RULECMS_API_ORIGIN=fo;exports.RULECMS_PUBLISHED_KEY_ATTRIBUTE=sd;exports.RULECMS_WIDGET_CONTEXT_KEY=Fr;exports.RenderComponents=Yi;exports.RenderComponentsForDevice=Ln;exports.RenderComponentsInner=kn;exports.RuleCMSWidget=cd;exports.RuleCMSWidgetProvider=uc;exports.WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE=Ti;exports.WIDGET_CACHE_API_ORIGIN=po;exports.Z_INDEX_WIDGET_ATTRIBUTE_NAME=Pi;exports.alignContentAllowlist=Xo;exports.alignItemsAllowlist=Yo;exports.backgroundPositionAllowlist=Jo;exports.backgroundRepeatAllowlist=Qo;exports.backgroundSizeAllowlist=Zo;exports.borderStyleKeywords=ei;exports.boxSpacingSideKeys=No;exports.boxSpacingStyleAttributeEntries=kc;exports.buildCloudinaryBackgroundUrl=ko;exports.buildOverlayLayerBoxStyles=xi;exports.buildOverlayStackStyles=Ri;exports.buildWidgetFetchUrl=Mr;exports.collectComponentInstancePaths=Mi;exports.collectReferencedLibraryIds=jn;exports.composeSourceComponentsPlugin=co;exports.createComponentLibraryRegistry=dn;exports.cssAttrArrayKey=Dn;exports.defaultPageWidth=Eo;exports.deriveDisplayFlexIfNeeded=mi;exports.desktopModeWidth=fc;exports.fetchRuleCMSWidget=ud;exports.findUnmatchedComponentPropsKeys=ji;exports.flexDirectionAllowlist=qo;exports.flexWrapAllowlist=Go;exports.fontFamilyAllowlist=Wo;exports.fontStyleAllowlist=Vo;exports.fontWeightAllowlist=Fo;exports.formatBackgroundImageStyles=li;exports.formatBorderStyles=ai;exports.formatBoxShadowStyles=ci;exports.formatBoxSpacingStyles=ui;exports.formatCssColorStyles=fi;exports.formatCssColorValue=Vn;exports.formatCssEnumStyles=di;exports.formatCssLengthStyles=pi;exports.formatCssVariable=Oe;exports.formatCssVariableStyles=Ec;exports.formatLineHeightStyles=hi;exports.formatObjectStyleAttribute=yi;exports.formatOpacityStyles=gi;exports.formatSpacingSideValue=gt;exports.generatePublishedKey=Ao;exports.generatePublishedKeyForEmbedded=lc;exports.getCollectionIdForCollectionType=Wr;exports.getColumnAttributes=qt;exports.getComponentAttributesAndStyles=hr;exports.getComponentsPluginFromPlugins=_n;exports.getCssVariableFromLeaf=Z;exports.getDefaultDimensionAttributes=vi;exports.getDeviceTypeBasedAttributes=ze;exports.getDragItemId=nc;exports.getDragItemPrefixAndId=mo;exports.getIdAndPrefix=vo;exports.getMergedAttributes=_i;exports.getNameAndInstanceIdFromWidgetKey=rc;exports.getNameFromWidgetKey=sc;exports.getOverlayLayerZIndex=ki;exports.getWidgetKeyForCollection=_o;exports.getWidgetKeyForCollectionWithPrefix=oc;exports.getWidgetKeyForPublishedCollection=bo;exports.getWidgetKeyForPublishedCollectionWithPrefix=ic;exports.hasBoxShadowLeaf=si;exports.hasDeviceDivergentValues=Fi;exports.hasInvalidCssVariable=Ve;exports.hasItems=bi;exports.hasOverlayLayers=Di;exports.incrementVersion=ac;exports.isBackgroundImageValue=Ro;exports.isBorderStyleValue=ti;exports.isBorderValue=ni;exports.isBoxShadowValue=ri;exports.isBoxSpacingValue=Mo;exports.isCloudinaryCloudName=Io;exports.isCloudinaryPublicId=To;exports.isCloudinaryTransformationString=Do;exports.isCssColorValue=Fn;exports.isCssEnumValue=jo;exports.isCssVariableName=yt;exports.isDevClientToken=pt;exports.isLineHeightValue=oi;exports.isOpacityValue=ii;exports.isOverlayLayerEmptyForDevice=Oi;exports.isRowHiddenForDevice=Ai;exports.isSafeImageUrl=Po;exports.isSpacingSideValue=ht;exports.isWidgetHiddenForDevice=Hn;exports.justifyContentAllowlist=zo;exports.normalizeCssClasses=Un;exports.objectStyleAttributeRegistry=Bn;exports.overflowAllowlist=vn;exports.phoneModeWidth=Vr;exports.pointerEventsAllowlist=Ho;exports.prepareRuleCMSWidgetData=Gr;exports.resolveBaseZIndex=gr;exports.resolveKey=Rr;exports.resolveOverlayLayerPointerEvents=Li;exports.resolveRowStyles=Ei;exports.resolveWidgetApiOrigin=yo;exports.resolveWidgetContainerStyles=Ur;exports.resolveWidgetInstanceProps=Ni;exports.resolveWidgetLibraries=fd;exports.rowBasedPropertiesAreAssigned=wi;exports.spacingKeywords=Wn;exports.spacingLengthUnits=xo;exports.tabletModeWidth=Br;exports.textAlignAllowlist=Bo;exports.textDecorationAllowlist=Ko;exports.textTransformAllowlist=Uo;exports.toStyleAttr=ie;exports.typeHasPrefix=jr;exports.warnUnmatchedComponentProps=Wi;exports.widgetBasedPropertiesAreAssigned=Ii;exports.widgetDeclaresOwnHeight=Hr;
|