@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.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +297 -0
  3. package/dist/index.cjs +603 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +351 -0
  6. package/dist/index.d.ts +351 -0
  7. package/dist/index.js +15609 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/styles.css +38 -0
  10. package/dist/umd/candidate-by-state.js +98 -0
  11. package/dist/umd/candidate-carrousel-state-results-viewer.js +108 -0
  12. package/dist/umd/candidate-counting-progress.js +77 -0
  13. package/dist/umd/candidate-duel-state-result-viewer.js +91 -0
  14. package/dist/umd/candidate-map-by-state.js +104 -0
  15. package/dist/umd/candidate-multi-ring-chart-performance-by-municipality.js +105 -0
  16. package/dist/umd/candidate-performance-by-municipality.js +105 -0
  17. package/dist/umd/candidate-ranking.js +59 -0
  18. package/dist/umd/candidate-results-by-municipality.js +103 -0
  19. package/dist/umd/counting-progress.js +125 -0
  20. package/dist/umd/current-leader.js +43 -0
  21. package/dist/umd/election-round-analysis.js +100 -0
  22. package/dist/umd/election-status.js +135 -0
  23. package/dist/umd/final-results.js +141 -0
  24. package/dist/umd/live-summary.js +36 -0
  25. package/dist/umd/municipality-perfomance-map.js +82 -0
  26. package/dist/umd/party-performance.js +99 -0
  27. package/dist/umd/results-by-office.js +94 -0
  28. package/dist/umd/round-results-analysis.js +99 -0
  29. package/dist/umd/state-leaders.js +118 -0
  30. package/dist/umd/state-winners.js +129 -0
  31. package/dist/umd/top-dispute.js +43 -0
  32. package/dist/umd/vote-comparison-by-round.js +76 -0
  33. package/dist/umd/vote-counting-progress.js +23 -0
  34. package/dist/umd/voting-map.js +112 -0
  35. package/package.json +96 -0
@@ -0,0 +1,105 @@
1
+ (function(W,Z){typeof exports=="object"&&typeof module<"u"?module.exports=Z():typeof define=="function"&&define.amd?define(Z):(W=typeof globalThis<"u"?globalThis:W||self,W.CandidateMultiRingChartPerformanceByMunicipality=Z())})(this,(function(){"use strict";var Ll=Object.defineProperty;var aa=W=>{throw TypeError(W)};var jl=(W,Z,ie)=>Z in W?Ll(W,Z,{enumerable:!0,configurable:!0,writable:!0,value:ie}):W[Z]=ie;var it=(W,Z,ie)=>jl(W,typeof Z!="symbol"?Z+"":Z,ie),Sr=(W,Z,ie)=>Z.has(W)||aa("Cannot "+ie);var v=(W,Z,ie)=>(Sr(W,Z,"read from private field"),ie?ie.call(W):Z.get(W)),F=(W,Z,ie)=>Z.has(W)?aa("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(W):Z.set(W,ie),P=(W,Z,ie,Vt)=>(Sr(W,Z,"write to private field"),Vt?Vt.call(W,ie):Z.set(W,ie),ie),ve=(W,Z,ie)=>(Sr(W,Z,"access private method"),ie);var an,on,Nt,sn,Cn,An,Dt,vt,ln,Te,Er,zr,Cr,oa,Ye,xr,ht,Ut,Qe,$e,Me,et,pt,Bt,zt,cn,un,fn,_t,Un,de,Pl,Il,Ar,Hn,Vn,Tr,Je,tt,Re,Ht,Tn,Mn,Bn,ia;class W 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 Z extends Error{constructor(t,n){super(`Não foi possível contatar a API para ${t}.`),this.name="SevnNetworkError",this.cause=n}}const ie="__sevnElectionsState_v1__",Vt=globalThis;function Mr(e){return Vt[ie]||(Vt[ie]={config:e(),transport:{activeIndex:0,pinnedAt:0}}),Vt[ie]}const sa="https://failover-api.sevntech.com",la=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Rr(){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 ca=Rr;function Kt(){return Mr(Rr)}function ua(e){return[`https://${e}-api1.sevnelections.com`,`https://${e}-api2.sevnelections.com`,sa]}function Kn(e){if(typeof e!="string"||!la.test(e))throw new Error(`[sevn] Chave inválida: ${JSON.stringify(e)}. Use apenas letras, números e hífen (a chave vira subdomínio da API).`);const t=Kt();t.config.key=e,t.config.apiHosts=ua(e)}function Lr(e){const{cache:t,request:n,key:r,...i}=e,a=Kt();a.config={...a.config,...i,cache:{...a.config.cache,...t},request:{...a.config.request,...n}},r&&(Kn(r),i.apiHosts&&(a.config.apiHosts=i.apiHosts))}function dn(){return Kt().config}function jr(){return Kt().config.apiHosts.length>0}function Pr(){if(!jr())throw new W;return Kt().config.apiHosts}function fa(e){const{assetsBase:t,assetsVersion:n}=Kt().config,r=t.replace(/\/+$/,""),i=String(e).replace(/^\/+/,"");return`${r}/${n}/${i}`}const da=':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}',at=typeof window<"u"&&typeof document<"u",Ir="data-sevn-tokens",Or="data-sevn-theme",qr={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 va(){if(!at||document.querySelector(`style[${Ir}]`))return;const e=document.createElement("style");e.setAttribute(Ir,""),e.textContent=da,document.head.prepend(e);const t=dn().theme;t&&Gn(t)}function Gn(e){if(!at)return;const t=Object.keys(qr).filter(r=>e[r]).map(r=>` ${qr[r]}: ${e[r]};`);if(t.length===0)return;let n=document.querySelector(`style[${Or}]`);n||(n=document.createElement("style"),n.setAttribute(Or,""),document.head.appendChild(n)),n.textContent=`:root {
2
+ ${t.join(`
3
+ `)}
4
+ }`}function Fr(){return Mr(ca).transport}function Nr(e){return new Promise(t=>setTimeout(t,e))}function ha(e,t){const n=AbortSignal.timeout(e);return t&&typeof AbortSignal.any=="function"?AbortSignal.any([t,n]):n}function pa(e,t){const n=new URL(e),r=new URL(t);return n.protocol=r.protocol,n.host=r.host,n.toString()}function _a(e,t){return Array.from({length:t},(n,r)=>(e+r)%t)}const ga=async(e,t)=>{const n=typeof e=="string"?e:e instanceof URL?e.toString():e.url,r=Pr(),{timeoutMs:i,retriesPerHost:a,retryDelayMs:o,stickyWindowMs:c}=dn().request,s=Fr();s.activeIndex!==0&&Date.now()-s.pinnedAt>=c&&(s.activeIndex=0);let u=null;for(const d of _a(s.activeIndex,r.length)){const _=pa(n,r[d]);for(let f=0;f<a;f++)try{const h=await fetch(_,{...t,signal:ha(i,t?.signal)});if(h.status>=500){u=new Error(`HTTP ${h.status} em ${r[d]}`),f<a-1&&await Nr(o);continue}return s.activeIndex=d,s.pinnedAt=Date.now(),h}catch(h){u=h,f<a-1&&await Nr(o)}}throw new Z(n,u)};function ma(){return dn().apiHosts[Fr().activeIndex]??null}const wa={applyKey:Kn,configure(e){Lr(e),e.theme&&Gn(e.theme)},getConfig:dn,isReady:jr,assetUrl:fa,setTheme(e){Lr({theme:e}),Gn(e)},activeHost:ma},Wn=!1;var Dr=Array.isArray,ba=Array.prototype.indexOf,Gt=Array.prototype.includes,Rn=Array.from,ya=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,xa=Object.getOwnPropertyDescriptors,ka=Object.prototype,Sa=Array.prototype,Ur=Object.getPrototypeOf,Br=Object.isExtensible;const Ea=()=>{};function za(e){for(var t=0;t<e.length;t++)e[t]()}function Hr(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const he=2,vn=4,Ln=8,Vr=1<<24,ot=16,Ue=32,At=64,Yn=128,je=512,fe=1024,pe=2048,Be=4096,ze=8192,st=16384,Tt=32768,Yt=65536,Kr=1<<17,Gr=1<<18,Jt=1<<19,Ca=1<<20,lt=1<<25,Mt=65536,Jn=1<<21,Xn=1<<22,mt=1<<23,hn=Symbol("$state"),Aa=Symbol("legacy props"),Ta=Symbol(""),Rt=new class extends Error{constructor(){super(...arguments);it(this,"name","StaleReactionError");it(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ma(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ra(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function La(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ja(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Pa(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ia(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Oa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qa(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Fa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Na(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Da(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ua(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ba=1,Ha=2,Wr=4,Va=8,Ka=16,Ga=1,Wa=4,Ya=8,Ja=16,Xa=1,Za=2,_e=Symbol(),Yr="http://www.w3.org/1999/xhtml";function Qa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Jr(e){return e===this.v}function $a(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Xr(e){return!$a(e,this.v)}let eo=!1,Ce=null;function Xt(e){Ce=e}function Zt(e,t=!1,n){Ce={p:Ce,i:!1,c:null,e:null,s:e,x:null,l:null}}function Qt(e){var t=Ce,n=t.e;if(n!==null){t.e=null;for(var r of n)bi(r)}return t.i=!0,Ce=t.p,{}}function Zr(){return!0}let Lt=[];function Qr(){var e=Lt;Lt=[],za(e)}function ct(e){if(Lt.length===0&&!pn){var t=Lt;queueMicrotask(()=>{t===Lt&&Qr()})}Lt.push(e)}function to(){for(;Lt.length>0;)Qr()}function $r(e){var t=H;if(t===null)return O.f|=mt,e;if((t.f&Tt)===0&&(t.f&vn)===0)throw e;$t(e,t)}function $t(e,t){for(;t!==null;){if((t.f&Yn)!==0){if((t.f&Tt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const no=-7169;function ae(e,t){e.f=e.f&no|t}function Zn(e){(e.f&je)!==0||e.deps===null?ae(e,fe):ae(e,Be)}function ei(e){if(e!==null)for(const t of e)(t.f&he)===0||(t.f&Mt)===0||(t.f^=Mt,ei(t.deps))}function ti(e,t,n){(e.f&pe)!==0?t.add(e):(e.f&Be)!==0&&n.add(e),ei(e.deps),ae(e,fe)}const jn=new Set;let V=null,Qn=null,He=null,xe=[],Pn=null,$n=!1,pn=!1;const yr=class yr{constructor(){F(this,Te);it(this,"committed",!1);it(this,"current",new Map);it(this,"previous",new Map);F(this,an,new Set);F(this,on,new Set);F(this,Nt,0);F(this,sn,0);F(this,Cn,null);F(this,An,new Set);F(this,Dt,new Set);F(this,vt,new Map);it(this,"is_fork",!1);F(this,ln,!1)}skip_effect(t){v(this,vt).has(t)||v(this,vt).set(t,{d:[],m:[]})}unskip_effect(t){var n=v(this,vt).get(t);if(n){v(this,vt).delete(t);for(var r of n.d)ae(r,pe),Ve(r);for(r of n.m)ae(r,Be),Ve(r)}}process(t){xe=[],this.apply();var n=[],r=[];for(const i of t)ve(this,Te,zr).call(this,i,n,r);if(ve(this,Te,Er).call(this)){ve(this,Te,Cr).call(this,r),ve(this,Te,Cr).call(this,n);for(const[i,a]of v(this,vt))oi(i,a)}else{for(const i of v(this,an))i();v(this,an).clear(),v(this,Nt)===0&&ve(this,Te,oa).call(this),Qn=this,V=null,ri(r),ri(n),Qn=null,v(this,Cn)?.resolve()}He=null}capture(t,n){n!==_e&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&mt)===0&&(this.current.set(t,t.v),He?.set(t,t.v))}activate(){V=this,this.apply()}deactivate(){V===this&&(V=null,He=null)}flush(){if(this.activate(),xe.length>0){if(ni(),V!==null&&V!==this)return}else v(this,Nt)===0&&this.process([]);this.deactivate()}discard(){for(const t of v(this,on))t(this);v(this,on).clear()}increment(t){P(this,Nt,v(this,Nt)+1),t&&P(this,sn,v(this,sn)+1)}decrement(t){P(this,Nt,v(this,Nt)-1),t&&P(this,sn,v(this,sn)-1),!v(this,ln)&&(P(this,ln,!0),ct(()=>{P(this,ln,!1),ve(this,Te,Er).call(this)?xe.length>0&&this.flush():this.revive()}))}revive(){for(const t of v(this,An))v(this,Dt).delete(t),ae(t,pe),Ve(t);for(const t of v(this,Dt))ae(t,Be),Ve(t);this.flush()}oncommit(t){v(this,an).add(t)}ondiscard(t){v(this,on).add(t)}settled(){return(v(this,Cn)??P(this,Cn,Hr())).promise}static ensure(){if(V===null){const t=V=new yr;jn.add(V),pn||ct(()=>{V===t&&t.flush()})}return V}apply(){}};an=new WeakMap,on=new WeakMap,Nt=new WeakMap,sn=new WeakMap,Cn=new WeakMap,An=new WeakMap,Dt=new WeakMap,vt=new WeakMap,ln=new WeakMap,Te=new WeakSet,Er=function(){return this.is_fork||v(this,sn)>0},zr=function(t,n,r){t.f^=fe;for(var i=t.first;i!==null;){var a=i.f,o=(a&(Ue|At))!==0,c=o&&(a&fe)!==0,s=c||(a&ze)!==0||v(this,vt).has(i);if(!s&&i.fn!==null){o?i.f^=fe:(a&vn)!==0?n.push(i):wn(i)&&((a&ot)!==0&&v(this,Dt).add(i),tn(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var d=i.next;if(d!==null){i=d;break}i=i.parent}}},Cr=function(t){for(var n=0;n<t.length;n+=1)ti(t[n],v(this,An),v(this,Dt))},oa=function(){var i;if(jn.size>1){this.previous.clear();var t=He,n=!0;for(const a of jn){if(a===this){n=!1;continue}const o=[];for(const[s,u]of this.current){if(a.current.has(s))if(n&&u!==a.current.get(s))a.current.set(s,u);else continue;o.push(s)}if(o.length===0)continue;const c=[...a.current.keys()].filter(s=>!this.current.has(s));if(c.length>0){var r=xe;xe=[];const s=new Set,u=new Map;for(const d of o)ii(d,c,s,u);if(xe.length>0){V=a,a.apply();for(const d of xe)ve(i=a,Te,zr).call(i,d,[],[]);a.deactivate()}xe=r}}V=null,He=t}this.committed=!0,jn.delete(this)};let wt=yr;function ro(e){var t=pn;pn=!0;try{for(var n;;){if(to(),xe.length===0&&(V?.flush(),xe.length===0))return Pn=null,n;ni()}}finally{pn=t}}function ni(){$n=!0;var e=null;try{for(var t=0;xe.length>0;){var n=wt.ensure();if(t++>1e3){var r,i;io()}n.process(xe),bt.clear()}}finally{xe=[],$n=!1,Pn=null}}function io(){try{Oa()}catch(e){$t(e,Pn)}}let ut=null;function ri(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(st|ze))===0&&wn(r)&&(ut=new Set,tn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ki(r),ut?.size>0)){bt.clear();for(const i of ut){if((i.f&(st|ze))!==0)continue;const a=[i];let o=i.parent;for(;o!==null;)ut.has(o)&&(ut.delete(o),a.push(o)),o=o.parent;for(let c=a.length-1;c>=0;c--){const s=a[c];(s.f&(st|ze))===0&&tn(s)}}ut.clear()}}ut=null}}function ii(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const a=i.f;(a&he)!==0?ii(i,t,n,r):(a&(Xn|ot))!==0&&(a&pe)===0&&ai(i,t,r)&&(ae(i,pe),Ve(i))}}function ai(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Gt.call(t,i))return!0;if((i.f&he)!==0&&ai(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Ve(e){var t=Pn=e,n=t.b;if(n?.is_pending&&(e.f&(vn|Ln|Vr))!==0&&(e.f&Tt)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if($n&&t===H&&(r&ot)!==0&&(r&Gr)===0&&(r&Tt)!==0)return;if((r&(At|Ue))!==0){if((r&fe)===0)return;t.f^=fe}}xe.push(t)}function oi(e,t){if(!((e.f&Ue)!==0&&(e.f&fe)!==0)){(e.f&pe)!==0?t.d.push(e):(e.f&Be)!==0&&t.m.push(e),ae(e,fe);for(var n=e.first;n!==null;)oi(n,t),n=n.next}}function ao(e){let t=0,n=jt(0),r;return()=>{rr()&&(l(n),ir(()=>(t===0&&(r=yn(()=>e(()=>_n(n)))),t+=1,()=>{ct(()=>{t-=1,t===0&&(r?.(),r=void 0,_n(n))})})))}}var oo=Yt|Jt;function so(e,t,n){new lo(e,t,n)}class lo{constructor(t,n,r){F(this,de);it(this,"parent");it(this,"is_pending",!1);F(this,Ye);F(this,xr,null);F(this,ht);F(this,Ut);F(this,Qe);F(this,$e,null);F(this,Me,null);F(this,et,null);F(this,pt,null);F(this,Bt,0);F(this,zt,0);F(this,cn,!1);F(this,un,new Set);F(this,fn,new Set);F(this,_t,null);F(this,Un,ao(()=>(P(this,_t,jt(v(this,Bt))),()=>{P(this,_t,null)})));P(this,Ye,t),P(this,ht,n),P(this,Ut,i=>{var a=H;a.b=this,a.f|=Yn,r(i)}),this.parent=H.b,P(this,Qe,ar(()=>{ve(this,de,Ar).call(this)},oo))}defer_effect(t){ti(t,v(this,un),v(this,fn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!v(this,ht).pending}update_pending_count(t){ve(this,de,Tr).call(this,t),P(this,Bt,v(this,Bt)+t),!(!v(this,_t)||v(this,cn))&&(P(this,cn,!0),ct(()=>{P(this,cn,!1),v(this,_t)&&en(v(this,_t),v(this,Bt))}))}get_effect_pending(){return v(this,Un).call(this),l(v(this,_t))}error(t){var n=v(this,ht).onerror;let r=v(this,ht).failed;if(!n&&!r)throw t;v(this,$e)&&(ke(v(this,$e)),P(this,$e,null)),v(this,Me)&&(ke(v(this,Me)),P(this,Me,null)),v(this,et)&&(ke(v(this,et)),P(this,et,null));var i=!1,a=!1;const o=()=>{if(i){Qa();return}i=!0,a&&Ua(),v(this,et)!==null&&It(v(this,et),()=>{P(this,et,null)}),ve(this,de,Vn).call(this,()=>{wt.ensure(),ve(this,de,Ar).call(this)})};ct(()=>{try{a=!0,n?.(t,o),a=!1}catch(c){$t(c,v(this,Qe)&&v(this,Qe).parent)}r&&P(this,et,ve(this,de,Vn).call(this,()=>{wt.ensure();try{return Ke(()=>{var c=H;c.b=this,c.f|=Yn,r(v(this,Ye),()=>t,()=>o)})}catch(c){return $t(c,v(this,Qe).parent),null}}))})}}Ye=new WeakMap,xr=new WeakMap,ht=new WeakMap,Ut=new WeakMap,Qe=new WeakMap,$e=new WeakMap,Me=new WeakMap,et=new WeakMap,pt=new WeakMap,Bt=new WeakMap,zt=new WeakMap,cn=new WeakMap,un=new WeakMap,fn=new WeakMap,_t=new WeakMap,Un=new WeakMap,de=new WeakSet,Pl=function(){try{P(this,$e,Ke(()=>v(this,Ut).call(this,v(this,Ye))))}catch(t){this.error(t)}},Il=function(){const t=v(this,ht).pending;t&&(this.is_pending=!0,P(this,Me,Ke(()=>t(v(this,Ye)))),ct(()=>{var n=P(this,pt,document.createDocumentFragment()),r=yt();n.append(r),P(this,$e,ve(this,de,Vn).call(this,()=>(wt.ensure(),Ke(()=>v(this,Ut).call(this,r))))),v(this,zt)===0&&(v(this,Ye).before(n),P(this,pt,null),It(v(this,Me),()=>{P(this,Me,null)}),ve(this,de,Hn).call(this))}))},Ar=function(){try{if(this.is_pending=this.has_pending_snippet(),P(this,zt,0),P(this,Bt,0),P(this,$e,Ke(()=>{v(this,Ut).call(this,v(this,Ye))})),v(this,zt)>0){var t=P(this,pt,document.createDocumentFragment());zi(v(this,$e),t);const n=v(this,ht).pending;P(this,Me,Ke(()=>n(v(this,Ye))))}else ve(this,de,Hn).call(this)}catch(n){this.error(n)}},Hn=function(){this.is_pending=!1;for(const t of v(this,un))ae(t,pe),Ve(t);for(const t of v(this,fn))ae(t,Be),Ve(t);v(this,un).clear(),v(this,fn).clear()},Vn=function(t){var n=H,r=O,i=Ce;Ze(v(this,Qe)),Pe(v(this,Qe)),Xt(v(this,Qe).ctx);try{return t()}catch(a){return $r(a),null}finally{Ze(n),Pe(r),Xt(i)}},Tr=function(t){var n;if(!this.has_pending_snippet()){this.parent&&ve(n=this.parent,de,Tr).call(n,t);return}P(this,zt,v(this,zt)+t),v(this,zt)===0&&(ve(this,de,Hn).call(this),v(this,Me)&&It(v(this,Me),()=>{P(this,Me,null)}),v(this,pt)&&(v(this,Ye).before(v(this,pt)),P(this,pt,null)))};function co(e,t,n,r){const i=In;var a=e.filter(f=>!f.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=V,c=H,s=uo(),u=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(f=>f.promise)):null;function d(f){s();try{r(f)}catch(h){(c.f&st)===0&&$t(h,c)}o?.deactivate(),er()}if(n.length===0){u.then(()=>d(t.map(i)));return}function _(){s(),Promise.all(n.map(f=>vo(f))).then(f=>d([...t.map(i),...f])).catch(f=>$t(f,c))}u?u.then(_):_()}function uo(){var e=H,t=O,n=Ce,r=V;return function(a=!0){Ze(e),Pe(t),Xt(n),a&&r?.activate()}}function er(){Ze(null),Pe(null),Xt(null)}function fo(){var e=H.b,t=V,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function In(e){var t=he|pe,n=O!==null&&(O.f&he)!==0?O:null;return H!==null&&(H.f|=Jt),{ctx:Ce,deps:null,effects:null,equals:Jr,f:t,fn:e,reactions:null,rv:0,v:_e,wv:0,parent:n??H,ac:null}}function vo(e,t,n){H===null&&Ra();var i=void 0,a=jt(_e),o=!O,c=new Map;return zo(()=>{var s=Hr();i=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).then(()=>{u===V&&u.committed&&u.deactivate(),er()})}catch(f){s.reject(f),er()}var u=V;if(o){var d=fo();c.get(u)?.reject(Rt),c.delete(u),c.set(u,s)}const _=(f,h=void 0)=>{if(u.activate(),h)h!==Rt&&(a.f|=mt,en(a,h));else{(a.f&mt)!==0&&(a.f^=mt),en(a,f);for(const[g,S]of c){if(c.delete(g),g===u)break;S.reject(Rt)}}d&&d()};s.promise.then(_,f=>_(null,f||"unknown"))}),wi(()=>{for(const s of c.values())s.reject(Rt)}),new Promise(s=>{function u(d){function _(){d===i?s(a):u(i)}d.then(_,_)}u(i)})}function re(e){const t=In(e);return Ai(t),t}function si(e){const t=In(e);return t.equals=Xr,t}function ho(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ke(t[n])}}function po(e){for(var t=e.parent;t!==null;){if((t.f&he)===0)return(t.f&st)===0?t:null;t=t.parent}return null}function tr(e){var t,n=H;Ze(po(e));try{e.f&=~Mt,ho(e),t=ji(e)}finally{Ze(n)}return t}function li(e){var t=tr(e);if(!e.equals(t)&&(e.wv=Ri(),(!V?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){ae(e,fe);return}kt||(He!==null?(rr()||V?.is_fork)&&He.set(e,t):Zn(e))}function _o(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Rt),t.teardown=Ea,t.ac=null,bn(t,0),or(t))}function ci(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&tn(t)}let nr=new Set;const bt=new Map;let ui=!1;function jt(e,t){var n={f:0,v:e,reactions:null,equals:Jr,rv:0,wv:0};return n}function ne(e,t){const n=jt(e);return Ai(n),n}function go(e,t=!1,n=!0){const r=jt(e);return t||(r.equals=Xr),r}function y(e,t,n=!1){O!==null&&(!Ge||(O.f&Kr)!==0)&&Zr()&&(O.f&(he|ot|Xn|Kr))!==0&&(Ie===null||!Gt.call(Ie,e))&&Da();let r=n?Xe(t):t;return en(e,r)}function en(e,t){if(!e.equals(t)){var n=e.v;kt?bt.set(e,t):bt.set(e,n),e.v=t;var r=wt.ensure();if(r.capture(e,n),(e.f&he)!==0){const i=e;(e.f&pe)!==0&&tr(i),Zn(i)}e.wv=Ri(),fi(e,pe),H!==null&&(H.f&fe)!==0&&(H.f&(Ue|At))===0&&(Oe===null?To([e]):Oe.push(e)),!r.is_fork&&nr.size>0&&!ui&&mo()}return t}function mo(){ui=!1;for(const e of nr)(e.f&fe)!==0&&ae(e,Be),wn(e)&&tn(e);nr.clear()}function _n(e){y(e,e.v+1)}function fi(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var a=n[i],o=a.f,c=(o&pe)===0;if(c&&ae(a,t),(o&he)!==0){var s=a;He?.delete(s),(o&Mt)===0&&(o&je&&(a.f|=Mt),fi(s,Be))}else c&&((o&ot)!==0&&ut!==null&&ut.add(a),Ve(a))}}function Xe(e){if(typeof e!="object"||e===null||hn in e)return e;const t=Ur(e);if(t!==ka&&t!==Sa)return e;var n=new Map,r=Dr(e),i=ne(0),a=qt,o=c=>{if(qt===a)return c();var s=O,u=qt;Pe(null),Mi(a);var d=c();return Pe(s),Mi(u),d};return r&&n.set("length",ne(e.length)),new Proxy(e,{defineProperty(c,s,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Fa();var d=n.get(s);return d===void 0?o(()=>{var _=ne(u.value);return n.set(s,_),_}):y(d,u.value,!0),!0},deleteProperty(c,s){var u=n.get(s);if(u===void 0){if(s in c){const d=o(()=>ne(_e));n.set(s,d),_n(i)}}else y(u,_e),_n(i);return!0},get(c,s,u){if(s===hn)return e;var d=n.get(s),_=s in c;if(d===void 0&&(!_||Wt(c,s)?.writable)&&(d=o(()=>{var h=Xe(_?c[s]:_e),g=ne(h);return g}),n.set(s,d)),d!==void 0){var f=l(d);return f===_e?void 0:f}return Reflect.get(c,s,u)},getOwnPropertyDescriptor(c,s){var u=Reflect.getOwnPropertyDescriptor(c,s);if(u&&"value"in u){var d=n.get(s);d&&(u.value=l(d))}else if(u===void 0){var _=n.get(s),f=_?.v;if(_!==void 0&&f!==_e)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return u},has(c,s){if(s===hn)return!0;var u=n.get(s),d=u!==void 0&&u.v!==_e||Reflect.has(c,s);if(u!==void 0||H!==null&&(!d||Wt(c,s)?.writable)){u===void 0&&(u=o(()=>{var f=d?Xe(c[s]):_e,h=ne(f);return h}),n.set(s,u));var _=l(u);if(_===_e)return!1}return d},set(c,s,u,d){var _=n.get(s),f=s in c;if(r&&s==="length")for(var h=u;h<_.v;h+=1){var g=n.get(h+"");g!==void 0?y(g,_e):h in c&&(g=o(()=>ne(_e)),n.set(h+"",g))}if(_===void 0)(!f||Wt(c,s)?.writable)&&(_=o(()=>ne(void 0)),y(_,Xe(u)),n.set(s,_));else{f=_.v!==_e;var S=o(()=>Xe(u));y(_,S)}var p=Reflect.getOwnPropertyDescriptor(c,s);if(p?.set&&p.set.call(d,u),!f){if(r&&typeof s=="string"){var x=n.get("length"),w=Number(s);Number.isInteger(w)&&w>=x.v&&y(x,w+1)}_n(i)}return!0},ownKeys(c){l(i);var s=Reflect.ownKeys(c).filter(_=>{var f=n.get(_);return f===void 0||f.v!==_e});for(var[u,d]of n)d.v!==_e&&!(u in c)&&s.push(u);return s},setPrototypeOf(){Na()}})}var di,vi,hi,pi;function wo(){if(di===void 0){di=window,vi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;hi=Wt(t,"firstChild").get,pi=Wt(t,"nextSibling").get,Br(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Br(n)&&(n.__t=void 0)}}function yt(e=""){return document.createTextNode(e)}function xt(e){return hi.call(e)}function gn(e){return pi.call(e)}function b(e,t){return xt(e)}function mn(e,t=!1){{var n=xt(e);return n instanceof Comment&&n.data===""?gn(n):n}}function L(e,t=1,n=!1){let r=e;for(;t--;)r=gn(r);return r}function bo(e){e.textContent=""}function _i(){return!1}function gi(e,t,n){return document.createElementNS(Yr,e,void 0)}let mi=!1;function yo(){mi||(mi=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function On(e){var t=O,n=H;Pe(null),Ze(null);try{return e()}finally{Pe(t),Ze(n)}}function xo(e,t,n,r=n){e.addEventListener(t,()=>On(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),yo()}function ko(e){H===null&&(O===null&&Ia(),Pa()),kt&&ja()}function So(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ft(e,t,n){var r=H;r!==null&&(r.f&ze)!==0&&(e|=ze);var i={ctx:Ce,deps:null,nodes:null,f:e|pe|je,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{tn(i)}catch(c){throw ke(i),c}else t!==null&&Ve(i);var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&Jt)===0&&(a=a.first,(e&ot)!==0&&(e&Yt)!==0&&a!==null&&(a.f|=Yt)),a!==null&&(a.parent=r,r!==null&&So(a,r),O!==null&&(O.f&he)!==0&&(e&At)===0)){var o=O;(o.effects??(o.effects=[])).push(a)}return i}function rr(){return O!==null&&!Ge}function wi(e){const t=ft(Ln,null,!1);return ae(t,fe),t.teardown=e,t}function Pt(e){ko();var t=H.f,n=!O&&(t&Ue)!==0&&(t&Tt)===0;if(n){var r=Ce;(r.e??(r.e=[])).push(e)}else return bi(e)}function bi(e){return ft(vn|Ca,e,!1)}function Eo(e){wt.ensure();const t=ft(At|Jt,e,!0);return(n={})=>new Promise(r=>{n.outro?It(t,()=>{ke(t),r(void 0)}):(ke(t),r(void 0))})}function yi(e){return ft(vn,e,!1)}function zo(e){return ft(Xn|Jt,e,!0)}function ir(e,t=0){return ft(Ln|t,e,!0)}function j(e,t=[],n=[],r=[]){co(r,t,n,i=>{ft(Ln,()=>e(...i.map(l)),!0)})}function ar(e,t=0){var n=ft(ot|t,e,!0);return n}function Ke(e){return ft(Ue|Jt,e,!0)}function xi(e){var t=e.teardown;if(t!==null){const n=kt,r=O;Ci(!0),Pe(null);try{t.call(null)}finally{Ci(n),Pe(r)}}}function or(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&On(()=>{i.abort(Rt)});var r=n.next;(n.f&At)!==0?n.parent=null:ke(n,t),n=r}}function Co(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Ue)===0&&ke(t),t=n}}function ke(e,t=!0){var n=!1;(t||(e.f&Gr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ao(e.nodes.start,e.nodes.end),n=!0),or(e,t&&!n),bn(e,0),ae(e,st);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();xi(e);var i=e.parent;i!==null&&i.first!==null&&ki(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ao(e,t){for(;e!==null;){var n=e===t?null:gn(e);e.remove(),e=n}}function ki(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function It(e,t,n=!0){var r=[];Si(e,r,!0);var i=()=>{n&&ke(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var c of r)c.out(o)}else i()}function Si(e,t,n){if((e.f&ze)===0){e.f^=ze;var r=e.nodes&&e.nodes.t;if(r!==null)for(const c of r)(c.is_global||n)&&t.push(c);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&Yt)!==0||(i.f&Ue)!==0&&(e.f&ot)!==0;Si(i,t,o?n:!1),i=a}}}function sr(e){Ei(e,!0)}function Ei(e,t){if((e.f&ze)!==0){e.f^=ze,(e.f&fe)===0&&(ae(e,pe),Ve(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Yt)!==0||(n.f&Ue)!==0;Ei(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const o of a)(o.is_global||t)&&o.in()}}function zi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:gn(n);t.append(n),n=i}}let qn=!1,kt=!1;function Ci(e){kt=e}let O=null,Ge=!1;function Pe(e){O=e}let H=null;function Ze(e){H=e}let Ie=null;function Ai(e){O!==null&&(Ie===null?Ie=[e]:Ie.push(e))}let Se=null,Ae=0,Oe=null;function To(e){Oe=e}let Ti=1,Ot=0,qt=Ot;function Mi(e){qt=e}function Ri(){return++Ti}function wn(e){var t=e.f;if((t&pe)!==0)return!0;if(t&he&&(e.f&=~Mt),(t&Be)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(wn(a)&&li(a),a.wv>e.wv)return!0}(t&je)!==0&&He===null&&ae(e,fe)}return!1}function Li(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ie!==null&&Gt.call(Ie,e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&he)!==0?Li(a,t,!1):t===a&&(n?ae(a,pe):(a.f&fe)!==0&&ae(a,Be),Ve(a))}}function ji(e){var S;var t=Se,n=Ae,r=Oe,i=O,a=Ie,o=Ce,c=Ge,s=qt,u=e.f;Se=null,Ae=0,Oe=null,O=(u&(Ue|At))===0?e:null,Ie=null,Xt(e.ctx),Ge=!1,qt=++Ot,e.ac!==null&&(On(()=>{e.ac.abort(Rt)}),e.ac=null);try{e.f|=Jn;var d=e.fn,_=d();e.f|=Tt;var f=e.deps,h=V?.is_fork;if(Se!==null){var g;if(h||bn(e,Ae),f!==null&&Ae>0)for(f.length=Ae+Se.length,g=0;g<Se.length;g++)f[Ae+g]=Se[g];else e.deps=f=Se;if(rr()&&(e.f&je)!==0)for(g=Ae;g<f.length;g++)((S=f[g]).reactions??(S.reactions=[])).push(e)}else!h&&f!==null&&Ae<f.length&&(bn(e,Ae),f.length=Ae);if(Zr()&&Oe!==null&&!Ge&&f!==null&&(e.f&(he|Be|pe))===0)for(g=0;g<Oe.length;g++)Li(Oe[g],e);if(i!==null&&i!==e){if(Ot++,i.deps!==null)for(let p=0;p<n;p+=1)i.deps[p].rv=Ot;if(t!==null)for(const p of t)p.rv=Ot;Oe!==null&&(r===null?r=Oe:r.push(...Oe))}return(e.f&mt)!==0&&(e.f^=mt),_}catch(p){return $r(p)}finally{e.f^=Jn,Se=t,Ae=n,Oe=r,O=i,Ie=a,Xt(o),Ge=c,qt=s}}function Mo(e,t){let n=t.reactions;if(n!==null){var r=ba.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&he)!==0&&(Se===null||!Gt.call(Se,t))){var a=t;(a.f&je)!==0&&(a.f^=je,a.f&=~Mt),Zn(a),_o(a),bn(a,0)}}function bn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Mo(e,n[r])}function tn(e){var t=e.f;if((t&st)===0){ae(e,fe);var n=H,r=qn;H=e,qn=!0;try{(t&(ot|Vr))!==0?Co(e):or(e),xi(e);var i=ji(e);e.teardown=typeof i=="function"?i:null,e.wv=Ti;var a;Wn&&eo&&(e.f&pe)!==0&&e.deps}finally{qn=r,H=n}}}async function Ro(){await Promise.resolve(),ro()}function l(e){var t=e.f,n=(t&he)!==0;if(O!==null&&!Ge){var r=H!==null&&(H.f&st)!==0;if(!r&&(Ie===null||!Gt.call(Ie,e))){var i=O.deps;if((O.f&Jn)!==0)e.rv<Ot&&(e.rv=Ot,Se===null&&i!==null&&i[Ae]===e?Ae++:Se===null?Se=[e]:Se.push(e));else{(O.deps??(O.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[O]:Gt.call(a,O)||a.push(O)}}}if(kt&&bt.has(e))return bt.get(e);if(n){var o=e;if(kt){var c=o.v;return((o.f&fe)===0&&o.reactions!==null||Ii(o))&&(c=tr(o)),bt.set(o,c),c}var s=(o.f&je)===0&&!Ge&&O!==null&&(qn||(O.f&je)!==0),u=(o.f&Tt)===0;wn(o)&&(s&&(o.f|=je),li(o)),s&&!u&&(ci(o),Pi(o))}if(He?.has(e))return He.get(e);if((e.f&mt)!==0)throw e.v;return e.v}function Pi(e){if(e.f|=je,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&he)!==0&&(t.f&je)===0&&(ci(t),Pi(t))}function Ii(e){if(e.v===_e)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(bt.has(t)||(t.f&he)!==0&&Ii(t))return!0;return!1}function yn(e){var t=Ge;try{return Ge=!0,e()}finally{Ge=t}}const Lo=["touchstart","touchmove"];function jo(e){return Lo.includes(e)}const Ft=Symbol("events"),Oi=new Set,lr=new Set;function Po(e,t,n,r={}){function i(a){if(r.capture||cr.call(t,a),!a.cancelBubble)return On(()=>n?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ct(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function qi(e,t,n,r,i){var a={capture:r,passive:i},o=Po(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&wi(()=>{t.removeEventListener(e,o,a)})}function dt(e,t,n){(t[Ft]??(t[Ft]={}))[e]=n}function Fi(e){for(var t=0;t<e.length;t++)Oi.add(e[t]);for(var n of lr)n(e)}let Ni=null;function cr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;Ni=e;var o=0,c=Ni===e&&e[Ft];if(c){var s=i.indexOf(c);if(s!==-1&&(t===document||t===window)){e[Ft]=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(o=s)}if(a=i[o]||e.target,a!==t){ya(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=O,_=H;Pe(null),Ze(null);try{for(var f,h=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var S=a[Ft]?.[r];S!=null&&(!a.disabled||e.target===a)&&S.call(a,e)}catch(p){f?h.push(p):f=p}if(e.cancelBubble||g===t||g===null)break;a=g}if(f){for(let p of h)queueMicrotask(()=>{throw p});throw f}}finally{e[Ft]=t,delete e.currentTarget,Pe(d),Ze(_)}}}const Io=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Oo(e){return Io?.createHTML(e)??e}function Di(e,t=!1){var n=gi("template");return e=e.replaceAll("<!>","<!---->"),n.innerHTML=t?Oo(e):e,n.content}function Fn(e,t){var n=H;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function A(e,t){var n=(t&Za)!==0,r,i=!e.startsWith("<!>");return()=>{r===void 0&&(r=Di(i?e:"<!>"+e,!0),r=xt(r));var a=n||vi?document.importNode(r,!0):r.cloneNode(!0);return Fn(a,a),a}}function qo(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&Xa)!==0,a=`<${n}>${r?e:"<!>"+e}</${n}>`,o;return()=>{if(!o){var c=Di(a,!0),s=xt(c);if(i)for(o=document.createDocumentFragment();xt(s);)o.appendChild(xt(s));else o=xt(s)}var u=o.cloneNode(!0);if(i){var d=xt(u),_=u.lastChild;Fn(d,_)}else Fn(u,u);return u}}function nn(e,t){return qo(e,t,"svg")}function Ui(){var e=document.createDocumentFragment(),t=document.createComment(""),n=yt();return e.append(t,n),Fn(t,n),e}function k(e,t){e!==null&&e.before(t)}function te(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}function Fo(e,t){return No(e,t)}const Nn=new Map;function No(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){wo();var c=void 0,s=Eo(()=>{var u=n??t.appendChild(yt());so(u,{pending:()=>{}},f=>{Zt({});var h=Ce;a&&(h.c=a),i&&(r.$$events=i),c=e(f,r)||{},Qt()});var d=new Set,_=f=>{for(var h=0;h<f.length;h++){var g=f[h];if(!d.has(g)){d.add(g);var S=jo(g);for(const w of[t,document]){var p=Nn.get(w);p===void 0&&(p=new Map,Nn.set(w,p));var x=p.get(g);x===void 0?(w.addEventListener(g,cr,{passive:S}),p.set(g,1)):p.set(g,x+1)}}}};return _(Rn(Oi)),lr.add(_),()=>{for(var f of d)for(const S of[t,document]){var h=Nn.get(S),g=h.get(f);--g==0?(S.removeEventListener(f,cr),h.delete(f),h.size===0&&Nn.delete(S)):h.set(f,g)}lr.delete(_),u!==n&&u.parentNode?.removeChild(u)}});return ur.set(c,s),c}let ur=new WeakMap;function Do(e,t){const n=ur.get(e);return n?(ur.delete(e),n(t)):Promise.resolve()}class Uo{constructor(t,n=!0){it(this,"anchor");F(this,Je,new Map);F(this,tt,new Map);F(this,Re,new Map);F(this,Ht,new Set);F(this,Tn,!0);F(this,Mn,()=>{var t=V;if(v(this,Je).has(t)){var n=v(this,Je).get(t),r=v(this,tt).get(n);if(r)sr(r),v(this,Ht).delete(n);else{var i=v(this,Re).get(n);i&&(v(this,tt).set(n,i.effect),v(this,Re).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[a,o]of v(this,Je)){if(v(this,Je).delete(a),a===t)break;const c=v(this,Re).get(o);c&&(ke(c.effect),v(this,Re).delete(o))}for(const[a,o]of v(this,tt)){if(a===n||v(this,Ht).has(a))continue;const c=()=>{if(Array.from(v(this,Je).values()).includes(a)){var u=document.createDocumentFragment();zi(o,u),u.append(yt()),v(this,Re).set(a,{effect:o,fragment:u})}else ke(o);v(this,Ht).delete(a),v(this,tt).delete(a)};v(this,Tn)||!r?(v(this,Ht).add(a),It(o,c,!1)):c()}}});F(this,Bn,t=>{v(this,Je).delete(t);const n=Array.from(v(this,Je).values());for(const[r,i]of v(this,Re))n.includes(r)||(ke(i.effect),v(this,Re).delete(r))});this.anchor=t,P(this,Tn,n)}ensure(t,n){var r=V,i=_i();if(n&&!v(this,tt).has(t)&&!v(this,Re).has(t))if(i){var a=document.createDocumentFragment(),o=yt();a.append(o),v(this,Re).set(t,{effect:Ke(()=>n(o)),fragment:a})}else v(this,tt).set(t,Ke(()=>n(this.anchor)));if(v(this,Je).set(r,t),i){for(const[c,s]of v(this,tt))c===t?r.unskip_effect(s):r.skip_effect(s);for(const[c,s]of v(this,Re))c===t?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(v(this,Mn)),r.ondiscard(v(this,Bn))}else v(this,Mn).call(this)}}Je=new WeakMap,tt=new WeakMap,Re=new WeakMap,Ht=new WeakMap,Tn=new WeakMap,Mn=new WeakMap,Bn=new WeakMap;function N(e,t,n=!1){var r=new Uo(e),i=n?Yt:0;function a(o,c){r.ensure(o,c)}ar(()=>{var o=!1;t((c,s=0)=>{o=!0,a(s,c)}),o||a(!1,null)},i)}function fr(e,t){return t}function Bo(e,t,n){for(var r=[],i=t.length,a,o=t.length,c=0;c<i;c++){let _=t[c];It(_,()=>{if(a){if(a.pending.delete(_),a.done.add(_),a.pending.size===0){var f=e.outrogroups;dr(Rn(a.done)),f.delete(a),f.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var s=r.length===0&&n!==null;if(s){var u=n,d=u.parentNode;bo(d),d.append(u),e.items.clear()}dr(t,!s)}else a={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function dr(e,t=!0){for(var n=0;n<e.length;n++)ke(e[n],t)}var Bi;function xn(e,t,n,r,i,a=null){var o=e,c=new Map,s=(t&Wr)!==0;if(s){var u=e;o=u.appendChild(yt())}var d=null,_=si(()=>{var x=n();return Dr(x)?x:x==null?[]:Rn(x)}),f,h=!0;function g(){p.fallback=d,Ho(p,f,o,t,r),d!==null&&(f.length===0?(d.f&lt)===0?sr(d):(d.f^=lt,Sn(d,null,o)):It(d,()=>{d=null}))}var S=ar(()=>{f=l(_);for(var x=f.length,w=new Set,T=V,D=_i(),Q=0;Q<x;Q+=1){var le=f[Q],ee=r(le,Q),Y=h?null:c.get(ee);Y?(Y.v&&en(Y.v,le),Y.i&&en(Y.i,Q),D&&T.unskip_effect(Y.e)):(Y=Vo(c,h?o:Bi??(Bi=yt()),le,ee,Q,i,t,n),h||(Y.e.f|=lt),c.set(ee,Y)),w.add(ee)}if(x===0&&a&&!d&&(h?d=Ke(()=>a(o)):(d=Ke(()=>a(Bi??(Bi=yt()))),d.f|=lt)),x>w.size&&La(),!h)if(D){for(const[C,q]of c)w.has(C)||T.skip_effect(q.e);T.oncommit(g),T.ondiscard(()=>{})}else g();l(_)}),p={effect:S,items:c,outrogroups:null,fallback:d};h=!1}function kn(e){for(;e!==null&&(e.f&Ue)===0;)e=e.next;return e}function Ho(e,t,n,r,i){var a=(r&Va)!==0,o=t.length,c=e.items,s=kn(e.effect.first),u,d=null,_,f=[],h=[],g,S,p,x;if(a)for(x=0;x<o;x+=1)g=t[x],S=i(g,x),p=c.get(S).e,(p.f&lt)===0&&(p.nodes?.a?.measure(),(_??(_=new Set)).add(p));for(x=0;x<o;x+=1){if(g=t[x],S=i(g,x),p=c.get(S).e,e.outrogroups!==null)for(const q of e.outrogroups)q.pending.delete(p),q.done.delete(p);if((p.f&lt)!==0)if(p.f^=lt,p===s)Sn(p,null,n);else{var w=d?d.next:s;p===e.effect.last&&(e.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),St(e,d,p),St(e,p,w),Sn(p,w,n),d=p,f=[],h=[],s=kn(d.next);continue}if((p.f&ze)!==0&&(sr(p),a&&(p.nodes?.a?.unfix(),(_??(_=new Set)).delete(p))),p!==s){if(u!==void 0&&u.has(p)){if(f.length<h.length){var T=h[0],D;d=T.prev;var Q=f[0],le=f[f.length-1];for(D=0;D<f.length;D+=1)Sn(f[D],T,n);for(D=0;D<h.length;D+=1)u.delete(h[D]);St(e,Q.prev,le.next),St(e,d,Q),St(e,le,T),s=T,d=le,x-=1,f=[],h=[]}else u.delete(p),Sn(p,s,n),St(e,p.prev,p.next),St(e,p,d===null?e.effect.first:d.next),St(e,d,p),d=p;continue}for(f=[],h=[];s!==null&&s!==p;)(u??(u=new Set)).add(s),h.push(s),s=kn(s.next);if(s===null)continue}(p.f&lt)===0&&f.push(p),d=p,s=kn(p.next)}if(e.outrogroups!==null){for(const q of e.outrogroups)q.pending.size===0&&(dr(Rn(q.done)),e.outrogroups?.delete(q));e.outrogroups.size===0&&(e.outrogroups=null)}if(s!==null||u!==void 0){var ee=[];if(u!==void 0)for(p of u)(p.f&ze)===0&&ee.push(p);for(;s!==null;)(s.f&ze)===0&&s!==e.fallback&&ee.push(s),s=kn(s.next);var Y=ee.length;if(Y>0){var C=(r&Wr)!==0&&o===0?n:null;if(a){for(x=0;x<Y;x+=1)ee[x].nodes?.a?.measure();for(x=0;x<Y;x+=1)ee[x].nodes?.a?.fix()}Bo(e,ee,C)}}a&&ct(()=>{if(_!==void 0)for(p of _)p.nodes?.a?.apply()})}function Vo(e,t,n,r,i,a,o,c){var s=(o&Ba)!==0?(o&Ka)===0?go(n,!1,!1):jt(n):null,u=(o&Ha)!==0?jt(i):null;return{v:s,i:u,e:Ke(()=>(a(t,s??n,u??i,c),()=>{e.delete(r)}))}}function Sn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&(t.f&lt)===0?t.nodes.start:n;r!==null;){var o=gn(r);if(a.before(r),r===i)return;r=o}}function St(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Et(e,t){yi(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=gi("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const Hi=[...`
5
+ \r\f \v\uFEFF`];function Ko(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var c=o+a;(o===0||Hi.includes(r[o-1]))&&(c===r.length||Hi.includes(r[c]))?r=(o===0?"":r.substring(0,o))+r.substring(c+1):o=c}}return r===""?null:r}function Go(e,t){return e==null?null:String(e)}function qe(e,t,n,r,i,a){var o=e.__className;if(o!==n||o===void 0){var c=Ko(n,r,a);c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c),e.__className=n}else if(a&&i!==a)for(var s in a){var u=!!a[s];(i==null||u!==!!i[s])&&e.classList.toggle(s,u)}return a}function We(e,t,n,r){var i=e.__style;if(i!==t){var a=Go(t);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=t}return r}const Wo=Symbol("is custom element"),Yo=Symbol("is html");function I(e,t,n,r){var i=Jo(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ta]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Xo(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Jo(e){return e.__attributes??(e.__attributes={[Wo]:e.nodeName.includes("-"),[Yo]:e.namespaceURI===Yr})}var Vi=new Map;function Xo(e){var t=e.getAttribute("is")||e.nodeName,n=Vi.get(t);if(n)return n;Vi.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=xa(i);for(var o in r)r[o].set&&n.push(o);i=Ur(i)}return n}function Zo(e,t,n=t){var r=new WeakSet;xo(e,"input",async i=>{var a=i?e.defaultValue:e.value;if(a=vr(e)?hr(a):a,n(a),V!==null&&r.add(V),await Ro(),a!==(a=t())){var o=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=a??"",c!==null){var u=e.value.length;o===c&&c===s&&u>s?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=o,e.selectionEnd=Math.min(c,u))}}}),yn(t)==null&&e.value&&(n(vr(e)?hr(e.value):e.value),V!==null&&r.add(V)),ir(()=>{var i=t();if(e===document.activeElement){var a=Qn??V;if(r.has(a))return}vr(e)&&i===hr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function vr(e){var t=e.type;return t==="number"||t==="range"}function hr(e){return e===""?null:+e}function Ki(e,t){return e===t||e?.[hn]===t}function pr(e={},t,n,r){return yi(()=>{var i,a;return ir(()=>{i=a,a=[],yn(()=>{e!==n(...a)&&(t(e,...a),i&&Ki(n(...i),e)&&t(null,...i))})}),()=>{ct(()=>{a&&Ki(n(...a),e)&&t(null,...a)})}}),e}let Dn=!1;function Qo(e){var t=Dn;try{return Dn=!1,[e(),Dn]}finally{Dn=t}}function z(e,t,n,r){var i=(n&Ya)!==0,a=(n&Ja)!==0,o=r,c=!0,s=()=>(c&&(c=!1,o=a?yn(r):r),o),u;if(i){var d=hn in e||Aa in e;u=Wt(e,t)?.set??(d&&t in e?w=>e[t]=w:void 0)}var _,f=!1;i?[_,f]=Qo(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=s(),u&&(qa(),u(_)));var h;if(h=()=>{var w=e[t];return w===void 0?s():(c=!0,w)},(n&Wa)===0)return h;if(u){var g=e.$$legacy;return(function(w,T){return arguments.length>0?((!T||g||f)&&u(T?h():w),w):h()})}var S=!1,p=((n&Ga)!==0?In:si)(()=>(S=!1,h()));i&&l(p);var x=H;return(function(w,T){if(arguments.length>0){const D=T?l(p):i?Xe(w):w;return y(p,D),S=!0,o!==void 0&&(o=D),w}return kt&&S||(x.f&st)!==0?p.v:l(p)})}function Gi(e){Ce===null&&Ma(),Pt(()=>{const t=yn(e);if(typeof t=="function")return t})}function $o(e,t){var n,r;return r=class{constructor(a){F(this,n,null);if(!at)throw new Error(`[sevn] ${t} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:o,...c}=a??{},s=typeof o=="string"?document.querySelector(o):o;if(!s)throw new Error(`[sevn] ${t}: alvo não encontrado`+(typeof o=="string"?` para o seletor "${o}".`:"."));va(),P(this,n,Fo(e,{target:s,props:c}))}destroy(){if(!v(this,n))return Promise.resolve();const a=v(this,n);return P(this,n,null),Do(a)}},n=new WeakMap,r}function Wi(e){try{return new URL(e,document.baseURI).searchParams.get("cid")}catch{return null}}function es(){const e=document.currentScript;if(e?.src){const n=Wi(e.src);if(n)return n}const t=document.querySelectorAll('script[src*="cid="]');for(const n of t){const r=Wi(n.src);if(r)return r}return null}function ts(){if(!at)return;const e=es();if(e)try{Kn(e)}catch(t){console.error("[sevn] Chave inválida na tag <script>:",t)}}const ns="5";typeof window<"u"&&((ia=window.__svelte??(window.__svelte={})).v??(ia.v=new Set)).add(ns);const rs="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",rn="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",Yi="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 is=A('<span class="mobile-label svelte-1dw55dz"> </span>'),as=A('<input class="search-input svelte-1dw55dz" type="text"/>'),os=A('<span class="field-label-prefix svelte-1dw55dz"> </span>'),ss=A('<span class="field-text svelte-1dw55dz"><!> </span>'),ls=A("<span> </span>"),cs=A('<button class="icon-clear svelte-1dw55dz" type="button" aria-label="Limpar seleção"><img alt="" aria-hidden="true"/></button>'),us=A('<img alt="" aria-hidden="true"/>'),fs=A('<img class="icon-search svelte-1dw55dz" alt="" aria-hidden="true"/>'),ds=A('<span class="meta svelte-1dw55dz"> </span>'),vs=A('<div class="web-info svelte-1dw55dz"><span class="selected-label svelte-1dw55dz"><strong class="svelte-1dw55dz">Você selecionou:</strong> </span> <!></div>'),hs=A('<button type="button" role="option"> </button>'),ps=A('<div class="no-results svelte-1dw55dz">Nenhum resultado encontrado</div>'),_s=A('<div class="dropdown svelte-1dw55dz" role="listbox"></div>'),gs=A('<div><!> <div role="combobox" aria-haspopup="listbox"><!> <!></div> <!> <!></div>');const ms={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 En(e,t){Zt(t,!0),Et(e,ms);let n=z(t,"label",3,""),r=z(t,"showLabel",3,!0),i=z(t,"options",19,()=>[]),a=z(t,"value",15,null),o=z(t,"meta",3,""),c=z(t,"width",3,"100%"),s=z(t,"height",3,"48px"),u=z(t,"icon",3,rs),d=z(t,"iconSize",3,13),_=z(t,"showLabelInField",3,!1),f=z(t,"showDescriptionSelection",3,!0),h=z(t,"labelAsPlaceholder",3,!0),g=z(t,"showPlaceholderOnMobile",3,!1),S=z(t,"disabled",3,!1),p=z(t,"clearable",3,!0);const x=`autocomplete-listbox-${Math.random().toString(36).slice(2,9)}`;let w=ne(!1),T=ne(""),D=ne(null),Q=ne(null),le=re(()=>l(T).trim()?i().filter(m=>m.label.toLowerCase().includes(l(T).trim().toLowerCase())):i()),ee=re(()=>a()!=null?i().find(m=>m.value===a())??null:null);function Y(m){a(m.value),y(T,""),y(w,!1)}function C(){S()||(y(w,!l(w)),l(w)||y(T,""))}function q(m){m.stopPropagation(),a(null),y(T,""),y(w,!1)}function oe(m){m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),C())}function be(m){l(D)&&!l(D).contains(m.target)&&(y(w,!1),y(T,""))}function ye(m){m.key==="Escape"&&(y(w,!1),y(T,""))}Pt(()=>{l(w)&&l(Q)&&l(Q).focus()}),Pt(()=>{S()&&(y(w,!1),y(T,""))}),Gi(()=>(document.addEventListener("mousedown",be),()=>document.removeEventListener("mousedown",be)));var Ee=gs();let Fe;var gt=b(Ee);{var U=m=>{var R=is(),B=b(R);j(()=>te(B,n())),k(m,R)};N(gt,m=>{r()&&n()&&m(U)})}var E=L(gt,2);let $;var ge=b(E);{var me=m=>{var R=as();pr(R,B=>y(Q,B),()=>l(Q)),j(()=>I(R,"placeholder",n())),dt("keydown",R,ye),dt("click",R,B=>B.stopPropagation()),Zo(R,()=>l(T),B=>y(T,B)),k(m,R)},nt=m=>{var R=ss(),B=b(R);{var X=ue=>{var Le=os(),Ct=b(Le);j(()=>te(Ct,n())),k(ue,Le)};N(B,ue=>{_()&&ue(X)})}var G=L(B,1,!0);j(()=>te(G,l(ee).label)),k(m,R)},rt=m=>{var R=Ui(),B=mn(R);{var X=G=>{var ue=ls();let Le;var Ct=b(ue);j(()=>{Le=qe(ue,1,"field-text is-placeholder svelte-1dw55dz",null,Le,{"force-placeholder":g()}),te(Ct,n())}),k(G,ue)};N(B,G=>{h()&&G(X)})}k(m,R)};N(ge,m=>{l(w)?m(me):l(ee)?m(nt,1):m(rt,!1)})}var Ne=L(ge,2);{var ce=m=>{var R=cs(),B=b(R);j(()=>{I(B,"src",Yi),I(B,"width",d()?d():12),I(B,"height",d()?d():12)}),dt("click",R,q),k(m,R)},we=m=>{var R=us();let B;j(()=>{B=qe(R,1,"icon-chevron svelte-1dw55dz",null,B,{open:l(w)}),I(R,"src",rn),I(R,"width",d()?d():12),I(R,"height",d()?d():12)}),k(m,R)},De=m=>{var R=fs();j(()=>{I(R,"src",u()),I(R,"width",d()),I(R,"height",d())}),k(m,R)};N(Ne,m=>{l(ee)&&p()&&!S()?m(ce):l(ee)?m(we,1):m(De,!1)})}var M=L(E,2);{var K=m=>{var R=vs(),B=b(R),X=L(b(B)),G=L(B,2);{var ue=Le=>{var Ct=ds(),kr=b(Ct);j(()=>te(kr,o())),k(Le,Ct)};N(G,Le=>{o()&&Le(ue)})}j(()=>te(X,` ${l(ee).label??""}`)),k(m,R)};N(M,m=>{l(ee)&&f()&&m(K)})}var se=L(M,2);{var J=m=>{var R=_s();xn(R,21,()=>l(le),B=>B.value,(B,X)=>{var G=hs();let ue;var Le=b(G);j(()=>{ue=qe(G,1,"option svelte-1dw55dz",null,ue,{selected:l(X).value===a()}),I(G,"aria-selected",l(X).value===a()),te(Le,l(X).label)}),dt("click",G,()=>Y(l(X))),k(B,G)},B=>{var X=ps();k(B,X)}),j(()=>I(R,"id",x)),k(m,R)};N(se,m=>{l(w)&&m(J)})}pr(Ee,m=>y(D,m),()=>l(D)),j(()=>{Fe=qe(Ee,1,"autocomplete svelte-1dw55dz",null,Fe,{"show-placeholder-mobile":g()}),We(Ee,`--field-width: ${c()??""}; --field-height: ${s()??""}`),$=qe(E,1,"field svelte-1dw55dz",null,$,{open:l(w),"has-value":l(ee)&&!l(w),disabled:S()}),I(E,"tabindex",S()?-1:0),I(E,"aria-controls",x),I(E,"aria-expanded",l(w)),I(E,"aria-disabled",S())}),dt("click",E,C),dt("keydown",E,oe),k(e,Ee),Qt()}Fi(["click","keydown"]);var ws=A("<span> </span>");const bs={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 zn(e,t){Et(e,bs);let n=z(t,"color",3,"#1C1C1C"),r=z(t,"fontSize",3,"0.6875rem"),i=z(t,"class",3,"");var a=ws(),o=b(a);j(()=>{qe(a,1,`tag ${i()??""}`,"svelte-pamnib"),We(a,`background-color: ${n()??""}; font-size: ${r()??""}`),te(o,t.label)}),k(e,a)}var ys=A("<span> </span>"),xs=A('<div class="vote-overview-stats svelte-1m9ufac"></div>'),ks=A("<span> </span>"),Ss=A('<span class="vote-overview-sep svelte-1m9ufac">|</span>'),Es=A("<span> </span>"),zs=A('<div class="vote-overview-meta svelte-1m9ufac"><!> <!> <!></div>'),Cs=A('<div class="vote-overview svelte-1m9ufac"><!> <!></div>');const As={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 Ts(e,t){Zt(t,!0),Et(e,As);let n=z(t,"data",19,()=>[]),r=z(t,"borderTop",3,!1),i=z(t,"align",3,"start");var a=Cs(),o=b(a);{var c=d=>{var _=xs();xn(_,21,n,fr,(f,h)=>{var g=ys(),S=b(g);j(()=>te(S,`${l(h).text??""} ${l(h).value??""}`)),k(f,g)}),k(d,_)};N(o,d=>{n().length&&d(c)})}var s=L(o,2);{var u=d=>{var _=zs(),f=b(_);{var h=w=>{var T=ks(),D=b(T);j(()=>te(D,`Atualizado em ${t.date??""}`)),k(w,T)};N(f,w=>{t.date&&w(h)})}var g=L(f,2);{var S=w=>{var T=Ss();k(w,T)};N(g,w=>{t.date&&t.font&&w(S)})}var p=L(g,2);{var x=w=>{var T=Es(),D=b(T);j(()=>te(D,`Fonte ${t.font??""}`)),k(w,T)};N(p,w=>{t.font&&w(x)})}k(d,_)};N(s,d=>{(t.date||t.font)&&d(u)})}j(()=>We(a,`justify-content:${i()==="end"?"flex-end":"flex-start"};${r()?"border-top:1px solid var(--sevn-color-neutral)":""}`)),k(e,a),Qt()}var Ms=A('<div><div class="candidates-votes-ranking-candidate svelte-icwugj"><span class="candidates-votes-ranking-dot svelte-icwugj"></span> <div class="candidates-votes-ranking-info svelte-icwugj"><span class="candidates-votes-ranking-name svelte-icwugj"> </span> <!> <!> <!></div></div> <span class="candidates-votes-ranking-votes svelte-icwugj"> </span></div>'),Rs=A('<div class="candidates-votes-ranking svelte-icwugj"><div class="candidates-votes-ranking-header svelte-icwugj"><span> </span> <span> </span></div> <!> <!></div>');const Ls={hash:"svelte-icwugj",code:`.candidates-votes-ranking.svelte-icwugj {display:flex;flex-direction:column;font-family:inherit;}
33
+
34
+ /* ── Header ── */.candidates-votes-ranking-header.svelte-icwugj {display:flex;justify-content:space-between;align-items:center;padding:0 0 8px;font-size:0.85rem;font-weight:600;color:var(--sevn-color-tertiary);}
35
+
36
+ /* ── Row ── */.candidates-votes-ranking-row.svelte-icwugj {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--sevn-color-neutral);transition:background-color 0.15s ease;}.candidates-votes-ranking-row.svelte-icwugj:last-of-type {border-bottom:none;}.candidates-votes-ranking-row.elected.svelte-icwugj {background-color:#e8f5ee;margin:0 -12px;padding:14px 12px;border-radius:8px;}
37
+
38
+ /* ── Left side ── */.candidates-votes-ranking-candidate.svelte-icwugj {display:flex;align-items:center;gap:10px;min-width:0;flex:1;}.candidates-votes-ranking-dot.svelte-icwugj {width:var(--dot-size);height:var(--dot-size);border-radius:50%;flex-shrink:0;}.candidates-votes-ranking-info.svelte-icwugj {display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;}.candidates-votes-ranking-name.svelte-icwugj {font-size:var(--name-size);font-weight:var(--name-weight);color:var(--sevn-color-tertiary);white-space:nowrap;}
39
+
40
+ /* ── Right side ── */.candidates-votes-ranking-votes.svelte-icwugj {font-size:var(--votes-size);font-weight:var(--votes-weight);color:var(--sevn-color-tertiary);white-space:nowrap;flex-shrink:0;opacity:0.5;}
41
+
42
+ /* ── Responsive ── */
43
+ @media (max-width: 480px) {.candidates-votes-ranking-name.svelte-icwugj {font-size:calc(var(--name-size) * 0.9);}.candidates-votes-ranking-votes.svelte-icwugj {font-size:calc(var(--votes-size) * 0.9);}.candidates-votes-ranking-row.elected.svelte-icwugj {margin:0 -8px;padding:14px 8px;}
44
+ }`};function js(e,t){Et(e,Ls);let n=z(t,"candidates",19,()=>[]),r=z(t,"headerLeft",3,"Partido/ Candidato"),i=z(t,"headerRight",3,"Votos"),a=z(t,"dotSize",3,"12px"),o=z(t,"nameFontSize",3,"1rem"),c=z(t,"nameWeight",3,700),s=z(t,"votesFontSize",3,"0.875rem"),u=z(t,"votesWeight",3,600),d=z(t,"tagFontSize",3,"0.6875rem"),_=z(t,"electedColor",3,"var(--sevn-color-green)"),f=z(t,"electedLabel",3,"ELEITO");const h=re(()=>!!(t.totalVotes||t.date||t.font)),g=re(()=>t.totalVotes?[{text:"Total",value:`${t.totalVotes} votos`}]:[]);var S=Rs(),p=b(S),x=b(p),w=b(x),T=L(x,2),D=b(T),Q=L(p,2);xn(Q,17,n,fr,(Y,C)=>{var q=Ms();let oe;var be=b(q),ye=b(be),Ee=L(ye,2),Fe=b(Ee),gt=b(Fe),U=L(Fe,2);{var E=ce=>{{let we=re(()=>l(C).tagColor??"var(--sevn-color-secondary)");zn(ce,{get label(){return l(C).tag},get color(){return l(we)},get fontSize(){return d()}})}};N(U,ce=>{l(C).tag&&ce(E)})}var $=L(U,2);{var ge=ce=>{zn(ce,{get label(){return f()},get color(){return _()},get fontSize(){return d()}})};N($,ce=>{l(C).elected&&ce(ge)})}var me=L($,2);{var nt=ce=>{{let we=re(()=>l(C).statusColor??"var(--sevn-color-tertiary)");zn(ce,{get label(){return l(C).statusLabel},get color(){return l(we)},get fontSize(){return d()}})}};N(me,ce=>{l(C).statusLabel&&ce(nt)})}var rt=L(be,2),Ne=b(rt);j(()=>{oe=qe(q,1,"candidates-votes-ranking-row svelte-icwugj",null,oe,{elected:l(C).elected}),We(ye,`background-color: ${l(C).dotColor??"var(--sevn-color-secondary)"??""}`),te(gt,l(C).name),te(Ne,l(C).votes)}),k(Y,q)});var le=L(Q,2);{var ee=Y=>{Ts(Y,{get data(){return l(g)},get date(){return t.date},get font(){return t.font},borderTop:!0})};N(le,Y=>{l(h)&&Y(ee)})}j(()=>{We(S,`
45
+ --dot-size: ${a()??""};
46
+ --name-size: ${o()??""};
47
+ --name-weight: ${c()??""};
48
+ --votes-size: ${s()??""};
49
+ --votes-weight:${u()??""};
50
+ `),te(w,r()),te(D,i())}),k(e,S)}function Ji(e,t,n,r,i,a){const o=n-a,c=Xi(r),s=Xi(i),u=i-r>180?1:0,d=e+n*Math.cos(c),_=t+n*Math.sin(c),f=e+n*Math.cos(s),h=t+n*Math.sin(s),g=e+o*Math.cos(s),S=t+o*Math.sin(s),p=e+o*Math.cos(c),x=t+o*Math.sin(c);return[`M ${d} ${_}`,`A ${n} ${n} 0 ${u} 1 ${f} ${h}`,`L ${g} ${S}`,`A ${o} ${o} 0 ${u} 0 ${p} ${x}`,"Z"].join(" ")}function Xi(e){return e*Math.PI/180}var Ps=A('<span class="trigger-label svelte-hkzjiw"> </span>'),Is=A('<img alt="" aria-hidden="true" width="10" height="10"/>'),Os=A('<button class="clear svelte-hkzjiw" type="button"><img alt="" aria-hidden="true" width="8" height="8"/></button>'),qs=A('<button type="button" role="option"> </button>'),Fs=A('<div class="dropdown svelte-hkzjiw" role="listbox"></div>'),Ns=A('<div class="filter-dropdown svelte-hkzjiw"><button type="button" aria-haspopup="listbox"><!> <span class="trigger-value svelte-hkzjiw"> </span> <!></button> <!> <!></div>');const Ds={hash:"svelte-hkzjiw",code:`.filter-dropdown.svelte-hkzjiw {position:relative;display:inline-flex;align-items:center;}
51
+
52
+ /* ── Trigger ─────────────────────────────── */.trigger.svelte-hkzjiw {display:inline-flex;align-items:center;gap:4px;padding:0;background:none;border:none;cursor:pointer;font-family:inherit;font-size:0.875rem;color:var(--sevn-color-tertiary);white-space:nowrap;}.trigger-label.svelte-hkzjiw {font-weight:700;}.trigger-value.svelte-hkzjiw {font-weight:400;}.trigger-chevron.svelte-hkzjiw {flex-shrink:0;transition:transform 0.2s ease;margin-left:2px;}.trigger-chevron.rotated.svelte-hkzjiw {transform:rotate(180deg);}
53
+
54
+ /* ── Botão de limpar ─────────────────────── */.clear.svelte-hkzjiw {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;margin-left:4px;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.clear.svelte-hkzjiw:hover,
55
+ .clear.svelte-hkzjiw:focus-visible {background:rgba(0, 0, 0, 0.08);}
56
+
57
+ /* ── Dropdown ────────────────────────────── */.dropdown.svelte-hkzjiw {position:absolute;top:calc(100% + 6px);left:0;min-width:100%;background:#fff;border:1px solid #d1d1d6;border-radius:8px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);z-index:200;overflow:hidden;}
58
+
59
+ /* ── Options ─────────────────────────────── */.option.svelte-hkzjiw {display:block;width:100%;padding:10px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.875rem;font-family:inherit;color:var(--sevn-color-tertiary);white-space:nowrap;transition:background 0.1s;}.option.svelte-hkzjiw:last-child {border-bottom:none;}.option.svelte-hkzjiw:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-hkzjiw {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}`};function Us(e,t){Zt(t,!0),Et(e,Ds);let n=z(t,"label",3,""),r=z(t,"options",19,()=>[]),i=z(t,"value",15,null),a=z(t,"clearable",3,!0),o=ne(!1),c=ne(null);const s=re(()=>i()!=null?r().find(C=>C.value===i())??null:null);function u(C){i(C.value),y(o,!1)}function d(){i(null),y(o,!1)}function _(C){l(c)&&!l(c).contains(C.target)&&y(o,!1)}Gi(()=>(document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)));var f=Ns(),h=b(f);let g;var S=b(h);{var p=C=>{var q=Ps(),oe=b(q);j(()=>te(oe,`${n()??""}:`)),k(C,q)};N(S,C=>{n()&&C(p)})}var x=L(S,2),w=b(x),T=L(x,2);{var D=C=>{var q=Is();let oe;j(()=>{oe=qe(q,1,"trigger-chevron svelte-hkzjiw",null,oe,{rotated:l(o)}),I(q,"src",rn)}),k(C,q)};N(T,C=>{l(s)&&a()||C(D)})}var Q=L(h,2);{var le=C=>{var q=Os(),oe=b(q);j(()=>{I(q,"aria-label",`Limpar ${(n()||"filtro")??""}`),I(oe,"src",Yi)}),dt("click",q,d),k(C,q)};N(Q,C=>{l(s)&&a()&&C(le)})}var ee=L(Q,2);{var Y=C=>{var q=Fs();xn(q,21,r,oe=>oe.value,(oe,be)=>{var ye=qs();let Ee;var Fe=b(ye);j(()=>{Ee=qe(ye,1,"option svelte-hkzjiw",null,Ee,{selected:l(be).value===i()}),I(ye,"aria-selected",l(be).value===i()),te(Fe,l(be).label)}),dt("click",ye,()=>u(l(be))),k(oe,ye)}),k(C,q)};N(ee,C=>{l(o)&&C(Y)})}pr(f,C=>y(c,C),()=>l(c)),j(()=>{g=qe(h,1,"trigger svelte-hkzjiw",null,g,{open:l(o)}),I(h,"aria-expanded",l(o)),te(w,l(s)?l(s).label:"")}),dt("click",h,()=>y(o,!l(o))),k(e,f),Qt()}Fi(["click"]);var Bs=A('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),Hs=A('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),Vs=A('<p class="header-description svelte-1xm1ks6"> </p>'),Ks=A('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const Gs={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);}
60
+
61
+ @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);}
62
+ }
63
+
64
+ @media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
65
+ }`};function Ws(e,t){Et(e,Gs);var n=Ks(),r=b(n);{var i=f=>{var h=Bs(),g=b(h);zn(g,{get label(){return t.tag},get color(){return t.tagColor}}),k(f,h)};N(r,f=>{t.tag&&f(i)})}var a=L(r,2),o=b(a),c=b(o),s=L(o,2);{var u=f=>{var h=Hs(),g=b(h);zn(g,{get label(){return t.tag},get color(){return t.tagColor}}),k(f,h)};N(s,f=>{t.tag&&f(u)})}var d=L(a,2);{var _=f=>{var h=Vs(),g=b(h);j(()=>te(g,t.description)),k(f,h)};N(d,f=>{t.description&&f(_)})}j(()=>{We(n,`
66
+ --header-title-font-size: ${t.titleFontSize??"1.75rem"??""};
67
+ --header-title-font-weight: ${t.titleFontWeight??700??""};
68
+ --header-description-font-size: ${t.descriptionFontSize??"0.875rem"??""};
69
+ `),te(c,t.title)}),k(e,n)}var Ys=nn("<circle></circle>"),Js=nn("<circle></circle><!>",1),Xs=nn('<path style="cursor: pointer; transition: opacity 0.2s;" role="button" tabindex="0"></path><!>',1),Zs=nn("<path></path><!>",1),Qs=nn('<text text-anchor="middle" dominant-baseline="middle" class="multi-ring-center-label svelte-potaj2"> </text>'),$s=nn('<text text-anchor="middle" dominant-baseline="middle" class="multi-ring-center-sub svelte-potaj2"> </text>'),el=A('<div class="multi-ring-tooltip-label svelte-potaj2"> </div>'),tl=A('<div class="multi-ring-tooltip svelte-potaj2"><div class="multi-ring-tooltip-content svelte-potaj2"><div class="multi-ring-tooltip-header svelte-potaj2"></div> <div class="multi-ring-tooltip-body svelte-potaj2"><!> <div class="multi-ring-tooltip-value svelte-potaj2"> </div></div></div> <div class="multi-ring-tooltip-arrow svelte-potaj2"></div></div>'),nl=A('<div class="multi-ring-chart svelte-potaj2"><svg viewBox="0 0 200 200" role="img" aria-label="Gráfico de anéis" class="svelte-potaj2"><!><!><!></svg> <!></div>');const rl={hash:"svelte-potaj2",code:`.multi-ring-chart.svelte-potaj2 {display:inline-block;}svg.svelte-potaj2 {width:100%;height:100%;display:block;}.multi-ring-center-label.svelte-potaj2 {font-family:inherit;font-weight:700;fill:var(--sevn-color-tertiary);}.multi-ring-center-sub.svelte-potaj2 {font-family:inherit;font-weight:500;fill:#9a9aaa;}
70
+
71
+ /* ── Hover effect ─────────────────────── */svg.svelte-potaj2 path.hovered:where(.svelte-potaj2) {opacity:0.8;filter:brightness(1.1);}
72
+
73
+ /* ── Tooltip ──────────────────────────── */.multi-ring-tooltip.svelte-potaj2 {position:fixed;left:var(--tooltip-x);top:var(--tooltip-y);transform:translate(-50%, -100%);z-index:1000;pointer-events:none;
74
+ animation: svelte-potaj2-slideUp 0.2s ease-out;}
75
+
76
+ @keyframes svelte-potaj2-slideUp {
77
+ from {
78
+ opacity: 0;
79
+ transform: translate(-50%, -90%);
80
+ }
81
+ to {
82
+ opacity: 1;
83
+ transform: translate(-50%, -100%);
84
+ }
85
+ }.multi-ring-tooltip-content.svelte-potaj2 {background:white;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;min-width:140px;}.multi-ring-tooltip-header.svelte-potaj2 {height:4px;width:100%;}.multi-ring-tooltip-body.svelte-potaj2 {padding:12px 16px;display:flex;flex-direction:column;gap:4px;}.multi-ring-tooltip-label.svelte-potaj2 {font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary, #1c1c1c);text-transform:uppercase;letter-spacing:0.05em;}.multi-ring-tooltip-value.svelte-potaj2 {font-size:1.125rem;font-weight:700;color:var(--sevn-color-tertiary, #1c1c1c);}.multi-ring-tooltip-arrow.svelte-potaj2 {position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;filter:drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));}`};function il(e,t){Zt(t,!0),Et(e,rl);let n=z(t,"rings",19,()=>[]),r=z(t,"size",3,"200px"),i=z(t,"outerRadius",3,85),a=z(t,"thickness",3,10),o=z(t,"ringGap",3,4),c=z(t,"trackColor",3,"#e5e5ea"),s=z(t,"centerLabelSize",3,22),u=z(t,"centerSubSize",3,10),d=z(t,"roundCaps",3,!0);const _=100,f=100;let h=ne(null),g=ne(Xe({x:0,y:0}));function S(U,E){y(h,E,!0);const $=U.currentTarget.getBoundingClientRect();y(g,{x:$.left+$.width/2,y:$.top-10},!0)}function p(){y(h,null)}const x=re(()=>Math.min(i(),100)),w=re(()=>Math.min(a(),10)),T=re(()=>Math.min(o(),5)),D=re(()=>{const U=l(w)+l(T);if(n().length<=1)return U;const $=Math.max(l(x)-4,l(w))/n().length;return Math.min(U,$)}),Q=re(()=>{const U=l(w)+l(T);return l(D)>=U?l(w):Math.max(1,l(D)*(l(w)/U))});function le(U){return U*Math.PI/180}const ee=re(()=>n().map((U,E)=>{const $=l(x)-E*l(D),ge=$-l(Q)/2,me=-90+Math.min(U.value,100)/100*360;return{track:Ji(_,f,$,-90,269.9999,l(Q)),arc:Ji(_,f,$,-90,me,l(Q)),color:U.color,capR:l(Q)/2,startX:_+ge*Math.cos(le(-90)),startY:f+ge*Math.sin(le(-90)),endX:_+ge*Math.cos(le(me)),endY:f+ge*Math.sin(le(me)),value:Math.min(U.value,100)}}));var Y=nl(),C=b(Y),q=b(C);xn(q,17,()=>l(ee),fr,(U,E,$)=>{var ge=Zs(),me=mn(ge),nt=L(me);{var rt=Ne=>{var ce=Xs(),we=mn(ce);let De;var M=L(we);{var K=se=>{var J=Js(),m=mn(J),R=L(m);{var B=X=>{var G=Ys();j(()=>{I(G,"cx",l(E).endX),I(G,"cy",l(E).endY),I(G,"r",l(E).capR),I(G,"fill",l(E).color)}),k(X,G)};N(R,X=>{l(E).value<100&&X(B)})}j(()=>{I(m,"cx",l(E).startX),I(m,"cy",l(E).startY),I(m,"r",l(E).capR),I(m,"fill",l(E).color)}),k(se,J)};N(M,se=>{d()&&se(K)})}j(()=>{I(we,"d",l(E).arc),I(we,"fill",l(E).color),De=qe(we,0,"svelte-potaj2",null,De,{hovered:l(h)===$})}),qi("mouseenter",we,se=>S(se,$)),qi("mouseleave",we,p),k(Ne,ce)};N(nt,Ne=>{l(E).color&&l(E).value>0&&Ne(rt)})}j(()=>{I(me,"d",l(E).track),I(me,"fill",c())}),k(U,ge)});var oe=L(q);{var be=U=>{var E=Qs();I(E,"x",_);var $=b(E);j(()=>{I(E,"y",t.centerSub?f-6:f),We(E,`font-size: ${s()??""}px`),te($,t.centerLabel)}),k(U,E)};N(oe,U=>{t.centerLabel&&U(be)})}var ye=L(oe);{var Ee=U=>{var E=$s();I(E,"x",_),I(E,"y",f+18);var $=b(E);j(()=>{We(E,`font-size: ${u()??""}px`),te($,t.centerSub)}),k(U,E)};N(ye,U=>{t.centerSub&&U(Ee)})}var Fe=L(C,2);{var gt=U=>{const E=re(()=>n()[l(h)]);var $=tl(),ge=b($),me=b(ge),nt=L(me,2),rt=b(nt);{var Ne=De=>{var M=el(),K=b(M);j(()=>te(K,l(E).label)),k(De,M)};N(rt,De=>{l(E).label&&De(Ne)})}var ce=L(rt,2),we=b(ce);j(De=>{We($,`--tooltip-x: ${l(g).x??""}px; --tooltip-y: ${l(g).y??""}px;`),We(me,`background-color: ${l(E).color??""};`),te(we,`${De??""}%`)},[()=>l(E).value.toFixed(1)]),k(U,$)};N(Fe,U=>{l(h)!==null&&n()[l(h)]&&U(gt)})}j(()=>We(Y,`width: ${r()??""}; height: ${r()??""};`)),k(e,Y),Qt()}class Zi{constructor(t={}){var n,r,i;this.inflight=new Map,this.tick=0,this.storageKey=(n=t.storageKey)!==null&&n!==void 0?n:"reqcache",this.maxEntries=(r=t.maxEntries)!==null&&r!==void 0?r:100,this.storage=(i=t.storage)!==null&&i!==void 0?i:ol()}async getFetch(t,n,r={}){const i=Date.now(),a=this.readAll(),o=a.find(u=>u.rota===t);if(o&&i<o.expiresAt)return o.lastAccess=this.nextAccess(),this.writeAll(a),o.data;const c=this.inflight.get(t);if(c)return c;const s=this.revalidate(t,n,r,o??null).finally(()=>this.inflight.delete(t));return this.inflight.set(t,s),s}invalidate(t){const n=this.readAll().filter(r=>r.rota!==t);this.writeAll(n)}cleanup(t=3600){const n=Date.now()-t*1e3,r=this.readAll(),i=r.filter(a=>a.expiresAt>n);return this.writeAll(i),r.length-i.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(t,n,r,i){var a,o;const c=(a=r.fetcher)!==null&&a!==void 0?a:fetch;let s;try{const d=await c(t,r.fetchOptions);if(!d.ok)throw new Error(`HTTP ${d.status} ao buscar ${t}`);s=await d.json()}catch(d){if(i&&(!((o=r.staleOnError)!==null&&o!==void 0)||o))return this.upsert({...i,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),i.data;throw d}if(i&&r.monotonicKey){const d=Qi(i.data,r.monotonicKey),_=Qi(s,r.monotonicKey);if(typeof d=="number"&&typeof _=="number"&&_<=d)return this.upsert({...i,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),i.data}const u=Date.now();return this.upsert({rota:t,data:s,createdAt:u,expiresAt:u+n,lastAccess:this.nextAccess()}),s}upsert(t){const n=this.readAll().filter(r=>r.rota!==t.rota);n.push(t),this.evictIfNeeded(n),this.writeAll(n)}evictIfNeeded(t){for(;t.length>this.maxEntries;){let n=0;for(let r=1;r<t.length;r++)t[r].lastAccess<t[n].lastAccess&&(n=r);t.splice(n,1)}}readAll(){if(!this.storage)return[];try{const t=this.storage.getItem(this.storageKey);if(!t)return[];const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}writeAll(t){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(t))}catch(n){if(al(n)&&t.length>0){const r=[...t].sort((i,a)=>i.lastAccess-a.lastAccess);r.splice(0,Math.ceil(r.length/2));try{this.storage.setItem(this.storageKey,JSON.stringify(r))}catch{}}}}}function Qi(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object"&&r in n)return n[r]},e)}function al(e){return e instanceof Error&&(e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")}function ol(){try{if(typeof localStorage<"u"){const e="__reqcache_probe__";return localStorage.setItem(e,"1"),localStorage.removeItem(e),localStorage}}catch{}return null}new Zi;const $i=300,sl=3600,_r=new Map;function gr(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const ll={getItem(e){return gr()?localStorage.getItem(e):_r.get(e)??null},setItem(e,t){if(gr())try{localStorage.setItem(e,t)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else _r.set(e,t)},removeItem(e){gr()?localStorage.removeItem(e):_r.delete(e)}};let mr=null;function cl(){if(!mr){const{storageKey:e,maxEntries:t}=dn().cache;mr=new Zi({storage:ll,storageKey:e,maxEntries:t})}return mr}async function wr(e,t,n=$i,r){const[i]=Pr(),a=e.replace(/^\/+/,""),o=new URL(a,`${i.replace(/\/+$/,"")}/`);let c;try{c=await cl().getFetch(o.toString(),n*1e3,{monotonicKey:r,fetcher:ga})}catch(s){throw s instanceof Error&&/^HTTP 404 /.test(s.message)?new Error("Dados ainda não publicados"):s}if(c&&typeof c=="object"&&c.published===!1)throw new Error(c.reason??"Dados ainda não publicados");return c}function ul(e){return wr(`v1/reference/municipalities/${e.toUpperCase()}.json`,void 0,sl)}function fl(e,t){const n=t?.round,r=t?.office??"president";let i="br";return t?.municipalityId?i=`mun/${t.municipalityId}`:t?.state&&(i=`uf/${t.state.toUpperCase()}`),wr(`v1/elections/${e}/r${n}/${r}/${i}/results.json`,void 0,$i,"summary.ballots_counted")}function dl(e,t,n,r){return wr(`v1/elections/${e}/r${n}/${t}/uf/${r.toUpperCase()}/by-municipality.json`)}const vl=new Set(["da","de","do","das","dos","e"]);function ea(e){return e.toLowerCase().split(" ").map((t,n)=>n>0&&vl.has(t)?t:t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function hl(e){if(typeof e=="string"){const n=e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(n)return new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3]),Number(n[4]),Number(n[5]),Number(n[6]??0)))}const t=new Date(e);return Number.isNaN(t.getTime())?null:t}function br(e){if(e==null||e==="")return"";const t=hl(e);if(!t)return"";const n=String(t.getUTCDate()).padStart(2,"0"),r=String(t.getUTCMonth()+1).padStart(2,"0"),i=t.getUTCFullYear(),a=String(t.getUTCHours()).padStart(2,"0"),o=String(t.getUTCMinutes()).padStart(2,"0");return`${n}/${r}/${i} às ${a}h${o}`}function pl(e,t="TSE"){const n=br(e);return n?`Atualizado em ${n} | Fonte ${t}`:`Fonte ${t}`}const _l=br("2022-10-31T00:18:00Z");pl("2022-10-31T00:18:00Z");const gl={elected_round_1:"Eleito no 1° turno",elected_round_2:"Eleito no 2° turno",counting:"Em apuração",runoff:"2° turno",elected:"Eleito",second:"2° turno"},ml={elected_round_1:"#1e3461",elected_round_2:"#1e3461",counting:"#d1d5db",runoff:"#d97706",second:"#d97706"},wl=new Set(["elected_round_1","elected_round_2","runoff","second"]);function ta(e){return!e||!wl.has(e)?null:gl[e]??null}function na(e){return e&&ml[e]||"#d1d5db"}var bl=A('<div class="sevn_perf_muni__filter-secondary-mobile svelte-158q6c1"><!></div>'),yl=A('<div class="sevn_perf_muni__filter-secondary-mobile svelte-158q6c1"><!></div>'),xl=A('<p class="sevn_perf_muni__status svelte-158q6c1">Carregando...</p>'),kl=A('<p class="sevn_perf_muni__status sevn_perf_muni__status--error svelte-158q6c1"> </p>'),Sl=A('<p class="sevn_perf_muni__status svelte-158q6c1"> </p>'),El=A('<div class="sevn_perf_muni__content svelte-158q6c1"><div class="sevn_perf_muni__chart svelte-158q6c1"><!></div> <div class="sevn_perf_muni__ranking svelte-158q6c1"><!></div></div>'),zl=A('<div><!> <div class="sevn_perf_muni__office-web svelte-158q6c1"><!></div> <div class="sevn_perf_muni__filters-web svelte-158q6c1"><div class="sevn_perf_muni__filter-uf svelte-158q6c1"><!></div> <div class="sevn_perf_muni__filter-municipio svelte-158q6c1"><!></div></div> <div class="sevn_perf_muni__filter-mobile svelte-158q6c1"><!></div> <!> <!> <!></div>');const Cl={hash:"svelte-158q6c1",code:`.sevn_perf_muni.svelte-158q6c1 {display:flex;flex-direction:column;gap:24px;}.sevn_perf_muni--raw.svelte-158q6c1,
86
+ .sevn_perf_muni--raw.svelte-158q6c1 :where(.svelte-158q6c1) {all:revert;}.sevn_perf_muni__status.svelte-158q6c1 {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_perf_muni__status--error.svelte-158q6c1 {color:#e11d48;}
87
+
88
+ /* ── Web (oculto no mobile) ─────────────────────────── */.sevn_perf_muni__office-web.svelte-158q6c1,
89
+ .sevn_perf_muni__filters-web.svelte-158q6c1 {display:none;}
90
+
91
+ /* ── Mobile (visível por padrão) ────────────────────── */.sevn_perf_muni__filter-mobile.svelte-158q6c1 {display:block;}.sevn_perf_muni__filter-secondary-mobile.svelte-158q6c1 {display:flex;flex-direction:column;gap:8px;}
92
+
93
+ /* Dropdown inline no mobile */.sevn_perf_muni__filter-secondary-mobile.svelte-158q6c1 .dropdown {position:static;margin-top:10px;}
94
+
95
+ /* Mobile: chart centralizado, ranking abaixo */.sevn_perf_muni__content.svelte-158q6c1 {display:flex;flex-direction:column;gap:24px;}.sevn_perf_muni__chart.svelte-158q6c1 {width:220px;margin:0 auto;}.sevn_perf_muni.svelte-158q6c1 .dropdown {position:static;margin-top:10px;}
96
+
97
+ /* A regra acima é para os Autocomplete, que abrem empurrando o conteúdo. O
98
+ FilterDropdown do cargo se posiciona sozinho (absolute, abaixo do gatilho)
99
+ — sem esta exceção ele vira um item do flex e abre ao lado, não abaixo. */.sevn_perf_muni.svelte-158q6c1 .sevn_perf_muni__office-web:where(.svelte-158q6c1) .dropdown {position:absolute;margin-top:0;}.sevn_perf_muni.svelte-158q6c1 .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_perf_muni.svelte-158q6c1 .vote-overview .vote-overview-stats {gap:8px;}
100
+
101
+ /* ── Desktop overrides ──────────────────────────────── */
102
+ @media (min-width: 768px) {.sevn_perf_muni__office-web.svelte-158q6c1 {display:block;}.sevn_perf_muni__filters-web.svelte-158q6c1 {display:flex;gap:16px;align-items:flex-start;}.sevn_perf_muni__filter-uf.svelte-158q6c1 {flex:2;}.sevn_perf_muni__filter-municipio.svelte-158q6c1 {flex:2;}.sevn_perf_muni__filter-mobile.svelte-158q6c1 {display:none;}.sevn_perf_muni__filter-secondary-mobile.svelte-158q6c1 {display:none;}
103
+
104
+ /* Web: chart à esquerda, ranking à direita */.sevn_perf_muni__content.svelte-158q6c1 {flex-direction:row;align-items:center;gap:48px;}.sevn_perf_muni__chart.svelte-158q6c1 {width:370px;flex-shrink:0;margin:0;}.sevn_perf_muni__ranking.svelte-158q6c1 {flex:1;}.sevn_perf_muni.svelte-158q6c1 .vote-overview {padding:8px 0;gap:8px;align-items:flex-end;}
105
+ }`};function Al(e,t){Zt(t,!0),Et(e,Cl);let n=z(t,"mock",3,!1),r=z(t,"rawStyle",3,!1),i=z(t,"year",3,2026),a=z(t,"header",19,()=>({title:"Consulte o desempenho dos candidatos por município",description:"Resultados eleitorais por município, em tempo real"})),o=ne(null),c=ne(Xe([])),s=ne(!1),u=ne(null);const d=[{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"}],_=[{value:"governador",label:"Governador"},{value:"presidente",label:"Presidente"},{value:"senador",label:"Senador"}];let f=ne(null),h=ne(null),g=ne(Xe(_[0].value));const S={governador:"governor",presidente:"president",senador:"senator"};Pt(()=>{if(!at||n()||!l(f)){y(c,[],!0);return}y(h,null),ul(l(f)).then(M=>{y(c,M.municipalities.map(K=>({value:String(K.municipality_id),label:K.name})),!0)}).catch(M=>{console.error("Failed to fetch municipalities:",M),y(c,[],!0)})}),Pt(()=>{if(!at||n())return;if(!l(f)||!l(g)){y(o,null);return}const M=S[l(g)]||"governor",K=1;y(s,!0),y(u,null),y(o,null),dl(i(),M,K,l(f)).then(se=>{y(o,se,!0),y(s,!1)}).catch(se=>{console.error("Failed to fetch municipality results:",se),y(u,"Failed to load data"),y(s,!1)})});let p=ne(null);Pt(()=>{if(!at||n())return;if(!l(f)||!l(g)){y(p,null);return}const M=S[l(g)]||"governor";y(s,!0),y(u,null),y(p,null),fl(i(),{office:M,round:1,state:l(f)}).then(K=>{y(p,K,!0),y(s,!1)}).catch(K=>{console.error("Failed to fetch state results:",K),y(u,"Failed to load data"),y(s,!1)})});const x=[{name:"Candidato A",tag:"ABC",tagColor:"#d97706",dotColor:"#d97706",votes:"42,8%"},{name:"Candidato B",tag:"EFG",tagColor:"#166534",dotColor:"#166534",votes:"31,4%"},{name:"Candidato C",tag:"HIJ",tagColor:"#1e3461",dotColor:"#1e3461",votes:"12,6%"},{name:"Candidato D",tag:"KLM",tagColor:"#374151",dotColor:"#374151",votes:"6,7%"}],w=[{value:42.8,color:"#d97706",label:"ABC"},{value:31.4,color:"#166534",label:"EFG"},{value:12.6,color:"#1e3461",label:"HIJ"},{value:6.7,color:"#374151",label:"KLM"}],T=re(()=>!n()&&l(h)&&l(o)?.municipalities&&Array.isArray(l(o).municipalities)?l(o).municipalities.find(M=>String(M.municipality_id)===l(h))??null:null),D=re(()=>{if(n())return{candidates:x,rings:w,totalVotes:"118.552.353"};if(!l(h)){if(!l(p)?.candidates?.length)return{candidates:[],rings:[],totalVotes:null};const J=[...l(p).candidates].sort((m,R)=>R.valid_votes_pct-m.valid_votes_pct);return{candidates:J.map(m=>({name:ea(m.ballot_name),tag:m.party_abbr,dotColor:m.party_color||"var(--sevn-color-primary)",tagColor:m.party_color||"var(--sevn-color-primary)",votes:`${m.valid_votes_pct.toFixed(1)}%`,elected:m.elected??!1,statusLabel:ta(m.status),statusColor:na(m.status)})),rings:J.map(m=>({value:m.valid_votes_pct,color:m.party_color||"var(--sevn-color-primary)",label:m.party_abbr})),totalVotes:l(p).summary?.total_valid_votes.toLocaleString("pt-BR")??null}}if(!l(T))return{candidates:[],rings:[],totalVotes:null};const M=[l(T).leader,l(T).runner_up].filter(Boolean).sort((J,m)=>m.valid_votes_pct-J.valid_votes_pct),K=M.map(J=>({name:J.name?ea(J.name):"Unknown",tag:J.party_abbr||"",dotColor:J.party_color||"var(--sevn-color-primary)",tagColor:J.party_color||"var(--sevn-color-primary)",votes:`${J.valid_votes_pct.toFixed(1)}%`,elected:J.elected??!1,statusLabel:ta(J.status),statusColor:na(J.status)})),se=M.map(J=>({value:J.valid_votes_pct,color:J.party_color||"var(--sevn-color-primary)",label:J.party_abbr||""}));return{candidates:K,rings:se,totalVotes:null}}),Q=re(()=>l(D).candidates),le=re(()=>l(D).rings),ee=re(()=>l(D).totalVotes),Y=re(()=>n()?_l:br(l(h)?l(o)?.last_updated:l(p)?.summary?.last_updated));let C=ne(Xe(at?window.innerWidth<=480:!1));Pt(()=>{if(!at)return;const M=window.matchMedia("(max-width: 480px)");y(C,M.matches,!0);const K=se=>{y(C,se.matches,!0)};return M.addEventListener("change",K),()=>M.removeEventListener("change",K)});var q=zl();let oe;var be=b(q);Ws(be,{get title(){return a().title},get description(){return a().description},get tag(){return a().tag},get tagColor(){return a().tagColor}});var ye=L(be,2),Ee=b(ye);Us(Ee,{label:"Cargo",get options(){return _},get value(){return l(g)},set value(M){y(g,M,!0)}});var Fe=L(ye,2),gt=b(Fe),U=b(gt);En(U,{label:"Busque por UF",get options(){return d},get icon(){return rn},iconSize:13,get value(){return l(f)},set value(M){y(f,M,!0)}});var E=L(gt,2),$=b(E);En($,{label:"Busque por município (opcional)",get options(){return l(c)},get icon(){return rn},iconSize:13,get value(){return l(h)},set value(M){y(h,M,!0)}});var ge=L(Fe,2),me=b(ge);{let M=re(()=>l(f)?"Você selecionou:":"Busque por estado");En(me,{get label(){return l(M)},get options(){return d},get icon(){return rn},iconSize:13,get value(){return l(f)},set value(K){y(f,K,!0)}})}var nt=L(ge,2);{var rt=M=>{var K=bl(),se=b(K);En(se,{label:"Busque por município (opcional):",get options(){return l(c)},get icon(){return rn},iconSize:13,get value(){return l(h)},set value(J){y(h,J,!0)}}),k(M,K)};N(nt,M=>{l(f)&&M(rt)})}var Ne=L(nt,2);{var ce=M=>{var K=yl(),se=b(K);En(se,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return _},get value(){return l(g)},set value(J){y(g,J,!0)}}),k(M,K)};N(Ne,M=>{l(f)&&M(ce)})}var we=L(Ne,2);{var De=M=>{var K=Ui(),se=mn(K);{var J=X=>{var G=xl();k(X,G)},m=X=>{var G=kl(),ue=b(G);j(()=>te(ue,l(u))),k(X,G)},R=X=>{var G=Sl(),ue=b(G);j(()=>te(ue,`Resultado ainda não publicado para ${l(h)?"este município":"este estado"}.`)),k(X,G)},B=X=>{var G=El(),ue=b(G),Le=b(ue);{let Tl=re(()=>_.find(Rl=>Rl.value===l(g))?.label??""),Ml=re(()=>l(C)?"230px":"350px");il(Le,{get rings(){return l(le)},get centerLabel(){return l(Tl)},centerLabelSize:14,get size(){return l(Ml)},outerRadius:100,thickness:10,ringGap:5})}var Ct=L(ue,2),kr=b(Ct);js(kr,{get candidates(){return l(Q)},get totalVotes(){return l(ee)},get date(){return l(Y)},font:"TSE"}),k(X,G)};N(se,X=>{l(s)?X(J):l(u)?X(m,1):!n()&&l(Q).length===0?X(R,2):X(B,!1)})}k(M,K)};N(we,M=>{l(f)&&l(g)&&M(De)})}j(()=>oe=qe(q,1,"sevn_perf_muni svelte-158q6c1",null,oe,{"sevn_perf_muni--raw":r()})),k(e,q),Qt()}const ra=$o(Al,"CandidateMultiRingChartPerformanceByMunicipality");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:wa,CandidateMultiRingChartPerformanceByMunicipality:ra}),ts()),ra}));