PageSourceSearch

https://evandro1818-analiseforcarelativa.hf.space/assets/init.svelte-BagFGebh.js

js evandro1818-analiseforcarelativa.hf.space collected 2026-10-04 16:51:26 UTC 7,212 bytes, 1 lines download raw bytes

1import*as d from"./svelte/svelte_internal_client.js";import{d as M,e as b,f as S}from"./i18n-IeFj-zpk.js";import{tick as f}from"./svelte/svelte_svelte.js";import{d as A}from"./index-tFQomdd2.js";import{a as g}from"./utils.svelte-NGrRZh7a.js";import"./index-VELz1aW8.js";const x={walkthrough:"tabs",walkthroughstep:"tabitem"};class T{#s;#r;#e;reactive_formatter=t=>t;#t;client;#o=d.state();get root(){return d.get(this.#o)}set root(t){d.set(this.#o,t,!0)}root_untracked;#n=new Set;#p=new Set;#h=[];#a=new Map;#i=new Map;#l;component_ids;initial_tabs={};components_to_register=new Set;ready;ready_resolve;resolved=!1;#c=new Set;constructor(t,e,i,s,o,n,p){this.ready=new Promise(l=>{this.ready_resolve=l}),this.reactive_formatter=n,this.#t={...s,api_url:new URL(s.api_prefix,s.root).toString()},this.#s=t,this.#r=e,this.#e=i,this.root=this.create_node({id:e.id,children:[]},new Map,!0);for(const l of t)l.props.visible!=!1&&this.components_to_register.add(l.id);this.client=o,this.prepare();const a=t.reduce((l,c)=>(l.set(c.id,c),l),new Map);this.root.children=this.#r.children.map(l=>this.traverse(l,c=>this.create_node(c,a,!1,this.reactive_formatter))),this.component_ids=t.map(l=>l.id),this.initial_tabs={},v(this.root,this.initial_tabs),this.postprocess(this.root),this.#l=p,this.root_untracked=this.root}reload(t,e,i,s){this.#r=e,this.#s=t,this.#t={...s,api_url:new URL(s.api_prefix,s.root).toString()},this.#e=i,this.root=this.create_node({id:e.id,children:[]},new Map,!0);for(const n of t)n.props.visible!=!1&&this.components_to_register.add(n.id);this.prepare();const o=t.reduce((n,p)=>(n.set(p.id,p),n),new Map);this.root.children=this.#r.children.map(n=>this.traverse(n,p=>this.create_node(p,o,!1,this.reactive_formatter))),this.component_ids=t.map(n=>n.id),this.initial_tabs={},v(this.root,this.initial_tabs),this.postprocess(this.root)}register_component(t,e,i){this.#i.set(t,e),this.#a.set(t,i),this.components_to_register.delete(t),this.components_to_register.size===0&&!this.resolved&&(this.resolved=!0,this.ready_resolve())}prepare(){const[t,e]=M(this.#e);this.#n=t,this.#p=e}process(){}postprocess(t){this.root=this.traverse(t,[e=>h(e,this.#t.api_url),e=>U(e,this.components_to_register),e=>y(e,this.initial_tabs),e=>this.find_attached_events(e,this.#e),e=>$(e,this.components_to_register,this.#c)])}find_attached_events(t,e){const i=e.filter(s=>s.targets.find(([o])=>o===t.id)).map(s=>{const o=s.targets.find(([n])=>n===t.id);return o?o[1]:null}).filter(Boolean);return t.props.shared_props.attached_events=i,t}traverse(t,e){function i(s,o,n){const p=o(s);return"children"in s&&s.children.length>0&&(p.children=s.children?.map(a=>n(a,o))||[]),p}if(Array.isArray(e)){let s=t;for(const o of e)s=i(s,o,this.traverse.bind(this));return s}else return i(t,e,this.traverse.bind(this))}create_node(t,e,i=!1,s){let o;if(i?o={type:"column",id:t.id,props:{visible:!0,root:"",theme_mode:"light"},component_class_id:"column",key:null}:o=e.get(t.id),!o)throw new Error(`Component with ID ${t.id} not found`);s&&(o.props.i18n=s);const n=L(t.id,o.props,[this.#n,this.#p],this.client,this.#t.api_url,{...this.#t}),p=x[o.type]||o.type;return{id:t.id,type:p,props:n,children:[],show_progress_on:null,component_class_id:o.component_class_id||o.type,component:n.shared_props.visible!==!1?b(o.type,o.component_class_id,this.#t.api_url||""):null,key:o.key,rendered_in:o.rendered_in,documentation:o.documentation,original_visibility:n.shared_props.visible}}rerender(t,e){const i=t.reduce((p,a)=>(p.set(a.id,a),p),new Map),s=this.traverse(e,p=>this.create_node(p,i,!1,this.reactive_formatter));v(s,this.initial_tabs);const o=this.traverse(s,p=>y(p,this.initial_tabs)),n=_(this.root,o.id);if(!n)throw new Error("Rerender failed: root node not found in current tree");n.children=o.children}async update_visibility(t,e){t.children.forEach(i=>{const s=this.#i.get(i.id);s&&s(e),this.update_visibility(i,e)})}async update_state(t,e,i=!0){const s=_(this.root,t);let o=!1;i&&!s?.component&&(await f(),this.root=this.traverse(this.root,[p=>P(p,t,e.visible),p=>h(p,this.#t.api_url)]),await f(),o=!0);const n=this.#i.get(t);if(n)n&&n(e);else{const p=s?.props.props.value,a=k(e);s.props.shared_props={...s?.props.shared_props,...a.shared_props},s.props.props={...s?.props.props,...a.props},"value"in e&&!A(p,e.value)&&this.#l(t,"change",null)}!i||o||(await f(),await this.update_visibility(s,e))}async get_state(t){const e=this.#a.get(t),i=_(this.root,t);return!e&&!i?null:e?await e():i?Promise.resolve({value:i.props.props.value}):null}async render_previously_invisible_children(t){this.root=this.traverse(this.root,[e=>(e.id===t&&w(e,this.#c),e),e=>h(e,this.#t.api_url)])}}function w(r,t){r.props.shared_props.visible=t.has(r.id)?!0:r.props.shared_props.visible,r.children.forEac
1h(e=>{w(e,t)})}function R(r,t,e){return t?t.reduce((i,s)=>(i[s]=async(...o)=>(o.length===1&&(o=o[0]),await e.component_server(r,s,o)),i),{}):{}}function k(r){const t={},e={};for(const i in r)if(i==="id"||i==="autoscroll")e[i]=r[i];else if(g.includes(i)){const s=i;t[s]=r[i]}else e[i]=r[i];return{shared_props:t,props:e}}function L(r,t,e,i,s,o={}){const{shared_props:n,props:p}=k(t);n.server=R(r,t.server_fns,i);for(const a in o)if(g.includes(a)){const l=a;n[l]=o[a]}else p[a]=o[a];return n.client=i,n.id=r,n.interactive=S(r,n.interactive,p.value,e),n.load_component=(a,l)=>b(a,"",s,l),n.visible=n.visible===void 0?!0:n.visible,n.loading_status={},{shared_props:n,props:p}}function h(r,t){if(r.props.shared_props.visible&&!r.component){const e={...r,component:b(r.type,r.component_class_id,t),children:[]};return r.children&&(e.children=r.children.map(i=>h(i,t))),e}else return r}function P(r,t,e){return r.id==t&&(r.props.shared_props.visible=e),r}function u(r,t){t.delete(r.id),r.children&&r.children.forEach(e=>u(e,t))}function U(r,t){return r.props.shared_props.visible!==!0&&u(r,t),r}function m(r,t){return r.props.shared_props.visible===!0&&(t.add(r.id),r.props.shared_props.visible=!1),r.children.forEach(e=>{m(e,t)}),r}function $(r,t,e){return r.type==="accordion"&&r.props.props.open===!1&&(u(r,t),r.children&&r.children.forEach(i=>{m(i,e)})),r.type==="tabs"&&r.children.forEach(i=>{i.type==="tabitem"&&i.props.props.id!==(r.props.props.selected||r.props.props.initial_tabs[0].id)&&(u(i,t),m(i,e))}),r}function y(r,t){if(r.type==="tabs"&&r.id in t){const e=t[r.id].sort((i,s)=>i.order-s.order);r.props.props.initial_tabs=e}else r.type==="tabitem"&&(r.props.props.component_id=r.id);return r}function E(r,t,e,i){e!==null&&r.type==="tabitem"&&(e in t||(t[e]=[]),"id"in r.props.props||(r.props.props.id=r.id),t[e].push({label:r.props.shared_props.label,id:r.props.props.id,elem_id:r.props.shared_props.elem_id,visible:r.props.shared_props.visible,interactive:r.props.shared_props.interactive,scale:r.props.shared_props.scale||null,component_id:r.id}),r.props.props.order=i),r.children&&r.children.forEach((s,o)=>{E(s,t,r.type==="tabs"?r.id:null,r.type==="tabs"?o:null)})}function v(r,t){function e(i){"children"in i&&i.children.length>0&&i.children?.forEach(s=>E(s,t,i.type==="tabs"?i.id:null,null))}return e(r)}function _(r,t){if(r.id===t)return r;if(r.children)for(const e of r.children){const i=_(e,t);if(i)return i}return null}export{T as A};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.