draught/10.bootstrap.js

2 lines
18 KiB
JavaScript
Raw Normal View History

(self.webpackChunkdraught=self.webpackChunkdraught||[]).push([[10],{171:(t,e,r)=>{"use strict";r.a(t,(async n=>{r.d(e,{wc:()=>x,SZ:()=>O,i0:()=>S,Tt:()=>I,rh:()=>E,lA:()=>B,Ck:()=>q,ug:()=>U,h4:()=>W,Ih:()=>R,yq:()=>Z,gk:()=>$,U5:()=>Y,iY:()=>M,mS:()=>D,XP:()=>z,K0:()=>J,yX:()=>P,ae:()=>F,Os:()=>G,DA:()=>L,xA:()=>N,p$:()=>H,zG:()=>X,q5:()=>K,r2:()=>V,pv:()=>Q,cF:()=>tt,N_:()=>et,S2:()=>rt,on:()=>nt,CZ:()=>_t,Ox:()=>at,kP:()=>ct,GR:()=>ot,Yl:()=>it,CU:()=>st,RA:()=>ut,Si:()=>lt,c7:()=>pt,bf:()=>dt,Z4:()=>bt,tL:()=>gt,Qu:()=>ht,EB:()=>ft,Yc:()=>wt,rf:()=>mt,Ts:()=>vt,Mz:()=>yt,Zu:()=>kt,_G:()=>xt,kC:()=>Tt,m_:()=>Ot,fY:()=>St,Or:()=>It,oH:()=>jt});var _=r(813);t=r.hmd(t);var a=n([_]);_=(a.then?await a:a)[0];const c=new Array(32).fill(void 0);function o(t){return c[t]}c.push(void 0,null,!0,!1);let i=c.length;let s=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});s.decode();let u=null;function l(){return null!==u&&u.buffer===_.memory.buffer||(u=new Uint8Array(_.memory.buffer)),u}function p(t,e){return s.decode(l().subarray(t,t+e))}function d(t){i===c.length&&c.push(c.length+1);const e=i;return i=c[e],c[e]=t,e}function b(t){const e=typeof t;if("number"==e||"boolean"==e||null==t)return`${t}`;if("string"==e)return`"${t}"`;if("symbol"==e){const e=t.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=t.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(t)){const e=t.length;let r="[";e>0&&(r+=b(t[0]));for(let n=1;n<e;n++)r+=", "+b(t[n]);return r+="]",r}const r=/\[object ([^\]]+)\]/.exec(toString.call(t));let n;if(!(r.length>1))return toString.call(t);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?`${t.name}: ${t.message}\n${t.stack}`:n}let g=0,h=new("undefined"==typeof TextEncoder?(0,t.require)("util").TextEncoder:TextEncoder)("utf-8");const f="function"==typeof h.encodeInto?function(t,e){return h.encodeInto(t,e)}:function(t,e){const r=h.encode(t);return e.set(r),{read:t.length,written:r.length}};function w(t,e,r){if(void 0===r){const r=h.encode(t),n=e(r.length);return l().subarray(n,n+r.length).set(r),g=r.length,n}let n=t.length,_=e(n);const a=l();let c=0;for(;c<n;c++){const e=t.charCodeAt(c);if(e>127)break;a[_+c]=e}if(c!==n){0!==c&&(t=t.slice(c)),_=r(_,n,n=c+3*t.length);const e=l().subarray(_+c,_+n);c+=f(t,e).written}return g=c,_}let m=null;function v(){return null!==m&&m.buffer===_.memory.buffer||(m=new Int32Array(_.memory.buffer)),m}function y(t){return null==t}function k(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function x(){_.init_wasm()}function T(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(d(t))}}Object.freeze({Move:0,0:"Move",Jump:1,1:"Jump"});const O=Object.freeze({Black:0,0:"Black",White:1,1:"White"}),S=(Object.freeze({Man:0,0:"Man",King:1,1:"King"}),Object.freeze({Empty:0,0:"Empty",Occupied:1,1:"Occupied",Unplayable:2,2:"Unplayable"})),I=Object.freeze({Allowed:0,0:"Allowed",UnoccupiedSrc:1,1:"UnoccupiedSrc",OccupiedDest:2,2:"OccupiedDest",OutOfBounds:3,3:"OutOfBounds",Unplayable:4,4:"Unplayable",WrongTeamSrc:5,5:"WrongTeamSrc",IllegalTrajectory:6,6:"IllegalTrajectory",NoJumpablePiece:7,7:"NoJumpablePiece",JumpingSameTeam:8,8:"JumpingSameTeam"});class j{static __wrap(t){const e=Object.create(j.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();_.__wbg_board_free(t)}get width(){return _.__wbg_get_board_width(this.ptr)>>>0}set width(t){_.__wbg_set_board_width(this.ptr,t)}get height(){return _.__wbg_get_board_height(this.ptr)>>>0}set height(t){_.__wbg_set_board_height(this.ptr,t)}get current_turn(){return _.__wbg_get_board_current_turn(this.ptr)>>>0}set current_turn(t){_.__wbg_set_board_current_turn(this.ptr,t)}cell(t){var e=_.board_cell(this.ptr,t);return A.__wrap(e)}set_cell(t,e){k(e,A);var r=e.ptr;e.ptr=0,_.board_set_cell(this.ptr,t,r)}grid_cell(t){k(t,E);var e=t.ptr;t.ptr=0;var r=_.boar
//# sourceMappingURL=10.bootstrap.js.map