@chessdrive/board 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +122 -2
- package/dist/board.d.ts +116 -0
- package/dist/board.js +6243 -0
- package/dist/board.umd.js +389 -0
- package/package.json +36 -5
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ChessDriveBoard={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Array.isArray,n=Array.prototype.indexOf,r=Array.prototype.includes,i=Array.from,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,c=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,d=Object.isExtensible;function f(e){return typeof e==`function`}var p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e){"@babel/helpers - typeof";return g=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g(e)}function _(e,t){if(g(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(g(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function v(e){var t=_(e,`string`);return g(t)==`symbol`?t:t+``}function y(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=1024,x=2048,S=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=1<<21,le=1<<22,C=1<<23,w=Symbol(`$state`),ue=Symbol(`component`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),ge=Symbol(`text`),_e=new class extends Error{constructor(...e){super(...e),y(this,`name`,`StaleReactionError`),y(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},ve=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),ye={},T=Symbol(`uninitialized`);function be(){console.warn(`https://svelte.dev/e/derived_inert`)}function xe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Se(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var E=!1;function Ce(e){E=e}var D;function we(e){if(e===null)throw xe(),ye;return D=e}function Te(){return we(Sn(D))}function O(e){if(E){if(Sn(D)!==null)throw xe(),ye;D=e}}function Ee(e=1){if(E){for(var t=e,n=D;t--;)n=Sn(n);D=n}}function De(e=!0){for(var t=0,n=D;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Sn(n);e&&n.remove(),n=i}}function k(e){if(!e||e.nodeType!==8)throw xe(),ye;return e.data}function Oe(e){return e===this.v}function ke(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ae(e){return!ke(e,this.v)}function je(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Me(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Re(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function ze(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ve(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var He=null;function Ue(e){He=e}function We(e,t=!1,n){He={p:He,i:!1,c:null,e:null,s:e,x:null,r:G,l:null}}function Ge(e){var t=He,n=t.e;if(n!==null){t.e=null;for(var r of n)Ln(r)}return e!==void 0&&(t.x=e),t.i=!0,He=t.p,Ke(e)}function Ke(e={}){return a(e,ue,{value:!0}),e}function qe(){return!0}var Je=[];function Ye(){var e=Je;Je=[],m(e)}function Xe(e){if(Je.length===0&&!yt){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}var Ze=~(x|S|b);function Qe(e,t){e.f=e.f&Ze|t}function $e(e){e.f&512||e.deps===null?Qe(e,b):Qe(e,S)}function et(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Qe(e,b)}function A(e){var t=W,n=G;ar(null),or(null);try{return e()}finally{ar(t),or(n)}}function tt(e,t,n,r){let i=qe()?it:st;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=G,c=nt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){An(e,s)}rt()}}var d=j();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>ot(e))).then(u).catch(e=>An(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),rt())}):f()}function nt(){var e=G,t=W,n=He,r=R;return function(i=!0){or(e),ar(t),Ue(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function rt(e=!0){or(null),ar(null),Ue(null),e&&R?.deactivate()}function j(){var e=G,t=e.b,n=R,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function it(e){var t=2|x;return G!==null&&(G.f|=ae),{ctx:He,deps:null,effects:null,equals:Oe,f:t,fn:e,reactions:null,rv:0,v:T,wv:0,parent:G,ac:null}}var at=Symbol(`obsolete`);function ot(e,t,n){let r=G;r===null&&je();var i=void 0,a=on(T),o=!W,s=new Set;return Bn(()=>{var t=G,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==_e&&n.reject(e)}).finally(rt)}catch(e){n.reject(e),rt()}var c=R;if(o){if(t.f&32768)var l=j();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(at);else for(let e of s.values())e.reject(at);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==at&&(c.activate(),t?(a.f|=C,un(a,t)):(a.f&8388608&&(a.f^=C),un(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Fn(()=>{for(let e of s)e.reject(at)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=it(e);return cr(t),t}function st(e){let t=it(e);return t.equals=Ae,t}function ct(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)qn(t[n])}}function lt(e){var t,n=G,r=e.parent;if(!nr&&r!==null&&e.v!==T&&r.f&24576)return be(),e.v;or(r);try{ct(e),t=br(e)}finally{or(n)}return t}function N(e){var t=lt(e);!e.equals(t)&&(e.wv=_r(),(!R?.is_fork||e.deps===null)&&(R===null?e.v=t:(R.capture(e,t,!0),gt?.capture(e,t,!0)),e.deps===null))?Qe(e,b):nr||(_t===null?$e(e):(Pn()||R?.is_fork)&&_t.set(e,t))}function ut(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&A(()=>{t.ac.abort(_e),t.ac=null}),t.fn!==null&&(t.teardown=p),Cr(t,0),Gn(t))}function dt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&wr(t)}function ft(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function pt(e,t){ft(e,t),t.add(e)}function P(e,t,n){ft(e,t),t.set(e,n)}function F(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function I(e,t,n){return e.set(F(e,t),n),n}function L(e,t){return e.get(F(e,t))}var mt,ht=null,R=null,gt=null,_t=null,vt=null,yt=!1,bt=!1,xt=null,St=null,Ct=0,wt=1,Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap,Ot=new WeakMap,kt=new WeakMap,At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakSet,Vt=class e{constructor(){pt(this,Bt),y(this,`id`,wt++),P(this,Tt,!1),y(this,`linked`,!0),P(this,Et,null),P(this,Dt,null),y(this,`async_deriveds`,new Map),y(this,`current`,new Map),y(this,`previous`,new Map),P(this,Ot,new Set),P(this,kt,new Set),P(this,At,0),P(this,jt,new Map),P(this,Mt,null),P(this,Nt,[]),P(this,Pt,[]),P(this,Ft,new Set),P(this,It,new Set),P(this,Lt,new Map),P(this,Rt,new Set),y(this,`is_fork`,!1),P(this,zt,!1),ht===null?ht=this:(I(Dt,ht,this),I(Et,this,ht)),ht=this}skip_effect(e){L(Lt,this).has(e)||L(Lt,this).set(e,{d:[],m:[]}),L(Rt,this).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=L(Lt,this).get(e);if(n){L(Lt,this).delete(e);for(var r of n.d)Qe(r,x),t(r);for(r of n.m)Qe(r,S),t(r)}L(Rt,this).add(e)}capture(e,t,n=!1){e.v!==T&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),_t?.set(e,t)),this.is_fork||(e.v=t)}activate(){R=this}deactivate(){R=null,_t=null}flush(){try{bt=!0,R=this,F(Bt,this,Wt).call(this)}finally{Ct=0,vt=null,xt=null,St=null,bt=!1,R=null,_t=null,rn.clear()}}discard(){for(let e of L(kt,this))e(this);L(kt,this).clear();for(let e of this.async_deriveds.values())e.reject(at);F(Bt,this,Yt).call(this),L(Mt,this)?.resolve()}register_created_effect(e){L(Pt,this).push(e)}increment(e,t){if(I(At,this,L(At,this)+1),e){let e=L(jt,this).get(t)??0;L(jt,this).set(t,e+1)}}decrement(e,t){if(I(At,this,L(At,this)-1),e){let e=L(jt,this).get(t)??0;e===1?L(jt,this).delete(t):L(jt,this).set(t,e-1)}L(zt,this)||(I(zt,this,!0),Xe(()=>{I(zt,this,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)L(Ft,this).add(t);for(let e of t)L(It,this).add(e);e.clear(),t.clear()}oncommit(e){L(Ot,this).add(e)}ondiscard(e){L(kt,this).add(e)}settled(){return(L(Mt,this)??I(Mt,this,h())).promise}static ensure(){if(R===null){let t=R=new e;!bt&&Xe(()=>{L(Tt,t)||t.flush()})}return R}apply(){_t=null}schedule(e){vt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):L(Nt,this).push(e)}};mt=Vt;function Ht(){if(this.is_fork)return!0;for(let n of L(jt,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(L(Lt,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Ut(){var e=[];for(let i of L(Nt,this))if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=b}}n||e.push(t)}return I(Nt,this,[]),e}function Wt(){I(Tt,this,!0);for(let e of L(Ft,this))L(It,this).delete(e),Qe(e,x),this.schedule(e);for(let e of L(It,this))Qe(e,S),this.schedule(e);this.apply();for(var e=xt=[],t=[],n=St=[];L(Nt,this).length>0;){Ct++>1e3&&(F(Bt,this,Yt).call(this),Xt());for(let n of F(Bt,this,Ut).call(this))try{F(Bt,this,Gt).call(this,n,e,t)}catch(e){throw tn(n),F(Bt,this,Ht).call(this)||this.discard(),e}}if(R=null,n.length>0){var r=mt.ensure();for(let e of n)r.schedule(e)}if(xt=null,St=null,F(Bt,this,Ht).call(this)){F(Bt,this,Jt).call(this,t),F(Bt,this,Jt).call(this,e);for(let[e,t]of L(Lt,this))en(e,t);n.length>0&&F(Bt,R,Wt).call(R);return}let i=F(Bt,this,Kt).call(this);if(i)F(Bt,this,Jt).call(this,t),F(Bt,this,Jt).call(this,e),F(Bt,i,qt).call(i,this);else{L(Ft,this).clear(),L(It,this).clear();for(let e of L(Ot,this))e(this);L(Ot,this).clear(),gt=this,Qt(t),Qt(e),gt=null,L(Mt,this)?.resolve();var a=R;if(L(At,this)===0&&(L(Nt,this).length===0||a!==null)&&F(Bt,this,Yt).call(this),L(Nt,this).length>0){if(a!==null){for(let e of L(Nt,this))L(Nt,a).push(e);I(Nt,this,[])}else a=this}a!==null&&(rn.clear(),F(Bt,a,Wt).call(a))}}function Gt(e,t,n){e.f^=b;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||L(Lt,this).has(r))&&r.fn!==null){a?r.f^=b:i&4?t.push(r):vr(r)&&(i&16&&L(It,this).add(r),wr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}function Kt(){for(var e=L(Et,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=L(Et,e)}return null}function qt(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(L(Ft,e),L(It,e));let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(L(It,this).delete(i),Qe(i,x),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),F(Bt,e,Yt).call(e),R=this,F(Bt,this,Wt).call(this)}function Jt(e){for(var t=0;t<e.length;t+=1)et(e[t],L(Ft,this),L(It,this))}function Yt(){if(this.linked){var e=L(Et,this),t=L(Dt,this);e===null||I(Dt,e,t),t===null?ht=e:I(Et,t,e),this.linked=!1}}function Xt(){try{Ie()}catch(e){An(e,vt)}}var Zt=null;function Qt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&vr(r)&&(Zt=new Set,wr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Yn(r),Zt?.size>0)){rn.clear();for(let e of Zt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Zt.has(n)&&(Zt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||wr(n)}}Zt.clear()}}Zt=null}}function $t(e){R.schedule(e)}function en(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),Qe(e,b);for(var n=e.first;n!==null;)en(n,t),n=n.next}}function tn(e){Qe(e,b);for(var t=e.first;t!==null;)tn(t),t=t.next}var nn=new Set,rn=new Map,an=!1;function on(e,t){return{f:0,v:e,reactions:null,equals:Oe,rv:0,wv:0}}function z(e,t){let n=on(e,t);return cr(n),n}function sn(e,t=!1,n=!0){let r=on(e);return t||(r.equals=Ae),r}function B(e,t,n=!1){return W!==null&&(!ir||W.f&131072)&&qe()&&W.f&4325394&&(sr===null||!sr.has(e))&&Be(),un(e,n?mn(t):t,St)}var cn=null,ln=0;function un(e,t,n=null){if(!e.equals(t)){nr?rn.set(e,t):rn.has(e)||rn.set(e,e.v);var r=Vt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&<(t),_t===null&&$e(t)}e.wv=_r(),cn=null,ln=0,pn(e,x,n),cn=null,qe()&&G!==null&&G.f&1024&&!(G.f&96)&&(dr===null?fr([e]):dr.push(e)),!r.is_fork&&nn.size>0&&!an&&dn()}return t}function dn(){an=!1;for(let e of nn){e.f&1024&&Qe(e,S);let t;try{t=vr(e)}catch{t=!0}t&&wr(e)}nn.clear()}function fn(e){B(e,e.v+1)}function pn(e,t,n){var r=e.reactions;if(r!==null){var i=qe(),a=r.length;if(ln+=a,ln>1e5&&cn===null&&(cn=new Set),cn!==null){if(cn.has(e))return;cn.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==G){var l=(c&x)===0;if(l&&Qe(s,t),c&131072)nn.add(s);else if(c&2){var u=s;_t?.delete(u),pn(u,S,n)}else if(l){var d=s;c&16&&Zt!==null&&Zt.add(d),n===null?$t(d):n.push(d)}}}}}function mn(e){if(typeof e!=`object`||!e||w in e||ue in e)return e;let n=u(e);if(n!==c&&n!==l)return e;var r=new Map,i=t(e),a=z(0),s=null,d=hr,f=e=>{if(hr===d)return e();var t=W,n=hr;ar(null),gr(d);var r=e();return ar(t),gr(n),r};return i&&r.set(`length`,z(e.length,s)),new Proxy(e,{defineProperty(e,t,n){`value`in n&&n.configurable!==!1&&n.enumerable!==!1&&n.writable!==!1||Re();var i=r.get(t);return i===void 0?f(()=>{var e=z(n.value,s);return r.set(t,e),e}):B(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>z(T,s));r.set(t,e),fn(a)}}else B(n,T),fn(a);return!0},get(t,n,i){if(n===w)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||o(t,n)?.writable)&&(a=f(()=>z(mn(c?t[n]:T),s)),r.set(n,a)),a!==void 0){var l=K(a);return l===T?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var n=Reflect.getOwnPropertyDescriptor(e,t),i=r.get(t);if(i!==void 0){var a=K(i);if(a===T)return;if(n&&`value`in n)n.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===w)return!0;var n=r.get(t),i=n!==void 0&&n.v!==T||Reflect.has(e,t);return(n!==void 0||G!==null&&(!i||o(e,t)?.writable))&&(n===void 0&&(n=f(()=>z(i?mn(e[t]):T,s)),r.set(t,n)),K(n)===T)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>z(T,s)),r.set(d+``,p)):B(p,T)}if(l===void 0)(!u||o(e,t)?.writable)&&(l=f(()=>z(void 0,s)),B(l,mn(n)),r.set(t,l));else{u=l.v!==T;var m=f(()=>mn(n));B(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&B(g,_+1)}fn(a)}return!0},ownKeys(e){K(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==T});for(var[n,i]of r)i.v!==T&&!(n in e)&&t.push(n);return t},setPrototypeOf(){ze()}})}var hn,gn,_n,vn;function yn(){if(hn===void 0){hn=window,gn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;_n=o(t,`firstChild`).get,vn=o(t,`nextSibling`).get,d(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),d(n)&&(n[ge]=void 0)}}function bn(e=``){return document.createTextNode(e)}function xn(e){return _n.call(e)}function Sn(e){return vn.call(e)}function V(e,t){if(!E)return xn(e);var n=xn(D);if(n===null)n=D.appendChild(bn());else if(t&&n.nodeType!==3){var r=bn();return n?.before(r),we(r),r}return t&&On(n),we(n),n}function Cn(e,t=!1){if(!E){var n=xn(e);return n instanceof Comment&&n.data===``?Sn(n):n}if(t){if(D?.nodeType!==3){var r=bn();return D?.before(r),we(r),r}On(D)}return D}function wn(e,t=!1){if(!E)return xn(e);var n=V(e,t);return O(e),n}function H(e,t=1,n=!1){let r=E?D:e;for(var i;t--;)i=r,r=Sn(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=bn();return r===null?i?.after(a):r.before(a),we(a),a}On(r)}return we(r),r}function Tn(e){e.textContent=``}function En(){return!1}function Dn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function On(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function kn(e){var t=G;if(t===null)return W.f|=C,e;if(!(t.f&32768)&&!(t.f&4))throw e;An(e,t)}function An(e,t){if(e===ye)throw e;if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function jn(e){G===null&&(W===null&&Fe(e),Pe()),nr&&Ne(e)}function Mn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Nn(e,t){var n=G;n!==null&&n.f&8192&&(e|=ee);var r={ctx:He,deps:null,nodes:null,f:e|x|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};R?.register_created_effect(r);var i=r;if(e&4)xt===null?Vt.ensure().schedule(r):xt.push(r);else if(t!==null){try{wr(r)}catch(e){throw qn(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ie))}if(i!==null&&(i.parent=n,n!==null&&Mn(i,n),W!==null&&W.f&2&&!(e&64))){var a=W;(a.effects??(a.effects=[])).push(i)}return r}function Pn(){return W!==null&&!ir}function Fn(e){let t=Nn(8,null);return Qe(t,b),t.teardown=e,t}function In(e){jn(`$effect`);var t=G.f;if(!W&&t&32&&He!==null&&!He.i){var n=He;(n.e??(n.e=[])).push(e)}else return Ln(e)}function Ln(e){return Nn(4|oe,e)}function Rn(e){Vt.ensure();let t=Nn(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Xn(t,()=>{qn(t),n(void 0)}):(qn(t),n(void 0))})}function zn(e){return Nn(4,e)}function Bn(e){return Nn(le|ae,e)}function Vn(e,t=0){return Nn(8|t,e)}function U(e,t=[],n=[],r=[]){tt(r,t,n,t=>{Nn(8,()=>{e(...t.map(K))})})}function Hn(e,t=0){return Nn(16|t,e)}function Un(e){return Nn(32|ae,e)}function Wn(e){var t=e.teardown;if(t!==null){let n=nr,r=W;rr(!0),ar(null);try{t.call(null)}catch(t){An(t,e.parent)}finally{rr(n),ar(r)}}}function Gn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&A(()=>{e.abort(_e)});var r=n.next;n.f&64?n.parent=null:qn(n,t),n=r}}function Kn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||qn(t),t=n}}function qn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Jn(e.nodes.start,e.nodes.end),n=!0),e.f|=re,Gn(e,t&&!n),Cr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Wn(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&Yn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Jn(e,t){for(;e!==null;){var n=e===t?null:Sn(e);e.remove(),e=n}}function Yn(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 Xn(e,t,n=!0){var r=[];e.f|=256,Zn(e,r,!0);var i=()=>{n&&qn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Zn(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Zn(i,t,o?n:!1)}i=a}}}function Qn(e){e.f&=-257,$n(e,!0)}function $n(e,t){if(!(e.f&256)&&e.f&8192){e.f^=ee,e.f&1024||(Qe(e,x),Vt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);$n(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function er(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Sn(n);t.append(n),n=i}}var tr=null,nr=!1;function rr(e){nr=e}var W=null,ir=!1;function ar(e){W=e}var G=null;function or(e){G=e}var sr=null;function cr(e){W!==null&&(W.f&2097152||W.f&2)&&(sr??(sr=new Set)).add(e)}var lr=null,ur=0,dr=null;function fr(e){dr=e}var pr=1,mr=0,hr=mr;function gr(e){hr=e}function _r(){return++pr}function vr(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(vr(a)&&N(a),a.wv>e.wv)return!0}t&512&&_t===null&&Qe(e,b)}return!1}function yr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(sr!==null&&sr.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?yr(a,t,!1):t===a&&(n?Qe(a,x):a.f&1024&&Qe(a,S),$t(a))}}function br(e){var t=lr,n=ur,r=dr,i=W,a=sr,o=He,s=ir,c=hr,l=e.f;lr=null,ur=0,dr=null,W=l&96?null:e,sr=null,Ue(e.ctx),ir=!1,hr=++mr,e.ac!==null&&(A(()=>{e.ac.abort(_e)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=ne;var f=xr(e);if(qe()&&dr!==null&&!ir&&f!==null&&!(e.f&6146))for(var p=0;p<dr.length;p++)yr(dr[p],e);if(i!==null&&i!==e){if(mr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=mr;if(t!==null)for(let e of t)e.rv=mr;dr!==null&&(r===null?r=dr:r.push(...dr))}return e.f&8388608&&(e.f^=C),d}catch(t){return xr(e),kn(t)}finally{e.f^=ce,lr=t,ur=n,dr=r,W=i,sr=a,Ue(o),ir=s,hr=c}}function xr(e){var t=e.deps,n=R?.is_fork;if(lr!==null){var r;if(n||Cr(e,ur),t!==null&&ur>0)for(t.length=ur+lr.length,r=0;r<lr.length;r++)t[ur+r]=lr[r];else e.deps=t=lr;if(Pn()&&e.f&512)for(r=ur;r<t.length;r++){var i;((i=t[r]).reactions??(i.reactions=[])).push(e)}}else!n&&t!==null&&ur<t.length&&(Cr(e,ur),t.length=ur);return t}function Sr(e,t){let i=t.reactions;if(i!==null){var a=n.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&t.f&2&&(lr===null||!r.call(lr,t))){var s=t;s.f&512&&(s.f^=512),s.v!==T&&$e(s),s.ac!==null&&A(()=>{s.ac.abort(_e),s.ac=null,Qe(s,x)}),ut(s),Cr(s,0)}}function Cr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Sr(e,n[r])}function wr(e){var t=e.f;if(!(t&16384)){Qe(e,b);var n=G;G=e;try{t&16777232?Kn(e):Gn(e),Wn(e);var r=br(e);e.teardown=typeof r==`function`?r:null,e.wv=pr}finally{G=n}}}function K(e){var t=!!(e.f&2);if(tr?.add(e),W!==null&&!ir&&!(G!==null&&G.f&16384)&&(sr===null||!sr.has(e))){var n=W.deps;if(W.f&2097152)e.rv<mr&&(e.rv=mr,lr===null&&n!==null&&n[ur]===e?ur++:lr===null?lr=[e]:lr.push(e));else{var i;(i=W).deps??(i.deps=[]),r.call(W.deps,e)||W.deps.push(e);var a=e.reactions;a===null?e.reactions=[W]:r.call(a,W)||a.push(W)}}if(nr&&rn.has(e))return rn.get(e);if(t){var o=e;if(nr){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||Er(o))&&(s=lt(o)),rn.set(o,s),s}var c=!(o.f&512)&&!ir&&W!==null&&!!(W.f&512),l=(o.f&ne)===0;vr(o)&&(c&&(o.f|=512),N(o)),c&&!l&&(dt(o),Tr(o))}if(_t?.has(e))return _t.get(e);if(e.f&8388608)throw e.v;return e.v}function Tr(e){if(e.f|=512,e.deps!==null)for(let n of e.deps){var t=n.reactions;t===null?n.reactions=[e]:r.call(t,e)||t.push(e),n.f&2&&!(n.f&512)&&(dt(n),Tr(n))}}function Er(e){if(e.v===T)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(rn.has(t)||t.f&2&&Er(t))return!0;return!1}function Dr(e){var t=ir;try{return ir=!0,e()}finally{ir=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var Or=[`touchstart`,`touchmove`];function kr(e){return Or.includes(e)}var Ar=Symbol(`events`),jr=new Set,Mr=new Set;function Nr(e,t,n,r={}){function i(e){if(r.capture||Br.call(t,e),!e.cancelBubble)return A(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,Xe(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function Pr(e,t,n,r={}){var i=Nr(t,e,n,r);return()=>{i.__removed=!0,e.removeEventListener(t,i,r)}}function Fr(e,t,n,r,i){var a={capture:r,passive:i},o=Nr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Fn(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function Ir(e,t,n){(t[Ar]??(t[Ar]={}))[e]=n}function Lr(e){for(var t=0;t<e.length;t++)jr.add(e[t]);for(var n of Mr)n(e)}var Rr=null,zr=!1;function Br(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;Rr=e,zr||(zr=!0,setTimeout(()=>{zr=!1,Rr=null}));var s=0,c=Rr===e&&e[Ar];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Ar]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=i[s]||e.target,o!==t){a(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=W,f=G;ar(null),or(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Ar]?.[r];h==null||o.disabled&&e.target!==o||h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Ar]=t,delete e.currentTarget,ar(d),or(f)}}}var Vr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Hr(e){return Vr?.createHTML(e)??e}function Ur(e){var t=Dn(`template`);return t.innerHTML=Hr(e.replaceAll(`<!>`,`<!---->`)),t.content}function Wr(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Gr(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(E)return Wr(D,null),D;i===void 0&&(i=Ur(a?e:`<!>`+e),n||(i=xn(i)));var t=r||gn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=xn(t),s=t.lastChild;Wr(o,s)}else Wr(t,t);return t}}function Kr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return Wr(D,null),D;if(!o){var e=xn(Ur(a));if(i)for(o=document.createDocumentFragment();xn(e);)o.appendChild(xn(e));else o=xn(e)}var t=o.cloneNode(!0);if(i){var n=xn(t),r=t.lastChild;Wr(n,r)}else Wr(t,t);return t}}function qr(e,t){return Kr(e,t,`svg`)}function Jr(){if(E)return Wr(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(``),n=bn();return e.append(t,n),Wr(t,n),e}function q(e,t){if(E){var n=G;n.f&32768&&n.nodes.end!==null||(n.nodes.end=D),Te()}else e!==null&&e.before(t)}function Yr(e){let t=0,n=on(0),r;return()=>{Pn()&&(K(n),Vn(()=>(t===0&&(r=Dr(()=>e(()=>fn(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,fn(n))})})))}}var Xr=ie|ae;function Zr(e,t,n,r){new mi(e,t,n,r)}var Qr=new WeakMap,$r=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ri=new WeakMap,ii=new WeakMap,ai=new WeakMap,oi=new WeakMap,si=new WeakMap,ci=new WeakMap,li=new WeakMap,ui=new WeakMap,di=new WeakMap,fi=new WeakMap,pi=new WeakMap,J=new WeakSet,mi=class{constructor(e,t,n,r){pt(this,J),y(this,`parent`,void 0),y(this,`is_pending`,!1),y(this,`transform_error`,void 0),P(this,Qr,void 0),P(this,$r,E?D:null),P(this,ei,void 0),P(this,ti,void 0),P(this,ni,void 0),P(this,ri,null),P(this,ii,null),P(this,ai,null),P(this,oi,null),P(this,si,0),P(this,ci,0),P(this,li,!1),P(this,ui,new Set),P(this,di,new Set),P(this,fi,null),P(this,pi,Yr(()=>(I(fi,this,on(L(si,this))),()=>{I(fi,this,null)}))),I(Qr,this,e),I(ei,this,t),I(ti,this,e=>{var t=G;t.b=this,t.f|=128,n(e)}),this.parent=G.b,this.transform_error=r??this.parent?.transform_error??(e=>e),I(ni,this,Hn(()=>{if(E){let e=k(L($r,this));Te();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));F(J,this,gi).call(this,t)}else t?F(J,this,yi).call(this):F(J,this,hi).call(this)}else F(J,this,bi).call(this)},Xr)),E&&I(Qr,this,D)}defer_effect(e){et(e,L(ui,this),L(di,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!L(ei,this).pending}update_pending_count(e,t){F(J,this,Ci).call(this,e,t),I(si,this,L(si,this)+e),L(fi,this)&&!L(li,this)&&(I(li,this,!0),Xe(()=>{I(li,this,!1),L(fi,this)&&un(L(fi,this),L(si,this))}))}get_effect_pending(){return L(pi,this).call(this),K(L(fi,this))}error(e){if(e===ye||!L(ei,this).onerror&&!L(ei,this).failed)throw e;R?.is_fork?(L(ri,this)&&R.skip_effect(L(ri,this)),L(ii,this)&&R.skip_effect(L(ii,this)),L(ai,this)&&R.skip_effect(L(ai,this)),R.oncommit(()=>{F(J,this,vi).call(this)||F(J,this,wi).call(this,e)})):F(J,this,wi).call(this,e)}};function hi(){try{I(ri,this,Un(()=>L(ti,this).call(this,L(Qr,this))))}catch(e){this.error(e)}}function gi(e){let t=L(ei,this).failed,{reset:n,invoke_onerror:r}=F(J,this,_i).call(this,e);Xe(r),t&&I(ai,this,Un(()=>{t(L(Qr,this),()=>e,()=>n)}))}function _i(e){var t=!1,n=!1;let r=()=>{F(J,this,vi).call(this)||(t?Se():(t=!0,n&&Ve(),L(ai,this)!==null&&Xn(L(ai,this),()=>{I(ai,this,null)}),F(J,this,Si).call(this,()=>{F(J,this,bi).call(this)})))};return{reset:r,invoke_onerror:()=>{if(!F(J,this,vi).call(this))try{n=!0,L(ei,this).onerror?.(e,r),n=!1}catch(e){An(e,L(ni,this)&&L(ni,this).parent)}}}}function vi(){return(L(ni,this).f&(te|re))!==0}function yi(){let e=L(ei,this).pending;e&&(this.is_pending=!0,I(ii,this,Un(()=>e(L(Qr,this)))),Xe(()=>{if(!F(J,this,vi).call(this)){var e=I(oi,this,document.createDocumentFragment()),t=bn(),n=!1;e.append(t),I(ri,this,F(J,this,Si).call(this,()=>{try{return Un(()=>L(ti,this).call(this,t))}catch(e){try{this.error(e),n=!0}catch(e){An(e,L(ni,this).parent)}return null}})),L(ri,this)===null?(I(oi,this,null),n&&F(J,this,xi).call(this,R)):L(ci,this)===0&&(L(Qr,this).before(e),I(oi,this,null),Xn(L(ii,this),()=>{I(ii,this,null)}),F(J,this,xi).call(this,R))}}))}function bi(){try{if(this.is_pending=this.has_pending_snippet(),I(ci,this,0),I(si,this,0),I(ri,this,Un(()=>{L(ti,this).call(this,L(Qr,this))})),L(ci,this)>0){var e=I(oi,this,document.createDocumentFragment());er(L(ri,this),e);let t=L(ei,this).pending;I(ii,this,Un(()=>t(L(Qr,this))))}else F(J,this,xi).call(this,R)}catch(e){this.error(e)}}function xi(e){this.is_pending=!1,e.transfer_effects(L(ui,this),L(di,this))}function Si(e){var t=G,n=W,r=He;or(L(ni,this)),ar(L(ni,this)),Ue(L(ni,this).ctx);try{return Vt.ensure(),e()}finally{or(t),ar(n),Ue(r)}}function Ci(e,t){if(this.has_pending_snippet())I(ci,this,L(ci,this)+e),L(ci,this)===0&&(F(J,this,xi).call(this,t),L(ii,this)&&Xn(L(ii,this),()=>{I(ii,this,null)}),L(oi,this)&&(L(Qr,this).before(L(oi,this)),I(oi,this,null)));else if(this.parent){var n;F(J,n=this.parent,Ci).call(n,e,t)}}function wi(e){L(ri,this)&&(qn(L(ri,this)),I(ri,this,null)),L(ii,this)&&(qn(L(ii,this)),I(ii,this,null)),L(ai,this)&&(qn(L(ai,this)),I(ai,this,null)),E&&(we(L($r,this)),Ee(),we(De()));let t=L(ei,this).failed,n=e=>{if(F(J,this,vi).call(this))return;let{reset:n,invoke_onerror:r}=F(J,this,_i).call(this,e);r(),t&&!F(J,this,vi).call(this)&&I(ai,this,F(J,this,Si).call(this,()=>{try{return Un(()=>{var r=G;r.b=this,r.f|=128,t(L(Qr,this),()=>e,()=>n)})}catch(e){return An(e,L(ni,this).parent),null}}))};Xe(()=>{if(!F(J,this,vi).call(this)){var t;try{t=this.transform_error(e)}catch(e){An(e,L(ni,this)&&L(ni,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>An(e,L(ni,this)&&L(ni,this).parent)):n(t)}})}var Ti=!0;function Ei(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??(e[ge]=e.nodeValue))&&(e[ge]=n,e.nodeValue=`${n}`)}function Di(e,t){return ki(e,t)}var Oi=new Map;function ki(e,{target:t,anchor:n,props:r={},events:a,context:o,intro:s=!0,transformError:c}){yn();var l=void 0,u=Rn(()=>{var u=n??t.appendChild(bn());Zr(u,{pending:()=>{}},t=>{We({});var n=He;if(o&&(n.c=o),a&&(r.$$events=a),E&&Wr(t,null),Ti=s,l=e(t,r)||Ke(),Ti=!0,E&&(G.nodes.end=D,D===null||D.nodeType!==8||D.data!==`]`))throw xe(),ye;Ge()},c);var d=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!d.has(r)){d.add(r);var i=kr(r);for(let e of[t,document]){var a=Oi.get(e);a===void 0&&(a=new Map,Oi.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Br,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(i(jr)),Mr.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=Oi.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Br),r.delete(e),r.size===0&&Oi.delete(n)):r.set(e,i)}Mr.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return Ai.set(l,u),l}var Ai=new WeakMap;function ji(e,t){let n=Ai.get(e);return n?(Ai.delete(e),n(t)):Promise.resolve()}var Mi=new WeakMap,Ni=new WeakMap,Pi=new WeakMap,Fi=new WeakMap,Ii=new WeakMap,Li=new WeakMap,Ri=new WeakMap,zi=class{constructor(e,t=!0){y(this,`anchor`,void 0),P(this,Mi,new Map),P(this,Ni,new Map),P(this,Pi,new Map),P(this,Fi,new Set),P(this,Ii,!0),P(this,Li,e=>{if(L(Mi,this).has(e)){var t=L(Mi,this).get(e),n=L(Ni,this).get(t);if(n)Qn(n),L(Fi,this).delete(t);else{var r=L(Pi,this).get(t);r&&(Qn(r.effect),L(Ni,this).set(t,r.effect),L(Pi,this).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of L(Mi,this)){if(L(Mi,this).delete(t),t===e)break;let r=L(Pi,this).get(n);r&&(qn(r.effect),L(Pi,this).delete(n))}for(let[e,r]of L(Ni,this)){if(e===t||L(Fi,this).has(e))continue;let i=()=>{if(Array.from(L(Mi,this).values()).includes(e)){var t=document.createDocumentFragment();er(r,t),t.append(bn()),L(Pi,this).set(e,{effect:r,fragment:t})}else qn(r);L(Fi,this).delete(e),L(Ni,this).delete(e)};L(Ii,this)||!n?(L(Fi,this).add(e),Xn(r,i,!1)):i()}}}),P(this,Ri,e=>{L(Mi,this).delete(e);let t=Array.from(L(Mi,this).values());for(let[e,n]of L(Pi,this))t.includes(e)||(qn(n.effect),L(Pi,this).delete(e))}),this.anchor=e,I(Ii,this,t)}ensure(e,t){var n=R,r=En();if(t&&!L(Ni,this).has(e)&&!L(Pi,this).has(e)){if(r){var i=document.createDocumentFragment(),a=bn();i.append(a),L(Pi,this).set(e,{effect:Un(()=>t(a)),fragment:i})}else L(Ni,this).set(e,Un(()=>t(this.anchor)))}if(L(Mi,this).set(n,e),r){for(let[t,r]of L(Ni,this))t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of L(Pi,this))t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(L(Li,this)),n.ondiscard(L(Ri,this))}else E&&(this.anchor=D),L(Li,this).call(this,n)}};function Y(e,t,n=!1){var r;E&&(r=D,Te());var i=new zi(e),a=n?ie:0;function o(e,t){if(E){var n=k(r);if(e!==parseInt(n.substring(1))){var a=De();we(a),i.anchor=a,Ce(!1),i.ensure(e,t),Ce(!0);return}}i.ensure(e,t)}Hn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Bi(e,t){return t}function Vi(e,t,n){for(var r=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];Xn(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Hi(e,i(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;Tn(d),d.append(u),e.items.clear()}Hi(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function Hi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=se,er(a,document.createDocumentFragment())):qn(t[i],n)}}var Ui;function Wi(e,n,r,a,o,s=null){var c=e,l=new Map;if(n&4){var u=e;c=E?we(xn(u)):u.appendChild(bn())}E&&Te();var d=null,f=st(()=>{var e=r();return t(e)?e:e==null?[]:i(e)}),p=new Map,m=!0;function h(e){if(!(_.effect.f&16384)){_.pending.delete(e);var t=K(f);_.fallback=d,Ki(_,t,c,n,a),d!==null&&(t.length===0?d.f&33554432?(d.f^=se,Ji(d,null,c)):Qn(d):Xn(d,()=>{d=null}))}}function g(e){_.pending.delete(e)}var _={effect:Hn(()=>{var e=K(f),t=e.length;let i=!1;E&&k(c)===`[!`!=(t===0)&&(c=De(),we(c),Ce(!1),i=!0);for(var u=new Set,_=R,v=En(),y=0;y<t;y+=1){E&&D.nodeType===8&&D.data===`]`&&(c=D,i=!0,Ce(!1));var b=e[y],x=a(b,y),S=m?null:l.get(x);S?(S.v&&un(S.v,b),S.i&&un(S.i,y),v&&_.unskip_effect(S.e)):(S=qi(l,m?c:Ui??(Ui=bn()),b,x,y,o,n,r),m||(S.e.f|=se),l.set(x,S)),u.add(x)}if(t===0&&s&&!d&&(m?d=Un(()=>s(c)):(d=Un(()=>s(Ui??(Ui=bn()))),d.f|=se)),t>u.size&&Me(``,``,``),E&&t>0&&we(De()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}i&&Ce(!0),K(f)}),flags:n,items:l,pending:p,outrogroups:null,fallback:d};m=!1,E&&(c=D)}function Gi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Ki(e,t,n,r,a){var o=!!(r&8),s=t.length,c=e.items,l=Gi(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??(f=new Set)).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Qn(_),o&&(_.nodes?.a?.unfix(),(f??(f=new Set)).delete(_))),_.f&33554432){if(_.f^=se,_===l)Ji(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Yi(e,d,_),Yi(e,_,y),Ji(_,y,n),d=_,p=[],m=[],l=Gi(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Ji(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Yi(e,S.prev,ee.next),Yi(e,d,S),Yi(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Ji(_,l,n),Yi(e,_.prev,_.next),Yi(e,_,d===null?e.effect.first:d.next),Yi(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??(u=new Set)).add(l),m.push(l),l=Gi(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Gi(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Hi(e,i(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var te=[];if(u!==void 0)for(_ of u)_.f&8192||te.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&te.push(l),l=Gi(l.next);var ne=te.length;if(ne>0){var re=r&4&&s===0?n:null;if(o){for(v=0;v<ne;v+=1)te[v].nodes?.a?.measure();for(v=0;v<ne;v+=1)te[v].nodes?.a?.fix()}Vi(e,te,re)}}o&&Xe(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function qi(e,t,n,r,i,a,o,s){var c=o&1?o&16?on(n):sn(n,!1,!1):null,l=o&2?on(i):null;return{v:c,i:l,e:Un(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ji(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Sn(r);if(a.before(r),r===i)return;r=o}}function Yi(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Xi(e,t,...n){var r=new zi(e);Hn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ie)}var Zi=()=>performance.now(),Qi={tick:e=>requestAnimationFrame(e),now:()=>Zi(),tasks:new Set};function $i(){let e=Qi.now();Qi.tasks.forEach(t=>{t.c(e)||(Qi.tasks.delete(t),t.f())}),Qi.tasks.size!==0&&Qi.tick($i)}function ea(e){let t;return Qi.tasks.size===0&&Qi.tick($i),{promise:new Promise(n=>{Qi.tasks.add(t={c:e,f:n})}),abort(){Qi.tasks.delete(t)}}}function ta(e,t){A(()=>{e.dispatchEvent(new CustomEvent(t))})}function na(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function ra(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=na(n.trim());t[i]=r.trim()}return t}var ia=e=>e;function aa(e,t,n,r){var i,a=!!(e&1),o=!!(e&2),s=a&&o,c=!!(e&4),l=s?`both`:a?`in`:`out`,u,d=t.inert,f=t.style.overflow,p,m;function h(){return A(()=>u??(u=n()(t,r?.()??{},{direction:l})))}var g={is_global:c,in(){t.inert=d,a?(o||p?.abort(),p=oa(t,h(),m,1,()=>{ta(t,`introstart`)},()=>{ta(t,`introend`),p?.abort(),p=u=void 0,t.style.overflow=f})):(m?.abort(),m?.reset?.())},out(e){o?(t.inert=!0,m=oa(t,h(),p,0,()=>{ta(t,`outrostart`)},()=>{ta(t,`outroend`),e?.()})):(e?.(),u=void 0)},stop:()=>{p?.abort(),m?.abort()}},_=G;if(((i=_.nodes).t??(i.t=[])).push(g),a&&Ti){var v=c;if(!v){for(var y=_.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||!!(y.f&32768)}v&&zn(()=>{Dr(()=>g.in())})}}function oa(e,t,n,r,i,a){var o=r===1,s=!1;if(f(t)){var c;return Xe(()=>{s||(c=oa(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{s=!0,c?.abort()},deactivate:()=>c?.deactivate(),reset:()=>c?.reset(),t:()=>c?.t()??1-r}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:p,deactivate:p,reset:p,t:()=>r};let{delay:l=0,css:u,tick:d,easing:m=ia}=t;var h,g=()=>1-r;return Xe(()=>{if(!s){var c=[];if(o&&n===void 0&&(d&&d(0,1),u)){var f=ra(u(0,1));c.push(f,f)}h=e.animate(c,{duration:l,fill:`forwards`}),h.onfinish=()=>{h.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var f=!1;if(u)for(var p=Math.ceil(c/(1e3/60)),_=0;_<=p;_+=1){var v=o+s*m(_/p),y=ra(u(v,1-v));l.push(y),f||(f=y.overflow===`hidden`)}f&&(e.style.overflow=`hidden`),g=()=>{var e=h.currentTime;return o+s*m(e/c)},d&&ea(()=>{if(h.playState!==`running`)return!1;var e=g();return d(e,1-e),!0})}h=e.animate(l,{duration:c,fill:`forwards`}),h.onfinish=()=>{g=()=>r,d?.(r,1-r),a()}}}}),{abort:()=>{s=!0,h&&(h.cancel(),h.effect=null,h.onfinish=p)},deactivate:()=>{a=p},reset:()=>{r===0&&d?.(1,0)},t:()=>g()}}function sa(e,t){zn(()=>{e=G?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Dn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var ca=[...`
|
|
2
|
+
\r\f\xA0\v`];function la(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(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 s=o+a;(o===0||ca.includes(r[o-1]))&&(s===r.length||ca.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function ua(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function da(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function fa(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(da)),i&&c.push(...Object.keys(i).map(da));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=da(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=ua(r)),i&&(n+=ua(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function pa(e,t,n,r,i,a){var o=e[me];if(E||o!==n||o===void 0){var s=la(n,r,a);E&&s===e.getAttribute(`class`)||(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ma(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ha(e,t,n,r){var i=e[he];if(E||i!==t){var a=fa(t,r);E&&a===e.getAttribute(`style`)||(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=t}else r&&(Array.isArray(r)?(ma(e,n?.[0],r[0]),ma(e,n?.[1],r[1],`important`)):ma(e,n,r));return r}var ga=Symbol(`is custom element`),_a=Symbol(`is html`),va=ve?`link`:`LINK`;function X(e,t,n,r){var i=ya(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===va)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&xa(e).has(t)?e[t]=n:e.setAttribute(t,n))}function ya(e){return e[pe]??(e[pe]={[ga]:e.nodeName.includes(`-`),[_a]:e.namespaceURI===`http://www.w3.org/1999/xhtml`})}var ba=new Map;function xa(e){var t=e.getAttribute(`is`)||e.nodeName,n=ba.get(t);if(n)return n;ba.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=s(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=u(i)}return n}var Sa,Ca=new WeakMap,wa=new WeakMap,Ta=new WeakMap,Ea=new WeakSet,Da=class{constructor(e){pt(this,Ea),P(this,Ca,new WeakMap),P(this,wa,void 0),P(this,Ta,void 0),I(Ta,this,e)}observe(e,t){var n=L(Ca,this).get(e)||new Set;return n.add(t),L(Ca,this).set(e,n),F(Ea,this,Oa).call(this).observe(e,L(Ta,this)),()=>{var n=L(Ca,this).get(e);n.delete(t),n.size===0&&(L(Ca,this).delete(e),L(wa,this).unobserve(e))}}};Sa=Da;function Oa(){return L(wa,this)??I(wa,this,new ResizeObserver(e=>{for(var t of e){Sa.entries.set(t.target,t);for(var n of L(Ca,this).get(t.target)||[])n(t)}}))}y(Da,`entries`,new WeakMap);function ka(e,t){return e===t||e?.[w]===t}function Aa(e=Ke(),t,n,r){var i=He.r,a=G;return zn(()=>{var o,s;return Vn(()=>{o=s,s=r?.()||[],Dr(()=>{ka(n(...s),e)||(t(e,...s),o&&ka(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&ka(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var ja=!1;function Ma(e){var t=ja;try{return ja=!1,[e(),ja]}finally{ja=t}}function Z(e,t,n,r){var i=!0,a=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??(u=it(r)),K(u)):(l&&(l=!1,c=s?Dr(r):r),c);let f;if(a){var p=w in e||de in e;f=o(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=Ma(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Le(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?it:st)(()=>(v=!1,g()));a&&K(y);var b=G;return(function(e,t){if(arguments.length>0){let n=t?K(y):i&&a?mn(e):e;return B(y,n),v=!0,c!==void 0&&(c=n),e}return nr&&v||b.f&16384?y.v:K(y)})}if(typeof window<`u`){var Na,Pa;((Na=(Pa=window).__svelte??(Pa.__svelte={})).v??(Na.v=new Set)).add(`5`)}var Fa={snappy:{response:.18,damping:1},default:{response:.28,damping:.9},heavy:{response:.55,damping:1},playful:{response:.5,damping:.45}};function Ia(e,t){if(t<=0)return 0;let n=2*Math.PI/e.response,r=e.damping;if(r<1){let e=n*Math.sqrt(1-r*r);return 1-Math.exp(-r*n*t)*(Math.cos(e*t)+r*n/e*Math.sin(e*t))}if(r===1)return 1-Math.exp(-n*t)*(1+n*t);let i=Math.sqrt(r*r-1),a=-n*(r-i),o=-n*(r+i);return 1+o/(a-o)*Math.exp(a*t)-a/(a-o)*Math.exp(o*t)}var La=new Map;function Ra(e,t=.005){let n=`${e.response}/${e.damping}/${t}`,r=La.get(n);if(r!==void 0)return r;let i=0;for(let n=0;n<4;n+=1/480)Math.abs(1-Ia(e,n))>t&&(i=n);return La.set(n,i),i}var za=class{constructor(e,t){y(this,`start`,void 0),y(this,`target`,void 0),y(this,`segs`,[]),y(this,`preset`,void 0),this.preset=t,this.start=this.target=e}to(e,t){let n=e-this.target;n!==0&&(this.segs.push({t0:t,delta:n}),this.target=e)}set(e){this.start=this.target=e,this.segs=[]}at(e){let t=Ra(this.preset,5e-4);return this.segs=this.segs.filter(n=>e-n.t0<t||(this.start+=n.delta,!1)),this.segs.reduce((t,n)=>t+n.delta*Ia(this.preset,e-n.t0),this.start)}get settled(){return this.segs.length===0}get goal(){return this.target}},Ba,Va=!1,Ha=new WeakMap,Ua=new WeakMap,Wa=new WeakMap,Ga=new WeakSet;Ba=class extends Date{constructor(...e){super(...e),pt(this,Ga),P(this,Ha,z(super.getTime())),P(this,Ua,new Map),P(this,Wa,W),Va||F(Ga,this,Ka).call(this)}};function Ka(){Va=!0;var e=Ba.prototype,t=Date.prototype,n=Object.getOwnPropertyNames(t);for(let r of n)(r.startsWith(`get`)||r.startsWith(`to`)||r===`valueOf`)&&(e[r]=function(...e){if(e.length>0)return K(L(Ha,this)),t[r].apply(this,e);var n=L(Ua,this).get(r);if(n===void 0){let i=W;ar(L(Wa,this)),n=M(()=>(K(L(Ha,this)),t[r].apply(this,e))),L(Ua,this).set(r,n),ar(i)}return K(n)}),r.startsWith(`set`)&&(e[r]=function(...e){var n=t[r].apply(this,e);return B(L(Ha,this),t.getTime.call(this)),n})}var qa,Ja,Ya=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Xa=[`difference`,`intersection`,`symmetricDifference`,`union`],Za=!1,Qa=new WeakMap,$a=new WeakMap,eo=new WeakMap,to=new WeakMap,no=new WeakSet;Ja=Symbol.iterator,qa=class extends Set{constructor(e){if(super(),pt(this,no),P(this,Qa,new Map),P(this,$a,z(0)),P(this,eo,z(0)),P(this,to,hr||-1),e){for(var t of e)super.add(t);L(eo,this).v=super.size}Za||F(no,this,io).call(this)}has(e){var t=super.has(e),n=L(Qa,this),r=n.get(e);if(r===void 0){if(!t)return K(L($a,this)),!1;r=F(no,this,ro).call(this,!0),n.set(e,r)}return K(r),t}add(e){return super.has(e)||(super.add(e),B(L(eo,this),super.size),fn(L($a,this))),this}delete(e){var t=super.delete(e),n=L(Qa,this),r=n.get(e);return r!==void 0&&(n.delete(e),B(r,!1)),t&&(B(L(eo,this),super.size),fn(L($a,this))),t}clear(){if(super.size!==0){super.clear();var e=L(Qa,this);for(var t of e.values())B(t,!1);e.clear(),B(L(eo,this),0),fn(L($a,this))}}keys(){return this.values()}values(){return K(L($a,this)),super.values()}entries(){return K(L($a,this)),super.entries()}[Ja](){return this.keys()}get size(){return K(L(eo,this))}};function ro(e){return hr===L(to,this)?z(e):on(e)}function io(){Za=!0;var e=qa.prototype,t=Set.prototype;for(let n of Ya)e[n]=function(...e){return K(L($a,this)),t[n].apply(this,e)};for(let n of Xa)e[n]=function(...e){K(L($a,this));var r=t[n].apply(this,e);return new qa(r)}}function ao(e){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ao(e)}function oo(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=ao(e))!==null;);return e}function so(){return so=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=oo(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},so.apply(null,arguments)}function co(e,t,n,r){var i=so(ao(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}var lo,uo,fo=new WeakMap,po=new WeakMap,mo=new WeakMap,ho=new WeakMap,go=new WeakSet;uo=Symbol.iterator,lo=class extends Map{constructor(e){if(super(),pt(this,go),P(this,fo,new Map),P(this,po,z(0)),P(this,mo,z(0)),P(this,ho,hr||-1),e){for(var[t,n]of e)super.set(t,n);L(mo,this).v=super.size}}has(e){var t=L(fo,this),n=t.get(e);if(n===void 0){if(super.has(e))n=F(go,this,_o).call(this,0),t.set(e,n);else return K(L(po,this)),!1}return K(n),!0}forEach(e,t){F(go,this,vo).call(this),super.forEach(e,t)}get(e){var t=L(fo,this),n=t.get(e);if(n===void 0){if(super.has(e))n=F(go,this,_o).call(this,0),t.set(e,n);else{K(L(po,this));return}}return K(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=L(fo,this),r=n.get(e),i=super.get(e),a=super.set(e,t),o=L(po,this);if(r===void 0)r=F(go,this,_o).call(this,0),n.set(e,r),B(L(mo,this),super.size),fn(o);else if(i!==t){fn(r);var s=o.reactions===null?null:new Set(o.reactions);s!==null&&r.reactions?.every(e=>s.has(e))||fn(o)}return a}delete(e){var t=L(fo,this),n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),B(n,-1)),r&&(B(L(mo,this),super.size),fn(L(po,this))),r}clear(){if(super.size!==0){super.clear();var e=L(fo,this);B(L(mo,this),0);for(var t of e.values())B(t,-1);fn(L(po,this)),e.clear()}}keys(){return K(L(po,this)),super.keys()}values(){return F(go,this,vo).call(this),super.values()}entries(){return F(go,this,vo).call(this),super.entries()}[uo](){return this.entries()}get size(){return K(L(mo,this)),super.size}};function _o(e){return hr===L(ho,this)?z(e):on(e)}function vo(){K(L(po,this));var e=L(fo,this);if(L(mo,this).v!==e.size){for(var t of co(lo.prototype,`keys`,this,2)([]))if(!e.has(t)){var n=F(go,this,_o).call(this,0);e.set(t,n)}}for([,n]of L(fo,this))K(n)}var yo,bo,xo=Symbol(`replace`),So=new WeakMap,Co=new WeakMap,wo=new WeakMap,To=new WeakSet;bo=Symbol.iterator,yo=class extends URLSearchParams{constructor(...e){super(...e),pt(this,To),P(this,So,z(0)),P(this,Co,Oo()),P(this,wo,!1)}[xo](e){if(!L(wo,this)&&e.toString()!==super.toString()){I(wo,this,!0);for(let e of[...super.keys()])super.delete(e);for(let[t,n]of e)super.append(t,n);fn(L(So,this)),I(wo,this,!1)}}append(e,t){super.append(e,t),F(To,this,Eo).call(this),fn(L(So,this))}delete(e,t){var n=super.has(e,t);super.delete(e,t),n&&(F(To,this,Eo).call(this),fn(L(So,this)))}get(e){return K(L(So,this)),super.get(e)}getAll(e){return K(L(So,this)),super.getAll(e)}has(e,t){return K(L(So,this)),super.has(e,t)}keys(){return K(L(So,this)),super.keys()}forEach(e,t){K(L(So,this)),super.forEach(e,t)}set(e,t){var n=super.getAll(e);super.set(e,t);var r=super.getAll(e);(n.length!==r.length||n.some((e,t)=>e!==r[t]))&&(F(To,this,Eo).call(this),fn(L(So,this)))}sort(){super.sort(),F(To,this,Eo).call(this),fn(L(So,this))}toString(){return K(L(So,this)),super.toString()}values(){return K(L(So,this)),super.values()}entries(){return K(L(So,this)),super.entries()}[bo](){return this.entries()}get size(){return K(L(So,this)),super.size}};function Eo(){if(!L(Co,this)||L(wo,this))return;I(wo,this,!0);let e=co(yo.prototype,`toString`,this,2)([]);L(Co,this).search=e&&`?${e}`,I(wo,this,!1)}var Do=null;function Oo(){return Do}var ko=new WeakMap,Ao=new WeakMap,jo=class{constructor(e,t){P(this,ko,void 0),P(this,Ao,void 0),I(ko,this,e),I(Ao,this,Yr(t))}get current(){return L(Ao,this).call(this),L(ko,this).call(this)}},Mo=/\(.+\)/,No=new Set([`all`,`print`,`screen`,`and`,`or`,`not`,`only`]),Po=new class extends jo{constructor(e,t){let n=Mo.test(e)||e.split(/[\s,]+/).some(e=>No.has(e.trim()))?e:`(${e})`,r=window.matchMedia(n);super(()=>r.matches,e=>Pr(r,`change`,e))}}(`(prefers-reduced-motion: reduce)`);function Fo(){return Po.current}var Io=e=>t=>Ia(e,t*Ra(e)),Lo=e=>Ra(e)*1e3;function Ro(e=`default`){let t=Fa[e];return{duration:Fo()?0:Lo(t),easing:Io(t)}}var zo=()=>performance.now()/1e3,Bo=new WeakMap,Vo=class{get current(){return K(L(Bo,this))}set current(e){B(L(Bo,this),e,!0)}constructor(e,t=Fa.snappy,n=Fo){y(this,`instant`,void 0),P(this,Bo,z(0)),y(this,`s`,void 0),y(this,`raf`,0),y(this,`tick`,()=>{this.current=this.s.at(zo()),this.s.settled?(this.current=this.s.goal,this.raf=0):this.raf=requestAnimationFrame(this.tick)}),this.instant=n,this.s=new za(e,t),this.current=e}get target(){return this.s.goal}set target(e){this.instant()||typeof requestAnimationFrame>`u`?this.jump(e):(this.s.to(e,zo()),this.raf||(this.raf=requestAnimationFrame(this.tick)))}jump(e){this.raf&&cancelAnimationFrame(this.raf),this.raf=0,this.s.set(e),this.current=e}};function Ho(e,{preset:t=`snappy`,delay:n=0}={}){return{...Ro(t),delay:n,css:e=>`transform-box: fill-box; transform-origin: center; transform: scale(${e})`}}function Uo(e,{preset:t=`heavy`}={}){return{...Ro(t),css:e=>`stroke-dasharray: 1; stroke-dashoffset: ${1-e}`}}var Wo=.42,Go=.26,Ko=.2,qo=.08;function Jo(e,t,n,r){let i=Math.hypot(n-e,r-t)||1e-6,a=(n-e)/i,o=(r-t)/i,s=Math.max(Ko,i-Wo-qo),c=e+a*s,l=t+o*s,u=c+a*Wo,d=l+o*Wo;return{shaft:`M${e+a*Ko} ${t+o*Ko} L${c} ${l}`,head:`${u},${d} ${c-o*Go},${l+a*Go} ${c+o*Go},${l-a*Go}`}}function Yo(e){return e===null?{variations:[]}:{comment:e,variations:[]}}function Xo(e,t,n,r,i){let a={move:e,variations:i};return t&&(a.suffix=t),n&&(a.nag=n),r!==null&&(a.comment=r),a}function Zo(...e){let[t,...n]=e,r=t;for(let e of n)e!==null&&(r.variations=[e,...e.variations],e.variations=[],r=e);return t}function Qo(e,t){if(t.marker&&t.marker.comment){let e=t.root;for(;;){let n=e.variations[0];if(!n){e.comment=t.marker.comment;break}e=n}}return{headers:e,root:t.root,result:(t.marker&&t.marker.result)??void 0}}function $o(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function es(e,t,n,r){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,es.prototype),i.expected=t,i.found=n,i.location=r,i.name=`SyntaxError`,i}$o(es,Error);function ts(e,t,n){return n=n||` `,e.length>t?e:(t-=e.length,n+=n.repeat(t),e+n.slice(0,t))}es.prototype.format=function(e){var t=`Error: `+this.message;if(this.location){for(var n=null,r=0;r<e.length;r++)if(e[r].source===this.location.source){n=e[r].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source&&typeof this.location.source.offset==`function`?this.location.source.offset(i):i,o=this.location.source+`:`+a.line+`:`+a.column;if(n){var s=this.location.end,c=ts(``,a.line.toString().length,` `),l=n[i.line-1],u=(i.line===s.line?s.column:l.length+1)-i.column||1;t+=`
|
|
3
|
+
--> `+o+`
|
|
4
|
+
`+c+` |
|
|
5
|
+
`+a.line+` | `+l+`
|
|
6
|
+
`+c+` | `+ts(``,i.column-1,` `)+ts(``,u,`^`)}else t+=`
|
|
7
|
+
at `+o}return t},es.buildMessage=function(e,t){var n={literal:function(e){return`"`+i(e.text)+`"`},class:function(e){var t=e.parts.map(function(e){return Array.isArray(e)?a(e[0])+`-`+a(e[1]):a(e)});return`[`+(e.inverted?`^`:``)+t.join(``)+`]`},any:function(){return`any character`},end:function(){return`end of input`},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\0/g,`\\0`).replace(/\t/g,`\\t`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/[\x00-\x0F]/g,function(e){return`\\x0`+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return`\\x`+r(e)})}function a(e){return e.replace(/\\/g,`\\\\`).replace(/\]/g,`\\]`).replace(/\^/g,`\\^`).replace(/-/g,`\\-`).replace(/\0/g,`\\0`).replace(/\t/g,`\\t`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/[\x00-\x0F]/g,function(e){return`\\x0`+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return`\\x`+r(e)})}function o(e){return n[e.type](e)}function s(e){var t=e.map(o),n,r;if(t.sort(),t.length>0){for(n=1,r=1;n<t.length;n++)t[n-1]!==t[n]&&(t[r]=t[n],r++);t.length=r}switch(t.length){case 1:return t[0];case 2:return t[0]+` or `+t[1];default:return t.slice(0,-1).join(`, `)+`, or `+t[t.length-1]}}function c(e){return e?`"`+i(e)+`"`:`end of input`}return`Expected `+s(e)+` but `+c(t)+` found.`};function ns(e,t){t=t===void 0?{}:t;var n={},r=t.grammarSource,i={pgn:dt},a=dt,o=`[`,s=`"`,c=`]`,l=`.`,u=`O-O-O`,d=`O-O`,f=`0-0-0`,p=`0-0`,m=`$`,h=`{`,g=`}`,_=`;`,v=`(`,y=`)`,b=`1-0`,x=`0-1`,S=`1/2-1/2`,ee=`*`,te=/^[a-zA-Z]/,ne=/^[^"]/,re=/^[0-9]/,ie=/^[.]/,ae=/^[a-zA-Z1-8\-=]/,oe=/^[+#]/,se=/^[!?]/,ce=/^[^}]/,le=/^[^\r\n]/,C=/^[ \t\r\n]/,w=st(`tag pair`),ue=at(`[`,!1),de=at(`"`,!1),fe=at(`]`,!1),pe=st(`tag name`),me=ot([[`a`,`z`],[`A`,`Z`]],!1,!1),he=st(`tag value`),ge=ot([`"`],!0,!1),_e=st(`move number`),ve=ot([[`0`,`9`]],!1,!1),ye=at(`.`,!1),T=ot([`.`],!1,!1),be=st(`standard algebraic notation`),xe=at(`O-O-O`,!1),Se=at(`O-O`,!1),E=at(`0-0-0`,!1),Ce=at(`0-0`,!1),D=ot([[`a`,`z`],[`A`,`Z`],[`1`,`8`],`-`,`=`],!1,!1),we=ot([`+`,`#`],!1,!1),Te=st(`suffix annotation`),O=ot([`!`,`?`],!1,!1),Ee=st(`NAG`),De=at(`$`,!1),k=st(`brace comment`),Oe=at(`{`,!1),ke=ot([`}`],!0,!1),Ae=at(`}`,!1),je=st(`rest of line comment`),Me=at(`;`,!1),Ne=ot([`\r`,`
|
|
8
|
+
`],!0,!1),Pe=st(`variation`),Fe=at(`(`,!1),Ie=at(`)`,!1),Le=st(`game termination marker`),Re=at(`1-0`,!1),ze=at(`0-1`,!1),Be=at(`1/2-1/2`,!1),Ve=at(`*`,!1),He=st(`whitespace`),Ue=ot([` `,` `,`\r`,`
|
|
9
|
+
`],!1,!1),We=function(e,t){return Qo(e,t)},Ge=function(e){return Object.fromEntries(e)},Ke=function(e,t){return[e,t]},qe=function(e,t){return{root:e,marker:t}},Je=function(e,t){return Zo(Yo(e),...t.flat())},Ye=function(e,t,n,r,i){return Xo(e,t,n,r,i)},Xe=function(e){return e},Ze=function(e){return e.replace(/[\r\n]+/g,` `)},Qe=function(e){return e.trim()},$e=function(e){return e},et=function(e,t){return{result:e,comment:t}},A=t.peg$currPos|0,tt=[{line:1,column:1}],nt=A,rt=t.peg$maxFailExpected||[],j=t.peg$silentFails|0,it;if(t.startRule){if(!(t.startRule in i))throw Error(`Can't start parsing from rule "`+t.startRule+`".`);a=i[t.startRule]}function at(e,t){return{type:`literal`,text:e,ignoreCase:t}}function ot(e,t,n){return{type:`class`,parts:e,inverted:t,ignoreCase:n}}function M(){return{type:`end`}}function st(e){return{type:`other`,description:e}}function ct(t){var n=tt[t],r;if(n)return n;if(t>=tt.length)r=tt.length-1;else for(r=t;!tt[--r];);for(n=tt[r],n={line:n.line,column:n.column};r<t;)e.charCodeAt(r)===10?(n.line++,n.column=1):n.column++,r++;return tt[t]=n,n}function lt(e,t,n){var i=ct(e),a=ct(t);return{source:r,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}}}function N(e){A<nt||(A>nt&&(nt=A,rt=[]),rt.push(e))}function ut(e,t,n){return new es(es.buildMessage(e,t),e,t,n)}function dt(){var e=A;return e=We(ft(),I()),e}function ft(){for(var e=A,t=[],r=pt();r!==n;)t.push(r),r=pt();return r=Ct(),e=Ge(t),e}function pt(){var t,r,i,a,l,u,d;return j++,t=A,Ct(),e.charCodeAt(A)===91?(r=o,A++):(r=n,j===0&&N(ue)),r===n?(A=t,t=n):(Ct(),i=P(),i===n?(A=t,t=n):(Ct(),e.charCodeAt(A)===34?(a=s,A++):(a=n,j===0&&N(de)),a===n?(A=t,t=n):(l=F(),e.charCodeAt(A)===34?(u=s,A++):(u=n,j===0&&N(de)),u===n?(A=t,t=n):(Ct(),e.charCodeAt(A)===93?(d=c,A++):(d=n,j===0&&N(fe)),d===n?(A=t,t=n):t=Ke(i,l))))),j--,t===n&&j===0&&N(w),t}function P(){var t,r,i;if(j++,t=A,r=[],i=e.charAt(A),te.test(i)?A++:(i=n,j===0&&N(me)),i!==n)for(;i!==n;)r.push(i),i=e.charAt(A),te.test(i)?A++:(i=n,j===0&&N(me));else r=n;return t=r===n?r:e.substring(t,A),j--,t===n&&(r=n,j===0&&N(pe)),t}function F(){var t,r,i;for(j++,t=A,r=[],i=e.charAt(A),ne.test(i)?A++:(i=n,j===0&&N(ge));i!==n;)r.push(i),i=e.charAt(A),ne.test(i)?A++:(i=n,j===0&&N(ge));return t=e.substring(t,A),j--,r=n,j===0&&N(he),t}function I(){var e=A,t=L(),r;return Ct(),r=St(),r===n&&(r=null),Ct(),e=qe(t,r),e}function L(){var e=A,t=vt(),r,i;for(t===n&&(t=null),r=[],i=mt();i!==n;)r.push(i),i=mt();return e=Je(t,r),e}function mt(){var e=A,t,r,i,a,o,s,c;if(Ct(),ht(),Ct(),t=R(),t!==n){for(r=gt(),r===n&&(r=null),i=[],a=_t();a!==n;)i.push(a),a=_t();for(a=Ct(),o=vt(),o===n&&(o=null),s=[],c=xt();c!==n;)s.push(c),c=xt();e=Ye(t,r,i,o,s)}else A=e,e=n;return e}function ht(){var t,r,i,a,o,s;for(j++,t=A,r=[],i=e.charAt(A),re.test(i)?A++:(i=n,j===0&&N(ve));i!==n;)r.push(i),i=e.charAt(A),re.test(i)?A++:(i=n,j===0&&N(ve));if(e.charCodeAt(A)===46?(i=l,A++):(i=n,j===0&&N(ye)),i!==n){for(a=Ct(),o=[],s=e.charAt(A),ie.test(s)?A++:(s=n,j===0&&N(T));s!==n;)o.push(s),s=e.charAt(A),ie.test(s)?A++:(s=n,j===0&&N(T));r=[r,i,a,o],t=r}else A=t,t=n;return j--,t===n&&(r=n,j===0&&N(_e)),t}function R(){var t,r,i,a,o,s;if(j++,t=A,r=A,e.substr(A,5)===u?(i=u,A+=5):(i=n,j===0&&N(xe)),i===n&&(e.substr(A,3)===d?(i=d,A+=3):(i=n,j===0&&N(Se)),i===n&&(e.substr(A,5)===f?(i=f,A+=5):(i=n,j===0&&N(E)),i===n&&(e.substr(A,3)===p?(i=p,A+=3):(i=n,j===0&&N(Ce)),i===n)))){if(i=A,a=e.charAt(A),te.test(a)?A++:(a=n,j===0&&N(me)),a!==n){if(o=[],s=e.charAt(A),ae.test(s)?A++:(s=n,j===0&&N(D)),s!==n)for(;s!==n;)o.push(s),s=e.charAt(A),ae.test(s)?A++:(s=n,j===0&&N(D));else o=n;o===n?(A=i,i=n):(a=[a,o],i=a)}else A=i,i=n}return i===n?(A=r,r=n):(a=e.charAt(A),oe.test(a)?A++:(a=n,j===0&&N(we)),a===n&&(a=null),i=[i,a],r=i),t=r===n?r:e.substring(t,A),j--,t===n&&(r=n,j===0&&N(be)),t}function gt(){var t,r,i;for(j++,t=A,r=[],i=e.charAt(A),se.test(i)?A++:(i=n,j===0&&N(O));i!==n;)r.push(i),r.length>=2?i=n:(i=e.charAt(A),se.test(i)?A++:(i=n,j===0&&N(O)));return r.length<1?(A=t,t=n):t=r,j--,t===n&&(r=n,j===0&&N(Te)),t}function _t(){var t,r,i,a,o;if(j++,t=A,Ct(),e.charCodeAt(A)===36?(r=m,A++):(r=n,j===0&&N(De)),r!==n){if(i=A,a=[],o=e.charAt(A),re.test(o)?A++:(o=n,j===0&&N(ve)),o!==n)for(;o!==n;)a.push(o),o=e.charAt(A),re.test(o)?A++:(o=n,j===0&&N(ve));else a=n;i=a===n?a:e.substring(i,A),i===n?(A=t,t=n):t=Xe(i)}else A=t,t=n;return j--,t===n&&j===0&&N(Ee),t}function vt(){var e=yt();return e===n&&(e=bt()),e}function yt(){var t,r,i,a,o;if(j++,t=A,e.charCodeAt(A)===123?(r=h,A++):(r=n,j===0&&N(Oe)),r!==n){for(i=A,a=[],o=e.charAt(A),ce.test(o)?A++:(o=n,j===0&&N(ke));o!==n;)a.push(o),o=e.charAt(A),ce.test(o)?A++:(o=n,j===0&&N(ke));i=e.substring(i,A),e.charCodeAt(A)===125?(a=g,A++):(a=n,j===0&&N(Ae)),a===n?(A=t,t=n):t=Ze(i)}else A=t,t=n;return j--,t===n&&(r=n,j===0&&N(k)),t}function bt(){var t,r,i,a,o;if(j++,t=A,e.charCodeAt(A)===59?(r=_,A++):(r=n,j===0&&N(Me)),r!==n){for(i=A,a=[],o=e.charAt(A),le.test(o)?A++:(o=n,j===0&&N(Ne));o!==n;)a.push(o),o=e.charAt(A),le.test(o)?A++:(o=n,j===0&&N(Ne));i=e.substring(i,A),t=Qe(i)}else A=t,t=n;return j--,t===n&&(r=n,j===0&&N(je)),t}function xt(){var t,r,i,a;return j++,t=A,Ct(),e.charCodeAt(A)===40?(r=v,A++):(r=n,j===0&&N(Fe)),r===n?(A=t,t=n):(i=L(),i===n?(A=t,t=n):(Ct(),e.charCodeAt(A)===41?(a=y,A++):(a=n,j===0&&N(Ie)),a===n?(A=t,t=n):t=$e(i))),j--,t===n&&j===0&&N(Pe),t}function St(){var t,r,i;return j++,t=A,e.substr(A,3)===b?(r=b,A+=3):(r=n,j===0&&N(Re)),r===n&&(e.substr(A,3)===x?(r=x,A+=3):(r=n,j===0&&N(ze)),r===n&&(e.substr(A,7)===S?(r=S,A+=7):(r=n,j===0&&N(Be)),r===n&&(e.charCodeAt(A)===42?(r=ee,A++):(r=n,j===0&&N(Ve))))),r===n?(A=t,t=n):(Ct(),i=vt(),i===n&&(i=null),t=et(r,i)),j--,t===n&&(r=n,j===0&&N(Le)),t}function Ct(){var t,r;for(j++,t=[],r=e.charAt(A),C.test(r)?A++:(r=n,j===0&&N(Ue));r!==n;)t.push(r),r=e.charAt(A),C.test(r)?A++:(r=n,j===0&&N(Ue));return j--,r=n,j===0&&N(He),t}if(it=a(),t.peg$library)return{peg$result:it,peg$currPos:A,peg$FAILED:n,peg$maxFailExpected:rt,peg$maxFailPos:nt};if(it!==n&&A===e.length)return it;throw it!==n&&A<e.length&&N(M()),ut(rt,nt<e.length?e.charAt(nt):null,nt<e.length?lt(nt,nt+1):lt(nt,nt))}var rs=18446744073709551615n;function is(e,t){return(e<<t|e>>64n-t)&18446744073709551615n}function as(e,t){return e*t&rs}function os(e){return function(){let t=BigInt(e&rs),n=BigInt(e>>64n&rs),r=as(is(as(t,5n),7n),9n);return n^=t,t=(is(t,24n)^n^n<<16n)&rs,n=is(n,37n),e=n<<64n|t,r}}var ss=os(214711438343225530594246349426526445598n),cs=Array.from({length:2},()=>Array.from({length:6},()=>Array.from({length:128},()=>ss()))),ls=Array.from({length:8},()=>ss()),us=Array.from({length:16},()=>ss()),ds=ss(),fs=`rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1`,ps=class{constructor(e,t){y(this,`color`,void 0),y(this,`from`,void 0),y(this,`to`,void 0),y(this,`piece`,void 0),y(this,`captured`,void 0),y(this,`promotion`,void 0),y(this,`flags`,void 0),y(this,`san`,void 0),y(this,`lan`,void 0),y(this,`before`,void 0),y(this,`after`,void 0);let{color:n,piece:r,from:i,to:a,flags:o,captured:s,promotion:c}=t,l=Ls(i),u=Ls(a);this.color=n,this.piece=r,this.from=l,this.to=u,this.san=e._moveToSan(t,e._moves({legal:!0})),this.lan=l+u,this.before=e.fen(),e._makeMove(t),this.after=e.fen(),e._undoMove(),this.flags=``;for(let e in Q)Q[e]&o&&(this.flags+=hs[e]);s&&(this.captured=s),c&&(this.promotion=c,this.lan+=c)}isCapture(){return this.flags.indexOf(hs.CAPTURE)>-1}isPromotion(){return this.flags.indexOf(hs.PROMOTION)>-1}isEnPassant(){return this.flags.indexOf(hs.EP_CAPTURE)>-1}isKingsideCastle(){return this.flags.indexOf(hs.KSIDE_CASTLE)>-1}isQueensideCastle(){return this.flags.indexOf(hs.QSIDE_CASTLE)>-1}isBigPawn(){return this.flags.indexOf(hs.BIG_PAWN)>-1}},ms=-1,hs={NORMAL:`n`,CAPTURE:`c`,BIG_PAWN:`b`,EP_CAPTURE:`e`,PROMOTION:`p`,KSIDE_CASTLE:`k`,QSIDE_CASTLE:`q`,NULL_MOVE:`-`},Q={NORMAL:1,CAPTURE:2,BIG_PAWN:4,EP_CAPTURE:8,PROMOTION:16,KSIDE_CASTLE:32,QSIDE_CASTLE:64,NULL_MOVE:128},gs={Event:`?`,Site:`?`,Date:`????.??.??`,Round:`?`,White:`?`,Black:`?`,Result:`*`},_s={WhiteTitle:null,BlackTitle:null,WhiteElo:null,BlackElo:null,WhiteUSCF:null,BlackUSCF:null,WhiteNA:null,BlackNA:null,WhiteType:null,BlackType:null,EventDate:null,EventSponsor:null,Section:null,Stage:null,Board:null,Opening:null,Variation:null,SubVariation:null,ECO:null,NIC:null,Time:null,UTCTime:null,UTCDate:null,TimeControl:null,SetUp:null,FEN:null,Termination:null,Annotator:null,Mode:null,PlyCount:null},vs={...gs,..._s},$={a8:0,b8:1,c8:2,d8:3,e8:4,f8:5,g8:6,h8:7,a7:16,b7:17,c7:18,d7:19,e7:20,f7:21,g7:22,h7:23,a6:32,b6:33,c6:34,d6:35,e6:36,f6:37,g6:38,h6:39,a5:48,b5:49,c5:50,d5:51,e5:52,f5:53,g5:54,h5:55,a4:64,b4:65,c4:66,d4:67,e4:68,f4:69,g4:70,h4:71,a3:80,b3:81,c3:82,d3:83,e3:84,f3:85,g3:86,h3:87,a2:96,b2:97,c2:98,d2:99,e2:100,f2:101,g2:102,h2:103,a1:112,b1:113,c1:114,d1:115,e1:116,f1:117,g1:118,h1:119},ys={b:[16,32,17,15],w:[-16,-32,-17,-15]},bs={n:[-18,-33,-31,-14,18,33,31,14],b:[-17,-15,17,15],r:[-16,1,16,-1],q:[-17,-16,-15,1,17,16,15,-1],k:[-17,-16,-15,1,17,16,15,-1]},xs=[20,0,0,0,0,0,0,24,0,0,0,0,0,0,20,0,0,20,0,0,0,0,0,24,0,0,0,0,0,20,0,0,0,0,20,0,0,0,0,24,0,0,0,0,20,0,0,0,0,0,0,20,0,0,0,24,0,0,0,20,0,0,0,0,0,0,0,0,20,0,0,24,0,0,20,0,0,0,0,0,0,0,0,0,0,20,2,24,2,20,0,0,0,0,0,0,0,0,0,0,0,2,53,56,53,2,0,0,0,0,0,0,24,24,24,24,24,24,56,0,56,24,24,24,24,24,24,0,0,0,0,0,0,2,53,56,53,2,0,0,0,0,0,0,0,0,0,0,0,20,2,24,2,20,0,0,0,0,0,0,0,0,0,0,20,0,0,24,0,0,20,0,0,0,0,0,0,0,0,20,0,0,0,24,0,0,0,20,0,0,0,0,0,0,20,0,0,0,0,24,0,0,0,0,20,0,0,0,0,20,0,0,0,0,0,24,0,0,0,0,0,20,0,0,20,0,0,0,0,0,0,24,0,0,0,0,0,0,20],Ss=[17,0,0,0,0,0,0,16,0,0,0,0,0,0,15,0,0,17,0,0,0,0,0,16,0,0,0,0,0,15,0,0,0,0,17,0,0,0,0,16,0,0,0,0,15,0,0,0,0,0,0,17,0,0,0,16,0,0,0,15,0,0,0,0,0,0,0,0,17,0,0,16,0,0,15,0,0,0,0,0,0,0,0,0,0,17,0,16,0,15,0,0,0,0,0,0,0,0,0,0,0,0,17,16,15,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,-15,-16,-17,0,0,0,0,0,0,0,0,0,0,0,0,-15,0,-16,0,-17,0,0,0,0,0,0,0,0,0,0,-15,0,0,-16,0,0,-17,0,0,0,0,0,0,0,0,-15,0,0,0,-16,0,0,0,-17,0,0,0,0,0,0,-15,0,0,0,0,-16,0,0,0,0,-17,0,0,0,0,-15,0,0,0,0,0,-16,0,0,0,0,0,-17,0,0,-15,0,0,0,0,0,0,-16,0,0,0,0,0,0,-17],Cs={p:1,n:2,b:4,r:8,q:16,k:32},ws=`pnbrqkPNBRQK`,Ts=[`n`,`b`,`r`,`q`],Es=7,Ds=6,Os=1,ks=0,As={k:Q.KSIDE_CASTLE,q:Q.QSIDE_CASTLE},js={w:[{square:$.a1,flag:Q.QSIDE_CASTLE},{square:$.h1,flag:Q.KSIDE_CASTLE}],b:[{square:$.a8,flag:Q.QSIDE_CASTLE},{square:$.h8,flag:Q.KSIDE_CASTLE}]},Ms={b:Os,w:Ds},Ns=`--`;function Ps(e){return e>>4}function Fs(e){return e&15}function Is(e){return`0123456789`.indexOf(e)!==-1}function Ls(e){let t=Fs(e),n=Ps(e);return`abcdefgh`.substring(t,t+1)+`87654321`.substring(n,n+1)}function Rs(e){return e===`w`?`b`:`w`}function zs(e){let t=e.split(/\s+/);if(t.length!==6)return{ok:!1,error:`Invalid FEN: must contain six space-delimited fields`};let n=parseInt(t[5],10);if(isNaN(n)||n<=0)return{ok:!1,error:`Invalid FEN: move number must be a positive integer`};let r=parseInt(t[4],10);if(isNaN(r)||r<0)return{ok:!1,error:`Invalid FEN: half move counter number must be a non-negative integer`};if(!/^(-|[abcdefgh][36])$/.test(t[3]))return{ok:!1,error:`Invalid FEN: en-passant square is invalid`};if(/[^kKqQ-]/.test(t[2]))return{ok:!1,error:`Invalid FEN: castling availability is invalid`};if(!/^(w|b)$/.test(t[1]))return{ok:!1,error:`Invalid FEN: side-to-move is invalid`};let i=t[0].split(`/`);if(i.length!==8)return{ok:!1,error:`Invalid FEN: piece data does not contain 8 '/'-delimited rows`};for(let e=0;e<i.length;e++){let t=0,n=!1;for(let r=0;r<i[e].length;r++)if(Is(i[e][r])){if(n)return{ok:!1,error:`Invalid FEN: piece data is invalid (consecutive number)`};t+=parseInt(i[e][r],10),n=!0}else{if(!/^[prnbqkPRNBQK]$/.test(i[e][r]))return{ok:!1,error:`Invalid FEN: piece data is invalid (invalid piece)`};t+=1,n=!1}if(t!==8)return{ok:!1,error:`Invalid FEN: piece data is invalid (too many squares in rank)`}}if(t[3][1]==`3`&&t[1]==`w`||t[3][1]==`6`&&t[1]==`b`)return{ok:!1,error:`Invalid FEN: illegal en-passant square`};for(let{color:e,regex:n}of[{color:`white`,regex:/K/g},{color:`black`,regex:/k/g}]){if(!n.test(t[0]))return{ok:!1,error:`Invalid FEN: missing ${e} king`};if((t[0].match(n)||[]).length>1)return{ok:!1,error:`Invalid FEN: too many ${e} kings`}}return Array.from(i[0]+i[7]).some(e=>e.toUpperCase()===`P`)?{ok:!1,error:`Invalid FEN: some pawns are on the edge rows`}:{ok:!0}}function Bs(e,t){let n=e.from,r=e.to,i=e.piece,a=0,o=0,s=0;for(let e=0,c=t.length;e<c;e++){let c=t[e].from,l=t[e].to;i===t[e].piece&&n!==c&&r===l&&(a++,Ps(n)===Ps(c)&&o++,Fs(n)===Fs(c)&&s++)}return a>0?o>0&&s>0?Ls(n):s>0?Ls(n).charAt(1):Ls(n).charAt(0):``}function Vs(e,t,n,r,i,a=void 0,o=Q.NORMAL){let s=Ps(r);if(i===`p`&&(s===Es||s===ks))for(let s=0;s<Ts.length;s++){let c=Ts[s];e.push({color:t,from:n,to:r,piece:i,captured:a,promotion:c,flags:o|Q.PROMOTION})}else e.push({color:t,from:n,to:r,piece:i,captured:a,flags:o})}function Hs(e){let t=e.charAt(0);return t>=`a`&&t<=`h`?e.match(/[a-h]\d.*[a-h]\d/)?void 0:`p`:(t=t.toLowerCase(),t===`o`?`k`:t)}function Us(e){return e.replace(/=/,``).replace(/[+#]?[?!]*$/,``)}var Ws=class{constructor(e=fs,{skipValidation:t=!1}={}){y(this,`_board`,Array(128)),y(this,`_turn`,`w`),y(this,`_header`,{}),y(this,`_kings`,{w:ms,b:ms}),y(this,`_epSquare`,-1),y(this,`_halfMoves`,0),y(this,`_moveNumber`,0),y(this,`_history`,[]),y(this,`_comments`,{}),y(this,`_castling`,{w:0,b:0}),y(this,`_hash`,0n),y(this,`_positionCount`,new Map),this.load(e,{skipValidation:t})}clear({preserveHeaders:e=!1}={}){this._board=Array(128),this._kings={w:ms,b:ms},this._turn=`w`,this._castling={w:0,b:0},this._epSquare=ms,this._halfMoves=0,this._moveNumber=1,this._history=[],this._comments={},this._header=e?this._header:{...vs},this._hash=this._computeHash(),this._positionCount=new Map,this._header.SetUp=null,this._header.FEN=null}load(e,{skipValidation:t=!1,preserveHeaders:n=!1}={}){let r=e.split(/\s+/);if(r.length>=2&&r.length<6&&(e=r.concat([`-`,`-`,`0`,`1`].slice(-(6-r.length))).join(` `)),r=e.split(/\s+/),!t){let{ok:t,error:n}=zs(e);if(!t)throw Error(n)}let i=r[0],a=0;this.clear({preserveHeaders:n});for(let e=0;e<i.length;e++){let t=i.charAt(e);if(t===`/`)a+=8;else if(Is(t))a+=parseInt(t,10);else{let e=t<`a`?`w`:`b`;this._put({type:t.toLowerCase(),color:e},Ls(a)),a++}}this._turn=r[1],r[2].indexOf(`K`)>-1&&(this._castling.w|=Q.KSIDE_CASTLE),r[2].indexOf(`Q`)>-1&&(this._castling.w|=Q.QSIDE_CASTLE),r[2].indexOf(`k`)>-1&&(this._castling.b|=Q.KSIDE_CASTLE),r[2].indexOf(`q`)>-1&&(this._castling.b|=Q.QSIDE_CASTLE),this._epSquare=r[3]===`-`?ms:$[r[3]],this._halfMoves=parseInt(r[4],10),this._moveNumber=parseInt(r[5],10),this._hash=this._computeHash(),this._updateSetup(e),this._incPositionCount()}fen({forceEnpassantSquare:e=!1}={}){let t=0,n=``;for(let e=$.a8;e<=$.h1;e++){if(this._board[e]){t>0&&(n+=t,t=0);let{color:r,type:i}=this._board[e];n+=r===`w`?i.toUpperCase():i.toLowerCase()}else t++;e+1&136&&(t>0&&(n+=t),e!==$.h1&&(n+=`/`),t=0,e+=8)}let r=``;this._castling.w&Q.KSIDE_CASTLE&&(r+=`K`),this._castling.w&Q.QSIDE_CASTLE&&(r+=`Q`),this._castling.b&Q.KSIDE_CASTLE&&(r+=`k`),this._castling.b&Q.QSIDE_CASTLE&&(r+=`q`),r=r||`-`;let i=`-`;if(this._epSquare!==ms){if(e)i=Ls(this._epSquare);else{let e=this._epSquare+(this._turn===`w`?16:-16),t=[e+1,e-1];for(let e of t){if(e&136)continue;let t=this._turn;if(this._board[e]?.color===t&&this._board[e]?.type===`p`){this._makeMove({color:t,from:e,to:this._epSquare,piece:`p`,captured:`p`,flags:Q.EP_CAPTURE});let n=!this._isKingAttacked(t);if(this._undoMove(),n){i=Ls(this._epSquare);break}}}}}return[n,this._turn,r,i,this._halfMoves,this._moveNumber].join(` `)}_pieceKey(e){if(!this._board[e])return 0n;let{color:t,type:n}=this._board[e],r={w:0,b:1}[t],i={p:0,n:1,b:2,r:3,q:4,k:5}[n];return cs[r][i][e]}_epKey(){return this._epSquare===ms?0n:ls[this._epSquare&7]}_castlingKey(){return us[this._castling.w>>5|this._castling.b>>3]}_computeHash(){let e=0n;for(let t=$.a8;t<=$.h1;t++)t&136?t+=7:this._board[t]&&(e^=this._pieceKey(t));return e^=this._epKey(),e^=this._castlingKey(),this._turn===`b`&&(e^=ds),e}_updateSetup(e){this._history.length>0||(e===`rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1`?(this._header.SetUp=null,this._header.FEN=null):(this._header.SetUp=`1`,this._header.FEN=e))}reset(){this.load(fs)}get(e){return this._board[$[e]]}findPiece(e){let t=[];for(let n=$.a8;n<=$.h1;n++)n&136?n+=7:this._board[n]&&this._board[n]?.color===e.color&&this._board[n].color===e.color&&this._board[n].type===e.type&&t.push(Ls(n));return t}put({type:e,color:t},n){return this._put({type:e,color:t},n)?(this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),!0):!1}_set(e,t){this._hash^=this._pieceKey(e),this._board[e]=t,this._hash^=this._pieceKey(e)}_put({type:e,color:t},n){if(ws.indexOf(e.toLowerCase())===-1||!(n in $))return!1;let r=$[n];if(e==`k`&&this._kings[t]!=ms&&this._kings[t]!=r)return!1;let i=this._board[r];return i&&i.type===`k`&&(this._kings[i.color]=ms),this._set(r,{type:e,color:t}),e===`k`&&(this._kings[t]=r),!0}_clear(e){this._hash^=this._pieceKey(e),delete this._board[e]}remove(e){let t=this.get(e);return this._clear($[e]),t&&t.type===`k`&&(this._kings[t.color]=ms),this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),t}_updateCastlingRights(){this._hash^=this._castlingKey();let e=this._board[$.e1]?.type===`k`&&this._board[$.e1]?.color===`w`,t=this._board[$.e8]?.type===`k`&&this._board[$.e8]?.color===`b`;e&&this._board[$.a1]?.type===`r`&&this._board[$.a1]?.color===`w`||(this._castling.w&=-65),e&&this._board[$.h1]?.type===`r`&&this._board[$.h1]?.color===`w`||(this._castling.w&=-33),t&&this._board[$.a8]?.type===`r`&&this._board[$.a8]?.color===`b`||(this._castling.b&=-65),t&&this._board[$.h8]?.type===`r`&&this._board[$.h8]?.color===`b`||(this._castling.b&=-33),this._hash^=this._castlingKey()}_updateEnPassantSquare(){if(this._epSquare===ms)return;let e=this._epSquare+(this._turn===`w`?-16:16),t=this._epSquare+(this._turn===`w`?16:-16),n=[t+1,t-1];this._board[e]!==null||this._board[this._epSquare]!==null||this._board[t]?.color!==Rs(this._turn)||this._board[t]?.type!==`p`?(this._hash^=this._epKey(),this._epSquare=ms):n.some(e=>!(e&136)&&this._board[e]?.color===this._turn&&this._board[e]?.type===`p`)||(this._hash^=this._epKey(),this._epSquare=ms)}_attacked(e,t,n){let r=[];for(let i=$.a8;i<=$.h1;i++){if(i&136){i+=7;continue}if(this._board[i]===void 0||this._board[i].color!==e)continue;let a=this._board[i],o=i-t;if(o===0)continue;let s=o+119;if(xs[s]&Cs[a.type]){if(a.type===`p`){if(o>0&&a.color===`w`||o<=0&&a.color===`b`){if(n)r.push(Ls(i));else return!0}continue}if(a.type===`n`||a.type===`k`){if(n){r.push(Ls(i));continue}return!0}let e=Ss[s],c=i+e,l=!1;for(;c!==t;){if(this._board[c]!=null){l=!0;break}c+=e}if(!l){if(n){r.push(Ls(i));continue}return!0}}}return n?r:!1}attackers(e,t){return t?this._attacked(t,$[e],!0):this._attacked(this._turn,$[e],!0)}_isKingAttacked(e){let t=this._kings[e];return t!==-1&&this._attacked(Rs(e),t)}hash(){return this._hash.toString(16)}isAttacked(e,t){return this._attacked(t,$[e])}isCheck(){return this._isKingAttacked(this._turn)}inCheck(){return this.isCheck()}isCheckmate(){return this.isCheck()&&this._moves().length===0}isStalemate(){return!this.isCheck()&&this._moves().length===0}isInsufficientMaterial(){let e={b:0,n:0,r:0,q:0,k:0,p:0},t=[],n=0,r=0;for(let i=$.a8;i<=$.h1;i++){if(r=(r+1)%2,i&136){i+=7;continue}let a=this._board[i];a&&(e[a.type]=a.type in e?e[a.type]+1:1,a.type===`b`&&t.push(r),n++)}if(n===2||n===3&&(e.b===1||e.n===1))return!0;if(n===e.b+2){let e=0,n=t.length;for(let r=0;r<n;r++)e+=t[r];if(e===0||e===n)return!0}return!1}isThreefoldRepetition(){return this._getPositionCount(this._hash)>=3}isDrawByFiftyMoves(){return this._halfMoves>=100}isDraw(){return this.isDrawByFiftyMoves()||this.isStalemate()||this.isInsufficientMaterial()||this.isThreefoldRepetition()}isGameOver(){return this.isCheckmate()||this.isDraw()}moves({verbose:e=!1,square:t=void 0,piece:n=void 0}={}){let r=this._moves({square:t,piece:n});return e?r.map(e=>new ps(this,e)):r.map(e=>this._moveToSan(e,r))}_moves({legal:e=!0,piece:t=void 0,square:n=void 0}={}){let r=n?n.toLowerCase():void 0,i=t?.toLowerCase(),a=[],o=this._turn,s=Rs(o),c=$.a8,l=$.h1,u=!1;if(r){if(r in $)c=l=$[r],u=!0;else return[]}for(let e=c;e<=l;e++){if(e&136){e+=7;continue}if(!this._board[e]||this._board[e].color===s)continue;let{type:t}=this._board[e],n;if(t===`p`){if(i&&i!==t)continue;n=e+ys[o][0],this._board[n]||(Vs(a,o,e,n,`p`),n=e+ys[o][1],Ms[o]===Ps(e)&&!this._board[n]&&Vs(a,o,e,n,`p`,void 0,Q.BIG_PAWN));for(let t=2;t<4;t++)n=e+ys[o][t],n&136||(this._board[n]?.color===s?Vs(a,o,e,n,`p`,this._board[n].type,Q.CAPTURE):n===this._epSquare&&Vs(a,o,e,n,`p`,`p`,Q.EP_CAPTURE))}else{if(i&&i!==t)continue;for(let r=0,i=bs[t].length;r<i;r++){let i=bs[t][r];for(n=e;n+=i,!(n&136);){if(!this._board[n])Vs(a,o,e,n,t);else{if(this._board[n].color===o)break;Vs(a,o,e,n,t,this._board[n].type,Q.CAPTURE);break}if(t===`n`||t===`k`)break}}}}if((i===void 0||i===`k`)&&(!u||l===this._kings[o])){if(this._castling[o]&Q.KSIDE_CASTLE){let e=this._kings[o],t=e+2;this._board[e+1]||this._board[t]||this._attacked(s,this._kings[o])||this._attacked(s,e+1)||this._attacked(s,t)||Vs(a,o,this._kings[o],t,`k`,void 0,Q.KSIDE_CASTLE)}if(this._castling[o]&Q.QSIDE_CASTLE){let e=this._kings[o],t=e-2;this._board[e-1]||this._board[e-2]||this._board[e-3]||this._attacked(s,this._kings[o])||this._attacked(s,e-1)||this._attacked(s,t)||Vs(a,o,this._kings[o],t,`k`,void 0,Q.QSIDE_CASTLE)}}if(!e||this._kings[o]===-1)return a;let d=[];for(let e=0,t=a.length;e<t;e++)this._makeMove(a[e]),this._isKingAttacked(o)||d.push(a[e]),this._undoMove();return d}move(e,{strict:t=!1}={}){let n=null;if(typeof e==`string`)n=this._moveFromSan(e,t);else if(e===null)n=this._moveFromSan(Ns,t);else if(typeof e==`object`){let t=this._moves();for(let r=0,i=t.length;r<i;r++)if(e.from===Ls(t[r].from)&&e.to===Ls(t[r].to)&&(!(`promotion`in t[r])||e.promotion===t[r].promotion)){n=t[r];break}}if(!n)throw Error(typeof e==`string`?`Invalid move: ${e}`:`Invalid move: ${JSON.stringify(e)}`);if(this.isCheck()&&n.flags&Q.NULL_MOVE)throw Error(`Null move not allowed when in check`);let r=new ps(this,n);return this._makeMove(n),this._incPositionCount(),r}_push(e){this._history.push({move:e,kings:{b:this._kings.b,w:this._kings.w},turn:this._turn,castling:{b:this._castling.b,w:this._castling.w},epSquare:this._epSquare,halfMoves:this._halfMoves,moveNumber:this._moveNumber})}_movePiece(e,t){this._hash^=this._pieceKey(e),this._board[t]=this._board[e],delete this._board[e],this._hash^=this._pieceKey(t)}_makeMove(e){let t=this._turn,n=Rs(t);if(this._push(e),e.flags&Q.NULL_MOVE)t===`b`&&this._moveNumber++,this._halfMoves++,this._turn=n,this._epSquare=ms;else{if(this._hash^=this._epKey(),this._hash^=this._castlingKey(),e.captured&&(this._hash^=this._pieceKey(e.to)),this._movePiece(e.from,e.to),e.flags&Q.EP_CAPTURE&&(this._turn===`b`?this._clear(e.to-16):this._clear(e.to+16)),e.promotion&&(this._clear(e.to),this._set(e.to,{type:e.promotion,color:t})),this._board[e.to].type===`k`){if(this._kings[t]=e.to,e.flags&Q.KSIDE_CASTLE){let t=e.to-1,n=e.to+1;this._movePiece(n,t)}else if(e.flags&Q.QSIDE_CASTLE){let t=e.to+1,n=e.to-2;this._movePiece(n,t)}this._castling[t]=0}if(this._castling[t]){for(let n=0,r=js[t].length;n<r;n++)if(e.from===js[t][n].square&&this._castling[t]&js[t][n].flag){this._castling[t]^=js[t][n].flag;break}}if(this._castling[n]){for(let t=0,r=js[n].length;t<r;t++)if(e.to===js[n][t].square&&this._castling[n]&js[n][t].flag){this._castling[n]^=js[n][t].flag;break}}if(this._hash^=this._castlingKey(),e.flags&Q.BIG_PAWN){let r;r=t===`b`?e.to-16:e.to+16,!(e.to-1&136)&&this._board[e.to-1]?.type===`p`&&this._board[e.to-1]?.color===n||!(e.to+1&136)&&this._board[e.to+1]?.type===`p`&&this._board[e.to+1]?.color===n?(this._epSquare=r,this._hash^=this._epKey()):this._epSquare=ms}else this._epSquare=ms;e.piece===`p`||e.flags&(Q.CAPTURE|Q.EP_CAPTURE)?this._halfMoves=0:this._halfMoves++,t===`b`&&this._moveNumber++,this._turn=n,this._hash^=ds}}undo(){let e=this._hash,t=this._undoMove();if(t){let n=new ps(this,t);return this._decPositionCount(e),n}return null}_undoMove(){let e=this._history.pop();if(e===void 0)return null;this._hash^=this._epKey(),this._hash^=this._castlingKey();let t=e.move;this._kings=e.kings,this._turn=e.turn,this._castling=e.castling,this._epSquare=e.epSquare,this._halfMoves=e.halfMoves,this._moveNumber=e.moveNumber,this._hash^=this._epKey(),this._hash^=this._castlingKey(),this._hash^=ds;let n=this._turn,r=Rs(n);if(t.flags&Q.NULL_MOVE)return t;if(this._movePiece(t.to,t.from),t.piece&&(this._clear(t.from),this._set(t.from,{type:t.piece,color:n})),t.captured){if(t.flags&Q.EP_CAPTURE){let e;e=n===`b`?t.to-16:t.to+16,this._set(e,{type:`p`,color:r})}else this._set(t.to,{type:t.captured,color:r})}if(t.flags&(Q.KSIDE_CASTLE|Q.QSIDE_CASTLE)){let e,n;t.flags&Q.KSIDE_CASTLE?(e=t.to+1,n=t.to-1):(e=t.to-2,n=t.to+1),this._movePiece(n,e)}return t}pgn({newline:e=`
|
|
10
|
+
`,maxWidth:t=0}={}){let n=[],r=!1;for(let t in this._header)this._header[t]&&n.push(`[${t} "${this._header[t]}"]`+e),r=!0;r&&this._history.length&&n.push(e);let i=e=>{let t=this._comments[this.fen()];if(t!==void 0){let n=e.length>0?` `:``;e=`${e}${n}{${t}}`}return e},a=[];for(;this._history.length>0;)a.push(this._undoMove());let o=[],s=``;for(a.length===0&&o.push(i(``));a.length>0;){s=i(s);let e=a.pop();if(!e)break;if(!this._history.length&&e.color===`b`){let e=`${this._moveNumber}. ...`;s=s?`${s} ${e}`:e}else e.color===`w`&&(s.length&&o.push(s),s=this._moveNumber+`.`);s=s+` `+this._moveToSan(e,this._moves({legal:!0})),this._makeMove(e)}if(s.length&&o.push(i(s)),o.push(this._header.Result||`*`),t===0)return n.join(``)+o.join(` `);let c=function(){return n.length>0&&n[n.length-1]===` `&&(n.pop(),!0)},l=function(r,i){for(let a of i.split(` `))if(a){if(r+a.length>t){for(;c();)r--;n.push(e),r=0}n.push(a),r+=a.length,n.push(` `),r++}return c()&&r--,r},u=0;for(let r=0;r<o.length;r++)u+o[r].length>t&&o[r].includes(`{`)?u=l(u,o[r]):(u+o[r].length>t&&r!==0?(n[n.length-1]===` `&&n.pop(),n.push(e),u=0):r!==0&&(n.push(` `),u++),n.push(o[r]),u+=o[r].length);return n.join(``)}header(...e){for(let t=0;t<e.length;t+=2)typeof e[t]==`string`&&typeof e[t+1]==`string`&&(this._header[e[t]]=e[t+1]);return this._header}setHeader(e,t){return this._header[e]=t??gs[e]??null,this.getHeaders()}removeHeader(e){return e in this._header&&(this._header[e]=gs[e]||null,!0)}getHeaders(){let e={};for(let[t,n]of Object.entries(this._header))n!==null&&(e[t]=n);return e}loadPgn(e,{strict:t=!1,newlineChar:n=`\r?
|
|
11
|
+
`}={}){n!==`\r?
|
|
12
|
+
`&&(e=e.replace(new RegExp(n,`g`),`
|
|
13
|
+
`));let r=ns(e);this.reset();let i=r.headers,a=``;for(let e in i)e.toLowerCase()===`fen`&&(a=i[e]),this.header(e,i[e]);if(!t)a&&this.load(a,{preserveHeaders:!0});else if(i.SetUp===`1`){if(!(`FEN`in i))throw Error(`Invalid PGN: FEN tag must be supplied with SetUp tag`);this.load(i.FEN,{preserveHeaders:!0})}let o=r.root;for(;o;){if(o.move){let e=this._moveFromSan(o.move,t);if(e==null)throw Error(`Invalid move in PGN: ${o.move}`);this._makeMove(e),this._incPositionCount()}o.comment!==void 0&&(this._comments[this.fen()]=o.comment),o=o.variations[0]}let s=r.result;s&&Object.keys(this._header).length&&this._header.Result!==s&&this.setHeader(`Result`,s)}_moveToSan(e,t){let n=``;if(e.flags&Q.KSIDE_CASTLE)n=`O-O`;else if(e.flags&Q.QSIDE_CASTLE)n=`O-O-O`;else if(e.flags&Q.NULL_MOVE)return Ns;else{if(e.piece!==`p`){let r=Bs(e,t);n+=e.piece.toUpperCase()+r}e.flags&(Q.CAPTURE|Q.EP_CAPTURE)&&(e.piece===`p`&&(n+=Ls(e.from)[0]),n+=`x`),n+=Ls(e.to),e.promotion&&(n+=`=`+e.promotion.toUpperCase())}return this._makeMove(e),this.isCheck()&&(this.isCheckmate()?n+=`#`:n+=`+`),this._undoMove(),n}_moveFromSan(e,t=!1){let n=Us(e);if(t||(n===`0-0`?n=`O-O`:n===`0-0-0`&&(n=`O-O-O`)),n==Ns)return{color:this._turn,from:0,to:0,piece:`k`,flags:Q.NULL_MOVE};let r=Hs(n),i=this._moves({legal:!0,piece:r});for(let e=0,t=i.length;e<t;e++)if(n===Us(this._moveToSan(i[e],i)))return i[e];if(t)return null;let a,o,s,c,l,u=!1;if(o=n.match(/([pnbrqkPNBRQK])?([a-h][1-8])x?-?([a-h][1-8])([qrbnQRBN])?/),o?(a=o[1],s=o[2],c=o[3],l=o[4],s.length==1&&(u=!0)):(o=n.match(/([pnbrqkPNBRQK])?([a-h]?[1-8]?)x?-?([a-h][1-8])([qrbnQRBN])?/),o&&(a=o[1],s=o[2],c=o[3],l=o[4],s.length==1&&(u=!0))),r=Hs(n),i=this._moves({legal:!0,piece:a||r}),!c)return null;for(let e=0,t=i.length;e<t;e++)if(!s){if(n===Us(this._moveToSan(i[e],i)).replace(`x`,``))return i[e]}else if((!a||a.toLowerCase()==i[e].piece)&&$[s]==i[e].from&&$[c]==i[e].to&&(!l||l.toLowerCase()==i[e].promotion))return i[e];else if(u){let t=Ls(i[e].from);if((!a||a.toLowerCase()==i[e].piece)&&$[c]==i[e].to&&(s==t[0]||s==t[1])&&(!l||l.toLowerCase()==i[e].promotion))return i[e]}return null}ascii(){let e=` +------------------------+
|
|
14
|
+
`;for(let t=$.a8;t<=$.h1;t++){if(Fs(t)===0&&(e+=` `+`87654321`[Ps(t)]+` |`),this._board[t]){let n=this._board[t].type,r=this._board[t].color===`w`?n.toUpperCase():n.toLowerCase();e+=` `+r+` `}else e+=` . `;t+1&136&&(e+=`|
|
|
15
|
+
`,t+=8)}return e+=` +------------------------+
|
|
16
|
+
`,e+=` a b c d e f g h`,e}perft(e){let t=this._moves({legal:!1}),n=0,r=this._turn;for(let i=0,a=t.length;i<a;i++)this._makeMove(t[i]),this._isKingAttacked(r)||(e-1>0?n+=this.perft(e-1):n++),this._undoMove();return n}setTurn(e){return this._turn!=e&&(this.move(`--`),!0)}turn(){return this._turn}board(){let e=[],t=[];for(let n=$.a8;n<=$.h1;n++)this._board[n]==null?t.push(null):t.push({square:Ls(n),type:this._board[n].type,color:this._board[n].color}),n+1&136&&(e.push(t),t=[],n+=8);return e}squareColor(e){if(e in $){let t=$[e];return(Ps(t)+Fs(t))%2==0?`light`:`dark`}return null}history({verbose:e=!1}={}){let t=[],n=[];for(;this._history.length>0;)t.push(this._undoMove());for(;;){let r=t.pop();if(!r)break;e?n.push(new ps(this,r)):n.push(this._moveToSan(r,this._moves())),this._makeMove(r)}return n}_getPositionCount(e){return this._positionCount.get(e)??0}_incPositionCount(){this._positionCount.set(this._hash,(this._positionCount.get(this._hash)??0)+1)}_decPositionCount(e){let t=this._positionCount.get(e)??0;t===1?this._positionCount.delete(e):this._positionCount.set(e,t-1)}_pruneComments(){let e=[],t={},n=e=>{e in this._comments&&(t[e]=this._comments[e])};for(;this._history.length>0;)e.push(this._undoMove());for(n(this.fen());;){let t=e.pop();if(!t)break;this._makeMove(t),n(this.fen())}this._comments=t}getComment(){return this._comments[this.fen()]}setComment(e){this._comments[this.fen()]=e.replace(`{`,`[`).replace(`}`,`]`)}deleteComment(){return this.removeComment()}removeComment(){let e=this._comments[this.fen()];return delete this._comments[this.fen()],e}getComments(){return this._pruneComments(),Object.keys(this._comments).map(e=>({fen:e,comment:this._comments[e]}))}deleteComments(){return this.removeComments()}removeComments(){return this._pruneComments(),Object.keys(this._comments).map(e=>{let t=this._comments[e];return delete this._comments[e],{fen:e,comment:t}})}setCastlingRights(e,t){for(let n of[`k`,`q`])t[n]!==void 0&&(t[n]?this._castling[e]|=As[n]:this._castling[e]&=~As[n]);this._updateCastlingRights();let n=this.getCastlingRights(e);return(t.k===void 0||t.k===n.k)&&(t.q===void 0||t.q===n.q)}getCastlingRights(e){return{k:(this._castling[e]&As.k)!==0,q:(this._castling[e]&As.q)!==0}}moveNumber(){return this._moveNumber}},Gs=`abcdefgh`,Ks=0,qs=()=>`p${++Ks}`;function Js(e,t){let n=new Ws(t).board().flat().filter(e=>e!==null).map(e=>({color:e.color,type:e.type,square:e.square})),r=new Map(e.map(e=>[e.square,e])),i=[],a=[],o=new Set;for(let e of n){let t=r.get(e.square);t&&t.color===e.color&&t.type===e.type?(i.push({...e,id:t.id}),o.add(t.id)):a.push(e)}let s=e.filter(e=>!o.has(e.id)),c=a.flatMap((e,t)=>s.filter(t=>t.color===e.color&&t.type===e.type).map(n=>({ni:t,p:n,d:Ys(n.square,e.square)}))).sort((e,t)=>e.d-t.d),l=new Set,u=new Map;for(let{ni:e,p:t}of c)u.has(e)||l.has(t.id)||(u.set(e,t.id),l.add(t.id));return a.forEach((e,t)=>i.push({...e,id:u.get(t)??qs()})),i}function Ys(e,t){let n=cc(e),r=cc(t);return Math.hypot(n.x-r.x,n.y-r.y)}function Xs(e,t){let n=new Set;return new Ws(e).moves({square:t,verbose:!0}).filter(e=>!n.has(e.to)&&!!n.add(e.to)).map(e=>({to:e.to,capture:!!e.captured}))}function Zs(e,t,n,r=`q`){let i=new Ws(e);try{let e=i.move({from:t,to:n,promotion:r});return{fen:i.fen(),san:e.san}}catch{return null}}function Qs(e){let t=new Ws(e);return t.isCheck()?t.findPiece({type:`k`,color:t.turn()})[0]??null:null}var $s=[[`k`,`king`,`king`],[`q`,`queen`,`queens`],[`r`,`rook`,`rooks`],[`b`,`bishop`,`bishops`],[`n`,`knight`,`knights`],[`p`,`pawn`,`pawns`]];function ec(e,t=[],n=[]){let r=new Ws(e),i=r.board().flat().filter(e=>e!==null),a=e=>$s.map(([t,n,r])=>{let a=i.filter(n=>n.color===e&&n.type===t).map(e=>e.square).sort();return a.length?`${a.length>1?r:n} ${a.join(`, `)}`:``}).filter(Boolean).join(`; `),o=[`${r.turn()===`w`?`White`:`Black`} to move${r.isCheck()?`, in check`:``}`,`White: ${a(`w`)}`,`Black: ${a(`b`)}`];return t.length&&o.push(`Arrows: ${t.map(e=>`${e.from} to ${e.to}`).join(`, `)}`),n.length&&o.push(`Marked: ${[...new Set(n)].join(`, `)}`),o.join(`. `)+`.`}var tc={ArrowUp:(e,t)=>[e,t-1],ArrowDown:(e,t)=>[e,t+1],ArrowLeft:(e,t)=>[e-1,t],ArrowRight:(e,t)=>[e+1,t],Home:(e,t)=>[0,t],End:(e,t)=>[7,t]};function nc(e,t,n=!1){let r=tc[t];if(!r)return null;let i=cc(e,n),[a,o]=r(i.x,i.y).map(e=>Math.min(7,Math.max(0,e)));return lc(a,o,n)}var rc=e=>$s.find(([t])=>t===e)[1],ic=e=>e===`w`?`White`:`Black`;function ac(e,t){let n=new Ws(e).get(t);return n?`${t}, ${ic(n.color).toLowerCase()} ${rc(n.type)}`:`${t}, empty`}function oc(e,t){let n=new Ws(e).get(t),r=`${ic(n.color)} ${rc(n.type)} on ${t}`,i=Xs(e,t).length;return i?`${r} picked up, ${i} move${i===1?``:`s`}.`:`${r} has no legal moves.`}function sc(e,t,n,r){let i=new Ws(e).get(t),a=r.includes(`x`)?`takes`:`to`,o=r.endsWith(`#`)?`, checkmate`:r.endsWith(`+`)?`, check`:``;return`${ic(i.color)} ${rc(i.type)} ${t} ${a} ${n}${o}.`}function cc(e,t=!1){let n=Gs.indexOf(e[0]),r=Number(e[1])-1;return t?{x:7-n,y:r}:{x:n,y:7-r}}function lc(e,t,n=!1){if(e<0||e>=8||t<0||t>=8)return null;let r=Math.floor(e),i=Math.floor(t);return n?Gs[7-r]+(i+1):Gs[r]+(8-i)}var uc=qr(`<g opacity="0.92" pointer-events="none"><path pathLength="1" stroke="var(--brand)" stroke-width="0.17" stroke-linecap="round" fill="none"></path><polygon fill="var(--brand)"></polygon></g>`);function dc(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=e=>{let t=cc(e,n());return[t.x+.5,t.y+.5]},i=M(()=>[...r(t.from),...r(t.to)]),a=Dr(()=>K(i)).map(e=>new Vo(e,Fa.default));In(()=>{let e=K(i);Dr(()=>e.forEach((e,t)=>a[t].target=e))});let o=M(()=>Jo(a[0].current,a[1].current,a[2].current,a[3].current));var s=uc(),c=V(s),l=H(c);O(s),U(()=>{X(s,`data-arrow`,`${t.from??``}${t.to??``}`),X(c,`d`,K(o).shaft),X(l,`points`,K(o).head)}),aa(1,c,()=>Uo),aa(1,l,()=>Ho,()=>({delay:120})),q(e,s),Ge()}var fc={green:`oklch(0.6 0.15 145)`,red:`oklch(0.58 0.2 27)`,blue:`oklch(0.56 0.15 250)`,yellow:`oklch(0.8 0.15 90)`,orange:`oklch(0.68 0.17 52)`},pc={"!!":`#0f766e`,"!":`#15803d`,"?!":`#a16207`,"?":`#c2410c`,"??":`#b91c1c`},mc={"!!":`best`,"!":`good`,"?!":`inaccuracy`,"?":`mistake`,"??":`blunder`},hc=`#fffaf0`,gc=.42,_c=.26,vc=.2,yc=.08;function bc(e,t,n=!1){let r=cc(e,n),i=cc(t,n),[a,o,s,c]=[r.x+.5,r.y+.5,i.x+.5,i.y+.5],l=Math.abs(i.x-r.x),u=l*Math.abs(i.y-r.y)===2?l===2?[s,o]:[a,c]:null,[d,f]=u??[a,o],p=Math.hypot(s-d,c-f)||1e-6,m=(s-d)/p,h=(c-f)/p,g=s-m*yc,_=c-h*yc,v=g-m*gc,y=_-h*gc,[b,x]=u??[s,c],S=Math.hypot(b-a,x-o)||1e-6,ee=(b-a)/S,te=(x-o)/S;return{shaft:`M${Cc(a+ee*vc)} ${Cc(o+te*vc)} ${u?`L${Cc(u[0])} ${Cc(u[1])} `:``}L${Cc(v)} ${Cc(y)}`,head:`${Cc(g)},${Cc(_)} ${Cc(v-h*_c)},${Cc(y+m*_c)} ${Cc(v+h*_c)},${Cc(y-m*_c)}`}}function xc(e){return e.shiftKey&&e.altKey?`yellow`:e.shiftKey?`red`:e.altKey?`blue`:e.ctrlKey||e.metaKey?`yellow`:`green`}function Sc(e,t,n){return e===t?{circle:e,color:n,author:`person`}:{arrow:e+t,color:n,author:`person`}}var Cc=e=>Math.round(e*1e3)/1e3,wc=qr(`<rect width="0.93" height="0.93" fill="none" stroke-width="0.07"></rect>`),Tc=qr(`<g pointer-events="none"><rect width="1" height="1"></rect><!></g>`),Ec=qr(`<circle r="0.44" fill="none" stroke-width="0.17" opacity="0.95"></circle>`),Dc=qr(`<g pointer-events="none"><!><circle r="0.44" fill="none" stroke-width="0.075"></circle></g>`),Oc=qr(`<path stroke-width="0.29" fill="none" stroke-linecap="round" stroke-linejoin="round"></path><polygon stroke-width="0.12" stroke-linejoin="round"></polygon>`,1),kc=qr(`<g pointer-events="none"><!><path stroke-width="0.17" fill="none" stroke-linecap="round" stroke-linejoin="round"></path><polygon></polygon></g>`);function Ac(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=Z(t,`preview`,3,!1);var i=Jr();Wi(Cn(i),17,()=>t.marks,Bi,(e,i)=>{let a=M(()=>K(i).author===`agent`),o=M(()=>fc[K(i).color]);var s=Jr(),c=Cn(s),l=e=>{let t=M(()=>cc(K(i).square,n()));var r=Tc(),s=V(r),c=H(s),l=e=>{var n=wc();U(()=>{X(n,`x`,K(t).x+.035),X(n,`y`,K(t).y+.035),X(n,`stroke`,K(o))}),q(e,n)};Y(c,e=>{K(a)&&e(l)}),O(r),U(()=>{X(r,`data-mark`,`square ${K(i).square??``}`),X(r,`data-author`,K(i).author),X(s,`x`,K(t).x),X(s,`y`,K(t).y),X(s,`fill`,K(o)),X(s,`opacity`,K(a)?.45:.55)}),q(e,r)},u=e=>{let t=M(()=>cc(K(i).circle,n()));var s=Dc(),c=V(s),l=e=>{var n=Ec();U(()=>{X(n,`cx`,K(t).x+.5),X(n,`cy`,K(t).y+.5),X(n,`stroke`,hc)}),q(e,n)};Y(c,e=>{K(a)&&e(l)});var u=H(c);O(s),U(()=>{X(s,`data-mark`,`circle ${K(i).circle??``}`),X(s,`data-author`,K(i).author),X(s,`opacity`,r()?.6:K(a)?1:.85),X(u,`cx`,K(t).x+.5),X(u,`cy`,K(t).y+.5),X(u,`stroke`,K(o))}),q(e,s)},d=e=>{let t=M(()=>bc(K(i).arrow.slice(0,2),K(i).arrow.slice(2,4),n()));var s=kc(),c=V(s),l=e=>{var n=Oc(),r=Cn(n),i=H(r);U(()=>{X(r,`d`,K(t).shaft),X(r,`stroke`,hc),X(i,`points`,K(t).head),X(i,`fill`,hc),X(i,`stroke`,hc)}),q(e,n)};Y(c,e=>{K(a)&&e(l)});var u=H(c),d=H(u);O(s),U(()=>{X(s,`data-mark`,`arrow ${K(i).arrow??``}`),X(s,`data-author`,K(i).author),X(s,`opacity`,r()?.6:K(a)?.95:.8),X(u,`d`,K(t).shaft),X(u,`stroke`,K(o)),X(d,`points`,K(t).head),X(d,`fill`,K(o))}),q(e,s)};Y(c,e=>{t.layer===`under`&&`square`in K(i)?e(l):t.layer===`over`&&`circle`in K(i)?e(u,1):t.layer===`over`&&`arrow`in K(i)&&e(d,2)}),q(e,s)}),q(e,i),Ge()}var jc=qr(`<g pointer-events="none"><g><image width="1" height="1"></image></g></g>`);function Mc(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=Z(t,`href`,19,()=>`/pieces/kosal/${t.piece.color}${t.piece.type.toUpperCase()}.svg`),i=Z(t,`lifted`,3,!1),a=Z(t,`drag`,3,null),o=M(()=>cc(t.piece.square,n())),s=Dr(()=>K(o)),c=new Vo(s.x,Fa.heavy),l=new Vo(s.y,Fa.heavy),u=z(mn(new Vo(0,Fa.snappy)));In(()=>{a()?(c.jump(a().x),l.jump(a().y)):(c.target=K(o).x,l.target=K(o).y)}),In(()=>{let e=+!!i();Dr(()=>{K(u).target!==e&&(B(u,new Vo(K(u).current,i()?Fa.snappy:Fa.heavy),!0),K(u).target=e)})});let d=M(()=>K(u).current);var f=jc(),p=V(f),m=wn(p);O(f),U(()=>{X(f,`data-piece`,`${t.piece.color??``}${t.piece.type??``}`),X(f,`data-square`,t.piece.square),X(f,`transform`,`translate(${c.current??``} ${l.current??``})`),X(p,`transform`,`translate(0 ${-.04*K(d)}) translate(0.5 0.862) scale(${1+.12*K(d)}) translate(-0.5 -0.862)`),X(m,`href`,r())}),aa(3,m,()=>Ho),q(e,f),Ge()}var Nc=qr(`<g role="button" tabindex="-1" style="cursor: pointer"><rect width="1" height="1" fill="#fbf7f0"></rect><circle r="0.47" fill="#efe7da"></circle><image width="0.92" height="0.92"></image></g>`),Pc=qr(`<g><rect x="0" y="0" width="8" height="8" fill="rgb(20 12 6 / 0.45)"></rect></g><!>`,1);function Fc(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=M(()=>cc(t.to,n())),i=M(()=>K(r).y===0?1:-1);var a=Pc(),o=Cn(a);Wi(H(o),18,()=>[`q`,`n`,`r`,`b`],e=>e,(e,n,a)=>{let o=M(()=>K(r).y+K(i)*K(a));var s=Nc(),c=V(s),l=H(c),u=H(l);O(s),U(e=>{X(s,`aria-label`,{q:`Queen`,n:`Knight`,r:`Rook`,b:`Bishop`}[n]),X(s,`data-promote`,n),X(c,`x`,K(r).x),X(c,`y`,K(o)),X(l,`cx`,K(r).x+.5),X(l,`cy`,K(o)+.5),X(u,`href`,e),X(u,`x`,K(r).x+.04),X(u,`y`,K(o)+.04)},[()=>t.piece(t.color+n.toUpperCase())]),Ir(`pointerdown`,s,e=>(e.stopPropagation(),t.onpick(n))),Ir(`keydown`,s,e=>(e.key===`Enter`||e.key===` `)&&t.onpick(n)),q(e,s)}),U(()=>X(o,`data-promotion`,t.to)),Ir(`pointerdown`,o,e=>(e.stopPropagation(),t.onpick(null))),q(e,a),Ge()}Lr([`pointerdown`,`keydown`]);var Ic=qr(`<rect width="1" height="1" fill="var(--board-dark)"></rect>`),Lc=qr(`<rect width="1" height="1" fill="oklch(0.86 0.15 85)" opacity="0.5"></rect>`),Rc=qr(`<radialGradient id="board-check"><stop offset="0.2" stop-color="oklch(0.55 0.24 27)" stop-opacity="0.95"></stop><stop offset="1" stop-color="oklch(0.55 0.24 27)" stop-opacity="0"></stop></radialGradient><rect width="1" height="1" fill="url(#board-check)"></rect>`,1),zc=qr(`<rect width="1" height="1" fill="var(--brand)" opacity="0.28"></rect>`),Bc=qr(`<rect width="1" height="1" fill="oklch(0.55 0.1 250)" opacity="0.5"></rect>`),Vc=qr(`<rect width="1" height="1" fill="oklch(0.55 0.1 250)" opacity="0.35"></rect>`),Hc=qr(`<text y="7.95" text-anchor="end" font-size="0.19" font-weight="600" pointer-events="none"> </text><text x="0.05" font-size="0.19" font-weight="600" pointer-events="none"> </text>`,1),Uc=qr(`<circle pointer-events="none"></circle>`),Wc=qr(`<rect width="0.92" height="0.92" fill="none" stroke="var(--ring)" stroke-width="0.08" pointer-events="none"></rect>`),Gc=qr(`<text y="8.32" text-anchor="middle" font-size="0.22" fill="var(--ink-3)" class="mono"> </text><text x="-0.2" text-anchor="middle" font-size="0.22" fill="var(--ink-3)" class="mono"> </text>`,1),Kc=Gr(`<div class="sr-only" aria-live="polite" data-testid="board-live"> </div>`),qc=Gr(`<svg data-board="" class="block h-auto w-full touch-manipulation select-none" data-slot="board"><g data-squares=""><rect x="0" y="0" width="8" height="8" fill="var(--board-light)"></rect><!></g><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!>`,1);function Jc(e,t){We(t,!0);let n=Z(t,`fen`,15),r=Z(t,`arrows`,19,()=>[]),i=Z(t,`highlight`,19,()=>[]),a=Z(t,`flip`,3,!1),o=Z(t,`rulers`,3,!0),s=Z(t,`hints`,3,!0),c=Z(t,`playable`,3,!1),l=Z(t,`focusable`,3,!1),u=Z(t,`marks`,19,()=>[]),d=Z(t,`lastMove`,3,null),f=Z(t,`corners`,3,!1),m=Z(t,`piece`,3,e=>`/pieces/kosal/${e}.svg`),h=Z(t,`mayMove`,3,()=>!0),g=Z(t,`premoveSide`,3,null),_=Z(t,`premove`,3,null),v=Z(t,`promotion`,3,`queen`),y=Z(t,`draw`,3,!1),b=Z(t,`pen`,3,null),x=Z(t,`check`,3,!1),S=`abcdefgh`,ee=[],te=M(()=>ee=Js(ee,n())),ne=M(()=>new Ws(n()).turn()),re=M(()=>x()?Qs(n()):null),ie=M(()=>u().flatMap(e=>`arrow`in e?[{from:e.arrow.slice(0,2),to:e.arrow.slice(2)}]:[])),ae=M(()=>u().flatMap(e=>`circle`in e?[e.circle]:`square`in e?[e.square]:[])),oe=M(()=>ec(n(),[...r(),...K(ie)],[...i(),...K(ae)])),se=M(()=>h()(K(ne))?K(ne):g()&&g()!==K(ne)?g():null),ce=M(()=>K(se)!==null&&K(se)!==K(ne)),le=z(null),C=z(null),w=z(null),ue=z(null),de=z(null);In(()=>{n(),Dr(()=>{K(C)&&K(te).find(e=>e.square===K(C))?.color!==K(se)&&B(C,null),B(ue,null)})});let fe=M(()=>{if(K(ce))return[];let e=c()&&K(C)?K(C):s()?K(le):null;return e?Xs(n(),e):[]}),pe=z(null),me=z(!1),he=z(``);function ge(e){if(B(me,e.target.matches(`:focus-visible`),!0),!K(pe)){let e=new Ws(n());B(pe,e.board().flat().find(t=>t?.type===`k`&&t.color===e.turn())?.square??`e1`,!0)}}function _e(e){if(!K(pe)||e.altKey||e.ctrlKey||e.metaKey)return;let t=nc(K(pe),e.key,a());t?(e.preventDefault(),B(me,!0),B(pe,t,!0),B(he,ac(n(),t),!0)):e.key===`Enter`||e.key===` `?(e.preventDefault(),B(me,!0),ve(K(pe))):e.key===`Escape`&&K(C)&&(e.preventDefault(),B(C,null),B(he,`Put down.`))}function ve(e){if(K(C)&&e!==K(C)&&!K(ce)&&Xs(n(),K(C)).some(t=>t.to===e)){let t=n(),r=K(C),i=Se(r,e,`q`);i&&B(he,sc(t,r,e,i.san),!0)}else K(C)&&e!==K(C)&&K(ce)&&!xe(e)?(t.onpremove?.({from:K(C),to:e}),B(he,`Premove ${K(C)} to ${e}.`),B(C,null)):K(C)===e?(B(C,null),B(he,`Put down.`)):xe(e)?(B(he,oc(n(),e),!0),B(C,K(ce)||Xs(n(),e).length?e:null,!0)):K(C)?B(he,`No legal move to ${e}.`):B(he,`Nothing to pick up on ${e}.`)}let ye=z(void 0);function T(e){let t=new DOMPoint(e.clientX,e.clientY).matrixTransform(K(ye).getScreenCTM().inverse());return{x:t.x,y:t.y}}let be=e=>!!e&&K(te).some(t=>t.square===e&&t.color===K(ne)),xe=e=>!!e&&K(se)!==null&&K(te).some(t=>t.square===e&&t.color===K(se));function Se(e,t,r){B(w,null);let i=new Ws(n()).moves({square:e,verbose:!0}).some(e=>e.to===t&&e.promotion);return i&&!r&&K(E)?(B(ue,{from:e,to:t,color:K(ne)},!0),B(C,null),null):Ce(e,t,i?r??`q`:void 0)}let E=M(()=>v()===`choose`);function Ce(e,r,i){if(B(C,null),B(w,null),B(ue,null),t.onplay){let a=new Ws(n());try{let n=a.move({from:e,to:r,promotion:i}).san;return t.onplay({from:e,to:r,promotion:i}),{fen:a.fen(),san:n}}catch{return null}}let a=Zs(n(),e,r,i);return a?(n(a.fen),t.onmove?.({...a,from:e,to:r}),a):null}function D(e){if(t.onsquare&&e.button===0){let n=T(e);t.onsquare(lc(n.x,n.y,a()),e.pointerType)}let r=T(e),i=lc(r.x,r.y,a());if(y()&&i&&(e.button===2||b()&&e.button===0))e.preventDefault(),B(de,{from:i,to:i,color:b()&&e.button===0?b():xc(e)},!0),K(ye).setPointerCapture?.(e.pointerId);else if(e.button===0&&(y()&&t.onclearmarks?.(),c())){if(K(C)&&i&&i!==K(C)&&!xe(i)){if(K(ce)){t.onpremove?.({from:K(C),to:i}),B(C,null);return}if(Xs(n(),K(C)).some(e=>e.to===i))return Se(K(C),i)}if(xe(i)){e.preventDefault(),_()&&t.onpremove?.(null);let n=K(C)===i;B(C,i,!0);let o=cc(i,a()),s=K(te).find(e=>e.square===i).id;B(w,{from:i,id:s,gx:r.x-o.x,gy:r.y-o.y,x0:r.x,y0:r.y,x:o.x,y:o.y,moved:!1,wasSel:n},!0),K(ye).setPointerCapture?.(e.pointerId)}else B(C,null),_()&&t.onpremove?.(null)}}function we(e){let n=T(e),r=lc(n.x,n.y,a());K(de)?r&&r!==K(de).to&&(K(de).to=r):(B(le,be(r)?r:null,!0),e.pointerType!==`touch`&&t.onsquare?.(r,e.pointerType),K(w)&&(!K(w).moved&&Math.hypot(n.x-K(w).x0,n.y-K(w).y0)<.08||(K(w).moved=!0,K(w).x=n.x-K(w).gx,K(w).y=n.y-K(w).gy)))}function Te(e){if(K(de)){let e=K(de);B(de,null),t.ondraw?.(Sc(e.from,e.to,e.color));return}if(!K(w))return;let r=K(w);if(B(w,null),!r.moved){r.wasSel&&B(C,null);return}let i=T(e),o=lc(i.x,i.y,a());K(ce)?(o&&o!==r.from&&t.onpremove?.({from:r.from,to:o}),B(C,null)):o&&o!==r.from&&Xs(n(),r.from).some(e=>e.to===o)?Se(r.from,o):B(C,null)}let Ee=e=>cc(e,a());var De=qc(),k=Cn(De);let Oe;var ke=V(k);Wi(H(V(ke)),16,()=>Array(64),Bi,(e,t,n)=>{let r=M(()=>n%8),i=M(()=>Math.floor(n/8));var a=Jr(),o=Cn(a),s=e=>{var t=Ic();U(()=>{X(t,`x`,K(r)),X(t,`y`,K(i))}),q(e,t)};Y(o,e=>{(K(r)+K(i))%2==1&&e(s)}),q(e,a)}),O(ke);var Ae=H(ke),je=e=>{var t=Jr();Wi(Cn(t),16,()=>[d().slice(0,2),d().slice(2,4)],e=>e,(e,t)=>{let n=M(()=>Ee(t));var r=Lc();U(()=>{X(r,`data-last`,t),X(r,`x`,K(n).x),X(r,`y`,K(n).y)}),q(e,r)}),q(e,t)};Y(Ae,e=>{d()&&e(je)});var Me=H(Ae),Ne=e=>{let t=M(()=>Ee(K(re)));var n=Rc(),r=H(Cn(n));U(()=>{X(r,`data-check`,K(re)),X(r,`x`,K(t).x),X(r,`y`,K(t).y)}),q(e,n)};Y(Me,e=>{K(re)&&e(Ne)});var Pe=H(Me);Wi(Pe,16,()=>[...new Set(i())],e=>e,(e,t)=>{let n=M(()=>Ee(t));var r=zc();U(()=>{X(r,`x`,K(n).x),X(r,`y`,K(n).y)}),q(e,r)});var Fe=H(Pe),Ie=e=>{var t=Jr();Wi(Cn(t),16,()=>[_().from,_().to],e=>e,(e,t)=>{let n=M(()=>Ee(t));var r=Bc();U(()=>{X(r,`data-premove`,t),X(r,`x`,K(n).x),X(r,`y`,K(n).y)}),q(e,r)}),q(e,t)};Y(Fe,e=>{_()&&e(Ie)});var Le=H(Fe),Re=e=>{let t=M(()=>Ee(K(C)));var n=Vc();U(()=>{X(n,`x`,K(t).x),X(n,`y`,K(t).y)}),q(e,n)};Y(Le,e=>{c()&&K(C)&&K(ce)&&e(Re)});var ze=H(Le);Ac(ze,{get marks(){return u()},layer:`under`,get flip(){return a()}});var Be=H(ze),Ve=e=>{var t=Jr();Wi(Cn(t),16,()=>Array(8),Bi,(e,t,n)=>{var r=Hc(),i=Cn(r);X(i,`x`,n+.95),X(i,`fill`,(n+7)%2==1?`var(--board-coord-on-dark)`:`var(--board-coord-on-light)`);var o=wn(i,!0),s=H(i);X(s,`y`,n+.21),X(s,`fill`,n%2==1?`var(--board-coord-on-dark)`:`var(--board-coord-on-light)`);var c=wn(s,!0);U(()=>{Ei(o,a()?S[7-n]:S[n]),Ei(c,a()?n+1:8-n)}),q(e,r)}),q(e,t)};Y(Be,e=>{f()&&e(Ve)});var He=H(Be);Wi(He,17,()=>K(te),e=>e.id,(e,t)=>{{let n=M(()=>m()(K(t).color+K(t).type.toUpperCase())),r=M(()=>c()&&(K(C)===K(t).square||K(w)?.id===K(t).id)),i=M(()=>K(w)?.moved&&K(w).id===K(t).id?{x:K(w).x,y:K(w).y}:null);Mc(e,{get piece(){return K(t)},get flip(){return a()},get href(){return K(n)},get lifted(){return K(r)},get drag(){return K(i)}})}});var Ue=H(He);Wi(Ue,17,()=>K(fe),e=>e.to,(e,t)=>{let n=M(()=>cc(K(t).to,a()));var r=Uc();U(()=>{X(r,`data-target`,K(t).to),X(r,`cx`,K(n).x+.5),X(r,`cy`,K(n).y+.5),X(r,`r`,K(t).capture?.44:.13),X(r,`fill`,K(t).capture?`none`:`var(--ink)`),X(r,`stroke`,K(t).capture?`var(--ink)`:`none`),X(r,`stroke-width`,K(t).capture?.06:0),X(r,`opacity`,K(t).capture?.3:.28)}),aa(1,r,()=>Ho),q(e,r)});var Ke=H(Ue);Wi(Ke,17,r,Bi,(e,t)=>{dc(e,{get from(){return K(t).from},get to(){return K(t).to},get flip(){return a()}})});var qe=H(Ke);Ac(qe,{get marks(){return u()},layer:`over`,get flip(){return a()}});var Je=H(qe),Ye=e=>{{let t=M(()=>[Sc(K(de).from,K(de).to,K(de).color)]);Ac(e,{get marks(){return K(t)},layer:`over`,get flip(){return a()},preview:!0})}};Y(Je,e=>{K(de)&&e(Ye)});var Xe=H(Je);Xi(Xe,()=>t.overlay??p);var Ze=H(Xe),Qe=e=>{Fc(e,{get to(){return K(ue).to},get color(){return K(ue).color},get flip(){return a()},get piece(){return m()},onpick:e=>e?Ce(K(ue).from,K(ue).to,e):B(ue,null)})};Y(Ze,e=>{K(ue)&&e(Qe)});var $e=H(Ze),et=e=>{let t=M(()=>cc(K(pe),a()));var n=Wc();U(()=>{X(n,`data-cursor`,K(pe)),X(n,`x`,K(t).x+.04),X(n,`y`,K(t).y+.04)}),q(e,n)};Y($e,e=>{c()&&K(me)&&K(pe)&&e(et)});var A=H($e),tt=e=>{var t=Jr();Wi(Cn(t),16,()=>Array(8),Bi,(e,t,n)=>{var r=Gc(),i=Cn(r);X(i,`x`,n+.5);var o=wn(i,!0),s=H(i);X(s,`y`,n+.58);var c=wn(s,!0);U(()=>{Ei(o,a()?S[7-n]:S[n]),Ei(c,a()?n+1:8-n)}),q(e,r)}),q(e,t)};Y(A,e=>{o()&&!f()&&e(tt)}),O(k),Aa(k,e=>B(ye,e),()=>K(ye));var nt=H(k,2),rt=e=>{var t=Kc(),n=wn(t,!0);U(()=>Ei(n,K(he))),q(e,t)};Y(nt,e=>{c()&&e(rt)}),U(e=>{X(k,`viewBox`,o()&&!f()?`-0.42 0 8.42 8.42`:`0 0 8 8`),X(k,`role`,c()||l()?`application`:`img`),X(k,`aria-roledescription`,c()||l()?`chess board`:void 0),X(k,`aria-label`,t.label?`${t.label}. ${K(oe)}`:`Chess position. ${K(oe)}`),X(k,`tabindex`,c()||l()?0:void 0),X(k,`data-fen`,n()),Oe=ha(k,``,Oe,{"touch-action":c()||y()?`none`:null,cursor:e})},[()=>c()?K(w)?.moved?`grabbing`:K(le)&&xe(K(le))?`grab`:null:null]),Fr(`focus`,k,function(...e){(c()?ge:void 0)?.apply(this,e)}),Fr(`blur`,k,()=>B(me,!1)),Ir(`keydown`,k,function(...e){(c()?_e:void 0)?.apply(this,e)}),Ir(`contextmenu`,k,function(...e){(y()?e=>e.preventDefault():void 0)?.apply(this,e)}),Ir(`pointerdown`,k,D),Ir(`pointermove`,k,we),Ir(`pointerup`,k,Te),Fr(`pointerleave`,k,e=>(B(le,null),e.pointerType!==`touch`&&t.onsquare?.(null,e.pointerType))),Fr(`pointercancel`,k,()=>(B(w,null),B(C,null),B(de,null))),q(e,De),Ge()}Lr([`keydown`,`contextmenu`,`pointerdown`,`pointermove`,`pointerup`]);var Yc={p:1,n:3,b:3,r:5,q:9,k:0},Xc=[`q`,`r`,`b`,`n`,`p`];function Zc(e,t){let n=e=>{let t={w:{p:0,n:0,b:0,r:0,q:0,k:0},b:{p:0,n:0,b:0,r:0,q:0,k:0}};for(let n of new Ws(e).board().flat())n&&t[n.color][n.type]++;return t},r=n(e),i=n(t),a=e=>Xc.flatMap(t=>Array(Math.max(0,r[e][t]-i[e][t])).fill(t)),o=e=>Xc.reduce((t,n)=>t+i[e][n]*Yc[n],0),s=o(`w`)-o(`b`);return{w:{captured:a(`b`),ahead:Math.max(0,s)},b:{captured:a(`w`),ahead:Math.max(0,-s)}}}function Qc(e){return`mate`in e?`${e.mate<0?`−`:`+`}M${Math.abs(e.mate)}`:e.cp===0?`0.0`:`${e.cp<0?`−`:`+`}${(Math.round(Math.abs(e.cp)/10)/10).toFixed(1)}`}function $c(e){return`mate`in e?e.mate>0?100:e.mate<0?0:50:100/(1+Math.exp(-e.cp/260))}var el=`rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1`,tl=[`green`,`red`,`blue`,`yellow`,`orange`],nl=[`view`,`play-white`,`play-black`,`play-both`],rl=[`full`,`phone`,`embed`,`thumb`],il=[`!!`,`!`,`?!`,`?`,`??`],al={game:{start:el,line:[],headers:{},pgn:!1},ply:0,orientation:`white`,lastMove:null,marks:[],annotations:{},eval:null,mode:`play-both`,moves:!1,players:null,size:`full`},ol=/^[a-h][1-8]$/,sl=/^([a-h][1-8])([a-h][1-8])([qrbn])?$/,cl=80,ll=e=>e.ply?e.game.line[e.ply-1].fen:e.game.start,ul=e=>e.split(` `).slice(0,4).join(` `);function dl(e){let t=ll(e),n=new Ws(t);if(n.isCheckmate())return{result:n.turn()===`w`?`0-1`:`1-0`,reason:`checkmate`};if(n.isStalemate())return{result:`1/2-1/2`,reason:`stalemate`};if(n.isInsufficientMaterial())return{result:`1/2-1/2`,reason:`insufficient material`};if(e.mode!==`play-white`&&e.mode!==`play-black`||e.ply!==e.game.line.length)return;let r=ul(t);if([e.game.start,...e.game.line.map(e=>e.fen)].filter(e=>ul(e)===r).length>=3)return{result:`1/2-1/2`,reason:`repetition`};if(n.isDrawByFiftyMoves())return{result:`1/2-1/2`,reason:`fifty moves`}}function fl({result:e,reason:t}){return t===`checkmate`?`Checkmate. ${e===`1-0`?`White`:`Black`} wins.`:`Draw by ${t===`fifty moves`?`the fifty-move rule`:t}.`}function pl(e){let t={fen:ll(e),orientation:e.orientation,lastMove:e.ply?e.game.line[e.ply-1].uci:e.lastMove,marks:e.marks.map(e=>({...e})),eval:e.eval&&{...e.eval},mode:e.mode,moves:e.moves,players:e.players&&{white:{...e.players.white},black:{...e.players.black}},size:e.size};(e.game.pgn||e.game.line.length)&&(t.pgn=_l(e.game),t.ply=e.ply);let n=Object.entries(e.annotations);n.length&&(t.annotations=Object.fromEntries(n.map(([e,t])=>[e,{...t}])));let r=dl(e);return r&&(t.outcome=r),t}function ml(e,t,{trusted:n=!1}={}){let r=[],i=e=>r.push({code:`invalid_state`,message:e});if(!Dl(t))return i(`set() takes an object, a partial State.`),{data:e,errors:r};let a={...e},o=e=>Object.hasOwn(t,e)&&t[e]!==void 0;if(o(`fen`)&&o(`pgn`))i(`A State has a fen or a pgn, not both.`);else if(o(`pgn`)){let e=typeof t.pgn==`string`?gl(t.pgn):{error:`pgn is a string.`};`error`in e?i(e.error):(a.game=e,a.ply=e.line.length,a.lastMove=null,o(`ply`)&&!hl(t.ply,e.line.length,i,e=>a.ply=e)&&(a.ply=e.line.length))}else if(o(`fen`)){let e=typeof t.fen==`string`?t.fen.trim():``,n=zs(e);n.ok?(a.game={start:e,line:[],headers:{},pgn:!1},a.ply=0,a.lastMove=null):i(`fen doesn’t read: ${n.error??`invalid FEN`}.`)}else o(`ply`)&&hl(t.ply,e.game.line.length,i,t=>{t!==e.ply&&(a.lastMove=null),a.ply=t});if(a.game!==e.game&&_l(a.game)!==_l(e.game)&&(a.annotations={}),o(`annotations`)){if(!Dl(t.annotations))i(`annotations is a map from ply to { glyph, comment }.`);else{let e={};for(let[n,r]of Object.entries(t.annotations)){let t=yl(r);typeof t==`string`?i(t):hl(n,a.game.line.length,i,n=>{(t.glyph||t.comment)&&(e[n]=t)})}a.annotations=e}}if(o(`lastMove`)){if(t.lastMove===null)a.lastMove=null;else{let e=typeof t.lastMove==`string`?sl.exec(t.lastMove.trim()):null;e?a.lastMove=e[1]+e[2]:i(`lastMove is a move in UCI, such as e2e4.`)}}if(o(`orientation`)&&(t.orientation===`white`||t.orientation===`black`?a.orientation=t.orientation:i(`orientation is white or black.`)),o(`marks`)){if(!Array.isArray(t.marks))i(`marks is a list.`);else{let r=[];for(let e of t.marks){let t=vl(e,n);typeof t==`string`?i(t):t&&r.push(t)}a.marks=n?r:[...e.marks.filter(e=>e.author===`person`),...r]}}if(o(`eval`)){let e=bl(t.eval);e===void 0?i(`eval is null, centipawns ({ cp: 35 }) or moves to mate ({ mate: -3 }).`):a.eval=e}if(o(`mode`)&&(nl.includes(t.mode)?a.mode=t.mode:i(`mode is one of ${nl.join(`, `)}.`)),o(`moves`)&&(typeof t.moves==`boolean`?a.moves=t.moves:i(`moves is true or false.`)),o(`players`)){let e=xl(t.players);e===void 0?i(`players is null, true, or { white: { name, rating }, black: { name, rating } }.`):a.players=e}return o(`size`)&&(rl.includes(t.size)?a.size=t.size:i(`size is one of ${rl.join(`, `)}.`)),{data:a,errors:r}}function hl(e,t,n,r){let i=typeof e==`string`&&/^\d+$/.test(e.trim())?Number(e):e;return typeof i==`number`&&Number.isInteger(i)&&i>=0&&i<=t?(r(i),!0):(n(`ply is the half-moves into the game, from 0 to ${t}.`),!1)}function gl(e){let t=new Ws;try{t.loadPgn(e)}catch(e){let t=e instanceof Error?e.message:String(e),n=/^Invalid move in PGN: (.+)$/.exec(t);return{error:n?`pgn doesn’t read: ${Ol(n[1])} isn’t a legal move there.`:`pgn doesn’t read: ${Ol(t)}`}}let n=t.history({verbose:!0}),r=Object.fromEntries(Object.entries(t.getHeaders()).filter(([e,t])=>t&&!/^[?.*]+$/.test(t)&&e!==`SetUp`&&e!==`FEN`));return{start:n[0]?.before??t.fen(),line:n.map(e=>({san:e.san,uci:e.lan,from:e.from,to:e.to,fen:e.after})),headers:r,pgn:!0}}function _l(e){let t={...e.headers};e.start!==`rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1`&&Object.assign(t,{SetUp:`1`,FEN:e.start});let[,n,,,,r]=e.start.split(` `),i=Number(r)||1,a=[];e.line.forEach((e,t)=>{let r=(t+ +(n===`b`))%2==0;r?a.push(`${i}. ${e.san}`):a.push(t===0?`${i}... ${e.san}`:e.san),r||i++}),a.push(t.Result??`*`);let o=Object.entries(t).map(([e,t])=>`[${e} "${t.replace(/["\\]/g,``)}"]`);return[...o,...o.length?[``]:[],a.join(` `)].join(`
|
|
17
|
+
`)}function vl(e,t){if(!Dl(e))return`Each mark is an object, such as { arrow: "e2e4", color: "green" }.`;let n=e.color===void 0?`orange`:e.color;if(!tl.includes(n))return`A mark’s color is one of ${tl.join(`, `)}.`;let r=t&&e.author===`person`?`person`:`agent`;if(!t&&e.author===`person`)return null;let i=n;if(typeof e.arrow==`string`||typeof e.from==`string`&&typeof e.to==`string`){let t=typeof e.arrow==`string`?e.arrow.trim():`${String(e.from).trim()}${String(e.to).trim()}`,n=sl.exec(t);return!n||n[1]===n[2]?`“${Ol(t)}” isn’t an arrow: two squares, such as e2e4.`:{arrow:n[1]+n[2],color:i,author:r}}for(let t of[`circle`,`square`]){if(e[t]===void 0)continue;let n=typeof e[t]==`string`?e[t].trim():``;return ol.test(n)?t===`circle`?{circle:n,color:i,author:r}:{square:n,color:i,author:r}:`“${Ol(String(e[t]))}” isn’t a square, such as e4.`}return`A mark is an arrow, a circle or a square: { arrow: "e2e4" }, { circle: "f7" } or { square: "d5" }.`}function yl(e){if(!Dl(e))return`An annotation is { glyph, comment }, either or both.`;let t={};if(e.glyph!==void 0&&e.glyph!==null){if(!il.includes(e.glyph))return`An annotation’s glyph is one of ${il.join(`, `)}.`;t.glyph=e.glyph}if(e.comment!==void 0&&e.comment!==null){if(typeof e.comment!=`string`)return`An annotation’s comment is text.`;e.comment.trim()&&(t.comment=e.comment.trim())}return t}function bl(e){if(e===null||e===!1)return null;if(typeof e==`number`&&Number.isFinite(e))return{cp:Math.round(e)};if(Dl(e)){if(typeof e.mate==`number`&&Number.isInteger(e.mate))return{mate:e.mate};if(typeof e.cp==`number`&&Number.isFinite(e.cp))return{cp:Math.round(e.cp)}}}function xl(e){if(e===null||e===!1)return null;if(e===!0)return{white:{},black:{}};if(!Dl(e))return;let t=e=>{if(e==null)return{};if(!Dl(e))return;let t={};typeof e.name==`string`&&e.name.trim()&&(t.name=Ol(e.name.trim(),cl));let n=typeof e.rating==`string`&&/^\d+$/.test(e.rating.trim())?Number(e.rating):e.rating;return typeof n==`number`&&Number.isFinite(n)&&(t.rating=Math.round(n)),t},n=t(e.white),r=t(e.black);return n&&r?{white:n,black:r}:void 0}var Sl={green:`G`,red:`R`,blue:`B`,yellow:`Y`,orange:`O`},Cl=Object.fromEntries(Object.entries(Sl).map(([e,t])=>[t,e]));function wl(e){let t=new URLSearchParams;e.pgn===void 0?t.set(`fen`,e.fen):(t.set(`pgn`,e.pgn),t.set(`ply`,String(e.ply??0)));let n=e.pgn===void 0||!e.ply?e.lastMove:null;if(n&&t.set(`last`,n),e.marks.length&&t.set(`marks`,e.marks.map(e=>{let t=e.author===`person`?Sl[e.color].toLowerCase():Sl[e.color];return`arrow`in e?t+e.arrow:`circle`in e?t+e.circle:`${t}${e.square}*`}).join(`,`)),e.orientation!==`white`&&t.set(`orientation`,e.orientation),e.mode!==al.mode&&t.set(`mode`,e.mode),e.moves&&t.set(`moves`,`1`),e.size!==al.size&&t.set(`size`,e.size),e.eval&&(`mate`in e.eval?t.set(`mate`,String(e.eval.mate)):t.set(`eval`,String(e.eval.cp))),e.players){[e.players.white,e.players.black].some(e=>e.name||e.rating!==void 0)||t.set(`players`,`1`);for(let n of[`white`,`black`]){let r=e.players[n];r.name&&t.set(n,r.name),r.rating!==void 0&&t.set(`${n}_rating`,String(r.rating))}}return`#${t.toString()}`}function Tl(e){let t=new URLSearchParams(e.replace(/^#/,``)),n={},r=e=>t.get(e)?.trim()||void 0;r(`fen`)&&(n.fen=r(`fen`)),r(`pgn`)&&(n.pgn=r(`pgn`)),(r(`ply`)||r(`pgn`))&&(n.ply=r(`ply`)??0),r(`last`)&&(n.lastMove=r(`last`));let i=[];for(let e of(r(`arrows`)??``).split(`,`).map(e=>e.trim()).filter(Boolean))i.push({arrow:e});for(let e of(r(`marks`)??``).split(`,`).map(e=>e.trim()).filter(Boolean)){let t=/^([GRBYOgrbyo])([a-h][1-8])([a-h][1-8]|\*)?$/.exec(e);if(!t)continue;let n={color:Cl[t[1].toUpperCase()],author:t[1]===t[1].toUpperCase()?`agent`:`person`};t[3]===`*`?n.square=t[2]:t[3]?n.arrow=t[2]+t[3]:n.circle=t[2],i.push(n)}i.length&&(n.marks=i);for(let e of[`orientation`,`mode`,`size`])r(e)&&(n[e]=r(e));r(`moves`)&&(n.moves=r(`moves`)===`1`||r(`moves`)===`true`);let a=e=>r(e)&&/^-?\d+$/.test(r(e))?Number(r(e)):void 0;a(`mate`)===void 0?a(`eval`)!==void 0&&(n.eval={cp:a(`eval`)}):n.eval={mate:a(`mate`)};let o=e=>({name:r(e),rating:a(`${e}_rating`)});return(r(`players`)||[`white`,`black`,`white_rating`,`black_rating`].some(r))&&(n.players={white:o(`white`),black:o(`black`)}),n}function El(e,t){return`${t}/board?utm_source=board${wl(e)}`}var Dl=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Ol=(e,t=160)=>e.length>t?`${e.slice(0,t-1)}…`:e,kl=Gr(`<span class="rating svelte-yfn40u"> </span>`),Al=Gr(`<img alt="" class="svelte-yfn40u"/>`),jl=Gr(`<span class="ahead svelte-yfn40u"> </span>`),Ml=Gr(`<div class="player svelte-yfn40u"><span aria-hidden="true"> </span> <span class="name svelte-yfn40u"> </span> <!> <span class="taken svelte-yfn40u"></span> <!></div>`),Nl=Gr(`<div class="top svelte-yfn40u"><!></div>`),Pl=Gr(`<div role="img"><i class="svelte-yfn40u"></i> <b> </b></div>`),Fl=qr(`<g pointer-events="none"><circle r="0.2" stroke-width="0.025"></circle><text text-anchor="middle" dominant-baseline="central" font-size="0.24" font-weight="700" fill="#fff"> </text></g>`),Il=Gr(`<div class="bottom svelte-yfn40u"><!></div>`),Ll=Gr(`<li class="no svelte-yfn40u" aria-hidden="true"> </li>`),Rl=Gr(`<li class="gap svelte-yfn40u" aria-hidden="true">…</li>`),zl=Gr(`<span class="glyph svelte-yfn40u"> </span>`),Bl=Gr(`<!> <!> <li class="svelte-yfn40u"><button type="button" class="svelte-yfn40u"> <!></button></li>`,1),Vl=Gr(`<li class="empty svelte-yfn40u">No moves yet.</li>`),Hl=Gr(`<ol class="moves svelte-yfn40u" aria-label="Moves"></ol>`),Ul=Gr(`<p class="comment svelte-yfn40u"> </p>`),Wl=Gr(`<div class="side svelte-yfn40u"><!> <!></div>`),Gl=Gr(`<p class="ended svelte-yfn40u" role="status"> </p>`),Kl=Gr(`<button type="button" class="tool svelte-yfn40u" title="Back a move" aria-label="Back a move"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="M10 3 5 8l5 5"></path></svg></button> <button type="button" class="tool svelte-yfn40u" title="Forward a move" aria-label="Forward a move"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="m6 3 5 5-5 5"></path></svg></button>`,1),ql=Gr(`<button type="button" class="chip svelte-yfn40u"></button>`),Jl=Gr(`<div class="foot svelte-yfn40u"><!> <span class="tools svelte-yfn40u"><button type="button" class="tool svelte-yfn40u" title="Flip the board" aria-label="Flip the board"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="M5 2v11M2 10l3 3 3-3M11 14V3M8 6l3-3 3 3"></path></svg></button> <!> <button type="button" class="tool svelte-yfn40u" title="Pen: draw with a tap or a drag" aria-label="Pen"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="M3 13l1-3.5L11 2.5 13.5 5 6.5 12zM9.5 4l2.5 2.5"></path></svg></button> <!></span> <a class="link svelte-yfn40u" target="_blank" rel="noopener"><img alt="" width="16" height="16" class="svelte-yfn40u"/><span>Board by <b class="svelte-yfn40u"> </b></span></a></div>`),Yl=Gr(`<div class="sr-only" aria-live="polite" data-testid="board-step"> </div>`),Xl=Gr(`<div class="the-board svelte-yfn40u"><div class="grid svelte-yfn40u"><!> <div class="row svelte-yfn40u"><!> <div class="box svelte-yfn40u"><!></div></div> <!> <!> <!></div> <!></div>`),Zl={hash:`svelte-yfn40u`,code:`.the-board.svelte-yfn40u {container-type:inline-size;width:100%;max-width:560px;margin-inline:auto;color:var(--ink);font:14px/1.4 var(--board-font, system-ui, -apple-system, 'Segoe UI', sans-serif);}.the-board[data-moves][data-size='full'].svelte-yfn40u {max-width:742px;}
|
|
18
|
+
/* The list's columns make room for a chip after a long move. */.the-board[data-moves][data-verdicts][data-size='full'].svelte-yfn40u {max-width:768px;}.the-board[data-size='phone'].svelte-yfn40u {max-width:360px;}.the-board[data-size='embed'].svelte-yfn40u {max-width:240px;}.the-board[data-size='thumb'].svelte-yfn40u {max-width:160px;}.grid.svelte-yfn40u {display:grid;grid-template-columns:minmax(0, 1fr);grid-template-areas:'top' 'row' 'bottom' 'moves' 'foot';gap:8px;}.top.svelte-yfn40u {grid-area:top;}.row.svelte-yfn40u {grid-area:row;display:flex;gap:8px;align-items:stretch;}.bottom.svelte-yfn40u {grid-area:bottom;}.foot.svelte-yfn40u {grid-area:foot;}.side.svelte-yfn40u {grid-area:moves;display:flex;flex-direction:column;gap:8px;min-width:0;}
|
|
19
|
+
@container (min-width: 600px) {.the-board[data-moves][data-size='full'].svelte-yfn40u .grid:where(.svelte-yfn40u) {grid-template-columns:minmax(0, 1fr) 170px;grid-template-areas:'top moves' 'row moves' 'bottom moves' 'foot moves';column-gap:12px;}.the-board[data-moves][data-verdicts][data-size='full'].svelte-yfn40u .grid:where(.svelte-yfn40u) {grid-template-columns:minmax(0, 1fr) 196px;}.the-board[data-moves][data-size='full'].svelte-yfn40u .side:where(.svelte-yfn40u) {height:0;min-height:100%;}.the-board[data-moves][data-size='full'].svelte-yfn40u .moves:where(.svelte-yfn40u) {flex:1;min-height:0;display:grid;grid-template-columns:26px 1fr 1fr;align-content:start;overflow:auto;}.the-board[data-moves][data-size='full'].svelte-yfn40u .comment:where(.svelte-yfn40u) {max-height:45%;overflow:auto;}
|
|
20
|
+
}.box.svelte-yfn40u {flex:1;min-width:0;position:relative;}.eval.svelte-yfn40u {position:relative;width:32px;flex:none;overflow:hidden;border-radius:3px;background:#2b2622;box-shadow:var(--board-shadow);}.eval.svelte-yfn40u i:where(.svelte-yfn40u) {position:absolute;inset:auto 0 0 0;background:#f4efe6;transition:height 300ms ease;}.eval.flip.svelte-yfn40u i:where(.svelte-yfn40u) {inset:0 0 auto 0;}.eval.svelte-yfn40u b:where(.svelte-yfn40u) {position:absolute;left:0;right:0;bottom:5px;text-align:center;font:600 12px/1 var(--board-mono, ui-monospace, Menlo, monospace);letter-spacing:-0.05em;color:#f4efe6;}.eval.svelte-yfn40u b.dark:where(.svelte-yfn40u) {color:#2b2622;}.eval.svelte-yfn40u b.top:where(.svelte-yfn40u) {top:5px;bottom:auto;}
|
|
21
|
+
@media (prefers-reduced-motion: reduce) {.eval.svelte-yfn40u i:where(.svelte-yfn40u) {transition:none;}
|
|
22
|
+
}.player.svelte-yfn40u {display:flex;align-items:center;gap:8px;min-height:22px;font-size:13px;}.avatar.svelte-yfn40u {display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:5px;font-size:11px;font-weight:600;}.avatar.w.svelte-yfn40u {background:#f4efe6;color:#2b2622;border:1px solid var(--line);}.avatar.b.svelte-yfn40u {background:#2b2622;color:#f4efe6;}.name.svelte-yfn40u {font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.rating.svelte-yfn40u,
|
|
23
|
+
.ahead.svelte-yfn40u {color:var(--ink-3);font-size:12px;}.taken.svelte-yfn40u {display:flex;align-items:center;margin-left:4px;}.taken.svelte-yfn40u img:where(.svelte-yfn40u) {width:15px;height:15px;margin-right:-5px;}.moves.svelte-yfn40u {list-style:none;margin:0;padding:4px;display:flex;align-items:center;gap:2px;overflow-x:auto;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:8px;font:12.5px/1.2 var(--board-mono, ui-monospace, Menlo, monospace);}.moves.svelte-yfn40u li:where(.svelte-yfn40u) {display:contents;}.moves.svelte-yfn40u .no:where(.svelte-yfn40u),
|
|
24
|
+
.moves.svelte-yfn40u .gap:where(.svelte-yfn40u) {display:block;color:var(--ink-3);padding:4px 2px 4px 6px;text-align:right;}.moves.svelte-yfn40u button:where(.svelte-yfn40u) {border:0;background:none;color:inherit;font:inherit;text-align:left;white-space:nowrap;padding:4px 6px;border-radius:4px;cursor:pointer;}.moves.svelte-yfn40u button:where(.svelte-yfn40u):hover {background:var(--paper-2);}.moves.svelte-yfn40u button[aria-current='true']:where(.svelte-yfn40u) {background:var(--ink);color:var(--surface);}.glyph.svelte-yfn40u {display:inline-block;margin-left:3px;padding:0 3px;border-radius:3px;color:#fff;font-size:11px;font-weight:700;line-height:15px;vertical-align:top;}.moves.svelte-yfn40u .empty:where(.svelte-yfn40u) {display:block;grid-column:1 / -1;padding:4px 6px;color:var(--ink-3);font-family:var(--board-font, system-ui, sans-serif);}.comment.svelte-yfn40u {margin:0;padding:6px 10px;background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--ink-2);font-size:13px;white-space:pre-line;overflow-wrap:anywhere;}.foot.svelte-yfn40u {display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;}.ended.svelte-yfn40u {flex-basis:100%;margin:0;font-weight:600;}.tools.svelte-yfn40u {display:flex;align-items:center;gap:4px;flex-wrap:wrap;}.tool.svelte-yfn40u {display:inline-grid;place-items:center;width:30px;height:28px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer;}.tool.svelte-yfn40u svg:where(.svelte-yfn40u) {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}.tool[aria-pressed='true'].svelte-yfn40u {background:var(--ink);color:var(--surface);border-color:var(--ink);}.tool.svelte-yfn40u:disabled {opacity:0.4;cursor:default;}.tool.svelte-yfn40u:focus-visible,
|
|
25
|
+
.chip.svelte-yfn40u:focus-visible,
|
|
26
|
+
.moves.svelte-yfn40u button:where(.svelte-yfn40u):focus-visible,
|
|
27
|
+
.link.svelte-yfn40u:focus-visible {outline:2px solid var(--ring);outline-offset:2px;}.chip.svelte-yfn40u {width:18px;height:18px;padding:0;border-radius:50%;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--line);cursor:pointer;}.chip[aria-pressed='true'].svelte-yfn40u {box-shadow:0 0 0 2px var(--ink);}.link.svelte-yfn40u {display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:var(--ink-3);font-size:12px;text-decoration:none;white-space:nowrap;}.link.svelte-yfn40u img:where(.svelte-yfn40u) {width:16px;height:16px;border-radius:22%;}.link.svelte-yfn40u b:where(.svelte-yfn40u) {color:var(--ink);font:600 13px var(--board-display, Georgia, 'Times New Roman', serif);letter-spacing:-0.01em;}.link.svelte-yfn40u:hover b:where(.svelte-yfn40u) {text-decoration:underline;}[data-size='embed'].svelte-yfn40u .link:where(.svelte-yfn40u) {font-size:10.5px;}[data-size='embed'].svelte-yfn40u .link:where(.svelte-yfn40u) b:where(.svelte-yfn40u) {font-size:11.5px;}`};function Ql(e,t){We(t,!0),sa(e,Zl);let n=(e,n=p)=>{let r=M(()=>K(m)[n()]);var i=Ml(),a=V(i),o=wn(a,!0),s=H(a,2),c=wn(s,!0),l=H(s,2),u=e=>{var t=kl(),r=wn(t,!0);U(e=>Ei(r,e),[()=>ae(n())]),q(e,t)},d=M(()=>ae(n())!==void 0);Y(l,e=>{K(d)&&e(u)});var f=H(l,2);Wi(f,21,()=>K(r).captured,Bi,(e,r)=>{var i=Al();U(e=>X(i,`src`,e),[()=>t.piece((n()===`w`?`b`:`w`)+K(r).toUpperCase())]),q(e,i)}),O(f);var h=H(f,2),g=e=>{var t=jl(),n=wn(t);U(()=>Ei(n,`+${K(r).ahead??``}`)),q(e,t)};Y(h,e=>{K(r).ahead&&e(g)}),O(i),U((e,t)=>{X(i,`data-player`,n()),pa(a,1,`avatar ${n()??``}`,`svelte-yfn40u`),Ei(o,e),Ei(c,t),X(f,`aria-label`,K(r).captured.length?`took ${K(r).captured.length}`:void 0)},[()=>ie(n()).slice(0,1),()=>ie(n())]),q(e,i)},r=[`green`,`red`,`blue`,`yellow`],i=M(()=>t.model.data),a=M(()=>t.model.state),o=M(()=>t.model.fen),s=M(()=>K(i).orientation===`black`),c=M(()=>K(i).size),l=M(()=>K(c)===`full`||K(c)===`phone`),u=M(()=>K(i).mode!==`view`),d=M(()=>K(i).game.line.length),f=M(()=>K(i).mode===`play-white`?`w`:K(i).mode===`play-black`?`b`:null),m=M(()=>K(i).players&&K(l)?Zc(K(i).game.start,K(o)):null),h=M(()=>!K(u)&&K(d)>0&&K(c)!==`thumb`),g=M(()=>Object.values(K(i).annotations).some(e=>e.glyph)),_=M(()=>K(i).annotations[K(i).ply]),v=M(()=>K(_)?.glyph?mc[K(_).glyph]:null),y=M(()=>K(_)?.glyph&&K(a).lastMove?{...cc(K(a).lastMove.slice(2,4),K(s)),square:K(a).lastMove.slice(2,4),glyph:K(_).glyph}:null),b=M(()=>K(l)?K(_)?.comment:void 0),x=M(()=>[K(i).ply?K(i).game.line[K(i).ply-1].san:`The start`,K(v)].filter(Boolean).join(`, `)+(K(_)?.comment?`. ${K(_).comment}`:``)),S=M(()=>K(a).outcome?fl(K(a).outcome):null),ee=z(null),te=z(!1),ne=z(void 0);In(()=>{K(i).ply;let e=K(ne)?.querySelector(`[aria-current="true"]`);K(ne)&&e&&(K(ne).scrollTop=e.offsetTop-K(ne).offsetTop-K(ne).clientHeight/2,K(ne).scrollLeft=e.offsetLeft-K(ne).offsetLeft-K(ne).clientWidth/2)});function re(e){K(u)&&e.target.closest(`svg`)||(e.key===`ArrowLeft`?t.model.step(K(i).ply-1):e.key===`ArrowRight`&&t.model.step(K(i).ply+1))}let ie=e=>K(i).players?.[e===`w`?`white`:`black`].name??(e===`w`?`White`:`Black`),ae=e=>K(i).players?.[e===`w`?`white`:`black`].rating,oe=M(()=>K(i).game.start.split(` `)[1]===`b`),se=M(()=>Number(K(i).game.start.split(` `)[5])||1),ce=e=>{let t=e+ +!!K(oe);return{black:t%2==1,no:K(se)+Math.floor(t/2)}};var le=Xl(),C=V(le),w=V(C),ue=e=>{var t=Nl(),r=V(t);n(r,()=>K(s)?`w`:`b`),O(t),q(e,t)};Y(w,e=>{K(m)&&e(ue)});var de=H(w,2),fe=V(de),pe=e=>{let t=M(()=>$c(K(i).eval)),n=M(()=>K(t)>=50);var r=Pl();let a;var o=V(r);let c;var l=H(o,2);let u;var d=wn(l,!0);O(r),U((e,i,f)=>{a=pa(r,1,`eval svelte-yfn40u`,null,a,{flip:K(s)}),X(r,`aria-label`,`Evaluation ${e??``}`),X(r,`data-eval`,i),c=ha(o,``,c,{height:`${K(t)??``}%`}),u=pa(l,1,`svelte-yfn40u`,null,u,{dark:K(n),top:K(n)===K(s)}),Ei(d,f)},[()=>Qc(K(i).eval),()=>Qc(K(i).eval),()=>Qc(K(i).eval)]),q(e,r)};Y(fe,e=>{K(i).eval&&K(c)!==`thumb`&&e(pe)});var me=H(fe,2),he=V(me);{let e=e=>{var t=Jr(),n=Cn(t),r=e=>{var t=Fl(),n=V(t),r=H(n),i=wn(r,!0);O(t),U(()=>{X(t,`data-badge`,K(y).square),X(n,`cx`,K(y).x+.78),X(n,`cy`,K(y).y+.22),X(n,`fill`,pc[K(y).glyph]),X(n,`stroke`,hc),X(r,`x`,K(y).x+.78),X(r,`y`,K(y).y+.225),Ei(i,K(y).glyph)}),q(e,t)};Y(n,e=>{K(y)&&e(r)}),q(e,t)},n=M(()=>K(v)?`${t.name} board. Last move: ${K(v)}`:`${t.name} board`),r=M(()=>t.model.canPremove()?K(f):null),l=M(()=>K(c)!==`thumb`),d=M(()=>K(te)?K(ee):null);Jc(he,{get fen(){return K(o)},get flip(){return K(s)},rulers:!1,corners:!0,check:!0,get hints(){return K(u)},get playable(){return K(u)},get focusable(){return K(h)},get label(){return K(n)},get marks(){return K(i).marks},get lastMove(){return K(a).lastMove},get piece(){return t.piece},onplay:e=>t.model.personMove(e.from,e.to,e.promotion),mayMove:e=>t.model.canMove(e),get premoveSide(){return K(r)},get premove(){return t.model.premove},onpremove:e=>e?t.model.setPremove(e.from,e.to):t.model.cancelPremove(),promotion:`choose`,get draw(){return K(l)},get pen(){return K(d)},ondraw:e=>t.model.draw(e),onclearmarks:()=>t.model.clearOwn(),overlay:e,$$slots:{overlay:!0}})}O(me),O(de);var ge=H(de,2),_e=e=>{var t=Il(),r=V(t);n(r,()=>K(s)?`b`:`w`),O(t),q(e,t)};Y(ge,e=>{K(m)&&e(_e)});var ve=H(ge,2),ye=e=>{var n=Wl(),r=V(n),a=e=>{var n=Hl();Wi(n,21,()=>K(i).game.line,Bi,(e,n,r)=>{let a=M(()=>ce(r)),o=M(()=>K(i).annotations[r+1]?.glyph);var s=Bl(),c=Cn(s),l=e=>{var t=Ll(),n=wn(t);U(()=>Ei(n,`${K(a).no??``}.`)),q(e,t)};Y(c,e=>{K(a).black&&r!==0||e(l)});var u=H(c,2),d=e=>{q(e,Rl())};Y(u,e=>{K(a).black&&r===0&&e(d)});var f=H(u,2),p=V(f),m=V(p,!0),h=H(m),g=e=>{var t=zl();let n;var r=wn(t,!0);U(()=>{X(t,`title`,mc[K(o)]),n=ha(t,``,n,{background:pc[K(o)]}),Ei(r,K(o))}),q(e,t)};Y(h,e=>{K(o)&&e(g)}),O(p),O(f),U(()=>{X(p,`aria-current`,K(i).ply===r+1),X(p,`aria-label`,K(o)?`${K(n).san}, ${mc[K(o)]}`:void 0),Ei(m,K(n).san)}),Ir(`click`,p,()=>t.model.step(r+1)),q(e,s)},e=>{q(e,Vl())}),O(n),Aa(n,e=>B(ne,e),()=>K(ne)),q(e,n)};Y(r,e=>{K(i).moves&&K(l)&&e(a)});var o=H(r,2),s=e=>{var t=Ul(),n=wn(t,!0);U(()=>Ei(n,K(b))),q(e,t)};Y(o,e=>{K(b)&&e(s)}),O(n),q(e,n)};Y(ve,e=>{(K(i).moves&&K(l)||K(b))&&e(ye)});var T=H(ve,2),be=e=>{var n=Jl(),o=V(n),s=e=>{var t=Gl(),n=wn(t,!0);U(()=>Ei(n,K(S))),q(e,t)};Y(o,e=>{K(S)&&e(s)});var l=H(o,2),u=V(l),f=H(u,2),p=e=>{var n=Kl(),r=Cn(n),a=H(r,2);U(()=>{r.disabled=K(i).ply===0,a.disabled=K(i).ply>=K(d)}),Ir(`click`,r,()=>t.model.step(K(i).ply-1)),Ir(`click`,a,()=>t.model.step(K(i).ply+1)),q(e,n)};Y(f,e=>{K(c)!==`embed`&&(K(d)||K(i).game.pgn)&&e(p)});var m=H(f,2),h=H(m,2),g=e=>{var t=Jr();Wi(Cn(t),16,()=>r,e=>e,(e,t)=>{var n=ql();let r;U(()=>{X(n,`title`,t),X(n,`aria-label`,`Pen ${t??``}`),X(n,`aria-pressed`,K(ee)===t),r=ha(n,``,r,{background:fc[t]})}),Ir(`click`,n,()=>B(ee,t,!0)),q(e,n)}),q(e,t)};Y(h,e=>{K(te)&&e(g)}),O(l);var _=H(l,2),v=V(_),y=H(v),b=wn(H(V(y)),!0);O(y),O(_),O(n),U(e=>{X(m,`aria-pressed`,K(te)),X(_,`href`,e),X(v,`src`,t.tile),Ei(b,t.name)},[()=>El(K(a),t.site)]),Ir(`click`,u,()=>t.model.flip()),Ir(`click`,m,()=>(B(te,!K(te)),B(ee,K(ee)??`green`))),q(e,n)};Y(T,e=>{K(c)!==`thumb`&&e(be)}),O(C);var xe=H(C,2),Se=e=>{var t=Yl(),n=wn(t,!0);U(()=>Ei(n,K(x))),q(e,t)};Y(xe,e=>{K(h)&&e(Se)}),O(le),U(()=>{X(le,`data-size`,K(c)),X(le,`data-moves`,K(i).moves&&K(l)?``:void 0),X(le,`data-verdicts`,K(g)?``:void 0)}),Ir(`keydown`,le,re),q(e,le),Ge()}Lr([`keydown`,`click`]);var $l=new WeakMap,eu=new WeakMap,tu=class{get data(){return K(L($l,this))}set data(e){B(L($l,this),e)}get premove(){return K(L(eu,this))}set premove(e){B(L(eu,this),e)}constructor(e){P(this,$l,z(al)),P(this,eu,z(null)),y(this,`listeners`,new Map),y(this,`run`,0),e!==void 0&&(this.data=ml(al,e,{trusted:!0}).data)}get state(){return pl(this.data)}get fen(){return ll(this.data)}get turn(){return new Ws(this.fen).turn()}on(e,t){let n=this.listeners.get(e);return n||this.listeners.set(e,n=new Set),n.add(t),()=>n.delete(t)}emit(e,t){for(let n of this.listeners.get(e)??[])n(t)}set(e){this.stop();let t=this.data,{data:n,errors:r}=ml(this.data,e);this.data=n,(n.game!==t.game||n.ply!==t.ply)&&(this.premove=null);for(let e of r)this.emit(`error`,e);return r.length===0}play(e){return this.stop(),this.advance(e)!==null}async animate(e,t=650){this.stop();let n=(Array.isArray(e)?e.map(String):String(e).split(/\s+/)).map(e=>e.trim()).filter(e=>e&&!/^\d+\.+$/.test(e)),r=new Ws(this.fen);for(let[e,t]of n.entries())if(!ru(r,t))return this.emit(`error`,{code:`illegal_move`,message:`“${t}” isn’t a legal move${e?` after ${n.slice(0,e).join(` `)}`:` here`}.`}),!1;let i=this.run;for(let[e,r]of n.entries()){if(e&&await new Promise(e=>setTimeout(e,t)),i!==this.run)return!1;this.advance(r)}return!0}clear(){this.data={...this.data,marks:this.data.marks.filter(e=>e.author===`person`)}}stop(){this.run++}advance(e,t=`agent`){let n=ru(new Ws(this.fen),e);if(!n)return t===`agent`&&this.emit(`error`,{code:`illegal_move`,message:`“${e}” isn’t a legal move here.`}),null;let r={san:n.san,uci:n.lan,from:n.from,to:n.to,fen:n.after},{game:i,ply:a,annotations:o}=this.data,s=Object.fromEntries(Object.entries(o).filter(([e])=>Number(e)<=a));return this.data={...this.data,game:{...i,line:[...i.line.slice(0,a),r]},ply:a+1,lastMove:null,annotations:s},t===`agent`&&this.playPremove(),r}canMove(e){let{mode:t,ply:n,game:r}=this.data;return t===`play-both`||n===r.line.length&&t===(e===`w`?`play-white`:`play-black`)&&!dl(this.data)}canPremove(){let{mode:e,ply:t,game:n}=this.data;return e!==`play-white`&&e!==`play-black`||t!==n.line.length||dl(this.data)?!1:this.turn!==(e===`play-white`?`w`:`b`)}personMove(e,t,n){if(!this.canMove(this.turn))return!1;this.stop();let r=this.advance(`${e}${t}${n??``}`,`person`);return r?(this.emit(`move`,{uci:r.uci,san:r.san,fen:r.fen,ply:this.data.ply}),!0):!1}setPremove(e,t){this.canPremove()&&(this.premove={from:e,to:t})}cancelPremove(){this.premove=null}playPremove(){let e=this.premove;if(!e||(this.premove=null,!this.canMove(this.turn)))return;let t=new Ws(this.fen).moves({square:e.from,verbose:!0}).some(t=>t.to===e.to&&t.promotion)?`q`:``;this.personMove(e.from,e.to,t)}draw(e){let t={...e,author:`person`},n=e=>e.author===`person`&&nu(e)===nu(t),r=this.data.marks.find(n),i=this.data.marks.filter(e=>!n(e));this.data={...this.data,marks:r&&r.color===t.color?i:[...i,t]},this.emit(`marks`,{marks:this.personMarks()})}clearOwn(){this.data.marks.some(e=>e.author===`person`)&&(this.data={...this.data,marks:this.data.marks.filter(e=>e.author!==`person`)},this.emit(`marks`,{marks:[]}))}step(e){let t=Math.max(0,Math.min(this.data.game.line.length,e));t!==this.data.ply&&(this.stop(),this.premove=null,this.data={...this.data,ply:t,lastMove:null},this.emit(`ply`,{ply:t,fen:this.fen}))}flip(){let e=this.data.orientation===`white`?`black`:`white`;this.data={...this.data,orientation:e},this.emit(`flip`,{orientation:e})}personMarks(){return this.data.marks.filter(e=>e.author===`person`).map(e=>({...e}))}},nu=e=>`arrow`in e?`a${e.arrow}`:`circle`in e?`c${e.circle}`:`s${e.square}`;function ru(e,t){let n=/^([a-h][1-8])([a-h][1-8])([qrbn])?$/.exec(t.trim());try{return n?e.move({from:n[1],to:n[2],promotion:n[3]??`q`}):e.move(t.trim())}catch{return null}}var iu=`:host{--board-light:#eed8b2;--board-dark:#bd8d61;--board-coord-on-light:#71553a;--board-coord-on-dark:#eed8b2;--ink:#27211b;--ink-2:#5a5148;--ink-3:#776c61;--surface:#fdfbf7;--paper-2:#efe7da;--line:#e3d9c9;--brand:#e77412;--ring:#a34d00;--board-shadow:0 1px 2px #3c230f1f, 0 10px 26px -10px #3c230f59;--board-dim:1;-webkit-tap-highlight-color:transparent;display:block}@supports (color:color(display-p3 0 0 0)){:host{--brand:color(display-p3 .847474 .478147 .195507);--ring:color(display-p3 .608805 .311627 .0551691)}}@supports (color:lab(0% 0 0)){:host{--brand:lab(61.8668% 42.132 66.3463);--ring:lab(43.4195% 36.4769 62.7195)}}@media (prefers-color-scheme:dark){:host(:not([data-light])){--ink:#f1e9de;--ink-2:#c9bdaf;--ink-3:#9d9184;--surface:#28221d;--paper-2:#231e1a;--line:#3b332c;--ring:#f4a25c;--board-shadow:0 1px 2px #0006, 0 10px 26px -10px #000000b3;--board-dim:.8}@supports (color:color(display-p3 0 0 0)){:host(:not([data-light])){--ring:color(display-p3 .909664 .650254 .407514)}}@supports (color:lab(0% 0 0)){:host(:not([data-light])){--ring:lab(74.0027% 26.297 48.9969)}}}:host([hidden]){display:none}*{box-sizing:border-box}svg[data-slot=board]{width:100%;height:auto;box-shadow:var(--board-shadow);touch-action:manipulation;-webkit-user-select:none;user-select:none;font-family:var(--board-font,system-ui, -apple-system, "Segoe UI", sans-serif);border-radius:4px;display:block}svg[data-slot=board]:focus-visible{outline:2px solid var(--ring);outline-offset:2px}[data-squares]{filter:brightness(var(--board-dim))}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`,au=[`move`,`marks`,`ply`,`flip`,`ready`,`error`],ou=[`fen`,`pgn`,`ply`,`orientation`,`last-move`,`mode`,`moves`,`players`,`size`],su={"last-move":`lastMove`},cu=new Set([`moves`,`players`]),lu=new WeakMap,uu=new WeakMap,du=class extends HTMLElement{constructor(){super(),y(this,`model`,new tu),P(this,lu,null),P(this,uu,!1);for(let e of au)this.model.on(e,t=>this.dispatchEvent(new CustomEvent(e,{detail:t})))}connectedCallback(){if(L(lu,this))return;let e=this.shadowRoot??this.attachShadow({mode:`open`});if(!e.querySelector(`style[data-board]`)){let t=document.createElement(`style`);t.dataset.board=``,t.textContent=iu,e.append(t)}I(lu,this,Di(Ql,{target:e,props:{model:this.model,...this.host}})),L(uu,this)||(I(uu,this,!0),queueMicrotask(()=>this.model.emit(`ready`,{state:this.model.state})))}disconnectedCallback(){L(lu,this)&&ji(L(lu,this)),I(lu,this,null)}attributeChangedCallback(e,t,n){n!==null&&this.model.set({[su[e]??e]:cu.has(e)?n!==`false`:n})}get state(){return this.model.state}get ready(){return L(uu,this)}set(e){return this.model.set(e)}play(e){return this.model.play(e)}animate(e){return this.model.animate(e)}clear(){this.model.clear()}on(e,t){return e===`ready`&&L(uu,this)&&queueMicrotask(()=>t({state:this.model.state})),this.model.on(e,t)}};y(du,`observedAttributes`,ou);var fu=`<?xml version="1.0" encoding="utf-8"?>
|
|
28
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
29
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
30
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
31
|
+
<style type="text/css">
|
|
32
|
+
.st0{fill:none;}
|
|
33
|
+
.st1{fill:#6D6E6E;}
|
|
34
|
+
</style>
|
|
35
|
+
<rect class="st0" width="81" height="81"/>
|
|
36
|
+
<polygon points="18.9,72 62.1,72 50.3,62.5 30.7,62.5 "/>
|
|
37
|
+
<g>
|
|
38
|
+
<path d="M41,18.9c1.5,0,2.9-0.5,4-1.3l2.8-5.2c0-0.1,0-0.2,0-0.3c0-3.7-3-6.8-6.8-6.8c-3.7,0-6.8,3-6.8,6.8c0,0.1,0,0.2,0,0.3
|
|
39
|
+
l2.8,5.2C38.2,18.4,39.6,18.9,41,18.9"/>
|
|
40
|
+
<path d="M48.4,20.4l-9.7,18.2L37,32.7l8.1-15.2c-1-0.8-2-1.5-3-2.2H39c-10,6.6-19.1,17.5-19.1,32.2l10.9,15.2h2.7h14h2.7l10.9-15.2
|
|
41
|
+
C61.1,36.1,55.6,27,48.4,20.4"/>
|
|
42
|
+
<path class="st1" d="M48.6,27.9l-7.2,13c0,0,5,1.3,7.2-1.9C50.8,35.9,50.2,28.9,48.6,27.9z"/>
|
|
43
|
+
<path class="st1" d="M31.2,55.1c-1.6-13.9,1.4-28.1,7.9-34.8l-0.5-0.7c-7.1,6.3-14,15.6-14,26.6L31.2,55.1z"/>
|
|
44
|
+
</g>
|
|
45
|
+
<polygon class="st1" points="37.9,69 37.9,63.3 35.4,63.3 28.8,69 "/>
|
|
46
|
+
<path class="st1" d="M42.4,7.9c-0.8-0.5-1.8-0.6-2.7-0.3c-1.9,0.5-3,2.5-2.5,4.4c0,0.1,0,0.1,0.1,0.2C40.3,12.4,42.8,9.3,42.4,7.9z"
|
|
47
|
+
/>
|
|
48
|
+
</svg>
|
|
49
|
+
`,pu=`<?xml version="1.0" encoding="utf-8"?>
|
|
50
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
51
|
+
<svg version="1.1" id="Layer_2_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
52
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
53
|
+
<style type="text/css">
|
|
54
|
+
.st0{fill:none;}
|
|
55
|
+
.st1{fill:#6D6E6E;}
|
|
56
|
+
</style>
|
|
57
|
+
<rect class="st0" width="81" height="81"/>
|
|
58
|
+
<g>
|
|
59
|
+
<path d="M59.7,25.6c-6.6,0-11.4,2.3-14.7,7.1l-4.5,6.4L36,32.6c-3.3-4.7-8.1-7.1-14.7-7.1c-7.7,0-15.7,5.9-15.7,15.9
|
|
60
|
+
c0,8.4,3.4,15,10.9,21.3v9.4h47.9v-9.4c7.5-6.4,10.9-13,10.9-21.3C75.4,31.5,67.4,25.6,59.7,25.6z M40.5,57.2l-4.1-6l4.1-6l4.1,6
|
|
61
|
+
L40.5,57.2z"/>
|
|
62
|
+
<polygon points="50.7,21.4 50.7,13.7 42.7,14.6 44.4,7.2 36.6,7.2 38.3,14.6 30.3,13.7 30.3,21.4 38.3,19 35.2,29 40.5,35.9
|
|
63
|
+
45.8,29 42.7,19 "/>
|
|
64
|
+
</g>
|
|
65
|
+
<g>
|
|
66
|
+
<polygon class="st1" points="40.5,19.9 37.7,28.5 40.5,31.9 "/>
|
|
67
|
+
<polygon class="st1" points="31.8,15.1 35.6,17.4 31.8,19.7 "/>
|
|
68
|
+
<polygon class="st1" points="49.2,15.1 42.8,16.3 47.5,17.4 "/>
|
|
69
|
+
<polygon class="st1" points="42.6,8.9 40.5,10.8 38.4,8.9 "/>
|
|
70
|
+
<path class="st1" d="M66.9,31.1c-2.1-1.5-4.6-2.2-7.1-2.2c-5.5,0-9.3,1.8-12,5.7l-6.2,8.8C41.6,43.3,56,30.6,66.9,31.1z"/>
|
|
71
|
+
<path class="st1" d="M29.3,30.3c-2-1-4.3-1.4-7.1-1.4c-6.1,0-12.4,4.7-12.4,12.7c0,5.1,1.5,9.5,4.8,13.6
|
|
72
|
+
C14.2,42.5,23.5,31.8,29.3,30.3z"/>
|
|
73
|
+
<path class="st1" d="M32.4,62.9c-6.1,0.3-9,0.8-11.8,1.4v4.8h11.8V62.9z"/>
|
|
74
|
+
</g>
|
|
75
|
+
</svg>
|
|
76
|
+
`,mu=`<?xml version="1.0" encoding="utf-8"?>
|
|
77
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
78
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
79
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
80
|
+
<style type="text/css">
|
|
81
|
+
.st0{fill:none;}
|
|
82
|
+
.st1{fill:#6D6E6E;}
|
|
83
|
+
</style>
|
|
84
|
+
<rect class="st0" width="81" height="81"/>
|
|
85
|
+
<path d="M19.6,72C38.2,72,67,72,67,72l-2-6.1c0,0-0.1-17-0.1-26.1c0-17.3-8.5-25.3-16-28.4c-5.6-2.3-14.6-1.8-14.6-1.8l3.3,6.5
|
|
86
|
+
L12,36.4l2,12.2l13.4,3.5l6.1-5.1c1.2,0.5,2.5,0.8,3.7,1.1v0.3C37.2,48.4,22.9,57,19.6,72z M31.4,31.3c-0.6,0.3-1.1-0.5-0.6-1
|
|
87
|
+
l7.2-6.2l2.2,3.7L31.4,31.3z"/>
|
|
88
|
+
<polygon class="st1" points="15.8,38 17.1,45.9 21.8,47 21.7,42.4 18.8,41.9 "/>
|
|
89
|
+
<path class="st1" d="M30.8,33.4l15.6-3.8l2.2-3.8c0,0,2.8,1.1,2.1,6.3s-6.8,8.3-12.1,7.6C31.7,38.8,30.8,33.4,30.8,33.4z"/>
|
|
90
|
+
<path class="st1" d="M36,67.9c5.1-16.4,16.4-13,16.8-22.4c-3.3,5.9-10.7,5.6-10.7,5.6s-11.6,5.1-15.8,16.8
|
|
91
|
+
C26.3,67.9,36,67.9,36,67.9z"/>
|
|
92
|
+
</svg>
|
|
93
|
+
`,hu=`<?xml version="1.0" encoding="utf-8"?>
|
|
94
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
95
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
96
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
97
|
+
<style type="text/css">
|
|
98
|
+
.st0{fill:none;}
|
|
99
|
+
.st1{fill:#6D6E6E;}
|
|
100
|
+
.st2{display:none;}
|
|
101
|
+
.st3{display:inline;fill:none;}
|
|
102
|
+
.st4{display:inline;fill:#FFFFFF;}
|
|
103
|
+
.st5{display:inline;fill:#CFCECF;}
|
|
104
|
+
.st6{display:inline;fill:#231F20;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;}
|
|
105
|
+
.st7{display:inline;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;}
|
|
106
|
+
.st8{display:inline;}
|
|
107
|
+
</style>
|
|
108
|
+
<rect class="st0" width="81" height="81"/>
|
|
109
|
+
<path d="M40.5,12.5c-6,0-10.7,4.8-10.7,10.7c0,3.6,1.8,6.9,4.6,8.8h12.3c2.8-1.9,4.6-5.2,4.6-8.8C51.2,17.2,46.5,12.5,40.5,12.5"/>
|
|
110
|
+
<path class="st1" d="M43.2,16.4c-1.5-0.9-3.3-1.1-5.2-0.6c-3.6,1-5.6,4.6-4.7,8.2c0,0.1,0.1,0.2,0.1,0.3C39.2,25,44,19.1,43.2,16.4z
|
|
111
|
+
"/>
|
|
112
|
+
<path d="M34.5,31.7l-0.6,7.7l-3.2,21.7L18.3,72h44.3L50.3,61.1l-4-21.7l-0.6-7.7"/>
|
|
113
|
+
<polygon class="st1" points="37.4,39.6 33.8,62.1 27.2,69.2 34.8,69.2 40,63.8 40.1,39.6 "/>
|
|
114
|
+
<polygon points="26.2,39.4 54.8,39.4 47.9,30.8 33.1,30.8 "/>
|
|
115
|
+
<polygon class="st1" points="32.1,36.9 41.1,36.9 39,32.6 35,32.6 "/>
|
|
116
|
+
<g id="Layer_2_1_" class="st2">
|
|
117
|
+
<rect class="st3" width="81" height="81"/>
|
|
118
|
+
<path class="st4" d="M34.3,33.2c-2.8-2-4.7-5.2-4.7-8.9c0-6,4.9-10.9,10.9-10.9s10.9,4.9,10.9,10.9c0,3.7-1.9,7-4.7,8.9l0.5,8.3
|
|
119
|
+
l3.4,18.7L63.3,71H17.7l12.7-10.8l3.4-18.7"/>
|
|
120
|
+
<path class="st5" d="M45,14.4C48.7,19.9,46.1,33,34.8,33c-0.2,0,12.1,0.6,13.1-0.3c1.9-1.9,3.1-4.4,3.1-7.3
|
|
121
|
+
C51.1,19.4,44.8,13.2,45,14.4z"/>
|
|
122
|
+
<polygon class="st5" points="40.5,60.8 47.8,70 62.1,70 51.2,61.1 49.8,60.2 46.9,41 40.5,41 "/>
|
|
123
|
+
<path class="st6" d="M40.5,11.7c-7,0-12.7,5.7-12.7,12.7c0,4.3,2.2,8.1,5.5,10.4h7.3c-5.7,0-10.4-4.7-10.4-10.4S34.9,14,40.6,14
|
|
124
|
+
S51,18.6,51,24.3s-4.7,10.4-10.4,10.4h7.3c3.3-2.3,5.5-6.2,5.5-10.4C53.1,17.4,47.4,11.7,40.5,11.7z"/>
|
|
125
|
+
<path class="st7" d="M48.2,42l3.2,17.6L66,72H15l14.5-12.4L32.8,42 M35,41l-3.6,19.7l-11,9.3h40.1l-10.9-9.3L46,41"/>
|
|
126
|
+
<path class="st4" d="M34.3,33.2"/>
|
|
127
|
+
<polygon class="st8" points="50.3,32.8 30.7,32.8 22.5,43.2 58.5,43.2 "/>
|
|
128
|
+
<polygon class="st4" points="27.5,41 53.5,41 48.9,35.2 32.1,35.2 "/>
|
|
129
|
+
<polygon class="st5" points="44.1,41 53.5,41 48.9,35.2 40.7,35.2 "/>
|
|
130
|
+
</g>
|
|
131
|
+
</svg>
|
|
132
|
+
`,gu=`<?xml version="1.0" encoding="utf-8"?>
|
|
133
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
134
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
135
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
136
|
+
<style type="text/css">
|
|
137
|
+
.st0{fill:none;}
|
|
138
|
+
.st1{fill:#6D6E6E;}
|
|
139
|
+
</style>
|
|
140
|
+
<rect class="st0" width="81" height="81"/>
|
|
141
|
+
<path d="M55.7,50.9l4-34.9L40.5,49.2L21.3,16l4.1,34.9L7.9,30.8L18.8,72h43.4l10.9-41.2L55.7,50.9z M40.5,66.9l-3.6-6.4l3.6-6.4
|
|
142
|
+
l3.6,6.4L40.5,66.9z"/>
|
|
143
|
+
<polygon points="40.5,11.7 34.9,35.2 40.5,44.7 46.1,35.2 "/>
|
|
144
|
+
<circle cx="40.5" cy="10.6" r="5.4"/>
|
|
145
|
+
<path class="st1" d="M41.6,7.2c-0.8-0.4-1.7-0.6-2.6-0.3c-1.8,0.5-2.9,2.4-2.4,4.2c0,0.1,0,0.1,0.1,0.2C39.6,11.6,42,8.5,41.6,7.2z"
|
|
146
|
+
/>
|
|
147
|
+
<circle cx="59.5" cy="16" r="5.4"/>
|
|
148
|
+
<path class="st1" d="M60.6,12.6c-0.8-0.4-1.7-0.6-2.6-0.3c-1.8,0.5-2.9,2.4-2.4,4.2c0,0.1,0,0.1,0.1,0.2
|
|
149
|
+
C58.6,16.9,61,13.9,60.6,12.6z"/>
|
|
150
|
+
<circle cx="21.5" cy="16" r="5.4"/>
|
|
151
|
+
<path class="st1" d="M22.6,12.6c-0.8-0.4-1.7-0.6-2.6-0.3c-1.8,0.5-2.9,2.4-2.4,4.2c0,0.1,0,0.1,0.1,0.2
|
|
152
|
+
C20.6,16.9,23,13.9,22.6,12.6z"/>
|
|
153
|
+
<circle cx="73.1" cy="31.4" r="5.4"/>
|
|
154
|
+
<path class="st1" d="M74.2,28c-0.8-0.4-1.7-0.6-2.6-0.3c-1.8,0.5-2.9,2.4-2.4,4.2c0,0.1,0,0.1,0.1,0.2C72.2,32.3,74.6,29.3,74.2,28z
|
|
155
|
+
"/>
|
|
156
|
+
<circle cx="7.9" cy="31.4" r="5.4"/>
|
|
157
|
+
<path class="st1" d="M9,28c-0.8-0.4-1.7-0.6-2.6-0.3C4.6,28.1,3.5,30,4,31.8c0,0.1,0,0.1,0.1,0.2C7,32.3,9.4,29.3,9,28z"/>
|
|
158
|
+
<polygon class="st1" points="40.5,20.9 37.4,34.3 40.5,39.6 "/>
|
|
159
|
+
<polygon class="st1" points="56.6,54.7 58.4,60.3 68,38.3 "/>
|
|
160
|
+
<polygon class="st1" points="47.9,50.5 55.9,29.3 43.6,50.1 "/>
|
|
161
|
+
<polygon class="st1" points="33.3,50.5 25,29.1 28.1,51 "/>
|
|
162
|
+
<polygon class="st1" points="23.1,58.7 12.6,40.9 20.5,67.3 "/>
|
|
163
|
+
</svg>
|
|
164
|
+
`,_u=`<?xml version="1.0" encoding="utf-8"?>
|
|
165
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
166
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
167
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
168
|
+
<style type="text/css">
|
|
169
|
+
.st0{fill:none;}
|
|
170
|
+
.st1{fill:#6D6E6E;}
|
|
171
|
+
</style>
|
|
172
|
+
<rect class="st0" width="81" height="81"/>
|
|
173
|
+
<polygon points="56.9,31.1 24.1,31.1 19.2,72 61.8,72 61.8,72 "/>
|
|
174
|
+
<rect x="14.2" y="58.5" width="52.5" height="13.5"/>
|
|
175
|
+
<path class="st1" d="M41.1,34.1c-0.1,7.2-6.6,24.4-14.2,24.4c-1.2,0-2.3,0-2.3,0l3.8-24.4H41.1z"/>
|
|
176
|
+
<rect x="18.4" y="62.3" class="st1" width="17.9" height="6.1"/>
|
|
177
|
+
<polygon points="53.4,12 53.4,18.9 46.5,18.9 46.5,12 34.5,12 34.5,18.9 27.6,18.9 27.6,12 15.6,12 15.6,23.4 24.6,32.5 56.4,32.5
|
|
178
|
+
65.4,23.4 65.4,23.4 65.4,12 "/>
|
|
179
|
+
<g>
|
|
180
|
+
<polygon class="st1" points="62.4,15 56.4,15 56.4,22.2 "/>
|
|
181
|
+
<polygon class="st1" points="43.5,15 37.5,15 37.5,22.2 "/>
|
|
182
|
+
<polygon class="st1" points="24.6,15 18.6,15 18.6,22.2 "/>
|
|
183
|
+
</g>
|
|
184
|
+
</svg>
|
|
185
|
+
`,vu=`<?xml version="1.0" encoding="utf-8"?>
|
|
186
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
187
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
188
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
189
|
+
<style type="text/css">
|
|
190
|
+
.st0{fill:none;}
|
|
191
|
+
.st1{fill:#FFFFFF;}
|
|
192
|
+
.st2{fill:#CFCECF;}
|
|
193
|
+
</style>
|
|
194
|
+
<rect class="st0" width="81" height="81"/>
|
|
195
|
+
<path class="st1" d="M61.4,71l-11.9-9.1l10.6-14.6c0-11-4.9-19.9-11.9-26.3l-1.7-0.8l-7.9,14.3l-1.5-1.6l7.8-14.7l0,0l2.7-5.1
|
|
196
|
+
c0-0.1,0-0.2,0-0.2c0-3.6-2.9-6.6-6.6-6.6c-3.6,0-6.6,2.9-6.6,6.6c0,0.1,0,0.2,0,0.2l2.3,4.4C28,24.1,20.9,34.1,20.9,47.3l10.6,14.6
|
|
197
|
+
L19.6,71H61.4z"/>
|
|
198
|
+
<polygon class="st2" points="45.6,70.7 60,70.7 49.6,61.2 42.8,61.2 "/>
|
|
199
|
+
<path class="st2" d="M50.8,25.1C54.7,42.1,36,55.8,36,55.8l7.3,4.7h7.4l10.2-13.2l-1.5-8.6l-3.6-8.3L53.2,26L50.8,25.1z"/>
|
|
200
|
+
<path class="st2" d="M44.5,8.6c0.8,2.4-3.4,4.4-3.4,4.4v5.1l3.3,0.1l3-4.3l-0.3-3.4L45,8.6H44.5z"/>
|
|
201
|
+
<path d="M65,72.2L50.9,61.6l10.2-14v-0.4c0-14.1-7.6-23.1-12.2-27.3l-2.3-2.3l2.1-3.9l0.1-0.3v-0.5c0-4.3-3.5-7.9-7.9-7.9
|
|
202
|
+
c-4.3,0-7.8,3.5-7.8,7.9v0.5l1.9,3.7c-5.9,4.6-15.5,14.6-15.5,30.1v0.4l10.2,14L16,72.2H65z M22.5,46.9c-0.3-14.6,9.3-24,15-28.2
|
|
203
|
+
l0.9-0.6L35.7,13c0-2.9,2.4-5.3,5.3-5.3c2.9,0,5.3,2.4,5.4,5.3L35.8,34.6v0.1l2.2,5.8l9.3-18.8l1.1,1c4.8,4.7,10.4,12.7,10.1,24.1
|
|
204
|
+
l-9.2,13H31.8L22.5,46.9z M32.9,62.5H48l9.8,7.3H23.2L32.9,62.5z"/>
|
|
205
|
+
<polyline points="36.2,18 41.1,18 38.4,20.1 34.6,20.1 "/>
|
|
206
|
+
</svg>
|
|
207
|
+
`,yu=`<?xml version="1.0" encoding="utf-8"?>
|
|
208
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
209
|
+
<svg version="1.1" id="Layer_2_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
210
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
211
|
+
<style type="text/css">
|
|
212
|
+
.st0{fill:#FFFFFF;}
|
|
213
|
+
.st1{fill:none;}
|
|
214
|
+
.st2{fill:#CFCECF;}
|
|
215
|
+
</style>
|
|
216
|
+
<polygon class="st0" points="31,23 31,17.5 39.6,18.6 37.8,10.8 43.2,10.8 41.4,18.6 50,17.5 50,23 41.3,20.4 44.7,33.2 40.5,39.2
|
|
217
|
+
36.3,33.2 39.7,20.4 "/>
|
|
218
|
+
<path class="st0" d="M19,69.8v-5.9c13.3-3.1,29.6-3.1,42.9,0v5.9H19z"/>
|
|
219
|
+
<path class="st0" d="M62.4,61.2L62.4,61.2c-13.7-3-30.1-3-43.6,0.1l-0.1-0.1c-7.2-6-10.5-12.1-10.5-19.8C8.2,33,14.9,28,21.4,28
|
|
220
|
+
c5.8,0,9.8,1.9,12.7,6l6.5,9.4l6.5-9.4c2.9-4.1,6.9-6,12.7-6C66.3,28,73,33,73,41.4C72.9,49.2,69.6,55.3,62.4,61.2z"/>
|
|
221
|
+
<rect class="st1" width="81" height="81"/>
|
|
222
|
+
<g>
|
|
223
|
+
<path class="st2" d="M19,61.9l-0.4-0.3c7-1.6,14.7-2.4,21.9-2.4V42.7l-6.2-8.2c0-0.1-0.1-0.1-0.2-0.2c-0.6,5.2-2.8,11.5-5.7,15.9
|
|
224
|
+
C25,55.5,19.4,59.9,18,61c0.1,0.1,0.2,1,0.3,1.1L19,61.9C19,62,19,61.9,19,61.9z"/>
|
|
225
|
+
<path class="st2" d="M46.6,59.8L63,62.5v-0.7l0.5-0.4c7.4-5.9,10.7-12,10.7-19.6c0-5.4-2.9-9.4-6.7-11.5
|
|
226
|
+
C70.5,42.9,57.9,58.6,46.6,59.8z"/>
|
|
227
|
+
<polygon class="st2" points="53.1,69.8 61.8,69.8 61.8,62.4 53.1,60.6 "/>
|
|
228
|
+
<polygon class="st2" points="50.5,16.6 48.2,20.5 41.1,20.3 49.5,23.6 50.5,23.6 "/>
|
|
229
|
+
<polygon class="st2" points="43.1,11.3 40.5,13 40.5,19.2 42.1,18.2 "/>
|
|
230
|
+
<polygon class="st2" points="41.8,21.5 41.8,33.2 40.5,40.2 45,34 "/>
|
|
231
|
+
<polygon class="st2" points="39.7,20.4 30.5,20.6 30.5,24.2 "/>
|
|
232
|
+
</g>
|
|
233
|
+
<polygon points="36.4,51.2 40.5,57.2 44.6,51.2 40.5,45.2 "/>
|
|
234
|
+
<path d="M59.7,25.6c-5.8,0-10.3,1.8-13.5,5.5l-2.1-7.8l7.8,2.4V15.2l-8,1l1.7-7.5H35.3l1.7,7.5l-8-1v10.4l7.8-2.4L34.7,31
|
|
235
|
+
c-3.2-3.7-7.7-5.5-13.5-5.5c-7.7,0-15.7,5.9-15.7,15.9c0,8.4,3.4,15,10.9,21.3v9.4h47.9v-9.4c7.5-6.4,10.9-13,10.9-21.3
|
|
236
|
+
C75.4,31.5,67.4,25.6,59.7,25.6z M31,23v-5.5l8.6,1.1l-1.8-7.8h5.4l-1.8,7.8l8.6-1.1V23l-8.7-2.6l3.4,12.8l-4.2,6l-4.2-6l3.4-12.8
|
|
237
|
+
L31,23z M19,69.8v-5.9c13.3-3.1,29.6-3.1,42.9,0v5.9H19z M62.4,61.2L62.4,61.2c-13.7-3-30.1-3-43.6,0.1l-0.1-0.1
|
|
238
|
+
c-7.2-6-10.5-12.1-10.5-19.8C8.2,33,14.9,28,21.4,28c5.8,0,9.8,1.9,12.7,6l6.5,9.4l6.5-9.4c2.9-4.1,6.9-6,12.7-6
|
|
239
|
+
C66.3,28,73,33,73,41.4C72.9,49.2,69.6,55.3,62.4,61.2z"/>
|
|
240
|
+
</svg>
|
|
241
|
+
`,bu=`<?xml version="1.0" encoding="utf-8"?>
|
|
242
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
243
|
+
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
244
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
245
|
+
<style type="text/css">
|
|
246
|
+
.st0{fill:none;}
|
|
247
|
+
.st1{fill:#FFFFFF;}
|
|
248
|
+
.st2{fill:#CFCECF;}
|
|
249
|
+
</style>
|
|
250
|
+
<rect class="st0" width="81" height="81"/>
|
|
251
|
+
<path class="st1" d="M49,45.1c-3.3,1.6-7.2,1.9-11,0.7l-0.4-0.1l-0.3,0.2c-0.1,0.1-11.9,9.9-15.7,23.7l-0.3,0.9H66L64.2,65v-0.1
|
|
252
|
+
c0-0.1-0.1-14.8-0.1-23.8c0-16.9-7.6-25.6-15-28.6c-3.7-1.4-9.2-2.5-12.4-2.5h-1.2l3.2,6.2L14.3,36.5l1,10.8l5,1.4l5.1-3.9H27
|
|
253
|
+
l-4.3,4.5l1.1,0.4l6.7,1.9l5.5-6.8c3.5,1.5,7.7,1.3,12.5-0.6c2.8-1.2,5.1-3.6,6.5-5.6C54.1,41.4,52,43.7,49,45.1z"/>
|
|
254
|
+
<path d="M39.6,22.7l-7.7,6.2c-0.5,0.5-0.6,1.3-0.2,1.9c0.3,0.4,0.7,0.6,1.1,0.6c0.2,0,0.4,0,0.6-0.1l9.1-3.6L39.6,22.7z"/>
|
|
255
|
+
<path class="st2" d="M36,70.7L57.4,71h8.5c0,0-2.1-5.2-2.1-7.2c0-8.2,0-29.9,0-35.2c0,8.4-2.9,20.8-9.7,27.6
|
|
256
|
+
C39.9,56.2,36,70.7,36,70.7z"/>
|
|
257
|
+
<path class="st2" d="M35.6,47.3l1.3-1.8l8.8,0.8l4.8-2.2l3.9-3.4l2.4-6.5c-0.8-1.3-2.5-2.8-4.7-3.5c-1.5,7.8-6.8,11.1-15.6,11.1
|
|
258
|
+
l-2.7-3.2l-5,5.4L23,48.8l7,4.5L35.6,47.3z"/>
|
|
259
|
+
<path d="M19.3,72.2h49l-2.5-7.5c0-1.9,0-15.1,0-23.6c0-6.8-0.9-23.9-16-30.1c-5.8-2.4-14.6-2.6-15-2.5L33,8.6l3.7,7.2l-24.2,20
|
|
260
|
+
l1.3,12.8l14.5,4.2c-3.5,4.5-7.2,10.7-8.8,18L19.3,72.2z M37.8,46.8c1.5,0.5,3,0.8,4.7,0.8c2.4,0,4.7-0.8,6.8-1.8
|
|
261
|
+
c4.1-2,6.8-5.6,7.3-10.1l0.2-1.4l-0.6,1.2c0,0.1-3,5.8-7.9,8c-3.9,1.6-8.4,2.4-12.4,0.4l-6.5,6.4L24.1,49l4.7-4.9h-3.7l-5,3.8
|
|
262
|
+
L16,46.7l-0.9-9.9l24.6-20.4l-2.9-5.6c2.9,0,8.3,0.9,12.1,2.4c5.7,2.3,14.5,9.6,14.5,27.9c0,9.1,0.1,23.8,0.1,23.8v0.2l1.5,4.7H22.3
|
|
263
|
+
C25.9,56.6,37,47.4,37.8,46.8z"/>
|
|
264
|
+
</svg>
|
|
265
|
+
`,xu=`<?xml version="1.0" encoding="utf-8"?>
|
|
266
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
267
|
+
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
268
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
269
|
+
<style type="text/css">
|
|
270
|
+
.st0{fill:none;}
|
|
271
|
+
.st1{fill:#FFFFFF;}
|
|
272
|
+
.st2{fill:#CFCECF;}
|
|
273
|
+
</style>
|
|
274
|
+
<rect class="st0" width="81" height="81"/>
|
|
275
|
+
<g>
|
|
276
|
+
<path class="st1" d="M29.7,37.8h21.6l-5.1-6h0.7c2.6-1.9,4.3-5.1,4.3-8.6c0-6-4.8-10.7-10.7-10.7s-10.7,4.8-10.7,10.7
|
|
277
|
+
c0,3.5,1.7,6.7,4.3,8.6h0.7L29.7,37.8z"/>
|
|
278
|
+
<polygon class="st1" points="49.4,60.5 45.1,39.8 35.1,39.8 31.6,60.5 21,69.9 60,69.9 "/>
|
|
279
|
+
</g>
|
|
280
|
+
<polygon class="st2" points="40.5,59.7 47.8,71 61.6,71 51.2,60 49.8,59.1 46.9,38.9 40.5,38.9 "/>
|
|
281
|
+
<polygon class="st2" points="44.4,38 52.5,38 47.2,31.5 41,31.5 "/>
|
|
282
|
+
<path class="st2" d="M45,13.3c3.7,5.5,1.1,17.6-10.2,17.6c-0.2,0,12.1,0.6,13.1-0.3c1.9-1.9,3.1-4.4,3.1-7.3
|
|
283
|
+
C51.1,17.3,44.8,12.1,45,13.3z"/>
|
|
284
|
+
<polygon class="st0" points="31.9,60.6 21.6,69.7 59.4,69.7 49.2,60.7 49.1,60.6 44.9,40 35.3,40 "/>
|
|
285
|
+
<polygon class="st0" points="46.1,32 34.9,32 30.2,37.9 50.8,37.9 "/>
|
|
286
|
+
<path class="st0" d="M47.5,29.5c1.6-1.7,2.5-4,2.5-6.4c0-5.3-4.2-9.5-9.5-9.5c-5.2,0-9.5,4.2-9.5,9.5c0,2.4,0.9,4.6,2.5,6.4H47.5z"
|
|
287
|
+
/>
|
|
288
|
+
<path d="M15,72.2h51L51.5,59.4l-4.2-20h8.2l-7.1-8c2.9-2.2,3.6-5.6,3.6-8.1c0-6.4-5-11.4-11.4-11.4c-6.3,0-11.4,5.1-11.4,11.4
|
|
289
|
+
c0,2.5,0.6,5.9,3.6,8.1l-7.1,8H33l-3.4,20L15,72.2z M31.4,23.3c0-5,4.1-9.1,9.1-9.1c5.1,0,9.1,4,9.1,9.1c0,2.3-0.8,4.4-2.4,6.1H33.8
|
|
290
|
+
C32.3,27.7,31.4,25.5,31.4,23.3z M35.2,31.7h10.7l4.5,5.6H30.7L35.2,31.7z M35.4,39.4L35.4,39.4h9.3h0.1l4.4,21.2v0.1l10.2,9H21.6
|
|
291
|
+
l10.2-9.1L35.4,39.4z"/>
|
|
292
|
+
</svg>
|
|
293
|
+
`,Su=`<?xml version="1.0" encoding="utf-8"?>
|
|
294
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
295
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
296
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
297
|
+
<style type="text/css">
|
|
298
|
+
.st0{fill:none;}
|
|
299
|
+
.st1{fill:#FFFFFF;}
|
|
300
|
+
.st2{fill:#CFCECF;}
|
|
301
|
+
</style>
|
|
302
|
+
<rect class="st0" width="81" height="81"/>
|
|
303
|
+
<g>
|
|
304
|
+
<circle class="st1" cx="21.9" cy="16.5" r="5.2"/>
|
|
305
|
+
<path class="st1" d="M59.1,21.8c2.9,0,5.2-2.3,5.2-5.2s-2.3-5.2-5.2-5.2s-5.2,2.3-5.2,5.2S56.2,21.8,59.1,21.8z"/>
|
|
306
|
+
<path class="st1" d="M72.1,26.4c-2.9,0-5.2,2.3-5.2,5.2c0,1.4,0.6,2.8,1.5,3.7L55.2,50.5l3.3-28.7l-2.1-0.6l-9.8,16.9l-5.1-21.7
|
|
307
|
+
h-1.1h-1.1l-5.1,21.7l-9.8-16.9l-2.1,0.6l3.3,28.7l-13-15.2c0.9-0.9,1.5-2.3,1.5-3.7c0-2.9-2.3-5.2-5.2-5.2s-5.2,2.3-5.2,5.2
|
|
308
|
+
s2.3,5.2,5.2,5.2c0.5,0,1-0.1,1.5-0.2L19.5,71h42.1l9.1-34.4c0.5,0.1,1,0.2,1.5,0.2c2.9,0,5.2-2.3,5.2-5.2S75,26.4,72.1,26.4z"/>
|
|
309
|
+
<circle class="st1" cx="40.5" cy="11.3" r="5.2"/>
|
|
310
|
+
</g>
|
|
311
|
+
<g>
|
|
312
|
+
<path class="st2" d="M48.4,33.6"/>
|
|
313
|
+
<path class="st2" d="M34.5,33.6"/>
|
|
314
|
+
<polygon class="st2" points="41.4,20.3 46.7,38.2 41.4,45.5 "/>
|
|
315
|
+
<polygon class="st2" points="27.1,53.6 23.6,60.4 13.9,38.3 "/>
|
|
316
|
+
<polygon class="st2" points="34,50.5 24.8,22.8 40.5,50.9 "/>
|
|
317
|
+
<polygon class="st2" points="48.2,50.5 57.5,25.8 53.9,53.6 "/>
|
|
318
|
+
<polygon class="st2" points="52.9,70.4 68.5,36.7 70,37 60.7,70.4 "/>
|
|
319
|
+
</g>
|
|
320
|
+
<path class="st2" d="M73.3,36.7c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
321
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C67.3,35.1,71.8,37.1,73.3,36.7z"/>
|
|
322
|
+
<path class="st2" d="M60,21.3c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
323
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C54,19.7,58.5,21.7,60,21.3z"/>
|
|
324
|
+
<path class="st2" d="M10.1,36.7c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
325
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C4.1,35.1,8.6,37.1,10.1,36.7z"/>
|
|
326
|
+
<path class="st2" d="M23.1,21.3c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
327
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C17.1,19.7,21.6,21.7,23.1,21.3z"/>
|
|
328
|
+
<path class="st2" d="M41.6,16.1c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
329
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C35.6,14.6,40.1,16.5,41.6,16.1z"/>
|
|
330
|
+
<g>
|
|
331
|
+
<circle class="st1" cx="21.9" cy="16.5" r="5.2"/>
|
|
332
|
+
<path class="st1" d="M59.1,21.8c2.9,0,5.2-2.3,5.2-5.2s-2.3-5.2-5.2-5.2s-5.2,2.3-5.2,5.2S56.2,21.8,59.1,21.8z"/>
|
|
333
|
+
<path class="st1" d="M72.1,26.4c-2.9,0-5.2,2.3-5.2,5.2c0,1.4,0.6,2.8,1.5,3.7L55.2,50.5l3.3-28.7l-2.1-0.6l-9.8,16.9l-5.1-21.7
|
|
334
|
+
h-1.1h-1.1l-5.1,21.7l-9.8-16.9l-2.1,0.6l3.3,28.7l-13-15.2c0.9-0.9,1.5-2.3,1.5-3.7c0-2.9-2.3-5.2-5.2-5.2s-5.2,2.3-5.2,5.2
|
|
335
|
+
s2.3,5.2,5.2,5.2c0.5,0,1-0.1,1.5-0.2L19.5,71h42.1l9.1-34.4c0.5,0.1,1,0.2,1.5,0.2c2.9,0,5.2-2.3,5.2-5.2S75,26.4,72.1,26.4z"/>
|
|
336
|
+
<circle class="st1" cx="40.5" cy="11.3" r="5.2"/>
|
|
337
|
+
</g>
|
|
338
|
+
<g>
|
|
339
|
+
<path class="st2" d="M48.4,33.6"/>
|
|
340
|
+
<path class="st2" d="M34.5,33.6"/>
|
|
341
|
+
<polygon class="st2" points="41.4,20.3 46.7,38.2 41.4,45.5 "/>
|
|
342
|
+
<polygon class="st2" points="27.1,53.6 23.6,60.4 13.9,38.3 "/>
|
|
343
|
+
<polygon class="st2" points="34,50.5 24.8,22.8 40.5,50.9 "/>
|
|
344
|
+
<polygon class="st2" points="48.2,50.5 57.5,25.8 53.9,53.6 "/>
|
|
345
|
+
<path class="st2" d="M42.1,70.4C62,65.7,68.5,36.7,68.5,36.7L70,37l-9.3,33.4C60.7,70.4,52.8,70.4,42.1,70.4z"/>
|
|
346
|
+
</g>
|
|
347
|
+
<path class="st2" d="M73.3,36.7c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
348
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C67.3,35.1,71.8,37.1,73.3,36.7z"/>
|
|
349
|
+
<path class="st2" d="M60,21.3c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
350
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C54,19.7,58.5,21.7,60,21.3z"/>
|
|
351
|
+
<path class="st2" d="M10.1,36.7c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
352
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C4.1,35.1,8.6,37.1,10.1,36.7z"/>
|
|
353
|
+
<path class="st2" d="M23.1,21.3c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
354
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C17.1,19.7,21.6,21.7,23.1,21.3z"/>
|
|
355
|
+
<path class="st2" d="M41.6,16.1c3.4-0.9,3.9-3.4,4-6.7c0-0.6-0.9-1.8-1.3-1.8c-0.4,0.1-0.8,0.1-1.2,0.3c0.3,2.5-1.3,5-3.8,5.7
|
|
356
|
+
c-1.1,0.3-2.1,0.2-3.1-0.1C35.6,14.6,40.1,16.5,41.6,16.1z"/>
|
|
357
|
+
<path d="M72.1,25.1c-3.6,0-6.4,2.9-6.4,6.5c0,1.3,0.4,2.6,1.1,3.7l-10.5,13l3.4-25.4c3.3-0.3,5.9-3.1,5.9-6.4c0-3.6-2.9-6.5-6.5-6.5
|
|
358
|
+
s-6.5,2.9-6.5,6.5c0,1.9,0.8,3.7,2.3,5l-7.8,13.4L43,17.3c2.3-1,3.9-3.4,3.9-6c0-3.6-2.9-6.4-6.4-6.4c-3.6,0-6.5,2.9-6.5,6.4
|
|
359
|
+
c0,2.6,1.5,4.9,3.9,6l-4.1,17.6L26,21.5c1.5-1.2,2.3-3.1,2.3-5c0-3.6-2.9-6.5-6.5-6.5s-6.5,2.9-6.5,6.5c0,3.3,2.6,6.1,5.9,6.4
|
|
360
|
+
l3.4,25.4l-10.4-13c0.7-1,1.1-2.3,1.1-3.7c0-3.6-2.9-6.5-6.5-6.5S2.4,28,2.4,31.6S5.3,38,8.8,38h0.5l9,34v0.2h44l9-34.2h0.5
|
|
361
|
+
c3.6,0,6.4-2.9,6.4-6.4C78.3,28,75.6,25.1,72.1,25.1z M13.1,31.6c0,2.3-1.9,4.1-4.2,4.1s-4.1-1.8-4.1-4.1s1.9-4.2,4.1-4.2
|
|
362
|
+
C11.2,27.4,13.1,29.3,13.1,31.6z M21.9,20.8c-2.3,0-4.1-1.9-4.1-4.2s1.9-4.2,4.1-4.2c2.3,0,4.2,1.9,4.2,4.2
|
|
363
|
+
C26.1,18.8,24.2,20.8,21.9,20.8z M55,16.5c0-2.3,1.9-4.2,4.1-4.2c2.3,0,4.2,1.9,4.2,4.2s-1.9,4.2-4.2,4.2C56.8,20.8,55,18.9,55,16.5
|
|
364
|
+
z M20.4,69.8l-8.6-32.4c0.1-0.1,0.2-0.1,0.3-0.1s0.2-0.1,0.3-0.1l15.1,17.3l-3.7-31.6h0.1L40.3,51l0.2,0.4l16.6-28.7h0.1l-3.7,31.6
|
|
365
|
+
L68.6,37c0.2,0.1,0.4,0.2,0.6,0.3l-8.6,32.5H20.4z M76.3,31.6c0,2.3-1.9,4.1-4.2,4.1c-2.3,0-4.1-1.8-4.1-4.1s1.9-4.2,4.1-4.2
|
|
366
|
+
C74.4,27.4,76.3,29.3,76.3,31.6z M40.5,46.3L35.7,38l4.7-20.2h0.3L45.3,38L40.5,46.3z M40.5,15.5c-2.3,0-4.2-1.9-4.2-4.2
|
|
367
|
+
s1.9-4.1,4.2-4.1s4.2,1.9,4.2,4.1C44.8,13.6,42.8,15.5,40.5,15.5z"/>
|
|
368
|
+
<polygon points="40.5,65.7 36.6,59.8 40.5,54 44.4,59.8 "/>
|
|
369
|
+
</svg>
|
|
370
|
+
`,Cu=`<?xml version="1.0" encoding="utf-8"?>
|
|
371
|
+
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
372
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
373
|
+
viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
|
|
374
|
+
<style type="text/css">
|
|
375
|
+
.st0{fill:#FFFFFF;}
|
|
376
|
+
.st1{fill:#CFCECF;}
|
|
377
|
+
.st2{fill:none;}
|
|
378
|
+
</style>
|
|
379
|
+
<polygon class="st0" points="58.7,59.4 55.5,32.1 64.1,23.9 64.1,23.9 64.1,12.8 53,12.8 53,20.9 46.3,20.9 46.3,12.8 34.7,12.8
|
|
380
|
+
34.7,20.9 28,20.9 28,12.8 16.9,12.8 16.9,23.9 25.5,32.1 22.3,59.4 15.7,59.4 15.7,71 19.8,71 61.1,71 61.2,71 65.3,71 65.3,59.4
|
|
381
|
+
"/>
|
|
382
|
+
<path class="st1" d="M58.5,59.7l-4.2-27.2h2.2l7.6-8.6V12.8l-5.8,4.6v8.2H32l11.6,6.9h3.2c0,12.1-2.8,21.3-11.7,27.2h13.3V70h16
|
|
383
|
+
V59.7H58.5z"/>
|
|
384
|
+
<path d="M59.1,58.1l-2.6-24.8l8.7-9V11.5H51.8v8.2h-4.2v-8.2H33.5v8.2h-4.2v-8.2H15.6v12.9l8.7,9l-2.6,24.8l0,0h-7.3v14.1h51.8V72
|
|
385
|
+
l0,0h0.2V58.1H59.1z M36,22.2V14h9v8.2h9.2V14h8.5v9.3L54.4,32H26.5l-8.4-8.6V14h8.6v8.2H36z M54,34.4l2.6,23.7H24.3l2.6-23.7H54z
|
|
386
|
+
M56.9,60.6H60h4v9.1H17v-9.1h4.8H24H56.9z"/>
|
|
387
|
+
<rect class="st2" width="81" height="81"/>
|
|
388
|
+
</svg>
|
|
389
|
+
`,wu=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAAJRklEQVRoBe1YDXBU1RX+3u7bZBcSEILEYsYIYQjQpjOdlqEdlIr8Sa0Fp4jSOrTW0qn8GVLKSKE2GEcgkGIUBLVDaxGGCJaZ/kix02KLM0VbqRDHKZSKAgkEDISQZLOb3b39zn3vbXbDZvMW0cpM7s7dd9+95977nZ977jnP6Ag2KVzDxXMNY9fQexn4f2uwVwO9GviIEjDdzjdNkppZKcgVoqF2KNXpjc0s0nkuX1p1hBCNRuNrmD4f4GXtUmLhdsRisS69qV8v3yUFnYfgD9e+g32v/Q2aEZtGxRRyc3Nwz8y7kZ2drZkQ2n1/eQ2HDr8Dn89a3oCBSDSCaXdMQdHwIsQiEfJn4o0Db+LAG/+I04kIPIYHM785A3l5A90xIRdZT1WpkNq0sVrWV6bXjFfAUIU33aQaG06oaKhZryO08344N4nWyzkyd1fNNiqq3aYLq5WPLk+g8ymPx6sC/oA6dPCAUpHWHnEJblcaEIGL5E3Thz6BgLzqIlIN8J0bw+P1wDCk24ssmpBJ0+jTx6IVlOFQyJa0F17SajpqjcyRro9MRIxmmJ3l43runaNrBmgfehPrn7LXb4ZWc2NjIyI0C7Fb09+KYLDdZkYTWX/krrn5Es6fP4dIe4h0bWhtbbXXoXpsUueZMDNt0z0Dlnj1YhZ4ytDrxdlz5zBl2nQCtlmygWb7/RqU9ErN4oFdtrwcKytW6bMi9C0trVqDnQgzhU/L6JycvhWNRLWEHfBCLe1oNIaGhrNJkw2PoQ+jirNAWgJuamqKeyuBKqbiYX8nbB52W5NJC6Z5cWVsKhbFqFHFyBs4EOGODr2cs6kwIZpIrOJJnHFhwmkbApi0UoVemJIxWUNqezCIkcUjMDg/350H4hxXDETDYYy/bTxeqtmKz9yQjxAPpJwJ8f3dVRnX6AShTWf1SX/nPKfd1taGCdxj187tuCF/MGIJ9wVX6LYYmeQDpj+AQwf/he99/yEcO/Zf+06wJCwSFKxOMeRFOll0P/8o8M53q6kHIwQ7/a6vYcPT69H/uv6IUGBuS0YMyKJyy56jzdfV11vuzkYt9qzdo4PSRpDImNN2ng5IkXZRUREvw6ykm9oZT/fMmAFZTNuv46vpx8UXtDR9iPr60wiFQ7bgHZjylOJoyu4XRsl8mNIuKBiCQddf79psrPWsf9deKHGSjmcoNZMX0Ynjx7G+egP27v0Tzp6lj6e3spRgARcF2ZARpYfpoBMQVgwe9AjbJSWfw06erUE8uOBFGbezxA2lzbmc0LXXvRvtOlPAv8lYZs535+I/PA9+fat6u5Lpd5GylKLhwzB2zJcwevQoDGKsIw7glnFfwfDiYkQuXgD2vwqDQJXFu56j2adWUTQSKPmi+G2733pckQa8DCtOfnAC33lgLo6//wFy+vZNWtR5kZtZwH957BgsWPAQJk2cgAGD8jgszs8+PAxHxPcbz6wCdjxPLZjJJthB5m8shHpyO+ckcaa3yZgB7btpIysefYye6L14HKNXS/gTM5P4aWX5Cjy8aD4COTmIUZKR9vYEKjbp2fDCBuA3LwB9c9hBkBonGRSzGZAH9QQZG/FZgGF715IxA95sP2q278BLO19GwA7WnEUde49S8hLQbd5UjVn3zSbwIIEHHbLOp4D/8+9gPLtGSz5JwAzV5UyoRyqBL4yVW65zXkIrIy8kpnPqVB0mTr4Tp+rq4eO7bQjxveWAhkJhrF+3GvMWLuRWlKIe7UrJQ/zWfhhlc4DmJoLl+XFI5BKkl1M/ehy4b2634IUP1wyI6XgokQcf/AG2bqvRYbW1Hz0KF5J/eba1BfHtb83Cli3PsTOGdVVP4ujRY9alJ8C4jtj8YN7oj0wZhxxGpzEKIqlINtb/OmDcJK7BOVK7Kz0lM864UmG1Y9uvlJ8JR25OruqX24/VeUq7n/Jn+9XnS0rUmbrjdDAxtZlJkCQzkgT5TJ+u0iYWteW5TaTo4C+kOmJdqvRFg64SGlca8DIUPnnipDadOl5WYjpOETQieZ0LsH/3y9tx28Rp+Pvr+zD97llaI3LxOXQS8zy8aB41swYRiak+YukxmNNehypcvqIc79N1OuATlSptCfB+smwJwU8FNYD5Cxej+VKLvrUFozAZpAf66vhbUF7+UyjxMFeh9MiANzuArb9+ETt37U5KPgSQFA2MYfCM6V9HaekiBFsvorRsKd4+VEu79+rYRlxqBwEPG3ozmFsjp19/PVfGTWpH3K3EUm6/ROjJ9l9aE5LA7ci/j2Dy1G+g8XwjN+s0HWcRuaiGDr0Zr/7xt4xpCnCx6QLeOvh2XPJC52GCE2His3HjZrTLrewcSluN4nZ9NNPK1RUYwXxAvlq4LZcjsmdKViVmsWTpcpxpaECAKaIUx5alLRv72b/hqSoUFBZqX5/DC+v2SRM46uhImn48XV2FP7yyVyfuCSM6nJD4aN3aJzBiZDFibGdSumXAmxXAz1dX6iBNvjw4RTa3BKf0l4YK3rS3T55M8G2aROKbCO8Bp0gOsef3u3lzV8RNxRmTZxvN78dLFqOsrBRRCRsyLClNyKRUX//rfnqRe3Usk+ozRyu9yZz7Z+P5X2ymjTA11GbhsGfJWLzPu4drMe3OGag/fYYOQL7C2XbDVojmNPvemfrO8PFTy5Wcgcs0IPnqad628xcsxoULTchikqE3dfYltnC4A7cyiqyqqoSHwVj03VqSOASWCA1eYpEsP7a+WIMhNw5hwjJMR8pCJuxJFlbA/qeq1/GLhalDbWtmZv+XMWDwI9WePXsxcOAA3DF1kt5NNrUkzMX5Ip8RK9c8zjgrH5FnVsKQYEzuBkvwml+IOZRVoLyiHCaZSVVEQ0IsecKVlpQmJGATv4FaizsSZsjAcABmAJFXtsN4rJTA+S5VOJAH7Vrd8wCwdJWO77sDFxdKdwQu+lMykGqe4HJYACNS1P6Tgdj9QMsl5pgJipSQd8ytUGt/ya9Z2XJFp1ruqvUl7Jx+zTh4UfvJ92D8bD7wIT9o8a7QWZJwKNlSYRHUsrVgrA3mj+kXvQqjrjUQ30sYOH4UOMKDKxKWA6ILOYjRloePZvo3iuAzd4nxPTJoZM6ALC5MaJeYYid6JZ1JpRj6OLpcm1DS5mIqUj8Fpcdg7lOAMS2EXgbSiucTGOzVwCcg5LRbXPMa+B+FfZVWx1frbAAAAABJRU5ErkJggg==`,Tu=Object.assign({"../web/static/pieces/kosal/bB.svg":fu,"../web/static/pieces/kosal/bK.svg":pu,"../web/static/pieces/kosal/bN.svg":mu,"../web/static/pieces/kosal/bP.svg":hu,"../web/static/pieces/kosal/bQ.svg":gu,"../web/static/pieces/kosal/bR.svg":_u,"../web/static/pieces/kosal/wB.svg":vu,"../web/static/pieces/kosal/wK.svg":yu,"../web/static/pieces/kosal/wN.svg":bu,"../web/static/pieces/kosal/wP.svg":xu,"../web/static/pieces/kosal/wQ.svg":Su,"../web/static/pieces/kosal/wR.svg":Cu}),Eu=e=>`data:image/svg+xml,${encodeURIComponent(e.replace(/<\?xml[^>]*>/g,``).replace(/<!--[\s\S]*?-->/g,``).replace(/>\s+</g,`><`).replace(/\s+/g,` `).trim())}`,Du=Object.fromEntries(Object.entries(Tu).map(([e,t])=>[/(\w+)\.svg$/.exec(e)[1],Eu(t)])),Ou=e=>Du[e],ku=wu,Au=class extends du{constructor(...e){super(...e),y(this,`host`,{piece:Ou,tile:ku,name:`ChessDrive`,site:`https://platform.chessdrive.io`})}},ju=`0.1.0`;typeof customElements<`u`&&!customElements.get(`chessdrive-board`)&&customElements.define(`chessdrive-board`,Au);function Mu(e,t){let n=document.createElement(`chessdrive-board`);return t&&n.set(t),e.append(n),n}e.ChessDriveBoardElement=Au,e.START_FEN=el,e.boardLink=El,e.create=Mu,e.fromFragment=Tl,e.outcomeText=fl,e.toFragment=wl,e.version=ju});
|