Files
agent-estate-wiki/public/static/scripts/script-12-d93af9ba.js
T
Tony0410 d129b70237 fix: serve quartz with clean URL support and regenerate site
- Add serve.py to resolve clean Quartz URLs to .html files
- Regenerate Quartz site with correct baseUrl http://100.118.5.51:9120
- 196 HTML files emitted; all internal links now resolve
2026-08-15 23:35:16 +08:00

2 lines
17 KiB
JavaScript

var K=u=>(e,t)=>e[`node${u}`]===t[`node${u}`],ku=K("Name"),Lu=K("Type"),Tu=K("Value");function iu(u,e){if(u.attributes.length===0&&e.attributes.length===0)return[];let t=[],r=new Map,i=new Map;for(let n of u.attributes)r.set(n.name,n.value);for(let n of e.attributes){let D=r.get(n.name);n.value===D?r.delete(n.name):(typeof D<"u"&&r.delete(n.name),i.set(n.name,n.value))}for(let n of r.keys())t.push({type:5,name:n});for(let[n,D]of i.entries())t.push({type:4,name:n,value:D});return t}function V(u,e=!0){let t=`${u.localName}`;for(let{name:r,value:i}of u.attributes)e&&r.startsWith("data-")||(t+=`[${r}=${i}]`);return t+=u.innerHTML,t}function z(u){switch(u.tagName){case"BASE":case"TITLE":return u.localName;case"META":{if(u.hasAttribute("name"))return`meta[name="${u.getAttribute("name")}"]`;if(u.hasAttribute("property"))return`meta[name="${u.getAttribute("property")}"]`;break}case"LINK":{if(u.hasAttribute("rel")&&u.hasAttribute("href"))return`link[rel="${u.getAttribute("rel")}"][href="${u.getAttribute("href")}"]`;if(u.hasAttribute("href"))return`link[href="${u.getAttribute("href")}"]`;break}}return V(u)}function Ru(u){let[e,t=""]=u.split("?");return`${e}?t=${Date.now()}&${t.replace(/t=\d+/g,"")}`}function w(u){if(u.nodeType===1&&u.hasAttribute("data-persist"))return u;if(u.nodeType===1&&u.localName==="script"){let e=document.createElement("script");for(let{name:t,value:r}of u.attributes)t==="src"&&(r=Ru(r)),e.setAttribute(t,r);return e.innerHTML=u.innerHTML,e}return u.cloneNode(!0)}function Uu(u,e){if(u.children.length===0&&e.children.length===0)return[];let t=[],r=new Map,i=new Map,n=new Map;for(let D of u.children)r.set(z(D),D);for(let D of e.children){let s=z(D),a=r.get(s);a?V(D,!1)!==V(a,!1)&&i.set(s,w(D)):n.set(s,w(D)),r.delete(s)}for(let D of u.childNodes){if(D.nodeType===1){let s=z(D);if(r.has(s)){t.push({type:1});continue}else if(i.has(s)){let a=i.get(s);t.push({type:3,attributes:iu(D,a),children:Du(D,a)});continue}}t.push(void 0)}for(let D of n.values())t.push({type:0,node:w(D)});return t}function Du(u,e){let t=[],r=Math.max(u.childNodes.length,e.childNodes.length);for(let i=0;i<r;i++){let n=u.childNodes.item(i),D=e.childNodes.item(i);t[i]=U(n,D)}return t}function U(u,e){if(!u)return{type:0,node:w(e)};if(!e)return{type:1};if(Lu(u,e)){if(u.nodeType===3){let t=u.nodeValue,r=e.nodeValue;if(t.trim().length===0&&r.trim().length===0)return}if(u.nodeType===1){if(ku(u,e)){let t=u.tagName==="HEAD"?Uu:Du;return{type:3,attributes:iu(u,e),children:t(u,e)}}return{type:2,node:w(e)}}else return u.nodeType===9?U(u.documentElement,e.documentElement):Tu(u,e)?void 0:{type:2,value:e.nodeValue}}return{type:2,node:w(e)}}function Pu(u,e){if(e.length!==0)for(let{type:t,name:r,value:i}of e)t===5?u.removeAttribute(r):t===4&&u.setAttribute(r,i)}async function J(u,e,t){if(!e)return;let r;switch(u.nodeType===9?(u=u.documentElement,r=u):t?r=t:r=u,e.type){case 0:{let{node:i}=e;u.appendChild(i);return}case 1:{if(!r)return;u.removeChild(r);return}case 2:{if(!r)return;let{node:i,value:n}=e;if(typeof n=="string"){r.nodeValue=n;return}r.replaceWith(i);return}case 3:{if(!r)return;let{attributes:i,children:n}=e;Pu(r,i);let D=Array.from(r.childNodes);await Promise.all(n.map((s,a)=>J(r,s,D[a])));return}}}function Z(u,e){let t=U(u,e);return J(u,t)}var De=Object.hasOwnProperty;var cu,_,fu,Wu,B,lu,_u,pu,Q,W,L,du,uu,X,Y,Mu,Eu={},N=[],Nu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$=Array.isArray;function g(u,e){for(var t in e)u[t]=e[t];return u}function eu(u){u&&u.parentNode&&u.parentNode.removeChild(u)}function G(u,e,t,r,i){var n={type:u,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++fu,__i:-1,__u:0};return i==null&&_.vnode!=null&&_.vnode(n),n}function x(u){return u.children}function M(u,e){this.props=u,this.context=e}function b(u,e){if(e==null)return u.__?b(u.__,u.__i+1):null;for(var t;e<u.__k.length;e++)if((t=u.__k[e])!=null&&t.__e!=null)return t.__e;return typeof u.type=="function"?b(u):null}function ju(u){if(u.__P&&u.__d){var e=u.__v,t=e.__e,r=[],i=[],n=g({},e);n.__v=e.__v+1,_.vnode&&_.vnode(n),mu(u.__P,n,e,u.__n,u.__P.namespaceURI,32&e.__u?[t]:null,r,t??b(e),!!(32&e.__u),i),n.__v=e.__v,n.__.__k[n.__i]=n,Iu(r,n,i),e.__e=e.__=null,n.__e!=t&&hu(n)}}function hu(u){if((u=u.__)!=null&&u.__c!=null)return u.__e=u.__c.base=null,u.__k.some(function(e){if(e!=null&&e.__e!=null)return u.__e=u.__c.base=e.__e}),hu(u)}function su(u){(!u.__d&&(u.__d=!0)&&B.push(u)&&!j.__r++||lu!=_.debounceRendering)&&((lu=_.debounceRendering)||_u)(j)}function j(){try{for(var u,e=1;B.length;)B.length>e&&B.sort(pu),u=B.shift(),e=B.length,ju(u)}finally{B.length=j.__r=0}}function Cu(u,e,t,r,i,n,D,s,a,l,c){var E,o,F,p,A,h,d,f=r&&r.__k||N,C=e.length;for(a=$u(t,e,f,a,C),E=0;E<C;E++)(F=t.__k[E])!=null&&(o=F.__i!=-1&&f[F.__i]||Eu,F.__i=E,h=mu(u,F,o,i,n,D,s,a,l,c),p=F.__e,F.ref&&o.ref!=F.ref&&(o.ref&&tu(o.ref,null,F),c.push(F.ref,F.__c||p,F)),A==null&&p!=null&&(A=p),(d=!!(4&F.__u))||o.__k===F.__k?(a=Au(F,a,u,d),d&&o.__e&&(o.__e=null)):typeof F.type=="function"&&h!==void 0?a=h:p&&(a=p.nextSibling),F.__u&=-7);return t.__e=A,a}function $u(u,e,t,r,i){var n,D,s,a,l,c=t.length,E=c,o=0;for(u.__k=new Array(i),n=0;n<i;n++)(D=e[n])!=null&&typeof D!="boolean"&&typeof D!="function"?(typeof D=="string"||typeof D=="number"||typeof D=="bigint"||D.constructor==String?D=u.__k[n]=G(null,D,null,null,null):$(D)?D=u.__k[n]=G(x,{children:D},null,null,null):D.constructor===void 0&&D.__b>0?D=u.__k[n]=G(D.type,D.props,D.key,D.ref?D.ref:null,D.__v):u.__k[n]=D,a=n+o,D.__=u,D.__b=u.__b+1,s=null,(l=D.__i=Hu(D,t,a,E))!=-1&&(E--,(s=t[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>c?o--:i<c&&o++),typeof D.type!="function"&&(D.__u|=4)):l!=a&&(l==a-1?o--:l==a+1?o++:(l>a?o--:o++,D.__u|=4))):u.__k[n]=null;if(E)for(n=0;n<c;n++)(s=t[n])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=b(s)),vu(s,s));return r}function Au(u,e,t,r){var i,n;if(typeof u.type=="function"){for(i=u.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=u,e=Au(i[n],e,t,r));return e}u.__e!=e&&(r&&(e&&u.type&&!e.parentNode&&(e=b(u)),t.insertBefore(u.__e,e||null)),e=u.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Hu(u,e,t,r){var i,n,D,s=u.key,a=u.type,l=e[t],c=l!=null&&(2&l.__u)==0;if(l===null&&s==null||c&&s==l.key&&a==l.type)return t;if(r>(c?1:0)){for(i=t-1,n=t+1;i>=0||n<e.length;)if((l=e[D=i>=0?i--:n++])!=null&&(2&l.__u)==0&&s==l.key&&a==l.type)return D}return-1}function au(u,e,t){e[0]=="-"?u.setProperty(e,t??""):u[e]=t==null?"":typeof t!="number"||Nu.test(e)?t:t+"px"}function P(u,e,t,r,i){var n,D;u:if(e=="style")if(typeof t=="string")u.style.cssText=t;else{if(typeof r=="string"&&(u.style.cssText=r=""),r)for(e in r)t&&e in t||au(u.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||au(u.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace(du,"$1")),D=e.toLowerCase(),e=D in u||e=="onFocusOut"||e=="onFocusIn"?D.slice(2):e.slice(2),u.l||(u.l={}),u.l[e+n]=t,t?r?t[L]=r[L]:(t[L]=uu,u.addEventListener(e,n?Y:X,n)):u.removeEventListener(e,n?Y:X,n);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in u)try{u[e]=t??"";break u}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?u.removeAttribute(e):u.setAttribute(e,e=="popover"&&t==1?"":t))}}function Fu(u){return function(e){if(this.l){var t=this.l[e.type+u];if(e[W]==null)e[W]=uu++;else if(e[W]<t[L])return;return t(_.event?_.event(e):e)}}}function mu(u,e,t,r,i,n,D,s,a,l){var c,E,o,F,p,A,h,d,f,C,S,v,k,ou,R,q,m=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(a=!!(32&t.__u),n=[s=e.__e=t.__e]),(c=_.__b)&&c(e);u:if(typeof m=="function"){E=D.length;try{if(f=e.props,C=m.prototype&&m.prototype.render,S=(c=m.contextType)&&r[c.__c],v=c?S?S.props.value:c.__:r,t.__c?d=(o=e.__c=t.__c).__=o.__E:(C?e.__c=o=new m(f,v):(e.__c=o=new M(f,v),o.constructor=m,o.render=qu),S&&S.sub(o),o.state||(o.state={}),o.__n=r,F=o.__d=!0,o.__h=[],o._sb=[]),C&&o.__s==null&&(o.__s=o.state),C&&m.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=g({},o.__s)),g(o.__s,m.getDerivedStateFromProps(f,o.__s))),p=o.props,A=o.state,o.__v=e,F)C&&m.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),C&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else{if(C&&m.getDerivedStateFromProps==null&&f!==p&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(f,v),e.__v==t.__v||!o.__e&&o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(f,o.__s,v)===!1){e.__v!=t.__v&&(o.props=f,o.state=o.__s,o.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(y){y&&(y.__=e)}),N.push.apply(o.__h,o._sb),o._sb=[],o.__h.length&&D.push(o);break u}o.componentWillUpdate!=null&&o.componentWillUpdate(f,o.__s,v),C&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(p,A,h)})}if(o.context=v,o.props=f,o.__P=u,o.__e=!1,k=_.__r,ou=0,C)o.state=o.__s,o.__d=!1,k&&k(e),c=o.render(o.props,o.state,o.context),N.push.apply(o.__h,o._sb),o._sb=[];else do o.__d=!1,k&&k(e),c=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++ou<25);o.state=o.__s,o.getChildContext!=null&&(r=g(g({},r),o.getChildContext())),C&&!F&&o.getSnapshotBeforeUpdate!=null&&(h=o.getSnapshotBeforeUpdate(p,A)),R=c!=null&&c.type===x&&c.key==null?Bu(c.props.children):c,s=Cu(u,$(R)?R:[R],e,t,r,i,n,D,s,a,l),o.base=e.__e,e.__u&=-161,o.__h.length&&D.push(o),d&&(o.__E=o.__=null)}catch(y){if(D.length=E,e.__v=null,a||n!=null){if(y.then){for(e.__u|=a?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;n!=null&&(n[n.indexOf(s)]=null),e.__e=s}else if(n!=null)for(q=n.length;q--;)eu(n[q])}else e.__e=t.__e;e.__k==null&&(e.__k=t.__k||[]),y.then||gu(e),_.__e(y,e,t)}}else n==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):s=e.__e=Ou(t.__e,e,t,r,i,n,D,a,l);return(c=_.diffed)&&c(e),128&e.__u?void 0:s}function gu(u){u&&(u.__c&&(u.__c.__e=!0),u.__k&&u.__k.some(gu))}function Iu(u,e,t){for(var r=0;r<t.length;r++)tu(t[r],t[++r],t[++r]);_.__c&&_.__c(e,u),u.some(function(i){try{u=i.__h,i.__h=[],u.some(function(n){n.call(i)})}catch(n){_.__e(n,i.__v)}})}function Bu(u){return typeof u!="object"||u==null||u.__b>0?u:$(u)?u.map(Bu):u.constructor!==void 0?null:g({},u)}function Ou(u,e,t,r,i,n,D,s,a){var l,c,E,o,F,p,A,h=t.props||Eu,d=e.props,f=e.type;if(f=="svg"?i="http://www.w3.org/2000/svg":f=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),n!=null){for(l=0;l<n.length;l++)if((F=n[l])&&"setAttribute"in F==!!f&&(f?F.localName==f:F.nodeType==3)){u=F,n[l]=null;break}}if(u==null){if(f==null)return document.createTextNode(d);u=document.createElementNS(i,f,d.is&&d),s&&(_.__m&&_.__m(e,n),s=!1),n=null}if(f==null)h===d||s&&u.data==d||(u.data=d);else{if(n=f=="textarea"&&d.defaultValue!=null?null:n&&cu.call(u.childNodes),!s&&n!=null)for(h={},l=0;l<u.attributes.length;l++)h[(F=u.attributes[l]).name]=F.value;for(l in h)F=h[l],l=="dangerouslySetInnerHTML"?E=F:l=="children"||l in d||l=="value"&&"defaultValue"in d||l=="checked"&&"defaultChecked"in d||P(u,l,null,F,i);for(l in d)F=d[l],l=="children"?o=F:l=="dangerouslySetInnerHTML"?c=F:l=="value"?p=F:l=="checked"?A=F:s&&typeof F!="function"||h[l]===F||P(u,l,F,h[l],i);if(c)s||E&&(c.__html==E.__html||c.__html==u.innerHTML)||(u.innerHTML=c.__html),e.__k=[];else if(E&&(u.innerHTML=""),Cu(e.type=="template"?u.content:u,$(o)?o:[o],e,t,r,f=="foreignObject"?"http://www.w3.org/1999/xhtml":i,n,D,n?n[0]:t.__k&&b(t,0),s,a),n!=null)for(l=n.length;l--;)eu(n[l]);s&&f!="textarea"||(l="value",f=="progress"&&p==null?u.removeAttribute("value"):p!=null&&(p!==u[l]||f=="progress"&&!p||f=="option"&&p!=h[l])&&P(u,l,p,h[l],i),l="checked",A!=null&&A!=u[l]&&P(u,l,A,h[l],i))}return u}function tu(u,e,t){try{if(typeof u=="function"){var r=typeof u.__u=="function";r&&u.__u(),r&&e==null||(u.__u=u(e))}else u.current=e}catch(i){_.__e(i,t)}}function vu(u,e,t){var r,i;if(_.unmount&&_.unmount(u),(r=u.ref)&&(r.current&&r.current!=u.__e||tu(r,null,e)),(r=u.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(n){_.__e(n,e)}r.base=r.__P=r.__n=null}if(r=u.__k)for(i=0;i<r.length;i++)r[i]&&vu(r[i],e,t||typeof u.type!="function");t||eu(u.__e),u.__c=u.__=u.__e=void 0}function qu(u,e,t){return this.constructor(u,t)}cu=N.slice,_={__e:function(u,e,t,r){for(var i,n,D;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&n.getDerivedStateFromError!=null&&(i.setState(n.getDerivedStateFromError(u)),D=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(u,r||{}),D=i.__d),D)return i.__E=i}catch(s){u=s}throw u}},fu=0,Wu=function(u){return u!=null&&u.constructor===void 0},M.prototype.setState=function(u,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=g({},this.state),typeof u=="function"&&(u=u(g({},t),this.props)),u&&g(t,u),u!=null&&this.__v&&(e&&this._sb.push(e),su(this))},M.prototype.forceUpdate=function(u){this.__v&&(this.__e=!0,u&&this.__h.push(u),su(this))},M.prototype.render=x,B=[],_u=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,pu=function(u,e){return u.__v.__b-e.__v.__b},j.__r=0,Q=Math.random().toString(8),W="__d"+Q,L="__a"+Q,du=/(PointerCapture)$|Capture$/i,uu=0,X=Fu(!1),Y=Fu(!0),Mu=0;function H(u){return u.document.body.dataset.slug}var yu=(u,e,t)=>{let r=new URL(u.getAttribute(e),t);u.setAttribute(e,r.pathname+r.hash)};function wu(u,e){u.querySelectorAll('[href=""], [href^="./"], [href^="../"]').forEach(t=>{yu(t,"href",e)}),u.querySelectorAll('[src=""], [src^="./"], [src^="../"]').forEach(t=>{yu(t,"src",e)})}var Vu=/<link rel="canonical" href="([^"]*)">/;async function bu(u){let e=await fetch(`${u}`);if(!e.headers.get("content-type")?.startsWith("text/html"))return e;let t=await e.clone().text(),[r,i]=t.match(Vu)??[];return i?fetch(`${new URL(i,u)}`):e}var Ku=1,T=document.createElement("route-announcer"),Ju=u=>u?.nodeType===Ku,Zu=u=>{try{let e=new URL(u);if(window.location.origin===e.origin)return!0}catch{}return!1},Qu=u=>{let e=u.origin===window.location.origin,t=u.pathname===window.location.pathname;return e&&t},xu=({target:u})=>{if(!Ju(u)||u.attributes.getNamedItem("target")?.value==="_blank")return;let e=u.closest("a");if(!e||"routerIgnore"in e.dataset)return;let{href:t}=e;if(Zu(t))return{url:new URL(t),scroll:"routerNoscroll"in e.dataset?!1:void 0}};function Su(u){let e=new CustomEvent("nav",{detail:{url:u}});document.dispatchEvent(e)}var ru=new Set;window.addCleanup=u=>ru.add(u);function Gu(){document.querySelector(".navigation-progress")?.remove();let u=document.createElement("div");u.className="navigation-progress",u.style.width="0",document.body.prepend(u),setTimeout(()=>{u.style.width="80%"},100)}function Xu(){let u=document.querySelector(".navigation-progress");u&&u.remove()}var I=!1,nu;async function Yu(u,e=!1){I=!0,Gu(),nu=nu||new DOMParser;let t=await bu(u).then(a=>{if(a.headers.get("content-type")?.startsWith("text/html"))return a.text();window.location.assign(u)}).catch(()=>{window.location.assign(u)});if(!t)return;let r=new CustomEvent("prenav",{detail:{}});document.dispatchEvent(r),ru.forEach(a=>a()),ru.clear();let i=nu.parseFromString(t,"text/html");wu(i,u);let n=i.querySelector("title")?.textContent;if(n)document.title=n;else{let a=document.querySelector("h1");n=a?.innerText??a?.textContent??u.pathname}T.textContent!==n&&(T.textContent=n),T.dataset.persist="",i.body.appendChild(T),document.querySelector(".navigation-progress")?.remove(),Z(document.body,i.body),e||(u.hash?document.getElementById(decodeURIComponent(u.hash.substring(1)))?.scrollIntoView():window.scrollTo({top:0})),document.head.querySelectorAll(":not([data-persist])").forEach(a=>a.remove()),i.head.querySelectorAll(":not([data-persist])").forEach(a=>document.head.appendChild(a)),e||history.pushState({},"",u),Su(H(window)),delete T.dataset.persist}async function O(u,e=!1){if(!I){I=!0;try{await Yu(u,e)}catch(t){console.error(t),window.location.assign(u)}finally{Xu(),I=!1}}}window.spaNavigate=O;function ue(){return typeof window<"u"&&(window.addEventListener("click",async u=>{let{url:e}=xu(u)??{};if(!(!e||u.ctrlKey||u.metaKey)){if(u.preventDefault(),Qu(e)&&e.hash){document.getElementById(decodeURIComponent(e.hash.substring(1)))?.scrollIntoView(),history.pushState({},"",e);return}O(e,!1)}}),window.addEventListener("popstate",u=>{let{url:e}=xu(u)??{};window.location.hash&&window.location.pathname===e?.pathname||O(new URL(window.location.toString()),!0)})),new class{go(e){let t=new URL(e,window.location.toString());return O(t,!1)}back(){return window.history.back()}forward(){return window.history.forward()}}}ue();Su(H(window));if(!customElements.get("route-announcer")){let u={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};customElements.define("route-announcer",class extends HTMLElement{constructor(){super()}connectedCallback(){for(let[t,r]of Object.entries(u))this.setAttribute(t,r)}})}