projet-probleme-inverse-3D/assets/index-85fbf1a9.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2023-06-25 13:29:07 +00:00
import{L,Q as S,h as U,A as F,ae as K,w as B,M as N,y as C,af as q,v as V}from"./nav-1e818d35.js";function w(r,t={},e){for(const s in r){const n=r[s],o=e?`${e}:${s}`:s;typeof n=="object"&&n!==null?w(n,t,o):typeof n=="function"&&(t[o]=n)}return t}function J(r,t){return r.reduce((e,s)=>e.then(()=>s.apply(void 0,t)),Promise.resolve())}function Q(r,t){return Promise.all(r.map(e=>e.apply(void 0,t)))}function $(r,t){for(const e of r)e(t)}class z{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,e,s={}){if(!t||typeof e!="function")return()=>{};const n=t;let o;for(;this._deprecatedHooks[t];)o=this._deprecatedHooks[t],t=o.to;if(o&&!s.allowDeprecated){let i=o.message;i||(i=`${n} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)}}hookOnce(t,e){let s,n=(...o)=>(typeof s=="function"&&s(),s=void 0,n=void 0,e(...o));return s=this.hook(t,n),s}removeHook(t,e){if(this._hooks[t]){const s=this._hooks[t].indexOf(e);s!==-1&&this._hooks[t].splice(s,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,e){this._deprecatedHooks[t]=typeof e=="string"?{to:e}:e;const s=this._hooks[t]||[];this._hooks[t]=void 0;for(const n of s)this.hook(t,n)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const e in t)this.deprecateHook(e,t[e])}addHooks(t){const e=w(t),s=Object.keys(e).map(n=>this.hook(n,e[n]));return()=>{for(const n of s.splice(0,s.length))n()}}removeHooks(t){const e=w(t);for(const s in e)this.removeHook(s,e[s])}callHook(t,...e){return this.callHookWith(J,t,...e)}callHookParallel(t,...e){return this.callHookWith(Q,t,...e)}callHookWith(t,e,...s){const n=this._before||this._after?{name:e,args:s,context:{}}:void 0;this._before&&$(this._before,n);const o=t(this._hooks[e]||[],s);return o instanceof Promise?o.finally(()=>{this._after&&n&&$(this._after,n)}):(this._after&&n&&$(this._after,n),o)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{const e=this._before.indexOf(t);e!==-1&&this._before.splice(e,1)}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{const e=this._after.indexOf(t);e!==-1&&this._after.splice(e,1)}}}function G(){return new z}const X=["script","style","noscript"],Y=["base","meta","link","style","script","noscript"],Z=["base","title","titleTemplate","bodyAttrs","htmlAttrs"];function x(r,t){const{props:e,tag:s}=r;if(Z.includes(s))return s;if(s==="link"&&e.rel==="canonical")return"canonical";if(e.charset)return"charset";const n=["id"];s==="meta"&&n.push("name","property","http-equiv");for(const o of n)if(typeof e[o]<"u"){const i=String(e[o]);return t&&!t(i)?!1:`${s}:${o}:${i}`}return!1}const b=(r,t)=>{const{tag:e,$el:s}=r;s&&(Object.entries(e.props).forEach(([n,o])=>{o=String(o);const i=`attr:${n}`;if(n==="class"){if(!o)return;for(const a of o.split(" ")){const l=`${i}:${a}`;t&&t(r,l,()=>s.classList.remove(a)),s.classList.contains(a)||s.classList.add(a)}return}t&&!n.startsWith("data-h-")&&t(r,i,()=>s.removeAttribute(n)),s.getAttribute(n)!==o&&s.setAttribute(n,o)}),X.includes(e.tag)&&s.innerHTML!==(e.children||"")&&(s.innerHTML=e.children||""))};function T(r){let t=9;for(let e=0;e<r.length;)t=Math.imul(t^r.charCodeAt(e++),9**9);return((t^t>>>9)+65536).toString(16).substring(1,8).toLowerCase()}async function I(r,t={}){var h,g;const e={shouldRender:!0};if(await r.hooks.callHook("dom:beforeRender",e),!e.shouldRender)return;const s=t.document||window.document,n=r._popSideEffectQueue();r.headEntries().map(d=>d._sde).forEach(d=>{Object.entries(d).forEach(([c,f])=>{n[c]=f})});const o=async d=>{const c=r.headEntries().find(_=>_._i===d._e),f={renderId:d._d||T(JSON.stringify({...d,_e:void 0,_p:void 0})),$el:null,shouldRende