@sevn/elections-components 1.0.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/LICENSE +21 -0
- package/README.md +297 -0
- package/dist/index.cjs +603 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +351 -0
- package/dist/index.d.ts +351 -0
- package/dist/index.js +15609 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +38 -0
- package/dist/umd/candidate-by-state.js +98 -0
- package/dist/umd/candidate-carrousel-state-results-viewer.js +108 -0
- package/dist/umd/candidate-counting-progress.js +77 -0
- package/dist/umd/candidate-duel-state-result-viewer.js +91 -0
- package/dist/umd/candidate-map-by-state.js +104 -0
- package/dist/umd/candidate-multi-ring-chart-performance-by-municipality.js +105 -0
- package/dist/umd/candidate-performance-by-municipality.js +105 -0
- package/dist/umd/candidate-ranking.js +59 -0
- package/dist/umd/candidate-results-by-municipality.js +103 -0
- package/dist/umd/counting-progress.js +125 -0
- package/dist/umd/current-leader.js +43 -0
- package/dist/umd/election-round-analysis.js +100 -0
- package/dist/umd/election-status.js +135 -0
- package/dist/umd/final-results.js +141 -0
- package/dist/umd/live-summary.js +36 -0
- package/dist/umd/municipality-perfomance-map.js +82 -0
- package/dist/umd/party-performance.js +99 -0
- package/dist/umd/results-by-office.js +94 -0
- package/dist/umd/round-results-analysis.js +99 -0
- package/dist/umd/state-leaders.js +118 -0
- package/dist/umd/state-winners.js +129 -0
- package/dist/umd/top-dispute.js +43 -0
- package/dist/umd/vote-comparison-by-round.js +76 -0
- package/dist/umd/vote-counting-progress.js +23 -0
- package/dist/umd/voting-map.js +112 -0
- package/package.json +96 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
(function($,re){typeof exports=="object"&&typeof module<"u"?module.exports=re():typeof define=="function"&&define.amd?define(re):($=typeof globalThis<"u"?globalThis:$||self,$.CandidateDuelStateResultViewer=re())})(this,(function(){"use strict";var Xl=Object.defineProperty;var us=$=>{throw TypeError($)};var $l=($,re,ve)=>re in $?Xl($,re,{enumerable:!0,configurable:!0,writable:!0,value:ve}):$[re]=ve;var ht=($,re,ve)=>$l($,typeof re!="symbol"?re+"":re,ve),Ia=($,re,ve)=>re.has($)||us("Cannot "+ve);var f=($,re,ve)=>(Ia($,re,"read from private field"),ve?ve.call($):re.get($)),j=($,re,ve)=>re.has($)?us("Cannot add the same private member more than once"):re instanceof WeakSet?re.add($):re.set($,ve),O=($,re,ve,Xt)=>(Ia($,re,"write to private field"),Xt?Xt.call($,ve):re.set($,ve),ve),be=($,re,ve)=>(Ia($,re,"access private method"),ve);var ur,hr,Wt,pr,Rr,Pr,Zt,xt,_r,Oe,Na,Oa,Fa,hs,nt,Ma,yt,Yt,ct,dt,Fe,vt,zt,Jt,Dt,gr,mr,wr,St,Zr,ge,ec,tc,Ua,Xr,$r,Ha,st,ft,Ue,Qt,Dr,Ir,Yr,fs;class $ extends Error{constructor(){super('Chave de acesso não configurada. Chame Core.applyKey("sua-chave") antes de montar o componente, ou carregue o script com ?cid=sua-chave.'),this.name="SevnKeyMissingError"}}class re extends Error{constructor(e,r){super(`Não foi possível contatar a API para ${e}.`),this.name="SevnNetworkError",this.cause=r}}const ve="__sevnElectionsState_v1__",Xt=globalThis;function Va(t){return Xt[ve]||(Xt[ve]={config:t(),transport:{activeIndex:0,pinnedAt:0}}),Xt[ve]}const ps="https://failover-api.sevntech.com",_s=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Ba(){return{key:null,apiHosts:[],assetsBase:"https://cdn.sevnelections.com/static",assetsVersion:"v1",cache:{storageKey:"election_cache",maxEntries:200},request:{timeoutMs:8e3,retriesPerHost:3,retryDelayMs:300,stickyWindowMs:12e4},theme:null}}const gs=Ba;function $t(){return Va(Ba)}function ms(t){return[`https://${t}-api1.sevnelections.com`,`https://${t}-api2.sevnelections.com`,ps]}function ea(t){if(typeof t!="string"||!_s.test(t))throw new Error(`[sevn] Chave inválida: ${JSON.stringify(t)}. Use apenas letras, números e hífen (a chave vira subdomínio da API).`);const e=$t();e.config.key=t,e.config.apiHosts=ms(t)}function qa(t){const{cache:e,request:r,key:a,...n}=t,s=$t();s.config={...s.config,...n,cache:{...s.config.cache,...e},request:{...s.config.request,...r}},a&&(ea(a),n.apiHosts&&(s.config.apiHosts=n.apiHosts))}function br(){return $t().config}function ja(){return $t().config.apiHosts.length>0}function Ka(){if(!ja())throw new $;return $t().config.apiHosts}function ws(t){const{assetsBase:e,assetsVersion:r}=$t().config,a=e.replace(/\/+$/,""),n=String(t).replace(/^\/+/,"");return`${a}/${r}/${n}`}const bs=':root{--sevn-color-primary: #0a3e27;--sevn-color-secondary: #c38214;--sevn-color-tertiary: #1c1c1c;--sevn-color-red: #da0000;--sevn-color-yellow: #e4a615;--sevn-color-green: #1e6704;--sevn-color-blue: #0e2a41;--sevn-color-neutral: #f2f2f7;--sevn-color-text-secondary: #6b7280}[class^=sevn_],[class*=" sevn_"],[class^=sevn_] *,[class^=sevn_] *:before,[class^=sevn_] *:after,[class*=" sevn_"] *,[class*=" sevn_"] *:before,[class*=" sevn_"] *:after{box-sizing:border-box}[class^=sevn_] *,[class*=" sevn_"] *{margin:0;padding:0}',er=typeof window<"u"&&typeof document<"u",Ga="data-sevn-tokens",Wa="data-sevn-theme",Za={primary:"--sevn-color-primary",secondary:"--sevn-color-secondary",tertiary:"--sevn-color-tertiary",neutral:"--sevn-color-neutral",red:"--sevn-color-red",green:"--sevn-color-green",blue:"--sevn-color-blue",yellow:"--sevn-color-yellow",textSecondary:"--sevn-color-text-secondary"};function xs(){if(!er||document.querySelector(`style[${Ga}]`))return;const t=document.createElement("style");t.setAttribute(Ga,""),t.textContent=bs,document.head.prepend(t);const e=br().theme;e&&ta(e)}function ta(t){if(!er)return;const e=Object.keys(Za).filter(a=>t[a]).map(a=>` ${Za[a]}: ${t[a]};`);if(e.length===0)return;let r=document.querySelector(`style[${Wa}]`);r||(r=document.createElement("style"),r.setAttribute(Wa,""),document.head.appendChild(r)),r.textContent=`:root {
|
|
2
|
+
${e.join(`
|
|
3
|
+
`)}
|
|
4
|
+
}`}function Ya(){return Va(gs).transport}function Ja(t){return new Promise(e=>setTimeout(e,t))}function ys(t,e){const r=AbortSignal.timeout(t);return e&&typeof AbortSignal.any=="function"?AbortSignal.any([e,r]):r}function zs(t,e){const r=new URL(t),a=new URL(e);return r.protocol=a.protocol,r.host=a.host,r.toString()}function Ss(t,e){return Array.from({length:e},(r,a)=>(t+a)%e)}const Cs=async(t,e)=>{const r=typeof t=="string"?t:t instanceof URL?t.toString():t.url,a=Ka(),{timeoutMs:n,retriesPerHost:s,retryDelayMs:i,stickyWindowMs:l}=br().request,d=Ya();d.activeIndex!==0&&Date.now()-d.pinnedAt>=l&&(d.activeIndex=0);let c=null;for(const v of Ss(d.activeIndex,a.length)){const _=zs(r,a[v]);for(let u=0;u<s;u++)try{const m=await fetch(_,{...e,signal:ys(n,e?.signal)});if(m.status>=500){c=new Error(`HTTP ${m.status} em ${a[v]}`),u<s-1&&await Ja(i);continue}return d.activeIndex=v,d.pinnedAt=Date.now(),m}catch(m){c=m,u<s-1&&await Ja(i)}}throw new re(r,c)};function Es(){return br().apiHosts[Ya().activeIndex]??null}const ks={applyKey:ea,configure(t){qa(t),t.theme&&ta(t.theme)},getConfig:br,isReady:ja,assetUrl:ws,setTheme(t){qa({theme:t}),ta(t)},activeHost:Es},ra=!1;var Qa=Array.isArray,As=Array.prototype.indexOf,tr=Array.prototype.includes,Nr=Array.from,Ts=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,Ms=Object.getOwnPropertyDescriptors,Ls=Object.prototype,Rs=Array.prototype,Xa=Object.getPrototypeOf,$a=Object.isExtensible;const Ps=()=>{};function Ds(t){for(var e=0;e<t.length;e++)t[e]()}function en(){var t,e,r=new Promise((a,n)=>{t=a,e=n});return{promise:r,resolve:t,reject:e}}const xe=2,xr=4,Or=8,tn=1<<24,pt=16,Qe=32,It=64,aa=128,Ke=512,_e=1024,ye=2048,Xe=4096,De=8192,_t=16384,Nt=32768,ar=65536,rn=1<<17,an=1<<18,nr=1<<19,Is=1<<20,Et=1<<25,Ot=65536,na=1<<21,sa=1<<22,kt=1<<23,yr=Symbol("$state"),Ns=Symbol("legacy props"),Os=Symbol(""),Ft=new class extends Error{constructor(){super(...arguments);ht(this,"name","StaleReactionError");ht(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Fs(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Us(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Hs(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Vs(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Bs(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qs(t){throw new Error("https://svelte.dev/e/effect_orphan")}function js(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ks(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Gs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ws(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ys(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Js=1,Qs=2,Xs=16,$s=1,ei=4,ti=8,ri=16,ai=1,ni=2,ze=Symbol(),nn="http://www.w3.org/1999/xhtml";function si(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function sn(t){return t===this.v}function ii(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function on(t){return!ii(t,this.v)}let oi=!1,Ie=null;function sr(t){Ie=t}function ir(t,e=!1,r){Ie={p:Ie,i:!1,c:null,e:null,s:t,x:null,l:null}}function or(t){var e=Ie,r=e.e;if(r!==null){e.e=null;for(var a of r)Ln(a)}return e.i=!0,Ie=e.p,{}}function ln(){return!0}let Ut=[];function cn(){var t=Ut;Ut=[],Ds(t)}function At(t){if(Ut.length===0&&!zr){var e=Ut;queueMicrotask(()=>{e===Ut&&cn()})}Ut.push(t)}function li(){for(;Ut.length>0;)cn()}function dn(t){var e=J;if(e===null)return V.f|=kt,t;if((e.f&Nt)===0&&(e.f&xr)===0)throw t;lr(t,e)}function lr(t,e){for(;e!==null;){if((e.f&aa)!==0){if((e.f&Nt)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw t}const ci=-7169;function fe(t,e){t.f=t.f&ci|e}function ia(t){(t.f&Ke)!==0||t.deps===null?fe(t,_e):fe(t,Xe)}function vn(t){if(t!==null)for(const e of t)(e.f&xe)===0||(e.f&Ot)===0||(e.f^=Ot,vn(e.deps))}function fn(t,e,r){(t.f&ye)!==0?e.add(t):(t.f&Xe)!==0&&r.add(t),vn(t.deps),fe(t,_e)}const Fr=new Set;let X=null,oa=null,$e=null,Te=[],Ur=null,la=!1,zr=!1;const Ta=class Ta{constructor(){j(this,Oe);ht(this,"committed",!1);ht(this,"current",new Map);ht(this,"previous",new Map);j(this,ur,new Set);j(this,hr,new Set);j(this,Wt,0);j(this,pr,0);j(this,Rr,null);j(this,Pr,new Set);j(this,Zt,new Set);j(this,xt,new Map);ht(this,"is_fork",!1);j(this,_r,!1)}skip_effect(e){f(this,xt).has(e)||f(this,xt).set(e,{d:[],m:[]})}unskip_effect(e){var r=f(this,xt).get(e);if(r){f(this,xt).delete(e);for(var a of r.d)fe(a,ye),et(a);for(a of r.m)fe(a,Xe),et(a)}}process(e){Te=[],this.apply();var r=[],a=[];for(const n of e)be(this,Oe,Oa).call(this,n,r,a);if(be(this,Oe,Na).call(this)){be(this,Oe,Fa).call(this,a),be(this,Oe,Fa).call(this,r);for(const[n,s]of f(this,xt))gn(n,s)}else{for(const n of f(this,ur))n();f(this,ur).clear(),f(this,Wt)===0&&be(this,Oe,hs).call(this),oa=this,X=null,hn(a),hn(r),oa=null,f(this,Rr)?.resolve()}$e=null}capture(e,r){r!==ze&&!this.previous.has(e)&&this.previous.set(e,r),(e.f&kt)===0&&(this.current.set(e,e.v),$e?.set(e,e.v))}activate(){X=this,this.apply()}deactivate(){X===this&&(X=null,$e=null)}flush(){if(this.activate(),Te.length>0){if(un(),X!==null&&X!==this)return}else f(this,Wt)===0&&this.process([]);this.deactivate()}discard(){for(const e of f(this,hr))e(this);f(this,hr).clear()}increment(e){O(this,Wt,f(this,Wt)+1),e&&O(this,pr,f(this,pr)+1)}decrement(e){O(this,Wt,f(this,Wt)-1),e&&O(this,pr,f(this,pr)-1),!f(this,_r)&&(O(this,_r,!0),At(()=>{O(this,_r,!1),be(this,Oe,Na).call(this)?Te.length>0&&this.flush():this.revive()}))}revive(){for(const e of f(this,Pr))f(this,Zt).delete(e),fe(e,ye),et(e);for(const e of f(this,Zt))fe(e,Xe),et(e);this.flush()}oncommit(e){f(this,ur).add(e)}ondiscard(e){f(this,hr).add(e)}settled(){return(f(this,Rr)??O(this,Rr,en())).promise}static ensure(){if(X===null){const e=X=new Ta;Fr.add(X),zr||At(()=>{X===e&&e.flush()})}return X}apply(){}};ur=new WeakMap,hr=new WeakMap,Wt=new WeakMap,pr=new WeakMap,Rr=new WeakMap,Pr=new WeakMap,Zt=new WeakMap,xt=new WeakMap,_r=new WeakMap,Oe=new WeakSet,Na=function(){return this.is_fork||f(this,pr)>0},Oa=function(e,r,a){e.f^=_e;for(var n=e.first;n!==null;){var s=n.f,i=(s&(Qe|It))!==0,l=i&&(s&_e)!==0,d=l||(s&De)!==0||f(this,xt).has(n);if(!d&&n.fn!==null){i?n.f^=_e:(s&xr)!==0?r.push(n):Er(n)&&((s&pt)!==0&&f(this,Zt).add(n),fr(n));var c=n.first;if(c!==null){n=c;continue}}for(;n!==null;){var v=n.next;if(v!==null){n=v;break}n=n.parent}}},Fa=function(e){for(var r=0;r<e.length;r+=1)fn(e[r],f(this,Pr),f(this,Zt))},hs=function(){var n;if(Fr.size>1){this.previous.clear();var e=$e,r=!0;for(const s of Fr){if(s===this){r=!1;continue}const i=[];for(const[d,c]of this.current){if(s.current.has(d))if(r&&c!==s.current.get(d))s.current.set(d,c);else continue;i.push(d)}if(i.length===0)continue;const l=[...s.current.keys()].filter(d=>!this.current.has(d));if(l.length>0){var a=Te;Te=[];const d=new Set,c=new Map;for(const v of i)pn(v,l,d,c);if(Te.length>0){X=s,s.apply();for(const v of Te)be(n=s,Oe,Oa).call(n,v,[],[]);s.deactivate()}Te=a}}X=null,$e=e}this.committed=!0,Fr.delete(this)};let Tt=Ta;function di(t){var e=zr;zr=!0;try{for(var r;;){if(li(),Te.length===0&&(X?.flush(),Te.length===0))return Ur=null,r;un()}}finally{zr=e}}function un(){la=!0;var t=null;try{for(var e=0;Te.length>0;){var r=Tt.ensure();if(e++>1e3){var a,n;vi()}r.process(Te),Mt.clear()}}finally{Te=[],la=!1,Ur=null}}function vi(){try{js()}catch(t){lr(t,Ur)}}let gt=null;function hn(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var a=t[r++];if((a.f&(_t|De))===0&&Er(a)&&(gt=new Set,fr(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Dn(a),gt?.size>0)){Mt.clear();for(const n of gt){if((n.f&(_t|De))!==0)continue;const s=[n];let i=n.parent;for(;i!==null;)gt.has(i)&&(gt.delete(i),s.push(i)),i=i.parent;for(let l=s.length-1;l>=0;l--){const d=s[l];(d.f&(_t|De))===0&&fr(d)}}gt.clear()}}gt=null}}function pn(t,e,r,a){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const n of t.reactions){const s=n.f;(s&xe)!==0?pn(n,e,r,a):(s&(sa|pt))!==0&&(s&ye)===0&&_n(n,e,a)&&(fe(n,ye),et(n))}}function _n(t,e,r){const a=r.get(t);if(a!==void 0)return a;if(t.deps!==null)for(const n of t.deps){if(tr.call(e,n))return!0;if((n.f&xe)!==0&&_n(n,e,r))return r.set(n,!0),!0}return r.set(t,!1),!1}function et(t){var e=Ur=t,r=e.b;if(r?.is_pending&&(t.f&(xr|Or|tn))!==0&&(t.f&Nt)===0){r.defer_effect(t);return}for(;e.parent!==null;){e=e.parent;var a=e.f;if(la&&e===J&&(a&pt)!==0&&(a&an)===0&&(a&Nt)!==0)return;if((a&(It|Qe))!==0){if((a&_e)===0)return;e.f^=_e}}Te.push(e)}function gn(t,e){if(!((t.f&Qe)!==0&&(t.f&_e)!==0)){(t.f&ye)!==0?e.d.push(t):(t.f&Xe)!==0&&e.m.push(t),fe(t,_e);for(var r=t.first;r!==null;)gn(r,e),r=r.next}}function fi(t){let e=0,r=Ht(0),a;return()=>{fa()&&(o(r),ua(()=>(e===0&&(a=Ar(()=>t(()=>Sr(r)))),e+=1,()=>{At(()=>{e-=1,e===0&&(a?.(),a=void 0,Sr(r))})})))}}var ui=ar|nr;function hi(t,e,r){new pi(t,e,r)}class pi{constructor(e,r,a){j(this,ge);ht(this,"parent");ht(this,"is_pending",!1);j(this,nt);j(this,Ma,null);j(this,yt);j(this,Yt);j(this,ct);j(this,dt,null);j(this,Fe,null);j(this,vt,null);j(this,zt,null);j(this,Jt,0);j(this,Dt,0);j(this,gr,!1);j(this,mr,new Set);j(this,wr,new Set);j(this,St,null);j(this,Zr,fi(()=>(O(this,St,Ht(f(this,Jt))),()=>{O(this,St,null)})));O(this,nt,e),O(this,yt,r),O(this,Yt,n=>{var s=J;s.b=this,s.f|=aa,a(n)}),this.parent=J.b,O(this,ct,ha(()=>{be(this,ge,Ua).call(this)},ui))}defer_effect(e){fn(e,f(this,mr),f(this,wr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,yt).pending}update_pending_count(e){be(this,ge,Ha).call(this,e),O(this,Jt,f(this,Jt)+e),!(!f(this,St)||f(this,gr))&&(O(this,gr,!0),At(()=>{O(this,gr,!1),f(this,St)&&cr(f(this,St),f(this,Jt))}))}get_effect_pending(){return f(this,Zr).call(this),o(f(this,St))}error(e){var r=f(this,yt).onerror;let a=f(this,yt).failed;if(!r&&!a)throw e;f(this,dt)&&(Me(f(this,dt)),O(this,dt,null)),f(this,Fe)&&(Me(f(this,Fe)),O(this,Fe,null)),f(this,vt)&&(Me(f(this,vt)),O(this,vt,null));var n=!1,s=!1;const i=()=>{if(n){si();return}n=!0,s&&Ys(),f(this,vt)!==null&&Bt(f(this,vt),()=>{O(this,vt,null)}),be(this,ge,$r).call(this,()=>{Tt.ensure(),be(this,ge,Ua).call(this)})};At(()=>{try{s=!0,r?.(e,i),s=!1}catch(l){lr(l,f(this,ct)&&f(this,ct).parent)}a&&O(this,vt,be(this,ge,$r).call(this,()=>{Tt.ensure();try{return tt(()=>{var l=J;l.b=this,l.f|=aa,a(f(this,nt),()=>e,()=>i)})}catch(l){return lr(l,f(this,ct).parent),null}}))})}}nt=new WeakMap,Ma=new WeakMap,yt=new WeakMap,Yt=new WeakMap,ct=new WeakMap,dt=new WeakMap,Fe=new WeakMap,vt=new WeakMap,zt=new WeakMap,Jt=new WeakMap,Dt=new WeakMap,gr=new WeakMap,mr=new WeakMap,wr=new WeakMap,St=new WeakMap,Zr=new WeakMap,ge=new WeakSet,ec=function(){try{O(this,dt,tt(()=>f(this,Yt).call(this,f(this,nt))))}catch(e){this.error(e)}},tc=function(){const e=f(this,yt).pending;e&&(this.is_pending=!0,O(this,Fe,tt(()=>e(f(this,nt)))),At(()=>{var r=O(this,zt,document.createDocumentFragment()),a=mt();r.append(a),O(this,dt,be(this,ge,$r).call(this,()=>(Tt.ensure(),tt(()=>f(this,Yt).call(this,a))))),f(this,Dt)===0&&(f(this,nt).before(r),O(this,zt,null),Bt(f(this,Fe),()=>{O(this,Fe,null)}),be(this,ge,Xr).call(this))}))},Ua=function(){try{if(this.is_pending=this.has_pending_snippet(),O(this,Dt,0),O(this,Jt,0),O(this,dt,tt(()=>{f(this,Yt).call(this,f(this,nt))})),f(this,Dt)>0){var e=O(this,zt,document.createDocumentFragment());On(f(this,dt),e);const r=f(this,yt).pending;O(this,Fe,tt(()=>r(f(this,nt))))}else be(this,ge,Xr).call(this)}catch(r){this.error(r)}},Xr=function(){this.is_pending=!1;for(const e of f(this,mr))fe(e,ye),et(e);for(const e of f(this,wr))fe(e,Xe),et(e);f(this,mr).clear(),f(this,wr).clear()},$r=function(e){var r=J,a=V,n=Ie;it(f(this,ct)),Ge(f(this,ct)),sr(f(this,ct).ctx);try{return e()}catch(s){return dn(s),null}finally{it(r),Ge(a),sr(n)}},Ha=function(e){var r;if(!this.has_pending_snippet()){this.parent&&be(r=this.parent,ge,Ha).call(r,e);return}O(this,Dt,f(this,Dt)+e),f(this,Dt)===0&&(be(this,ge,Xr).call(this),f(this,Fe)&&Bt(f(this,Fe),()=>{O(this,Fe,null)}),f(this,zt)&&(f(this,nt).before(f(this,zt)),O(this,zt,null)))};function _i(t,e,r,a){const n=Hr;var s=t.filter(u=>!u.settled);if(r.length===0&&s.length===0){a(e.map(n));return}var i=X,l=J,d=gi(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(u=>u.promise)):null;function v(u){d();try{a(u)}catch(m){(l.f&_t)===0&&lr(m,l)}i?.deactivate(),ca()}if(r.length===0){c.then(()=>v(e.map(n)));return}function _(){d(),Promise.all(r.map(u=>wi(u))).then(u=>v([...e.map(n),...u])).catch(u=>lr(u,l))}c?c.then(_):_()}function gi(){var t=J,e=V,r=Ie,a=X;return function(s=!0){it(t),Ge(e),sr(r),s&&a?.activate()}}function ca(){it(null),Ge(null),sr(null)}function mi(){var t=J.b,e=X,r=t.is_rendered();return t.update_pending_count(1),e.increment(r),()=>{t.update_pending_count(-1),e.decrement(r)}}function Hr(t){var e=xe|ye,r=V!==null&&(V.f&xe)!==0?V:null;return J!==null&&(J.f|=nr),{ctx:Ie,deps:null,effects:null,equals:sn,f:e,fn:t,reactions:null,rv:0,v:ze,wv:0,parent:r??J,ac:null}}function wi(t,e,r){J===null&&Us();var n=void 0,s=Ht(ze),i=!V,l=new Map;return Ri(()=>{var d=en();n=d.promise;try{Promise.resolve(t()).then(d.resolve,d.reject).then(()=>{c===X&&c.committed&&c.deactivate(),ca()})}catch(u){d.reject(u),ca()}var c=X;if(i){var v=mi();l.get(c)?.reject(Ft),l.delete(c),l.set(c,d)}const _=(u,m=void 0)=>{if(c.activate(),m)m!==Ft&&(s.f|=kt,cr(s,m));else{(s.f&kt)!==0&&(s.f^=kt),cr(s,u);for(const[h,A]of l){if(l.delete(h),h===c)break;A.reject(Ft)}}v&&v()};d.promise.then(_,u=>_(null,u||"unknown"))}),Mn(()=>{for(const d of l.values())d.reject(Ft)}),new Promise(d=>{function c(v){function _(){v===n?d(s):c(n)}v.then(_,_)}c(n)})}function H(t){const e=Hr(t);return Un(e),e}function mn(t){const e=Hr(t);return e.equals=on,e}function bi(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Me(e[r])}}function xi(t){for(var e=t.parent;e!==null;){if((e.f&xe)===0)return(e.f&_t)===0?e:null;e=e.parent}return null}function da(t){var e,r=J;it(xi(t));try{t.f&=~Ot,bi(t),e=jn(t)}finally{it(r)}return e}function wn(t){var e=da(t);if(!t.equals(e)&&(t.wv=Bn(),(!X?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){fe(t,_e);return}Lt||($e!==null?(fa()||X?.is_fork)&&$e.set(t,e):ia(t))}function yi(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(Ft),e.teardown=Ps,e.ac=null,kr(e,0),pa(e))}function bn(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&fr(e)}let va=new Set;const Mt=new Map;let xn=!1;function Ht(t,e){var r={f:0,v:t,reactions:null,equals:sn,rv:0,wv:0};return r}function he(t,e){const r=Ht(t);return Un(r),r}function zi(t,e=!1,r=!0){const a=Ht(t);return e||(a.equals=on),a}function K(t,e,r=!1){V!==null&&(!rt||(V.f&rn)!==0)&&ln()&&(V.f&(xe|pt|sa|rn))!==0&&(We===null||!tr.call(We,t))&&Zs();let a=r?Vt(e):e;return cr(t,a)}function cr(t,e){if(!t.equals(e)){var r=t.v;Lt?Mt.set(t,e):Mt.set(t,r),t.v=e;var a=Tt.ensure();if(a.capture(t,r),(t.f&xe)!==0){const n=t;(t.f&ye)!==0&&da(n),ia(n)}t.wv=Bn(),yn(t,ye),J!==null&&(J.f&_e)!==0&&(J.f&(Qe|It))===0&&(Ze===null?Ii([t]):Ze.push(t)),!a.is_fork&&va.size>0&&!xn&&Si()}return e}function Si(){xn=!1;for(const t of va)(t.f&_e)!==0&&fe(t,Xe),Er(t)&&fr(t);va.clear()}function Sr(t){K(t,t.v+1)}function yn(t,e){var r=t.reactions;if(r!==null)for(var a=r.length,n=0;n<a;n++){var s=r[n],i=s.f,l=(i&ye)===0;if(l&&fe(s,e),(i&xe)!==0){var d=s;$e?.delete(d),(i&Ot)===0&&(i&Ke&&(s.f|=Ot),yn(d,Xe))}else l&&((i&pt)!==0&>!==null&>.add(s),et(s))}}function Vt(t){if(typeof t!="object"||t===null||yr in t)return t;const e=Xa(t);if(e!==Ls&&e!==Rs)return t;var r=new Map,a=Qa(t),n=he(0),s=jt,i=l=>{if(jt===s)return l();var d=V,c=jt;Ge(null),Vn(s);var v=l();return Ge(d),Vn(c),v};return a&&r.set("length",he(t.length)),new Proxy(t,{defineProperty(l,d,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Gs();var v=r.get(d);return v===void 0?i(()=>{var _=he(c.value);return r.set(d,_),_}):K(v,c.value,!0),!0},deleteProperty(l,d){var c=r.get(d);if(c===void 0){if(d in l){const v=i(()=>he(ze));r.set(d,v),Sr(n)}}else K(c,ze),Sr(n);return!0},get(l,d,c){if(d===yr)return t;var v=r.get(d),_=d in l;if(v===void 0&&(!_||rr(l,d)?.writable)&&(v=i(()=>{var m=Vt(_?l[d]:ze),h=he(m);return h}),r.set(d,v)),v!==void 0){var u=o(v);return u===ze?void 0:u}return Reflect.get(l,d,c)},getOwnPropertyDescriptor(l,d){var c=Reflect.getOwnPropertyDescriptor(l,d);if(c&&"value"in c){var v=r.get(d);v&&(c.value=o(v))}else if(c===void 0){var _=r.get(d),u=_?.v;if(_!==void 0&&u!==ze)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return c},has(l,d){if(d===yr)return!0;var c=r.get(d),v=c!==void 0&&c.v!==ze||Reflect.has(l,d);if(c!==void 0||J!==null&&(!v||rr(l,d)?.writable)){c===void 0&&(c=i(()=>{var u=v?Vt(l[d]):ze,m=he(u);return m}),r.set(d,c));var _=o(c);if(_===ze)return!1}return v},set(l,d,c,v){var _=r.get(d),u=d in l;if(a&&d==="length")for(var m=c;m<_.v;m+=1){var h=r.get(m+"");h!==void 0?K(h,ze):m in l&&(h=i(()=>he(ze)),r.set(m+"",h))}if(_===void 0)(!u||rr(l,d)?.writable)&&(_=i(()=>he(void 0)),K(_,Vt(c)),r.set(d,_));else{u=_.v!==ze;var A=i(()=>Vt(c));K(_,A)}var E=Reflect.getOwnPropertyDescriptor(l,d);if(E?.set&&E.set.call(v,c),!u){if(a&&typeof d=="string"){var B=r.get("length"),w=Number(d);Number.isInteger(w)&&w>=B.v&&K(B,w+1)}Sr(n)}return!0},ownKeys(l){o(n);var d=Reflect.ownKeys(l).filter(_=>{var u=r.get(_);return u===void 0||u.v!==ze});for(var[c,v]of r)v.v!==ze&&!(c in l)&&d.push(c);return d},setPrototypeOf(){Ws()}})}var zn,Sn,Cn,En;function Ci(){if(zn===void 0){zn=window,Sn=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Cn=rr(e,"firstChild").get,En=rr(e,"nextSibling").get,$a(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),$a(r)&&(r.__t=void 0)}}function mt(t=""){return document.createTextNode(t)}function Vr(t){return Cn.call(t)}function Cr(t){return En.call(t)}function p(t,e){return Vr(t)}function dr(t,e=!1){{var r=Vr(t);return r instanceof Comment&&r.data===""?Cr(r):r}}function g(t,e=1,r=!1){let a=t;for(;e--;)a=Cr(a);return a}function Ei(t){t.textContent=""}function kn(){return!1}function An(t,e,r){return document.createElementNS(nn,t,void 0)}let Tn=!1;function ki(){Tn||(Tn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Br(t){var e=V,r=J;Ge(null),it(null);try{return t()}finally{Ge(e),it(r)}}function Ai(t,e,r,a=r){t.addEventListener(e,()=>Br(r));const n=t.__on_r;n?t.__on_r=()=>{n(),a(!0)}:t.__on_r=()=>a(!0),ki()}function Ti(t){J===null&&(V===null&&qs(),Bs()),Lt&&Vs()}function Mi(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function wt(t,e,r){var a=J;a!==null&&(a.f&De)!==0&&(t|=De);var n={ctx:Ie,deps:null,nodes:null,f:t|ye|Ke,first:null,fn:e,last:null,next:null,parent:a,b:a&&a.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{fr(n)}catch(l){throw Me(n),l}else e!==null&&et(n);var s=n;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&nr)===0&&(s=s.first,(t&pt)!==0&&(t&ar)!==0&&s!==null&&(s.f|=ar)),s!==null&&(s.parent=a,a!==null&&Mi(s,a),V!==null&&(V.f&xe)!==0&&(t&It)===0)){var i=V;(i.effects??(i.effects=[])).push(s)}return n}function fa(){return V!==null&&!rt}function Mn(t){const e=wt(Or,null,!1);return fe(e,_e),e.teardown=t,e}function vr(t){Ti();var e=J.f,r=!V&&(e&Qe)!==0&&(e&Nt)===0;if(r){var a=Ie;(a.e??(a.e=[])).push(t)}else return Ln(t)}function Ln(t){return wt(xr|Is,t,!1)}function Li(t){Tt.ensure();const e=wt(It|nr,t,!0);return(r={})=>new Promise(a=>{r.outro?Bt(e,()=>{Me(e),a(void 0)}):(Me(e),a(void 0))})}function Rn(t){return wt(xr,t,!1)}function Ri(t){return wt(sa|nr,t,!0)}function ua(t,e=0){return wt(Or|e,t,!0)}function k(t,e=[],r=[],a=[]){_i(a,e,r,n=>{wt(Or,()=>t(...n.map(o)),!0)})}function ha(t,e=0){var r=wt(pt|e,t,!0);return r}function tt(t){return wt(Qe|nr,t,!0)}function Pn(t){var e=t.teardown;if(e!==null){const r=Lt,a=V;Fn(!0),Ge(null);try{e.call(null)}finally{Fn(r),Ge(a)}}}function pa(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const n=r.ac;n!==null&&Br(()=>{n.abort(Ft)});var a=r.next;(r.f&It)!==0?r.parent=null:Me(r,e),r=a}}function Pi(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Qe)===0&&Me(e),e=r}}function Me(t,e=!0){var r=!1;(e||(t.f&an)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(Di(t.nodes.start,t.nodes.end),r=!0),pa(t,e&&!r),kr(t,0),fe(t,_t);var a=t.nodes&&t.nodes.t;if(a!==null)for(const s of a)s.stop();Pn(t);var n=t.parent;n!==null&&n.first!==null&&Dn(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function Di(t,e){for(;t!==null;){var r=t===e?null:Cr(t);t.remove(),t=r}}function Dn(t){var e=t.parent,r=t.prev,a=t.next;r!==null&&(r.next=a),a!==null&&(a.prev=r),e!==null&&(e.first===t&&(e.first=a),e.last===t&&(e.last=r))}function Bt(t,e,r=!0){var a=[];In(t,a,!0);var n=()=>{r&&Me(t),e&&e()},s=a.length;if(s>0){var i=()=>--s||n();for(var l of a)l.out(i)}else n()}function In(t,e,r){if((t.f&De)===0){t.f^=De;var a=t.nodes&&t.nodes.t;if(a!==null)for(const l of a)(l.is_global||r)&&e.push(l);for(var n=t.first;n!==null;){var s=n.next,i=(n.f&ar)!==0||(n.f&Qe)!==0&&(t.f&pt)!==0;In(n,e,i?r:!1),n=s}}}function _a(t){Nn(t,!0)}function Nn(t,e){if((t.f&De)!==0){t.f^=De,(t.f&_e)===0&&(fe(t,ye),et(t));for(var r=t.first;r!==null;){var a=r.next,n=(r.f&ar)!==0||(r.f&Qe)!==0;Nn(r,n?e:!1),r=a}var s=t.nodes&&t.nodes.t;if(s!==null)for(const i of s)(i.is_global||e)&&i.in()}}function On(t,e){if(t.nodes)for(var r=t.nodes.start,a=t.nodes.end;r!==null;){var n=r===a?null:Cr(r);e.append(r),r=n}}let qr=!1,Lt=!1;function Fn(t){Lt=t}let V=null,rt=!1;function Ge(t){V=t}let J=null;function it(t){J=t}let We=null;function Un(t){V!==null&&(We===null?We=[t]:We.push(t))}let Le=null,Ne=0,Ze=null;function Ii(t){Ze=t}let Hn=1,qt=0,jt=qt;function Vn(t){jt=t}function Bn(){return++Hn}function Er(t){var e=t.f;if((e&ye)!==0)return!0;if(e&xe&&(t.f&=~Ot),(e&Xe)!==0){for(var r=t.deps,a=r.length,n=0;n<a;n++){var s=r[n];if(Er(s)&&wn(s),s.wv>t.wv)return!0}(e&Ke)!==0&&$e===null&&fe(t,_e)}return!1}function qn(t,e,r=!0){var a=t.reactions;if(a!==null&&!(We!==null&&tr.call(We,t)))for(var n=0;n<a.length;n++){var s=a[n];(s.f&xe)!==0?qn(s,e,!1):e===s&&(r?fe(s,ye):(s.f&_e)!==0&&fe(s,Xe),et(s))}}function jn(t){var A;var e=Le,r=Ne,a=Ze,n=V,s=We,i=Ie,l=rt,d=jt,c=t.f;Le=null,Ne=0,Ze=null,V=(c&(Qe|It))===0?t:null,We=null,sr(t.ctx),rt=!1,jt=++qt,t.ac!==null&&(Br(()=>{t.ac.abort(Ft)}),t.ac=null);try{t.f|=na;var v=t.fn,_=v();t.f|=Nt;var u=t.deps,m=X?.is_fork;if(Le!==null){var h;if(m||kr(t,Ne),u!==null&&Ne>0)for(u.length=Ne+Le.length,h=0;h<Le.length;h++)u[Ne+h]=Le[h];else t.deps=u=Le;if(fa()&&(t.f&Ke)!==0)for(h=Ne;h<u.length;h++)((A=u[h]).reactions??(A.reactions=[])).push(t)}else!m&&u!==null&&Ne<u.length&&(kr(t,Ne),u.length=Ne);if(ln()&&Ze!==null&&!rt&&u!==null&&(t.f&(xe|Xe|ye))===0)for(h=0;h<Ze.length;h++)qn(Ze[h],t);if(n!==null&&n!==t){if(qt++,n.deps!==null)for(let E=0;E<r;E+=1)n.deps[E].rv=qt;if(e!==null)for(const E of e)E.rv=qt;Ze!==null&&(a===null?a=Ze:a.push(...Ze))}return(t.f&kt)!==0&&(t.f^=kt),_}catch(E){return dn(E)}finally{t.f^=na,Le=e,Ne=r,Ze=a,V=n,We=s,sr(i),rt=l,jt=d}}function Ni(t,e){let r=e.reactions;if(r!==null){var a=As.call(r,t);if(a!==-1){var n=r.length-1;n===0?r=e.reactions=null:(r[a]=r[n],r.pop())}}if(r===null&&(e.f&xe)!==0&&(Le===null||!tr.call(Le,e))){var s=e;(s.f&Ke)!==0&&(s.f^=Ke,s.f&=~Ot),ia(s),yi(s),kr(s,0)}}function kr(t,e){var r=t.deps;if(r!==null)for(var a=e;a<r.length;a++)Ni(t,r[a])}function fr(t){var e=t.f;if((e&_t)===0){fe(t,_e);var r=J,a=qr;J=t,qr=!0;try{(e&(pt|tn))!==0?Pi(t):pa(t),Pn(t);var n=jn(t);t.teardown=typeof n=="function"?n:null,t.wv=Hn;var s;ra&&oi&&(t.f&ye)!==0&&t.deps}finally{qr=a,J=r}}}async function Oi(){await Promise.resolve(),di()}function o(t){var e=t.f,r=(e&xe)!==0;if(V!==null&&!rt){var a=J!==null&&(J.f&_t)!==0;if(!a&&(We===null||!tr.call(We,t))){var n=V.deps;if((V.f&na)!==0)t.rv<qt&&(t.rv=qt,Le===null&&n!==null&&n[Ne]===t?Ne++:Le===null?Le=[t]:Le.push(t));else{(V.deps??(V.deps=[])).push(t);var s=t.reactions;s===null?t.reactions=[V]:tr.call(s,V)||s.push(V)}}}if(Lt&&Mt.has(t))return Mt.get(t);if(r){var i=t;if(Lt){var l=i.v;return((i.f&_e)===0&&i.reactions!==null||Gn(i))&&(l=da(i)),Mt.set(i,l),l}var d=(i.f&Ke)===0&&!rt&&V!==null&&(qr||(V.f&Ke)!==0),c=(i.f&Nt)===0;Er(i)&&(d&&(i.f|=Ke),wn(i)),d&&!c&&(bn(i),Kn(i))}if($e?.has(t))return $e.get(t);if((t.f&kt)!==0)throw t.v;return t.v}function Kn(t){if(t.f|=Ke,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),(e.f&xe)!==0&&(e.f&Ke)===0&&(bn(e),Kn(e))}function Gn(t){if(t.v===ze)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Mt.has(e)||(e.f&xe)!==0&&Gn(e))return!0;return!1}function Ar(t){var e=rt;try{return rt=!0,t()}finally{rt=e}}const Fi=["touchstart","touchmove"];function Ui(t){return Fi.includes(t)}const Kt=Symbol("events"),Wn=new Set,ga=new Set;function Hi(t,e,r,a={}){function n(s){if(a.capture||ma.call(e,s),!s.cancelBubble)return Br(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?At(()=>{e.addEventListener(t,n,a)}):e.addEventListener(t,n,a),n}function Vi(t,e,r,a,n){var s={capture:a,passive:n},i=Hi(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Mn(()=>{e.removeEventListener(t,i,s)})}function ot(t,e,r){(e[Kt]??(e[Kt]={}))[t]=r}function Zn(t){for(var e=0;e<t.length;e++)Wn.add(t[e]);for(var r of ga)r(t)}let Yn=null;function ma(t){var e=this,r=e.ownerDocument,a=t.type,n=t.composedPath?.()||[],s=n[0]||t.target;Yn=t;var i=0,l=Yn===t&&t[Kt];if(l){var d=n.indexOf(l);if(d!==-1&&(e===document||e===window)){t[Kt]=e;return}var c=n.indexOf(e);if(c===-1)return;d<=c&&(i=d)}if(s=n[i]||t.target,s!==e){Ts(t,"currentTarget",{configurable:!0,get(){return s||r}});var v=V,_=J;Ge(null),it(null);try{for(var u,m=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var A=s[Kt]?.[a];A!=null&&(!s.disabled||t.target===s)&&A.call(s,t)}catch(E){u?m.push(E):u=E}if(t.cancelBubble||h===e||h===null)break;s=h}if(u){for(let E of m)queueMicrotask(()=>{throw E});throw u}}finally{t[Kt]=e,delete t.currentTarget,Ge(v),it(_)}}}const Bi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function qi(t){return Bi?.createHTML(t)??t}function ji(t,e=!1){var r=An("template");return t=t.replaceAll("<!>","<!---->"),r.innerHTML=e?qi(t):t,r.content}function jr(t,e){var r=J;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function x(t,e){var r=(e&ai)!==0,a=(e&ni)!==0,n,s=!t.startsWith("<!>");return()=>{n===void 0&&(n=ji(s?t:"<!>"+t,!0),r||(n=Vr(n)));var i=a||Sn?document.importNode(n,!0):n.cloneNode(!0);if(r){var l=Vr(i),d=i.lastChild;jr(l,d)}else jr(i,i);return i}}function Kr(t=""){{var e=mt(t+"");return jr(e,e),e}}function Jn(){var t=document.createDocumentFragment(),e=document.createComment(""),r=mt();return t.append(e,r),jr(e,r),t}function b(t,e){t!==null&&t.before(e)}function C(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function Ki(t,e){return Gi(t,e)}const Gr=new Map;function Gi(t,{target:e,anchor:r,props:a={},events:n,context:s,intro:i=!0}){Ci();var l=void 0,d=Li(()=>{var c=r??e.appendChild(mt());hi(c,{pending:()=>{}},u=>{ir({});var m=Ie;s&&(m.c=s),n&&(a.$$events=n),l=t(u,a)||{},or()});var v=new Set,_=u=>{for(var m=0;m<u.length;m++){var h=u[m];if(!v.has(h)){v.add(h);var A=Ui(h);for(const w of[e,document]){var E=Gr.get(w);E===void 0&&(E=new Map,Gr.set(w,E));var B=E.get(h);B===void 0?(w.addEventListener(h,ma,{passive:A}),E.set(h,1)):E.set(h,B+1)}}}};return _(Nr(Wn)),ga.add(_),()=>{for(var u of v)for(const A of[e,document]){var m=Gr.get(A),h=m.get(u);--h==0?(A.removeEventListener(u,ma),m.delete(u),m.size===0&&Gr.delete(A)):m.set(u,h)}ga.delete(_),c!==r&&c.parentNode?.removeChild(c)}});return wa.set(l,d),l}let wa=new WeakMap;function Wi(t,e){const r=wa.get(t);return r?(wa.delete(t),r(e)):Promise.resolve()}class Zi{constructor(e,r=!0){ht(this,"anchor");j(this,st,new Map);j(this,ft,new Map);j(this,Ue,new Map);j(this,Qt,new Set);j(this,Dr,!0);j(this,Ir,()=>{var e=X;if(f(this,st).has(e)){var r=f(this,st).get(e),a=f(this,ft).get(r);if(a)_a(a),f(this,Qt).delete(r);else{var n=f(this,Ue).get(r);n&&(f(this,ft).set(r,n.effect),f(this,Ue).delete(r),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),a=n.effect)}for(const[s,i]of f(this,st)){if(f(this,st).delete(s),s===e)break;const l=f(this,Ue).get(i);l&&(Me(l.effect),f(this,Ue).delete(i))}for(const[s,i]of f(this,ft)){if(s===r||f(this,Qt).has(s))continue;const l=()=>{if(Array.from(f(this,st).values()).includes(s)){var c=document.createDocumentFragment();On(i,c),c.append(mt()),f(this,Ue).set(s,{effect:i,fragment:c})}else Me(i);f(this,Qt).delete(s),f(this,ft).delete(s)};f(this,Dr)||!a?(f(this,Qt).add(s),Bt(i,l,!1)):l()}}});j(this,Yr,e=>{f(this,st).delete(e);const r=Array.from(f(this,st).values());for(const[a,n]of f(this,Ue))r.includes(a)||(Me(n.effect),f(this,Ue).delete(a))});this.anchor=e,O(this,Dr,r)}ensure(e,r){var a=X,n=kn();if(r&&!f(this,ft).has(e)&&!f(this,Ue).has(e))if(n){var s=document.createDocumentFragment(),i=mt();s.append(i),f(this,Ue).set(e,{effect:tt(()=>r(i)),fragment:s})}else f(this,ft).set(e,tt(()=>r(this.anchor)));if(f(this,st).set(a,e),n){for(const[l,d]of f(this,ft))l===e?a.unskip_effect(d):a.skip_effect(d);for(const[l,d]of f(this,Ue))l===e?a.unskip_effect(d.effect):a.skip_effect(d.effect);a.oncommit(f(this,Ir)),a.ondiscard(f(this,Yr))}else f(this,Ir).call(this)}}st=new WeakMap,ft=new WeakMap,Ue=new WeakMap,Qt=new WeakMap,Dr=new WeakMap,Ir=new WeakMap,Yr=new WeakMap;function M(t,e,r=!1){var a=new Zi(t),n=r?ar:0;function s(i,l){a.ensure(i,l)}ha(()=>{var i=!1;e((l,d=0)=>{i=!0,s(d,l)}),i||s(!1,null)},n)}function bt(t,e){return e}function Yi(t,e,r){for(var a=[],n=e.length,s,i=e.length,l=0;l<n;l++){let _=e[l];Bt(_,()=>{if(s){if(s.pending.delete(_),s.done.add(_),s.pending.size===0){var u=t.outrogroups;ba(Nr(s.done)),u.delete(s),u.size===0&&(t.outrogroups=null)}}else i-=1},!1)}if(i===0){var d=a.length===0&&r!==null;if(d){var c=r,v=c.parentNode;Ei(v),v.append(c),t.items.clear()}ba(e,!d)}else s={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(s)}function ba(t,e=!0){for(var r=0;r<t.length;r++)Me(t[r],e)}var Qn;function lt(t,e,r,a,n,s=null){var i=t,l=new Map;{var d=t;i=d.appendChild(mt())}var c=null,v=mn(()=>{var E=r();return Qa(E)?E:E==null?[]:Nr(E)}),_,u=!0;function m(){A.fallback=c,Ji(A,_,i,e,a),c!==null&&(_.length===0?(c.f&Et)===0?_a(c):(c.f^=Et,Mr(c,null,i)):Bt(c,()=>{c=null}))}var h=ha(()=>{_=o(v);for(var E=_.length,B=new Set,w=X,L=kn(),G=0;G<E;G+=1){var de=_[G],Se=a(de,G),ne=u?null:l.get(Se);ne?(ne.v&&cr(ne.v,de),ne.i&&cr(ne.i,G),L&&w.unskip_effect(ne.e)):(ne=Qi(l,u?i:Qn??(Qn=mt()),de,Se,G,n,e,r),u||(ne.e.f|=Et),l.set(Se,ne)),B.add(Se)}if(E===0&&s&&!c&&(u?c=tt(()=>s(i)):(c=tt(()=>s(Qn??(Qn=mt()))),c.f|=Et)),E>B.size&&Hs(),!u)if(L){for(const[Ce,ut]of l)B.has(Ce)||w.skip_effect(ut.e);w.oncommit(m),w.ondiscard(()=>{})}else m();o(v)}),A={effect:h,items:l,outrogroups:null,fallback:c};u=!1}function Tr(t){for(;t!==null&&(t.f&Qe)===0;)t=t.next;return t}function Ji(t,e,r,a,n){var s=e.length,i=t.items,l=Tr(t.effect.first),d,c=null,v=[],_=[],u,m,h,A;for(A=0;A<s;A+=1){if(u=e[A],m=n(u,A),h=i.get(m).e,t.outrogroups!==null)for(const Ce of t.outrogroups)Ce.pending.delete(h),Ce.done.delete(h);if((h.f&Et)!==0)if(h.f^=Et,h===l)Mr(h,null,r);else{var E=c?c.next:l;h===t.effect.last&&(t.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),Rt(t,c,h),Rt(t,h,E),Mr(h,E,r),c=h,v=[],_=[],l=Tr(c.next);continue}if((h.f&De)!==0&&_a(h),h!==l){if(d!==void 0&&d.has(h)){if(v.length<_.length){var B=_[0],w;c=B.prev;var L=v[0],G=v[v.length-1];for(w=0;w<v.length;w+=1)Mr(v[w],B,r);for(w=0;w<_.length;w+=1)d.delete(_[w]);Rt(t,L.prev,G.next),Rt(t,c,L),Rt(t,G,B),l=B,c=G,A-=1,v=[],_=[]}else d.delete(h),Mr(h,l,r),Rt(t,h.prev,h.next),Rt(t,h,c===null?t.effect.first:c.next),Rt(t,c,h),c=h;continue}for(v=[],_=[];l!==null&&l!==h;)(d??(d=new Set)).add(l),_.push(l),l=Tr(l.next);if(l===null)continue}(h.f&Et)===0&&v.push(h),c=h,l=Tr(h.next)}if(t.outrogroups!==null){for(const Ce of t.outrogroups)Ce.pending.size===0&&(ba(Nr(Ce.done)),t.outrogroups?.delete(Ce));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||d!==void 0){var de=[];if(d!==void 0)for(h of d)(h.f&De)===0&&de.push(h);for(;l!==null;)(l.f&De)===0&&l!==t.fallback&&de.push(l),l=Tr(l.next);var Se=de.length;if(Se>0){var ne=s===0?r:null;Yi(t,de,ne)}}}function Qi(t,e,r,a,n,s,i,l){var d=(i&Js)!==0?(i&Xs)===0?zi(r,!1,!1):Ht(r):null,c=(i&Qs)!==0?Ht(n):null;return{v:d,i:c,e:tt(()=>(s(e,d??r,c??n,l),()=>{t.delete(a)}))}}function Mr(t,e,r){if(t.nodes)for(var a=t.nodes.start,n=t.nodes.end,s=e&&(e.f&Et)===0?e.nodes.start:r;a!==null;){var i=Cr(a);if(s.before(a),a===n)return;a=i}}function Rt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function Pt(t,e){Rn(()=>{var r=t.getRootNode(),a=r.host?r:r.head??r.ownerDocument.head;if(!a.querySelector("#"+e.hash)){const n=An("style");n.id=e.hash,n.textContent=e.code,a.appendChild(n)}})}const Xn=[...`
|
|
5
|
+
\r\f \v\uFEFF`];function Xi(t,e,r){var a=t==null?"":""+t;if(e&&(a=a?a+" "+e:e),r){for(var n in r)if(r[n])a=a?a+" "+n:n;else if(a.length)for(var s=n.length,i=0;(i=a.indexOf(n,i))>=0;){var l=i+s;(i===0||Xn.includes(a[i-1]))&&(l===a.length||Xn.includes(a[l]))?a=(i===0?"":a.substring(0,i))+a.substring(l+1):i=l}}return a===""?null:a}function $i(t,e){return t==null?null:String(t)}function at(t,e,r,a,n,s){var i=t.__className;if(i!==r||i===void 0){var l=Xi(r,a,s);l==null?t.removeAttribute("class"):t.className=l,t.__className=r}else if(s&&n!==s)for(var d in s){var c=!!s[d];(n==null||c!==!!n[d])&&t.classList.toggle(d,c)}return s}function ue(t,e,r,a){var n=t.__style;if(n!==e){var s=$i(e);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}return a}const eo=Symbol("is custom element"),to=Symbol("is html");function le(t,e,r,a){var n=ro(t);n[e]!==(n[e]=r)&&(e==="loading"&&(t[Os]=r),r==null?t.removeAttribute(e):typeof r!="string"&&ao(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function ro(t){return t.__attributes??(t.__attributes={[eo]:t.nodeName.includes("-"),[to]:t.namespaceURI===nn})}var $n=new Map;function ao(t){var e=t.getAttribute("is")||t.nodeName,r=$n.get(e);if(r)return r;$n.set(e,r=[]);for(var a,n=t,s=Element.prototype;s!==n;){a=Ms(n);for(var i in a)a[i].set&&r.push(i);n=Xa(n)}return r}function no(t,e,r=e){var a=new WeakSet;Ai(t,"input",async n=>{var s=n?t.defaultValue:t.value;if(s=xa(t)?ya(s):s,r(s),X!==null&&a.add(X),await Oi(),s!==(s=e())){var i=t.selectionStart,l=t.selectionEnd,d=t.value.length;if(t.value=s??"",l!==null){var c=t.value.length;i===l&&l===d&&c>d?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=i,t.selectionEnd=Math.min(l,c))}}}),Ar(e)==null&&t.value&&(r(xa(t)?ya(t.value):t.value),X!==null&&a.add(X)),ua(()=>{var n=e();if(t===document.activeElement){var s=oa??X;if(a.has(s))return}xa(t)&&n===ya(t.value)||t.type==="date"&&!n&&!t.value||n!==t.value&&(t.value=n??"")})}function xa(t){var e=t.type;return e==="number"||e==="range"}function ya(t){return t===""?null:+t}function es(t,e){return t===e||t?.[yr]===e}function za(t={},e,r,a){return Rn(()=>{var n,s;return ua(()=>{n=s,s=[],Ar(()=>{t!==r(...s)&&(e(t,...s),n&&es(r(...n),t)&&e(null,...n))})}),()=>{At(()=>{s&&es(r(...s),t)&&e(null,...s)})}}),t}let Wr=!1;function so(t){var e=Wr;try{return Wr=!1,[t(),Wr]}finally{Wr=e}}function D(t,e,r,a){var n=(r&ti)!==0,s=(r&ri)!==0,i=a,l=!0,d=()=>(l&&(l=!1,i=s?Ar(a):a),i),c;if(n){var v=yr in t||Ns in t;c=rr(t,e)?.set??(v&&e in t?w=>t[e]=w:void 0)}var _,u=!1;n?[_,u]=so(()=>t[e]):_=t[e],_===void 0&&a!==void 0&&(_=d(),c&&(Ks(),c(_)));var m;if(m=()=>{var w=t[e];return w===void 0?d():(l=!0,w)},(r&ei)===0)return m;if(c){var h=t.$$legacy;return(function(w,L){return arguments.length>0?((!L||h||u)&&c(L?m():w),w):m()})}var A=!1,E=((r&$s)!==0?Hr:mn)(()=>(A=!1,m()));n&&o(E);var B=J;return(function(w,L){if(arguments.length>0){const G=L?o(E):n?Vt(w):w;return K(E,G),A=!0,i!==void 0&&(i=G),w}return Lt&&A||(B.f&_t)!==0?E.v:o(E)})}function io(t){Ie===null&&Fs(),vr(()=>{const e=Ar(t);if(typeof e=="function")return e})}function oo(t,e){var r,a;return a=class{constructor(s){j(this,r,null);if(!er)throw new Error(`[sevn] ${e} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:i,...l}=s??{},d=typeof i=="string"?document.querySelector(i):i;if(!d)throw new Error(`[sevn] ${e}: alvo não encontrado`+(typeof i=="string"?` para o seletor "${i}".`:"."));xs(),O(this,r,Ki(t,{target:d,props:l}))}destroy(){if(!f(this,r))return Promise.resolve();const s=f(this,r);return O(this,r,null),Wi(s)}},r=new WeakMap,a}function ts(t){try{return new URL(t,document.baseURI).searchParams.get("cid")}catch{return null}}function lo(){const t=document.currentScript;if(t?.src){const r=ts(t.src);if(r)return r}const e=document.querySelectorAll('script[src*="cid="]');for(const r of e){const a=ts(r.src);if(a)return a}return null}function co(){if(!er)return;const t=lo();if(t)try{ea(t)}catch(e){console.error("[sevn] Chave inválida na tag <script>:",e)}}const vo="5";typeof window<"u"&&((fs=window.__svelte??(window.__svelte={})).v??(fs.v=new Set)).add(vo);const fo="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1538%2031.8937%2034.1538%2036.5625V42.1875H2.84615V36.5625C2.84615%2031.8937%206.66%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.1969%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25ZM25.6154%2011.25C27.1808%2011.25%2028.4615%2012.5156%2028.4615%2014.0625C28.4615%2015.6094%2027.1808%2016.875%2025.6154%2016.875V11.25ZM11.3846%2016.875C9.81923%2016.875%208.53846%2015.6094%208.53846%2014.0625C8.53846%2012.5156%209.81923%2011.25%2011.3846%2011.25V16.875Z'%20fill='%231C1C1C'/%3e%3cpath%20d='M11.7262%2011.5875H10.3031C8.16847%209.84374%208.53847%207.17186%208.53847%204.92186C8.53847%202.67186%209.96154%204.19061%2011.3846%204.19061C12.8077%204.19061%2014.2308%205.59686%2014.2308%205.59686C11.7262%205.59686%2011.3846%202.78436%2011.3846%202.78436H19.9231C23.0539%202.78436%2025.6154%205.31561%2025.6154%208.40936H27.0385C27.0385%208.40936%2027.75%2010.5187%2026.6969%2011.925L11.7546%2011.5875H11.7262Z'%20fill='%231C1C1C'/%3e%3c/g%3e%3c/svg%3e",uo="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1539%2031.8937%2034.1539%2036.5625V42.1875H2.84616V36.5625C2.84616%2031.8937%206.66001%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.197%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25Z'%20fill='black'/%3e%3cpath%20d='M27.0385%2011.0531V9.84375C27.0385%206.75%2024.4769%204.21875%2021.3461%204.21875L19.9231%202.8125H15.6538C12.5231%202.8125%209.96153%205.34375%209.96153%208.4375V11.0531C9.96153%2014.7938%208.45307%2018.3656%205.80615%2021.0094L4.26923%2022.5281L6.37538%2023.5688C8.53846%2024.6375%2011.1285%2024.2156%2012.8077%2022.5281H24.1923C25.9%2024.2156%2028.49%2024.6375%2030.6246%2023.5688L32.7308%2022.5281L31.1938%2021.0094C29.8732%2019.701%2028.8264%2018.1483%2028.1134%2016.4399C27.4004%2014.7316%2027.0351%2012.9011%2027.0385%2011.0531Z'%20fill='black'/%3e%3cpath%20d='M19.9231%202.8125C19.9231%202.8125%2021.3462%202.8125%2021.3462%204.21875H19.9231V2.8125Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e";var ho=x('<span class="avatar-tag svelte-ga6vh2"> </span>'),po=x('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const _o={hash:"svelte-ga6vh2",code:".avatar-container.svelte-ga6vh2 {position:relative;display:inline-flex;flex-direction:column;align-items:center;flex-shrink:0;}.avatar.svelte-ga6vh2 {border-radius:50%;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;}.avatar-image.svelte-ga6vh2 {width:75%;height:auto;display:block;margin-bottom:-6%;}.avatar-image--photo.svelte-ga6vh2 {width:100%;height:100%;margin-bottom:0;object-fit:cover;object-position:center top;}.avatar-tag.svelte-ga6vh2 {position:absolute;bottom:-5px;color:#fff;font-weight:700;letter-spacing:0.05em;border-radius:4px;border:1px solid #fff;white-space:nowrap;}"};function Gt(t,e){Pt(t,_o);let r=D(e,"avatar",3,"man"),a=D(e,"size",3,"md"),n=D(e,"tagColor",3,"var(--sevn-color-green)"),s=he(!1);const i=H(()=>r()==="woman"?uo:fo),l=H(()=>!!e.photoUrl&&!o(s)),d=H(()=>o(l)?e.photoUrl:o(i)),c={sm:"40px",md:"56px",lg:"72px"},v={sm:{fontSize:"9px",padding:"1px 5px"},md:{fontSize:"12px",padding:"2px 8px"},lg:{fontSize:"14px",padding:"3px 10px"}},_=H(()=>c[a()]??a()),u=H(()=>v[a()]??v.md);var m=po(),h=p(m),A=p(h);let E;var B=g(h,2);{var w=L=>{var G=ho(),de=p(G);k(()=>{ue(G,`background-color: ${n()??""}; font-size: ${o(u).fontSize??""}; padding: ${o(u).padding??""};`),C(de,e.tag)}),b(L,G)};M(B,L=>{e.tag&&L(w)})}k(()=>{ue(h,`background-color: ${e.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${o(_)??""}; height: ${o(_)??""};`),E=at(A,1,"avatar-image svelte-ga6vh2",null,E,{"avatar-image--photo":o(l)}),le(A,"src",o(d)),le(A,"alt",e.name)}),Vi("error",A,()=>K(s,!0)),b(t,m)}const go="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M25.9798%2026.872L17.6305%2018.5227C16.9638%2019.0907%2016.1971%2019.5302%2015.3305%2019.8413C14.4638%2020.1524%2013.5927%2020.308%2012.7171%2020.308C10.582%2020.308%208.77493%2019.5689%207.29582%2018.0907C5.8167%2016.6124%205.07715%2014.8058%205.07715%2012.6707C5.07715%2010.5356%205.81581%208.728%207.29315%207.248C8.77048%205.768%2010.5767%205.02711%2012.7118%205.02533C14.8469%205.02356%2016.6549%205.76311%2018.1358%207.244C19.6167%208.72489%2020.3571%2010.5324%2020.3571%2012.6667C20.3571%2013.5929%2020.1931%2014.4893%2019.8651%2015.356C19.5371%2016.2227%2019.106%2016.964%2018.5718%2017.58L26.9211%2025.928L25.9798%2026.872ZM12.7185%2018.9733C14.4874%2018.9733%2015.9807%2018.3644%2017.1985%2017.1467C18.4163%2015.9289%2019.0251%2014.4351%2019.0251%2012.6653C19.0251%2010.8956%2018.4163%209.40222%2017.1985%208.18533C15.9807%206.96844%2014.4874%206.35956%2012.7185%206.35867C10.9496%206.35778%209.45581%206.96667%208.23715%208.18533C7.01848%209.404%206.40959%2010.8973%206.41048%2012.6653C6.41137%2014.4333%207.02026%2015.9267%208.23715%2017.1453C9.45404%2018.364%2010.9474%2018.9729%2012.7171%2018.972'%20fill='%231C1C1C'/%3e%3c/svg%3e",mo="data:image/svg+xml,%3csvg%20width='13'%20height='8'%20viewBox='0%200%2013%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.91%20-0.00016065L12.97%201.06084L7.193%206.83984C7.10043%206.93299%206.99036%207.00692%206.86911%207.05737C6.74786%207.10782%206.61783%207.13379%206.4865%207.13379C6.35517%207.13379%206.22514%207.10782%206.10389%207.05737C5.98264%207.00692%205.87257%206.93299%205.78%206.83984L2.65457e-07%201.06084L1.06%200.000838803L6.485%205.42484L11.91%20-0.00016065Z'%20fill='black'/%3e%3c/svg%3e",rs="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.5%201.5L1.5%2010.5M1.5%201.5L10.5%2010.5'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3c/svg%3e";var wo=x('<span class="mobile-label svelte-1dw55dz"> </span>'),bo=x('<input class="search-input svelte-1dw55dz" type="text"/>'),xo=x('<span class="field-label-prefix svelte-1dw55dz"> </span>'),yo=x('<span class="field-text svelte-1dw55dz"><!> </span>'),zo=x("<span> </span>"),So=x('<button class="icon-clear svelte-1dw55dz" type="button" aria-label="Limpar seleção"><img alt="" aria-hidden="true"/></button>'),Co=x('<img alt="" aria-hidden="true"/>'),Eo=x('<img class="icon-search svelte-1dw55dz" alt="" aria-hidden="true"/>'),ko=x('<span class="meta svelte-1dw55dz"> </span>'),Ao=x('<div class="web-info svelte-1dw55dz"><span class="selected-label svelte-1dw55dz"><strong class="svelte-1dw55dz">Você selecionou:</strong> </span> <!></div>'),To=x('<button type="button" role="option"> </button>'),Mo=x('<div class="no-results svelte-1dw55dz">Nenhum resultado encontrado</div>'),Lo=x('<div class="dropdown svelte-1dw55dz" role="listbox"></div>'),Ro=x('<div><!> <div role="combobox" aria-haspopup="listbox"><!> <!></div> <!> <!></div>');const Po={hash:"svelte-1dw55dz",code:`.autocomplete.svelte-1dw55dz {position:relative;width:var(--field-width);font-family:inherit;}
|
|
6
|
+
|
|
7
|
+
/* ── Label (mobile only) ─────────────────────────────── */.mobile-label.svelte-1dw55dz {display:none;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin-bottom:6px;}
|
|
8
|
+
|
|
9
|
+
@media (max-width: 768px) {.mobile-label.svelte-1dw55dz {display:block;}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* ── Campo principal ─────────────────────────────────── */.field.svelte-1dw55dz {display:flex;align-items:center;width:100%;height:var(--field-height);padding:0 14px;background:var(--sevn-color-neutral);border:1px solid transparent;border-radius:8px;cursor:pointer;gap:8px;transition:border-color 0.15s, box-shadow 0.15s;color:var(--sevn-color-tertiary);}.field.svelte-1dw55dz:hover {border-color:#d1d1d6;}.field.disabled.svelte-1dw55dz {cursor:not-allowed;opacity:0.55;}.field.disabled.svelte-1dw55dz:hover {border-color:transparent;}.field.open.svelte-1dw55dz {border-color:var(--sevn-color-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--sevn-color-primary) 15%, transparent);background:#fff;}
|
|
13
|
+
|
|
14
|
+
/* ── Texto do campo ──────────────────────────────────── */.field-text.svelte-1dw55dz {flex:1;text-align:left;font-size:0.9375rem;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.field-text.is-placeholder.svelte-1dw55dz {color:#9a9aaa;}.field-label-prefix.svelte-1dw55dz {font-weight:600;margin-right:4px;}
|
|
15
|
+
|
|
16
|
+
/* ── Input de busca ──────────────────────────────────── */.search-input.svelte-1dw55dz {flex:1;border:none;outline:none;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);background:transparent;min-width:0;}.search-input.svelte-1dw55dz::placeholder {color:#9a9aaa;}
|
|
17
|
+
|
|
18
|
+
/* ── Ícone de lupa ───────────────────────────────────── */.icon-search.svelte-1dw55dz {flex-shrink:0;}.field.open.svelte-1dw55dz .icon-search:where(.svelte-1dw55dz) {opacity:1;}
|
|
19
|
+
|
|
20
|
+
/* ── Botão de limpar ─────────────────────────────────── */.icon-clear.svelte-1dw55dz {display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.icon-clear.svelte-1dw55dz:hover,
|
|
21
|
+
.icon-clear.svelte-1dw55dz:focus-visible {background:rgba(0, 0, 0, 0.08);}
|
|
22
|
+
|
|
23
|
+
/* ── Ícone de chevron ────────────────────────────────── */.icon-chevron.svelte-1dw55dz {flex-shrink:0;transition:transform 0.2s ease;}.icon-chevron.open.svelte-1dw55dz {transform:rotate(180deg);}
|
|
24
|
+
|
|
25
|
+
/* ── "Você selecionou" (web only) ────────────────────── */.web-info.svelte-1dw55dz {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:20px;font-size:0.8125rem;color:var(--sevn-color-tertiary);}.selected-label.svelte-1dw55dz strong:where(.svelte-1dw55dz) {font-weight:600;}.meta.svelte-1dw55dz {font-size:0.7rem;opacity:50%;}
|
|
26
|
+
|
|
27
|
+
@media (max-width: 768px) {.web-info.svelte-1dw55dz {display:none;}.field-text.svelte-1dw55dz {font-weight:600;}.field-text.is-placeholder.svelte-1dw55dz:not(.force-placeholder) {display:none;}.search-input.svelte-1dw55dz::placeholder {color:transparent;}.show-placeholder-mobile.svelte-1dw55dz .search-input:where(.svelte-1dw55dz)::placeholder {color:#9a9aaa;}.icon-search.svelte-1dw55dz {margin-left:auto;}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ── Dropdown ────────────────────────────────────────── */.dropdown.svelte-1dw55dz {position:absolute;top:calc(var(--field-height) + 6px);left:0;right:0;background:#fff;border:1px solid #d1d1d6;border-radius:8px;max-height:240px;overflow-y:auto;z-index:200;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);scrollbar-width:thin;scrollbar-color:#d1d1d6 transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar {width:4px;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-track {background:transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-thumb {background-color:#d1d1d6;border-radius:4px;}
|
|
31
|
+
|
|
32
|
+
/* ── Opção ───────────────────────────────────────────── */.option.svelte-1dw55dz {display:block;width:100%;padding:11px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);transition:background 0.1s;line-height:1.4;}.option.svelte-1dw55dz:last-child {border-bottom:none;}.option.svelte-1dw55dz:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-1dw55dz {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}.no-results.svelte-1dw55dz {padding:14px;color:#9a9aaa;font-size:0.875rem;text-align:center;}`};function Do(t,e){ir(e,!0),Pt(t,Po);let r=D(e,"label",3,""),a=D(e,"showLabel",3,!0),n=D(e,"options",19,()=>[]),s=D(e,"value",15,null),i=D(e,"meta",3,""),l=D(e,"width",3,"100%"),d=D(e,"height",3,"48px"),c=D(e,"icon",3,go),v=D(e,"iconSize",3,13),_=D(e,"showLabelInField",3,!1),u=D(e,"showDescriptionSelection",3,!0),m=D(e,"labelAsPlaceholder",3,!0),h=D(e,"showPlaceholderOnMobile",3,!1),A=D(e,"disabled",3,!1),E=D(e,"clearable",3,!0);const B=`autocomplete-listbox-${Math.random().toString(36).slice(2,9)}`;let w=he(!1),L=he(""),G=he(null),de=he(null),Se=H(()=>o(L).trim()?n().filter(y=>y.label.toLowerCase().includes(o(L).trim().toLowerCase())):n()),ne=H(()=>s()!=null?n().find(y=>y.value===s())??null:null);function Ce(y){s(y.value),K(L,""),K(w,!1)}function ut(){A()||(K(w,!o(w)),o(w)||K(L,""))}function Q(y){y.stopPropagation(),s(null),K(L,""),K(w,!1)}function se(y){y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),ut())}function Ee(y){o(G)&&!o(G).contains(y.target)&&(K(w,!1),K(L,""))}function T(y){y.key==="Escape"&&(K(w,!1),K(L,""))}vr(()=>{o(w)&&o(de)&&o(de).focus()}),vr(()=>{A()&&(K(w,!1),K(L,""))}),io(()=>(document.addEventListener("mousedown",Ee),()=>document.removeEventListener("mousedown",Ee)));var F=Ro();let z;var q=p(F);{var ae=y=>{var S=wo(),R=p(S);k(()=>C(R,r())),b(y,S)};M(q,y=>{a()&&r()&&y(ae)})}var W=g(q,2);let ee;var oe=p(W);{var ce=y=>{var S=bo();za(S,R=>K(de,R),()=>o(de)),k(()=>le(S,"placeholder",r())),ot("keydown",S,T),ot("click",S,R=>R.stopPropagation()),no(S,()=>o(L),R=>K(L,R)),b(y,S)},ke=y=>{var S=yo(),R=p(S);{var N=te=>{var I=xo(),Z=p(I);k(()=>C(Z,r())),b(te,I)};M(R,te=>{_()&&te(N)})}var Y=g(R,1,!0);k(()=>C(Y,o(ne).label)),b(y,S)},He=y=>{var S=Jn(),R=dr(S);{var N=Y=>{var te=zo();let I;var Z=p(te);k(()=>{I=at(te,1,"field-text is-placeholder svelte-1dw55dz",null,I,{"force-placeholder":h()}),C(Z,r())}),b(Y,te)};M(R,Y=>{m()&&Y(N)})}b(y,S)};M(oe,y=>{o(w)?y(ce):o(ne)?y(ke,1):y(He,!1)})}var Ae=g(oe,2);{var me=y=>{var S=So(),R=p(S);k(()=>{le(R,"src",rs),le(R,"width",v()?v():12),le(R,"height",v()?v():12)}),ot("click",S,Q),b(y,S)},Re=y=>{var S=Co();let R;k(()=>{R=at(S,1,"icon-chevron svelte-1dw55dz",null,R,{open:o(w)}),le(S,"src",mo),le(S,"width",v()?v():12),le(S,"height",v()?v():12)}),b(y,S)},Ve=y=>{var S=Eo();k(()=>{le(S,"src",c()),le(S,"width",v()),le(S,"height",v())}),b(y,S)};M(Ae,y=>{o(ne)&&E()&&!A()?y(me):o(ne)?y(Re,1):y(Ve,!1)})}var Be=g(W,2);{var qe=y=>{var S=Ao(),R=p(S),N=g(p(R)),Y=g(R,2);{var te=I=>{var Z=ko(),pe=p(Z);k(()=>C(pe,i())),b(I,Z)};M(Y,I=>{i()&&I(te)})}k(()=>C(N,` ${o(ne).label??""}`)),b(y,S)};M(Be,y=>{o(ne)&&u()&&y(qe)})}var je=g(Be,2);{var Ye=y=>{var S=Lo();lt(S,21,()=>o(Se),R=>R.value,(R,N)=>{var Y=To();let te;var I=p(Y);k(()=>{te=at(Y,1,"option svelte-1dw55dz",null,te,{selected:o(N).value===s()}),le(Y,"aria-selected",o(N).value===s()),C(I,o(N).label)}),ot("click",Y,()=>Ce(o(N))),b(R,Y)},R=>{var N=Mo();b(R,N)}),k(()=>le(S,"id",B)),b(y,S)};M(je,y=>{o(w)&&y(Ye)})}za(F,y=>K(G,y),()=>o(G)),k(()=>{z=at(F,1,"autocomplete svelte-1dw55dz",null,z,{"show-placeholder-mobile":h()}),ue(F,`--field-width: ${l()??""}; --field-height: ${d()??""}`),ee=at(W,1,"field svelte-1dw55dz",null,ee,{open:o(w),"has-value":o(ne)&&!o(w),disabled:A()}),le(W,"tabindex",A()?-1:0),le(W,"aria-controls",B),le(W,"aria-expanded",o(w)),le(W,"aria-disabled",A())}),ot("click",W,ut),ot("keydown",W,se),b(t,F),or()}Zn(["click","keydown"]);const as="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.5%206.5L19%2012L13.5%2017.5M17.75%2012L4.75%2012'%20stroke='%231C1C1C'%20stroke-width='2'%20stroke-linecap='square'/%3e%3c/svg%3e",ns="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.6'%3e%3cpath%20d='M10.5%206.5L5%2012L10.5%2017.5M6.25%2012L19.25%2012'%20stroke='%231C1C1C'%20stroke-width='2'%20stroke-linecap='square'/%3e%3c/g%3e%3c/svg%3e";var Io=x("<span> </span>");const No={hash:"svelte-pamnib",code:".tag.svelte-pamnib {display:inline-flex;align-items:center;padding:4px 8px;border-radius:5px;font-family:inherit;font-weight:700;color:#ffffff;white-space:nowrap;letter-spacing:0.03em;width:fit-content;}"};function Lr(t,e){Pt(t,No);let r=D(e,"color",3,"#1C1C1C"),a=D(e,"fontSize",3,"0.6875rem"),n=D(e,"class",3,"");var s=Io(),i=p(s);k(()=>{at(s,1,`tag ${n()??""}`,"svelte-pamnib"),ue(s,`background-color: ${r()??""}; font-size: ${a()??""}`),C(i,e.label)}),b(t,s)}var Oo=x("<span> </span>"),Fo=x('<div class="vote-overview-stats svelte-1m9ufac"></div>'),Uo=x("<span> </span>"),Ho=x('<span class="vote-overview-sep svelte-1m9ufac">|</span>'),Vo=x("<span> </span>"),Bo=x('<div class="vote-overview-meta svelte-1m9ufac"><!> <!> <!></div>'),qo=x('<div class="vote-overview svelte-1m9ufac"><!> <!></div>');const jo={hash:"svelte-1m9ufac",code:".vote-overview.svelte-1m9ufac {display:flex;align-items:center;padding:0.5rem 1rem;font-size:0.8rem;color:#1c1c1c;gap:1rem;flex-wrap:wrap;opacity:50%;}.vote-overview-stats.svelte-1m9ufac {display:flex;align-items:center;gap:1.5rem;font-weight:600;}.vote-overview-meta.svelte-1m9ufac {display:flex;align-items:center;gap:0.4rem;font-weight:400;white-space:nowrap;}.vote-overview-sep.svelte-1m9ufac {opacity:0.4;}"};function Sa(t,e){ir(e,!0),Pt(t,jo);let r=D(e,"data",19,()=>[]),a=D(e,"borderTop",3,!1),n=D(e,"align",3,"start");var s=qo(),i=p(s);{var l=v=>{var _=Fo();lt(_,21,r,bt,(u,m)=>{var h=Oo(),A=p(h);k(()=>C(A,`${o(m).text??""} ${o(m).value??""}`)),b(u,h)}),b(v,_)};M(i,v=>{r().length&&v(l)})}var d=g(i,2);{var c=v=>{var _=Bo(),u=p(_);{var m=w=>{var L=Uo(),G=p(L);k(()=>C(G,`Atualizado em ${e.date??""}`)),b(w,L)};M(u,w=>{e.date&&w(m)})}var h=g(u,2);{var A=w=>{var L=Ho();b(w,L)};M(h,w=>{e.date&&e.font&&w(A)})}var E=g(h,2);{var B=w=>{var L=Vo(),G=p(L);k(()=>C(G,`Fonte ${e.font??""}`)),b(w,L)};M(E,w=>{e.font&&w(B)})}b(v,_)};M(d,v=>{(e.date||e.font)&&v(c)})}k(()=>ue(s,`justify-content:${n()==="end"?"flex-end":"flex-start"};${a()?"border-top:1px solid var(--sevn-color-neutral)":""}`)),b(t,s),or()}function Ko(t,e){return`${typeof t=="number"&&Number.isFinite(t)&&t>0?t:e+1}º lugar`}var Go=x('<div class="bar-seg svelte-10dw06o"></div>'),Wo=x('<div class="candidate-percentage-layout duel svelte-10dw06o"><div class="duel-candidates svelte-10dw06o"><!> <div class="duel-center svelte-10dw06o"><div class="duel-infos-row svelte-10dw06o"><div class="duel-info svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div> <div class="duel-info right svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div></div> <div class="bar-dual svelte-10dw06o"></div> <!></div> <!></div></div>'),Zo=x('<span class="divisor svelte-10dw06o" style="margin-left: 5px;">|</span>'),Yo=x('<span class="name svelte-10dw06o"><span class="acronym svelte-10dw06o"> </span> </span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span>',1),Jo=x('<span class="votes svelte-10dw06o"> </span> <span class="percent svelte-10dw06o"> </span> <span class="name svelte-10dw06o"><span class="divisor svelte-10dw06o" style="margin-right: 5px;">|</span> <span class="acronym svelte-10dw06o"> </span> </span>',1),Qo=x('<div class="bar-seg svelte-10dw06o"></div>'),Xo=x('<div class="bar-dual svelte-10dw06o"></div>'),$o=x('<div class="bar-seg svelte-10dw06o"></div>'),el=x('<div class="bar-dual svelte-10dw06o"></div>'),tl=x('<div class="candidate-percentage-layout duel-compact svelte-10dw06o"><div class="duel-compact-candidates svelte-10dw06o"><!> <div class="duel-compact-info-wrapper svelte-10dw06o"><div class="duel-compact-info-row svelte-10dw06o"><div class="duel-compact-info svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span> <!></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div> <div class="duel-compact-info right svelte-10dw06o"><!> <!></div></div> <!></div> <!></div> <!> <!></div>'),rl=x('<p class="meta svelte-10dw06o"><!><!></p>'),al=x('<div class="stack-item svelte-10dw06o"><div class="stack-header svelte-10dw06o"><!> <div class="stack-info svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> <span class="percent-label svelte-10dw06o">dos votos válidos</span></span> <div class="bar-track svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <span class="votes stack-votes svelte-10dw06o"> </span> <!></div></div></div>'),nl=x('<div class="candidate-percentage-layout stack svelte-10dw06o"></div>'),sl=x('<span class="compact-stat svelte-10dw06o"><span class="compact-stat-text svelte-10dw06o"> </span> <span class="compact-stat-text svelte-10dw06o"> </span></span>'),il=x('<div class="compact-bottom svelte-10dw06o"><div class="bar-track compact-bar svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <div class="compact-stats svelte-10dw06o"></div></div>'),ol=x('<span class="compact-stat svelte-10dw06o"><span class="compact-stat-text svelte-10dw06o"> </span> <span class="compact-stat-text svelte-10dw06o"> </span></span>'),ll=x('<div class="compact-bottom svelte-10dw06o"><div class="bar-track compact-bar svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <div class="compact-stats svelte-10dw06o"></div></div>'),cl=x("<span> </span>"),dl=x('<span class="compact-sep svelte-10dw06o">|</span>'),vl=x("<span> </span>"),fl=x('<div class="compact-meta svelte-10dw06o"><!> <!> <!></div>'),ul=x('<div class="compact-row svelte-10dw06o"><!> <div class="compact-content svelte-10dw06o"><div class="compact-top svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span> <span class="divisor svelte-10dw06o">|</span></span> <span class="percent compact-percent svelte-10dw06o"> </span> <span class="votes compact-votes svelte-10dw06o"> </span></div> <!></div></div> <!> <!>',1),hl=x('<p class="meta svelte-10dw06o"><!><!></p>'),pl=x('<div class="compact-row svelte-10dw06o"><div class="compact-left svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div></div> <div class="bar-track svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <!>',1),_l=x('<div class="candidate-percentage-layout compact svelte-10dw06o"><!></div>');const gl={hash:"svelte-10dw06o",code:`.candidate-percentage-layout.svelte-10dw06o {display:flex;flex-direction:column;gap:10px;}
|
|
33
|
+
|
|
34
|
+
/* ─── DUEL ──────────────────────────────── */.duel-candidates.svelte-10dw06o {display:flex;align-items:flex-start;gap:14px;}.duel-center.svelte-10dw06o {flex:1;display:flex;flex-direction:column;gap:10px;min-width:0;}.duel-center.svelte-10dw06o .vote-overview {padding:10px 0;}.duel-infos-row.svelte-10dw06o {display:flex;justify-content:space-between;align-items:flex-start;gap:16px;}.duel-info.svelte-10dw06o {display:flex;flex-direction:column;gap:2px;}.duel-info.right.svelte-10dw06o {text-align:right;}
|
|
35
|
+
|
|
36
|
+
/* ─── STACK ─────────────────────────────── */.stack.svelte-10dw06o {gap:24px;}.stack-item.svelte-10dw06o {display:flex;flex-direction:column;gap:8px;}.stack-header.svelte-10dw06o {display:flex;align-items:center;gap:14px;padding-bottom:12px; /* espaço para a tag do avatar */}.stack-info.svelte-10dw06o {display:flex;flex-direction:column;align-items:flex-start;gap:2px;}.stack-info.svelte-10dw06o .position-tag {margin-bottom:6px;}.stack-votes.svelte-10dw06o {margin-top:5px;margin-bottom:5px;}.percent-label.svelte-10dw06o {font-size:0.75em;font-weight:400;opacity:0.65;}
|
|
37
|
+
|
|
38
|
+
/* ─── DUEL-COMPACT ─────────────────────── */.duel-compact-candidates.svelte-10dw06o {display:flex;align-items:center;gap:10px;}.duel-compact-info-wrapper.svelte-10dw06o {flex:1;display:flex;flex-direction:column;gap:8px;min-width:0;}.duel-compact-info-row.svelte-10dw06o {display:flex;justify-content:space-between;align-items:center;gap:8px;}.duel-compact-info.svelte-10dw06o {display:flex;min-width:0;}.duel-compact-info.right.svelte-10dw06o {text-align:right;}.duel-compact-info.svelte-10dw06o .position-tag {align-self:flex-start;margin-bottom:4px;}.duel-compact-info.right.svelte-10dw06o .position-tag {align-self:flex-end;}.duel-compact.svelte-10dw06o .vote-overview {padding:10px 0;}
|
|
39
|
+
|
|
40
|
+
/* ─── COMPACT WITH OVERVIEW ────────────── */.compact-row.svelte-10dw06o {display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--sevn-color-neutral);padding-bottom:15px;}.compact-content.svelte-10dw06o {flex:1;display:flex;flex-direction:column;min-width:0;}.compact-top.svelte-10dw06o {display:flex;align-items:baseline;gap:8px;}.compact-bottom.svelte-10dw06o {display:flex;align-items:center;gap:12px;}.compact-bar.svelte-10dw06o {flex:1;min-width:60px;width:auto;}.compact-stats.svelte-10dw06o {display:flex;align-items:center;gap:14px;flex-shrink:0;}.compact-stat.svelte-10dw06o {display:flex;align-items:center;gap:4px;font-size:0.75rem;color:var(--sevn-color-tertiary);}.compact-stat-text.svelte-10dw06o {opacity:50%;font-weight:600;}.compact-meta.svelte-10dw06o {display:none;}
|
|
41
|
+
|
|
42
|
+
/* ─── COMPACT ───────────────────────────── */.compact-row.svelte-10dw06o {display:flex;align-items:center;justify-content:space-between;gap:8px;}.compact-left.svelte-10dw06o {display:flex;align-items:center;gap:8px;min-width:0;}
|
|
43
|
+
|
|
44
|
+
/* ─── BARRAS ────────────────────────────── */.bar-dual.svelte-10dw06o {position:relative;height:var(--bar-height);border-radius:999px;overflow:hidden;background-color:#e0e0e0;}.bar-seg.svelte-10dw06o {position:absolute;top:0;left:0;height:100%;border-radius:999px;}.bar-track.svelte-10dw06o {width:100%;height:var(--bar-height);background-color:#e0e0e0;border-radius:999px;overflow:hidden;margin-top:5px;}.bar-fill.svelte-10dw06o {height:100%;border-radius:999px;}
|
|
45
|
+
|
|
46
|
+
/* ─── TIPOGRAFIA ────────────────────────── */.name.svelte-10dw06o {font-size:var(--name-size);color:var(--sevn-color-tertiary);line-height:1.3;white-space:nowrap;}.acronym.svelte-10dw06o {font-size:var(--name-size);font-weight:400;opacity:0.55;margin-left:4px;}.divisor.svelte-10dw06o {opacity:0.2;}.percent.svelte-10dw06o {font-size:var(--percent-size);font-weight:700;color:var(--sevn-color-tertiary);line-height:1.1;white-space:nowrap;}.votes.svelte-10dw06o {font-size:var(--votes-size);color:var(--sevn-color-tertiary);font-weight:600;opacity:0.65;white-space:nowrap;opacity:50%;}
|
|
47
|
+
|
|
48
|
+
/* ─── META ──────────────────────────────── */.meta.svelte-10dw06o {font-size:0.72rem;color:var(--sevn-color-tertiary);opacity:0.55;}
|
|
49
|
+
|
|
50
|
+
/* ─── RESPONSIVO MOBILE ─────────────────── */
|
|
51
|
+
@media (max-width: 480px) {
|
|
52
|
+
/* ── duel ── */.duel-candidates.svelte-10dw06o {gap:8px;}.duel-info.svelte-10dw06o {min-width:0;}.name.svelte-10dw06o {white-space:normal;word-break:break-word;}.percent.svelte-10dw06o {font-size:calc(var(--percent-size) * 0.8);}.votes.svelte-10dw06o {white-space:normal;}
|
|
53
|
+
|
|
54
|
+
/* ── duel-compact ── */.duel-compact-candidates.svelte-10dw06o {gap:6px;}.duel-compact-info-wrapper.svelte-10dw06o {gap:6px;}.duel-compact-info.svelte-10dw06o .name:where(.svelte-10dw06o),
|
|
55
|
+
.duel-compact-info.svelte-10dw06o .percent:where(.svelte-10dw06o),
|
|
56
|
+
.duel-compact-info.svelte-10dw06o .votes:where(.svelte-10dw06o) {white-space:normal;word-break:break-word;}.duel-compact.svelte-10dw06o .vote-overview {padding:3px;font-size:0.7rem;gap:8px;}.duel-compact.svelte-10dw06o .vote-overview .vote-overview-stats {gap:8px;}
|
|
57
|
+
|
|
58
|
+
/* ── compact with overview ── */.compact-row.svelte-10dw06o {align-items:flex-start;}.compact-top.svelte-10dw06o {flex-direction:column;align-items:flex-start;gap:2px;}.compact-percent.svelte-10dw06o {font-size:1.15rem;font-weight:800 !important;color:var(--sevn-color-tertiary);line-height:1;}.compact-votes.svelte-10dw06o {font-size:0.675rem;margin-top:2px;}.compact-bottom.svelte-10dw06o {flex-direction:column;align-items:stretch;gap:6px;}.compact-bar.svelte-10dw06o {flex:none;width:100%;height:8px;}.compact-stats.svelte-10dw06o {flex-wrap:wrap;gap:6px 10px;}.compact-meta.svelte-10dw06o {display:flex;align-items:center;gap:0.4rem;font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.6;flex-wrap:wrap;opacity:50%;}.compact-sep.svelte-10dw06o {opacity:0.4;}
|
|
59
|
+
}`};function ss(t,e){ir(e,!0),Pt(t,gl);let r=D(e,"layout",3,"duel"),a=D(e,"duelCompactInfoDirection",3,"column"),n=D(e,"overviewAlign",3,"start"),s=D(e,"showPosition",3,!1);const i=(Q,se)=>Ko(Q.position,se),l=Q=>e.positionTagColor??Q.color,d={duel:{percentSize:"1.75rem",nameSize:"0.875rem",votesSize:"0.75rem",avatarSize:"lg",barHeight:"10px"},"duel-compact":{percentSize:"1rem",nameSize:"0.8rem",votesSize:"0.75rem",avatarSize:"sm",barHeight:"12px"},stack:{percentSize:"1.5rem",nameSize:"0.875rem",votesSize:"0.75rem",avatarSize:"lg",barHeight:"10px"},compact:{percentSize:"0.875rem",nameSize:"0.8rem",votesSize:"0.75rem",avatarSize:"sm",barHeight:"8px"}},c=H(()=>d[r()]??d.duel),v=H(()=>e.percentSize??o(c).percentSize),_=H(()=>e.nameSize??o(c).nameSize),u=H(()=>e.votesSize??o(c).votesSize),m=H(()=>e.avatarSize??o(c).avatarSize),h=H(()=>e.barHeight??o(c).barHeight),A=H(()=>!!e.overviewData?.length),E=H(()=>!!e.date||!!e.font);let B=he(Vt(er?window.innerWidth<=480:!1));vr(()=>{if(!er)return;const Q=window.matchMedia("(max-width: 480px)");K(B,Q.matches,!0);const se=Ee=>{K(B,Ee.matches,!0)};return Q.addEventListener("change",se),()=>Q.removeEventListener("change",se)});function w(Q){return Q.toLocaleString("pt-BR")}function L(Q){return Q.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})+"%"}var G=Jn(),de=dr(G);{var Se=Q=>{var se=Wo(),Ee=p(se),T=p(Ee);{let I=H(()=>e.candidates[0].avatar??"man");Gt(T,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return o(I)},get avatarColor(){return e.candidates[0].color},get size(){return o(m)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var F=g(T,2),z=p(F),q=p(z),ae=p(q),W=p(ae),ee=g(W),oe=p(ee),ce=g(ae,2),ke=p(ce),He=g(ce,2),Ae=p(He),me=g(q,2),Re=p(me),Ve=p(Re),Be=g(Ve),qe=p(Be),je=g(Re,2),Ye=p(je),y=g(je,2),S=p(y),R=g(z,2);lt(R,21,()=>e.candidates,bt,(I,Z,pe)=>{var Pe=Go();k(()=>ue(Pe,`width:calc(${o(Z).percent??""}% - 2px);${pe===0?"left:0;":"left:auto;right:0;"}background-color:${o(Z).color??""};`)),b(I,Pe)});var N=g(R,2);{var Y=I=>{Sa(I,{get data(){return e.overviewData},get date(){return e.date},get font(){return e.font},get align(){return n()}})};M(N,I=>{(o(A)||o(E))&&I(Y)})}var te=g(F,2);{let I=H(()=>e.candidates[1].avatar??"man");Gt(te,{get name(){return e.candidates[1].name},get photoUrl(){return e.candidates[1].photoUrl},get avatar(){return o(I)},get avatarColor(){return e.candidates[1].color},get size(){return o(m)},get tag(){return e.candidates[1].avatarTag},get tagColor(){return e.candidates[1].avatarTagColor}})}k((I,Z,pe,Pe)=>{ue(se,`--percent-size:${o(v)??""};--name-size:${o(_)??""};--votes-size:${o(u)??""};--bar-height:${o(h)??""};`),C(W,`${e.candidates[0].name??""} `),C(oe,e.candidates[0].acronym),C(ke,I),C(Ae,`${Z??""} votos`),C(Ve,`${e.candidates[1].name??""} `),C(qe,e.candidates[1].acronym),C(Ye,pe),C(S,`${Pe??""} votos`)},[()=>L(e.candidates[0].percent),()=>w(e.candidates[0].votes),()=>L(e.candidates[1].percent),()=>w(e.candidates[1].votes)]),b(Q,se)},ne=Q=>{var se=tl(),Ee=p(se),T=p(Ee);{let P=H(()=>e.candidates[0].avatar??"man");Gt(T,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return o(P)},get avatarColor(){return e.candidates[0].color},get size(){return o(m)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var F=g(T,2),z=p(F),q=p(z),ae=p(q);{var W=P=>{{let U=H(()=>i(e.candidates[0],0)),ie=H(()=>l(e.candidates[0]));Lr(P,{get label(){return o(U)},get color(){return o(ie)},class:"position-tag"})}};M(ae,P=>{s()&&P(W)})}var ee=g(ae,2),oe=p(ee),ce=g(oe),ke=p(ce),He=g(ce,2);{var Ae=P=>{var U=Zo();b(P,U)};M(He,P=>{o(B)||P(Ae)})}var me=g(ee,2),Re=p(me),Ve=g(me,2),Be=p(Ve),qe=g(q,2),je=p(qe);{var Ye=P=>{{let U=H(()=>i(e.candidates[1],1)),ie=H(()=>l(e.candidates[1]));Lr(P,{get label(){return o(U)},get color(){return o(ie)},class:"position-tag"})}};M(je,P=>{s()&&P(Ye)})}var y=g(je,2);{var S=P=>{var U=Yo(),ie=dr(U),we=p(ie),Je=p(we),Ct=g(we),Jr=g(ie,2),Qr=p(Jr),La=g(Jr,2),Ra=p(La);k((Pa,Da)=>{C(Je,e.candidates[1].acronym),C(Ct,` ${e.candidates[1].name??""}`),C(Qr,Pa),C(Ra,`${Da??""} votos`)},[()=>L(e.candidates[1].percent),()=>w(e.candidates[1].votes)]),b(P,U)},R=P=>{var U=Jo(),ie=dr(U),we=p(ie),Je=g(ie,2),Ct=p(Je),Jr=g(Je,2),Qr=g(p(Jr),2),La=p(Qr),Ra=g(Qr);k((Pa,Da)=>{C(we,`${Pa??""} votos`),C(Ct,Da),C(La,e.candidates[1].acronym),C(Ra,` ${e.candidates[1].name??""}`)},[()=>w(e.candidates[1].votes),()=>L(e.candidates[1].percent)]),b(P,U)};M(y,P=>{o(B)?P(S):P(R,!1)})}var N=g(z,2);{var Y=P=>{var U=Xo();lt(U,21,()=>e.candidates,bt,(ie,we,Je)=>{var Ct=Qo();k(()=>ue(Ct,`width:calc(${o(we).percent??""}% - 2px);${Je===0?"left:0;":"left:auto;right:0;"}background-color:${o(we).color??""};`)),b(ie,Ct)}),b(P,U)};M(N,P=>{a()==="row"&&P(Y)})}var te=g(F,2);{let P=H(()=>e.candidates[1].avatar??"man");Gt(te,{get name(){return e.candidates[1].name},get photoUrl(){return e.candidates[1].photoUrl},get avatar(){return o(P)},get avatarColor(){return e.candidates[1].color},get size(){return o(m)},get tag(){return e.candidates[1].avatarTag},get tagColor(){return e.candidates[1].avatarTagColor}})}var I=g(Ee,2);{var Z=P=>{var U=el();lt(U,21,()=>e.candidates,bt,(ie,we,Je)=>{var Ct=$o();k(()=>ue(Ct,`width:calc(${o(we).percent??""}% - 2px);${Je===0?"left:0;":"left:auto;right:0;"}background-color:${o(we).color??""};`)),b(ie,Ct)}),b(P,U)};M(I,P=>{a()==="column"&&P(Z)})}var pe=g(I,2);{var Pe=P=>{Sa(P,{get data(){return e.overviewData},get date(){return e.date},get font(){return e.font},borderTop:!0,get align(){return n()}})};M(pe,P=>{(o(A)||o(E))&&P(Pe)})}k((P,U)=>{ue(se,`--percent-size:${o(v)??""};--name-size:${o(_)??""};--votes-size:${o(u)??""};--bar-height:${o(h)??""};`),ue(q,`flex-direction:${a()??""}; gap: ${a()==="row"?"10px":"2px"}`),C(oe,`${e.candidates[0].name??""} `),C(ke,e.candidates[0].acronym),C(Re,P),C(Be,`${U??""} votos`),ue(qe,`flex-direction:${a()??""}; gap: ${a()==="row"?"10px":"2px"}`)},[()=>L(e.candidates[0].percent),()=>w(e.candidates[0].votes)]),b(Q,se)},Ce=Q=>{var se=nl();lt(se,21,()=>e.candidates,bt,(Ee,T,F)=>{var z=al(),q=p(z),ae=p(q);{let S=H(()=>o(T).avatar??"man");Gt(ae,{get name(){return o(T).name},get photoUrl(){return o(T).photoUrl},get avatar(){return o(S)},get avatarColor(){return o(T).color},get size(){return o(m)},get tag(){return o(T).avatarTag},get tagColor(){return o(T).avatarTagColor}})}var W=g(ae,2),ee=p(W);{var oe=S=>{{let R=H(()=>i(o(T),F)),N=H(()=>l(o(T)));Lr(S,{get label(){return o(R)},get color(){return o(N)},class:"position-tag"})}};M(ee,S=>{s()&&S(oe)})}var ce=g(ee,2),ke=p(ce),He=g(ke),Ae=p(He),me=g(ce,2),Re=p(me),Ve=g(me,2),Be=p(Ve),qe=g(Ve,2),je=p(qe),Ye=g(qe,2);{var y=S=>{var R=rl(),N=p(R);{var Y=Z=>{var pe=Kr();k(()=>C(pe,`Atualizado em ${e.date??""} `)),b(Z,pe)};M(N,Z=>{e.date&&Z(Y)})}var te=g(N);{var I=Z=>{var pe=Kr();k(()=>C(pe,`| Fonte ${e.font??""}`)),b(Z,pe)};M(te,Z=>{e.font&&Z(I)})}b(S,R)};M(Ye,S=>{F===e.candidates.length-1&&o(E)&&S(y)})}k((S,R)=>{C(ke,`${o(T).name??""} `),C(Ae,o(T).acronym),C(Re,`${S??""} `),ue(Be,`width:${o(T).percent??""}%;background-color:${o(T).color??""};`),C(je,`${R??""} votos`)},[()=>L(o(T).percent),()=>w(o(T).votes)]),b(Ee,z)}),k(()=>ue(se,`--percent-size:${o(v)??""};--name-size:${o(_)??""};--votes-size:${o(u)??""};--bar-height:${o(h)??""};`)),b(Q,se)},ut=Q=>{var se=_l(),Ee=p(se);{var T=z=>{var q=ul(),ae=dr(q),W=p(ae);{let N=H(()=>e.candidates[0].avatar??"man");Gt(W,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return o(N)},get avatarColor(){return e.candidates[0].color},get size(){return o(m)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var ee=g(W,2),oe=p(ee),ce=p(oe),ke=p(ce),He=g(ke),Ae=p(He),me=g(ce,2),Re=p(me),Ve=g(me,2),Be=p(Ve),qe=g(oe,2);{var je=N=>{var Y=il(),te=p(Y),I=p(te),Z=g(te,2);lt(Z,21,()=>e.overviewData,bt,(pe,Pe)=>{var P=sl(),U=p(P),ie=p(U),we=g(U,2),Je=p(we);k(()=>{C(ie,o(Pe).text),C(Je,o(Pe).value)}),b(pe,P)}),k(()=>ue(I,`width:${e.candidates[0].percent??""}%;background-color:${e.candidates[0].color??""};`)),b(N,Y)};M(qe,N=>{o(B)||N(je)})}var Ye=g(ae,2);{var y=N=>{var Y=ll(),te=p(Y),I=p(te),Z=g(te,2);lt(Z,21,()=>e.overviewData,bt,(pe,Pe)=>{var P=ol(),U=p(P),ie=p(U),we=g(U,2),Je=p(we);k(()=>{C(ie,o(Pe).text),C(Je,o(Pe).value)}),b(pe,P)}),k(()=>ue(I,`width:${e.candidates[0].percent??""}%;background-color:${e.candidates[0].color??""};`)),b(N,Y)};M(Ye,N=>{o(B)&&N(y)})}var S=g(Ye,2);{var R=N=>{var Y=fl(),te=p(Y);{var I=U=>{var ie=cl(),we=p(ie);k(()=>C(we,`Atualizado em ${e.date??""}`)),b(U,ie)};M(te,U=>{e.date&&U(I)})}var Z=g(te,2);{var pe=U=>{var ie=dl();b(U,ie)};M(Z,U=>{e.date&&e.font&&U(pe)})}var Pe=g(Z,2);{var P=U=>{var ie=vl(),we=p(ie);k(()=>C(we,`Fonte ${e.font??""}`)),b(U,ie)};M(Pe,U=>{e.font&&U(P)})}b(N,Y)};M(S,N=>{o(E)&&N(R)})}k((N,Y)=>{C(ke,`${e.candidates[0].name??""} `),C(Ae,e.candidates[0].acronym),C(Re,N),C(Be,`${Y??""} votos`)},[()=>L(e.candidates[0].percent),()=>w(e.candidates[0].votes)]),b(z,q)},F=z=>{var q=pl(),ae=dr(q),W=p(ae),ee=p(W);{let y=H(()=>e.candidates[0].avatar??"man");Gt(ee,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return o(y)},get avatarColor(){return e.candidates[0].color},get size(){return o(m)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var oe=g(ee,2),ce=p(oe),ke=g(ce),He=p(ke),Ae=g(oe,2),me=p(Ae),Re=g(Ae,2),Ve=p(Re),Be=g(ae,2),qe=p(Be),je=g(Be,2);{var Ye=y=>{var S=hl(),R=p(S);{var N=I=>{var Z=Kr();k(()=>C(Z,`Atualizado em ${e.date??""}`)),b(I,Z)};M(R,I=>{e.date&&I(N)})}var Y=g(R);{var te=I=>{var Z=Kr();k(()=>C(Z,`| Fonte ${e.font??""}`)),b(I,Z)};M(Y,I=>{e.font&&I(te)})}b(y,S)};M(je,y=>{o(E)&&y(Ye)})}k((y,S)=>{C(ce,`${e.candidates[0].name??""} `),C(He,e.candidates[0].acronym),C(me,y),C(Ve,`${S??""} votos`),ue(qe,`width:${e.candidates[0].percent??""}%;background-color:${e.candidates[0].color??""};`)},[()=>L(e.candidates[0].percent),()=>w(e.candidates[0].votes)]),b(z,q)};M(Ee,z=>{o(A)?z(T):z(F,!1)})}k(()=>ue(se,`--percent-size:${o(v)??""};--name-size:${o(_)??""};--votes-size:${o(u)??""};--bar-height:${o(h)??""};--bar-color:${e.candidates[0].color??""};`)),b(Q,se)};M(de,Q=>{r()==="duel"?Q(Se):r()==="duel-compact"?Q(ne,1):r()==="stack"?Q(Ce,2):r()==="compact"&&Q(ut,3)})}b(t,G),or()}var ml=x('<img alt="" class="flip svelte-18tlobi"/>'),wl=x('<img alt="" class="svelte-18tlobi"/>'),bl=x("<button> </button>"),xl=x('<img alt="" class="svelte-18tlobi"/>'),yl=x('<img alt="" class="flip svelte-18tlobi"/>'),zl=x('<button class="filter-state-clear svelte-18tlobi" type="button" aria-label="Limpar estado selecionado"><img alt="" aria-hidden="true" width="9" height="9"/></button>'),Sl=x('<span class="filter-state-selected svelte-18tlobi"><strong class="svelte-18tlobi">Você selecionou:</strong> <!></span>'),Cl=x('<span class="filter-state-meta svelte-18tlobi"> </span>'),El=x('<div class="filter-state-info svelte-18tlobi"><!> <!></div>'),kl=x('<div class="filter-state svelte-18tlobi"><div class="filter-state-bar svelte-18tlobi"><button class="filter-state-arrow svelte-18tlobi" aria-label="Anterior"><!></button> <div class="filter-state-track svelte-18tlobi"></div> <button class="filter-state-arrow svelte-18tlobi" aria-label="Próximo"><!></button></div> <!></div>');const Al={hash:"svelte-18tlobi",code:`.filter-state.svelte-18tlobi {display:flex;flex-direction:column;gap:20px;}
|
|
60
|
+
|
|
61
|
+
/* ── Bar ──────────────────────────────── */.filter-state-bar.svelte-18tlobi {display:flex;align-items:center;gap:4px;}
|
|
62
|
+
|
|
63
|
+
/* ── Arrows ───────────────────────────── */.filter-state-arrow.svelte-18tlobi {display:flex;align-items:center;justify-content:center;flex-shrink:0;background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;}.filter-state-arrow.svelte-18tlobi:disabled {cursor:default;}.filter-state-arrow.svelte-18tlobi img:where(.svelte-18tlobi) {width:24px;height:24px;display:block;}.filter-state-arrow.svelte-18tlobi .flip:where(.svelte-18tlobi) {transform:scaleX(-1);}
|
|
64
|
+
|
|
65
|
+
/* ── Track ────────────────────────────── */.filter-state-track.svelte-18tlobi {flex:1;display:flex;gap:6px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;}.filter-state-track.svelte-18tlobi::-webkit-scrollbar {display:none;}
|
|
66
|
+
|
|
67
|
+
/* ── Pills ────────────────────────────── */.filter-state-pill.svelte-18tlobi {flex-shrink:0;scroll-snap-align:start;padding:6px 12px;border-radius:8px;border:none;cursor:pointer;font-family:inherit;font-size:var(--pill-font-size);font-weight:600;background-color:var(--sevn-color-neutral);color:var(--sevn-color-tertiary);transition:background-color 0.15s, color 0.15s;white-space:nowrap;line-height:1;}.filter-state-pill.svelte-18tlobi:hover:not(.active) {background-color:#e2e2ea;}.filter-state-pill.active.svelte-18tlobi {background-color:var(--pill-active-bg);color:var(--pill-active-color);}
|
|
68
|
+
|
|
69
|
+
/* ── Info row ─────────────────────────── */.filter-state-info.svelte-18tlobi {display:flex;align-items:baseline;gap:12px;font-size:0.875rem;color:var(--sevn-color-tertiary);}.filter-state-selected.svelte-18tlobi strong:where(.svelte-18tlobi) {font-weight:700;}.filter-state-clear.svelte-18tlobi {display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:2px;padding:0;vertical-align:middle;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.filter-state-clear.svelte-18tlobi:hover,
|
|
70
|
+
.filter-state-clear.svelte-18tlobi:focus-visible {background:rgba(0, 0, 0, 0.08);}.filter-state-meta.svelte-18tlobi {font-size:0.75rem;color:#9a9aaa;}`};function Tl(t,e){ir(e,!0),Pt(t,Al);let r=D(e,"states",19,()=>[]),a=D(e,"value",15,null),n=D(e,"activeBackground",3,"var(--sevn-color-tertiary)"),s=D(e,"activeColor",3,"#fff"),i=D(e,"fontSize",3,"0.8125rem"),l=D(e,"showDescriptionSelection",3,!0),d=D(e,"clearable",3,!0),c=he(null),v=he(!1),_=he(!1);function u(){o(c)&&(K(v,o(c).scrollLeft>0),K(_,o(c).scrollLeft+o(c).clientWidth<o(c).scrollWidth-1))}vr(()=>{if(!o(c))return;u(),o(c).addEventListener("scroll",u);const T=new ResizeObserver(u);return T.observe(o(c)),()=>{o(c).removeEventListener("scroll",u),T.disconnect()}});function m(){o(c)?.scrollBy({left:-160,behavior:"smooth"})}function h(){o(c)?.scrollBy({left:160,behavior:"smooth"})}const A=H(()=>r().find(T=>T.value===a())?.label??null);var E=kl(),B=p(E),w=p(B),L=p(w);{var G=T=>{var F=ml();k(()=>le(F,"src",as)),b(T,F)},de=T=>{var F=wl();k(()=>le(F,"src",ns)),b(T,F)};M(L,T=>{o(v)?T(G):T(de,!1)})}var Se=g(w,2);lt(Se,21,r,bt,(T,F)=>{var z=bl();let q;var ae=p(z);k(W=>{q=at(z,1,"filter-state-pill svelte-18tlobi",null,q,{active:a()===o(F).value}),C(ae,W)},[()=>o(F).value.toUpperCase()]),ot("click",z,()=>a(a()===o(F).value?null:o(F).value)),b(T,z)}),za(Se,T=>K(c,T),()=>o(c));var ne=g(Se,2),Ce=p(ne);{var ut=T=>{var F=xl();k(()=>le(F,"src",as)),b(T,F)},Q=T=>{var F=yl();k(()=>le(F,"src",ns)),b(T,F)};M(Ce,T=>{o(_)?T(ut):T(Q,!1)})}var se=g(B,2);{var Ee=T=>{var F=El(),z=p(F);{var q=ee=>{var oe=Sl(),ce=g(p(oe)),ke=g(ce);{var He=Ae=>{var me=zl(),Re=p(me);k(()=>le(Re,"src",rs)),ot("click",me,()=>a(null)),b(Ae,me)};M(ke,Ae=>{d()&&Ae(He)})}k(()=>C(ce,` ${o(A)??""} `)),b(ee,oe)};M(z,ee=>{o(A)&&ee(q)})}var ae=g(z,2);{var W=ee=>{var oe=Cl(),ce=p(oe);k(()=>C(ce,e.meta)),b(ee,oe)};M(ae,ee=>{e.meta&&ee(W)})}b(T,F)};M(se,T=>{l()&&(o(A)||e.meta)&&T(Ee)})}k(()=>{ue(B,`--pill-active-bg: ${n()??""}; --pill-active-color: ${s()??""}; --pill-font-size: ${i()??""};`),w.disabled=!o(v),ne.disabled=!o(_)}),ot("click",w,m),ot("click",ne,h),b(t,E),or()}Zn(["click"]);var Ml=x('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),Ll=x('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),Rl=x('<p class="header-description svelte-1xm1ks6"> </p>'),Pl=x('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const Dl={hash:"svelte-1xm1ks6",code:`.header.svelte-1xm1ks6 {display:flex;flex-direction:column;gap:4px;}.header-tag-inline.svelte-1xm1ks6 {display:none;}.header-title-row.svelte-1xm1ks6 {display:flex;align-items:center;gap:10px;}.header-title.svelte-1xm1ks6 {font-size:var(--header-title-font-size);font-weight:var(--header-title-font-weight);color:var(--sevn-color-tertiary);line-height:1.15;}.header-description.svelte-1xm1ks6 {font-size:var(--header-description-font-size);color:var(--sevn-color-tertiary);}
|
|
71
|
+
|
|
72
|
+
@media (max-width: 767px) {.header-title.svelte-1xm1ks6 {font-size:calc(var(--header-title-font-size) * 0.75);max-width:60%;}.header-description.svelte-1xm1ks6 {font-size:calc(var(--header-description-font-size) * 0.9);}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
|
|
76
|
+
}`};function Il(t,e){Pt(t,Dl);var r=Pl(),a=p(r);{var n=u=>{var m=Ml(),h=p(m);Lr(h,{get label(){return e.tag},get color(){return e.tagColor}}),b(u,m)};M(a,u=>{e.tag&&u(n)})}var s=g(a,2),i=p(s),l=p(i),d=g(i,2);{var c=u=>{var m=Ll(),h=p(m);Lr(h,{get label(){return e.tag},get color(){return e.tagColor}}),b(u,m)};M(d,u=>{e.tag&&u(c)})}var v=g(s,2);{var _=u=>{var m=Rl(),h=p(m);k(()=>C(h,e.description)),b(u,m)};M(v,u=>{e.description&&u(_)})}k(()=>{ue(r,`
|
|
77
|
+
--header-title-font-size: ${e.titleFontSize??"1.75rem"??""};
|
|
78
|
+
--header-title-font-weight: ${e.titleFontWeight??700??""};
|
|
79
|
+
--header-description-font-size: ${e.descriptionFontSize??"0.875rem"??""};
|
|
80
|
+
`),C(l,e.title)}),b(t,r)}class is{constructor(e={}){var r,a,n;this.inflight=new Map,this.tick=0,this.storageKey=(r=e.storageKey)!==null&&r!==void 0?r:"reqcache",this.maxEntries=(a=e.maxEntries)!==null&&a!==void 0?a:100,this.storage=(n=e.storage)!==null&&n!==void 0?n:Ol()}async getFetch(e,r,a={}){const n=Date.now(),s=this.readAll(),i=s.find(c=>c.rota===e);if(i&&n<i.expiresAt)return i.lastAccess=this.nextAccess(),this.writeAll(s),i.data;const l=this.inflight.get(e);if(l)return l;const d=this.revalidate(e,r,a,i??null).finally(()=>this.inflight.delete(e));return this.inflight.set(e,d),d}invalidate(e){const r=this.readAll().filter(a=>a.rota!==e);this.writeAll(r)}cleanup(e=3600){const r=Date.now()-e*1e3,a=this.readAll(),n=a.filter(s=>s.expiresAt>r);return this.writeAll(n),a.length-n.length}clear(){if(this.storage)try{this.storage.removeItem(this.storageKey)}catch{}}nextAccess(){return this.tick=Math.max(Date.now(),this.tick+1),this.tick}async revalidate(e,r,a,n){var s,i;const l=(s=a.fetcher)!==null&&s!==void 0?s:fetch;let d;try{const v=await l(e,a.fetchOptions);if(!v.ok)throw new Error(`HTTP ${v.status} ao buscar ${e}`);d=await v.json()}catch(v){if(n&&(!((i=a.staleOnError)!==null&&i!==void 0)||i))return this.upsert({...n,expiresAt:Date.now()+r,lastAccess:this.nextAccess()}),n.data;throw v}if(n&&a.monotonicKey){const v=os(n.data,a.monotonicKey),_=os(d,a.monotonicKey);if(typeof v=="number"&&typeof _=="number"&&_<=v)return this.upsert({...n,expiresAt:Date.now()+r,lastAccess:this.nextAccess()}),n.data}const c=Date.now();return this.upsert({rota:e,data:d,createdAt:c,expiresAt:c+r,lastAccess:this.nextAccess()}),d}upsert(e){const r=this.readAll().filter(a=>a.rota!==e.rota);r.push(e),this.evictIfNeeded(r),this.writeAll(r)}evictIfNeeded(e){for(;e.length>this.maxEntries;){let r=0;for(let a=1;a<e.length;a++)e[a].lastAccess<e[r].lastAccess&&(r=a);e.splice(r,1)}}readAll(){if(!this.storage)return[];try{const e=this.storage.getItem(this.storageKey);if(!e)return[];const r=JSON.parse(e);return Array.isArray(r)?r:[]}catch{return[]}}writeAll(e){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(e))}catch(r){if(Nl(r)&&e.length>0){const a=[...e].sort((n,s)=>n.lastAccess-s.lastAccess);a.splice(0,Math.ceil(a.length/2));try{this.storage.setItem(this.storageKey,JSON.stringify(a))}catch{}}}}}function os(t,e){return e.split(".").reduce((r,a)=>{if(r&&typeof r=="object"&&a in r)return r[a]},t)}function Nl(t){return t instanceof Error&&(t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")}function Ol(){try{if(typeof localStorage<"u"){const t="__reqcache_probe__";return localStorage.setItem(t,"1"),localStorage.removeItem(t),localStorage}}catch{}return null}new is;const ls=300,Ca=new Map;function Ea(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const Fl={getItem(t){return Ea()?localStorage.getItem(t):Ca.get(t)??null},setItem(t,e){if(Ea())try{localStorage.setItem(t,e)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else Ca.set(t,e)},removeItem(t){Ea()?localStorage.removeItem(t):Ca.delete(t)}};let ka=null;function Ul(){if(!ka){const{storageKey:t,maxEntries:e}=br().cache;ka=new is({storage:Fl,storageKey:t,maxEntries:e})}return ka}async function Hl(t,e,r=ls,a){const[n]=Ka(),s=t.replace(/^\/+/,""),i=new URL(s,`${n.replace(/\/+$/,"")}/`);let l;try{l=await Ul().getFetch(i.toString(),r*1e3,{monotonicKey:a,fetcher:Cs})}catch(d){throw d instanceof Error&&/^HTTP 404 /.test(d.message)?new Error("Dados ainda não publicados"):d}if(l&&typeof l=="object"&&l.published===!1)throw new Error(l.reason??"Dados ainda não publicados");return l}function Vl(t,e){const r=e?.round,a=e?.office;let n="br";return e?.municipalityId?n=`mun/${e.municipalityId}`:e?.state&&(n=`uf/${e.state.toUpperCase()}`),Hl(`v1/elections/${t}/r${r}/${a}/${n}/results.json`,void 0,ls,"summary.ballots_counted")}const Bl=new Set(["da","de","do","das","dos","e"]);function cs(t){return t.toLowerCase().split(" ").map((e,r)=>r>0&&Bl.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function ql(t){if(typeof t=="string"){const r=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(r)return new Date(Date.UTC(Number(r[1]),Number(r[2])-1,Number(r[3]),Number(r[4]),Number(r[5]),Number(r[6]??0)))}const e=new Date(t);return Number.isNaN(e.getTime())?null:e}function Aa(t){if(t==null||t==="")return"";const e=ql(t);if(!e)return"";const r=String(e.getUTCDate()).padStart(2,"0"),a=String(e.getUTCMonth()+1).padStart(2,"0"),n=e.getUTCFullYear(),s=String(e.getUTCHours()).padStart(2,"0"),i=String(e.getUTCMinutes()).padStart(2,"0");return`${r}/${a}/${n} às ${s}h${i}`}function ds(t,e="TSE"){const r=Aa(t);return r?`Atualizado em ${r} | Fonte ${e}`:`Fonte ${e}`}const jl=Aa("2022-10-31T00:18:00Z"),Kl=ds("2022-10-31T00:18:00Z");var Gl=x("<div><!></div>"),Wl=x('<div class="sevn_duel_state__candidates-web svelte-zzeoe9"></div>'),Zl=x("<div><!> <!></div>"),Yl=x('<div><!> <div class="sevn_duel_state__filter-web svelte-zzeoe9"><!></div> <!> <div class="sevn_duel_state__filter-mobile svelte-zzeoe9"><div class="sevn_duel_state__autocomplete svelte-zzeoe9"><!></div></div> <!></div>');const Jl={hash:"svelte-zzeoe9",code:`.sevn_duel_state.svelte-zzeoe9 {display:flex;flex-direction:column;gap:24px;}.sevn_duel_state--raw.svelte-zzeoe9,
|
|
81
|
+
.sevn_duel_state--raw.svelte-zzeoe9 :where(.svelte-zzeoe9) {all:revert;}
|
|
82
|
+
|
|
83
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_duel_state__filter-web.svelte-zzeoe9 {display:none;}.sevn_duel_state__candidates-web.svelte-zzeoe9 {display:none;}
|
|
84
|
+
|
|
85
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_duel_state__filter-mobile.svelte-zzeoe9 {display:flex;flex-direction:column;gap:8px;}
|
|
86
|
+
|
|
87
|
+
/* Dropdown inline no mobile */.sevn_duel_state__autocomplete.svelte-zzeoe9 .dropdown {position:static;margin-top:10px;}.sevn_duel_state__candidates-mobile.svelte-zzeoe9 {display:flex;flex-direction:column;gap:8px;}.sevn_duel_state__candidates-mobile.winner-left.svelte-zzeoe9 .duel-side.reverse {opacity:0.35;}.sevn_duel_state__candidates-mobile.winner-right.svelte-zzeoe9 .duel-side:not(.reverse) {opacity:0.35;}.sevn_duel_state.svelte-zzeoe9 .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_duel_state.svelte-zzeoe9 .vote-overview .vote-overview-stats {gap:8px;}
|
|
88
|
+
|
|
89
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
90
|
+
@media (min-width: 768px) {.sevn_duel_state__filter-web.svelte-zzeoe9 {display:block;}.sevn_duel_state__candidates-web.svelte-zzeoe9 {display:flex;flex-direction:row;gap:40px;}.sevn_duel_state__col.svelte-zzeoe9 {flex:1;transition:opacity 0.2s ease;}.sevn_duel_state__col--dimmed.svelte-zzeoe9 {opacity:0.35;}.sevn_duel_state__filter-mobile.svelte-zzeoe9 {display:none;}.sevn_duel_state__candidates-mobile.svelte-zzeoe9 {display:none;}
|
|
91
|
+
}`};function Ql(t,e){ir(e,!0),Pt(t,Jl);let r=D(e,"mock",3,!1),a=D(e,"rawStyle",3,!1),n=D(e,"data",3,null),s=D(e,"year",3,2026),i=D(e,"header",19,()=>({title:"Governador",description:"Selecione o estado e veja a apuração em tempo real",tag:"APURAÇÃO EM ANDAMENTO",tagColor:"#0E2A41"})),l=D(e,"showPosition",3,!1),d=D(e,"positionTagColor",3,void 0);const c=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}];let v=he("");const _=[{position:1,name:"Candidato A",acronym:"ABC",percent:50.9,votes:60345999,color:"#1e3461",elected:!1},{position:2,name:"Candidato B",acronym:"DEF",percent:49.1,votes:58206354,color:"#d97706",elected:!1}],u=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],m=H(()=>!r()&&n()?.states&&Array.isArray(n().states)&&n().states.length>0&&o(v)?(()=>{const z=n().states.find(q=>q.state.toLowerCase()===o(v));return z?.leader&&z?.runner_up?[{position:z.leader.position??1,name:cs(z.leader.name),photoUrl:z.leader.photo_url,acronym:z.leader.party_abbr,percent:z.leader.valid_votes_pct,votes:z.leader.votes,color:z.leader.party_color,elected:z.leader.elected??!1},{position:z.runner_up.position??2,name:cs(z.runner_up.name),photoUrl:z.runner_up.photo_url,acronym:z.runner_up.party_abbr,percent:z.runner_up.valid_votes_pct,votes:z.runner_up.votes,color:z.runner_up.party_color,elected:z.runner_up.elected??!1}]:[]})():r()?_:[]);let h=he(null);vr(()=>{if(r()||!o(v)){K(h,null);return}K(h,null),Vl(s(),{office:"governor",round:1,state:o(v)}).then(z=>{K(h,z?.summary??null,!0)}).catch(z=>{console.error("Failed to fetch state summary:",z)})});const A=H(()=>{if(r())return u;if(!o(h))return[];const{total_valid_votes:z,null_votes:q,blank_votes:ae}=o(h),W=z+q+ae;return[{text:"Nulos",value:`${(q/W*100).toFixed(2)}%`},{text:"Brancos",value:`${(ae/W*100).toFixed(2)}%`},{text:"Válidos",value:`${z.toLocaleString("pt-BR")} votos`}]}),E=H(()=>r()?jl:Aa(n()?.last_updated)),B=H(()=>r()?Kl:ds(n()?.last_updated)),w=H(()=>o(m).findIndex(z=>z.elected));var L=Yl();let G;var de=p(L);Il(de,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var Se=g(de,2),ne=p(Se);Tl(ne,{get states(){return c},get meta(){return o(B)},get value(){return o(v)},set value(z){K(v,z,!0)}});var Ce=g(Se,2);{var ut=z=>{var q=Wl();lt(q,21,()=>o(m),bt,(ae,W)=>{var ee=Gl();let oe;var ce=p(ee);{let ke=H(()=>[o(W)]);ss(ce,{layout:"stack",get candidates(){return o(ke)},avatarSize:"130px",barHeight:"24px",get showPosition(){return l()},get positionTagColor(){return d()}})}k(()=>oe=at(ee,1,"sevn_duel_state__col svelte-zzeoe9",null,oe,{"sevn_duel_state__col--dimmed":o(w)!==-1&&!o(W).elected})),b(ae,ee)}),b(z,q)};M(Ce,z=>{o(v)&&z(ut)})}var Q=g(Ce,2),se=p(Q),Ee=p(se);{let z=H(()=>o(v)?"Você selecionou:":"Busque por estado:");Do(Ee,{get label(){return o(z)},get options(){return c},get value(){return o(v)},set value(q){K(v,q,!0)}})}var T=g(Q,2);{var F=z=>{var q=Zl();let ae;var W=p(q);ss(W,{layout:"duel-compact",get candidates(){return o(m)},avatarSize:"sm",get showPosition(){return l()},get positionTagColor(){return d()}});var ee=g(W,2);Sa(ee,{get data(){return o(A)},get date(){return o(E)},font:"TSE"}),k(()=>ae=at(q,1,"sevn_duel_state__candidates-mobile svelte-zzeoe9",null,ae,{"winner-left":o(w)===0,"winner-right":o(w)===1})),b(z,q)};M(T,z=>{o(v)&&z(F)})}k(()=>G=at(L,1,"sevn_duel_state svelte-zzeoe9",null,G,{"sevn_duel_state--raw":a()})),b(t,L),or()}const vs=oo(Ql,"CandidateDuelStateResultViewer");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:ks,CandidateDuelStateResultViewer:vs}),co()),vs}));
|